CryptoExchange.Net defines a set of SharedApis interfaces that describe common functionality available across multiple exchanges. Every exchange client in CryptoClients.Net implements the interfaces it supports, accessible via the SharedClient property on each API group.
Writing against these interfaces means your business logic does not need to know which exchange it is talking to — the same code works on Binance, Bybit, Kraken, or any other supported exchange.
Accessing shared clients
IExchangeRestClient and IExchangeSocketClient expose helper methods to retrieve shared-interface implementations by interface type, trading mode, or exchange name.
Writing exchange-agnostic code
The pattern below works identically for any exchange that supportsISpotTickerRestClient:
GetSpotTickerClient(exchange) to make this fully dynamic:
REST shared interfaces
Spot market data
Spot market data
| Interface | Description |
|---|---|
ISpotTickerRestClient | Retrieve spot ticker data for one or all symbols |
ISpotSymbolRestClient | List available spot trading pairs |
IKlineRestClient | Fetch OHLCV candlestick data |
IOrderBookRestClient | Query the order book snapshot |
IRecentTradeRestClient | Retrieve recent public trades |
ITradeHistoryRestClient | Fetch historical public trades (paginated) |
IBookTickerRestClient | Get best bid/ask price |
IAssetsRestClient | List supported assets and networks |
Spot trading
Spot trading
| Interface | Description |
|---|---|
ISpotOrderRestClient | Place, cancel, and query spot orders |
ISpotOrderClientIdRestClient | Look up spot orders by client order ID |
ISpotTriggerOrderRestClient | Place and manage spot trigger (stop) orders |
IBalanceRestClient | Retrieve account balances |
IDepositRestClient | Query deposit history |
IWithdrawRestClient | Submit withdrawals |
IWithdrawalRestClient | Query withdrawal history |
ITransferRestClient | Move funds between account types |
IFeeRestClient | Retrieve maker/taker fee rates |
Futures market data
Futures market data
| Interface | Description |
|---|---|
IFuturesTickerRestClient | Futures ticker (includes mark/index price, funding) |
IFuturesSymbolRestClient | List available futures contracts |
IFundingRateRestClient | Historical and predicted funding rates |
IMarkPriceKlineRestClient | Mark price klines for futures |
IIndexPriceKlineRestClient | Index price klines for futures |
IOpenInterestRestClient | Open interest data |
Futures trading
Futures trading
| Interface | Description |
|---|---|
IFuturesOrderRestClient | Place, cancel, and query futures orders |
IFuturesOrderClientIdRestClient | Look up futures orders by client order ID |
IFuturesTriggerOrderRestClient | Place and manage futures trigger orders |
IFuturesTpSlRestClient | Take-profit / stop-loss management |
ILeverageRestClient | Get and set position leverage |
IPositionModeRestClient | Hedge vs one-way position mode |
IPositionHistoryRestClient | Historical positions |
IListenKeyRestClient | Create and renew listen keys for user data streams |
Socket shared interfaces
Market data streams
Market data streams
| Interface | Description |
|---|---|
ITickerSocketClient | Real-time ticker updates for a single symbol |
ITickersSocketClient | Real-time ticker updates for all symbols |
ITradeSocketClient | Live public trade feed |
IKlineSocketClient | Candlestick / OHLCV updates |
IOrderBookSocketClient | Order book snapshot updates |
IBookTickerSocketClient | Best bid/ask streaming |
User data streams
User data streams
| Interface | Description |
|---|---|
IBalanceSocketClient | Account balance change notifications |
ISpotOrderSocketClient | Spot order state updates |
IFuturesOrderSocketClient | Futures order state updates |
IUserTradeSocketClient | Trade execution notifications |
IPositionSocketClient | Futures position updates |
Getting shared clients by type
IExchangeRestClient provides a GetXxxClients() / GetXxxClient(exchange) pair for every interface, with optional TradingMode filtering where relevant: