Coinbase CDP icon

Coinbase CDP

Interact with Coinbase CDP Advanced Trade API

Products → Get Product Book

AI-generated

Summary

Retrieve the order book for a specified product from Coinbase.

Inputs

  • product_id (required) — The ID of the product for which to get the order book.
  • limit — The maximum number of entries to return.
  • aggregation_price_increment — The price increment for aggregation.
  • requestOptions — Additional options for the request such as batching, SSL settings, proxy, and timeout.

Output shape

a record containing order book data for the specified product.

The output structure depends on the data returned from the Coinbase API. If 'limit' is set, only that many entries will be included in the response.

Examples

Example 1: Get order book for Bitcoin

Set product_id to 'BTC-USD' and limit to 5 to retrieve the top 5 entries.

Discussion