|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
Each method subscribes to one stream (or queues the subscription while the connection reconnects) and returns its handle. More...
#include <api.hpp>
Each method subscribes to one stream (or queues the subscription while the connection reconnects) and returns its handle.
Destroying the handle, or calling unsubscribe() on it, ends the subscription.
|
explicit |
|
nodiscard |
Aggregate Trade Streams.
<symbol>@aggTrade.
The Aggregate Trade Streams push trade information that is aggregated for a single taker order.
Update Speed: Real-time
See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#agg-trade
|
nodiscard |
All Market Rolling Window Statistics Streams.
!ticker_<windowSize>@arr.
Rolling window ticker statistics for all market symbols, computed over multiple windows.
Note that only tickers that have changed will be present in the array.
Update Speed: 1000ms
|
nodiscard |
All Market Mini Tickers Stream.
!miniTicker@arr.
24hr rolling window mini-ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array.
Update Speed: 1000ms
|
nodiscard |
Average Price.
<symbol>@avgPrice.
Average price streams push changes in the average price over a fixed time interval.
Update Speed: 1000ms
See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#avg-price
|
nodiscard |
Block Trade Streams.
<symbol>@blockTrade.
Block Trade Streams push block trade information in real-time.
Update Speed: Real-time
|
nodiscard |
Individual Symbol Book Ticker Streams.
<symbol>@bookTicker.
Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
Multiple <symbol>@bookTicker streams can be subscribed to over one connection.
Update Speed: Real-time
|
nodiscard |
Diff.
Depth Stream
<symbol>@depth@<updateSpeed>.
Order book price and quantity depth updates used to locally manage an order book.
Update Speed: 1000ms or 100ms
|
nodiscard |
Kline/Candlestick Streams for UTC.
<symbol>@kline_<interval>.
The Kline/Candlestick Stream push updates to the current klines/candlestick every second in UTC+0 timezone
Update Speed: 1000ms for 1s, 2000ms for the other intervals
See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline
|
nodiscard |
Kline/Candlestick Streams with timezone offset.
<symbol>@kline_<interval>@+08:00.
The Kline/Candlestick Stream push updates to the current klines/candlestick every second in UTC+8 timezone
Kline/Candlestick chart intervals:
Supported intervals: See Kline/Candlestick chart intervals
UTC+8 timezone offset:
Update Speed: 1000ms for 1s, 2000ms for the other intervals
|
nodiscard |
Individual Symbol Mini Ticker Stream.
<symbol>@miniTicker.
24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Update Speed: 1000ms
|
nodiscard |
Partial Book Depth Streams.
<symbol>@depth<levels>@<updateSpeed>.
Top **<levels>** bids and asks, pushed every second. Valid **<levels>** are 5, 10, or 20.
Update Speed: 1000ms or 100ms
|
nodiscard |
Reference Price Streams.
<symbol>@referencePrice.
Reference price stream for a symbol.
Update Speed: 1000ms
|
nodiscard |
Individual Symbol Rolling Window Statistics Streams.
<symbol>@ticker_<windowSize>.
Rolling window ticker statistics for a single symbol, computed over multiple windows.
Note: This stream is different from the <symbol>@ticker stream. The open time "O" always starts on a minute, while the closing time "C" is the current time of the update. As such, the effective window might be up to 59999ms wider than <windowSize>.
Update Speed: 1000ms
|
nodiscard |
Individual Symbol Ticker Streams.
<symbol>@ticker.
24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Update Speed: 1000ms
See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#ticker
|
nodiscard |
Trade Streams.
<symbol>@trade.
The Trade Streams push raw trade information; each trade has a unique buyer and seller.
Update Speed: Real-time
See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#trade