Advanced Trade APIs
Advanced Trade API Sandbox
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.
API | Method | Resource |
---|---|---|
List Accounts | GET | /accounts |
Get Account | GET | /accounts/{account_id} |
Create Order | POST | /orders |
Cancel Orders | POST | /orders/batch_cancel |
Edit Order | POST | /orders/edit |
Edit Order Preview | POST | /orders/edit_preview |
List Orders | GET | /orders/historical/batch |
List Fills | GET | /orders/historical/fills |
Get Order | GET | /orders/historical/{order_id} |
Preview Order | POST | /orders/preview |
Close Position | POST | /orders/close_position |
List Portfolios | GET | /portfolios |
Allocate Portfolio | POST | intx/allocate |
Get Perpetuals Portfolio Summary | GET | /intx/portfolio/{portfolio_uuid} |
List Perpetuals Positions | GET | /intx/positions/{portfolio_uuid} |
Get Perpetuals Position | GET | /intx/positions/{portfolio_uuid}/{symbol} |
Get Portfolios Balances | GET | /intx/balances/{portfolio_uuid} |
Opt In or Out of Multi Asset Collateral | POST | /intx/multi_asset_collateral |
The following table shows Endpoints with available request parameters.
API | Method | Resource | Request Parameters |
---|---|---|---|
Get Account | GET | /accounts/{account_id} | account_id retrieved from List Accounts |
Get Order | GET | /orders/historical/{order_id} | order_id: retrieved from List Orders |
List Orders | GET | /orders/historical/batch | order_status: CANCELLED/OPEN |
List Portfolios | GET | /portfolios | portfolio_type: DEFAULT/CONSUMER/INTX |
Allocate Portfolio | POST | intx/allocate | portfolio_uuid: retrieved from List Portfolios |
Get Perpetuals Portfolio Summary | GET | /intx/portfolio/{portfolio_uuid} | portfolio_uuid: retrieved from List Portfolios |
List Perpetuals Positions | GET | /intx/positions/{portfolio_uuid} | portfolio_uuid: retrieved from List Portfolios |
Get Perpetuals Position | GET | /intx/positions/{portfolio_uuid}/{symbol} | portfolio_uuid: retrieved from List Portfolios symbol: e.g. ETH-PERP-INTX |
Get Portfolios Balances | GET | /intx/balances/{portfolio_uuid} | portfolio_uuid: retrieved from List Portfolios |
Opt In or Out of Multi Asset Collateral | POST | /intx/multi_asset_collateral | portfolio_uuid: retrieved from List Portfolios |
The following table shows available Endpoints returning error responses with required headers.
API | Method | Resource | Error | Header |
---|---|---|---|---|
Create Order | POST | /orders | INSUFFICIENT_FUND | ”X-Sandbox: PostOrder_insufficient_fund” |
Cancel Orders | POST | /orders/batch_cancel | UNKNOWN_CANCEL_ORDER | ”X-Sandbox: CancelOrders_failure” |
Edit Order | POST | /orders/edit | ORDER_NOT_FOUND | ”X-Sandbox: EditOrder_failure” |
Edit Order Preview | POST | /orders/edit_preview | ORDER_NOT_FOUND | ”X-Sandbox: PreviewEditOrder_failure” |
Preview Order | POST | /orders/preview | PREVIEW_INSUFFICIENT_FUND | ”X-Sandbox: PreviewOrder_insufficient_fund” |
See Also: