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

#include <capital_api.hpp>

Public Member Functions

 CapitalApi (std::shared_ptr< common::RestClient > client)
common::RestApiResponse< std::vector< AllCoinsInformationResponseInner > > all_coins_information (const AllCoinsInformationParams &params={}) const
 All Coins' Information (USER_DATA).
template<class CompletionToken>
auto async_all_coins_information (const AllCoinsInformationParams &params, CompletionToken &&token) const
 Asynchronous all_coins_information().
common::RestApiResponse< DepositAddressResponse > deposit_address (const DepositAddressParams &params) const
 Deposit Address(supporting network) (USER_DATA).
template<class CompletionToken>
auto async_deposit_address (const DepositAddressParams &params, CompletionToken &&token) const
 Asynchronous deposit_address().
common::RestApiResponse< std::vector< DepositHistoryResponseInner > > deposit_history (const DepositHistoryParams &params={}) const
 Deposit History (supporting network) (USER_DATA).
template<class CompletionToken>
auto async_deposit_history (const DepositHistoryParams &params, CompletionToken &&token) const
 Asynchronous deposit_history().
common::RestApiResponse< std::vector< FetchDepositAddressListWithNetworkResponseInner > > fetch_deposit_address_list_with_network (const FetchDepositAddressListWithNetworkParams &params) const
 Fetch deposit address list with network (USER_DATA).
template<class CompletionToken>
auto async_fetch_deposit_address_list_with_network (const FetchDepositAddressListWithNetworkParams &params, CompletionToken &&token) const
 Asynchronous fetch_deposit_address_list_with_network().
common::RestApiResponse< std::vector< FetchWithdrawAddressListResponseInner > > fetch_withdraw_address_list () const
 Fetch withdraw address list (USER_DATA).
template<class CompletionToken>
auto async_fetch_withdraw_address_list (CompletionToken &&token) const
 Asynchronous fetch_withdraw_address_list().
common::RestApiResponse< FetchWithdrawQuotaResponse > fetch_withdraw_quota () const
 Fetch withdraw quota (USER_DATA).
template<class CompletionToken>
auto async_fetch_withdraw_quota (CompletionToken &&token) const
 Asynchronous fetch_withdraw_quota().
common::RestApiResponse< OneClickArrivalDepositApplyResponse > one_click_arrival_deposit_apply (const OneClickArrivalDepositApplyParams &params={}) const
 One click arrival deposit apply (for expired address deposit) (USER_DATA).
template<class CompletionToken>
auto async_one_click_arrival_deposit_apply (const OneClickArrivalDepositApplyParams &params, CompletionToken &&token) const
 Asynchronous one_click_arrival_deposit_apply().
common::RestApiResponse< WithdrawResponse > withdraw (const WithdrawParams &params) const
 Withdraw (USER_DATA).
template<class CompletionToken>
auto async_withdraw (const WithdrawParams &params, CompletionToken &&token) const
 Asynchronous withdraw().
common::RestApiResponse< std::vector< WithdrawHistoryResponseInner > > withdraw_history (const WithdrawHistoryParams &params={}) const
 Withdraw History (supporting network) (USER_DATA).
template<class CompletionToken>
auto async_withdraw_history (const WithdrawHistoryParams &params, CompletionToken &&token) const
 Asynchronous withdraw_history().

Constructor & Destructor Documentation

◆ CapitalApi()

binance::wallet::rest_api::CapitalApi::CapitalApi ( std::shared_ptr< common::RestClient > client)
explicit

Member Function Documentation

◆ all_coins_information()

common::RestApiResponse< std::vector< AllCoinsInformationResponseInner > > binance::wallet::rest_api::CapitalApi::all_coins_information ( const AllCoinsInformationParams & params = {}) const
nodiscard

All Coins' Information (USER_DATA).

GET /sapi/v1/capital/config/getall.

Get information of coins (available for deposit and withdraw) for user.

Weight(IP): 10

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#all-coins-information

◆ async_all_coins_information()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_all_coins_information ( const AllCoinsInformationParams & params,
CompletionToken && token ) const
inline

Asynchronous all_coins_information().

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

◆ deposit_address()

common::RestApiResponse< DepositAddressResponse > binance::wallet::rest_api::CapitalApi::deposit_address ( const DepositAddressParams & params) const
nodiscard

Deposit Address(supporting network) (USER_DATA).

GET /sapi/v1/capital/deposit/address.

Fetch deposit address with network.

Weight(IP): 10

Security Type: USER_DATA

Notes:

  • If network is not send, return with default network of the coin.
  • You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
  • amount needs to be sent if using LIGHTNING network

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#deposit-address

◆ async_deposit_address()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_deposit_address ( const DepositAddressParams & params,
CompletionToken && token ) const
inline

Asynchronous deposit_address().

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

◆ deposit_history()

common::RestApiResponse< std::vector< DepositHistoryResponseInner > > binance::wallet::rest_api::CapitalApi::deposit_history ( const DepositHistoryParams & params = {}) const
nodiscard

Deposit History (supporting network) (USER_DATA).

GET /sapi/v1/capital/deposit/hisrec.

Fetch deposit history.

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
  • If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#deposit-history

◆ async_deposit_history()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_deposit_history ( const DepositHistoryParams & params,
CompletionToken && token ) const
inline

Asynchronous deposit_history().

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

◆ fetch_deposit_address_list_with_network()

common::RestApiResponse< std::vector< FetchDepositAddressListWithNetworkResponseInner > > binance::wallet::rest_api::CapitalApi::fetch_deposit_address_list_with_network ( const FetchDepositAddressListWithNetworkParams & params) const
nodiscard

Fetch deposit address list with network (USER_DATA).

GET /sapi/v1/capital/deposit/address/list.

Fetch deposit address list with network.

Weight(IP): 10

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-deposit-address-list-with-network

◆ async_fetch_deposit_address_list_with_network()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_fetch_deposit_address_list_with_network ( const FetchDepositAddressListWithNetworkParams & params,
CompletionToken && token ) const
inline

Asynchronous fetch_deposit_address_list_with_network().

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

◆ fetch_withdraw_address_list()

common::RestApiResponse< std::vector< FetchWithdrawAddressListResponseInner > > binance::wallet::rest_api::CapitalApi::fetch_withdraw_address_list ( ) const
nodiscard

Fetch withdraw address list (USER_DATA).

GET /sapi/v1/capital/withdraw/address/list.

Fetch withdraw address list

Weight(IP): 10

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-address-list

◆ async_fetch_withdraw_address_list()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_fetch_withdraw_address_list ( CompletionToken && token) const
inline

Asynchronous fetch_withdraw_address_list().

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

◆ fetch_withdraw_quota()

common::RestApiResponse< FetchWithdrawQuotaResponse > binance::wallet::rest_api::CapitalApi::fetch_withdraw_quota ( ) const
nodiscard

Fetch withdraw quota (USER_DATA).

GET /sapi/v1/capital/withdraw/quota.

Fetch withdraw quota

Weight(IP): 10

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#fetch-withdraw-quota

◆ async_fetch_withdraw_quota()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_fetch_withdraw_quota ( CompletionToken && token) const
inline

Asynchronous fetch_withdraw_quota().

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

◆ one_click_arrival_deposit_apply()

common::RestApiResponse< OneClickArrivalDepositApplyResponse > binance::wallet::rest_api::CapitalApi::one_click_arrival_deposit_apply ( const OneClickArrivalDepositApplyParams & params = {}) const
nodiscard

One click arrival deposit apply (for expired address deposit) (USER_DATA).

POST /sapi/v1/capital/deposit/credit-apply.

Apply deposit credit for expired address (One click arrival)

Weight(IP): 1

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#one-click-arrival-deposit-apply

◆ async_one_click_arrival_deposit_apply()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_one_click_arrival_deposit_apply ( const OneClickArrivalDepositApplyParams & params,
CompletionToken && token ) const
inline

Asynchronous one_click_arrival_deposit_apply().

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

◆ withdraw()

common::RestApiResponse< WithdrawResponse > binance::wallet::rest_api::CapitalApi::withdraw ( const WithdrawParams & params) const
nodiscard

Withdraw (USER_DATA).

POST /sapi/v1/capital/withdraw/apply.

Submit a withdraw request

Weight(UID): 900

Security Type: USER_DATA

Notes:

  • If network not send, return with default network of the coin.
  • You can get network and isDefault in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
  • To check if travel rule is required, by using GET /sapi/v1/localentity/questionnaire-requirements and if it returns anything other than NIL you will need update SAPI to POST /sapi/v1/localentity/withdraw/apply else you can continue POST /sapi/v1/capital/withdraw/apply. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
  • "For networks that do not support memo/tag, submitting a withdrawal request with a non-empty <tt>addressTag</tt> will return error <tt>-4106 TAG_NOT_SUPPORTED_FOR_NETWORK</tt>. Please omit the <tt>addressTag</tt> field for such networks. You can check whether a network requires a tag via <tt>GET /sapi/v1/capital/config/getall</tt>: If <tt>withdrawTag</tt> = <tt>true</tt> → memo/tag is required. If <tt>withdrawTag</tt> = <tt>false</tt> → memo/tag is not supported; omit <tt>addressTag</tt>."

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw

◆ async_withdraw()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_withdraw ( const WithdrawParams & params,
CompletionToken && token ) const
inline

Asynchronous withdraw().

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

◆ withdraw_history()

common::RestApiResponse< std::vector< WithdrawHistoryResponseInner > > binance::wallet::rest_api::CapitalApi::withdraw_history ( const WithdrawHistoryParams & params = {}) const
nodiscard

Withdraw History (supporting network) (USER_DATA).

GET /sapi/v1/capital/withdraw/history.

Fetch withdraw history

Weight(UID): 18000 (10 requests per second)

Security Type: USER_DATA

Notes:

  • network may not be in the response for old withdraw.
  • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
  • If both startTime and endTimeare sent, time between startTimeand endTimemust be less than 90 days.
  • If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
  • If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
  • Maximum support idList number is 45.

See https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/capital#withdraw-history

◆ async_withdraw_history()

template<class CompletionToken>
auto binance::wallet::rest_api::CapitalApi::async_withdraw_history ( const WithdrawHistoryParams & params,
CompletionToken && token ) const
inline

Asynchronous withdraw_history().

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