Coinbase CDP icon

Coinbase CDP

Interact with Coinbase CDP Advanced Trade API

Products → Get Best Bid Ask

AI-generated

Summary

Retrieve the best bid and ask prices for specified cryptocurrency products.

Inputs

  • product_ids (required) — Comma-separated list of product IDs for which to get the best bid and ask prices.
  • requestOptions — Additional options for the request, including batching, SSL certificate validation, proxy settings, and timeout.

Output shape

a list of bid/ask prices for the specified products

Returns an array of objects, each containing best bid and ask prices for the requested product IDs. Pagination may be applicable if many products are specified.

Examples

Example 1: Get the best bid and ask prices for Bitcoin and Ethereum

Set 'product_ids' to 'BTC-USD,ETH-USD' to retrieve bid and ask prices for both cryptocurrencies.

Discussion