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.).

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

        Query 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.).

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

        Query 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.

      Total Algo open orders max allowed: 30 orders. Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. quantity * 60 / duration should be larger than minQty duration cannot be less than 5 mins or more than 24 hours. For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com

      Weight: 3000

      Parameters

      Returns Promise<RestApiResponse<TimeWeightedAveragePriceFutureAlgoResponse>>

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

      Total Algo open orders max allowed: 10 orders. Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com

      Weight: 300

      Parameters

      Returns Promise<RestApiResponse<VolumeParticipationFutureAlgoResponse>>