BinanceWebsocket 2.1.0.42
dotnet add package BinanceWebsocket --version 2.1.0.42
NuGet\Install-Package BinanceWebsocket -Version 2.1.0.42
<PackageReference Include="BinanceWebsocket" Version="2.1.0.42" />
paket add BinanceWebsocket --version 2.1.0.42
#r "nuget: BinanceWebsocket, 2.1.0.42"
// Install BinanceWebsocket as a Cake Addin
#addin nuget:?package=BinanceWebsocket&version=2.1.0.42
// Install BinanceWebsocket as a Cake Tool
#tool nuget:?package=BinanceWebsocket&version=2.1.0.42
This library provides the fastest access possible to all of the Binance WebSocket API Endpoints Listed Here
Some of the requests are available as Websocket Streams
, which are also supported.
This library has everything you need to trade Spot
on Binance
Authentication
Currently this library only supports Ed25519
keys, this is what Binance
recommends, see below for a quick way to create keys.
You can create an authenticator by loading your PEM File
and entering your API Key
AuthenticationEd25519 auth = new AuthenticationEd25519("C:\\example\\ed25519_private_key.pem", api_key_ed25519);
WebsocketRequestClient websocketRequestClient = new WebsocketRequestClient(auth);
The client will automatically call session.logon
when you are successfully connected and whenever reconnection occurs
CreateResult WebSocket Client
CreateResult a WebsocketRequestClient
which will connect automatically and wait for requests
WebsocketRequestClient websocketRequestClient = new WebsocketRequestClient(auth); // Returns Objects
You can create a WebsocketRequestClient
without AuthenticationEd25519
for unauthenticated requests
WebsocketRequestClientRaw websocketRequestClientRaw = new WebsocketRequestClientRaw(auth); // Raw Responses
Use WebsocketRequestClientRaw
if you would rather the raw response instead of an object
Get Time
WebsocketRequestClient websocketRequestClient = new WebsocketRequestClient();
websocketRequestClient.General.GetTime((message) => { Console.WriteLine(message); });
websocketRequestClient.General.GetPing((message) => { Console.WriteLine(message); });
Start User Data Stream
AuthenticationEd25519 auth = new AuthenticationEd25519("C:\\example\\ed25519_private_key.pem", api_key_ed25519);
WebsocketRequestClient websocketRequestClient = new WebsocketRequestClient(auth);
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
websocketRequestClient.Streams.GetStartUserDataStream((listenKey) =>
{
websocketStreamClient.UserDataUpdates(listenKey.CreateResultListenKey(),
(orderUpdate) =>
{
// orderUpdate
},
(accountPositionUpdate) =>
{
// accountPositionUpdate
});
});
CreateResult Ed25519 Keys
For instructions on how to add the keys generated below to your account, Click Here
Install Git
and open Git Bash
and type the following commands
// Generate Private Key
openssl genpkey -algorithm ed25519 -out "C:\private.pem"
// Generate Public Key from the Private Key
openssl pkey -in "C:\private.pem" -pubout -out "C:\public.pem"
This will generate a private key you can sign with and a public key to give to Binance
by copying the text from public.pem
Websocket Request Client Information
Notes
You should reconnect at least once every 24 hours to avoid being disconnected, which could cause a Websocket Request Client Event
to occur.
You should reconnect when you are not sending requests or expecting any responses.
SocketAge
Returns a Timespan
that represents how long the socket has been connected.
public TimeSpan SocketAge()
Websocket Request Client Events
There are multiple events that are considered important in the WebsocketRequestClient
to ensure that you have 100% accurate information about the state of your requests
OnUnexpectedDisconnect
Occurs when an unexpected disconnection occurs and you should check all data before continuing
This could occur because of network issues or because a connection has been open for 24 hours
You should reconnect at least once every 24 hours to avoid being disconnected.
OnDataWasExpected
Occurs during a disconnection to indicate that the response for this request is expected and won't be processed by the socket
The request was marked as sent and may have been completed by the server
You should check all data related to this request id
, the server may not have processed this request
OnDataNotSent
Occurs during a disconnection to indicate that this request was not sent and won't be processed by the socket
The request won't be resent automatically, You need to resend it
You should check all data related to this request id
, the server may have processed this request
Session
To send authenticated requests, you must log in by creating a session.
The library will automatically login and logout for you when the socket connects/reconnects etc
You should be sure you aren't sending any requests if you decide to manually call login or logout
Query
Query the status of the WebSocket connection, inspecting which API key (if any) is used to authorize requests.
int id = websocketRequestClient.Session.Query(Action<BinanceSessionStatus> onData)
Login
Authenticate WebSocket connection using the provided API key.
int id = websocketRequestClient.Session.Login(Action<BinanceSessionStatus> onData)
Logout
Forget the API key previously authenticated. If the connection is not authenticated, this request does nothing.
int id = websocketRequestClient.Session.Logout(Action<BinanceSessionStatus> onData)
User Data Streams
You can use this library to get listen keys and send pings,
You will still need BinanceAPI.NET
to subscribe to the actual User Data Stream
GetStartUserDataStream
Start a new user data stream.
The response will output a listen key that can be subscribed through on the Websocket stream afterwards.
Note: the stream will close in 60 minutes unless GetPingUserDataStream
is sent regularly.
int id = websocketRequestClient.Streams.GetStartUserDataStream(Action<BinanceListenKey> onData)
GetPingUserDataStream
Ping a user data stream to keep it alive, It is recommended to send a ping once every 30 minutes.
int id = websocketRequestClient.Streams.GetPingUserDataStream(string listenKey)
GetStopUserDataStream
Explicitly stop and close the user data stream.
int id = websocketRequestClient.Streams.GetStopUserDataStream(string listenKey)
Trading
There are several different ways to place an order, this makes them faster and easier to understand.
PlaceOrder
Order Types: LIMIT
MARKET
LIMIT_MAKER
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrder(Action<BinancePlacedOrderSpot> onData, string symbol, decimal price, decimal quantity, string side = "BUY", string type = "LIMIT", string timeInForce = "GTC", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderMarket
Order Types: MARKET ONLY
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderMarket(Action<BinancePlacedOrderSpot> onData, string symbol, decimal quoteOrderQty, string side = "BUY", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderStopPrice
Order Types: LIMIT
LIMIT_MAKER
STOP_LOSS
STOP_LOSS_LIMIT
TAKE_PROFIT
TAKE_PROFIT_LIMIT
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderStopPrice(Action<BinancePlacedOrderSpot> onData, string symbol, decimal price, decimal quantity, decimal stopPrice, string side = "BUY", string type = "TAKE_PROFIT", string timeInForce = "GTC", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderTrailingDelta
Order Types: LIMIT
LIMIT_MAKER
STOP_LOSS
STOP_LOSS_LIMIT
TAKE_PROFIT
TAKE_PROFIT_LIMIT
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderTrailingDelta(Action<BinancePlacedOrderSpot> onData, string symbol, decimal price, decimal quantity, int delta, string side = "BUY", string type = "TAKE_PROFIT", string timeInForce = "GTC", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderLimitSor
Raw Only
Order Types: LIMIT ONLY
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderLimitSor(Action<string> onData, string symbol, decimal price, decimal quantity, string side = "BUY", string timeInForce = "GTC", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderLimitSorTest
Raw Only
Order Types: LIMIT ONLY
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderLimitSorTest(Action<string> onData, string symbol, decimal price, decimal quantity, string side = "BUY", string timeInForce = "GTC", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderMarketSor
Raw Only
Order Types: MARKET ONLY
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderMarketSor(Action<string> onData, string symbol, decimal quantity, string side = "BUY", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderMarketSorTest
Raw Only
Order Types: MARKET ONLY
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
int id = websocketRequestClient.Trade.PlaceOrderMarketSorTest(Action<string> onData, string symbol, decimal quantity, string side = "BUY", string newOrderRespType = "FULL", int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderCaR
Raw Only
Order Types: LIMIT
MARKET
LIMIT_MAKER
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
CancelReplaceModes: STOP_ON_FAILURE
ALLOW_FAILURE
CancelRestrictions: ONLY_NEW
ONLY_PARTIALLY_FILLED
PARTIALLY_FILLED
int id = websocketRequestClient.Trade.PlaceOrderCaR(Action<string> onData, string symbol, decimal price, decimal quantity, long? cancelOrderId = null, long? cancelOrigClientOrderId = null, string cancelReplaceMode = STOP_ON_FAILURE, string cancelRestrictions = ONLY_NEW, string side = BUY, string type = LIMIT, string timeInForce = GTC, string newOrderRespType = FULL, int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderStopPriceCaR
Raw Only
Order Types: LIMIT
LIMIT_MAKER
STOP_LOSS
STOP_LOSS_LIMIT
TAKE_PROFIT
TAKE_PROFIT_LIMIT
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
CancelReplaceModes: STOP_ON_FAILURE
ALLOW_FAILURE
CancelRestrictions: ONLY_NEW
ONLY_PARTIALLY_FILLED
PARTIALLY_FILLED
int id = websocketRequestClient.Trade.PlaceOrderStopPriceCaR(Action<string> onData, string symbol, decimal price, decimal quantity, decimal stopPrice, long? cancelOrderId = null, long? cancelOrigClientOrderId = null, string cancelReplaceMode = STOP_ON_FAILURE, string cancelRestrictions = ONLY_NEW, string side = BUY, string type = TAKE_PROFIT, string timeInForce = GTC, string newOrderRespType = FULL, int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
PlaceOrderTrailingDeltaCaR
Raw Only
Order Types: LIMIT
LIMIT_MAKER
STOP_LOSS
STOP_LOSS_LIMIT
TAKE_PROFIT
TAKE_PROFIT_LIMIT
ReponseTypes: ACK
RESULT
FULL
TimeInForce: GTC
IOC
FOK
Sides: BUY
SELL
SelfTradePreventionModes: EXPIRE_TAKER
EXPIRE_MAKER
EXPIRE_BOTH
NONE
CancelReplaceModes: STOP_ON_FAILURE
ALLOW_FAILURE
CancelRestrictions: ONLY_NEW
ONLY_PARTIALLY_FILLED
PARTIALLY_FILLED
int id = websocketRequestClient.Trade.PlaceOrderTrailingDeltaCaR(Action<string> onData, string symbol, decimal price, decimal quantity, int delta, long? cancelOrderId = null, long? cancelOrigClientOrderId = null, string cancelReplaceMode = STOP_ON_FAILURE, string cancelRestrictions = ONLY_NEW, string side = BUY, string type = TAKE_PROFIT, string timeInForce = GTC, string newOrderRespType = FULL, int? recvWindow = null, decimal? icebergQty = null, string selfTradePreventionMode = null, string newClientOrderId = null)
GetQueryOrder
Check execution status of an order.
int id = websocketRequestClient.Trade.GetQueryOrder(Action<BinanceOrderSpot> onData, string symbol, long orderId, int? recvWindow = null)
GetCancelOrder
Cancel an active order.
int id = websocketRequestClient.Trade.GetCancelOrder(Action<BinanceCancelledId> onData, string symbol, long orderId, int? recvWindow = null)
GetSymbolOpenOrders
Query execution status of all open orders for a symbol
int id = websocketRequestClient.Trade.GetSymbolCurrentOpenOrders(Action<List<BinanceOrderSpot>> onData, string symbol, int? recvWindow = null)
GetAllOpenOrders
Query execution status of all open orders.
int id = websocketRequestClient.Trade.GetAllCurrentOpenOrders(Action<List<BinanceOrderSpot>> onData, int? recvWindow = null)
GetCancelAllOrders
Cancel all open orders on a symbol, including OCO orders.
int id = websocketRequestClient.Trade.GetCancelAllOrders(Action<List<BinanceCancelledId>> onData, string symbol, int? recvWindow = null)
General
Exchange related general requests
GetTime
Test connectivity to the WebSocket API and get the current server time.
int id = websocketRequestClient.General.GetTime(Action<BinanceCheckTime> onData)
Ping
Test connectivity to the WebSocket API.
int id = websocketRequestClient.General.Ping(Action<string> onData)
GetAllExchangeInfo
Query current exchange trading rules, rate limits, and symbol information for all symbols
int id = websocketRequestClient.General.GetAllExchangeInfo(Action<BinanceExchangeInformation> onData)
GetExchangeInfo
Query current exchange trading rules, rate limits, and symbol information for a particular symbol
int id = websocketRequestClient.General.GetExchangeInfo(Action<BinanceExchangeInformation> onData, string symbol)
GetExchangeInfo
Query current exchange trading rules, rate limits, and symbol information for multiple symbols or permissions
int id = websocketRequestClient.General.GetExchangeInfo(Action<BinanceExchangeInformation> onData, string[] symbolsOrPermissions, bool permissions = false)
Account
Account related requests
GetAccountInfo
Query information about your account.
int id = websocketRequestClient.Account.GetAccountInfo(Action<BinanceAccountInfo> onData)
GetOrderRateLimit
Query your current order rate limit.
int id = websocketRequestClient.Account.GetOrderRateLimit(Action<List<BinanceOrderLimit>> onData)
GetAccountOrderHistory
Query information about all your orders – active, canceled, filled – filtered by time range.
int id = websocketRequestClient.Account.GetAccountOrderHistory(Action<List<BinanceOrderSpot>> onData, string symbol, long startAtOrderId = 0, DateTime startTime = default, DateTime endTime = default, int limit = 500, int? recvWindow = null)
GetAccountTradeHistory
Query information about all your trades, filtered by time range.
int id = websocketRequestClient.Account.GetAccountTradeHistory(Action<List<BinanceTrade>> onData, string symbol, long fromTradeId = 0, DateTime startTime = default, DateTime endTime = default, int limit = 500, int? recvWindow = null)
GetAccountAllocations
Retrieves allocations resulting from SOR order placement.
int id = websocketRequestClient.Account.GetAccountAllocations(Action<List<BinanceAccountAllocation>> onData, string symbol, DateTime? startTime = null, DateTime? endTime = null, long? orderId = null, int? fromAllocationId = null, int? limit = null, int? recvWindow = null)
GetAccountPreventedMatches
Displays the list of orders that were expired because of STP trigger.
int id = websocketRequestClient.Account.GetAccountPreventedMatches(Action<List<BinancePreventedMatch>> onData, string symbol, long? preventedMatchId = null, long? orderId = null, long? fromPreventedMatchId = null, int? limit = null, int? recvWindow = null)
GetAccountCommissionRates
Get current account commission rates for a symbol
int id = websocketRequestClient.Account.GetAccountCommissionRates(Action<BinanceAccountCommission> onData, string symbol)
Market
Most of these endpoints have websocket streams and it would be better to use BinanceAPI.NET
if you are going to send these requests frequently over the socket
GetOrderBook
Get current order book.
int id = websocketRequestClient.Market.GetOrderBook(Action<BinanceOrderBook> onData, string symbol, int limit = 100)
GetRecentTrades
Get recent trades.
int id = websocketRequestClient.Account.GetRecentTrades(Action<List<BinanceRecentTrade>> onData, string symbol, int limit = 100)
GetHistoricalTrades
Get historical trades.
int id = websocketRequestClient.Account.GetHistoricalTrades(Action<List<BinanceRecentTrade>> onData, string symbol, int fromId = -1, int limit = 100)
GetAggregateTrades
Get aggregate trades.
An aggregate trade represents one or more individual trades. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades.
int id = websocketRequestClient.Account.GetAggregateTrades(Action<List<BinanceAggregatedTrade>> onData, string symbol, int fromId = -1, DateTime startTime = default, DateTime endTime = default, int limit = 100)
GetKlines
Get klines (candlestick bars), Klines are uniquely identified by their open/close time.
int id = websocketRequestClient.Account.GetKlines(Action<List<BinanceKline>> onData, string symbol, string interval, DateTime startTime = default, DateTime endTime = default, int limit = 100)
GetUiKlines
Get klines (candlestick bars) optimized for presentation, Klines are uniquely identified by their open/close time.
int id = websocketRequestClient.Account.GetUiKlines(Action<List<BinanceKline>> onData, string symbol, string interval, DateTime startTime = default, DateTime endTime = default, int limit = 100)
GetAveragePrice
Get current average price for a symbol.
int id = websocketRequestClient.Account.GetAveragePrice(Action<BinanceAveragePrice> onData, string symbol)
Get24HrStatistics
Get 24-hour rolling window price change statistics
int id = websocketRequestClient.Account.Get24HrStatistics(Action<Binance24HourPrice> onData, string symbol, string type = FULL)
int id = websocketRequestClient.Account.Get24HrStatistics(Action<List<Binance24HourPrice>> onData, string[] symbols, string type = FULL)
GetTradingDayTicker
Price change statistics for a trading day.
int id = websocketRequestClient.Account.GetTradingDayTicker(Action<BinanceTradingDay> onData, string symbol, string type = FULL)
int id = websocketRequestClient.Account.GetTradingDayTicker(Action<List<BinanceTradingDay>> onData, string[] symbols, string type = FULL)
Get24HrWindowStatistics
Get rolling window price change statistics with a custom window.
int id = websocketRequestClient.Account.Get24HrWindowStatistics(Action<Binance24HourWindow> onData, string symbol, string windowSize = "1d", string type = FULL)
int id = websocketRequestClient.Account.Get24HrWindowStatistics(Action<List<Binance24HourWindow>> onData, string[] symbols, string windowSize = "1d", string type = FULL)
GetPriceTicker
Get the latest market price for a symbol/symbols
int id = websocketRequestClient.Account.GetPriceTicker(Action<BinancePrice> onData, string symbol)
int id = websocketRequestClient.Account.GetPriceTicker(Action<List<BinancePrice>> onData, string[] symbols)
GetOrderTickerBook
Get the current best price and quantity on the order book for a symbol/symbols
int id = websocketRequestClient.Account.GetOrderTickerBook(Action<BinanceBookPrice> onData, string symbol)
int id = websocketRequestClient.Account.GetOrderTickerBook(Action<List<BinanceBookPrice>> onData, string[] symbols)
Websocket Streams
These streams provide a constant stream of real-time data.
When you create a WebsocketStreamClient
the stream will connect automatically.
Raw WebSocket Streams
There are multiple versions of the WebsocketStreamClient
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient(); // Outputs Objects
WebsocketStreamClientRaw websocketStreamClientRaw = new WebsocketStreamClientRaw(); // Outputs Raw Stream
User Data Stream Updates
You can listen for user data updates after creating a listen key, full example below.
AuthenticationEd25519 auth = new AuthenticationEd25519("C:\\example\\ed25519_private_key.pem", api_key_ed25519);
WebsocketRequestClient websocketRequestClient = new WebsocketRequestClient(auth);
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
websocketRequestClient.Streams.GetStartUserDataStream((listenKey) =>
{
websocketStreamClient.UserDataUpdates(listenKey.CreateResultListenKey(),
(orderUpdate) =>
{
// orderUpdate
},
(accountPositionUpdate) =>
{
// accountPositionUpdate
});
});
SymbolTickerUpdates
Subscribes to ticker updates stream for a specific symbol
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.SymbolTickerUpdates()
AggregatedTradeUpdates
Subscribes to the aggregated trades update stream for the provided symbol
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.AggregatedTradeUpdates()
TradeUpdates
Subscribes to the trades update stream for the provided symbol
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.TradeUpdates()
KlineUpdates
Subscribes to the candlestick update stream for the provided symbols and intervals
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.KlineUpdates()
SymbolMiniTickerUpdates
Subscribes to mini ticker updates stream for a specific symbol or symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.SymbolMiniTickerUpdates()
AllSymbolMiniTickerUpdates
Subscribes to mini ticker updates stream for all symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.AllSymbolMiniTickerUpdates()
BookTickerUpdates
Subscribes to the book ticker update stream for the provided symbol or symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.BookTickerUpdates()
AllBookTickerUpdates
Subscribes to the book ticker update stream for all symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.AllBookTickerUpdates()
SymbolTickerUpdates
Subscribes to ticker updates stream for a specific symbol or symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.SymbolTickerUpdates()
AllSymbolTickerUpdates
Subscribes to ticker updates stream for all symbols
WebsocketStreamClient websocketStreamClient = new WebsocketStreamClient();
WebsocketStream websocketStream = websocketStreamClient.AllSymbolTickerUpdates()
Disconnect
WebsocketStream websocketStream = websocketStreamClient.TradeUpdatesRaw((message) => { Console.WriteLine(message); }, "BCHUSDT");
websocketStream.Disconnect();
Reconnect
WebsocketStream websocketStream = websocketStreamClient.TradeUpdatesRaw((message) => { Console.WriteLine(message); }, "BCHUSDT");
websocketStream.Reconnect();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- BinanceObjects (>= 1.0.7.63)
- Ed25519Signer.NET (>= 34.0.0.7)
- High_Resolution_Sleep (>= 1.1.2.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.0.42 | 0 | 5/4/2024 |