Skip to content

Coinbase clients ​

Choose the client for your Coinbase product. The main guides use Advanced Trade spot. Each other product has its own guide, credentials and account identifiers.

ClientPurpose
CBAdvancedTradeClientAdvanced Trade spot and US futures (CFM): market data, accounts and orders. Advanced Trade guide.
CBAdvancedTradeGlobalClientAdvanced Trade international derivatives on the Deribit-powered Starbase gateway. Global derivatives guide.
CBAppClientCoinbase App wallet accounts and transactions. App guide.
CBExchangeClientCoinbase Exchange REST market data, accounts and orders. Exchange guide.
CBInternationalClientRetained legacy INTX methods. Migration and historical records.
CBPrimeClientPrime institutional trading, portfolios and custody. Prime guide.
CBCommerceClientLegacy Commerce charges and checkouts. Migration and retained methods.
WebsocketClientShared public and private subscriptions across supported Coinbase platforms, selected with WS_KEY_MAP. Stream selection.
WebsocketAPIClientAwaitable Global derivatives JSON-RPC requests over WebSocket. Global WebSocket API.

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.

Advanced Trade REST requests ​

ts
import { CBAdvancedTradeClient } from 'coinbase-api';

async function main() {
  const client = new CBAdvancedTradeClient();
  const product = await client.getPublicProduct({ product_id: 'BTC-USD' });
  console.log(`${product.product_id} price: ${product.price}`);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Methods return response bodies directly, not Axios response wrappers. Public market-data methods have Public in their name. Account and order methods require Advanced Trade credentials.

WebSocket subscriptions ​

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:

ProductSubscription keysGuide
Advanced TradeadvTradeMarketData, advTradeUserDataPublic streams, private account updates
Global derivativesadvTradeGlobalMarketData, advTradeGlobalUserDataPublic streams, private account updates
ExchangeexchangeMarketData, exchangeDirectMarketDataExchange streams
International Exchange (legacy)internationalMarketDataLegacy INTX stream mapping
PrimeprimeMarketDataPrime streams

Global WebSocket API ​

WebsocketAPIClient lets you await Global derivatives requests 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.

Advanced Trade reference · Choose a Coinbase API

Built by Siebly. Open source SDKs for exchange APIs.