WhiteBIT · AsyncAPI Specification

WhiteBit Last Price

Version 1.0.0

Real-time last price information for trading pairs. Supports both one-time queries and subscription-based updates.

View Spec View on GitHub CompanyCryptocurrencyExchangeTradingWebSocketAsyncAPIEventsWebSockets

Channels

/ws
Last price operations for trading pairs. **Update Interval**: 1 second (for subscriptions)

Messages

✉
lastpriceRequest
Last Price Query
Get the latest price for a specific market
✉
lastpriceResponse
Last Price Response
Current last price for the market
✉
lastpriceSubscribe
Subscribe to Last Prices
Subscribe to price updates for multiple markets
✉
lastpriceSubscribeResponse
Subscribe Response
Subscription confirmation
✉
lastpriceUpdate
Last Price Update
Periodic last price update (every 1 second)
✉
lastpriceUnsubscribe
Unsubscribe from Last Prices
Stop receiving last price updates

Servers

wss
production
WhiteBIT Global Server
wss
eu
WhiteBIT EU Server

AsyncAPI Specification

Raw ↑
asyncapi: 3.0.0
info:
  title: WhiteBit Last Price
  version: 1.0.0
  description: Real-time last price information for trading pairs. Supports both one-time queries and subscription-based updates.
  x-auth-required: false
  x-rate-limits:
    connections-per-minute: 1000
    requests-per-10-seconds: 12000

servers:
  production:
    host: wss.whitebit.com
    protocol: wss
    description: WhiteBIT Global Server
  eu:
    host: api.whitebit.eu
    protocol: wss
    description: WhiteBIT EU Server

channels:
  /ws:
    address: /ws
    description: |
      Last price operations for trading pairs.

      **Update Interval**: 1 second (for subscriptions)
    messages:
      lastpriceRequest:
        $ref: '#/components/messages/lastpriceRequest'
      lastpriceResponse:
        $ref: '#/components/messages/lastpriceResponse'
      lastpriceSubscribe:
        $ref: '#/components/messages/lastpriceSubscribe'
      lastpriceSubscribeResponse:
        $ref: '#/components/messages/lastpriceSubscribeResponse'
      lastpriceUpdate:
        $ref: '#/components/messages/lastpriceUpdate'
      lastpriceUnsubscribe:
        $ref: '#/components/messages/lastpriceUnsubscribe'

operations:
  sendLastpriceRequest:
    action: receive
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceRequest'

  receiveLastpriceResponse:
    action: send
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceResponse'

  sendLastpriceSubscribe:
    action: receive
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceSubscribe'

  receiveLastpriceSubscribeResponse:
    action: send
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceSubscribeResponse'

  receiveLastpriceUpdates:
    action: send
    description: Receive periodic last price updates every 1 second
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceUpdate'

  sendLastpriceUnsubscribe:
    action: receive
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/lastpriceUnsubscribe'

components:
  messages:
    lastpriceRequest:
      name: LastpriceRequest
      title: Last Price Query
      summary: Get the latest price for a specific market
      payload:
        $ref: '#/components/schemas/LastpriceRequest'
      examples:
        - name: lastpriceQuery
          summary: |
            Query last price for a market:
            - params[0]: Market name (ETH_BTC)
          payload:
            id: 5
            method: lastprice_request
            params:
              - ETH_BTC

    lastpriceResponse:
      name: LastpriceResponse
      title: Last Price Response
      summary: Current last price for the market
      payload:
        $ref: '#/components/schemas/LastpriceResponse'
      examples:
        - name: priceData
          summary: Last price response
          payload:
            id: 5
            result: "0.020553"
            error: null

    lastpriceSubscribe:
      name: LastpriceSubscribe
      title: Subscribe to Last Prices
      summary: Subscribe to price updates for multiple markets
      payload:
        $ref: '#/components/schemas/LastpriceSubscribe'
      examples:
        - name: subscribeLastprice
          summary: |
            Subscribe to last price updates:
            - params: Array of market names (ETH_BTC, BTC_USDT)
          payload:
            id: 6
            method: lastprice_subscribe
            params:
              - ETH_BTC
              - BTC_USDT

    lastpriceSubscribeResponse:
      name: LastpriceSubscribeResponse
      title: Subscribe Response
      summary: Subscription confirmation
      payload:
        $ref: '#/components/schemas/SubscriptionResponse'
      examples:
        - name: subscribeSuccess
          summary: Subscription successful
          payload:
            id: 6
            result:
              status: success
            error: null

    lastpriceUpdate:
      name: LastpriceUpdate
      title: Last Price Update
      summary: Periodic last price update (every 1 second)
      payload:
        $ref: '#/components/schemas/LastpriceUpdate'
      examples:
        - name: priceUpdate
          summary: |
            Last price update event with parameters:
            - params[0]: Market name (ETH_BTC)
            - params[1]: Last price (0.020683)
          payload:
            id: null
            method: lastprice_update
            params:
              - ETH_BTC
              - "0.020683"

    lastpriceUnsubscribe:
      name: LastpriceUnsubscribe
      title: Unsubscribe from Last Prices
      summary: Stop receiving last price updates
      payload:
        $ref: '#/components/schemas/UnsubscribeRequest'
      examples:
        - name: unsubscribeLastprice
          summary: Unsubscribe from price updates
          payload:
            id: 7
            method: lastprice_unsubscribe
            params: []

  schemas:
    LastpriceRequest:
      type: object
      required:
        - id
        - method
        - params
      properties:
        id:
          type: integer
          description: Unique request identifier
        method:
          type: string
          const: lastprice_request
          description: "Method name. Fixed value: `lastprice_request`."
        params:
          type: array
          minItems: 1
          maxItems: 1
          items:
            - type: string
              description: "[Market](/glossary#market) name (e.g., ETH_BTC)"
              x-field-name: market
              x-required: true
              x-example: "ETH_BTC"

    LastpriceResponse:
      type: object
      required:
        - id
        - result
        - error
      properties:
        id:
          type: integer
        result:
          type: string
          description: Last price
        error:
          type: "null"

    LastpriceSubscribe:
      type: object
      required:
        - id
        - method
        - params
      properties:
        id:
          type: integer
          description: Unique request identifier
        method:
          type: string
          const: lastprice_subscribe
          description: "Method name. Fixed value: `lastprice_subscribe`."
        params:
          type: array
          items:
            type: string
            description: "[Market](/glossary#market) names"

    SubscriptionResponse:
      type: object
      required:
        - id
        - result
        - error
      properties:
        id:
          type: integer
        result:
          type: object
          required:
            - status
          properties:
            status:
              type: string
              const: success
              description: "Fixed value: `success`."
        error:
          type: "null"

    LastpriceUpdate:
      type: object
      required:
        - id
        - method
        - params
      properties:
        id:
          type: "null"
        method:
          type: string
          const: lastprice_update
          description: "Method name. Fixed value: `lastprice_update`."
        params:
          type: array
          description: |
            Update event parameters:
            - [0] Market name
            - [1] Last price
          minItems: 2
          maxItems: 2
          items:
            - type: string
              description: "[Market](/glossary#market) name"
            - type: string
              description: Last price

    UnsubscribeRequest:
      type: object
      required:
        - id
        - method
        - params
      properties:
        id:
          type: integer
          description: Unique request identifier
        method:
          type: string
          const: lastprice_unsubscribe
          description: "Method name. Fixed value: `lastprice_unsubscribe`."
        params:
          type: array
          items: {}
          maxItems: 0

Work with this as data

Every AsyncAPI spec 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 asyncapi

4 MCP tools reach this
  • find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.
  • 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 AsyncAPI spec
curl "https://apis.io/api/v1/asyncapis/whitebit-public-lastprice-asyncapi"
All asyncapi
curl "https://apis.io/api/v1/asyncapis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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.