Genesis Arbitrage

Genesis Arbitrage · · 2 min read

Market depth

Market depth is the volume of orders in the order book within a set distance of the best price. Ask-side depth at 1% is the sum of all asks from the best ask up to a price 1% higher; bid-side depth is the sum of bids down to a price 1% below the best bid.

Why depth matters more than spread

The spread between the best orders tells you the price of the first dollars of a trade. Depth sets the price of a large order: the order eats through levels one by one, and its average price (VWAP) drifts away from the best one.

Hypothetical example: you need to buy 5,000 coins on one of two exchanges.

MetricExchange AExchange B
Best bid / ask$1.9996 / $2.00$2.000 / $2.002
Spread0.02%0.10%
Asks1,000 at $2.00, 1,500 at $2.02, 2,500 at $2.0520,000 at $2.002
Buying 5,000 coins$10,155$10,010

On exchange A: 1,000 × 2.00 + 1,500 × 2.02 + 2,500 × 2.05 = 2,000 + 3,030 + 5,125 = $10,155, an average of 10,155 ÷ 5,000 = $2.031, or 1.55% above the best ask. On exchange B all 5,000 coins fill at $2.002: 5,000 × 2.002 = $10,010. B's spread is five times wider, yet the buy is $145 cheaper.

Depth in Genesis API

/orderbooks/book returns one market's book, and /orderbooks/coin/{coin} returns a coin's books on every exchange and market at once (market order book, coin order books).

FieldMeaning
depth_bid_usd, depth_ask_usdTotal orders on the side within ±50% of the best price, $
walls_bid, walls_askLargest walls: [price, USD amount]
bids, asksTop 10 levels: [price, USD amount]
depth_limitedThe exchange publishes limited depth: a large order may not fill

A wall is a large order at a single price level. It can be pulled before your order arrives, so depth is never judged by walls alone. DEX pools have no order book: Genesis API shows their depth as slippage at sizes from $100 to $100,000 (DEX slippage).

See also: liquidity, slippage, spread, order book API, order book endpoints.

Questions and answers

How is depth different from liquidity?

Liquidity is a general property of a market: how easily you can buy or sell close to the market price. Depth measures it in money: how much is on order within a set distance of the best price.