Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.
The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.
This can be used to easily find which method to call, once you have found which endpoint you're looking to use.
All REST clients are in the src folder. For usage examples, make sure to check the examples folder.
List of clients:
- CBAdvancedTradeClient
- CBAppClient
- CBExchangeClient
- CBInternationalClient
- CBPrimeClient
- CBCommerceClient
If anything is missing or wrong, please open an issue or let us know in our Node.js Traders telegram group!
Table consists of 4 parts:
- Function name
- AUTH
- HTTP Method
- Endpoint
Function name is the name of the function that can be called through the SDK. Check examples folder in the repo for more help on how to use them!
AUTH is a boolean value that indicates if the function requires authentication - which means you need to pass your API key and secret to the SDK.
HTTP Method shows HTTP method that the function uses to call the endpoint. Sometimes endpoints can have same URL, but different HTTP method so you can use this column to differentiate between them.
Endpoint is the URL that the function uses to call the endpoint. Best way to find exact function you need for the endpoint is to search for URL in this table and find corresponding function name.
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBAdvancedTradeClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
getAccounts() | 🔐 | GET | /api/v3/brokerage/accounts |
getAccount() | 🔐 | GET | /api/v3/brokerage/accounts/{account_id} |
getBestBidAsk() | 🔐 | GET | /api/v3/brokerage/best_bid_ask |
getProductBook() | 🔐 | GET | /api/v3/brokerage/product_book |
getProducts() | 🔐 | GET | /api/v3/brokerage/products |
getProduct() | 🔐 | GET | /api/v3/brokerage/products/{product_id} |
getProductCandles() | 🔐 | GET | /api/v3/brokerage/products/{product_id}/candles |
getMarketTrades() | 🔐 | GET | /api/v3/brokerage/products/{product_id}/ticker |
submitOrder() | 🔐 | POST | /api/v3/brokerage/orders |
cancelOrders() | 🔐 | POST | /api/v3/brokerage/orders/batch_cancel |
updateOrder() | 🔐 | POST | /api/v3/brokerage/orders/edit |
updateOrderPreview() | 🔐 | POST | /api/v3/brokerage/orders/edit_preview |
getOrders() | 🔐 | GET | /api/v3/brokerage/orders/historical/batch |
getFills() | 🔐 | GET | /api/v3/brokerage/orders/historical/fills |
getOrder() | 🔐 | GET | /api/v3/brokerage/orders/historical/{order_id} |
previewOrder() | 🔐 | POST | /api/v3/brokerage/orders/preview |
closePosition() | 🔐 | POST | /api/v3/brokerage/orders/close_position |
getPortfolios() | 🔐 | GET | /api/v3/brokerage/portfolios |
createPortfolio() | 🔐 | POST | /api/v3/brokerage/portfolios |
movePortfolioFunds() | 🔐 | POST | /api/v3/brokerage/portfolios/move_funds |
getPortfolioBreakdown() | 🔐 | GET | /api/v3/brokerage/portfolios/{portfolio_uuid} |
deletePortfolio() | 🔐 | DELETE | /api/v3/brokerage/portfolios/{portfolio_uuid} |
updatePortfolio() | 🔐 | PUT | /api/v3/brokerage/portfolios/{portfolio_uuid} |
getFuturesBalanceSummary() | 🔐 | GET | /api/v3/brokerage/cfm/balance_summary |
getIntradayMarginSetting() | 🔐 | GET | /api/v3/brokerage/cfm/intraday/margin_setting |
setIntradayMarginSetting() | 🔐 | POST | /api/v3/brokerage/cfm/intraday/margin_setting |
getCurrentMarginWindow() | 🔐 | GET | /api/v3/brokerage/cfm/intraday/current_margin_window |
getFuturesPositions() | 🔐 | GET | /api/v3/brokerage/cfm/positions |
getFuturesPosition() | 🔐 | GET | /api/v3/brokerage/cfm/positions/{product_id} |
scheduleFuturesSweep() | 🔐 | POST | /api/v3/brokerage/cfm/sweeps/schedule |
getFuturesSweeps() | 🔐 | GET | /api/v3/brokerage/cfm/sweeps |
cancelPendingFuturesSweep() | 🔐 | DELETE | /api/v3/brokerage/cfm/sweeps |
allocatePortfolio() | 🔐 | POST | /api/v3/brokerage/intx/allocate |
getPerpetualsPortfolioSummary() | 🔐 | GET | /api/v3/brokerage/intx/portfolio/{portfolio_uuid} |
getPerpetualsPositions() | 🔐 | GET | /api/v3/brokerage/intx/positions/{portfolio_uuid} |
getPerpetualsPosition() | 🔐 | GET | /api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol} |
getPortfoliosBalances() | 🔐 | GET | /api/v3/brokerage/intx/balances/{portfolio_uuid} |
updateMultiAssetCollateral() | 🔐 | POST | /api/v3/brokerage/intx/multi_asset_collateral |
getTransactionSummary() | 🔐 | GET | /api/v3/brokerage/transaction_summary |
submitConvertQuote() | 🔐 | POST | /api/v3/brokerage/convert/quote |
getConvertTrade() | 🔐 | GET | /api/v3/brokerage/convert/trade/{trade_id} |
commitConvertTrade() | 🔐 | POST | /api/v3/brokerage/convert/trade/{trade_id} |
getPublicProductBook() | GET | /api/v3/brokerage/market/product_book |
|
getPublicProducts() | GET | /api/v3/brokerage/market/products |
|
getPublicProduct() | GET | /api/v3/brokerage/market/products/{product_id} |
|
getPublicProductCandles() | GET | /api/v3/brokerage/market/products/{product_id}/candles |
|
getPublicMarketTrades() | GET | /api/v3/brokerage/market/products/{product_id}/ticker |
|
getPaymentMethods() | 🔐 | GET | /api/v3/brokerage/payment_methods |
getPaymentMethod() | 🔐 | GET | /api/v3/brokerage/payment_methods/{payment_method_id} |
getApiKeyPermissions() | 🔐 | GET | /api/v3/brokerage/key_permissions |
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBAppClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
getAccounts() | 🔐 | GET | /v2/accounts |
getAccount() | 🔐 | GET | /v2/accounts/{account_id} |
createAddress() | 🔐 | POST | /v2/accounts/{account_id}/addresses |
getAddresses() | 🔐 | GET | /v2/accounts/{account_id}/addresses |
getAddress() | 🔐 | GET | /v2/accounts/{account_id}/addresses/{addressId} |
getAddressTransactions() | 🔐 | GET | /v2/accounts/{account_id}/addresses/{addressId}/transactions |
sendMoney() | 🔐 | POST | /v2/accounts/{account_id}/transactions |
transferMoney() | 🔐 | POST | /v2/accounts/{account_id}/transactions |
getTransactions() | 🔐 | GET | /v2/accounts/{account_id}/transactions |
getTransaction() | 🔐 | GET | /v2/accounts/{account_id}/transactions/{transactionId} |
depositFunds() | 🔐 | POST | /v2/accounts/{account_id}/deposits |
commitDeposit() | 🔐 | POST | /v2/accounts/{account_id}/deposits/{deposit_id}/commit |
getDeposits() | 🔐 | GET | /v2/accounts/{account_id}/deposits |
getDeposit() | 🔐 | GET | /v2/accounts/{account_id}/deposits/{deposit_id} |
withdrawFunds() | 🔐 | POST | /v2/accounts/{account_id}/withdrawals |
commitWithdrawal() | 🔐 | POST | /v2/accounts/{account_id}/withdrawals/{withdrawal_id}/commit |
getWithdrawals() | 🔐 | GET | /v2/accounts/{account_id}/withdrawals |
getWithdrawal() | 🔐 | GET | /v2/accounts/{account_id}/withdrawals/{withdrawal_id} |
getFiatCurrencies() | GET | /v2/currencies |
|
getCryptocurrencies() | GET | /v2/currencies/crypto |
|
getExchangeRates() | GET | /v2/exchange-rates |
|
getBuyPrice() | GET | /v2/prices/{currencyPair}/buy |
|
getSellPrice() | GET | /v2/prices/{currencyPair}/sell |
|
getSpotPrice() | GET | /v2/prices/{currencyPair}/spot |
|
getCurrentTime() | GET | /v2/time |
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBExchangeClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
getAccounts() | 🔐 | GET | /accounts |
getAccount() | 🔐 | GET | /accounts/{account_id} |
getAccountHolds() | 🔐 | GET | /accounts/{account_id}/holds |
getAccountLedger() | 🔐 | GET | /accounts/{account_id}/ledger |
getAccountTransfers() | 🔐 | GET | /accounts/{account_id}/transfers |
getAddressBook() | 🔐 | GET | /address-book |
addAddresses() | 🔐 | POST | /address-book |
deleteAddress() | 🔐 | DELETE | /address-book/{id} |
getCoinbaseWallets() | 🔐 | GET | /coinbase-accounts |
createNewCryptoAddress() | 🔐 | POST | /coinbase-accounts/{account_id}/addresses |
convertCurrency() | 🔐 | POST | /conversions |
getConversionFeeRates() | 🔐 | GET | /conversions/fees |
getConversion() | 🔐 | GET | /conversions/{conversion_id} |
getCurrencies() | GET | /currencies |
|
getCurrency() | GET | /currencies/{currency_id} |
|
depositFromCoinbaseAccount() | 🔐 | POST | /deposits/coinbase-account |
depositFromPaymentMethod() | 🔐 | POST | /deposits/payment-method |
getPaymentMethods() | 🔐 | GET | /payment-methods |
getTransfers() | 🔐 | GET | /transfers |
getTransfer() | 🔐 | GET | /transfers/{transfer_id} |
submitTravelInformation() | 🔐 | POST | /transfers/{transfer_id}/travel-rules |
withdrawToCoinbaseAccount() | 🔐 | POST | /withdrawals/coinbase-account |
withdrawToCryptoAddress() | 🔐 | POST | /withdrawals/crypto |
getCryptoWithdrawalFeeEstimate() | 🔐 | GET | /withdrawals/fee-estimate |
withdrawToPaymentMethod() | 🔐 | POST | /withdrawals/payment-method |
getFees() | 🔐 | GET | /fees |
getFills() | 🔐 | GET | /fills |
getOrders() | 🔐 | GET | /orders |
cancelAllOrders() | 🔐 | DELETE | /orders |
submitOrder() | 🔐 | POST | /orders |
getOrder() | 🔐 | GET | /orders/{order_id} |
cancelOrder() | 🔐 | DELETE | /orders/{order_id} |
getLoans() | 🔐 | GET | /loans |
getLoanAssets() | 🔐 | GET | /loans/assets |
getInterestSummaries() | 🔐 | GET | /loans/interest |
getInterestRateHistory() | 🔐 | GET | /loans/interest/history/{loan_id} |
getInterestCharges() | 🔐 | GET | /loans/interest/{loan_id} |
getLendingOverview() | 🔐 | GET | /loans/lending-overview |
getNewLoanPreview() | 🔐 | GET | /loans/loan-preview |
submitNewLoan() | 🔐 | POST | /loans/open |
getNewLoanOptions() | 🔐 | GET | /loans/options |
repayLoanInterest() | 🔐 | POST | /loans/repay-interest |
repayLoanPrincipal() | 🔐 | POST | /loans/repay-principal |
getPrincipalRepaymentPreview() | 🔐 | GET | /loans/repayment-preview |
getSignedPrices() | 🔐 | GET | /oracle |
getAllTradingPairs() | GET | /products |
|
getAllProductVolume() | GET | /products/volume-summary |
|
getProduct() | GET | /products/{product_id} |
|
getProductBook() | GET | /products/{product_id}/book |
|
getProductCandles() | GET | /products/{product_id}/candles |
|
getProductStats() | GET | /products/{product_id}/stats |
|
getProductTicker() | GET | /products/{product_id}/ticker |
|
getProductTrades() | GET | /products/{product_id}/trades |
|
getProfiles() | 🔐 | GET | /profiles |
createProfile() | 🔐 | POST | /profiles |
transferFundsBetweenProfiles() | 🔐 | POST | /profiles/transfer |
getProfileById() | 🔐 | GET | /profiles/{profile_id} |
renameProfile() | 🔐 | PUT | /profiles/{profile_id} |
deleteProfile() | 🔐 | PUT | /profiles/{profile_id}/deactivate |
getAllReports() | 🔐 | GET | /reports |
createReport() | 🔐 | POST | /reports |
getReport() | 🔐 | GET | /reports/{report_id} |
getTravelRuleInformation() | 🔐 | GET | /travel-rules |
createTravelRuleEntry() | 🔐 | POST | /travel-rules |
deleteTravelRuleEntry() | 🔐 | DELETE | /travel-rules/{id} |
getUserExchangeLimits() | 🔐 | GET | /users/{user_id}/exchange-limits |
updateSettlementPreference() | 🔐 | POST | /users/{user_id}/settlement-preferences |
getUserTradingVolume() | 🔐 | GET | /users/{user_id}/trading-volumes |
getAllWrappedAssets() | GET | /wrapped-assets |
|
getAllStakeWraps() | 🔐 | GET | /wrapped-assets/stake-wrap |
createStakeWrap() | 🔐 | POST | /wrapped-assets/stake-wrap |
getStakeWrap() | 🔐 | GET | /wrapped-assets/stake-wrap/{stake_wrap_id} |
getWrappedAssetDetails() | 🔐 | GET | /wrapped-assets/{wrapped_asset_id} |
getWrappedAssetConversionRate() | 🔐 | GET | /wrapped-assets/{wrapped_asset_id}/conversion-rate |
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBInternationalClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
getAssets() | GET | /api/v1/assets |
|
getAssetDetails() | GET | /api/v1/assets/{asset} |
|
getSupportedNetworksPerAsset() | GET | /api/v1/assets/{asset}/networks |
|
getIndexComposition() | GET | /api/v1/index/{index}/composition |
|
getIndexCompositionHistory() | GET | /api/v1/index/{index}/composition-history |
|
getIndexPrice() | GET | /api/v1/index/{index}/price |
|
getIndexCandles() | GET | /api/v1/index/{index}/candles |
|
getInstruments() | GET | /api/v1/instruments |
|
getInstrumentDetails() | GET | /api/v1/instruments/{instrument} |
|
getQuotePerInstrument() | GET | /api/v1/instruments/{instrument}/quote |
|
getDailyTradingVolumes() | GET | /api/v1/instruments/volumes/daily |
|
getAggregatedCandlesData() | GET | /api/v1/instruments/{instrument}/candles |
|
getHistoricalFundingRates() | GET | /api/v1/instruments/{instrument}/funding |
|
getPositionOffsets() | GET | /api/v1/position-offsets |
|
submitOrder() | 🔐 | POST | /api/v1/orders |
getOpenOrders() | 🔐 | GET | /api/v1/orders |
cancelOrders() | 🔐 | DELETE | /api/v1/orders |
updateOpenOrder() | 🔐 | PUT | /api/v1/orders/{id} |
getOrderDetails() | 🔐 | GET | /api/v1/orders/{id} |
cancelOrder() | 🔐 | DELETE | /api/v1/orders/{id} |
getUserPortfolios() | 🔐 | GET | /api/v1/portfolios |
createPortfolio() | 🔐 | POST | /api/v1/portfolios |
updatePortfolioParameters() | 🔐 | PATCH | /api/v1/portfolios |
getUserPortfolio() | 🔐 | GET | /api/v1/portfolios/{portfolio} |
updatePortfolio() | 🔐 | PUT | /api/v1/portfolios/{portfolio} |
getPortfolioDetails() | 🔐 | GET | /api/v1/portfolios/{portfolio}/detail |
getPortfolioSummary() | 🔐 | GET | /api/v1/portfolios/{portfolio}/summary |
getPortfolioBalances() | 🔐 | GET | /api/v1/portfolios/{portfolio}/balances |
getBalanceForPortfolioAsset() | 🔐 | GET | /api/v1/portfolios/{portfolio}/balances/{asset} |
getPortfolioPositions() | 🔐 | GET | /api/v1/portfolios/{portfolio}/positions |
getPositionForPortfolioInstrument() | 🔐 | GET | /api/v1/portfolios/{portfolio}/positions/{instrument} |
getFillsByPortfolios() | 🔐 | GET | /api/v1/portfolios/fills |
getPortfolioFills() | 🔐 | GET | /api/v1/portfolios/{portfolio}/fills |
setCrossCollateral() | 🔐 | POST | /api/v1/portfolios/{portfolio}/cross-collateral-enabled |
setAutoMargin() | 🔐 | POST | /api/v1/portfolios/{portfolio}/auto-margin-enabled |
setPortfolioMarginOverride() | 🔐 | POST | /api/v1/portfolios/margin |
transferFundsBetweenPortfolios() | 🔐 | POST | /api/v1/portfolios/transfer |
transferPositionsBetweenPortfolios() | 🔐 | POST | /api/v1/portfolios/transfer-position |
getPortfolioFeeRates() | 🔐 | GET | /api/v1/portfolios/fee-rates |
getRankings() | 🔐 | GET | /api/v1/rankings/statistics |
getMatchingTransfers() | 🔐 | GET | /api/v1/transfers |
getTransfer() | 🔐 | GET | /api/v1/transfers/{transfer_uuid} |
withdrawToCryptoAddress() | 🔐 | POST | /api/v1/transfers/withdraw |
createCryptoAddress() | 🔐 | POST | /api/v1/transfers/address |
createCounterpartyId() | 🔐 | POST | /api/v1/transfers/create-counterparty-id |
validateCounterpartyId() | 🔐 | POST | /api/v1/transfers/validate-counterparty-id |
withdrawToCounterpartyId() | 🔐 | POST | /api/v1/transfers/withdraw/counterparty |
getFeeRateTiers() | 🔐 | GET | /api/v1/fee-rate-tiers |
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBPrimeClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
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} |
getInvoices() | 🔐 | GET | /v1/entities/{entity_id}/invoices |
getAssets() | 🔐 | GET | /v1/entities/{entity_id}/assets |
getEntityPaymentMethods() | 🔐 | GET | /v1/entities/{entity_id}/payment-methods |
getEntityPaymentMethod() | 🔐 | GET | /v1/entities/{entity_id}/payment-methods/{payment_method_id} |
getUsers() | 🔐 | GET | /v1/entities/{entity_id}/users |
getPortfolioUsers() | 🔐 | GET | /v1/portfolios/{portfolio_id}/users |
getPortfolios() | 🔐 | GET | /v1/portfolios |
getPortfolioById() | 🔐 | GET | /v1/portfolios/{portfolio_id} |
getPortfolioCreditInformation() | 🔐 | GET | /v1/portfolios/{portfolio_id}/credit |
getActivities() | 🔐 | GET | /v1/portfolios/{portfolio_id}/activities |
getActivityById() | 🔐 | GET | /v1/portfolios/{portfolio_id}/activities/{activity_id} |
getAddressBook() | 🔐 | GET | /v1/portfolios/{portfolio_id}/address_book |
createAddressBookEntry() | 🔐 | POST | /v1/portfolios/{portfolio_id}/address_book |
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 |
getPortfolioCommission() | 🔐 | GET | /v1/portfolios/{portfolio_id}/commission |
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 |
getPortfolioProducts() | 🔐 | GET | /v1/portfolios/{portfolio_id}/products |
getPortfolioTransactions() | 🔐 | GET | /v1/portfolios/{portfolio_id}/transactions |
getTransactionById() | 🔐 | GET | /v1/portfolios/{portfolio_id}/transactions/{transaction_id} |
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 |
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 |
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in CBCommerceClient.ts.
Function | AUTH | HTTP Method | Endpoint |
---|---|---|---|
createCharge() | 🔐 | POST | /charges |
getAllCharges() | 🔐 | GET | /charges |
getCharge() | 🔐 | GET | /charges/{charge_code_or_charge_id} |
createCheckout() | 🔐 | POST | /checkouts |
getAllCheckouts() | 🔐 | GET | /checkouts |
getCheckout() | 🔐 | GET | /checkouts/{checkout_id} |
listEvents() | 🔐 | GET | /events |
showEvent() | 🔐 | GET | /events/{event_id} |