Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::spot::websocket_api::AccountApi Class Reference

#include <account_api.hpp>

Public Member Functions

 AccountApi (std::shared_ptr< common::WebsocketApi > client)
common::WebsocketApiResponse< AccountCommissionResponseResult > account_commission (const AccountCommissionParams &params) const
 Account Commission Rates (USER_DATA).
template<class CompletionToken>
auto async_account_commission (const AccountCommissionParams &params, CompletionToken &&token) const
 Asynchronous account_commission().
common::WebsocketApiResponse< std::vector< AccountRateLimitsOrdersResponseResultInner > > account_rate_limits_orders (const AccountRateLimitsOrdersParams &params={}) const
 Unfilled Order Count (USER_DATA).
template<class CompletionToken>
auto async_account_rate_limits_orders (const AccountRateLimitsOrdersParams &params, CompletionToken &&token) const
 Asynchronous account_rate_limits_orders().
common::WebsocketApiResponse< AccountStatusResponseResult > account_status (const AccountStatusParams &params={}) const
 Account information (USER_DATA).
template<class CompletionToken>
auto async_account_status (const AccountStatusParams &params, CompletionToken &&token) const
 Asynchronous account_status().
common::WebsocketApiResponse< std::vector< AllOrderListsResponseResultInner > > all_order_lists (const AllOrderListsParams &params={}) const
 Account order list history (USER_DATA).
template<class CompletionToken>
auto async_all_order_lists (const AllOrderListsParams &params, CompletionToken &&token) const
 Asynchronous all_order_lists().
common::WebsocketApiResponse< std::vector< AllOrdersResponseResultInner > > all_orders (const AllOrdersParams &params) const
 Account order history (USER_DATA).
template<class CompletionToken>
auto async_all_orders (const AllOrdersParams &params, CompletionToken &&token) const
 Asynchronous all_orders().
common::WebsocketApiResponse< std::vector< MyAllocationsResponseResultInner > > my_allocations (const MyAllocationsParams &params) const
 Account allocations (USER_DATA).
template<class CompletionToken>
auto async_my_allocations (const MyAllocationsParams &params, CompletionToken &&token) const
 Asynchronous my_allocations().
common::WebsocketApiResponse< MyFiltersResponse > my_filters (const MyFiltersParams &params) const
 Query Relevant Filters (USER_DATA).
template<class CompletionToken>
auto async_my_filters (const MyFiltersParams &params, CompletionToken &&token) const
 Asynchronous my_filters().
common::WebsocketApiResponse< std::vector< MyPreventedMatchesResponseResultInner > > my_prevented_matches (const MyPreventedMatchesParams &params) const
 Account prevented matches (USER_DATA).
template<class CompletionToken>
auto async_my_prevented_matches (const MyPreventedMatchesParams &params, CompletionToken &&token) const
 Asynchronous my_prevented_matches().
common::WebsocketApiResponse< std::vector< MyTradesResponseResultInner > > my_trades (const MyTradesParams &params) const
 Account trade history (USER_DATA).
template<class CompletionToken>
auto async_my_trades (const MyTradesParams &params, CompletionToken &&token) const
 Asynchronous my_trades().
common::WebsocketApiResponse< std::vector< OpenOrderListsStatusResponseResultInner > > open_order_lists_status (const OpenOrderListsStatusParams &params={}) const
 Current open Order lists (USER_DATA).
template<class CompletionToken>
auto async_open_order_lists_status (const OpenOrderListsStatusParams &params, CompletionToken &&token) const
 Asynchronous open_order_lists_status().
common::WebsocketApiResponse< std::vector< OpenOrdersStatusResponseResultInner > > open_orders_status (const OpenOrdersStatusParams &params={}) const
 Current open orders (USER_DATA).
template<class CompletionToken>
auto async_open_orders_status (const OpenOrdersStatusParams &params, CompletionToken &&token) const
 Asynchronous open_orders_status().
common::WebsocketApiResponse< std::vector< OrderAmendmentsResponseResultInner > > order_amendments (const OrderAmendmentsParams &params) const
 Query Order Amendments (USER_DATA).
template<class CompletionToken>
auto async_order_amendments (const OrderAmendmentsParams &params, CompletionToken &&token) const
 Asynchronous order_amendments().
common::WebsocketApiResponse< OrderListStatusResponseResult > order_list_status (const OrderListStatusParams &params={}) const
 Query Order list (USER_DATA).
template<class CompletionToken>
auto async_order_list_status (const OrderListStatusParams &params, CompletionToken &&token) const
 Asynchronous order_list_status().
common::WebsocketApiResponse< OrderStatusResponseResult > order_status (const OrderStatusParams &params) const
 Query order (USER_DATA).
template<class CompletionToken>
auto async_order_status (const OrderStatusParams &params, CompletionToken &&token) const
 Asynchronous order_status().

Constructor & Destructor Documentation

◆ AccountApi()

binance::spot::websocket_api::AccountApi::AccountApi ( std::shared_ptr< common::WebsocketApi > client)
explicit

Member Function Documentation

◆ account_commission()

common::WebsocketApiResponse< AccountCommissionResponseResult > binance::spot::websocket_api::AccountApi::account_commission ( const AccountCommissionParams & params) const
nodiscard

Account Commission Rates (USER_DATA).

account.commission.

Get current account commission rates.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-commission

◆ async_account_commission()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_account_commission ( const AccountCommissionParams & params,
CompletionToken && token ) const
inline

Asynchronous account_commission().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<AccountCommissionResponseResult>).

◆ account_rate_limits_orders()

common::WebsocketApiResponse< std::vector< AccountRateLimitsOrdersResponseResultInner > > binance::spot::websocket_api::AccountApi::account_rate_limits_orders ( const AccountRateLimitsOrdersParams & params = {}) const
nodiscard

Unfilled Order Count (USER_DATA).

account.rateLimits.orders.

Query your current unfilled order count for all intervals.

Weight(IP): 40

Security Type: USER_DATA

Notes: Data Source: Memory

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-rate-limits-orders

◆ async_account_rate_limits_orders()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_account_rate_limits_orders ( const AccountRateLimitsOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous account_rate_limits_orders().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<AccountRateLimitsOrdersResponseResultInner>>).

◆ account_status()

common::WebsocketApiResponse< AccountStatusResponseResult > binance::spot::websocket_api::AccountApi::account_status ( const AccountStatusParams & params = {}) const
nodiscard

Account information (USER_DATA).

account.status.

Query information about your account.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Memory => Database

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#account-status

◆ async_account_status()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_account_status ( const AccountStatusParams & params,
CompletionToken && token ) const
inline

Asynchronous account_status().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<AccountStatusResponseResult>).

◆ all_order_lists()

common::WebsocketApiResponse< std::vector< AllOrderListsResponseResultInner > > binance::spot::websocket_api::AccountApi::all_order_lists ( const AllOrderListsParams & params = {}) const
nodiscard

Account order list history (USER_DATA).

allOrderLists.

Query information about all your order lists, filtered by time range.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

Notes:

  • If startTime and/or endTime are specified, fromId is ignored. Order lists are filtered by transactionTime of the last order list execution status update.
  • If fromId is specified, return order lists with order list ID >= fromId.
  • If no condition is specified, the most recent order lists are returned.
  • The time between startTime and endTime can't be longer than 24 hours.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-order-lists

◆ async_all_order_lists()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_all_order_lists ( const AllOrderListsParams & params,
CompletionToken && token ) const
inline

Asynchronous all_order_lists().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<AllOrderListsResponseResultInner>>).

◆ all_orders()

common::WebsocketApiResponse< std::vector< AllOrdersResponseResultInner > > binance::spot::websocket_api::AccountApi::all_orders ( const AllOrdersParams & params) const
nodiscard

Account order history (USER_DATA).

allOrders.

Query information about all your orders – active, canceled, filled – filtered by time range.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

Notes:

  • If startTime and/or endTime are specified, orderId is ignored.

    Orders are filtered by time of the last execution status update.

  • If orderId is specified, return orders with order ID >= orderId.
  • If no condition is specified, the most recent orders are returned.
  • For some historical orders the cummulativeQuoteQty response field may be negative, meaning the data is not available at this time.
  • The time between startTime and endTime can't be longer than 24 hours.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#all-orders

◆ async_all_orders()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_all_orders ( const AllOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous all_orders().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<AllOrdersResponseResultInner>>).

◆ my_allocations()

common::WebsocketApiResponse< std::vector< MyAllocationsResponseResultInner > > binance::spot::websocket_api::AccountApi::my_allocations ( const MyAllocationsParams & params) const
nodiscard

Account allocations (USER_DATA).

myAllocations.

Retrieves allocations resulting from SOR order placement.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

Supported parameter combinations:

Parameters Response
symbol allocations from oldest to newest
symbol + startTime oldest allocations since startTime
symbol + endTime newest allocations until endTime
symbol + startTime + endTime allocations within the time range
symbol + fromAllocationId allocations by allocation ID
symbol + orderId allocations related to an order starting with

oldest | symbol + orderId + fromAllocationId | allocations related to an order by allocation ID |

Note: The time between startTime and endTime can't be longer than 24 hours.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-allocations

◆ async_my_allocations()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_my_allocations ( const MyAllocationsParams & params,
CompletionToken && token ) const
inline

Asynchronous my_allocations().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<MyAllocationsResponseResultInner>>).

◆ my_filters()

common::WebsocketApiResponse< MyFiltersResponse > binance::spot::websocket_api::AccountApi::my_filters ( const MyFiltersParams & params) const
nodiscard

Query Relevant Filters (USER_DATA).

myFilters.

Retrieves the list of filters relevant to an account on a given symbol. This is the only method that shows if an account has MAX_ASSET filters applied to it.

Weight(IP): 40

Security Type: USER_DATA

Notes: Data Source: Memory

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-filters

◆ async_my_filters()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_my_filters ( const MyFiltersParams & params,
CompletionToken && token ) const
inline

Asynchronous my_filters().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<MyFiltersResponse>).

◆ my_prevented_matches()

common::WebsocketApiResponse< std::vector< MyPreventedMatchesResponseResultInner > > binance::spot::websocket_api::AccountApi::my_prevented_matches ( const MyPreventedMatchesParams & params) const
nodiscard

Account prevented matches (USER_DATA).

myPreventedMatches.

Displays the list of orders that were expired due to STP.

These are the combinations supported:

  • symbol + preventedMatchId
  • symbol + orderId
  • symbol + orderId + fromPreventedMatchId (limit will default to 500)
  • symbol + orderId + fromPreventedMatchId + limit
Weight: Case Weight
If symbol is invalid 2
Querying by preventedMatchId 2
Querying by orderId 20

Security Type: USER_DATA

Notes: Data Source: Database

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-prevented-matches

◆ async_my_prevented_matches()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_my_prevented_matches ( const MyPreventedMatchesParams & params,
CompletionToken && token ) const
inline

Asynchronous my_prevented_matches().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<MyPreventedMatchesResponseResultInner>>).

◆ my_trades()

common::WebsocketApiResponse< std::vector< MyTradesResponseResultInner > > binance::spot::websocket_api::AccountApi::my_trades ( const MyTradesParams & params) const
nodiscard

Account trade history (USER_DATA).

myTrades.

Query information about all your trades, filtered by time range.

Weight: Condition Weight
Without orderId 20
With orderId 5

Security Type: USER_DATA

Notes: Data Source: Memory => Database

Notes:

  • If fromId is specified, return trades with trade ID >= fromId.
  • If startTime and/or endTime are specified, trades are filtered by execution time (time).
  • fromId cannot be used together with startTime and endTime.
  • If orderId is specified, only trades related to that order are returned.
  • startTime and endTime cannot be used together with orderId.
  • If no condition is specified, the most recent trades are returned.
  • The time between startTime and endTime can't be longer than 24 hours.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-trades

◆ async_my_trades()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_my_trades ( const MyTradesParams & params,
CompletionToken && token ) const
inline

Asynchronous my_trades().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<MyTradesResponseResultInner>>).

◆ open_order_lists_status()

common::WebsocketApiResponse< std::vector< OpenOrderListsStatusResponseResultInner > > binance::spot::websocket_api::AccountApi::open_order_lists_status ( const OpenOrderListsStatusParams & params = {}) const
nodiscard

Current open Order lists (USER_DATA).

openOrderLists.status.

Query execution status of all open order lists.

If you need to continuously monitor order status updates, please consider using WebSocket Streams:

  • userDataStream.subscribe if on an authenticated session
  • userDataStream.subscribe.signature if subscribing through signature subscription

Weight(IP): 6

Security Type: USER_DATA

Notes: Data Source: Memory -> Database

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-order-lists-status

◆ async_open_order_lists_status()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_open_order_lists_status ( const OpenOrderListsStatusParams & params,
CompletionToken && token ) const
inline

Asynchronous open_order_lists_status().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<OpenOrderListsStatusResponseResultInner>>).

◆ open_orders_status()

common::WebsocketApiResponse< std::vector< OpenOrdersStatusResponseResultInner > > binance::spot::websocket_api::AccountApi::open_orders_status ( const OpenOrdersStatusParams & params = {}) const
nodiscard

Current open orders (USER_DATA).

openOrders.status.

Query execution status of all open orders.

If you need to continuously monitor order status updates, please consider using WebSocket Streams:

  • userDataStream.subscribe if on an authenticated session
  • userDataStream.subscribe.signature if subscribing through signature subscription

Weight: | Parameter | Weight | | ------— | ---— | | symbol | 6 | | none | 80 |

Security Type: USER_DATA

Notes: Data Source: Memory => Database

Response Notes: Note: The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-orders-status

◆ async_open_orders_status()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_open_orders_status ( const OpenOrdersStatusParams & params,
CompletionToken && token ) const
inline

Asynchronous open_orders_status().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<OpenOrdersStatusResponseResultInner>>).

◆ order_amendments()

common::WebsocketApiResponse< std::vector< OrderAmendmentsResponseResultInner > > binance::spot::websocket_api::AccountApi::order_amendments ( const OrderAmendmentsParams & params) const
nodiscard

Query Order Amendments (USER_DATA).

order.amendments.

Queries all amendments of a single order.

Weight(IP): 4

Security Type: USER_DATA

Notes: Data Source: Database

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-amendments

◆ async_order_amendments()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_order_amendments ( const OrderAmendmentsParams & params,
CompletionToken && token ) const
inline

Asynchronous order_amendments().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<std::vector<OrderAmendmentsResponseResultInner>>).

◆ order_list_status()

common::WebsocketApiResponse< OrderListStatusResponseResult > binance::spot::websocket_api::AccountApi::order_list_status ( const OrderListStatusParams & params = {}) const
nodiscard

Query Order list (USER_DATA).

orderList.status.

Check execution status of an Order list.

For execution status of individual orders, use order.status.

Weight(IP): 4

Security Type: USER_DATA

Notes: Data Source: Database

Notes:

  • origClientOrderId refers to listClientOrderId of the order list itself.
  • If both origClientOrderId and orderListId parameters are specified, only origClientOrderId is used and orderListId is ignored.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-list-status

◆ async_order_list_status()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_order_list_status ( const OrderListStatusParams & params,
CompletionToken && token ) const
inline

Asynchronous order_list_status().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<OrderListStatusResponseResult>).

◆ order_status()

common::WebsocketApiResponse< OrderStatusResponseResult > binance::spot::websocket_api::AccountApi::order_status ( const OrderStatusParams & params) const
nodiscard

Query order (USER_DATA).

order.status.

Check execution status of an order.

Weight(IP): 4

Security Type: USER_DATA

Notes: Data Source: Memory => Database

Notes:

  • If both orderId and origClientOrderId are provided, the orderId is searched first, then the origClientOrderId from that result is checked against that order. If both conditions are not met the request will be rejected.
  • For some historical orders the cummulativeQuoteQty response field may be negative, meaning the data is not available at this time.

Response Notes: Note: The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses.

See https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-status

◆ async_order_status()

template<class CompletionToken>
auto binance::spot::websocket_api::AccountApi::async_order_status ( const OrderStatusParams & params,
CompletionToken && token ) const
inline

Asynchronous order_status().

Completes with void(std::exception_ptr, common::WebsocketApiResponse<OrderStatusResponseResult>).