Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::alpha::websocket_streams::Api Class Reference

Each method subscribes to one stream (or queues the subscription while the connection reconnects) and returns its handle. More...

#include <api.hpp>

Public Member Functions

 Api (std::shared_ptr< common::WebsocketStreams > client)
common::WebsocketStream< AggregateTradeStreamResponse > aggregate_trade_stream (const AggregateTradeStreamParams &params) const
 Aggregate Trade Stream.
common::WebsocketStream< AllBookTickerStreamResponse > all_book_ticker_stream (const AllBookTickerStreamParams &params={}) const
 All Book Ticker Stream.
common::WebsocketStream< AllMiniTickerStreamResponse > all_mini_ticker_stream (const AllMiniTickerStreamParams &params={}) const
 All Mini Ticker Stream.
common::WebsocketStream< AllTickerStreamResponse > all_ticker_stream (const AllTickerStreamParams &params={}) const
 All Ticker Stream.
common::WebsocketStream< AllTokens24hTickerStreamResponse > all_tokens24h_ticker_stream (const AllTokens24hTickerStreamParams &params={}) const
 All Tokens 24h Ticker Stream.
common::WebsocketStream< BookTickerStreamResponse > book_ticker_stream (const BookTickerStreamParams &params) const
 Book Ticker Stream.
common::WebsocketStream< ContractKlineStreamResponse > contract_kline_stream (const ContractKlineStreamParams &params) const
 Contract Kline Stream.
common::WebsocketStream< FullDepthStreamResponse > full_depth_stream (const FullDepthStreamParams &params) const
 Full Depth Stream.
common::WebsocketStream< KlineStreamResponse > kline_stream (const KlineStreamParams &params) const
 Kline Stream.
common::WebsocketStream< MiniTickerStreamResponse > mini_ticker_stream (const MiniTickerStreamParams &params) const
 Mini Ticker Stream.
common::WebsocketStream< PartialDepthStreamResponse > partial_depth_stream (const PartialDepthStreamParams &params) const
 Partial Depth Stream.
common::WebsocketStream< TickerStreamResponse > ticker_stream (const TickerStreamParams &params) const
 Ticker Stream.
common::WebsocketStream< TradeStreamResponse > trade_stream (const TradeStreamParams &params) const
 Trade Stream.

Detailed Description

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.

Constructor & Destructor Documentation

◆ Api()

binance::alpha::websocket_streams::Api::Api ( std::shared_ptr< common::WebsocketStreams > client)
explicit

Member Function Documentation

◆ aggregate_trade_stream()

common::WebsocketStream< AggregateTradeStreamResponse > binance::alpha::websocket_streams::Api::aggregate_trade_stream ( const AggregateTradeStreamParams & params) const
nodiscard

Aggregate Trade Stream.

<symbol>@aggTrade.

Pushes aggregate trade updates for a symbol.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#aggregate-trade-stream

◆ all_book_ticker_stream()

common::WebsocketStream< AllBookTickerStreamResponse > binance::alpha::websocket_streams::Api::all_book_ticker_stream ( const AllBookTickerStreamParams & params = {}) const
nodiscard

All Book Ticker Stream.

!bookTicker.

Pushes best bid/ask updates for all symbols.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-book-ticker-stream

◆ all_mini_ticker_stream()

common::WebsocketStream< AllMiniTickerStreamResponse > binance::alpha::websocket_streams::Api::all_mini_ticker_stream ( const AllMiniTickerStreamParams & params = {}) const
nodiscard

All Mini Ticker Stream.

!miniTicker@arr.

Pushes mini ticker statistics for all symbols.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-mini-ticker-stream

◆ all_ticker_stream()

common::WebsocketStream< AllTickerStreamResponse > binance::alpha::websocket_streams::Api::all_ticker_stream ( const AllTickerStreamParams & params = {}) const
nodiscard

All Ticker Stream.

!ticker@arr.

Pushes full ticker statistics for all symbols.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-ticker-stream

◆ all_tokens24h_ticker_stream()

common::WebsocketStream< AllTokens24hTickerStreamResponse > binance::alpha::websocket_streams::Api::all_tokens24h_ticker_stream ( const AllTokens24hTickerStreamParams & params = {}) const
nodiscard

All Tokens 24h Ticker Stream.

came@allTokens@ticker24.

Pushes 24h ticker-like metrics for all tokens.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#all-tokens24h-ticker-stream

◆ book_ticker_stream()

common::WebsocketStream< BookTickerStreamResponse > binance::alpha::websocket_streams::Api::book_ticker_stream ( const BookTickerStreamParams & params) const
nodiscard

Book Ticker Stream.

<symbol>@bookTicker.

Pushes best bid/ask updates for a symbol.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#book-ticker-stream

◆ contract_kline_stream()

common::WebsocketStream< ContractKlineStreamResponse > binance::alpha::websocket_streams::Api::contract_kline_stream ( const ContractKlineStreamParams & params) const
nodiscard

Contract Kline Stream.

came@<contractAddress>@<chainId>@kline_<interval>.

Pushes kline updates by contractAddress@chainId.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#contract-kline-stream

◆ full_depth_stream()

common::WebsocketStream< FullDepthStreamResponse > binance::alpha::websocket_streams::Api::full_depth_stream ( const FullDepthStreamParams & params) const
nodiscard

Full Depth Stream.

<symbol>@fulldepth@<interval>.

Returns all available depth, including UI and API orders.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#full-depth-stream

◆ kline_stream()

common::WebsocketStream< KlineStreamResponse > binance::alpha::websocket_streams::Api::kline_stream ( const KlineStreamParams & params) const
nodiscard

Kline Stream.

<symbol>@kline_<interval>.

Pushes kline updates for a symbol.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#kline-stream

◆ mini_ticker_stream()

common::WebsocketStream< MiniTickerStreamResponse > binance::alpha::websocket_streams::Api::mini_ticker_stream ( const MiniTickerStreamParams & params) const
nodiscard

Mini Ticker Stream.

<symbol>@miniTicker.

Pushes 24h rolling mini ticker statistics.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#mini-ticker-stream

◆ partial_depth_stream()

common::WebsocketStream< PartialDepthStreamResponse > binance::alpha::websocket_streams::Api::partial_depth_stream ( const PartialDepthStreamParams & params) const
nodiscard

Partial Depth Stream.

<symbol>@depth<levels>@<interval>.

Pushes partial depth updates (UI orders only).

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#partial-depth-stream

◆ ticker_stream()

common::WebsocketStream< TickerStreamResponse > binance::alpha::websocket_streams::Api::ticker_stream ( const TickerStreamParams & params) const
nodiscard

Ticker Stream.

<symbol>@ticker.

Pushes full 24h rolling ticker statistics.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#ticker-stream

◆ trade_stream()

common::WebsocketStream< TradeStreamResponse > binance::alpha::websocket_streams::Api::trade_stream ( const TradeStreamParams & params) const
nodiscard

Trade Stream.

<symbol>@trade.

Pushes raw trade updates for a symbol.

See https://developers.binance.com/en/docs/catalog/advanced-trading-alpha-trading/api/ws-streams/~#trade-stream