Skip to main content

Create SmartTrade

POST
/v2/smart_trades
Permission: SMART_TRADES_WRITE
Security: SIGNED

Creates a new SmartTrade.

This endpoint supports creating SmartTrade is available for accounts where the parameter smart_trading_supported is true.


Request Parameters

account_idintegerrequired

ID of the exchange account entity.

pairstringrequired

Trading pair in 3Commas format. Use endpoint All market pairs to get value for parameter.

instantboolean

Uses for creating SmartTrade type Simple Buy or Simple Sell. Set to true for creating of either.

default: false
skip_enter_stepboolean

Sets true to create a Simple Buy or Simple Sell while skipping the position entry step.

More attributes

leverageobject

Details of the Leverage applied to this SmartTrade.

Hide child parametersShow child parameters
enabledbooleanrequired

Enables leverage settings for this SmartTrade. Set to true to activate the parameter group.

default: false
typestring

Leverage type for the futures account: cros or isolated.

default: false
valueinteger

Cross or isolated leverage value. Leverage value is dependent on the exchange. It should be based on the rules of the exchange regarding currency rates, limits, and leverage data.

positionobject

Settings of the Position applied to this SmartTrade.

Hide child parametersShow child parameters
order_typestringrequired

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

typestringrequired

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

unitsobject

Details of units applied to this SmartTrade.

Hide child parametersShow child parameters
valuestringrequired

Amount of units for position trade. It should be based on the rules of the exchange regarding currency rates, limits, and leverage data.

priceobject

Details of Price applied to this SmartTrade.

Hide child parametersShow child parameters
valuenumberrequired

Price for limit or conditional type order.

conditionalobject

Settings of the conditional order applied to this SmartTrade.

Hide child parametersShow child parameters
order_typestring

The type of conditional order used to open the position: market,limit.

priceobject

Settings for the price of a conditional order in this SmartTrade.

Hide child parametersShow child parameters
typestring

Defines the price type used as a trigger for the conditional order. Possible values: bid, ask, last.

By default, ask is used for long positions, and bid for short positions.

valuenumber

Conditional trigger price. Used with order type conditional.

trailingobject

Details of the trailing applied for Position trade

Hide child parametersShow child parameters
enabledboolean

Indicates whether the trailing stop settings for the conditional order can be edited

percentnumber

The trailing stop percentage for the conditional order, specifying the distance from the market price at which the trailing stop is triggered

take_profitobject

Details of Take Profit settings and the steps applied to this SmartTrade.

Hide child parametersShow child parameters
enabledbooleanrequired

Enables Take Profit for this SmartTrade. Set to true to activate the parameter group.

default: false
stepsarray

Detailed information about each Take Profit step.

Hide child parametersShow child parameters
order_typestring

Take Profit order type for this SmartTrade: market or limit.

This parameter is required when take_profit[enabled] is set to true.

volumenumber

Take Profit order volume.

This parameter is required when take_profit[enabled] is set to true

priceobject

Settings for the price of Take Profit.

Hide child parametersShow child parameters
typestring

Type of price for Take Profit: bid, ask, or last.

valuenumber

Specific price value for Take Profit. Applied only if position has no trailing or trailing is finished.

percentnumber

Percentage-based price level for Take Profit. Applies only if position has no trailing or position trailing is finished.

trailingobject

Trailing settings for the last Take Profit step.

Hide child parametersShow child parameters
enabledboolean

Enables trailing for the last Take Profit step. Applies only to the last step of Take Profit.

default: false
percentnumber

Trailing percentage for Take Profit order.

min: 0,01
max: 100

This parameter is required when take_profit[steps][trailing][enabled] is set to true.

stop_lossobject

Details of Stop Loss settings applied to this SmartTrade.

Hide child parametersShow child parameters
enabledbooleanrequired

Enables Sto Loss for this SmartTrade. Set to true to activate the parameter group.

default: false
breakevenboolean

Enables the Move to Breakeven feature in SmartTrades. To use this feature, you must have at least two Take Profit steps.

default: false
order_typestringrequired

Stop Loss type for this SmartTrade: market or limit. This parameter is required when stop_loss[enabled] is set to true.

priceobject

Details of the Stop Loss price value configuration.

Hide child parametersShow child parameters
valuenumber

The price of the Stop Loss trade.

conditionalobject

Detailed information about each Take Profit step.

Hide child parametersShow child parameters
priceobject

Details of the price settings for the conditional Stop Loss order.

Hide child parametersShow child parameters
typestring

The type of price for the stop loss order used to close the position: bid, ask, last.

valuenumber

The specific price value set to trigger the Stop Loss order.

percentnumber

Represents a percentage-based stop-loss condition that is part of a more complex stop-loss order setup. Only if position has trailing and position trailing is not finished.

trailingobject

Details of the trailing configuration for conditional Stop Loss order.

Hide child parametersShow child parameters
enabledboolean

Enables a trailing price settings for a conditional Stop Loss order.

timeoutobject

Details of the timeout configuration.

Hide child parametersShow child parameters
enabledboolean

Indicates whether the timeout setting for the stop loss is enabled.

valueinteger

The value of the timeout setting for the Stop Loss trade.

notestring

Optional user-defined note for the SmartTrade.

minlength: 1
maxlength: 300

Example Request

POST
/v2/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"
}
}

Response Parameters

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

Example Responses

{
"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
}