Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/coinbase-api/llms.txt
Use this file to discover all available pages before exploring further.
CBPrimeClient is the REST client for the Coinbase Prime API — a full-service institutional platform combining custody, trading, and financing. All endpoints require authentication. The API is scoped around entity_id (your organisation) and portfolio_id (a trading/custody sub-account).
Installation & Setup
All Prime endpoints are authenticated. The
apiKey, apiSecret, and apiPassphrase must be generated in the Coinbase Prime portal. There is no public sandbox for Prime.All Methods
| Method | Auth | HTTP | Endpoint |
|---|---|---|---|
| Activities | |||
getActivities() | 🔒 | GET | /v1/portfolios/{portfolio_id}/activities |
getActivityById() | 🔒 | GET | /v1/activities/{activity_id} |
getEntityActivities() | 🔒 | GET | /v1/entities/{entity_id}/activities |
getPortfolioActivityById() | 🔒 | GET | /v1/portfolios/{portfolio_id}/activities/{activity_id} |
| Allocations | |||
createPortfolioAllocations() | 🔒 | POST | /v1/allocations |
createPortfolioNetAllocations() | 🔒 | POST | /v1/allocations/net |
getPortfolioAllocations() | 🔒 | GET | /v1/portfolios/{portfolio_id}/allocations |
getAllocationById() | 🔒 | GET | /v1/portfolios/{portfolio_id}/allocations/{allocation_id} |
getNetAllocationsByNettingId() | 🔒 | GET | /v1/portfolios/{portfolio_id}/allocations/net/{netting_id} |
| Financing | |||
getEntityAccruals() | 🔒 | GET | /v1/entities/{entity_id}/accruals |
getEntityLocateAvailabilities() | 🔒 | GET | /v1/entities/{entity_id}/locates_availability |
getEntityMargin() | 🔒 | GET | /v1/entities/{entity_id}/margin |
getEntityMarginSummaries() | 🔒 | GET | /v1/entities/{entity_id}/margin_summaries |
getEntityTFTieredFees() | 🔒 | GET | /v1/entities/{entity_id}/tf_tiered_fees |
getPortfolioAccruals() | 🔒 | GET | /v1/portfolios/{portfolio_id}/accruals |
getPortfolioBuyingPower() | 🔒 | GET | /v1/portfolios/{portfolio_id}/buying_power |
getPortfolioLocates() | 🔒 | GET | /v1/portfolios/{portfolio_id}/locates |
getPortfolioMarginConversions() | 🔒 | GET | /v1/portfolios/{portfolio_id}/margin_conversions |
getPortfolioWithdrawalPower() | 🔒 | GET | /v1/portfolios/{portfolio_id}/withdrawal_power |
| Invoices | |||
getInvoices() | 🔒 | GET | /v1/entities/{entity_id}/invoices |
| Positions | |||
getEntityAggregatePositions() | 🔒 | GET | /v1/entities/{entity_id}/aggregate_positions |
getEntityPositions() | 🔒 | GET | /v1/entities/{entity_id}/positions |
| Assets | |||
getAssets() | 🔒 | GET | /v1/entities/{entity_id}/assets |
| Payment Methods | |||
getEntityPaymentMethods() | 🔒 | GET | /v1/entities/{entity_id}/payment-methods |
getEntityPaymentMethod() | 🔒 | GET | /v1/entities/{entity_id}/payment-methods/{payment_method_id} |
| Users | |||
getUsers() | 🔒 | GET | /v1/entities/{entity_id}/users |
getPortfolioUsers() | 🔒 | GET | /v1/portfolios/{portfolio_id}/users |
| Portfolios | |||
getPortfolios() | 🔒 | GET | /v1/portfolios |
getPortfolioById() | 🔒 | GET | /v1/portfolios/{portfolio_id} |
getPortfolioCreditInformation() | 🔒 | GET | /v1/portfolios/{portfolio_id}/credit |
| Address Book | |||
getAddressBook() | 🔒 | GET | /v1/portfolios/{portfolio_id}/address_book |
createAddressBookEntry() | 🔒 | POST | /v1/portfolios/{portfolio_id}/address_book |
| Balances | |||
getPortfolioBalances() | 🔒 | GET | /v1/portfolios/{portfolio_id}/balances |
getWalletBalance() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance |
getWeb3WalletBalances() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances |
| Commission | |||
getPortfolioCommission() | 🔒 | GET | /v1/portfolios/{portfolio_id}/commission |
| Orders | |||
getPortfolioFills() | 🔒 | GET | /v1/portfolios/{portfolio_id}/fills |
getOpenOrders() | 🔒 | GET | /v1/portfolios/{portfolio_id}/open_orders |
submitOrder() | 🔒 | POST | /v1/portfolios/{portfolio_id}/order |
getOrderPreview() | 🔒 | POST | /v1/portfolios/{portfolio_id}/order_preview |
getPortfolioOrders() | 🔒 | GET | /v1/portfolios/{portfolio_id}/orders |
getOrderById() | 🔒 | GET | /v1/portfolios/{portfolio_id}/orders/{order_id} |
cancelOrder() | 🔒 | POST | /v1/portfolios/{portfolio_id}/orders/{order_id}/cancel |
getOrderFills() | 🔒 | GET | /v1/portfolios/{portfolio_id}/orders/{order_id}/fills |
| Products | |||
getPortfolioProducts() | 🔒 | GET | /v1/portfolios/{portfolio_id}/products |
| Transactions | |||
getPortfolioTransactions() | 🔒 | GET | /v1/portfolios/{portfolio_id}/transactions |
getTransactionById() | 🔒 | GET | /v1/portfolios/{portfolio_id}/transactions/{transaction_id} |
| Wallet Transfers & Conversions | |||
createConversion() | 🔒 | POST | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion |
getWalletTransactions() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions |
createTransfer() | 🔒 | POST | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers |
createWithdrawal() | 🔒 | POST | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals |
| Wallets | |||
getPortfolioWallets() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets |
createWallet() | 🔒 | POST | /v1/portfolios/{portfolio_id}/wallets |
getWalletById() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets/{wallet_id} |
getWalletDepositInstructions() | 🔒 | GET | /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions |
Activities
Activities track all significant events within a portfolio or entity (orders, transfers, conversions, etc.).Allocations
Allocations distribute executed orders across multiple sub-portfolios. UsecreatePortfolioAllocations for standard allocations and createPortfolioNetAllocations for net (netting) allocations.
Orders
submitOrder(params)
Places a new order on a portfolio. A client_order_id is auto-generated if not supplied.
Portfolio UUID.
Trading pair, e.g.
"BTC-USD"."BUY" or "SELL"."MARKET", "LIMIT", "TWAP", "VWAP", "STOP_LIMIT".Amount in base currency (e.g. BTC).
Amount in quote currency (e.g. USD). Used for market buys.
Limit price. Required for limit orders.
Client-side idempotency key.
"GOOD_UNTIL_CANCELLED", "GOOD_UNTIL_DATE_TIME", "IMMEDIATE_OR_CANCEL", "FILL_OR_KILL".Algo order start time (ISO 8601).
GTD expiry time (ISO 8601).
getOrderPreview(params)
Previews an order without submitting it. Returns estimated fill price, fees, and slippage.
getPortfolioFills(params)
Returns completed fills for a portfolio. Requires start_date. Returns up to 100 fills by default (max 3000).
cancelOrder(params)
Cancels an open order. Filled orders cannot be cancelled.
Wallets
Wallets are custody accounts within a portfolio that hold specific assets.getPortfolioWallets(params) / createWallet(params) / getWalletById(params)
getWalletDepositInstructions(params)
Returns on-chain deposit address and memo/tag for a wallet.
createTransfer(params)
Initiates an internal wallet-to-wallet transfer within Prime.
Source portfolio UUID.
Source wallet UUID.
Amount to transfer.
Destination wallet UUID or address.
Client-generated UUID for idempotency.