Price slippage is the difference, often represented as a percentage, between the quoted price of an asset and the execution price of a market order. There can be many causes for slippage, but the primary cause is the size of a trade with respect to the composition of the limit orderbook. The bid slippage metrics represent the price slippage of a sell order. And the ask slippage metrics represent the price slippage of a buy order.
Let’s say an investor wishes to purchase 1 BTC at the best ask price of $25,000 and they submit a market order. The top of the order book has a sell order at this price for 0.25 BTC, so .25 BTC is purchased at $25,000 per BTC. The next order in the orderbook is for 0.5 BTC, but at a price of $25,250. This is executed and 0.5 BTC is purchased at $25,250 per BTC. 0.75 BTC has now been purchased, and 0.25 BTC remain. The investor completes his order at the next offer in the orderbook, 0.5 BTC for $25,500. As only 0.25 BTC are needed to complete the 1 BTC purchase, the investor fills 0.25 BTC at the price of $25,500 per BTC. The effective execution price of this purchase is the average price of the individual orders, weighted by quantity:
The slippage is the percentage difference in the market price and this execution price:
$25,000$25,250−$25,000=1%
So this hypothetical purchase of 1 BTC incurred 1% slippage. If the trade size was different, then the slippage would change; that is, slippage is dependent on order size.
API Endpoints
Liquidity slippage metrics can be accessed using the following endpoints:
Returns metrics for specified markets.<br/> Results are ordered by tuple (market, time).<br/> To fetch the next page of results use next_page_url JSON response field.<br/>
get
/timeseries/market-metrics
Authorizations
Query parameters
marketsstring[]required
Comma separated list of markets or market patterns like exchange-* or exchange-*-spot or *USDT-future.<br/> Use the /catalog-all/markets endpoint for the full list of supported markets.
metricsstring[]required
Comma separated metrics to request time series data for.<br/> Use the /catalog-all/market-metrics endpoint for the full list of supported metrics per exchange-asset combination.
Frequency of the market metrics. Supported values are 1m, 5m, 1h, 1d.
start_timestring
Start of the time interval.<br/> This field refers to the time field in the response.<br/> Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.<br/> Inclusive by default.<br/> UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.<br/> If start_time is omitted, response will include time series from the earliest time available.
end_timestring
End of the time interval.<br/> This field refers to the time field in the response.<br/> Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.<br/> Inclusive by default.<br/> UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.<br/> If end_time is omitted, response will include time series up to the latest time available.
start_inclusiveboolean · default: true
Inclusive or exclusive corresponding start_* parameters.
end_inclusiveboolean · default: true
Inclusive or exclusive corresponding end_* parameters.
timezonestring · default: UTC
Timezone name for start_time and end_time timestamps.<br/> This parameter does not modify the output times, which are always UTC.<br/> Format is defined by TZ database.
Number of items per single page of results.<br/> The value of this parameter is ignored if the endpoint supports the format parameter and its value is set to json_stream.
paging_fromstring · enum · default: end
Where does the first page start, at the start of the interval or at the end.
Options: start, end
sortstring · enum · default: market
How results will be sorted. Metrics are sorted by (market, time) by default. If you want to sort 1d metrics by (time, market) you should choose time as value for the sort parameter.<br/> Sorting by time is useful if you request metrics for a set of markets.
Options: market, time
limit_per_marketinteger · int32
How many entries per market result should contain. It is useful when multiple markets are requested.
prettyboolean
Human-readable formatting of JSON responses.
formatstring · enum · default: json
Format of the response.
Options: json, csv
next_page_tokenstring
Token for receiving the results from the next page of a query.<br/> Should not be used directly. To iterate through pages just use next_page_url response field.