Zhiyong_AI
Home / Guides / Data Sources & Price References

The Market an AI Tool Sees Isn't the One You See: Data Sources, Latency and Price References

By Qin ShenUpdated 2026-09-02About 10 min read
Zhiyong AI site cover image; this guide covers where market data comes from, the three price references and latency

At the same moment, you can read three different prices in three different places. Nothing is broken; they were never the same thing to begin with. Each platform matches its own orders and keeps its own book, aggregator sites publish a weighted average, and a derivatives index price is a third calculation again. Add a layer of latency on top and the gap gets wider still. Separating those layers clears up a whole category of "why don't my numbers match reality".

Accept one thing first: there is no such thing as the price

Crypto has no central exchange, and nothing like the consolidated quote that US equity markets publish. Every platform matches its own orders, so the same pair genuinely trades at slightly different prices in different places. Most of the time that difference is small enough that you never notice. During a violent move, or when one venue's liquidity thins out, it can open up a long way.

Three common sources, and they are not the same kind of thing:

  • The traded price on one platform — a trade that actually happened, but it speaks only for that platform.
  • An aggregator's price — several venues combined by volume or some other weighting. It's a statistic, not a price any venue will actually fill you at.
  • A derivatives index price — composed from several sources under a published rule, usually with outlier handling. It exists precisely so that one misbehaving source can't blow up a crowd of positions.

Which means "what's the price right now" is, strictly speaking, an incomplete question. It needs two more words: where, and which one.

Three price references, and mixing them up flips your conclusion

This is the most practical section on the page. In one market at one moment there are at least three prices alive at once, each with its own job:

ReferenceWhat it actually isWhat to use it forWhat goes wrong
Last traded priceThe price of the trade that just filledWatching the trend, drawing charts, a rough readIt's past tense, and it's somebody else's fill — not necessarily one you can get
Best bid / best askThe prices sitting there right now waiting to trade with youPlacing orders, working out your real costIgnore the spread and your cost estimate is permanently optimistic
Index / mark priceA reference price composed under a ruleJudging distance to liquidation, valuing unrealised P&LTreating it as a fill price, or estimating liquidation from a traded price — both directions are wrong

Most of the time the three sit so close together that you'd never bother distinguishing them. The awkward part: they spread apart exactly when you need them to be accurate — violent moves, thinning liquidity, a book getting punched through. Quiet for a long stretch, then expensive all at once.

Mark price deserves its own warning. Plenty of platforms calculate liquidation from the mark price rather than the last traded price, specifically so that one wick can't sweep a crowd of positions out. So "the last price hasn't reached my liquidation level" doesn't mean you're safe, and seeing the last price flash through it doesn't necessarily mean you're gone either. Which price a platform uses and how it computes it varies, so read the rules page of the venue you actually trade on — this is not a detail to carry around from memory.

Latency piles up one leg at a time

Between a trade happening and it appearing on your screen there are several legs: the matching engine finishing internally, the print going out over the market data channel, the network carrying it to you, then your client or your program parsing and rendering it. Each leg costs time, and the sum is the lag you feel.

How much lag depends on which channel you're on, where you are, and what your connection is doing. Any hard-coded millisecond figure is untrustworthy, including the ones you've read elsewhere — an order of magnitude between environments is perfectly normal.

One distinction is worth knowing, though: asking for a price once and subscribing to a continuous stream have completely different latency characteristics. A polling interval is a latency floor in itself. Query every few seconds and you are guaranteed to be a few seconds behind, no matter how much network tuning you do.

There's a further layer people skip: the chart you're looking at has probably been aggregated and thinned. To draw smoothly, a front end doesn't plot every single trade. That line is a smoothed version of reality, not reality.

The last candle hasn't closed, and it can still change

The bar on the far right is unclosed; it's still growing. The close it shows right now is just the last price, and it can be a different number a second later. Its high and low can be revised too. Everybody knows this, and almost nobody holds it in mind while actually watching the screen.

Which produces a very common illusion: you see a bar sitting above some level, you get in on the strength of it, and when the bar finally closes it has pulled back below — it never actually closed above at all. You were reading something that hadn't been finalised yet.

So any judgement that depends on "on a closing basis" has to wait for the bar to actually close. In a backtest this is automatic, because historical bars are all finished. Live, it isn't. This is one of the most classic sources of drift between a backtest and live trading, and it won't show up anywhere in a backtest report.

From experience

The one that cost me was writing "breakout" into a program without ever pinning down whether it meant the unclosed price or the close. The program ran fine and kept producing signals — just noticeably more of them than I saw when I went back over the chart myself, because it counted the instant price touched the level while I was reading finished bars. When the two sides disagreed my first thought was that the data was wrong; it took a long time to work out that I had never defined "when does it count". These are miserable to track down, because nothing anywhere throws an error.

The number an AI tool is holding is usually older than the one on your screen

When an AI tool quotes you a price, that number isn't necessarily from this moment. The usual explanations: it's reading a snapshot that refreshes on a schedule; it's calling some third-party aggregated feed; or it has taken something it retrieved a few minutes ago and treated it as "now".

The trouble is that when it repeats that number it doesn't attach a timestamp, and it won't volunteer that the figure is a few minutes old. What you see is a clean number with its age invisible.

The reference is just as vague. Is it giving you a last traded price? Some aggregate? A derivatives index? It usually doesn't say, and sometimes it genuinely doesn't know — the data it received may not have been labelled either.

The conclusion isn't "don't use it", it's a division of labour: any number you're going to do arithmetic with should not be copied out of a chat window. Let it help you understand the concept and set up the calculation; go and get the number from the book you're actually going to trade on. Why models are unreliable in this particular way is covered separately in Why You Can't Just Act on the Trading Advice an AI Gives You.

Where this quietly costs you money

Kept abstract, all of the above is easy to read and forget. Here are two concrete situations; you'll probably want to redo some of your own arithmetic afterwards.

Situation one: the return you worked out from the last traded price doesn't match what you end up with.
· You estimated the return on a round trip from the last traded price, and it looked acceptable. In execution, a buy mostly lifts the ask and a sell mostly hits the bid, so you pay the spread once on the way in and once on the way out.
· The thinner the market and the more obscure the asset, the wider that gap — and it comes out of every single fill, so the more you trade the larger the share it takes.
· You remember to count the fee. Plenty of people never count the spread, and it is frequently the more expensive of the two.
Situation two: using an aggregated price to estimate distance to liquidation gives you a margin of safety that isn't real.
· You read a price on some market data site, subtract your liquidation level, and conclude there's plenty of room.
· But that platform liquidates off its own mark price, and its composition rule need not match the aggregator's. The two numbers are not the same thing.
· This mistake is badly asymmetric: overestimate the distance and you're merely conservative; underestimate it and you're liquidated. So for anything liquidation-related, use only what the platform you opened the position on is showing you, never an outside figure as a stand-in.

If all this logic has been handed to a program to run automatically, there's a further layer of runtime problems on top — a program won't raise an error because it used the wrong reference, it will simply keep being wrong. That part is in Disconnects, Rate Limits and Parameter Drift.

Decide from the order book, review with one fixed reference

If you keep one sentence from this page, keep that one. It unpacks into two things:

  • To place an order, look at the best bid and ask on the platform you're actually placing it on. Not an aggregate, not another venue's traded price, not the smoothed line on the chart. Whether you fill, and at what, is decided by that book and nothing else.
  • To review, fix one source and one reference and never swap mid-way. Comparing over time only means anything if the reference is constant. Even if the one you picked isn't the "most accurate", a consistent series still supports a judgement about direction; a mixed one supports nothing.

Mixing is the thing to avoid above all: this venue's last price today, an aggregate tomorrow, a third number when you check liquidation. The conclusions contradict each other and you can't even tell which step went wrong.

One small habit that saves a lot of trouble: whenever you write a price down to use later, write three things beside it — where from, which reference, and when. With all three it's a usable number; missing any one, it's just a nice-looking figure.

Read next: Why You Can't Just Act on the Trading Advice an AI Gives You covers three structural limits in the models themselves; Three Ways Automated Trading Fails: Disconnects, Rate Limits and Parameter Drift covers how automated trading breaks at runtime. For something more hands-on, there is Can You Buy US Stocks with USDT? and No Brokerage Account? How to Buy Apple and Tesla Stock With a Crypto Wallet.

This page contains no referral links and no invite code; where it says "the platform" or "the one you use", that is generic and doesn't point at any particular one. For this site's disclosure policy and risk disclaimer, see Disclosure and Risk Notice.