> ## 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.

# Bid Ask Spread

> This endpoint allows users to explore the bid-ask spread for a specific futures or perpetual assets 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.



## OpenAPI

````yaml get /analytics/futures-perpetuals/depth/bid-ask-spread
openapi: 3.1.0
info:
  title: derivatives-api
  version: '2'
servers:
  - url: https://api.amberdata.com/markets/derivatives
security:
  - sec0: []
paths:
  /analytics/futures-perpetuals/depth/bid-ask-spread:
    get:
      summary: Bid Ask Spread
      description: >-
        This endpoint allows users to explore the bid-ask spread for a specific
        futures or perpetual assets 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: futures-perpetuals-order-book-depth-bid-ask-spread
      parameters:
        - name: instrument
          in: query
          description: >-
            **[Required]** The currency for the futures or perpetual
            instruments.

            **[Examples]** ` btc | btc-perpetual `
          required: true
          schema:
            type: string
            default: btc
        - name: exchange
          in: query
          description: |-
            **[Required]** The exchange for the associated bid ask spread.
            **[Examples]** ` deribit | okex | binance | binanceus`
          required: true
          schema:
            type: string
            default: deribit
        - 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:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - bestAskPrice: 96589.6
                          bestBidPrice: 96222.19
                          exchange: deribit
                          midPrice: 96405.895
                          pair: BTC-PERPETUAL
                          spread: 367.4100000000035
                          spreadPercent: 0.3811074001232015
                          timestamp: 1746144000000
              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
                            instrument:
                              type: string
                              example: BTC-PERPETUAL
                              description: The subject instrument
                            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: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````