> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /binance/order_book

> Get the current order book (bids and asks) for a trading pair

**Price:** 1 credit

**💡 AI Hint:** Get the live order book for a Binance spot trading pair (e.g. 'BTCUSDT') — the real exchange liquidity that price aggregators do not expose. Returns the current bids and asks, each as a price and quantity, sorted best-first, plus the order book's last update id. The limit controls how many price levels are returned per side (deeper books reveal more liquidity).

**⚠️ Common errors:** 412: Trading pair not found



## OpenAPI

````yaml /openapi-filtered.json post /api/binance/order_book
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/binance/order_book:
    post:
      tags:
        - /binance
      summary: /binance/order_book
      description: >-
        Get the current order book (bids and asks) for a trading pair


        **Price:** 1 credit


        **💡 AI Hint:** Get the live order book for a Binance spot trading pair
        (e.g. 'BTCUSDT') — the real exchange liquidity that price aggregators do
        not expose. Returns the current bids and asks, each as a price and
        quantity, sorted best-first, plus the order book's last update id. The
        limit controls how many price levels are returned per side (deeper books
        reveal more liquidity).


        **⚠️ Common errors:** 412: Trading pair not found
      operationId: __api_binance_order_book_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BinanceOrderBookPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BinanceOrderBook'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BinanceOrderBookPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          description: Max scrapping execution timeout (in seconds)
          default: 300
        symbol:
          type: string
          description: Trading pair symbol, uppercase, no separator
          examples:
            - BTCUSDT
            - ETHUSDT
        limit:
          $ref: '#/components/schemas/BinanceOrderBookDepth'
          description: Number of price levels to return per side
          default: '100'
      type: object
      required:
        - symbol
    BinanceOrderBook:
      properties:
        '@type':
          type: string
          default: BinanceOrderBook
        symbol:
          type: string
        last_update_id:
          anyOf:
            - type: integer
            - type: 'null'
        bids:
          items:
            $ref: '#/components/schemas/BinanceOrderBookLevel'
          type: array
          default: []
        asks:
          items:
            $ref: '#/components/schemas/BinanceOrderBookLevel'
          type: array
          default: []
      type: object
      required:
        - symbol
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    BinanceOrderBookDepth:
      type: string
      enum:
        - '5'
        - '10'
        - '20'
        - '50'
        - '100'
        - '500'
        - '1000'
        - '5000'
    BinanceOrderBookLevel:
      properties:
        '@type':
          type: string
          default: BinanceOrderBookLevel
        price:
          type: number
        quantity:
          type: number
      type: object
      required:
        - price
        - quantity
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````