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

# trades.(instrument_name).(interval) 

> Trade notifications for a specific instrument.

Use this channel to receive executed trades as they happen for the given instrument. The `interval` controls how frequently trade events are aggregated.

**Note:** For spot instruments routed to Coinbase Exchange, this channel is not supported. Use the [`matches` channel](https://docs.cdp.coinbase.com/exchange/websocket-feed/channels) for the full trade tape. For user trades, orders and changes, use the `user` channels.




## AsyncAPI

````yaml api-reference/coinbase-deribit-app-api/adv-starbase-asyncapi.json trades.(instrument_name).(interval)
id: trades.(instrument_name).(interval)
title: 'trades.(instrument_name).(interval) '
description: >
  Trade notifications for a specific instrument.


  Use this channel to receive executed trades as they happen for the given
  instrument. The `interval` controls how frequently trade events are
  aggregated.


  **Note:** For spot instruments routed to Coinbase Exchange, this channel is
  not supported. Use the [`matches`
  channel](https://docs.cdp.coinbase.com/exchange/websocket-feed/channels) for
  the full trade tape. For user trades, orders and changes, use the `user`
  channels.
servers:
  - id: public
    protocol: wss
    host: streams.drb.coinbase.com/ws/api/v2
    bindings: []
    variables: []
address: trades.{instrument_name}.{interval}
parameters:
  - id: instrument_name
    jsonSchema:
      type: string
      description: The name of the instrument
    description: The name of the instrument
    type: string
    required: true
    deprecated: false
  - id: interval
    jsonSchema:
      type: string
      description: >-
        Frequency of notifications. Events will be aggregated over this
        interval. The value `raw` selects the finest granularity - events are
        aggregated over a 1 millisecond interval **(Please note that `raw`
        interval is only available to authorized users)**


        **Allowed values:** `raw`, `100ms`, `agg2`
      enum:
        - 100ms
        - agg2
        - raw
    description: >-
      Frequency of notifications. Events will be aggregated over this interval.
      The value `raw` selects the finest granularity - events are aggregated
      over a 1 millisecond interval **(Please note that `raw` interval is only
      available to authorized users)**


      **Allowed values:** `raw`, `100ms`, `agg2`
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_1
    id: receive_trades_instrument_name_interval_updates
    title: Receive trades updates
    description: Client receives trades update notifications
    type: receive
    messages:
      - &ref_3
        id: subscribe_request
        contentType: application/json
        payload:
          - name: Subscription Request
            description: >-
              Client sends subscription request to subscribe to notification
              channel. Please refer to [Notification
              page](https://deribit.mintlify.app/articles/notifications) for
              more information.
            type: object
            properties:
              - name: id
                type: integer
                description: Client request id, echoed in the response.
                required: true
              - name: jsonrpc
                type: string
                description: JSON-RPC version. Always `2.0`.
                required: true
              - name: method
                type: string
                description: '`public/subscribe` on the public WebSocket.'
                enumValues:
                  - public/subscribe
                required: true
              - name: params
                type: object
                required: true
                properties:
                  - name: channels
                    type: array
                    description: >-
                      Stream names to subscribe to, for example
                      `quote.BTC-PERPETUAL`.
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            id:
              default: 42
              description: Client request id, echoed in the response.
              type: integer
              x-parser-schema-id: <anonymous-schema-340>
            jsonrpc:
              default: '2.0'
              description: JSON-RPC version. Always `2.0`.
              type: string
              x-parser-schema-id: <anonymous-schema-341>
            method:
              default: public/subscribe
              description: '`public/subscribe` on the public WebSocket.'
              enum:
                - public/subscribe
              type: string
              x-parser-schema-id: <anonymous-schema-342>
            params:
              additionalProperties: false
              properties:
                channels:
                  default:
                    - trades.BTC-PERPETUAL.100ms
                  description: >-
                    Stream names to subscribe to, for example
                    `quote.BTC-PERPETUAL`.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-345>
                  type: array
                  x-parser-schema-id: <anonymous-schema-344>
              required:
                - channels
              type: object
              x-parser-schema-id: <anonymous-schema-343>
          required:
            - id
            - jsonrpc
            - method
            - params
          type: object
          x-parser-schema-id: <anonymous-schema-339>
        title: Subscription Request
        description: >-
          Client sends subscription request to subscribe to notification
          channel. Please refer to [Notification
          page](https://deribit.mintlify.app/articles/notifications) for more
          information.
        example: |-
          {
            "id": 42,
            "jsonrpc": "2.0",
            "method": "public/subscribe",
            "params": {
              "channels": [
                "trades.BTC-PERPETUAL.100ms"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe_request
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: trades.(instrument_name).(interval)
  - &ref_2
    id: send_subscribe_trades_instrument_name_interval
    title: Send subscribe request for trades
    description: Client sends subscription request for trades updates
    type: send
    messages:
      - &ref_4
        id: subscription_message
        contentType: application/json
        payload:
          - name: Subscription Notification Data
            description: Server sends subscription notification data
            type: object
            properties:
              - name: data
                type: object
                required: true
                properties:
                  - name: amount
                    type: number
                    description: >-
                      Trade amount. For perpetual and inverse futures the amount
                      is in USD units. For options and linear futures it is the
                      underlying base currency coin.
                    required: true
                  - name: block_rfq_id
                    type: integer
                    description: ID of the Block RFQ - when trade was part of the Block RFQ
                    required: false
                  - name: block_trade_id
                    type: string
                    description: Block trade id - when trade was part of a block trade
                    required: false
                  - name: block_trade_leg_count
                    type: integer
                    description: >-
                      Block trade leg count - when trade was part of a block
                      trade
                    required: false
                  - name: combo_id
                    type: string
                    description: >-
                      Optional field containing combo instrument name if the
                      trade is a combo trade
                    required: false
                  - name: combo_trade_id
                    type: string
                    description: >-
                      Optional field containing combo trade identifier if the
                      trade is a combo trade
                    required: false
                  - name: contracts
                    type: number
                    description: >-
                      Trade size in contract units (optional, may be absent in
                      historical trades)
                    required: false
                  - name: direction
                    type: string
                    description: 'Direction: `buy`, or `sell`'
                    enumValues:
                      - buy
                      - sell
                    required: true
                  - name: index_price
                    type: number
                    description: Index Price at the moment of trade
                    required: true
                  - name: instrument_name
                    type: string
                    description: Unique instrument identifier
                    required: true
                  - name: iv
                    type: number
                    description: Option implied volatility for the price (Option only)
                    required: false
                  - name: liquidation
                    type: string
                    description: >-
                      Optional field (only for trades caused by liquidation):
                      `"M"` when maker side of trade was under liquidation,
                      `"T"` when taker side was under liquidation, `"MT"` when
                      both sides of trade were under liquidation
                    enumValues:
                      - M
                      - MT
                      - T
                    required: false
                  - name: mark_price
                    type: number
                    description: Mark Price at the moment of trade
                    required: true
                  - name: price
                    type: number
                    description: Price in base currency
                    required: true
                  - name: starbase_match_id
                    type: integer
                    description: >-
                      Optional field containing the Starbase match identifier
                      (present only for trades matched via Starbase)
                    required: false
                  - name: starbase_timestamp
                    type: integer
                    description: >-
                      The Starbase causal timestamp of the trade (nanoseconds
                      since the Unix epoch)
                    required: false
                  - name: tick_direction
                    type: integer
                    description: >-
                      Direction of the "tick" (`0` = Plus Tick, `1` = Zero-Plus
                      Tick, `2` = Minus Tick, `3` = Zero-Minus Tick).
                    enumValues:
                      - 0
                      - 1
                      - 2
                      - 3
                    required: true
                  - name: timestamp
                    type: integer
                    description: >-
                      The timestamp of the trade (milliseconds since the UNIX
                      epoch)
                    required: true
                  - name: trade_id
                    type: string
                    description: Unique (per currency) trade identifier
                    required: true
                  - name: trade_seq
                    type: integer
                    description: The sequence number of the trade within instrument
                    required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          description: Response containing notification data
          properties:
            data:
              additionalProperties: false
              properties:
                amount:
                  description: >-
                    Trade amount. For perpetual and inverse futures the amount
                    is in USD units. For options and linear futures it is the
                    underlying base currency coin.
                  type: number
                  x-parser-schema-id: <anonymous-schema-348>
                block_rfq_id:
                  description: ID of the Block RFQ - when trade was part of the Block RFQ
                  type: integer
                  x-parser-schema-id: <anonymous-schema-349>
                block_trade_id:
                  description: Block trade id - when trade was part of a block trade
                  example: '154'
                  type: string
                  x-parser-schema-id: <anonymous-schema-350>
                block_trade_leg_count:
                  description: Block trade leg count - when trade was part of a block trade
                  example: 3
                  type: integer
                  x-parser-schema-id: <anonymous-schema-351>
                combo_id:
                  description: >-
                    Optional field containing combo instrument name if the trade
                    is a combo trade
                  type: string
                  x-parser-schema-id: <anonymous-schema-352>
                combo_trade_id:
                  description: >-
                    Optional field containing combo trade identifier if the
                    trade is a combo trade
                  type: string
                  x-parser-schema-id: <anonymous-schema-353>
                contracts:
                  description: >-
                    Trade size in contract units (optional, may be absent in
                    historical trades)
                  type: number
                  x-parser-schema-id: <anonymous-schema-354>
                direction:
                  description: 'Direction: `buy`, or `sell`'
                  enum:
                    - buy
                    - sell
                  type: string
                  x-parser-schema-id: <anonymous-schema-355>
                index_price:
                  description: Index Price at the moment of trade
                  type: number
                  x-parser-schema-id: <anonymous-schema-356>
                instrument_name:
                  description: Unique instrument identifier
                  example: BTC-PERPETUAL
                  type: string
                  x-parser-schema-id: <anonymous-schema-357>
                iv:
                  description: Option implied volatility for the price (Option only)
                  type: number
                  x-parser-schema-id: <anonymous-schema-358>
                liquidation:
                  description: >-
                    Optional field (only for trades caused by liquidation):
                    `"M"` when maker side of trade was under liquidation, `"T"`
                    when taker side was under liquidation, `"MT"` when both
                    sides of trade were under liquidation
                  enum:
                    - M
                    - MT
                    - T
                  type: string
                  x-parser-schema-id: <anonymous-schema-359>
                mark_price:
                  description: Mark Price at the moment of trade
                  type: number
                  x-parser-schema-id: <anonymous-schema-360>
                price:
                  description: Price in base currency
                  type: number
                  x-parser-schema-id: <anonymous-schema-361>
                starbase_match_id:
                  description: >-
                    Optional field containing the Starbase match identifier
                    (present only for trades matched via Starbase)
                  type: integer
                  x-parser-schema-id: <anonymous-schema-362>
                starbase_timestamp:
                  description: >-
                    The Starbase causal timestamp of the trade (nanoseconds
                    since the Unix epoch)
                  example: 1536569522277000000
                  type: integer
                  x-parser-schema-id: <anonymous-schema-363>
                tick_direction:
                  description: >-
                    Direction of the "tick" (`0` = Plus Tick, `1` = Zero-Plus
                    Tick, `2` = Minus Tick, `3` = Zero-Minus Tick).
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                  type: integer
                  x-parser-schema-id: <anonymous-schema-364>
                timestamp:
                  description: >-
                    The timestamp of the trade (milliseconds since the UNIX
                    epoch)
                  example: 1517329113791
                  type: integer
                  x-parser-schema-id: <anonymous-schema-365>
                trade_id:
                  description: Unique (per currency) trade identifier
                  type: string
                  x-parser-schema-id: <anonymous-schema-366>
                trade_seq:
                  description: The sequence number of the trade within instrument
                  type: integer
                  x-parser-schema-id: <anonymous-schema-367>
              required:
                - amount
                - direction
                - index_price
                - instrument_name
                - mark_price
                - price
                - tick_direction
                - timestamp
                - trade_id
                - trade_seq
              type: object
              x-parser-schema-id: <anonymous-schema-347>
          required:
            - data
          type: object
          x-parser-schema-id: <anonymous-schema-346>
        title: Subscription Notification Data
        description: Server sends subscription notification data
        example: |-
          {
            "data": [
              {
                "amount": 10,
                "contracts": 1,
                "direction": "sell",
                "index_price": 8955.88,
                "instrument_name": "BTC-PERPETUAL",
                "mark_price": 8948.9,
                "price": 8950,
                "tick_direction": 2,
                "timestamp": 1590484512188,
                "trade_id": "48079269",
                "trade_seq": 30289442
              },
              {
                "amount": 20,
                "contracts": 2,
                "direction": "buy",
                "index_price": 8955.88,
                "instrument_name": "BTC-PERPETUAL",
                "liquidation": "T",
                "mark_price": 8948.9,
                "price": 8960,
                "tick_direction": 0,
                "timestamp": 1590484513004,
                "trade_id": "48079270",
                "trade_seq": 30289443
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscription_message
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: trades.(instrument_name).(interval)
securitySchemes: []

````