GET

/api/v1/smart_trades

Permission: SMART_TRADES_READSecurity: SIGNED

Returns a paginated list of SmartTrades. Use the query parameters below to filter, paginate, and sort the results.

See complete data structure and attribute specifications in the SmartTrade Entity documentation.
SmartTrade Entity

Query Parameters

12
account_idinteger

Returns entities related to the specified connected exchange account. Use List of connected exchanges to obtain account IDs.

pairstring

Name of the trading pair in Quentrade format (e.g. USDT_BTC, USDT_DOGE).

typestring

Filters SmartTrades by specific mode type: simple_buy, simple_sell, smart_sell, smart_buy, smart_trade, or smart_cover.

Allowed type values:
simple_buysimple_sellsmart_sellsmart_buysmart_tradesmart_cover
pageinteger default: 1

Page number for pagination sequence. Default: 1

per_pageinteger default: 10

Quantity of records to return on one page. Min: 1, Max: 100, Default: 10

statusstring

Filters SmartTrades by lifecycle status. Allowed values: all, active, finished, successfully_finish, cancelled, failed.

Allowed status values:
allactivefinishedsuccessfully_finishcancelledfailed
order_bystring default: status

Specifies the field by which to sort results: created_at, updated_at, closed_at, status, profit, or profit_percentage. Default: status

Allowed sort fields:
created_atupdated_atclosed_atstatusprofitprofit_percentage
order_directionstring default: DESC

Sets sorting order direction: ASC (ascending) or DESC (descending). Default: DESC

fromstring

ISO 8601 datetime string parameter for filtering records created on or after this timestamp.

tostring

ISO 8601 datetime string parameter for filtering records created on or before this timestamp.

basestring

Base currency ticker symbol (e.g. BTC, ETH, DOGE).

quotestring

Quote currency ticker symbol (e.g. USDT, USD, BTC).

Response Parameters

If successful, the response contains an array of SmartTrade entities matching the filter criteria.

Example Request

GET/api/v1/smart_trades?type=smart_trade&order_by=status&from=2022-01-01T00:00:00.000Z&to=2023-01-01T00:00:00.000Z

Example Responses

Returns HTTP 200 OK with an array of SmartTrade objects.

get_list_of_smart_trades_200.json
200 OK
[
  {
    "id": 28934742,
    "version": 2,
    "account": {
      "id": 32435557,
      "type": "kucoin",
      "name": "My Kucoin",
      "market": "Kucoin Spot",
      "link": "/accounts/32435557"
    },
    "pair": "USDT_DOGE",
    "instant": false,
    "status": {
      "type": "failed",
      "basic_type": "failed",
      "title": "Failed",
      "error": "You need to pass KYC on the exchange to trade on this pair"
    },
    "leverage": {
      "enabled": false
    },
    "position": {
      "type": "buy",
      "editable": false,
      "units": {
        "value": "10.0",
        "editable": false
      },
      "price": {
        "value": "0.1038",
        "value_without_commission": "0.1038",
        "editable": true
      },
      "total": {
        "value": "1.7542"
      },
      "order_type": "market",
      "status": {
        "type": "failed",
        "basic_type": "failed",
        "title": "Failed",
        "error": "You need to pass KYC on the exchange to trade on this pair"
      }
    },
    "take_profit": {
      "enabled": true,
      "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": "0.10379",
        "ask": "0.1038",
        "last": "0.10379",
        "quote_volume": "4062766.6804568596516",
        "day_change_percent": "1.2"
      },
      "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": false,
      "force_process_available": false,
      "cancel_available": false,
      "finished": false,
      "base_position_step_finished": true,
      "entered_amount": "0.0",
      "entered_total": "0.0",
      "closed_amount": "0.0",
      "closed_total": "0.0",
      "commission": 0.001,
      "created_at": "2024-04-05T02:53:32.225Z",
      "updated_at": "2024-04-05T02:54:39.074Z",
      "closed_at": "2024-04-05T02:54:39.045Z",
      "type": "smart_trade"
    },
    "profit": {
      "volume": null,
      "usd": null,
      "percent": "0.0",
      "roe": null
    },
    "margin": {
      "amount": null,
      "total": null
    },
    "is_position_not_filled": true
  }
]