Binance Connector JS
    Preparing search index...

    TradeApi - object-oriented interface TradeApi

    Implements

    Index

    Constructors

    Methods

    cancelAllCmOpenConditionalOrders cancelAllCmOpenOrders cancelAllUmAlgoOpenOrders cancelAllUmOpenConditionalOrders cancelAllUmOpenOrders cancelCmConditionalOrder cancelCmOrder cancelMarginAccountAllOpenOrdersOnASymbol cancelMarginAccountOcoOrders cancelMarginAccountOrder cancelUmAlgoOrder cancelUmConditionalOrder cancelUmOrder cmAccountTradeList cmPositionAdlQuantileEstimation futuresTradfiPerpsContract getUmFuturesBnbBurnStatus marginAccountBorrow marginAccountNewOco marginAccountRepay marginAccountRepayDebt marginAccountTradeList modifyCmOrder modifyUmOrder newCmConditionalOrder newCmOrder newMarginOrder newUmAlgoOrder newUmConditionalOrder newUmOrder queryAllCmConditionalOrders queryAllCmOrders queryAllCurrentCmOpenConditionalOrders queryAllCurrentCmOpenOrders queryAllCurrentUmOpenAlgoOrders queryAllCurrentUmOpenConditionalOrders queryAllCurrentUmOpenOrders queryAllMarginAccountOrders queryAllUmConditionalOrders queryAllUmOrders queryCmConditionalOrderHistory queryCmModifyOrderHistory queryCmOrder queryCurrentCmOpenConditionalOrder queryCurrentCmOpenOrder queryCurrentMarginOpenOrder queryCurrentUmOpenAlgoOrder queryCurrentUmOpenConditionalOrder queryCurrentUmOpenOrder queryMarginAccountOrder queryMarginAccountsAllOco queryMarginAccountsOco queryMarginAccountsOpenOco queryUmAlgoOrderHistory queryUmConditionalOrderHistory queryUmModifyOrderHistory queryUmOrder queryUsersCmForceOrders queryUsersMarginForceOrders queryUsersUmForceOrders toggleBnbBurnOnUmFuturesTrade umAccountTradeList umPositionAdlQuantileEstimation

    Constructors

    Methods

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

      TradeApi

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

      TradeApi

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

      TradeApi