Advanced Trade API offers a static sandbox environment and its use cases are:

  • Users can make API requests to Advanced sandbox API without authentication.
  • Users can make API requests to the sandbox and get the same formatted responses as production.
  • All responses are static and pre-defined.
  • Set custom request header “X-Sandbox:” to trigger pre-defined variance in some endpoints.

Advanced Trade Sandbox Endpoints

Advanced Trade sandbox endpoint URL: https://api-sandbox.coinbase.com/api/v3/brokerage/{resource}

Only Accounts and Orders related endpoints are currently available in the sandbox. All responses are mocked but have the same format as production.

Endpoints

The following table shows available Endpoints.

APIMethodResource
List AccountsGET/accounts
Get AccountGET/accounts/{account_id}
Create OrderPOST/orders
Cancel OrdersPOST/orders/batch_cancel
Edit OrderPOST/orders/edit
Edit Order PreviewPOST/orders/edit_preview
List OrdersGET/orders/historical/batch
List FillsGET/orders/historical/fills
Get OrderGET/orders/historical/{order_id}
Preview OrderPOST/orders/preview
Close PositionPOST/orders/close_position
List PortfoliosGET/portfolios
Allocate PortfolioPOSTintx/allocate
Get Perpetuals Portfolio SummaryGET/intx/portfolio/{portfolio_uuid}
List Perpetuals PositionsGET/intx/positions/{portfolio_uuid}
Get Perpetuals PositionGET/intx/positions/{portfolio_uuid}/{symbol}
Get Portfolios BalancesGET/intx/balances/{portfolio_uuid}
Opt In or Out of Multi Asset CollateralPOST/intx/multi_asset_collateral

The following table shows Endpoints with available request parameters.

APIMethodResourceRequest Parameters
Get AccountGET/accounts/{account_id}account_id retrieved from List Accounts
Get OrderGET/orders/historical/{order_id}order_id: retrieved from List Orders
List OrdersGET/orders/historical/batchorder_status: CANCELLED/OPEN
List PortfoliosGET/portfoliosportfolio_type: DEFAULT/CONSUMER/INTX
Allocate PortfolioPOSTintx/allocateportfolio_uuid: retrieved from List Portfolios
Get Perpetuals Portfolio SummaryGET/intx/portfolio/{portfolio_uuid}portfolio_uuid: retrieved from List Portfolios
List Perpetuals PositionsGET/intx/positions/{portfolio_uuid}portfolio_uuid: retrieved from List Portfolios
Get Perpetuals PositionGET/intx/positions/{portfolio_uuid}/{symbol}portfolio_uuid: retrieved from List Portfolios
symbol: e.g. ETH-PERP-INTX
Get Portfolios BalancesGET/intx/balances/{portfolio_uuid}portfolio_uuid: retrieved from List Portfolios
Opt In or Out of Multi Asset CollateralPOST/intx/multi_asset_collateralportfolio_uuid: retrieved from List Portfolios

The following table shows available Endpoints returning error responses with required headers.

APIMethodResourceErrorHeader
Create OrderPOST/ordersINSUFFICIENT_FUND”X-Sandbox: PostOrder_insufficient_fund”
Cancel OrdersPOST/orders/batch_cancelUNKNOWN_CANCEL_ORDER”X-Sandbox: CancelOrders_failure”
Edit OrderPOST/orders/editORDER_NOT_FOUND”X-Sandbox: EditOrder_failure”
Edit Order PreviewPOST/orders/edit_previewORDER_NOT_FOUND”X-Sandbox: PreviewEditOrder_failure”
Preview OrderPOST/orders/previewPREVIEW_INSUFFICIENT_FUND”X-Sandbox: PreviewOrder_insufficient_fund”

See Also: