Where an Alert Sandbox fill price comes from
The Alert Sandbox fills a practice order at a price. That price is not always the same kind of price. Sometimes it is the venue's own quote, sometimes another venue's, and sometimes a number that came in with the request. Each priced fill says which, in a field called origin. An AI agent that runs the sandbox_run tool on Autoview's MCP server sees it as fill.origin, with a plain sentence beside it in fill.origin_note.
This page comes from the sandbox code that runs on our servers today. We read the code; we did not run sandbox orders for this guide.
The five origins, in the order the sandbox tries them
The first source that gives a price wins.
| Origin | Where the price came from |
|---|---|
own_key | Your own connected exchange account. Not available yet. A request that asks for it today is treated as caller. |
venue_ticker | The public ticker of the venue in e=, read when the alert arrives. |
reference_ticker | Another venue's public ticker, because the sandbox has no price source for the venue in e=. |
caller | A price passed in with the request. |
alert_fp | The fp= price written in the alert. |
The two ticker origins are live reads. caller and alert_fp are fallbacks: the sandbox uses them only when no live read priced the order. So if you pass a price for a market the sandbox can read itself, the fill uses the ticker and not your number.
venue_ticker: the venue's own quote
The sandbox reads a free public ticker for these connections:
- Kraken (
e=kraken) - Binance (
e=binance) - Coinbase Advanced (
e=coinbase_advanced) - Bybit (
e=bybit,e=bybit_spot,e=bybit_copy) - OKX (
e=okx)
An alert with no e= is read from Kraken. Only plain crypto pairs get a ticker price. Stocks, futures and forex symbols do not. On Coinbase Advanced, pairs quoted in USDT or FDUSD do not either.
A ticker read carries the best ask and the best bid, so the fill follows the book:
- A market buy fills at the ask. A market sell fills at the bid.
- A buy limit at or above the ask fills at the ask. A sell limit at or below the bid fills at the bid. The fill is never at your limit price.
- Any other limit comes back as
not_filled. The sandbox does not fill it later.
e=kraken s=BTCUSD b=buy q=0.01This market buy fills at Kraken's best ask, and the fill's price_label names the ticker and the side it used.
reference_ticker: a borrowed quote
If the order is BTC/USD and the venue in e= is one the sandbox has no ticker for, the sandbox prices it from Kraken XBTUSD and labels it reference_ticker. The fill rules are the same as for venue_ticker. The difference is what the number means: it is Kraken's price, not your venue's. Your venue may quote a little higher or lower at the same moment, so read the result as a check of the order, not of the price you would get there.
This applies to BTC/USD only. Any other pair on a venue with no ticker gets no borrowed quote.
caller: a price passed in
For a market the sandbox cannot read, the request can carry its own price, with a note of where it came from and when it was read. The fill is then labelled caller-supplied. The source and time you sent come back on the fill as caller_price_source and caller_price_time. It is never shown as Autoview's quote.
A caller price is one number, with no ask and bid. A market order fills at it. A limit fills when your price is at or better than the limit, and it fills at your price.
Two things to know:
- One symbol per call. A passed price is used only when every order in the alert is on the same symbol. With more than one symbol the sandbox cannot tell which one the price belongs to. It does not use the price, and an order nothing else prices comes back with the error
price_ambiguous. - Old prices still fill. If the price was more than 15 minutes old when it arrived, the fill uses it anyway and adds a
price_warningthat says how old it was.
For some venues that turn away the sandbox's own reads, Autoview reads the venue's public market data itself and passes that price in the same way. The fill still says caller, and origin_note tells you Autoview read the price from that venue.
alert_fp: the price in the alert
If nothing above priced the order, the sandbox uses fp= from the alert itself. In a TradingView alert that is usually fp={{close}}, the close of the bar that fired. Any other alert source can send its own number in fp=.
This is the weakest of the five. It is the price your alert source saw, not a price read from the venue. If the symbol's exchange prefix ends in _DL or _DLY, the sandbox marks the price as delayed.
When there is no price at all
If none of the five gives a price, the fill comes back as no_price with a price_error that names the reason and the steps to fix it:
| Code | What it means |
|---|---|
no_live_source | Autoview has no live price for this market or venue. Pass a price, or use a crypto venue from the list above. |
venue_read_failed | The venue's public ticker did not answer. Try again, or pass a price. |
price_ambiguous | A price was passed with an alert that has more than one symbol. Send one symbol per call. |
How to read a result
Look at origin before you trust the fill price. venue_ticker is the venue's own book at the moment the alert arrived. reference_ticker is close, but from another venue. caller and alert_fp are only as good as the number that was sent in.
For how many alerts a sandbox takes per minute and per day, see Autoview limits. To let an agent run sandbox orders for you, see Trade through the MCP.