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.

    • This endpoint sets the parameters of the auto-cancel feature which cancels all open orders (both market maker protection and non market maker protection order types) of the underlying symbol at the end of the specified countdown time period if no heartbeat message is sent. After the countdown time period, all open orders will be cancelled and new orders will be rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off by setting countdownTime to 0.

      This rest endpoint sets up the parameters to cancel your open orders in case of an outage or disconnection. Example usage: Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified underlying symbol, all open orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped. The system will check all countdowns approximately every 1000 milliseconds, please note that sufficient redundancy should be considered when using this function. We do not recommend setting the countdown time to be too precise or too small.

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<SetAutoCancelAllOpenOrdersResponse>>