Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    accountBalance accountInformation bnbTransfer cancelAllCmOpenConditionalOrders cancelAllCmOpenOrders cancelAllUmAlgoOpenOrders cancelAllUmOpenConditionalOrders cancelAllUmOpenOrders cancelCmConditionalOrder cancelCmOrder cancelMarginAccountAllOpenOrdersOnASymbol cancelMarginAccountOcoOrders cancelMarginAccountOrder cancelUmAlgoOrder cancelUmConditionalOrder cancelUmOrder changeAutoRepayFuturesStatus changeCmInitialLeverage changeCmPositionMode changeUmInitialLeverage changeUmPositionMode closeUserDataStream cmAccountTradeList cmNotionalAndLeverageBrackets cmPositionAdlQuantileEstimation fundAutoCollection fundCollectionByAsset futuresTradfiPerpsContract getAutoRepayFuturesStatus getCmAccountDetail getCmCurrentPositionMode getCmIncomeHistory getDownloadIdForUmFuturesOrderHistory getDownloadIdForUmFuturesTradeHistory getDownloadIdForUmFuturesTransactionHistory getMarginBorrowLoanInterestHistory getUmAccountDetail getUmAccountDetailV2 getUmCurrentPositionMode getUmFuturesBnbBurnStatus getUmFuturesOrderDownloadLinkById getUmFuturesTradeDownloadLinkById getUmFuturesTransactionDownloadLinkById getUmIncomeHistory getUserCommissionRateForCm getUserCommissionRateForUm keepaliveUserDataStream marginAccountBorrow marginAccountNewOco marginAccountRepay marginAccountRepayDebt marginAccountTradeList marginMaxBorrow modifyCmOrder modifyUmOrder newCmConditionalOrder newCmOrder newMarginOrder newUmAlgoOrder newUmConditionalOrder newUmOrder portfolioMarginUmTradingQuantitativeRulesIndicators queryAllCmConditionalOrders queryAllCmOrders queryAllCurrentCmOpenConditionalOrders queryAllCurrentCmOpenOrders queryAllCurrentUmOpenAlgoOrders queryAllCurrentUmOpenConditionalOrders queryAllCurrentUmOpenOrders queryAllMarginAccountOrders queryAllUmConditionalOrders queryAllUmOrders queryCmConditionalOrderHistory queryCmModifyOrderHistory queryCmOrder queryCmPositionInformation queryCurrentCmOpenConditionalOrder queryCurrentCmOpenOrder queryCurrentMarginOpenOrder queryCurrentUmOpenAlgoOrder queryCurrentUmOpenConditionalOrder queryCurrentUmOpenOrder queryMarginAccountOrder queryMarginAccountsAllOco queryMarginAccountsOco queryMarginAccountsOpenOco queryMarginLoanRecord queryMarginMaxWithdraw queryMarginRepayRecord queryPortfolioMarginNegativeBalanceInterestHistory queryUmAlgoOrderHistory queryUmConditionalOrderHistory queryUmModifyOrderHistory queryUmOrder queryUmPositionInformation queryUserNegativeBalanceAutoExchangeRecord queryUserRateLimit queryUsersCmForceOrders queryUsersMarginForceOrders queryUsersUmForceOrders repayFuturesNegativeBalance sendRequest sendSignedRequest startUserDataStream testConnectivity toggleBnbBurnOnUmFuturesTrade umAccountTradeList umFuturesAccountConfiguration umFuturesSymbolConfiguration umNotionalAndLeverageBrackets umPositionAdlQuantileEstimation

    Constructors

    Methods

    • Get Margin Borrow/Loan Interest History

      Weight(IP): 1

      Security Type: USER_DATA

      Notes:

      • Response in descending order
      • The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness.
      • If startTime and endTime not sent, return records of the last 7 days by default
      • If startTime is sent and endTime is not sent, the records from startTime to the present will be returned; if startTime is more than 30 days ago, the records of the past 30 days will be returned.
      • If startTime is not sent and endTime is sent, the records of the 7 days before endTime is returned.
      • Type in response has 5 enums:
      • PERIODIC interest charged per hour
      • ON_BORROW first interest charged on borrow
      • PERIODIC_CONVERTED interest charged per hour converted into BNB
      • ON_BORROW_CONVERTED first interest charged on borrow converted into BNB
      • PORTFOLIO Portfolio Margin negative balance daily interest

      Parameters

      Returns Promise<RestApiResponse<GetMarginBorrowLoanInterestHistoryResponse>>

    • Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue

      Weight(IP): 1

      Security Type: TRADE

      Notes:

      • Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
      • Both quantity and price must be sent
      • When the new quantity or price doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.
      • However the order will be cancelled by the amendment in the following situations:
      • when the order is in partially filled status and the new quantity * When the order is GTX and the new price will cause it to be executed immediately

      Parameters

      Returns Promise<RestApiResponse<ModifyCmOrderResponse>>

    • Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue

      Weight(IP): 1

      Security Type: TRADE

      Notes:

      • Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
      • Both quantity and price must be sent
      • When the new quantity or price doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.
      • However the order will be cancelled by the amendment in the following situations:
      • when the order is in partially filled status and the new quantity * When the order is GTX and the new price will cause it to be executed immediately

      Parameters

      Returns Promise<RestApiResponse<ModifyUmOrderResponse>>

    • Place new UM conditional order

      Weight(IP): 1

      Security Type: TRADE

      Notes:

      • Algo order with type STOP, parameter timeInForce can be sent (default GTC).
      • Algo order with type TAKE_PROFIT, parameter timeInForce can be sent (default GTC).
      • Condition orders will be triggered when price reaches the triggerPrice.
      • STOP, STOP_MARKET: BUY: latest price >= triggerPrice; SELL: latest price <= triggerPrice.
      • TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: latest price <= triggerPrice; SELL: latest price >= triggerPrice.
      • TRAILING_STOP_MARKET: BUY: lowest price after order placed <= activatePrice, and latest price >= lowest price * (1 + callbackRate); SELL: highest price after order placed >= activatePrice, and latest price <= highest price * (1 - callbackRate).
      • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.

      Parameters

      Returns Promise<RestApiResponse<NewUmAlgoOrderResponse>>

    • Place new UM conditional order

      Weight(IP): 1

      Security Type: TRADE

      Notes:

      • Additional mandatory parameters based on type:
      • Order with type STOP/TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
      • Condition orders will be triggered when:
      • STOP, STOP_MARKET:
      • BUY: "MARK_PRICE" >= stopPrice
      • SELL: "MARK_PRICE" = stopPrice
      • TRAILING_STOP_MARKET:
      • BUY: the lowest mark price after order placed ``= the lowest mark price
      • (1 + callbackRate)
      • SELL: the highest mark price after order placed >= activationPrice, and the latest mark price = stopPrice
      • SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") = stopPrice
      • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.
      • In extreme market conditions, timeInForce GTD order auto cancel time might be delayed comparing to goodTillDate

      Parameters

      Returns Promise<RestApiResponse<NewUmConditionalOrderResponse>>

    • Place new UM order

      Weight(IP): 1

      Security Type: TRADE

      Notes:

      • Additional mandatory parameters based on type:
      • If newOrderRespType is sent as RESULT :
      • MARKET order: the final FILLED result of the order will be return directly.
      • LIMIT order with special timeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.
      • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.
      • In extreme market conditions, timeInForce GTD order auto cancel time might be delayed comparing to goodTillDate

      Parameters

      Returns Promise<RestApiResponse<NewUmOrderResponse>>

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