From 17662cabe68b7a55d596b37b9ac3ed738d78b0c1 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 12 Nov 2026 11:43:32 +0000 Subject: [PATCH 1/2] Clarify Coinbase client coverage and browser packaging --- sdks/coinbase/docs/clients.md | 39 +++++++++++++++++++++-------- sdks/coinbase/docs/compatibility.md | 4 +++ sdks/coinbase/docs/index.md | 2 +- shared/coinbase-sidebar.mjs | 3 ++- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/sdks/coinbase/docs/clients.md b/sdks/coinbase/docs/clients.md index 25f37acc..c249bff1 100644 --- a/sdks/coinbase/docs/clients.md +++ b/sdks/coinbase/docs/clients.md @@ -1,20 +1,29 @@ --- -title: "Coinbase Advanced Trade SDK clients" -description: "Choose REST requests or streaming subscriptions for Advanced Trade." +title: "Coinbase SDK clients" +description: "Choose a Coinbase REST client, shared WebSocket subscriptions or the Global WebSocket API." --- -# Advanced Trade clients +# Coinbase clients -Use these two clients for Advanced Trade brokerage APIs. Looking for Global derivatives, Exchange, INTX, Prime, App or Commerce? [Choose your Coinbase API](/products). +Choose the client for your Coinbase product. The main walkthroughs use Advanced Trade spot; the other product guides keep their accounts, credentials and protocols separate. | Client | Purpose | | --- | --- | -| [`CBAdvancedTradeClient`](/api/classes/CBAdvancedTradeClient) | Advanced Trade REST: market data, accounts, orders and supported derivatives endpoints. | -| [`WebsocketClient`](/api/classes/WebsocketClient) | Advanced Trade market and user subscriptions, selected with `advTradeMarketData` or `advTradeUserData`. | +| [`CBAdvancedTradeClient`](/api/classes/CBAdvancedTradeClient) | Advanced Trade spot and US futures (CFM): market data, accounts and orders. [Advanced Trade guide](/getting-started). | +| [`CBAdvancedTradeGlobalClient`](/api/classes/CBAdvancedTradeGlobalClient) | Advanced Trade international derivatives on the Deribit-powered Starbase gateway. [Global derivatives guide](/products/global). | +| [`CBAppClient`](/api/classes/CBAppClient) | Coinbase App wallet accounts and transactions. [App guide](/products/app). | +| [`CBExchangeClient`](/api/classes/CBExchangeClient) | Coinbase Exchange REST market data, accounts and orders. [Exchange guide](/products/exchange). | +| [`CBInternationalClient`](/api/classes/CBInternationalClient) | International Exchange instruments, portfolios and orders. [INTX guide](/products/international). | +| [`CBPrimeClient`](/api/classes/CBPrimeClient) | Prime institutional trading, portfolios and custody. [Prime guide](/products/prime). | +| [`CBCommerceClient`](/api/classes/CBCommerceClient) | Commerce charges and checkouts. [Commerce guide](/products/commerce). | +| [`WebsocketClient`](/api/classes/WebsocketClient) | Shared public and private subscriptions across supported Coinbase platforms, selected with `WS_KEY_MAP`. [Stream selection](#websocket-subscriptions). | +| [`WebsocketAPIClient`](/api/classes/WebsocketAPIClient) | Awaitable Global derivatives JSON-RPC requests over WebSocket. [Global WebSocket API](/products/global#ws-api). | -## REST requests +Advanced Trade international derivatives moved to Starbase on 1 October 2026. Use `CBAdvancedTradeGlobalClient` for those markets, even though `CBAdvancedTradeClient` still exposes older INTX methods. Spot and US futures remain on `CBAdvancedTradeClient`. See the [Coinbase migration guide](https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/guides/derivatives/technical). + +## Advanced Trade REST requests <<< @/../examples/first-call.ts @@ -22,8 +31,18 @@ Methods return response bodies directly, not Axios response wrappers. Public mar ## WebSocket subscriptions -Register listeners before calling `subscribe()`. Pass the correct Advanced Trade `WS_KEY_MAP` value and receive parsed data on `update`. See [WebSocket subscriptions](/guides/websockets) and [private account updates](/guides/private-streams). +Register listeners before calling `subscribe()`. `WebsocketClient` manages connections for the selected `WS_KEY_MAP` key and emits parsed data on `update`. Choose the key, channels and credentials for the product you use: + +| Product | Subscription keys | Guide | +| --- | --- | --- | +| Advanced Trade | `advTradeMarketData`, `advTradeUserData` | [Public streams](/guides/websockets), [private account updates](/guides/private-streams) | +| Global derivatives | `advTradeGlobalMarketData`, `advTradeGlobalUserData` | [Public streams](/products/global#public-streams), [private account updates](/products/global#private-streams) | +| Exchange | `exchangeMarketData`, `exchangeDirectMarketData` | [Exchange streams](/products/exchange#public-streams) | +| International Exchange | `internationalMarketData` | [INTX streams](/products/international#public-streams) | +| Prime | `primeMarketData` | [Prime streams](/products/prime#public-streams) | + +## Global WebSocket API -`WebsocketClient` also supports other Coinbase products, but their channels and credentials belong to their own product guides. `WebsocketAPIClient` is for [Global derivatives](/products/global), not Advanced Trade spot order entry. +`WebsocketAPIClient` provides awaitable request-response methods for Global derivatives, with the convenience of REST-style calls over a persistent WebSocket connection. It uses the dedicated `advTradeGlobalWSAPI` connection, separate from subscriptions. It is not an Advanced Trade spot order-entry client. See the [Global WebSocket API guide](/products/global#ws-api). -[Advanced Trade reference](/reference) · [Choose another API](/products) +[Advanced Trade reference](/reference) · [Choose a Coinbase API](/products) diff --git a/sdks/coinbase/docs/compatibility.md b/sdks/coinbase/docs/compatibility.md index 12b91ae5..f87b5566 100644 --- a/sdks/coinbase/docs/compatibility.md +++ b/sdks/coinbase/docs/compatibility.md @@ -23,6 +23,10 @@ The [React](/environments/react) and [Vite](/environments/vite) projects use pub REST access in a browser depends on Coinbase's CORS policy. If a request is blocked by CORS, call the SDK through a server route instead. A Vite development proxy is not a production server route. +### Webpack bundle + +The [SDK README](https://github.com/sieblyio/coinbase-api#browserfrontend-usage) also describes building a standalone Webpack bundle from the SDK repository with `npm install`, `npm run build` and `npm run pack`. Its configuration produces the `coinbaseapi` UMD bundle in `dist/`. That is a separate packaging option, not a prerequisite for the Vite or React projects above, which import the npm package directly. The README does not yet document bundle usage in detail. + ## React Native and Expo The [Expo guide](/environments/expo) includes the Metro resolver, public-auth helper and required polyfills. Keep those files together. The project uses public market data; authenticated operations belong on your server. diff --git a/sdks/coinbase/docs/index.md b/sdks/coinbase/docs/index.md index 8cf1c331..5bd6d5f7 100644 --- a/sdks/coinbase/docs/index.md +++ b/sdks/coinbase/docs/index.md @@ -25,7 +25,7 @@ The [Node.js quickstart](/getting-started) reads a public Bitcoin price without -Coinbase's API families have different accounts, credentials and protocols. These guides focus on **Advanced Trade** unless stated otherwise. +Coinbase's API families have different accounts, credentials and protocols. The main walkthroughs use **Advanced Trade spot**. For international derivatives, use the [Global client and guides](/products/global); US futures (CFM) remain on `CBAdvancedTradeClient`. ## Next steps diff --git a/shared/coinbase-sidebar.mjs b/shared/coinbase-sidebar.mjs index df3fafc1..3c244a41 100644 --- a/shared/coinbase-sidebar.mjs +++ b/shared/coinbase-sidebar.mjs @@ -12,7 +12,8 @@ export function coinbaseSidebar(sdk, groups) { reference.items = [ { text: 'Advanced Trade reference', link: '/reference' }, { text: 'CBAdvancedTradeClient', link: '/api/classes/CBAdvancedTradeClient' }, - { text: 'Advanced Trade WebSocket subscriptions', link: '/api/classes/WebsocketClient' }, + { text: 'Shared WebSocket client', link: '/api/classes/WebsocketClient' }, + { text: 'Global WebSocket API', link: '/products/global#ws-api' }, { text: 'All SDK exports', link: '/api/' }, ]; const products = { From 72abe9dd3639ffe795fc057d314adb463b1d41ee Mon Sep 17 00:00:00 2001 From: "Tiago Siebler @ Siebly.io" Date: Thu, 12 Nov 2026 11:53:59 +0000 Subject: [PATCH 2/2] Fix shared Coinbase client table stream link --- sdks/coinbase/docs/clients.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/coinbase/docs/clients.md b/sdks/coinbase/docs/clients.md index c249bff1..f6fa6977 100644 --- a/sdks/coinbase/docs/clients.md +++ b/sdks/coinbase/docs/clients.md @@ -17,7 +17,7 @@ Choose the client for your Coinbase product. The main walkthroughs use Advanced | [`CBInternationalClient`](/api/classes/CBInternationalClient) | International Exchange instruments, portfolios and orders. [INTX guide](/products/international). | | [`CBPrimeClient`](/api/classes/CBPrimeClient) | Prime institutional trading, portfolios and custody. [Prime guide](/products/prime). | | [`CBCommerceClient`](/api/classes/CBCommerceClient) | Commerce charges and checkouts. [Commerce guide](/products/commerce). | -| [`WebsocketClient`](/api/classes/WebsocketClient) | Shared public and private subscriptions across supported Coinbase platforms, selected with `WS_KEY_MAP`. [Stream selection](#websocket-subscriptions). | +| [`WebsocketClient`](/api/classes/WebsocketClient) | Shared public and private subscriptions across supported Coinbase platforms, selected with `WS_KEY_MAP`. [Stream selection](/clients#websocket-subscriptions). | | [`WebsocketAPIClient`](/api/classes/WebsocketAPIClient) | Awaitable Global derivatives JSON-RPC requests over WebSocket. [Global WebSocket API](/products/global#ws-api). |