SmartTrade entity

The SmartTrade entity is the core data model representing an intelligent order on Quentrade. It encapsulates the complete lifecycle of position entry, multi-target take profits, conditional stop loss triggers, funds reduction steps, and real-time trade execution metrics.

Attributes

18
idinteger

Unique Quentrade ID for this SmartTrade entity.

pairstring

Trading pair in Quentrade format (e.g. USDT_DOGE, BTC_USDT).

instantboolean

Indicates whether a Simple Buy or Simple Sale has been executed directly (true) or conditional SmartTrade (false).

accountobject

Details about the user exchange account where this trade is hosted.

statusobject

The general lifecycle status and descriptors for this SmartTrade entity.

leverageobject

Leverage settings applied to margin or futures SmartTrades.

positionobject

Complete position entry setup, order types, units, and price settings.

take_profitobject

Multi-step Take Profit ladder and trailing take profit configurations.

stop_lossobject

Stop Loss protective order settings, trailing SL, and timeout triggers.

reduce_fundsobject

Configuration and history of position fund reduction steps.

market_closeobject

Details of instant market close order if the position was terminated at market rates.

notestring

Optional user-defined note attached to this SmartTrade.

note_rawstring

Raw unformatted string of the user note.

skip_enter_stepboolean

Indicates if position opening was skipped (used for smart_sell or smart_buy on existing assets).

dataobject

Real-time state, available actions, average prices, and volume metrics.

profitobject

Detailed profit & loss metrics for this SmartTrade.

marginobject

Margin allocation details for leveraged trades.

is_position_not_filledboolean

Indicates whether position entry has not yet been filled.

SmartTrade Types Matrix

SmartTrade type is determined by the combination of instant, skip_enter_step, and position.type.

Type Valueinstantskip_enter_stepposition.typeDescription
simple_buytruefalsebuyInstant market/limit buy without TP or SL rules.
simple_selltruefalsesellInstant market/limit sell without TP or SL rules.
smart_sellfalsetruebuySell existing long spot/margin asset with Take Profit and Stop Loss, skipping new entry order.
smart_buyfalsetruesellCover existing short futures/margin position with TP and SL, skipping new entry order.
smart_tradefalsefalsebuyFull long trade: executes new entry position order plus optional multi-step TP and SL.
smart_coverfalsefalsesellFull short trade: executes new short entry order plus optional multi-step TP and SL.

Example SmartTrade Object

smart_trade_entity.json
200 OK
{
  "id": 12345678,
  "account": {
    "id": 32402783,
    "type": "binance_us",
    "name": "My Binance US",
    "market": "Binance US Spot",
    "link": "/accounts/32402783"
  },
  "pair": "USDT_DOGE",
  "instant": false,
  "status": {
    "type": "waiting_position",
    "basic_type": "waiting_position",
    "title": "Pending Position Opened"
  },
  "leverage": {
    "enabled": false
  },
  "position": {
    "type": "buy",
    "editable": false,
    "units": {
      "value": "15.0",
      "editable": false
    },
    "price": {
      "value": "0.10664",
      "value_without_commission": "0.10664",
      "editable": true
    },
    "total": {
      "value": "1.5996"
    },
    "order_type": "limit",
    "status": {
      "type": "order_placed",
      "basic_type": "order_placed",
      "title": "Placed"
    }
  },
  "take_profit": {
    "enabled": true,
    "price_type": "value",
    "steps": [
      {
        "id": 1006258048,
        "order_type": "limit",
        "editable": true,
        "units": {
          "value": null
        },
        "price": {
          "type": "last",
          "value": "0.11731",
          "percent": null
        },
        "volume": "100.0",
        "total": null,
        "trailing": {
          "enabled": false,
          "percent": null
        },
        "status": {
          "type": "idle",
          "basic_type": "idle",
          "title": "Pending"
        },
        "data": {
          "cancelable": true,
          "panic_sell_available": false
        },
        "position": 1
      }
    ]
  },
  "stop_loss": {
    "enabled": true,
    "price_type": "value",
    "breakeven": false,
    "order_type": "market",
    "editable": true,
    "price": {
      "value": null,
      "percent": null
    },
    "conditional": {
      "price": {
        "value": "0.1013",
        "type": "last",
        "percent": null
      },
      "trailing": {
        "enabled": false,
        "percent": null
      }
    },
    "timeout": {
      "enabled": false,
      "value": null
    },
    "status": {
      "type": "idle",
      "basic_type": "idle",
      "title": "Pending"
    }
  },
  "reduce_funds": {
    "steps": []
  },
  "market_close": {},
  "note": "Place for your note.",
  "note_raw": "Place for your note.",
  "skip_enter_step": false,
  "data": {
    "editable": true,
    "current_price": {
      "bid": "0.10713",
      "ask": "0.10726",
      "last": "0.10726",
      "quote_volume": "212795.59182",
      "day_change_percent": "1.861"
    },
    "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": true,
    "reduce_funds_available": false,
    "force_start_available": true,
    "force_process_available": true,
    "cancel_available": true,
    "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-12T16:24:38.360Z",
    "updated_at": "2024-08-12T16:37:11.480Z",
    "type": "smart_trade"
  },
  "profit": {
    "volume": null,
    "usd": null,
    "percent": "0.0",
    "roe": null
  },
  "margin": {
    "amount": null,
    "total": null
  },
  "is_position_not_filled": true
}