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

    • New CM Conditional Order

      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 TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: "MARK_PRICE" <= stopPrice SELL: "MARK_PRICE" >= stopPrice TRAILING_STOP_MARKET: BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate) SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark price * (1 - callbackRate) For TRAILING_STOP_MARKET, if you got such error code. {"code": -2021, "msg": "Order would immediately trigger."} means that the parameters you send do not meet the following requirements: BUY: activationPrice should be smaller than latest mark price. SELL: activationPrice should be larger than latest mark price. Condition orders will be triggered when: If parameterpriceProtectis sent as true: when price reaches the stopPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol "triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo STOP, STOP_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<NewCmConditionalOrderResponse>>

      TradeApi

    • Place new UM conditional order

      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:

      If parameterpriceProtectis sent as true: when price reaches the triggerPrice , the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol "triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo

      STOP, STOP_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= triggerPrice SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= triggerPrice TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= triggerPrice SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= triggerPrice TRAILING_STOP_MARKET: BUY: the lowest price after order placed <= activatePrice, and the latest price >= the lowest price * (1 + callbackRate) SELL: the highest price after order placed >= activatePrice, and the latest price <= the highest price * (1 - callbackRate)

      For TRAILING_STOP_MARKET, if you got such error code. {"code": -2021, "msg": "Order would immediately trigger."} means that the parameters you send do not meet the following requirements: BUY: activatePrice should be smaller than latest price. SELL: activatePrice should be larger than latest price.

      selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<NewUmAlgoOrderResponse>>

      TradeApi

    • Place new UM conditional order

      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 TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: "MARK_PRICE" <= stopPrice SELL: "MARK_PRICE" >= stopPrice TRAILING_STOP_MARKET: BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate) SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark price * (1 - callbackRate) For TRAILING_STOP_MARKET, if you got such error code. {"code": -2021, "msg": "Order would immediately trigger."} means that the parameters you send do not meet the following requirements: BUY: activationPrice should be smaller than latest mark price. SELL: activationPrice should be larger than latest mark price. Condition orders will be triggered when: If parameterpriceProtectis sent as true: when price reaches the stopPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol "triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo STOP, STOP_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice TAKE_PROFIT, TAKE_PROFIT_MARKET: BUY: latest price ("MARK_PRICE" or "CONTRACT_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

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<NewUmConditionalOrderResponse>>

      TradeApi