Coinbase.Net AI API Quick Map

June 29, 2026 ยท View on GitHub

Use this file to route common user intents to the correct Coinbase.Net client member. If a method name or parameter is not listed here, inspect Coinbase.Net/Interfaces/Clients/** before generating code.

Client Roots

IntentUse
REST callsnew CoinbaseRestClient()
WebSocket streamsnew CoinbaseSocketClient()
Advanced Trade RESTclient.AdvancedTradeApi
Coinbase Exchange REST market dataclient.ExchangeApi
Advanced Trade WebSocketsocketClient.AdvancedTradeApi
Coinbase Exchange WebSocketsocketClient.ExchangeApi
API key authenticationoptions.ApiCredentials = new CoinbaseCredentials("key-name", "ec-private-key")
Live environmentCoinbaseEnvironment.Live
Custom environmentCoinbaseEnvironment.CreateCustom(...)
Dependency injectionservices.AddCoinbase(options => { ... })

Coinbase credentials are ECDSA key-name/private-key credentials. Do not generate HMAC secret/passphrase examples.

Symbols

User intentCoinbase.Net pattern
Spot BTC/USD product idBTC-USD
Spot ETH/USD product idETH-USD
Spot ETH/USDT product idETH-USDT
Discover supported product idsclient.AdvancedTradeApi.ExchangeData.GetSymbolsAsync(...)
Avoid Binance/Bybit compact symbolsDo not use ETHUSDT or BTCUSDT
Avoid non-Coinbase separatorsDo not use ETH_USDT, ETH/USD, or tETHUSD

Advanced Trade Market Data REST

User intentCoinbase.Net member
Get server timeclient.AdvancedTradeApi.ExchangeData.GetServerTimeAsync()
Get all productsclient.AdvancedTradeApi.ExchangeData.GetSymbolsAsync()
Get spot productsclient.AdvancedTradeApi.ExchangeData.GetSymbolsAsync(SymbolType.Spot)
Get futures productsclient.AdvancedTradeApi.ExchangeData.GetSymbolsAsync(SymbolType.Futures)
Get selected productsclient.AdvancedTradeApi.ExchangeData.GetSymbolsAsync(symbols: new[] { "ETH-USD" })
Get one product/tickerclient.AdvancedTradeApi.ExchangeData.GetSymbolAsync("ETH-USD")
Get order bookclient.AdvancedTradeApi.ExchangeData.GetOrderBookAsync("ETH-USD", limit: 50)
Get klines/candlesclient.AdvancedTradeApi.ExchangeData.GetKlinesAsync("ETH-USD", KlineInterval.OneMinute)
Get recent public tradesclient.AdvancedTradeApi.ExchangeData.GetTradeHistoryAsync("ETH-USD")
Get best bid/ask for one productclient.AdvancedTradeApi.ExchangeData.GetBookTickerAsync("ETH-USD")
Get best bid/ask for multiple productsclient.AdvancedTradeApi.ExchangeData.GetBookTickersAsync(new[] { "ETH-USD", "BTC-USD" })
Get fiat currenciesclient.AdvancedTradeApi.ExchangeData.GetFiatAssetsAsync()
Get crypto currenciesclient.AdvancedTradeApi.ExchangeData.GetCryptoAssetsAsync()
Get exchange ratesclient.AdvancedTradeApi.ExchangeData.GetExchangeRatesAsync("USD")
Get Coinbase App buy pricesclient.AdvancedTradeApi.ExchangeData.GetBuyPriceAsync("ETH-USD")
Get Coinbase App sell pricesclient.AdvancedTradeApi.ExchangeData.GetSellPriceAsync("ETH-USD")
Get Coinbase App spot pricesclient.AdvancedTradeApi.ExchangeData.GetSpotPriceAsync("ETH-USD")

Advanced Trade Account REST

User intentCoinbase.Net member
Get accounts and balancesclient.AdvancedTradeApi.Account.GetAccountsAsync(limit: 100)
Get one accountclient.AdvancedTradeApi.Account.GetAccountAsync(accountId)
Get portfoliosclient.AdvancedTradeApi.Account.GetPortfoliosAsync()
Get portfolios by typeclient.AdvancedTradeApi.Account.GetPortfoliosAsync(PortfolioType.Default)
Get portfolio breakdownclient.AdvancedTradeApi.Account.GetPortfolioAsync(portfolioId)
Create portfolioclient.AdvancedTradeApi.Account.CreatePortfolioAsync(portfolioName)
Edit portfolioclient.AdvancedTradeApi.Account.EditPortfolioAsync(portfolioId, newName)
Delete portfolioclient.AdvancedTradeApi.Account.DeletePortfolioAsync(portfolioId)
Move funds between portfoliosclient.AdvancedTradeApi.Account.TransferPortfolioFundsAsync(...)
Get fee tier infoclient.AdvancedTradeApi.Account.GetFeeInfoAsync(SymbolType.Spot)
Get API key permissionsclient.AdvancedTradeApi.Account.GetApiKeyInfoAsync()
Get payment methodsclient.AdvancedTradeApi.Account.GetPaymentMethodsAsync()
Get payment methodclient.AdvancedTradeApi.Account.GetPaymentMethodAsync(paymentMethodId)
Create convert quoteclient.AdvancedTradeApi.Account.CreateConvertQuoteAsync(fromAsset, toAsset, quantity)
Get convert tradeclient.AdvancedTradeApi.Account.GetConvertTradeAsync(tradeId, fromAsset, toAsset)
Commit convert tradeclient.AdvancedTradeApi.Account.CommitConvertTradeAsync(tradeId, fromAsset, toAsset)

Coinbase App Account REST

Coinbase App deposit, withdrawal, transaction, and address endpoints are exposed under AdvancedTradeApi.Account, not under a separate AppApi root.

User intentCoinbase.Net member
Get fiat depositsclient.AdvancedTradeApi.Account.GetDepositsAsync(accountId)
Get one fiat depositclient.AdvancedTradeApi.Account.GetDepositAsync(accountId, depositId)
Deposit fiatclient.AdvancedTradeApi.Account.DepositAsync(accountId, paymentId, asset, quantity)
Get fiat withdrawalsclient.AdvancedTradeApi.Account.GetWithdrawalsAsync(accountId)
Get one fiat withdrawalclient.AdvancedTradeApi.Account.GetWithdrawalAsync(accountId, withdrawalId)
Withdraw fiatclient.AdvancedTradeApi.Account.WithdrawAsync(accountId, asset, quantity, paymentMethod)
Get transactionsclient.AdvancedTradeApi.Account.GetTransactionsAsync(accountId)
Get one transactionclient.AdvancedTradeApi.Account.GetTransactionAsync(accountId, transactionId)
Get address transactionsclient.AdvancedTradeApi.Account.GetAddressTransactionsAsync(accountId, addressId)
Withdraw cryptoclient.AdvancedTradeApi.Account.WithdrawCryptoAsync(accountId, to, quantity, asset, ...)
Create deposit addressclient.AdvancedTradeApi.Account.CreateDepositAddressAsync(accountId, name)
Get deposit addressesclient.AdvancedTradeApi.Account.GetDepositAddressesAsync(accountId)
Get one deposit addressclient.AdvancedTradeApi.Account.GetDepositAddressAsync(accountId, addressId)

Futures And Perpetual Account REST

User intentCoinbase.Net member
Allocate portfolio fundsclient.AdvancedTradeApi.Account.AllocatePortfolioAsync(...)
Get perpetual portfolio summaryclient.AdvancedTradeApi.Account.GetPerpetualPortfolioSummaryAsync(portfolioId)
Get perpetual balancesclient.AdvancedTradeApi.Account.GetPerpetualBalancesAsync(portfolioId)
Set perpetual multi-asset collateral modeclient.AdvancedTradeApi.Account.SetPerpetualMultiAssetCollateralModeAsync(portfolioId, enabled)
Get futures balance summaryclient.AdvancedTradeApi.Account.GetFuturesBalanceSummaryAsync()
Set futures intraday margin settingclient.AdvancedTradeApi.Account.SetFuturesIntradayMarginSettingAsync(setting)
Get futures intraday margin settingclient.AdvancedTradeApi.Account.GetFuturesIntradayMarginSettingAsync()
Get futures current margin windowclient.AdvancedTradeApi.Account.GetFuturesCurrentMarginWindowAsync(marginProfileType)

Advanced Trade Trading REST

User intentCoinbase.Net member
Place limit orderclient.AdvancedTradeApi.Trading.PlaceOrderAsync("ETH-USD", OrderSide.Buy, NewOrderType.Limit, quantity: 0.01m, price: 2000m)
Place market buy with quote amountclient.AdvancedTradeApi.Trading.PlaceOrderAsync("ETH-USD", OrderSide.Buy, NewOrderType.Market, quoteQuantity: 50m)
Place market sell with base amountclient.AdvancedTradeApi.Trading.PlaceOrderAsync("ETH-USD", OrderSide.Sell, NewOrderType.Market, quantity: 0.01m)
Place post-only limit orderclient.AdvancedTradeApi.Trading.PlaceOrderAsync(..., postOnly: true)
Place stop orderclient.AdvancedTradeApi.Trading.PlaceOrderAsync(..., stopPrice: price, stopDirection: StopDirection.StopUp)
Cancel one orderclient.AdvancedTradeApi.Trading.CancelOrderAsync(orderId)
Cancel multiple ordersclient.AdvancedTradeApi.Trading.CancelOrdersAsync(orderIds)
Edit orderclient.AdvancedTradeApi.Trading.EditOrderAsync(orderId, price, quantity)
Get one orderclient.AdvancedTradeApi.Trading.GetOrderAsync(orderId)
Get ordersclient.AdvancedTradeApi.Trading.GetOrdersAsync(...)
Get open orders for productclient.AdvancedTradeApi.Trading.GetOrdersAsync(symbols: new[] { "ETH-USD" }, orderStatus: new[] { OrderStatus.Open })
Get fills/user tradesclient.AdvancedTradeApi.Trading.GetUserTradesAsync(symbols: new[] { "ETH-USD" })
Close positionclient.AdvancedTradeApi.Trading.ClosePositionAsync(symbol, quantity)
Get futures positionsclient.AdvancedTradeApi.Trading.GetFuturesPositionsAsync()
Get one futures positionclient.AdvancedTradeApi.Trading.GetFuturesPositionAsync(symbol)
Get perpetual positionsclient.AdvancedTradeApi.Trading.GetPerpetualPositionsAsync(portfolioId)
Get one perpetual positionclient.AdvancedTradeApi.Trading.GetPerpetualPositionAsync(portfolioId, symbol)

For order placement, check both result.Success and result.Data.Success before reading SuccessResponse.

Coinbase Exchange REST

User intentCoinbase.Net member
Get Exchange API server timeclient.ExchangeApi.ExchangeData.GetServerTimeAsync()
Get Exchange API currenciesclient.ExchangeApi.ExchangeData.GetAssetsAsync()
Get Exchange API productsclient.ExchangeApi.ExchangeData.GetSymbolsAsync()

Advanced Trade WebSocket

User intentCoinbase.Net member
Subscribe heartbeatssocketClient.AdvancedTradeApi.SubscribeToHeartbeatUpdatesAsync(handler)
Subscribe trades for one productsocketClient.AdvancedTradeApi.SubscribeToTradeUpdatesAsync("ETH-USD", handler)
Subscribe trades for many productssocketClient.AdvancedTradeApi.SubscribeToTradeUpdatesAsync(symbols, handler)
Subscribe 5-minute candles for one productsocketClient.AdvancedTradeApi.SubscribeToKlineUpdatesAsync("ETH-USD", handler)
Subscribe 5-minute candles for many productssocketClient.AdvancedTradeApi.SubscribeToKlineUpdatesAsync(symbols, handler)
Subscribe ticker updatessocketClient.AdvancedTradeApi.SubscribeToTickerUpdatesAsync("ETH-USD", handler)
Subscribe batched ticker updatessocketClient.AdvancedTradeApi.SubscribeToBatchedTickerUpdatesAsync("ETH-USD", handler)
Subscribe product/status updatessocketClient.AdvancedTradeApi.SubscribeToSymbolUpdatesAsync("ETH-USD", handler)
Subscribe order book updatessocketClient.AdvancedTradeApi.SubscribeToOrderBookUpdatesAsync("ETH-USD", handler)
Subscribe user order/position updatessocketClient.AdvancedTradeApi.SubscribeToUserUpdatesAsync(handler)
Subscribe futures balance updatessocketClient.AdvancedTradeApi.SubscribeToFuturesBalanceUpdatesAsync(handler)

Advanced Trade kline WebSocket updates are always 5-minute candles; use REST GetKlinesAsync when a specific interval is needed.

Coinbase Exchange WebSocket

User intentCoinbase.Net member
Subscribe Exchange heartbeatsocketClient.ExchangeApi.SubscribeToHeartbeatUpdatesAsync("ETH-USD", handler)
Subscribe Exchange status/product updatessocketClient.ExchangeApi.SubscribeToExchangeInfoUpdatesAsync(handler)
Subscribe Exchange tickersocketClient.ExchangeApi.SubscribeToTickerUpdatesAsync("ETH-USD", handler)
Subscribe Exchange ticker for many productssocketClient.ExchangeApi.SubscribeToTickerUpdatesAsync(symbols, handler)
Subscribe Exchange batched tickersocketClient.ExchangeApi.SubscribeToBatchedTickerUpdatesAsync("ETH-USD", handler)
Subscribe Exchange level2 order booksocketClient.ExchangeApi.SubscribeToOrderBookUpdatesAsync("ETH-USD", onSnapshot, onUpdate)

SharedApis

Use SharedApis for exchange-agnostic code across Coinbase, Binance, Bybit, OKX, Kraken, and other CryptoExchange.Net libraries.

User intentCoinbase.Net member or interface
Shared Advanced Trade REST clientnew CoinbaseRestClient().AdvancedTradeApi.SharedClient
Shared Advanced Trade socket clientnew CoinbaseSocketClient().AdvancedTradeApi.SharedClient
Discover shared capabilitiesclient.AdvancedTradeApi.SharedClient.Discover()
Shared spot ticker RESTISpotTickerRestClient.GetSpotTickerAsync(new GetTickerRequest(symbol))
Shared spot order RESTISpotOrderRestClient.PlaceSpotOrderAsync(...)
Shared futures order RESTIFuturesOrderRestClient.PlaceFuturesOrderAsync(...)
Shared kline RESTIKlineRestClient.GetKlinesAsync(...)
Shared ticker socketITickerSocketClient.SubscribeToTickerUpdatesAsync(...)
Shared kline socketIKlineSocketClient.SubscribeToKlineUpdatesAsync(...)
Shared trade socketITradeSocketClient.SubscribeToTradeUpdatesAsync(...)
Shared order socketISpotOrderSocketClient / IFuturesOrderSocketClient
Shared position socketIPositionSocketClient

Shared REST calls return HttpResult<T> / HttpResult. Shared socket subscriptions return WebSocketResult<UpdateSubscription>. Shared non-I/O symbol/cache helpers can return ExchangeCallResult<T>.

For shared socket subscriptions, keep the concrete socket client and unsubscribe with await socketClient.UnsubscribeAsync(subscription.Data).

Result Handling

SituationPattern
REST success checkif (!result.Success) { Console.WriteLine(result.Error); return; }
Socket subscription success checkWebSocketResult<UpdateSubscription> sub = await ...; if (!sub.Success) { Console.WriteLine(sub.Error); return; }
Read REST dataRead result.Data only after result.Success
Shared helper dataRead ExchangeCallResult<T>.Data only after result.Success
Place-order transport successif (!order.Success) { Console.WriteLine(order.Error); return; }
Place-order exchange successif (!order.Data.Success) { Console.WriteLine(order.Data.ErrorResponse.Message); return; }
Read placed order idorder.Data.SuccessResponse.OrderId only after both success checks
Retry decisionRetry only when result.Error?.IsTransient == true
CancellationPass ct: cancellationToken

Credential And Framework Pitfalls

Do not useUse instead
HMAC key/secret examplesnew CoinbaseCredentials(keyName, ecPrivateKey)
API passphrase examplesNo passphrase is used by CoinbaseCredentials
Flattened private key without newlinesPreserve PEM newlines or replace escaped \\n with \n
Private endpoints on netstandard2.0Use netstandard2.1 or modern .NET targets for signing support
Manual JWT/signing codeLet Coinbase.Net sign requests

Common Routing Pitfalls

Do not useUse instead
CoinbaseClientCoinbaseRestClient
SpotApiAdvancedTradeApi
UsdFuturesApiAdvancedTradeApi.Trading / AdvancedTradeApi.Account futures methods
CoinFuturesApiAdvancedTradeApi.Trading / AdvancedTradeApi.Account futures methods
GeneralApiAdvancedTradeApi.Account for Coinbase App and portfolio endpoints
V5ApiAdvancedTradeApi / ExchangeApi
ETHUSDTETH-USDT or ETH-USD
BTCUSDTBTC-USD or a listed Coinbase product id
.Data without .Success checkCheck .Success first
CoinbaseOrderResult.SuccessResponse without checking CoinbaseOrderResult.SuccessCheck both success layers
ITickerSocketClient.UnsubscribeAsync(...)Keep the concrete socket client and call socketClient.UnsubscribeAsync(subscription.Data)
Custom clientOrderId by defaultLet Coinbase.Net auto-generate it unless explicit idempotency is needed

Source Of Truth

NeedInspect
REST root shapeCoinbase.Net/Interfaces/Clients/ICoinbaseRestClient.cs
Socket root shapeCoinbase.Net/Interfaces/Clients/ICoinbaseSocketClient.cs
Advanced Trade market data methodsCoinbase.Net/Interfaces/Clients/AdvancedTradeApi/ICoinbaseRestClientAdvancedTradeApiExchangeData.cs
Advanced Trade account methodsCoinbase.Net/Interfaces/Clients/AdvancedTradeApi/ICoinbaseRestClientAdvancedTradeApiAccount.cs
Advanced Trade trading methodsCoinbase.Net/Interfaces/Clients/AdvancedTradeApi/ICoinbaseRestClientAdvancedTradeApiTrading.cs
Advanced Trade socket methodsCoinbase.Net/Interfaces/Clients/AdvancedTradeApi/ICoinbaseSocketClientAdvancedTradeApi.cs
Exchange API REST methodsCoinbase.Net/Interfaces/Clients/ExchangeApi/ICoinbaseRestClientExchangeApiExchangeData.cs
Exchange API socket methodsCoinbase.Net/Interfaces/Clients/ExchangeApi/ICoinbaseSocketClientExchangeApi.cs
Enums and valid enum namesCoinbase.Net/Enums/*.cs