Binance Connector JS
    Preparing search index...

    TradeApi - interface

    TradeApi

    interface TradeApiInterface {
        cancelOrder(
            requestParameters: DerivativesTradingCoinFuturesWebsocketAPI.CancelOrderRequest,
        ): Promise<
            WebsocketApiResponse<
                DerivativesTradingCoinFuturesWebsocketAPI.CancelOrderResponse,
            >,
        >;
        modifyOrder(
            requestParameters: DerivativesTradingCoinFuturesWebsocketAPI.ModifyOrderRequest,
        ): Promise<
            WebsocketApiResponse<
                DerivativesTradingCoinFuturesWebsocketAPI.ModifyOrderResponse,
            >,
        >;
        newOrder(
            requestParameters: DerivativesTradingCoinFuturesWebsocketAPI.NewOrderRequest,
        ): Promise<
            WebsocketApiResponse<
                DerivativesTradingCoinFuturesWebsocketAPI.NewOrderResponse,
            >,
        >;
        positionInformation(
            requestParameters?: DerivativesTradingCoinFuturesWebsocketAPI.PositionInformationRequest,
        ): Promise<
            WebsocketApiResponse<
                DerivativesTradingCoinFuturesWebsocketAPI.PositionInformationResponse,
            >,
        >;
        queryOrder(
            requestParameters: DerivativesTradingCoinFuturesWebsocketAPI.QueryOrderRequest,
        ): Promise<
            WebsocketApiResponse<
                DerivativesTradingCoinFuturesWebsocketAPI.QueryOrderResponse,
            >,
        >;
    }

    Implemented by

    Index

    Methods

    • Send in a new order.

      Order with type STOP, parameter timeInForce can be sent ( default GTC). Order with type TAKE_PROFIT, parameter timeInForce can be sent ( default GTC). Condition orders will be triggered when: If parameter priceProtect is 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 /dapi/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 TRAILING_STOP_MARKET: BUY: the lowest price after order placed <= activationPrice, and the latest price >= the lowest price * (1 + callbackRate) SELL: the highest price after order placed >= activationPrice, and the latest price <= the highest price * (1 - callbackRate) For TRAILING_STOP_MARKET, if you got such error code. BUY: activationPrice should be smaller than latest price. SELL: activationPrice should be larger than latest price. 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. STOP_MARKET, TAKE_PROFIT_MARKET with closePosition=true: Follow the same rules for condition orders. If triggered,close all current long position(if SELL) or current short position(if BUY). Cannot be used with quantity parameter Cannot be used with reduceOnly parameter In Hedge Mode, cannot be used with BUY orders in LONG position side. and cannot be used with SELL orders in SHORT position side

      Weight: 0

      Parameters

      Returns Promise<
          WebsocketApiResponse<
              DerivativesTradingCoinFuturesWebsocketAPI.NewOrderResponse,
          >,
      >

      TradeApiInterface