Coinbase CDP icon

Coinbase CDP

Interact with Coinbase CDP Advanced Trade API

Orders → Preview Order

AI-generated

Summary

Preview an order by configuring request options for the Coinbase CDP API.

Inputs

  • requestOptions (required) — Collection of configuration options for the API request, including batching settings, SSL verification, proxy settings, and timeout duration.
  • requestOptions.batching.batchSize — Number of items to include in each batch request. Default is 50.
  • requestOptions.batching.batchInterval — Time in milliseconds to wait between each batch request. Default is 1000 ms.
  • requestOptions.allowUnauthorizedCerts — Flag to accept responses even if SSL certificate validation cannot be done. Default is false.
  • requestOptions.proxy — HTTP proxy URL to send requests through.
  • requestOptions.timeout — Maximum time in milliseconds to wait for a server response before aborting. Default is 10000 ms.

Output shape

A preview of the order data indicating the response structure and contents from the API.

The output shape may vary based on the order and API configuration.

Examples

Example 1: Previewing an order without SSL issues

Set 'allowUnauthorizedCerts' to true and specify batching options.

Example 2: Previewing multiple orders with controlled batch size

Define 'batchSize' as 25 and 'batchInterval' as 2000 ms to prevent overloading the API.

Discussion