|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
GiftCard 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< CreateADualTokenGiftCardResponse > | create_a_dual_token_gift_card (const CreateADualTokenGiftCardParams ¶ms) const |
| Create a dual-token gift card (fixed value, discount feature) (TRADE). | |
| template<class CompletionToken> | |
| auto | async_create_a_dual_token_gift_card (const CreateADualTokenGiftCardParams ¶ms, CompletionToken &&token) const |
| Asynchronous create_a_dual_token_gift_card(). | |
| common::RestApiResponse< CreateASingleTokenGiftCardResponse > | create_a_single_token_gift_card (const CreateASingleTokenGiftCardParams ¶ms) const |
| Create a single-token gift card (USER_DATA). | |
| template<class CompletionToken> | |
| auto | async_create_a_single_token_gift_card (const CreateASingleTokenGiftCardParams ¶ms, CompletionToken &&token) const |
| Asynchronous create_a_single_token_gift_card(). | |
| common::RestApiResponse< FetchRsaPublicKeyResponse > | fetch_rsa_public_key (const FetchRsaPublicKeyParams ¶ms={}) const |
| Fetch RSA Public Key (USER_DATA). | |
| template<class CompletionToken> | |
| auto | async_fetch_rsa_public_key (const FetchRsaPublicKeyParams ¶ms, CompletionToken &&token) const |
| Asynchronous fetch_rsa_public_key(). | |
| common::RestApiResponse< FetchTokenLimitResponse > | fetch_token_limit (const FetchTokenLimitParams ¶ms) const |
| Fetch Token Limit (USER_DATA). | |
| template<class CompletionToken> | |
| auto | async_fetch_token_limit (const FetchTokenLimitParams ¶ms, CompletionToken &&token) const |
| Asynchronous fetch_token_limit(). | |
| common::RestApiResponse< RedeemABinanceGiftCardResponse > | redeem_a_binance_gift_card (const RedeemABinanceGiftCardParams ¶ms) const |
| Redeem a Binance Gift Card (USER_DATA). | |
| template<class CompletionToken> | |
| auto | async_redeem_a_binance_gift_card (const RedeemABinanceGiftCardParams ¶ms, CompletionToken &&token) const |
| Asynchronous redeem_a_binance_gift_card(). | |
| common::RestApiResponse< VerifyBinanceGiftCardByGiftCardNumberResponse > | verify_binance_gift_card_by_gift_card_number (const VerifyBinanceGiftCardByGiftCardNumberParams ¶ms) const |
| Verify Binance Gift Card by Gift Card Number (USER_DATA). | |
| template<class CompletionToken> | |
| auto | async_verify_binance_gift_card_by_gift_card_number (const VerifyBinanceGiftCardByGiftCardNumberParams ¶ms, CompletionToken &&token) const |
| Asynchronous verify_binance_gift_card_by_gift_card_number(). | |
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 (Gift Card REST API). | |
GiftCard 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.
|
explicit |
Throws common::ConfigError if the configuration is invalid.
|
staticnodiscard |
A client for config.base_path, production when it is not set.
|
staticnodiscard |
A client for production (Gift Card REST API).
|
nodiscardnoexcept |
|
inlinenodiscard |
Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.
|
inlinenodiscard |
Like send_request, but signed (adds timestamp and signature).
|
inline |
|
inline |
|
inlinenodiscard |
Create a dual-token gift card (fixed value, discount feature) (TRADE).
POST /sapi/v1/giftcard/buyCode.
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous create_a_dual_token_gift_card().
|
inlinenodiscard |
Create a single-token gift card (USER_DATA).
POST /sapi/v1/giftcard/createCode.
This API is for creating a Binance Gift Card.
To get started with, please make sure:
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous create_a_single_token_gift_card().
|
inlinenodiscard |
Fetch RSA Public Key (USER_DATA).
GET /sapi/v1/giftcard/cryptography/rsa-public-key.
This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code.
Please note that the RSA Public key fetched is valid only for the current day.
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous fetch_rsa_public_key().
|
inlinenodiscard |
Fetch Token Limit (USER_DATA).
GET /sapi/v1/giftcard/buyCode/token-limit.
This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous fetch_token_limit().
|
inlinenodiscard |
Redeem a Binance Gift Card (USER_DATA).
POST /sapi/v1/giftcard/redeemCode.
This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your Spot wallet.
Weight(IP): 1
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous redeem_a_binance_gift_card().
|
inlinenodiscard |
Verify Binance Gift Card by Gift Card Number (USER_DATA).
GET /sapi/v1/giftcard/verify.
This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous verify_binance_gift_card_by_gift_card_number().