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

#include <account_api.hpp>

Public Member Functions

 AccountApi (std::shared_ptr< common::RestClient > client)
common::RestApiResponse< AccountCommissionResponse > account_commission (const AccountCommissionParams &params) const
 Query Commission Rates (USER_DATA).
template<class CompletionToken>
auto async_account_commission (const AccountCommissionParams &params, CompletionToken &&token) const
 Asynchronous account_commission().
common::RestApiResponse< std::vector< AllOrderListResponseInner > > all_order_list (const AllOrderListParams &params={}) const
 Query all Order lists (USER_DATA).
template<class CompletionToken>
auto async_all_order_list (const AllOrderListParams &params, CompletionToken &&token) const
 Asynchronous all_order_list().
common::RestApiResponse< std::vector< AllOrdersResponseInner > > all_orders (const AllOrdersParams &params) const
 All orders (USER_DATA).
template<class CompletionToken>
auto async_all_orders (const AllOrdersParams &params, CompletionToken &&token) const
 Asynchronous all_orders().
common::RestApiResponse< GetAccountResponse > get_account (const GetAccountParams &params={}) const
 Account information (USER_DATA).
template<class CompletionToken>
auto async_get_account (const GetAccountParams &params, CompletionToken &&token) const
 Asynchronous get_account().
common::RestApiResponse< std::vector< GetOpenOrdersResponseInner > > get_open_orders (const GetOpenOrdersParams &params={}) const
 Current open orders (USER_DATA).
template<class CompletionToken>
auto async_get_open_orders (const GetOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous get_open_orders().
common::RestApiResponse< GetOrderResponse > get_order (const GetOrderParams &params) const
 Query order (USER_DATA).
template<class CompletionToken>
auto async_get_order (const GetOrderParams &params, CompletionToken &&token) const
 Asynchronous get_order().
common::RestApiResponse< GetOrderListResponse > get_order_list (const GetOrderListParams &params={}) const
 Query Order list (USER_DATA).
template<class CompletionToken>
auto async_get_order_list (const GetOrderListParams &params, CompletionToken &&token) const
 Asynchronous get_order_list().
common::RestApiResponse< std::vector< MyAllocationsResponseInner > > my_allocations (const MyAllocationsParams &params) const
 Query Allocations (USER_DATA).
template<class CompletionToken>
auto async_my_allocations (const MyAllocationsParams &params, CompletionToken &&token) const
 Asynchronous my_allocations().
common::RestApiResponse< 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::RestApiResponse< std::vector< MyPreventedMatchesResponseInner > > my_prevented_matches (const MyPreventedMatchesParams &params) const
 Query Prevented Matches (USER_DATA).
template<class CompletionToken>
auto async_my_prevented_matches (const MyPreventedMatchesParams &params, CompletionToken &&token) const
 Asynchronous my_prevented_matches().
common::RestApiResponse< std::vector< MyTradesResponseInner > > my_trades (const MyTradesParams &params) const
 Account trade list (USER_DATA).
template<class CompletionToken>
auto async_my_trades (const MyTradesParams &params, CompletionToken &&token) const
 Asynchronous my_trades().
common::RestApiResponse< std::vector< OpenOrderListResponseInner > > open_order_list (const OpenOrderListParams &params={}) const
 Query Open Order lists (USER_DATA).
template<class CompletionToken>
auto async_open_order_list (const OpenOrderListParams &params, CompletionToken &&token) const
 Asynchronous open_order_list().
common::RestApiResponse< std::vector< OrderAmendmentsResponseInner > > 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::RestApiResponse< std::vector< RateLimitOrderResponseInner > > rate_limit_order (const RateLimitOrderParams &params={}) const
 Query Unfilled Order Count (USER_DATA).
template<class CompletionToken>
auto async_rate_limit_order (const RateLimitOrderParams &params, CompletionToken &&token) const
 Asynchronous rate_limit_order().

Constructor & Destructor Documentation

◆ AccountApi()

binance::spot::rest_api::AccountApi::AccountApi ( std::shared_ptr< common::RestClient > client)
explicit

Member Function Documentation

◆ account_commission()

common::RestApiResponse< AccountCommissionResponse > binance::spot::rest_api::AccountApi::account_commission ( const AccountCommissionParams & params) const
nodiscard

Query Commission Rates (USER_DATA).

GET /api/v3/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/rest-api/account#account-commission

◆ async_account_commission()

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

Asynchronous account_commission().

Completes with void(std::exception_ptr, common::RestApiResponse<AccountCommissionResponse>).

◆ all_order_list()

common::RestApiResponse< std::vector< AllOrderListResponseInner > > binance::spot::rest_api::AccountApi::all_order_list ( const AllOrderListParams & params = {}) const
nodiscard

Query all Order lists (USER_DATA).

GET /api/v3/allOrderList.

Retrieves all order lists based on provided optional parameters.

Note that the time between startTime and endTime can't be longer than 24 hours.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

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

◆ async_all_order_list()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_all_order_list ( const AllOrderListParams & params,
CompletionToken && token ) const
inline

Asynchronous all_order_list().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<AllOrderListResponseInner>>).

◆ all_orders()

common::RestApiResponse< std::vector< AllOrdersResponseInner > > binance::spot::rest_api::AccountApi::all_orders ( const AllOrdersParams & params) const
nodiscard

All orders (USER_DATA).

GET /api/v3/allOrders.

Get all account orders; active, canceled, or filled.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database

  • If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
  • For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
  • If startTime and/or endTime provided, orderId is not required.
  • The time between startTime and endTime can't be longer than 24 hours.

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/rest-api/account#all-orders

◆ async_all_orders()

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

Asynchronous all_orders().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<AllOrdersResponseInner>>).

◆ get_account()

common::RestApiResponse< GetAccountResponse > binance::spot::rest_api::AccountApi::get_account ( const GetAccountParams & params = {}) const
nodiscard

Account information (USER_DATA).

GET /api/v3/account.

Get current account information.

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/rest-api/account#get-account

◆ async_get_account()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_get_account ( const GetAccountParams & params,
CompletionToken && token ) const
inline

Asynchronous get_account().

Completes with void(std::exception_ptr, common::RestApiResponse<GetAccountResponse>).

◆ get_open_orders()

common::RestApiResponse< std::vector< GetOpenOrdersResponseInner > > binance::spot::rest_api::AccountApi::get_open_orders ( const GetOpenOrdersParams & params = {}) const
nodiscard

Current open orders (USER_DATA).

GET /api/v3/openOrders.

Get all open orders on a symbol. Careful when accessing this with no symbol.

Weight: 6 for a single symbol; 80 when the symbol parameter is omitted

Security Type: USER_DATA

Notes: Data Source: Memory => Database

  • If the symbol is not sent, orders for all symbols will be returned in an array.

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/rest-api/account#get-open-orders

◆ async_get_open_orders()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_get_open_orders ( const GetOpenOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous get_open_orders().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<GetOpenOrdersResponseInner>>).

◆ get_order()

common::RestApiResponse< GetOrderResponse > binance::spot::rest_api::AccountApi::get_order ( const GetOrderParams & params) const
nodiscard

Query order (USER_DATA).

GET /api/v3/order.

Check an order's status.

Weight(IP): 4

Security Type: USER_DATA

Notes: Data Source: Memory => Database

  • Either orderId or origClientOrderId must be sent.
  • 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 cummulativeQuoteQty will be < 0, 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/rest-api/account#get-order

◆ async_get_order()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_get_order ( const GetOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous get_order().

Completes with void(std::exception_ptr, common::RestApiResponse<GetOrderResponse>).

◆ get_order_list()

common::RestApiResponse< GetOrderListResponse > binance::spot::rest_api::AccountApi::get_order_list ( const GetOrderListParams & params = {}) const
nodiscard

Query Order list (USER_DATA).

GET /api/v3/orderList.

Retrieves a specific order list based on provided optional parameters.

Weight(IP): 4

Security Type: USER_DATA

Notes: Data Source: Database

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

◆ async_get_order_list()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_get_order_list ( const GetOrderListParams & params,
CompletionToken && token ) const
inline

Asynchronous get_order_list().

Completes with void(std::exception_ptr, common::RestApiResponse<GetOrderListResponse>).

◆ my_allocations()

common::RestApiResponse< std::vector< MyAllocationsResponseInner > > binance::spot::rest_api::AccountApi::my_allocations ( const MyAllocationsParams & params) const
nodiscard

Query Allocations (USER_DATA).

GET /api/v3/myAllocations.

Retrieves allocations resulting from SOR order placement.

Weight(IP): 20

Security Type: USER_DATA

Notes: Data Source: Database" Supported parameter combinations: <table class="markdownTable"> <tr class="markdownTableHead"> <th class="markdownTableHeadNone"> 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/rest-api/account#my-allocations

◆ async_my_allocations()

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

Asynchronous my_allocations().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<MyAllocationsResponseInner>>).

◆ my_filters()

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

Query relevant filters (USER_DATA).

GET /api/v3/myFilters.

Retrieves the list of filters relevant to an account on a given symbol. This is the only endpoint 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/rest-api/account#my-filters

◆ async_my_filters()

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

Asynchronous my_filters().

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

◆ my_prevented_matches()

common::RestApiResponse< std::vector< MyPreventedMatchesResponseInner > > binance::spot::rest_api::AccountApi::my_prevented_matches ( const MyPreventedMatchesParams & params) const
nodiscard

Query Prevented Matches (USER_DATA).

GET /api/v3/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/rest-api/account#my-prevented-matches

◆ async_my_prevented_matches()

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

Asynchronous my_prevented_matches().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<MyPreventedMatchesResponseInner>>).

◆ my_trades()

common::RestApiResponse< std::vector< MyTradesResponseInner > > binance::spot::rest_api::AccountApi::my_trades ( const MyTradesParams & params) const
nodiscard

Account trade list (USER_DATA).

GET /api/v3/myTrades.

Get trades for a specific account and symbol.

Weight: Condition Weight
Without orderId 20
With orderId 5

Security Type: USER_DATA

Notes: Data Source: Memory => Database

Notes::

  • If fromId is set, it will get trades >= that fromId. Otherwise most recent trades are returned.
  • The time between startTime and endTime can't be longer than 24 hours.
  • These are the supported combinations of all parameters:
    • symbol
    • symbol + orderId
    • symbol + startTime
    • symbol + endTime
    • symbol + fromId
    • symbol + startTime + endTime
    • symbol+ orderId + fromId

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

◆ async_my_trades()

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

Asynchronous my_trades().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<MyTradesResponseInner>>).

◆ open_order_list()

common::RestApiResponse< std::vector< OpenOrderListResponseInner > > binance::spot::rest_api::AccountApi::open_order_list ( const OpenOrderListParams & params = {}) const
nodiscard

Query Open Order lists (USER_DATA).

GET /api/v3/openOrderList.

Query Open Order lists

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/rest-api/account#open-order-list

◆ async_open_order_list()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_open_order_list ( const OpenOrderListParams & params,
CompletionToken && token ) const
inline

Asynchronous open_order_list().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<OpenOrderListResponseInner>>).

◆ order_amendments()

common::RestApiResponse< std::vector< OrderAmendmentsResponseInner > > binance::spot::rest_api::AccountApi::order_amendments ( const OrderAmendmentsParams & params) const
nodiscard

Query Order Amendments (USER_DATA).

GET /api/v3/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/rest-api/account#order-amendments

◆ async_order_amendments()

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

Asynchronous order_amendments().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<OrderAmendmentsResponseInner>>).

◆ rate_limit_order()

common::RestApiResponse< std::vector< RateLimitOrderResponseInner > > binance::spot::rest_api::AccountApi::rate_limit_order ( const RateLimitOrderParams & params = {}) const
nodiscard

Query Unfilled Order Count (USER_DATA).

GET /api/v3/rateLimit/order.

Displays the user's 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/rest-api/account#rate-limit-order

◆ async_rate_limit_order()

template<class CompletionToken>
auto binance::spot::rest_api::AccountApi::async_rate_limit_order ( const RateLimitOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous rate_limit_order().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<RateLimitOrderResponseInner>>).