Amberdata Spot API

Spot market analytics across supported exchanges (order-book depth, trade analytics).

OpenAPI Specification

amberdata-spot-openapi.yaml Raw ↑
openapi: 3.1.0
info:
  title: spot-analytics
  version: '2'
servers:
  - url: https://api.amberdata.com/markets/spot/analytics
security:
  - sec0: []
paths:
  /depth/information:
    get:
      summary: Information Depth Analytics Pairs and Exchanges
      description: >-
        This endpoint retrieves all available exchanges and their associated
        currency pairs, along with the earliest and latest dates of historical
        data. It applies specifically to spot order book depth analytics.
      operationId: spot-analytics-information-order-book-depth
      parameters:
        - name: exchange
          in: query
          description: >-
            **[Optional]** The exchange for which to retrieve listed spot
            instruments.

            **[Examples]** ` gdax | okex | binance | binanceus`
          schema:
            type: string
        - name: pair
          in: query
          description: |-
            **[Optional]** The currency pair for the spot instrument.
            **[Examples]** ` btc_usd | btc_usdc | eth_usd `
          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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: btc_usd
                          startDate: '2025-02-22T00:08:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: btc_usdt
                          startDate: '2025-02-22T00:08:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: doge_usd
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: doge_usdt
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: eth_usd
                          startDate: '2025-02-22T00:08:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: eth_usdt
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: sol_usd
                          startDate: '2025-02-22T00:06:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: sol_usdt
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: sui_usd
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: usdt_usd
                          startDate: '2025-02-22T00:08:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: xrp_usd
                          startDate: '2025-02-22T00:07:00Z'
                        - endDate: '2025-03-05T21:39:00Z'
                          exchange: gdax
                          pair: xrp_usdt
                          startDate: '2025-02-22T00:07:00Z'
              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:
                            endDate:
                              type: string
                              example: '2025-03-05T21:39:00Z'
                              description: >-
                                The last data observation for this pair's Depth
                                analytics
                            exchange:
                              type: string
                              example: gdax
                              description: Exchange reflecting the pair
                            pair:
                              type: string
                              example: btc_usd
                              description: The subject pair
                            startDate:
                              type: string
                              example: '2025-02-22T00:08:00Z'
                              description: >-
                                The first data observation for this pair's Depth
                                analytics
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
  /trade/information/pairs:
    get:
      summary: Information Trade Analytics Pairs
      description: >-
        This endpoint returns all the available pairs for a given exchange in
        the spot "Trade Analytics" section. The associated startDate and endDate
        represent the available history of trade data.
      operationId: spot-analytics-information-trade-analytics-pairs
      parameters:
        - name: exchange
          in: query
          description: >-
            **[Required]** The exchange for which to retrieve listed spot
            instruments.

            **[Examples]** ` gdax | okex | binance | binanceus`
          required: true
          schema:
            type: string
            default: gdax
        - 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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - endDate: 2025-04-02 11:39:00 000
                          exchange: gdax
                          pair: 00_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-04-02 11:20:00 000
                          exchange: gdax
                          pair: 1inch_eur
                          startDate: 2025-03-12 13:18:00 000
                        - endDate: 2025-04-02 10:42:00 000
                          exchange: gdax
                          pair: 1inch_gbp
                          startDate: 2025-03-12 13:14:00 000
                        - endDate: 2025-04-02 11:28:00 000
                          exchange: gdax
                          pair: 1inch_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-04-02 11:39:00 000
                          exchange: gdax
                          pair: a8_usd
                          startDate: 2025-01-01 00:02:00 000
                        - endDate: 2025-04-02 11:43:00 000
                          exchange: gdax
                          pair: aave_btc
                          startDate: 2025-03-12 13:11:00 000
                        - endDate: 2025-04-02 11:44:00 000
                          exchange: gdax
                          pair: aave_eur
                          startDate: 2025-03-12 13:11:00 000
                        - endDate: 2025-04-02 11:32:00 000
                          exchange: gdax
                          pair: aave_gbp
                          startDate: 2025-03-12 13:11:00 000
              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:
                            endDate:
                              type: string
                              example: 2025-04-02 11:39:00 000
                              description: >-
                                The last data observation for this pair's Trade
                                analytics
                            exchange:
                              type: string
                              example: gdax
                              description: Exchange reflecting the pair
                            pair:
                              type: string
                              example: 00_usd
                              description: The subject pair
                            startDate:
                              type: string
                              example: 2025-01-01 00:00:00 000
                              description: >-
                                The first data observation for this pair's Trade
                                analytics
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
  /trade/information/exchanges:
    get:
      summary: Information Trade Exchange Support per Pair
      description: >-
        This endpoint returns all the exchanges that provide support for a given
        pair in the spot "Trade Analytics" section. The associated startDate and
        endDate represent the available history of trade data.
      operationId: spot-analytics-information-trade-exchange-support-per-pair
      parameters:
        - name: pair
          in: query
          description: |-
            **[Required]** The currency pair for the spot instrument.
            **[Examples]** ` btc_usd | btc_usdc | eth_usd `
          required: true
          schema:
            type: string
            default: btc_usd
        - 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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - endDate: 2025-04-02 10:52:00 000
                          exchange: binanceus
                          pair: btc_usd
                          startDate: 2025-02-19 13:43:00 000
                        - endDate: 2025-03-17 23:58:00 000
                          exchange: bitstamp
                          pair: btc_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-04-02 11:54:00 000
                          exchange: bullish
                          pair: btc_usd
                          startDate: 2025-03-20 15:09:00 000
                        - endDate: 2025-04-02 11:54:00 000
                          exchange: cryptocom
                          pair: btc_usd
                          startDate: 2025-02-18 23:44:00 000
                        - endDate: 2025-04-02 11:54:00 000
                          exchange: gdax
                          pair: btc_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-03-17 23:59:00 000
                          exchange: gemini
                          pair: btc_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-04-02 11:53:00 000
                          exchange: hashkey
                          pair: btc_usd
                          startDate: 2025-02-28 19:14:00 000
                        - endDate: 2025-03-17 23:59:00 000
                          exchange: itbit
                          pair: btc_usd
                          startDate: 2025-01-01 00:00:00 000
                        - endDate: 2025-03-17 23:59:00 000
                          exchange: kraken
                          pair: btc_usd
                          startDate: 2025-01-01 00:00:00 000
                      metadata:
                        api-version: '2023-09-30'
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                    default: 0
                  title:
                    type: string
                    example: OK
                  description:
                    type: string
                    example: Successful request
                  payload:
                    type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            endDate:
                              type: string
                              example: 2025-04-02 10:52:00 000
                              description: >-
                                The last data observation for this exchange's
                                pair in Trade analytics
                            exchange:
                              type: string
                              example: binanceus
                              description: The supported exchange for Trade analytics
                            pair:
                              type: string
                              example: btc_usd
                              description: >-
                                The supported pair for this exchange's Trade
                                analytics
                            startDate:
                              type: string
                              example: 2025-02-19 13:43:00 000
                              description: >-
                                The first data observation for this exchange's
                                pair in Trade analytics
                      metadata:
                        type: object
                        properties:
                          api-version:
                            type: string
                            example: '2023-09-30'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
  /depth/bid-ask-spread:
    get:
      summary: Bid Ask Spread
      description: >-
        This endpoint allows users to explore the bid-ask spread for a specific
        trading pair or underlying asset across one or more exchanges. It
        provides both the absolute dollar spread (based on the best bid and
        offer) and the spread as a percentage of the mid-price.
      operationId: spot-analytics-order-book-depth-bid-ask-spread
      parameters:
        - name: pair
          in: query
          description: |-
            **[Required]** The currency pair for the spot instrument.
            **[Examples]** ` btc_usd | btc_usdc | eth_usd `
          required: true
          schema:
            type: string
            default: btc_usd
        - name: fuzzyMatch
          in: query
          description: >-
            **[Required]** This parameter controls how the provided trading pair
            symbol is interpreted. When set to FALSE, it returns data only for
            the exact pair specified (e.g., btc_usd). When set to TRUE, it
            enables fuzzy matching—users can then pass just the base asset
            (e.g., btc) returns all pairs with that base (e.g., btc_eur,
            btc_usd, btc_usdt, etc.), while passing a full pair like btc_usd
            returns all pairs with the same base and similar USD-related quote
            assets (e.g., btc_usd, btc_usdt, btc_usdc, etc.).
          required: true
          schema:
            type: boolean
            default: false
        - name: exchange
          in: query
          description: |-
            **[Optional]** The exchange for the associated bid ask spread.
            **[Examples]** ` gdax | okex | binance | binanceus`
          schema:
            type: string
        - 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
            default: '2025-05-01'
        - 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
            default: '2025-05-02'
        - 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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - bestAskPrice: 96589.6
                          bestBidPrice: 96222.19
                          exchange: binanceus
                          midPrice: 96405.895
                          pair: btc_usd
                          spread: 367.4100000000035
                          spreadPercent: 0.3811074001232015
                          timestamp: 1746144000000
                        - bestAskPrice: 96524.98
                          bestBidPrice: 96523.62
                          exchange: gdax
                          midPrice: 96524.29999999999
                          pair: btc_usd
                          spread: 1.360000000000582
                          spreadPercent: 0.0014089716268344678
                          timestamp: 1746144000000
                        - bestAskPrice: 96469.9
                          bestBidPrice: 96469.8
                          exchange: kraken
                          midPrice: 96469.85
                          pair: btc_usd
                          spread: 0.09999999999126885
                          spreadPercent: 0.00010365932982301604
                          timestamp: 1746144000000
                        - bestAskPrice: 96504.1
                          bestBidPrice: 96486.8
                          exchange: okex
                          midPrice: 96495.45000000001
                          pair: btc_usd
                          spread: 17.30000000000291
                          spreadPercent: 0.017928306464193813
                          timestamp: 1746144000000
                        - bestAskPrice: 96589.61
                          bestBidPrice: 96222.19
                          exchange: binanceus
                          midPrice: 96405.9
                          pair: btc_usd
                          spread: 367.41999999999825
                          spreadPercent: 0.3811177531665575
                          timestamp: 1746143940000
                        - bestAskPrice: 96537.56
                          bestBidPrice: 96537.55
                          exchange: gdax
                          midPrice: 96537.555
                          pair: btc_usd
                          spread: 0.00999999999476131
                          spreadPercent: 0.000010358663004010523
                          timestamp: 1746143940000
              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:
                            bestAskPrice:
                              type: number
                              example: 96589.6
                              description: The ask side of the BBO
                            bestBidPrice:
                              type: number
                              example: 96222.19
                              description: The bid side of the BBO
                            exchange:
                              type: string
                              example: binanceus
                              description: The subject exchange
                            midPrice:
                              type: number
                              example: 96405.895
                              description: The mid-price of the BBO
                            pair:
                              type: string
                              example: btc_usd
                              description: The subject pair
                            spread:
                              type: number
                              example: 367.4100000000035
                              description: The absolute BBO spread in quote terms
                            spreadPercent:
                              type: number
                              example: 0.3811074001232015
                              description: The absolute BBO spread divided by the mid-price
                            timestamp:
                              type: integer
                              example: 1746144000000
                              description: The observation timestamp
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
  /depth/average-time-series:
    get:
      summary: Average Depth
      description: >-
        This endpoint allows user to view the average order book depth sizes per
        level. The depth will be displayed in base terms for a given pair,
        meaning btc_usd will have depth in btc terms. This endpoint is useful to
        quickly observe what times liquidity enters the market.
      operationId: spot-analytics-order-book-depth-average
      parameters:
        - name: exchange
          in: query
          description: >-
            **[Required]** The select exchange for which to view average
            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 average 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
            default: '2025-03-01'
        - 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
            default: '2025-03-05'
        - name: timeInterval
          in: query
          description: >-
            **[Optional]** Time interval of data frequency for the selected date
            range. 

            **[Examples]** ` hour | day`
          required: true
          schema:
            type: string
            default: hour
        - 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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - basisPoints005OrderCount: 50.11585807385952
                          basisPoints005UsdMillion: 0.8164277240123664
                          basisPoints010OrderCount: 101.4076755973932
                          basisPoints010UsdMillion: 2.4200052792833198
                          basisPoints015OrderCount: 139.33526430123098
                          basisPoints015UsdMillion: 4.032354567973533
                          basisPoints020OrderCount: 165.07965242577842
                          basisPoints020UsdMillion: 5.12001239439905
                          basisPoints025OrderCount: 186.58435916002895
                          basisPoints025UsdMillion: 6.4849871469881615
                          basisPoints050OrderCount: 276.2288196958726
                          basisPoints050UsdMillion: 9.863984912294022
                          basisPoints075OrderCount: 378.10065170166547
                          basisPoints075UsdMillion: 12.520908232726379
                          basisPoints100OrderCount: 488.112961622013
                          basisPoints100UsdMillion: 14.552850237163344
                          basisPoints125OrderCount: 598.8146270818247
                          basisPoints125UsdMillion: 15.676340302313667
                          basisPoints150OrderCount: 711.1810282404055
                          basisPoints150UsdMillion: 16.402634998926477
                          basisPoints175OrderCount: 818.9471397538016
                          basisPoints175UsdMillion: 17.074406562577984
                          basisPoints200OrderCount: 924.6719768283853
                          basisPoints200UsdMillion: 17.7662278250877
                          basisPoints225OrderCount: 1028.8030412744388
                          basisPoints225UsdMillion: 18.780723026978027
                          basisPoints250OrderCount: 1132.925416364953
                          basisPoints250UsdMillion: 19.831425427851418
                          basisPoints275OrderCount: 1237.8616944243302
                          basisPoints275UsdMillion: 20.828206747480827
                          basisPoints300OrderCount: 1343.599565532223
                          basisPoints300UsdMillion: 21.786886527157147
                          basisPoints325OrderCount: 1450.9840695148444
                          basisPoints325UsdMillion: 22.605037085982346
                          basisPoints350OrderCount: 1559.1361332367849
                          basisPoints350UsdMillion: 23.519621849718725
                          basisPoints375OrderCount: 1667.697320782042
                          basisPoints375UsdMillion: 24.349440955298423
                          basisPoints400OrderCount: 1776.0296886314266
                          basisPoints400UsdMillion: 25.35195996759689
                          basisPoints425OrderCount: 1883.4627081824765
                          basisPoints425UsdMillion: 26.237260796265836
                          basisPoints450OrderCount: 1992.1223750905142
                          basisPoints450UsdMillion: 27.07583659480697
                          basisPoints475OrderCount: 2104.102099927589
                          basisPoints475UsdMillion: 27.9825818053164
                          basisPoints500OrderCount: 2218.6082548877625
                          basisPoints500UsdMillion: 28.787407998145866
                          exchange: gdax
                          pair: btc_usd
                          side: ask
                          timestamp: 2025-03-11 00:00:00 000
              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:
                            basisPoints005OrderCount:
                              type: number
                              example: 50.11585807385952
                              description: >-
                                The average number of orders composing depth
                                5bps away from BBO
                            basisPoints005UsdMillion:
                              type: number
                              example: 0.8164277240123664
                              description: >-
                                The average aggregated quote value (quote is
                                often in USD) for 5bps away from BBO
                            basisPoints010OrderCo

# --- truncated at 32 KB (121 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amberdata/refs/heads/main/openapi/amberdata-spot-openapi.yaml