Binance Connector JS
    Preparing search index...

    UserDataApi - interface UserDataApi

    interface UserDataApiInterface {
        currentOpenOptionOrders(
            requestParameters?: CurrentOpenOptionOrdersRequest,
        ): Promise<RestApiResponse<CurrentOpenOptionOrdersResponse>>;
        exercisableOptions(
            requestParameters?: ExercisableOptionsRequest,
        ): Promise<RestApiResponse<ExercisableOptionsResponse>>;
        optionExerciseDetail(
            requestParameters?: OptionExerciseDetailRequest,
        ): Promise<RestApiResponse<OptionExerciseDetailResponse>>;
        optionExerciseHistory(
            requestParameters?: OptionExerciseHistoryRequest,
        ): Promise<RestApiResponse<OptionExerciseHistoryResponse>>;
        optionOrderDetail(
            requestParameters?: OptionOrderDetailRequest,
        ): Promise<RestApiResponse<OptionOrderDetailResponse>>;
        optionOrderHistory(
            requestParameters: OptionOrderHistoryRequest,
        ): Promise<RestApiResponse<OptionOrderHistoryResponse>>;
        optionPositions(
            requestParameters?: OptionPositionsRequest,
        ): Promise<RestApiResponse<OptionPositionsResponse>>;
        optionSettlementEventDetail(
            requestParameters: OptionSettlementEventDetailRequest,
        ): Promise<RestApiResponse<OptionSettlementEventDetailResponse>>;
        optionSettlementEventHistory(
            requestParameters?: OptionSettlementEventHistoryRequest,
        ): Promise<RestApiResponse<OptionSettlementEventHistoryResponse>>;
        optionTradeHistory(
            requestParameters: OptionTradeHistoryRequest,
        ): Promise<RestApiResponse<OptionTradeHistoryResponse>>;
    }

    Implemented by

    Index
    • 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

      Parameters

      Returns Promise<RestApiResponse<OptionOrderDetailResponse>>

      UserDataApiInterface

    • 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

      Parameters

      Returns Promise<RestApiResponse<OptionPositionsResponse>>

      UserDataApiInterface

    • 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

      Parameters

      Returns Promise<RestApiResponse<OptionSettlementEventDetailResponse>>

      UserDataApiInterface