Use this file to discover all available pages before exploring further.
CBPrimeClient is the REST client for the Coinbase Prime API — Coinbase’s institutional offering that combines custody, trading, and financing in a single platform. It is scoped to entities and portfolios, with separate endpoints for trading balances, vault balances, wallet management, web3 wallets, and order execution.
Coinbase Prime uses API key + secret + passphrase authentication. No sandbox is available — all API calls interact with the live Prime environment.
Query buying power, withdrawal limits, margin health, and portfolio-level balances. Balances can be split by type: trading, vault, or total.
Method
Description
getPortfolioBuyingPower(params)
Buying power based on holdings and available credit
getPortfolioWithdrawalPower(params)
Max withdrawable quantity for an asset
getPortfolioBalances(params)
List all portfolio balances by type
getWalletBalance(params)
Balance for a specific wallet
getEntityMargin(params)
Real-time margin evaluation for an entity
getEntityMarginSummaries(params)
Historical margin call summaries
getPortfolioMarginConversions(params)
Margin conversions (deprecated — use entity margin summaries)
// Buying power for a productconst power = await client.getPortfolioBuyingPower({ portfolio_id: 'your-portfolio-id', symbol: 'BTC-USD',});// Total balances across vault and tradingconst balances = await client.getPortfolioBalances({ portfolio_id: 'your-portfolio-id', balance_type: 'TOTAL_BALANCES',});// Real-time margin check at entity levelconst margin = await client.getEntityMargin({ entity_id: 'your-entity-id',});
Custody wallets hold assets within your Prime portfolios. You can create wallets, retrieve balances and deposit instructions, and initiate transfers or withdrawals.
Method
Description
getPortfolioWallets(params)
List all wallets for a portfolio
createWallet(params)
Create a new wallet
getWalletById(params)
Get a specific wallet
getWalletBalance(params)
Get the balance of a wallet
getWeb3WalletBalances(params)
Get balances for a web3 wallet
getWalletDepositInstructions(params)
Get deposit address/instructions
getWalletTransactions(params)
List transactions for a wallet
createTransfer(params)
Transfer funds between wallets
createWithdrawal(params)
Create a withdrawal from a wallet
// List trading walletsconst wallets = await client.getPortfolioWallets({ portfolio_id: 'your-portfolio-id', type: 'TRADING',});// Get deposit address for a specific walletconst instructions = await client.getWalletDepositInstructions({ portfolio_id: 'your-portfolio-id', wallet_id: 'btc-wallet-uuid', deposit_type: 'CRYPTO',});// Withdraw from a vault walletawait client.createWithdrawal({ portfolio_id: 'your-portfolio-id', wallet_id: 'vault-wallet-uuid', amount: '0.5', destination_type: 'CRYPTO_ADDRESS', crypto_address: 'your-external-btc-address', currency_symbol: 'BTC', idempotency_key: 'withdraw-001',});