Skip to main content

REST API Trading - Place CFD order

Place CFD order

Written by Albert
Updated today

Place CFD order

POST /frontoffice/api/cfd/v4/orders

Summary

Use this method to create and submit a new order for CFD markets.

Request

Header parameters

accountId required

The trading account identifier.

Body

order object

Order creation data.

order.marketId string

The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.

Must match one of the available markets returned by the Get markets endpoint.

order.side string

The order side, indicating the direction of the trade.

Possible values:

  • Buy

  • Sell

order.orderType string

The order type.

Possible values:

  • Market

  • Limit

order.timeInForce string

The time-in-force policy for the order, controlling its lifetime.

Possible values:

  • Gtc

  • Ioc

  • Fok

  • Gtd

  • Day

order.requestedLotAmount decimal string

The quantity of the base asset to buy or sell, in lots. Lot size is defined per market and determines the base asset quantity represented by one lot. Upon execution, this defines the opened position size in lots.

order.requestedPrice decimal string | nullable

The limit price for Limit orders (the maximum price for a buy or minimum price for a sell).

Must be null or omitted for Market orders.

order.cancellationDate string | nullable

For GTD orders: The date and time when the order will be automatically canceled if not executed, in the following format: YYYY-MM-DDTHH:MM:SS.sssZ.

Required if timeInForce is set to Gtd; ignored for other time-in-force values.

order.leverage integer

The leverage factor applied to the position. Leverage determines margin required to open and maintain the position (for example, with leverage 10, only 10% of the position's notional value is required as margin).

order.stopLoss object

The Stop loss settings.

order.stopLoss.price decimal string

The Stop loss price.

order.stopLoss.isTrailing boolean

Indicates if the Stop loss is Trailing.

order.takeProfit object

The Take profit settings.

order.takeProfit.price decimal string

The take profit price.

Request example

POST /frontoffice/api/cfd/v4/orders HTTP/1.1
Host: {host}
Authorization: Bearer JWT
accountId: {accountId}
Content-Type: application/json

{
"order": {
"marketId": "cfd.eth_eur",
"side": "Sell",
"orderType": "Limit",
"timeInForce": "Gtd",
"requestedLotAmount": 1,
"requestedPrice": 3280,
"leverage": 75,
"cancellationDate": "2025-08-10T00:00:00Z",
"stopLoss": {
"price": 3320,
"isTrailing": false
},
"takeProfit": {
"price": 3200
}
}
}

Response

In case of success, an object will be returned.

Each object contains the following information:

order object

The created order.

order.orderId string

The unique identifier of the order assigned by the system.

order.status string

The current order status.

Possible values:

  • Started

  • Pending

  • Working

  • Completed

  • Cancelled

  • Expired

  • Rejected

Response example β€” 200: OK

{
"order": {
"orderId": "01K2253Q9X3VTJ68PNWY40JC6Q",
"status": "Pending"
}
}


​

Did this answer your question?