Build with the AI Skill
Trade ItTrade ItDocs
Trades

Create trade

POST /api/tool/execute

Creates a stock or crypto trade for review. This operation is distinct from create_options_trade and does not accept an options legs array.

OAuth scopes: trade:write, tool:execute

Plan: Trade It Pro

Returns: Trade

Request body

tool_name*string

Selects this API operation.

create_trade

Parameters for this operation.

symbol*string

Ticker symbol of the asset to trade, e.g. TSLA

amount*number

How much to trade: a dollar value when unit is dollars, or a share count when unit is shares.

unit*string

Whether amount is in dollars or shares.

dollarsshares
buy_or_sell*string

Whether to buy or sell the asset.

buysell

Optional context displayed with the draft trade.

image_urlstring

Link to the screenshot or chart the user shared as the source of this trade idea, shown alongside the draft.

order_typestring

How the order is priced. Omit for a market order.

marketlimitstopstop_limit
limit_pricenumber

Maximum price per share to pay on a buy, or minimum to accept on a sell, in the asset currency. Set for limit and stop_limit orders.

stop_pricenumber

Price per share, in the asset currency, that triggers the order. Set for stop and stop_limit orders.

Take-profit exit for Buy entries. Not supported by all brokerages.

value*number

Exit trigger level

unitstring

Absolute price ($) or percent from entry price (%).

$%

Stop-loss exit for Buy entries. Not supported by all brokerages.

value*number

Exit trigger level

unitstring

Absolute price ($) or percent from entry price (%).

$%
time_in_forcestring

How long the order stays open: day expires at market close, gtc stays open until canceled. Omit to use the brokerage default.

daygtciocfok
account_idnumber | string

ID of the brokerage account to trade in, from get_accounts. Omit to use the user's default account.

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": "create_trade",
    "params": {
      "symbol": "TSLA",
      "amount": 1000,
      "unit": "dollars",
      "buy_or_sell": "buy",
      "order_type": "limit",
      "limit_price": 250,
      "time_in_force": "day",
      "account_id": 304
    }
  }'

Example response

200 OK

{
  "id": 842,
  "created_at": "2026-03-17T14:14:31.112Z",
  "updated_at": "2026-03-17T14:14:31.112Z",
  "user_id": 1,
  "asset_id": 88,
  "account_id": 304,
  "source": null,
  "image_url": null,
  "external_id": "draft-842",
  "type": 0,
  "action": "buy",
  "direction": null,
  "total_units": 4,
  "filled_units": 0,
  "canceled_units": 0,
  "notional_amount": { "amount": 1000, "currency": "USD" },
  "execution_price": { "amount": 250, "currency": "USD" },
  "status": "draft",
  "order_type": "limit",
  "limit_price": { "amount": 250, "currency": "USD" },
  "stop_price": null,
  "take_profit": null,
  "stop_loss": null,
  "time_in_force": "day",
  "placed_at": null,
  "executed_at": null,
  "error_message": null,
  "fee": null,
  "legs": null,
  "event": null,
  "analysis": null
}

Show the returned order to the user and obtain explicit approval before passing id to execute_trade.

Note

If automatic execution is enabled for the account, the returned status may already be placed instead of draft.

On this page