Babylon Labs Staker API

The Staker API from Babylon Labs — 2 operation(s) for staker.

Operations 2

GET /v1/staker/delegations Get staker delegations #
GET /v2/staker/stats Get Staker Stats #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/babylon-labs-staker-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

babylon-labs-staker-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: contact@babylonlabs.io
  description: 'The Babylon Staking API offers information about the state of the Babylon BTC Staking system.

    Your access and use is governed by the API Access License linked to below.'
  license:
    name: API Access License
    url: https://docs.babylonlabs.io/assets/files/api-access-license.pdf
  title: Babylon Staking Staker API
  version: '2.0'
tags:
- name: Staker
paths:
  /v1/staker/delegations:
    get:
      description: 'Retrieves phase-1 delegations for a given staker. This endpoint will be deprecated once all phase-1 delegations are either withdrawn or registered into phase-2.

        This endpoint is only used to show legacy phase-1 delegations for the purpose of unbonding or registering into phase-2.'
      parameters:
      - description: Staker BTC Public Key
        in: query
        name: staker_btc_pk
        required: true
        schema:
          type: string
      - description: Only return delegations with pending actions which include active, unbonding, unbonding_requested, unbonded
        in: query
        name: pending_action
        schema:
          type: boolean
      - description: Pagination key to fetch the next page of delegations
        in: query
        name: pagination_key
        schema:
          type: string
      responses:
        '200':
          description: List of delegations and pagination token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.PublicResponse-array_v1service_DelegationPublic'
        '400':
          description: 'Error: Bad Request'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
      tags:
      - Staker
      summary: Get staker delegations
      x-summary-source: derived
      operationId: getV1StakerDelegations
      x-operation-id-source: derived
  /v2/staker/stats:
    get:
      description: Fetches staker stats for babylon staking including active tvl,
      parameters:
      - description: Public key of the staker to fetch
        in: query
        name: staker_pk_hex
        required: true
        schema:
          type: string
      - description: Babylon address of the staker to fetch
        in: query
        name: babylon_address
        schema:
          type: string
      responses:
        '200':
          description: Staker stats
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.PublicResponse-v2service_StakerStatsPublic'
        '400':
          description: 'Error: Bad Request'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
        '404':
          description: 'Error: Not Found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
        '500':
          description: 'Error: Internal Server Error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
      summary: Get Staker Stats
      tags:
      - Staker
      operationId: getV2StakerStats
      x-operation-id-source: derived
components:
  schemas:
    handler.PublicResponse-v2service_StakerStatsPublic:
      properties:
        data:
          $ref: '#/components/schemas/v2service.StakerStatsPublic'
        pagination:
          $ref: '#/components/schemas/handler.paginationResponse'
      type: object
    v1service.TransactionPublic:
      properties:
        output_index:
          type: integer
        start_height:
          type: integer
        start_timestamp:
          type: string
        timelock:
          type: integer
        tx_hex:
          type: string
      type: object
    handler.PublicResponse-array_v1service_DelegationPublic:
      properties:
        data:
          items:
            $ref: '#/components/schemas/v1service.DelegationPublic'
          type: array
        pagination:
          $ref: '#/components/schemas/handler.paginationResponse'
      type: object
    types.ErrorCode:
      enum:
      - INTERNAL_SERVICE_ERROR
      - VALIDATION_ERROR
      - NOT_FOUND
      - BAD_REQUEST
      - FORBIDDEN
      - UNPROCESSABLE_ENTITY
      - REQUEST_TIMEOUT
      type: string
      x-enum-varnames:
      - InternalServiceError
      - ValidationError
      - NotFound
      - BadRequest
      - Forbidden
      - UnprocessableEntity
      - RequestTimeout
    handler.paginationResponse:
      properties:
        next_key:
          type: string
      type: object
    v2service.StakerStatsPublic:
      properties:
        active_delegations:
          type: integer
        active_tvl:
          type: integer
        slashed_delegations:
          type: integer
        slashed_tvl:
          type: integer
        unbonding_delegations:
          type: integer
        unbonding_tvl:
          type: integer
        withdrawable_delegations:
          type: integer
        withdrawable_tvl:
          type: integer
      type: object
    github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error:
      properties:
        err: {}
        errorCode:
          $ref: '#/components/schemas/types.ErrorCode'
        statusCode:
          type: integer
      type: object
    types.DelegationState:
      enum:
      - active
      - unbonding_requested
      - unbonding
      - unbonded
      - withdrawable
      - withdrawn
      - transitioned
      - slashed
      type: string
      x-enum-varnames:
      - Active
      - UnbondingRequested
      - Unbonding
      - Unbonded
      - Withdrawable
      - Withdrawn
      - Transitioned
      - Slashed
    v1service.DelegationPublic:
      properties:
        finality_provider_pk_hex:
          type: string
        is_eligible_for_transition:
          type: boolean
        is_overflow:
          type: boolean
        is_slashed:
          type: boolean
        staker_pk_hex:
          type: string
        staking_tx:
          $ref: '#/components/schemas/v1service.TransactionPublic'
        staking_tx_hash_hex:
          type: string
        staking_value:
          type: integer
        state:
          $ref: '#/components/schemas/types.DelegationState'
        unbonding_tx:
          $ref: '#/components/schemas/v1service.TransactionPublic'
      type: object