|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
#include <user_data_api.hpp>
|
explicit |
|
nodiscard |
Current Open Option Orders (USER_DATA).
GET /sapi/v1/equity/option/order/open-orders.
Query all of the caller's open option orders, including the remaining quantity of partially filled orders. Stock orders are not included.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous current_open_option_orders().
Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<CurrentOpenOptionOrdersResponseInner>>).
|
nodiscard |
Exercisable Options (USER_DATA).
GET /sapi/v1/equity/option/exercise/exercisable.
Returns the contracts that can currently be exercised. Only long positions are exercisable; the short side is the assigned party and has no exercise right.
availableQty is the maximum quantity for Submit Option Exercise.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous exercisable_options().
Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<ExercisableOptionsResponseInner>>).
|
nodiscard |
Option Exercise Detail (USER_DATA).
GET /sapi/v1/equity/option/exercise/detail.
Query the result of a single exercise request. Provide at least one of tranId and clientOrderId; omitting both returns -1102. If both are provided, the lookup uses clientOrderId and tranId is ignored (the opposite of Option Order Detail).
Returns 497402 Order not found. if no record is found or the record does not belong to the caller.
errorCode is returned only when status is FAILED.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_exercise_detail().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionExerciseDetailResponse>).
|
nodiscard |
Option Exercise History (USER_DATA).
GET /sapi/v1/equity/option/exercise/history.
Paged exercise history.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_exercise_history().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionExerciseHistoryResponse>).
|
nodiscard |
Option Order Detail (USER_DATA).
GET /sapi/v1/equity/option/order/detail.
Query a single option order with its fills and an itemized fee breakdown.
Provide at least one of orderId and clientOrderId; omitting both returns -1102. If both are provided, the order is looked up by orderId, and clientOrderId must belong to the same order, otherwise 486218 Order not found is returned.
Only option orders are accepted: the orderId / clientOrderId of a stock order returns -2013 Order does not exist.; an unknown order ID returns 486218 Order not found.
Example: a fully filled buy-to-open order — filledTotal = total = 1.48 × 1 × 100 = 148 (excluding fees); total fees fee = 0.65 (commission + cat + orf + occ). sec / taf are 0 for buy orders. For an order still in progress with no fills, fee and the itemized fees are not returned (platformFee is always "0"); for an order canceled or expired without any fill, each fee item is "0". canceledAt / expiredAt are returned only in the corresponding status; settlementDate is not returned for buy orders.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_order_detail().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionOrderDetailResponse>).
|
nodiscard |
Option Order History (USER_DATA).
GET /sapi/v1/equity/option/order/history.
Paged option order history, sorted by creation time in descending order. Only option orders are returned; stock orders are not included.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_order_history().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionOrderHistoryResponse>).
|
nodiscard |
Option Positions (USER_DATA).
GET /sapi/v1/equity/option/position.
Returns all current option positions.
One record per contract; see side for the direction.
free / locked are signed: negative for short positions. For example, with 3 short contracts of which 1 is reserved by an open order, free = "-2" and locked = "-1". When closing (SELL_TO_CLOSE / BUY_TO_CLOSE), the quantity you can order is the absolute value of free.
Positions past the last trading time and awaiting settlement are not returned.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_positions().
Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<OptionPositionsResponseInner>>).
|
nodiscard |
Option Settlement Event Detail (USER_DATA).
GET /sapi/v1/equity/option/event/detail.
Full detail of a single settlement event, including the settlement basis and collateral release. Returns -1102 if eventId does not exist or does not belong to the caller.
All fields of the history endpoint are included, with two differences: contracts is an absolute value, and eventTime is the time the settlement record was created.
For an EXPIRY event, settlementKind, cashDirection, amount and shareDelta are not returned. For an EXPIRY event on a short position (covered call / cash-secured put), collateralRelease lists the collateral released.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_settlement_event_detail().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionSettlementEventDetailResponse>).
|
nodiscard |
Option Settlement Event History (USER_DATA).
GET /sapi/v1/equity/option/event/history.
Query option settlement events — the settlement outcome of a contract: exercise, assignment or expiry (expired worthless), along with the shares / cash delivered and the collateral released. Sorted by event time in descending order.
These records are on a settlement basis, separate from orders and trades.
Cursor pagination. Omit lastId on the first page, then pass the nextLastId from the previous page until hasMore is false.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_settlement_event_history().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionSettlementEventHistoryResponse>).
|
nodiscard |
Option Trade History (USER_DATA).
GET /sapi/v1/equity/option/trade/history.
Paged per-fill option trade history. Only option fills are returned. Option fees are charged per order, so individual fills carry no fee; see fee in Option Order History / Option Order Detail.
Weight: 1
Security Type: USER_DATA
|
inline |
Asynchronous option_trade_history().
Completes with void(std::exception_ptr, common::RestApiResponse<OptionTradeHistoryResponse>).