Coinbase CDP icon

Coinbase CDP

Interact with Coinbase CDP Advanced Trade API

Public → Get Public Product Book

AI-generated

Summary

Fetches the public product order book for a specified product on Coinbase.

Inputs

  • product_id (required) — The unique identifier for the product you want to get the order book for.
  • limit — The maximum number of entries to return in the order book.
  • aggregation_price_increment — The price increment for aggregating order book entries.
  • requestOptions — Collection of request options to customize the request behavior.

Output shape

a JSON object containing the order book details for the specified product.

Returned data includes bids, asks, and any optional fields based on the request. If 'limit' is used, only that number of entries will be returned.

Examples

Example 1: Fetch order book for Bitcoin

Set product_id to 'BTC-USD' and specify a limit of 5.

Discussion