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

#include <trade_api.hpp>

Public Member Functions

 TradeApi (std::shared_ptr< common::RestClient > client)
common::RestApiResponse< VipLoanBorrowResponse > vip_loan_borrow (const VipLoanBorrowParams &params) const
 VIP Loan Borrow (TRADE).
template<class CompletionToken>
auto async_vip_loan_borrow (const VipLoanBorrowParams &params, CompletionToken &&token) const
 Asynchronous vip_loan_borrow().
common::RestApiResponse< VipLoanFixedRateBorrowResponse > vip_loan_fixed_rate_borrow (const VipLoanFixedRateBorrowParams &params) const
 VIP Loan Fixed Rate Borrow (TRADE).
template<class CompletionToken>
auto async_vip_loan_fixed_rate_borrow (const VipLoanFixedRateBorrowParams &params, CompletionToken &&token) const
 Asynchronous vip_loan_fixed_rate_borrow().
common::RestApiResponse< VipLoanRenewResponse > vip_loan_renew (const VipLoanRenewParams &params) const
 VIP Loan Renew (TRADE).
template<class CompletionToken>
auto async_vip_loan_renew (const VipLoanRenewParams &params, CompletionToken &&token) const
 Asynchronous vip_loan_renew().
common::RestApiResponse< VipLoanRepayResponse > vip_loan_repay (const VipLoanRepayParams &params) const
 VIP Loan Repay (TRADE).
template<class CompletionToken>
auto async_vip_loan_repay (const VipLoanRepayParams &params, CompletionToken &&token) const
 Asynchronous vip_loan_repay().

Constructor & Destructor Documentation

◆ TradeApi()

binance::vip_loan::rest_api::TradeApi::TradeApi ( std::shared_ptr< common::RestClient > client)
explicit

Member Function Documentation

◆ vip_loan_borrow()

common::RestApiResponse< VipLoanBorrowResponse > binance::vip_loan::rest_api::TradeApi::vip_loan_borrow ( const VipLoanBorrowParams & params) const
nodiscard

VIP Loan Borrow (TRADE).

POST /sapi/v1/loan/vip/borrow.

VIP loan is available for VIP users only.

Weight(UID): 6000

Security Type: TRADE

Notes:

  • loanAccountId refers to the loan receiving account.
  • Only master account applications are supported.
  • loanAccountId and collateralAccountId must be under the same master account.
  • loanTerm is mandatory if the user chooses a fixed rate (isFlexibleRate = FALSE).
  • Every coin in collateralCoin is pledged from every account in collateralAccountId.
  • To pledge a Simple Earn Flexible position, add <ASSET>-Earn (e.g. USDT-Earn) to collateralCoin together with its Spot asset (e.g. USDT,USDT-Earn). Sending <ASSET>-Earn without its Spot asset returns -10213.
  • Rate limit: 1 request per second per account.

See https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-borrow

◆ async_vip_loan_borrow()

template<class CompletionToken>
auto binance::vip_loan::rest_api::TradeApi::async_vip_loan_borrow ( const VipLoanBorrowParams & params,
CompletionToken && token ) const
inline

Asynchronous vip_loan_borrow().

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

◆ vip_loan_fixed_rate_borrow()

common::RestApiResponse< VipLoanFixedRateBorrowResponse > binance::vip_loan::rest_api::TradeApi::vip_loan_fixed_rate_borrow ( const VipLoanFixedRateBorrowParams & params) const
nodiscard

VIP Loan Fixed Rate Borrow (TRADE).

POST /sapi/v1/loan/vip/fixed/borrow.

Submit a fixed rate borrow request by matching market supply orders.

Weight(UID): 6000

Security Type: TRADE

Notes:

  • Rate limit: 2 requests per second per account.
  • When multiple supplyRequest entries are provided, all requestId values must correspond to the same borrowCoin and loanTerm (validated by collateral facade).
  • Every coin in collateralCoin is pledged from every account in collateralAccountId.
  • To pledge a Simple Earn Flexible position, add <ASSET>-Earn (e.g. BNB-Earn) to collateralCoin together with its Spot asset (e.g. BNB,BNB-Earn). Sending <ASSET>-Earn without its Spot asset returns -10213.

See https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-fixed-rate-borrow

◆ async_vip_loan_fixed_rate_borrow()

template<class CompletionToken>
auto binance::vip_loan::rest_api::TradeApi::async_vip_loan_fixed_rate_borrow ( const VipLoanFixedRateBorrowParams & params,
CompletionToken && token ) const
inline

Asynchronous vip_loan_fixed_rate_borrow().

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

◆ vip_loan_renew()

common::RestApiResponse< VipLoanRenewResponse > binance::vip_loan::rest_api::TradeApi::vip_loan_renew ( const VipLoanRenewParams & params) const
nodiscard

VIP Loan Renew (TRADE).

POST /sapi/v1/loan/vip/renew.

VIP loan is available for VIP users only.

Weight(UID): 6000

Security Type: TRADE

Notes:

  • Rate limit: 1 request per second per account.

See https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-renew

◆ async_vip_loan_renew()

template<class CompletionToken>
auto binance::vip_loan::rest_api::TradeApi::async_vip_loan_renew ( const VipLoanRenewParams & params,
CompletionToken && token ) const
inline

Asynchronous vip_loan_renew().

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

◆ vip_loan_repay()

common::RestApiResponse< VipLoanRepayResponse > binance::vip_loan::rest_api::TradeApi::vip_loan_repay ( const VipLoanRepayParams & params) const
nodiscard

VIP Loan Repay (TRADE).

POST /sapi/v1/loan/vip/repay.

VIP loan is available for VIP users only.

Weight(UID): 6000

Security Type: TRADE

Notes:

  • Rate limit: 1 request per second per account.

See https://developers.binance.com/en/docs/catalog/investment-and-services-vip-loan/api/rest-api/trade#vip-loan-repay

◆ async_vip_loan_repay()

template<class CompletionToken>
auto binance::vip_loan::rest_api::TradeApi::async_vip_loan_repay ( const VipLoanRepayParams & params,
CompletionToken && token ) const
inline

Asynchronous vip_loan_repay().

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