Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    • Generic function to send a request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • Generic function to send a signed request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • 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

      Parameters

      Returns Promise<RestApiResponse<TimeWeightedAveragePriceFutureAlgoResponse>>

    • 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

      Parameters

      Returns Promise<RestApiResponse<VolumeParticipationFutureAlgoResponse>>