{"slug":"how-long-a-market-order-takes-to-fill","qid":"quoted_spread_cost","label":"quoted_spread_cost","post_title":"how-long-a-market-order-takes-to-fill","post_url":"/blog/how-long-a-market-order-takes-to-fill#q-quoted_spread_cost","columns":["symbol","median_spread_bps","p90_spread_bps"],"rows":[{"symbol":"MSFT","median_spread_bps":3.24,"p90_spread_bps":5.45},{"symbol":"AAPL","median_spread_bps":1.5,"p90_spread_bps":2.7},{"symbol":"KO","median_spread_bps":1.13,"p90_spread_bps":2.27},{"symbol":"NVDA","median_spread_bps":0.93,"p90_spread_bps":1.4},{"symbol":"SPY","median_spread_bps":0.26,"p90_spread_bps":0.39}],"shape":"ranking","sql":"SELECT\n    ticker AS symbol,\n    round(quantileDeterministic(0.5)(\n        10000 * (toFloat64(ask_price) - toFloat64(bid_price))\n              / ((toFloat64(ask_price) + toFloat64(bid_price)) / 2),\n        cityHash64(ticker, sequence_number)), 2)  AS median_spread_bps,\n    round(quantileDeterministic(0.9)(\n        10000 * (toFloat64(ask_price) - toFloat64(bid_price))\n              / ((toFloat64(ask_price) + toFloat64(bid_price)) / 2),\n        cityHash64(ticker, sequence_number)), 2)  AS p90_spread_bps\nFROM global_markets.cache_stocks_quotes\nWHERE ticker IN ('SPY', 'NVDA', 'AAPL', 'MSFT', 'KO')\n  AND sip_timestamp >= toDateTime('2026-09-16 14:00:00', 'UTC')\n  AND sip_timestamp <  toDateTime('2026-09-16 14:10:00', 'UTC')\n  AND bid_price > 0\n  AND ask_price > bid_price\nGROUP BY ticker\nHAVING count() > 100\nORDER BY median_spread_bps DESC","computed_at":"2026-10-02T15:05:39.982325+00:00","elapsed":0.003491024}