entry
Place an order on any exchange you have linked to a hook, right now — or manage existing orders/positions on `symbol` via `action` (cancel open orders, close open positions, or flat/liquidate everything — Tradovate only). You fill structured order fields (symbol, side, quantity, type, price, trigger) — Autoview assembles the order for you. Or pass alert: the same command text a webhook body carries, which reaches the engine unchanged, so every syntax key a webhook supports is supported here. Dry-run by default: a bare call returns the parsed order without placing it; set live:true to place a real order. On a paid exchange without an active Autoview subscription, live:true is silently downgraded to a dry-run — the response then carries dry_run_forced:true and a dry_run_reason explaining why (see the `setup` tool for which exchanges this applies to, and where to subscribe). The order is relayed to the exchange asynchronously: this returns { queued, trace, canonical_id } immediately, not the fill. For a dry-run (the default), entry waits up to ~10s for the exchange's own reply and returns it as dry_run_events when it arrives in time — otherwise dry_run_pending:true, and you can poll the `events` tool with canonical_id (or trace) a moment later. Credentials come from hook_id -- the credentials you already linked to one of your hooks (see the `hooks` or `setup` tool) -- so no exchange secret is passed with the order. exchange is optional when that hook links to exactly one exchange; pass it explicitly if the hook links to more than one. If you don't have credentials linked yet, use the `command` tool to check an order's shape without a hook. Live limits: a live:true order (not cancel/close/flat) must fit this token's user-set caps AND, once your user has set them, the account caps (they cover every agent token on the account together; with none set, the token's caps alone apply), and any limits your user set for one exchange or one symbol on it, which can only be tighter; read them all with `live_limits`. It must be a limit order with price and a plain number quantity, in a USD or USD-stablecoin quoted market; the order's USD notional, the higher of quantity x limit price and quantity x trigger price (and on a sell, quantity x current bid from the exchange's quote when that is higher), must be at most the token's max order size (and the account's, if set), and today's totals (UTC day, counted at dispatch; per token, and for the whole account if an account daily limit is set) at most those daily limits. Refusal codes, each with fix steps: agent_trading_paused (your user paused all agent trading on the account; cancel/close/flat still work), agent_token_paused (your user paused this one token; cancel/close/flat still work), caps_not_set, caps_unavailable, cap_max_order_exceeded, cap_account_max_order_exceeded, cap_daily_limit_exceeded, cap_account_daily_limit_exceeded, cap_venue_max_order_exceeded, cap_venue_daily_limit_exceeded, cap_venue_daily_orders_exceeded (an exchange limit), cap_symbol_max_order_exceeded, cap_symbol_daily_limit_exceeded, cap_symbol_daily_orders_exceeded (a limit on one symbol on that exchange), cap_order_rate_exceeded (this token's limit on live orders per rolling minute, if your user set one; wait retry_after_s seconds), cap_limit_price_required, cap_quantity_unsupported, cap_quote_unsupported, cap_market_unsupported. Only your user can set or raise the caps, or pause and resume agent trading, at /account/tokens/. Requires your Autoview account token, except for a paper fill. No token? On BINANCE, BINANCEFUTURES, BINANCEUS, BITFINEX, BITGET, BITGETMIX, BITGETMIXCOPY, BYBIT, BYBITCOPY, BYBITSPOT, GEMINI, KUCOINFUTURES, KUCOINFUTURESCOPY, leave out token and hook_id, pass exchange and one order (structured, or one alert line with no & sections and no | or line breaks), and entry fills it on paper at the quote an Autoview zone reads from that venue's public market data: a buy at the ask, a sell at the bid, for a market order and for a limit order that crosses the quote (its limit price is echoed as limit_price). A limit order that does not cross the quote (a buy limit below the ask, a sell limit above the bid) is stored instead as an open paper order and returns { paper_order: true, order: { order_id, symbol, side, qty, limit_price, state: "open" }, cash, note }, moving neither cash nor the position; it fills at its limit price the first time a later quote crosses it, checked when paper_ledger reads that ledger or entry sends a paper order on that symbol to it (orders it filled come back as filled_orders). Cancel it with action cancel and order_id on the same ledger (paper_cancel: true; paper_order_unknown if that ledger has no such order, paper_order_not_open if it already filled or was cancelled). Every stored paper fill returns fill_id. An alert id= (your own order id, one word of up to 64 characters, or paper_sender_id_invalid) comes back as sender_id. On an account paper ledger (token, no hook_id) each fill also writes one entry of type paper_fill to the events tool, with canonical_id, fill_id and sender_id; the reply returns canonical_id, and a resting order uses its order_id as its canonical_id. A guest ledger writes no events. Nothing is sent to the exchange. The first fill opens a paper ledger for that exchange and returns paper_id, shown only once; pass it as paper_id on later no-token fills on the same exchange and each fill is recorded there; read it back with paper_ledger and that paper_id. It returns { paper_fill, exchange, fill, quote, stored, paper_id (first fill only), position: { symbol, qty (signed, negative is short), avg_price }, realized, cash }. cash is null until paper_reset sets a starting balance on the ledger; once set, a buy takes its notional from cash and a sell adds its notional, and a buy that costs more than the cash fills nothing (paper_insufficient_cash). Where the ledger is not available yet it returns stored:false and keeps nothing between calls. quantity must be a plain number of units; live:true, hook_id, action (except cancel with order_id), brackets, a percent or currency size, and more than one order are refused with a code (paper_live_refused, paper_hook_refused, paper_management_unsupported, paper_bracket_unsupported, paper_quantity_unsupported, paper_single_order_only, paper_order_invalid); so are a paper_id no ledger has (paper_id_unknown) and one from another exchange (paper_id_other_exchange). If the ledger cannot be written nothing fills (paper_ledger_unavailable). With no quote it fills nothing and returns the quote's code (quote_no_responders, quote_timeout, quote_no_answer, quote_unconfigured). No-token calls share the guest limits: 10 per hour per connection, 200 per hour for all guests (guest_rate_limited). With a token and no hook_id on those same venues, entry fills on paper the same way on the account's own paper ledger for that exchange, opened by the first fill (read it with paper_ledger and the token, set its cash with paper_reset). Any token may do this, including a dry-run-only one, and the guest limits do not apply. To keep a guest paper ledger after your user signs up, send its paper_id with the token: the first tokened call moves that ledger onto the account (the reply carries claimed:true) and the fill lands on it; from then on use the token and leave paper_id out, as the paper_id no longer works without the token. The same order refusals apply, plus: live:true (paper_live_refused: send hook_id for a hook linked to that exchange to trade live), a paper_id another account already took (paper_id_claimed: leave paper_id out), a paper_id when the account already has its own paper ledger on that exchange (paper_id_not_merged: the account ledger is kept and the guest ledger is not merged; leave paper_id out, or leave the token out to keep the guest ledger), paper_id_unknown, paper_id_other_exchange, and an exchange outside the token's scope (paper_exchange_out_of_scope). Wit
Schema valid · SHA-256 d63e78d73df8…
View input schema
{
"type": "object",
"properties": {
"token": {
"description": "your Autoview account token — an av_mcp_ personal access token, generate one at /account/tokens/ on the Autoview site. Omit this if your MCP client already sends it as an `Authorization: Bearer` header (Claude Code, Cursor, and most non-browser clients do this automatically once configured).",
"type": "string"
},
"exchange": {
"description": "the exchange to trade on: any exchange configured on Autoview (see the `catalog` tool; the exchange itself validates the order). Omit when hook_id links to exactly one exchange (see the hooks tool) -- otherwise required to disambiguate",
"type": "string",
"enum": [
"ALPACA",
"ALPACAPAPER",
"BINANCE",
"BINANCEDELIVERY",
"BINANCEDELIVERYTESTNET",
"BINANCEFUTURES",
"BINANCEFUTURESTESTNET",
"BINANCETEST",
"BINANCEUS",
"BITMEX",
"BITMEXTESTNET",
"BITFINEX",
"BITGET",
"BITGETDEMO",
"BITGETMIX",
"BITGETMIXCOPY",
"BITGETMIXDEMO",
"BYBIT",
"BYBITCOPY",
"BYBITCOPYTESTNET",
"BYBITSPOT",
"BYBITSPOTTESTNET",
"BYBITTESTNET",
"CAPITAL",
"CAPITALDEMO",
"CHARLESSCHWAB",
"COINBASE",
"CRYPTO",
"CRYPTODEMO",
"DERIBIT",
"DERIBITTESTNET",
"GATE",
"GATEFUTURES",
"GATEFUTURESTESTNET",
"GEMINI",
"GEMINISANDBOX",
"HUOBI",
"HUOBIFUTURES",
"HUOBILINEAR",
"HUOBISWAP",
"HYPERLIQUID",
"HYPERLIQUIDTESTNET",
"KRAKEN",
"KRAKENFUTURES",
"KUCOIN",
"KUCOINFUTURES",
"KUCOINFUTURESCOPY",
"OANDA",
"OANDAPRACTICE",
"OKX",
"OKXDEMO",
"OKXEEA",
"OKXEEADEMO",
"OKXUS",
"OKXUSDEMO",
"TRADESTATION",
"TRADESTATIONSIM",
"TRADOVATE",
"TRADOVATESIM"
]
},
"hook_id": {
"description": "use the credentials already linked to this hook (see the `hooks` tool). The hook must belong to your account. Required with a token, except on a paper fill venue, where leaving it out fills on the account's own paper ledger; leave it out for a no-token paper fill.",
"type": "string"
},
"symbol": {
"description": "the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD. Required unless alert is set",
"type": "string"
},
"alert": {
"description": "the raw command text a webhook body carries, sent to the zone exactly as a webhook would send it, so every key the engine reads works here too (for example ef=any, ac=/acg=, tif=, l=, delay=, cc/bcc, & legs, | lines; see autoview.com/syntax/ and explain_command). Replaces every structured order field (passing both is refused). Dry-run unless live:true: without it every d= is replaced by d=1. Live, every line needs s=, and the live caps read each opening line's base order (q= a plain number, fp= the limit price): each line must fit the max order size on its own, and their sum is counted against today's limits in one go, so if the sum does not fit, no line is placed. c= and b=flat lines are not capped. On an exchange that sends one order per & section (OANDA, Capital, Charles Schwab and others), each & section counts against every live cap as one more order, at its own q= or the base q=, whichever is larger; a section may set q= there but no other order key. On an exchange that merges & into one order (Binance, Bybit, Kraken and others) the line counts once. A refusal for one line names it (line).",
"type": "string"
},
"action": {
"description": "manage EXISTING orders/positions on symbol instead of placing a new one: cancel = cancel open orders, close = close open positions, flat = cancel every order AND close every position (the Tradovate connector only: TRADOVATE, TRADOVATESIM, TRADOVATETEST; any other exchange refuses it as unsupported). When set, side (if given) is an optional buy/sell filter (not applicable to flat), and quantity/type/price/trigger/brackets/unit are ignored.",
"type": "string",
"enum": [
"cancel",
"close",
"flat"
]
},
"side": {
"description": "order direction; required unless action is set, where it is an optional buy/sell filter for cancel/close (omit for flat)",
"type": "string",
"enum": [
"buy",
"sell"
]
},
"quantity": {
"description": "order size: a positive number (contracts/units), or a percent-of-balance string like \"50%\" (1-100%). Required unless action is set. On TRADOVATESIM (no live market-data feed), a percent quantity also requires priceRef — see priceRef.",
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0
},
{
"type": "string",
"pattern": "^(100|[1-9][0-9]?)%$"
}
]
},
"type": {
"description": "order type; omitted = limit at the ticker (the same default as a plain alert: t=limit, no price). An explicit limit, post_only, ioc, fok or stop_limit needs a price; stop/stop_limit need a trigger; an attached bracket needs type market explicitly. stop/stop_limit need a trigger. An entry stop keeps the order side. Not every exchange supports every type; explain_command lists the known caveats per exchange.",
"type": "string",
"enum": [
"market",
"limit",
"post_only",
"ioc",
"fok",
"stop",
"stop_limit"
]
},
"price": {
"description": "absolute limit price; required for limit, post_only, ioc, fok, and stop_limit. Also accepted (optional) on a market order as a stand-in for priceRef.",
"type": "number"
},
"trigger": {
"description": "absolute trigger (stop) price; required for stop and stop_limit",
"type": "number",
"exclusiveMinimum": 0
},
"priceRef": {
"description": "reference price for percent sizing and brackets (price=); percent quantity divides balance by it. Optional on exchanges with a live quote feed (the zone fetches one); REQUIRED on TRADOVATESIM (no live market-data feed — Tradovate charges separately for it, and a Simulation account never has it) whenever quantity is a percent, unit is \"currency\", OR any of stopLoss/takeProfit/trailStop is set. Omitting it there fails late with a live exchange error instead of a clear one — pass an approximate current price.",
"type": "number",
"exclusiveMinimum": 0
},
"sizeAgainstEquity": {
"description": "for a percent quantity, size against equity instead of available balance (y=equity)",
"type": "boolean"
},
"unit": {
"description": "\"currency\" treats quantity as a CURRENCY amount to convert to units at the resolved price (u=currency) — e.g. on BTC/USD, quantity:10 with unit:\"currency\" buys $10 of BTC instead of 10 BTC. Only meaningful with a fixed (non-percent) quantity. On TRADOVATESIM also pass priceRef (or price) — see priceRef.",
"type": "string",
"enum": [
"units",
"currency"
]
},
"stopLoss": {
"description": "attached bracket stop-loss distance from the fill: points (10) or a percent string such as 3%; a sign, if given, must point the right way); pair with takeProfit for a fixed OCO, or with a trailing leg. Market entry only; refused up front where the connector's sl/tp handling is unverified or its config lists them unsupported; on some exchanges sl/tp reshape the order instead of attaching (explain_command names the caveat). On TRADOVATESIM also pass priceRef (or price) — see priceRef.",
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0
},
{
"type": "string"
}
]
},
"takeProfit": {
"description": "attached bracket take-profit distance from the fill: points (20) or a percent string such as 5%; pair with stopLoss, or with a trailing leg. On TRADOVATESIM also pass priceRef (or price) — see priceRef.",
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0
},
{
"type": "string"
}
]
},
"trailStop": {
"description": "attached TRAILING stop as a POINT distance the stop keeps behind price once the trail activates (atsl=). Requires trailActivate. Rides winners: pairs with a stopLoss (hard stop + trail) or stands alone. Market entry, trail-capable exchanges only (Tradovate). On TRADOVATESIM also pass priceRef (or price) — see priceRef.",
"type": "number",
"exclusiveMinimum": 0
},
"trailActivate": {
"description": "POINTS of profit the price must move before the trailing stop starts trailing (atx=). Required whenever trailStop is set",
"type": "number",
"exclusiveMinimum": 0
},
"trailFrequency": {
"description": "how often the trailing stop re-checks price (atf=); defaults to 1 if omitted",
"type": "number",
"exclusiveMinimum": 0
},
"live": {
"description": "false (default) = a dry-run preview that returns the parsed order without placing it; true = place a real order on your live account",
"type": "boolean"
},
"paper_id": {
"description": "paper fill only: the paper_id your first no-token paper fill on this exchange returned, to record this fill on the same paper ledger; leave it out to open a new one. With a token (and no hook_id) it moves that guest ledger onto the account, first claim wins",
"type": "string"
},
"order_id": {
"description": "paper only, with action cancel: the order_id of an open paper limit order (entry returned it when the limit rested; paper_ledger lists it). Cancels that one order on your own paper ledger",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}