sandbox_results
Read the simulated fills stored for a sandbox_id (from sandbox_run, or any Alert Sandbox webhook id), newest first. No token, no account, no key: simulation only, no real order was placed. Returns { sandbox: true, real_order_placed: false, notice, sandbox_id, alerts: [{ received_at, seq?, orders?: [same shape as sandbox_run orders, including fill.status (filled, not_filled or no_price), fill.origin, fill.price_label, fill.price_warning and fill.price_error], error? }], more, next_step } where more is true when older alerts exist beyond this page. next_step = { market, practice_venue, practice_venue_name, same_venue, free, connect_url, text } names the free testnet or demo venue for the newest order's market and the page where your user connects it; practice_venue is null when Autoview has no match, and free is false when the only demo is not free to open. Pass text to your user as the next step. A refusal returns { error, code, fix }: bad_sandbox_id (malformed id), sandbox_refused (e.g. the id belongs to an account), sandbox_rate_limited, sandbox_bad_answer, sandbox_unreachable, sandbox_timeout, internal_error. Do what fix says.
Fill model (every fill carries it as fill_model): each order fills at one snapshot price taken when the alert arrives, either the venue's public ticker (its best ask for a buy and best bid for a sell when the venue gives them, otherwise its last trade) or a price you supply (price, or fp= in the alert). A market order fills at that price. A marketable limit (a buy limit at or above it, a sell limit at or below it) fills at that price, never at the limit; any other limit stays open as not_filled and never fills later. The sandbox does not model order-book depth, slippage, latency or partial fills, and a caller price or last trade carries no spread, so live results will differ. For live-like execution, use the venue's own testnet or demo account through Autoview (pricing lists them with demo: true, at $0).
sandbox_run
Run one alert through Autoview's Alert Sandbox and see exactly what Autoview would do with it: the parsed orders and a simulated fill for each. No token, no account, no exchange key: simulation only, no real order is placed.
Send the order one of two ways: command (alert text: the classic key=value form "e=kraken s=BTCUSD b=buy q=0.01" or a v3 line "buy(BTCUSD, 0.01)"), or order (structured: { "exchange": "oanda", "symbol": "EURUSD", "side": "buy", "qty": 1000 }). Not both. A limit order is { ..., "type": "limit", "limit_price": 50000 }. order takes only exchange, symbol, side, qty, type and limit_price: order.price is refused (order_bad_field), because the top-level price is a different thing, the market price you read, not a limit.
Prices. Each fill is priced in this order and labelled with where the price came from (fill.origin): own_key (the user's own connected account; not available yet, coming), venue_ticker (the venue's free public ticker, e.g. Kraken, Coinbase, OKX, Bybit for crypto), caller (a price you pass in price), alert_fp (fp= in the alert, e.g. TradingView {{close}}). If Autoview has no price for the market (stocks, most forex, futures), read the price from your own user's data source and pass it as price (plus price_source and price_time); the fill is then labelled caller-supplied, never presented as Autoview's quote.
Returns { sandbox: true, real_order_placed: false, notice, sandbox_id, webhook_url, compiled?, orders: [{ exchange, side, symbol, qty, type, order_price?, fill }], explanation?, next }.
Fill shapes. A priced fill is { status: "filled", price, price_label, price_source, origin, origin_note, priced_at, price_age_ms, side_of_book?, limit?, price_warning?, caller_price_source?, caller_price_time? }. price_label is Autoview's short label for where the fill price came from, for example "Kraken XBTUSD best ask" (a venue fill at the ask) or "caller-supplied" (your price). price_source is the same label under its older name, kept for existing readers. The source and time you sent with a caller price are echoed in caller_price_source and caller_price_time. A market order, or a limit the book has reached (a buy limit at or above the ask, a sell limit at or below the bid; with a caller price, at or better than it), fills at the ask, bid or your price, never at the limit. price_warning is set when the price was more than 15 minutes old at receipt (for example "The caller price is 5h 2m old"): the fill still used it, so read a fresh price if you want a current fill. A limit the price has not reached is { status: "not_filled", price: null, reference_price, limit, price_label, side_of_book?, origin, origin_note, note, fix }: nothing filled and the sandbox never fills it later; do not pass price again, read fix. An unpriced fill is { status: "no_price", price: null, note, website_note?, price_error? }: price_error is { code, market, message, fix: [steps] }; follow the fix steps and call again.
price_error codes (in fill.price_error, on a no_price fill): no_live_source (Autoview has no live price for this market or venue; pass price, or set e= to a priced crypto venue), venue_read_failed (the venue's public ticker did not answer; retry, or pass price), price_ambiguous (price was sent with an alert that has more than one symbol; send one symbol per call). bad_price_param is the website's code for malformed price fields; it arrives as the refusal bad_price with price_error beside it.
Refusal codes (the whole call returns { error, code, fix }; do what fix says): command_required, command_and_order, bad_v3_line, bad_sandbox_id, order_missing_field, order_bad_field, bad_price, bad_price_source, bad_price_time, price_fields_without_price, sandbox_refused, sandbox_rate_limited, sandbox_bad_answer, sandbox_unreachable, sandbox_timeout, internal_error.
sandbox_id is minted when you omit it; pass it back to add more alerts to the same sandbox, and read them with sandbox_results. Any webhook sender can also POST alerts to webhook_url. Call pricing to see what going live costs.
Fill model (every fill carries it as fill_model): each order fills at one snapshot price taken when the alert arrives, either the venue's public ticker (its best ask for a buy and best bid for a sell when the venue gives them, otherwise its last trade) or a price you supply (price, or fp= in the alert). A market order fills at that price. A marketable limit (a buy limit at or above it, a sell limit at or below it) fills at that price, never at the limit; any other limit stays open as not_filled and never fills later. The sandbox does not model order-book depth, slippage, latency or partial fills, and a caller price or last trade carries no spread, so live results will differ. For live-like execution, use the venue's own testnet or demo account through Autoview (pricing lists them with demo: true, at $0).