Поиск
WebSocket API v1 - advanced order types
Our WebSocket API v1 supports a variety of order types, including the following five basic order types:
and the following two advanced order types:
Using the WebSocket API addOrder endpoint and specifying the appropriate order type, it is possible to place stop loss limit and take profit limit orders for buying and selling, with or without the use of margin (depending upon availability), across all of our currency pairs.
 

Stop Loss Limit

A stop loss limit order can be placed by specifying stop-loss-limit as the ordertype parameter, with the stop loss price as the price parameter and the limit price as the price2 parameter:
  • {"event":"addOrder", "token":"0RQvkF90Xgt0hpkjnieCaeY4jH1MbzI+OQTnjM6z4xk", "pair":"BCH/USD", "type":"buy", "ordertype":"stop-loss-limit", "price":"350", "price2":"300", "volume":"0.25"}
In the above example, a buy stop loss order would be placed at $350 (the price value) and in the event that the market price reached or exceeded $350, this would trigger a buy limit order at $300 (the price2 value).
 

Take Profit Limit

A take profit limit order can be placed by specifying take-profit-limit as the ordertype parameter, with the take profit price as the price parameter and the limit price as the price2 parameter:
  • {"event":"addOrder", "token":"v2n3anjRZ\/p6Cbg5UcgQYMFbFUk9RayRt7kdVz53zgU", "pair":"BCH/USD", "type":"sell", "ordertype":"take-profit-limit", "price":"300", "price2":"290", "volume":"0.25"}
In the above example, a sell take profit order would be placed at $300 (the price value),and in the event that the market price reached or exceeded $350, this would trigger a sell limit order at $290 (the price2 value).