v1

latestOpenAPI 3.0.02026-07-26327775.9 KB
Trading

Place a new order

Place a new order.<br> Fields qty, routeId, side, validity, type, tradableInstrumentId are mandatory inside of the request body. Price can be set to 0 for market orders.

If using a stop type of order, you must specify the stopPrice.

Validity (also known as TimeInForce - TIF in some error messages) must be IOC for market orders and GTC for limit and stop orders.

post/trade/accounts/{accountId}/orders

Path parameters

accountIdinteger required

Account identifier.

Headers

accNuminteger required

Account number

developer-api-keystring

developer-api-key

Request body

pricenumber

Limit Price for Limit order.

qtynumber required

The number of units to open the buy or sell order.

routeIdnumber required

Identifier of the trade connection. Find the corresponding INFO or TRADE routeId by querying the /trade/accounts/{accountId}/instruments endpoint.

side'buy' | 'sell' required

Order side. If the creating order is a closing one for the position, then the side must be opposite to the side of the position

strategyIdstring

Arbitrary string (up to 31 chars) that can be attached to identify orders and positions placed through algorithmic trading. This value will also be visible in GET /orders, GET /ordersHistory, and GET /positions.

stopLossnumber

Stop loss amount for the order. Must be specified in case of absolute or offset stop loss type.

stopLossType'absolute' | 'offset' | 'trailingOffset'

Type of stop loss price for the order. Available types: absolute, offset, trailingOffset.

stopPricenumber

Stop Price for Stop orders.

takeProfitnumber

TakeProfit amount for the order. Must be specified together with the takeProfitType field. Specifies either the absolute price, or an offset in pips.

takeProfitType'absolute' | 'offset'

Type of take profit for the order. Available types: [absolute, offset]. Must be specified together with the takeProfit field.

trStopOffsetnumber

For the 'trailingOffset' stopLossType. The trailing offset in pips.

tradableInstrumentIdinteger required

Identifier of the instrument that is used for trading purposes.

type'limit' | 'market' | 'stop' required

Order type. Available types: limit, market, stop. If using a stop order, the stopPrice field must be specified. If using a limit order, the price field must be specified. If using a market order, the price field is ignored.

validity'GTC' | 'IOC' required

Whether the order is Good Till Cancelled (GTC) or Immediate or Cancel (IOC). For market orders, use IOC, otherwise, use GTC. In error messages, Validity is sometimes referred to as TimeInForce (TIF).

Response

OK

sstring required

Status will always be ok.

Example response

{
  "s": "ok"
}