Babylon Labs shared API

Shared API endpoints

Operations 3

GET /healthcheck Health check endpoint
GET /v1/staker/delegation/check
GET /v1/staker/pubkey-lookup Get stakers' public keys

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-shared-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-shared-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 Shared API
  version: '2.0'
servers:
- url: https://staking-api.babylonlabs.io/
tags:
- description: Shared API endpoints
  name: shared
paths:
  /healthcheck:
    get:
      description: Health check the service, including ping database connection
      responses:
        '200':
          description: Server is up and running
          content:
            application/json:
              schema:
                type: string
      summary: Health check endpoint
      tags:
      - shared
  /v1/staker/delegation/check:
    get:
      description: 'Check if a staker has an active delegation by the staker BTC address (Taproot or Native Segwit).

        Optionally, you can provide a timeframe to check if the delegation is active within the provided timeframe

        The available timeframe is "today" which checks after UTC 12AM of the current day'
      parameters:
      - description: Staker BTC address in Taproot/Native Segwit format
        in: query
        name: address
        required: true
        schema:
          type: string
      - description: Check if the delegation is active within the provided timeframe
        in: query
        name: timeframe
        schema:
          type: string
          enum:
          - today
      responses:
        '200':
          description: Delegation check result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1handlers.DelegationCheckPublicResponse'
        '400':
          description: 'Error: Bad Request'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
      tags:
      - shared
  /v1/staker/pubkey-lookup:
    get:
      description: 'Retrieves public keys for the given BTC addresses. This endpoint

        only returns public keys for addresses that have associated delegations in

        the system. If an address has no associated delegation, it will not be

        included in the response. Supports both Taproot and Native Segwit addresses.'
      parameters:
      - description: List of BTC addresses to look up (up to 10), currently only supports Taproot and Native Segwit addresses
        in: query
        name: address
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: A map of BTC addresses to their corresponding public keys (only addresses with delegations are returned)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.PublicResponse-map_string_string'
        '400':
          description: 'Bad Request: Invalid input parameters'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error'
      summary: Get stakers' public keys
      tags:
      - shared
components:
  schemas:
    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
    handler.PublicResponse-map_string_string:
      properties:
        data:
          $ref: '#/components/schemas/map_string_string'
        pagination:
          $ref: '#/components/schemas/handler.paginationResponse'
      type: object
    v1handlers.DelegationCheckPublicResponse:
      properties:
        code:
          type: integer
        data:
          type: boolean
      type: object
    map_string_string:
      additionalProperties:
        type: string
      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