Build with the AI Skill
Trade ItTrade ItDocs
Trades

Get trades

POST /api/tool/execute

Returns the authenticated user's recent trades using cursor pagination. Use it to refresh an order after execution or cancellation.

OAuth scopes: trade:read, tool:execute

Plan: Trade It Pro

Returns: a page of Trade[] in trades

Request body

tool_name*string

Selects this API operation.

get_trades

Parameters for this operation.

limitinteger

Number of trades to return per page. Omit for 12.

cursornumber | string

Cursor from a previous get_trades response. Pass next_cursor to continue paginating older trades.

account_idnumber | string

Only return trades for this brokerage account. Omit for every account.

statusstring

Only return trades in this status group. Omit or pass all for every status.

allopendraftscompletedfailed
refreshboolean

When true, requests the freshest available brokerage data. Real-time refresh requires a Pro plan and has a 1 minute per-account cooldown. Omit or false to return the last synced data.

Example request

curl https://api.tradeit.app/api/tool/execute \
  --request POST \
  --header "Authorization: Bearer $TRADE_IT_ACCESS_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "tool_name": "get_trades",
    "params": {
      "limit": 20,
      "refresh": true
    }
  }'

Example response

200 OK

{
  "trades": [
    {
      "id": 842,
      "created_at": "2026-03-17T14:14:31.112Z",
      "updated_at": "2026-03-17T14:21:54.937Z",
      "user_id": 1,
      "asset_id": 88,
      "account_id": 304,
      "external_id": "114",
      "type": 0,
      "action": "buy",
      "direction": null,
      "total_units": 4,
      "filled_units": 0,
      "canceled_units": 0,
      "notional_amount": null,
      "execution_price": null,
      "status": "placed",
      "order_type": "limit",
      "limit_price": { "amount": 250, "currency": "USD" },
      "stop_price": null,
      "time_in_force": "day",
      "placed_at": "2026-03-17T14:21:54.937Z",
      "executed_at": null,
      "error_message": null,
      "fee": null,
      "legs": null,
      "event": null,
      "analysis": null,
      "asset": {
        "id": 88,
        "name": "Tesla, Inc.",
        "ticker": "TSLA",
        "logo_url": "...",
        "type": 2,
        "exchange": "NASDAQ",
        "country": "US"
      }
    }
  ],
  "next_cursor": 842,
  "has_more": true
}

To fetch the next page, pass the returned next_cursor as params.cursor.

On this page