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

# Depth

> Percentage depth profiles offer insights into the order book structure and available liquidity at different price levels. By analyzing buy and sell liquidity within a specified percentage range from the best-bid/best-ask, traders can assess liquidity distribution and its impact on market behavior. The order book depth endpoint returns liquidity data in percentage-based tranches, measured in basis points, at 1-minute intervals. If no date range is specified, the most recent 24 hours of data will be returned.



## OpenAPI

````yaml get /depth
openapi: 3.1.0
info:
  title: spot-analytics
  version: '2'
servers:
  - url: https://api.amberdata.com/markets/spot/analytics
security:
  - sec0: []
paths:
  /depth:
    get:
      summary: Depth
      description: >-
        Percentage depth profiles offer insights into the order book structure
        and available liquidity at different price levels. By analyzing buy and
        sell liquidity within a specified percentage range from the
        best-bid/best-ask, traders can assess liquidity distribution and its
        impact on market behavior. The order book depth endpoint returns
        liquidity data in percentage-based tranches, measured in basis points,
        at 1-minute intervals. If no date range is specified, the most recent 24
        hours of data will be returned.
      operationId: spot-analytics-order-book-depth
      parameters:
        - name: exchange
          in: query
          description: >-
            **[Required]** The select exchange for which to view liquidity
            depth.

            **[Examples]** ` gdax | okex | binance | binanceus`
          required: true
          schema:
            type: string
            default: gdax
        - name: pair
          in: query
          description: |-
            **[Required]** The currency pair for which to view liquidity depth.
            **[Examples]** ` btc_usd | btc_usdc | eth_usd `
          required: true
          schema:
            type: string
            default: btc_usd
        - name: startDate
          in: query
          description: >-
            **[Optional]** Payload only includes data after this date
            (inclusive).

            **[Formats]** `seconds | milliseconds | iso8601` 

            **[Examples]** `1578531600 | 1578531600000 | 2025-02-27`
          schema:
            type: string
        - name: endDate
          in: query
          description: >-
            **[Optional]** Payload only includes data up to this date
            (exclusive).

            **[Formats]** `seconds | milliseconds | iso8601` 

            **[Examples]** `1578531600 | 1578531600000 | 2025-02-28`
          schema:
            type: string
        - name: timeFormat
          in: query
          description: >-
            **[Optional]** Time format of the timestamps in the return payload. 

            **[Defaults]** `milliseconds | ms* | iso | iso8601 | hr |
            human_readable`
          schema:
            type: string
            default: hr
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  title:
                    type: string
                    example: OK
                  description:
                    type: string
                    example: Successful request
                  payload:
                    type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            basisPoints005:
                              type: number
                              example: 6.830253600000002
                              description: Depth at 5 basis points from BBO
                            basisPoints005OrderCount:
                              type: integer
                              example: 60
                              description: Number of orders at 5 basis points depth
                            basisPoints005UsdMillion:
                              type: number
                              example: 0.564816653987364
                              description: USD value in millions at 5 basis points depth
                            bestAskPrice:
                              type: number
                              example: 82695.55
                              description: The best ask price in the order book
                            bestBidPrice:
                              type: number
                              example: 82691.18
                              description: The best bid price in the order book
                            exchange:
                              type: string
                              example: gdax
                              description: The exchange where the depth data is from
                            midPrice:
                              type: number
                              example: 82693.36499999999
                              description: The mid-price between best bid and ask
                            pair:
                              type: string
                              example: btc_usd
                              description: The trading pair for the depth data
                            side:
                              type: string
                              example: ask
                              description: The side of the order book (ask or bid)
                            spreadPercent:
                              type: number
                              example: 0.005284583593871039
                              description: The spread percentage between best bid and ask
                            timestamp:
                              type: integer
                              example: 1742342400000
                              description: >-
                                The timestamp for the depth data point in
                                milliseconds
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - basisPoints005: 6.830253600000002
                          basisPoints005OrderCount: 60
                          basisPoints005UsdMillion: 0.564816653987364
                          basisPoints010: 29.522870730000008
                          basisPoints010OrderCount: 111
                          basisPoints010UsdMillion: 2.441345525123707
                          basisPoints015: 44.98593633999999
                          basisPoints015OrderCount: 150
                          basisPoints015UsdMillion: 3.7200384536303828
                          basisPoints020: 63.778317060000006
                          basisPoints020OrderCount: 192
                          basisPoints020UsdMillion: 5.274043651728307
                          basisPoints025: 85.55252507000004
                          basisPoints025OrderCount: 228
                          basisPoints025UsdMillion: 7.074626182285163
                          basisPoints050: 122.20367462999992
                          basisPoints050OrderCount: 336
                          basisPoints050UsdMillion: 10.105433070519823
                          basisPoints075: 157.26895277999978
                          basisPoints075OrderCount: 457
                          basisPoints075UsdMillion: 13.005098915404284
                          basisPoints100: 173.7872608699996
                          basisPoints100OrderCount: 571
                          basisPoints100UsdMillion: 14.371053395473094
                          basisPoints125: 176.1600231899997
                          basisPoints125OrderCount: 680
                          basisPoints125UsdMillion: 14.567265096059106
                          basisPoints150: 189.4091800699996
                          basisPoints150OrderCount: 801
                          basisPoints150UsdMillion: 15.6628824618792
                          basisPoints175: 207.83888358999965
                          basisPoints175OrderCount: 921
                          basisPoints175UsdMillion: 17.18689666190035
                          basisPoints200: 228.8633147599998
                          basisPoints200OrderCount: 1033
                          basisPoints200UsdMillion: 18.92547762255855
                          basisPoints225: 275.7434367699998
                          basisPoints225OrderCount: 1167
                          basisPoints225UsdMillion: 22.80215266317601
                          basisPoints250: 318.46661659999984
                          basisPoints250OrderCount: 1287
                          basisPoints250UsdMillion: 26.335076166818844
                          basisPoints275: 324.02097659999987
                          basisPoints275OrderCount: 1430
                          basisPoints275UsdMillion: 26.794384885640245
                          basisPoints300: 363.1769934100001
                          basisPoints300OrderCount: 1617
                          basisPoints300UsdMillion: 30.032327675655726
                          basisPoints325: 372.98405825000043
                          basisPoints325OrderCount: 1820
                          basisPoints325UsdMillion: 30.843306868048543
                          basisPoints350: 384.7937300700006
                          basisPoints350OrderCount: 2019
                          basisPoints350UsdMillion: 31.819888370390032
                          basisPoints375: 402.4399919800007
                          basisPoints375OrderCount: 2204
                          basisPoints375UsdMillion: 33.27911714739926
                          basisPoints400: 431.12956241000063
                          basisPoints400OrderCount: 2388
                          basisPoints400UsdMillion: 35.65155426666046
                          basisPoints425: 434.9075431700006
                          basisPoints425OrderCount: 2539
                          basisPoints425UsdMillion: 35.96396820861012
                          basisPoints450: 441.3240401900004
                          basisPoints450OrderCount: 2694
                          basisPoints450UsdMillion: 36.49456993870637
                          basisPoints475: 447.6692832100005
                          basisPoints475OrderCount: 2832
                          basisPoints475UsdMillion: 37.019279435772944
                          basisPoints500: 450.29508528000065
                          basisPoints500OrderCount: 2972
                          basisPoints500UsdMillion: 37.23641584476522
                          bestAskPrice: 82695.55
                          bestBidPrice: 82691.18
                          exchange: gdax
                          midPrice: 82693.36499999999
                          pair: btc_usd
                          side: ask
                          spreadPercent: 0.005284583593871039
                          timestamp: 1742342400000
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````