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

#include <future_algo_api.hpp>

Public Member Functions

 FutureAlgoApi (std::shared_ptr< common::RestClient > client)
common::RestApiResponse< CancelAlgoOrderFutureAlgoResponse > cancel_algo_order_future_algo (const CancelAlgoOrderFutureAlgoParams &params={}) const
 Cancel Futures Algo Order (TRADE).
template<class CompletionToken>
auto async_cancel_algo_order_future_algo (const CancelAlgoOrderFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous cancel_algo_order_future_algo().
common::RestApiResponse< QueryCurrentAlgoOpenOrdersFutureAlgoResponse > query_current_algo_open_orders_future_algo (const QueryCurrentAlgoOpenOrdersFutureAlgoParams &params={}) const
 Query Current Futures Algo Open Orders (USER_DATA).
template<class CompletionToken>
auto async_query_current_algo_open_orders_future_algo (const QueryCurrentAlgoOpenOrdersFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous query_current_algo_open_orders_future_algo().
common::RestApiResponse< QueryHistoricalAlgoOrdersFutureAlgoResponse > query_historical_algo_orders_future_algo (const QueryHistoricalAlgoOrdersFutureAlgoParams &params={}) const
 Query Historical Futures Algo Orders (USER_DATA).
template<class CompletionToken>
auto async_query_historical_algo_orders_future_algo (const QueryHistoricalAlgoOrdersFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous query_historical_algo_orders_future_algo().
common::RestApiResponse< QuerySubOrdersFutureAlgoResponse > query_sub_orders_future_algo (const QuerySubOrdersFutureAlgoParams &params) const
 Query Futures Sub Orders (USER_DATA).
template<class CompletionToken>
auto async_query_sub_orders_future_algo (const QuerySubOrdersFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous query_sub_orders_future_algo().
common::RestApiResponse< TimeWeightedAveragePriceFutureAlgoResponse > time_weighted_average_price_future_algo (const TimeWeightedAveragePriceFutureAlgoParams &params) const
 Time-Weighted Futures Average Price (Twap) New Order (TRADE).
template<class CompletionToken>
auto async_time_weighted_average_price_future_algo (const TimeWeightedAveragePriceFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous time_weighted_average_price_future_algo().
common::RestApiResponse< VolumeParticipationFutureAlgoResponse > volume_participation_future_algo (const VolumeParticipationFutureAlgoParams &params) const
 Volume Participation (VP) New Order (TRADE).
template<class CompletionToken>
auto async_volume_participation_future_algo (const VolumeParticipationFutureAlgoParams &params, CompletionToken &&token) const
 Asynchronous volume_participation_future_algo().

Constructor & Destructor Documentation

◆ FutureAlgoApi()

binance::algo::rest_api::FutureAlgoApi::FutureAlgoApi ( std::shared_ptr< common::RestClient > client)
explicit

Member Function Documentation

◆ cancel_algo_order_future_algo()

common::RestApiResponse< CancelAlgoOrderFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::cancel_algo_order_future_algo ( const CancelAlgoOrderFutureAlgoParams & params = {}) const
nodiscard

Cancel Futures Algo Order (TRADE).

DELETE /sapi/v1/algo/futures/order.

Cancel an active order.

Weight(IP): 1

Security Type: TRADE

Notes:

  • Either algoId or clientAlgoId must be sent.
  • You need to enable Futures Trading Permission for the API key that requests this endpoint.
  • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#cancel-algo-order-future-algo

◆ async_cancel_algo_order_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_cancel_algo_order_future_algo ( const CancelAlgoOrderFutureAlgoParams & params,
CompletionToken && token ) const
inline

Asynchronous cancel_algo_order_future_algo().

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

◆ query_current_algo_open_orders_future_algo()

common::RestApiResponse< QueryCurrentAlgoOpenOrdersFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::query_current_algo_open_orders_future_algo ( const QueryCurrentAlgoOpenOrdersFutureAlgoParams & params = {}) const
nodiscard

Query Current Futures Algo Open Orders (USER_DATA).

GET /sapi/v1/algo/futures/openOrders.

Query Current Algo Open Orders

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • You need to enable Futures Trading Permission for the API key that requests this endpoint.
  • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-current-algo-open-orders-future-algo

◆ async_query_current_algo_open_orders_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_query_current_algo_open_orders_future_algo ( const QueryCurrentAlgoOpenOrdersFutureAlgoParams & params,
CompletionToken && token ) const
inline

◆ query_historical_algo_orders_future_algo()

common::RestApiResponse< QueryHistoricalAlgoOrdersFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::query_historical_algo_orders_future_algo ( const QueryHistoricalAlgoOrdersFutureAlgoParams & params = {}) const
nodiscard

Query Historical Futures Algo Orders (USER_DATA).

GET /sapi/v1/algo/futures/historicalOrders.

Query Historical Algo Order

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • You need to enable Futures Trading Permission for the API key that requests this endpoint.
  • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-historical-algo-orders-future-algo

◆ async_query_historical_algo_orders_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_query_historical_algo_orders_future_algo ( const QueryHistoricalAlgoOrdersFutureAlgoParams & params,
CompletionToken && token ) const
inline

◆ query_sub_orders_future_algo()

common::RestApiResponse< QuerySubOrdersFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::query_sub_orders_future_algo ( const QuerySubOrdersFutureAlgoParams & params) const
nodiscard

Query Futures Sub Orders (USER_DATA).

GET /sapi/v1/algo/futures/subOrders.

Get respective sub orders for a specified algoId

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • You need to enable Futures Trading Permission for the API key that requests this endpoint.
  • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#query-sub-orders-future-algo

◆ async_query_sub_orders_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_query_sub_orders_future_algo ( const QuerySubOrdersFutureAlgoParams & params,
CompletionToken && token ) const
inline

Asynchronous query_sub_orders_future_algo().

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

◆ time_weighted_average_price_future_algo()

common::RestApiResponse< TimeWeightedAveragePriceFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::time_weighted_average_price_future_algo ( const TimeWeightedAveragePriceFutureAlgoParams & params) const
nodiscard

Time-Weighted Futures Average Price (Twap) New Order (TRADE).

POST /sapi/v1/algo/futures/newOrderTwap.

Send in a Twap new order. Only support on USDⓈ-M Contracts.

Weight(UID): 3000

Security Type: TRADE

Notes:

  • Other info:
    • Total Algo open orders max allowed: 30 orders.
    • Leverage and position mode follow your futures account settings.
    • Receiving "success": true does not guarantee execution; query order endpoints for final status.
    • If balance/position constraints fail, response may still return success but order status becomes expired.
    • quantity * 60 / duration must be greater than minQty.
    • duration cannot be less than 5 minutes or greater than 24 hours.
    • For delivery contracts, TWAP end time should be one hour earlier than symbol delivery time.
    • You need to enable the corresponding permission for the API key requesting this endpoint:
      • Futures Trading Permission — for Classic Trading Account mode
      • Portfolio Margin Trading Permission — for Portfolio Margin Account mode
    • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#time-weighted-average-price-future-algo

◆ async_time_weighted_average_price_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_time_weighted_average_price_future_algo ( const TimeWeightedAveragePriceFutureAlgoParams & params,
CompletionToken && token ) const
inline

◆ volume_participation_future_algo()

common::RestApiResponse< VolumeParticipationFutureAlgoResponse > binance::algo::rest_api::FutureAlgoApi::volume_participation_future_algo ( const VolumeParticipationFutureAlgoParams & params) const
nodiscard

Volume Participation (VP) New Order (TRADE).

POST /sapi/v1/algo/futures/newOrderVp.

Send in a VP new order. Only support on USDⓈ-M Contracts.

Weight(UID): 300

Security Type: TRADE

Notes:

  • Other info:
    • Total Algo open orders max allowed: 10 orders.
    • Leverage and position mode follow your futures account settings.
    • Receiving "success": true does not guarantee execution; query order endpoints for final status.
    • If balance/position constraints fail, response may still return success but order status becomes expired.
    • You need to enable the corresponding permission for the API key requesting this endpoint:
      • Futures Trading Permission — for Classic Trading Account mode
      • Portfolio Margin Trading Permission — for Portfolio Margin Account mode
    • Base URL: https://api.binance.com

See https://developers.binance.com/en/docs/catalog/advanced-trading-algo-trading/api/rest-api/future-algo#volume-participation-future-algo

◆ async_volume_participation_future_algo()

template<class CompletionToken>
auto binance::algo::rest_api::FutureAlgoApi::async_volume_participation_future_algo ( const VolumeParticipationFutureAlgoParams & params,
CompletionToken && token ) const
inline