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

Rebate REST API client. More...

#include <rest_api.hpp>

Public Member Functions

 RestApi (common::RestApiConfig configuration)
 Throws common::ConfigError if the configuration is invalid.
const common::RestApiConfig & configuration () const noexcept
template<class T>
common::RestApiResponse< T > send_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const
 Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.
template<class T>
common::RestApiResponse< T > send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const
 Like send_request, but signed (adds timestamp and signature).
template<class T, class CompletionToken>
auto async_send_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const
template<class T, class CompletionToken>
auto async_send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const
common::RestApiResponse< GetSpotRebateHistoryRecordsResponse > get_spot_rebate_history_records (const GetSpotRebateHistoryRecordsParams &params={}) const
 Get Spot Rebate History Records (USER_DATA).
template<class CompletionToken>
auto async_get_spot_rebate_history_records (const GetSpotRebateHistoryRecordsParams &params, CompletionToken &&token) const
 Asynchronous get_spot_rebate_history_records().

Static Public Member Functions

static RestApi from_config (common::RestApiConfig config)
 A client for config.base_path, production when it is not set.
static RestApi production (common::RestApiConfig config)
 A client for production (Rebate REST API).

Detailed Description

Rebate REST API client.

Cheap to copy: copies share one common::RestClient (connection pool and executor).

Every endpoint has a blocking form (name(params)) and an asynchronous form (async_name(params, token)) that accepts any Asio completion token.

Constructor & Destructor Documentation

◆ RestApi()

binance::rebate::rest_api::RestApi::RestApi ( common::RestApiConfig configuration)
explicit

Throws common::ConfigError if the configuration is invalid.

Member Function Documentation

◆ from_config()

RestApi binance::rebate::rest_api::RestApi::from_config ( common::RestApiConfig config)
staticnodiscard

A client for config.base_path, production when it is not set.

◆ production()

RestApi binance::rebate::rest_api::RestApi::production ( common::RestApiConfig config)
staticnodiscard

A client for production (Rebate REST API).

◆ configuration()

const common::RestApiConfig & binance::rebate::rest_api::RestApi::configuration ( ) const
nodiscardnoexcept

◆ send_request()

template<class T>
common::RestApiResponse< T > binance::rebate::rest_api::RestApi::send_request ( std::string endpoint,
common::HttpMethod method,
common::Params query = {},
common::Params body = {} ) const
inlinenodiscard

Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.

◆ send_signed_request()

template<class T>
common::RestApiResponse< T > binance::rebate::rest_api::RestApi::send_signed_request ( std::string endpoint,
common::HttpMethod method,
common::Params query = {},
common::Params body = {} ) const
inlinenodiscard

Like send_request, but signed (adds timestamp and signature).

◆ async_send_request()

template<class T, class CompletionToken>
auto binance::rebate::rest_api::RestApi::async_send_request ( std::string endpoint,
common::HttpMethod method,
common::Params query,
common::Params body,
CompletionToken && token ) const
inline

◆ async_send_signed_request()

template<class T, class CompletionToken>
auto binance::rebate::rest_api::RestApi::async_send_signed_request ( std::string endpoint,
common::HttpMethod method,
common::Params query,
common::Params body,
CompletionToken && token ) const
inline

◆ get_spot_rebate_history_records()

common::RestApiResponse< GetSpotRebateHistoryRecordsResponse > binance::rebate::rest_api::RestApi::get_spot_rebate_history_records ( const GetSpotRebateHistoryRecordsParams & params = {}) const
inlinenodiscard

Get Spot Rebate History Records (USER_DATA).

GET /sapi/v1/rebate/taxQuery.

Get Spot Rebate History Records

Weight(UID): 12000

Security Type: USER_DATA

Notes:

  • The max interval between startTime and endTime is 30 days.
  • If startTime and endTime are not sent, the recent 7 days' data will be returned.
  • The earliest supported startTime is June 10, 2020.
  • Return up to 200 records per request.

See https://developers.binance.com/en/docs/catalog/investment-and-services-rebate/api/rest-api/~#get-spot-rebate-history-records

◆ async_get_spot_rebate_history_records()

template<class CompletionToken>
auto binance::rebate::rest_api::RestApi::async_get_spot_rebate_history_records ( const GetSpotRebateHistoryRecordsParams & params,
CompletionToken && token ) const
inline