Create SmartTrade
Creates a new SmartTrade.
This endpoint supports creating SmartTrade is available for accounts where the parameter smart_trading_supported is true.
Request Parameters
Trading pair in 3Commas format. Use endpoint All market pairs to get value for parameter.
Uses for creating SmartTrade type Simple Buy
or Simple Sell
. Set to true
for creating of either.
false
Sets true to create a Simple Buy
or Simple Sell
while skipping the position entry step.
More attributes
Details of the Leverage applied to this SmartTrade.
Hide child parametersShow child parameters
Enables leverage settings for this SmartTrade. Set to true
to activate the parameter group.
false
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.
Settings of the Position applied to this SmartTrade.
Hide child parametersShow child parameters
The type of position trade for this SmartTrade: market
, limit
, or conditional
.
Hide child parametersShow child parameters
Amount of units for position trade. It should be based on the rules of the exchange regarding currency rates, limits, and leverage data.
Details of Price applied to this SmartTrade.
Hide child parametersShow child parameters
Hide child parametersShow child parameters
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.
Details of Take Profit settings and the steps applied to this SmartTrade.
Hide child parametersShow child parameters
Enables Take Profit for this SmartTrade. Set to true
to activate the parameter group.
false
Hide child parametersShow child parameters
Take Profit order type for this SmartTrade: market
or limit
.
This parameter is required when take_profit[enabled]
is set to true
.
Take Profit order volume.
This parameter is required when take_profit[enabled]
is set to true
Hide child parametersShow child parameters
Specific price value for Take Profit. Applied only if position has no trailing or trailing is finished.
Hide child parametersShow child parameters
Details of Stop Loss settings applied to this SmartTrade.
Hide child parametersShow child parameters
Enables Sto Loss for this SmartTrade. Set to true
to activate the parameter group.
false
Enables the Move to Breakeven feature in SmartTrades. To use this feature, you must have at least two Take Profit steps.
false
Stop Loss type for this SmartTrade: market
or limit
.
This parameter is required when stop_loss[enabled]
is set to true
.
Detailed information about each Take Profit step.
Hide child parametersShow child parameters
Hide child parametersShow child parameters
Example Request
{
"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
- 201 Created
- 422 Unprocessable Entity
- 403 Forbidden
{
"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
}
{
"error": "record_invalid",
"error_description": "Invalid parameters",
"error_attributes": {
"position": [
"is invalid"
],
"position.total": [
"must be less than or equal to 9000000.0"
],
"units_to_buy": [
"must be less than or equal to 9000.0"
]
}
}
{
"error": "Forbidden",
"error_description": "Account not owned by current user."
}