What is the difference between Advanced Trade API and the old Coinbase Pro API?
What is the difference between Advanced Trade API and the old Coinbase Pro API?
https://api.coinbase.com/api/v3/brokerage/.How do I generate a JWT for API authentication?
How do I generate a JWT for API authentication?
sub (key name), iss ("coinbase-cloud"), nbf, exp, and a uri claim set to the HTTP method and path you are calling. Coinbase provides official helper libraries for Python, Go, and TypeScript that handle JWT generation for you — see the Authentication guide for step-by-step instructions and copy-paste code samples. You pass the resulting token as a Bearer token in the Authorization header on every request.How long do JWT tokens last?
How long do JWT tokens last?
nbf (not-before) time. You should generate a fresh JWT for each request — or at most reuse one for a very short burst of requests within the same two-minute window. Sending a request with an expired JWT returns a 401 Unauthorized error with a message indicating the token has expired. Most SDK wrappers handle token generation transparently on a per-request basis so you do not have to manage expiry yourself.Can I test the API without real funds?
Can I test the API without real funds?
https://api-public.sandbox.exchange.coinbase.com. The sandbox mirrors the production API surface but uses test funds, so you can place, fill, and cancel orders without any financial risk. You will need to create separate API keys scoped to the sandbox environment via the Coinbase Developer Platform. Note that sandbox market data may not reflect real market conditions, so load-testing latency or order fill behavior should be validated in production with small amounts.What order types are supported?
What order types are supported?
order_configuration:"order_configuration": { "limit_limit_gtc": { "base_size": "0.01", "limit_price": "30000" } }.How do I cancel all open orders at once?
How do I cancel all open orders at once?
POST /api/v3/brokerage/orders/batch_cancel endpoint and supply the list of order_ids you want to cancel. A single call can cancel up to 100 orders. To cancel all open orders, first retrieve them with GET /api/v3/brokerage/orders/historical/batch?order_status=OPEN, collect the order_id values from the response, then pass them in a batch cancel request:What assets and trading pairs are available?
What assets and trading pairs are available?
GET /api/v3/brokerage/products. The response includes each product’s product_id (for example, BTC-USD, ETH-USDC), status (online, delisted, etc.), minimum order sizes, price precision, and other trading constraints. Filter by product_type=SPOT for spot trading pairs. Availability varies by region — some products are restricted in certain jurisdictions, and the response will reflect only the products accessible to your account.How do I get real-time price updates?
How do I get real-time price updates?
wss://advanced-trade-ws.coinbase.com. Subscribe to the ticker channel for best-bid/ask updates, the level2 channel for full order book changes, or the market_trades channel for a stream of executed trades. WebSocket subscriptions push updates as they occur with no polling overhead and do not count against your REST rate limit. See the WebSocket feed guide for authentication instructions and channel details.What is the difference between available_balance and hold?
What is the difference between available_balance and hold?
GET /api/v3/brokerage/accounts/{account_uuid}, the response includes two balance fields. available_balance is the amount you can immediately use to place new orders — it is your total balance minus any amounts currently held. hold represents funds that are locked against open orders or pending transactions and cannot be used until those orders are filled, cancelled, or expired. For example, if you have 1 BTC total and an open sell order for 0.3 BTC, your available_balance would be 0.7 BTC and your hold would be 0.3 BTC. Always check available_balance — not a cached total — before placing an order to avoid INSUFFICIENT_FUND errors.How do I get my API keys?
How do I get my API keys?
trade, view, transfer) and download the private key file — this is the only time the private key is shown, so save it securely. The key name (shown as a UUID-like string) becomes the sub claim in your JWTs. Restrict key permissions to the minimum required for your use case, and rotate keys regularly as a security best practice.Are there SDKs available for the Advanced Trade API?
Are there SDKs available for the Advanced Trade API?
- Python:
coinbase-advanced-py— installable viapip install coinbase-advanced-py - TypeScript/Node.js:
coinbase-advanced-node— installable vianpm install coinbase-advanced-node - Go: Available via the Coinbase Developer Platform Go SDK