POST

/api/v1/smart_trades

Permission: SMART_TRADES_WRITESecurity: SIGNED

Creates a new SmartTrade entity. Creating SmartTrade is available for exchange accounts where the parameter smart_trading_supported is true.

This endpoint requires an exchange account with smart_trading_supported enabled. Use All market pairs to verify compatible trading symbols.
SmartTrade Entity

Request Parameters

9
account_idinteger required

ID of the exchange account entity where this trade will be created.

pairstring required

Trading pair in Quentrade format (e.g. USDT_BTC). Use the All market pairs endpoint to obtain valid pairs.

instantboolean

Used for creating SmartTrade of type Simple Buy or Simple Sell. Set to true to execute immediate market order without TP/SL rules. Default: false

skip_enter_stepboolean

Set to true to create a Smart Sell or Smart Buy — skips position entry step and places only take profit / stop loss for an already-held position. Default: false

leverageobject

Details of the Leverage applied to margin or futures SmartTrades.

enabledboolean required

Enables leverage settings for this SmartTrade. Set to true to activate. Default: false

typestring

Leverage type for the futures account: cross or isolated. Default: cross

valueinteger

Cross or isolated leverage value based on exchange rules and currency limits.

positionobject required

Settings of the Position applied to this SmartTrade.

order_typestring required

The type of position trade for this SmartTrade: market, limit, or conditional.

typestring required

The order side to enter a position: buy or sell.

unitsobject required

Details of units applied to this SmartTrade. Contains [value: string] specifying the amount of units based on exchange rules.

priceobject

Price settings. Required for limit or conditional type orders. Contains [value: number].

conditionalobject

Settings of the conditional trigger order: [order_type: string] (market, limit), [price: object] (type: bid/ask/last, value: number), and [trailing: object] (enabled: boolean, percent: number).

take_profitobject

Details of Take Profit settings and multi-target steps applied to this SmartTrade.

enabledboolean required

Enables Take Profit for this SmartTrade. Set to true to activate. Default: false

stepsarray[object]

Detailed information about each Take Profit step including [order_type: market/limit], [volume: number] (volume percentage), [price: object] (type: bid/ask/last, value/percent: number), and [trailing: object] (enabled: boolean, percent: number min: 0.01 max: 100 for the last step).

stop_lossobject

Details of Stop Loss protective settings applied to this SmartTrade.

enabledboolean required

Enables Stop Loss for this SmartTrade. Set to true to activate. Default: false

breakevenboolean

Enables the Move to Breakeven feature. Requires at least two Take Profit steps. Default: false

order_typestring required

Stop Loss type: market or limit. Required when stop_loss[enabled] is true.

priceobject

Stop loss price value configurations: [value: number] or [percent: number].

conditionalobject

Conditional stop loss trigger price and trailing SL settings [price: object, trailing: object].

timeoutobject

Timeout delay configuration in seconds before executing SL [enabled: boolean, value: number].

notestring

Optional user-defined note for this SmartTrade (minlength: 1, maxlength: 300).

Response Parameters

If successful, the response includes an updated copy of the SmartTrade entity.

Example Request

create_smart_trade_request.json
POST /api/v1/smart_trades
{
  "account_id": 32455218,
  "pair": "USDT_BTC",
  "instant": true,
  "position": {
    "type": "buy",
    "units": {
      "value": "0.01"
    },
    "order_type": "market"
  },
  "leverage": {
    "enabled": true,
    "type": "custom",
    "value": "12"
  }
}

Example Responses

Returns HTTP 201 Created on successful instantiation, or 422/403 on parameter validation failure.

create_smart_trade_201.json
201 Created
{
  "id": 30350494,
  "version": 2,
  "account": {
    "id": 32455218,
    "type": "binance",
    "name": "Spot - Binance",
    "market": "Binance Spot",
    "link": "/accounts/32455218"
  },
  "pair": "USDT_BTC",
  "instant": true,
  "status": {
    "type": "created",
    "basic_type": "created",
    "title": "Pending"
  },
  "leverage": {
    "enabled": false
  },
  "position": {
    "type": "buy",
    "editable": false,
    "units": {
      "value": "0.01",
      "editable": false
    },
    "price": {
      "value": "56283.73",
      "value_without_commission": "56283.73",
      "editable": true
    },
    "total": {
      "value": "562.8373"
    },
    "order_type": "market",
    "status": {
      "type": "to_process",
      "basic_type": "to_process",
      "title": "Pending"
    }
  },
  "take_profit": {
    "enabled": false,
    "price_type": "value",
    "steps": []
  },
  "stop_loss": {
    "enabled": false
  },
  "reduce_funds": {
    "steps": []
  },
  "market_close": {},
  "note": "",
  "note_raw": null,
  "skip_enter_step": false,
  "data": {
    "editable": false,
    "current_price": {
      "bid": "56283.72",
      "ask": "56283.73",
      "last": "56282.73",
      "quote_volume": "3870508107.5406402",
      "day_change_percent": "3.947"
    },
    "target_price_type": "price",
    "orderbook_price_currency": "USDT",
    "base_order_finished": true,
    "missing_funds_to_close": "0.0",
    "liquidation_price": null,
    "average_enter_price": null,
    "average_close_price": null,
    "average_enter_price_without_commission": null,
    "average_close_price_without_commission": null,
    "panic_sell_available": false,
    "add_funds_available": false,
    "reduce_funds_available": false,
    "force_start_available": true,
    "force_process_available": true,
    "cancel_available": false,
    "finished": false,
    "base_position_step_finished": false,
    "entered_amount": "0.0",
    "entered_total": "0.0",
    "closed_amount": "0.0",
    "closed_total": "0.0",
    "commission": "0.001",
    "created_at": "2024-08-06T14:42:25.528Z",
    "updated_at": "2024-08-06T14:42:25.528Z",
    "type": "simple_buy"
  },
  "profit": {
    "volume": null,
    "usd": null,
    "percent": "0.0",
    "roe": null
  },
  "margin": {
    "amount": null,
    "total": null
  },
  "is_position_not_filled": true
}