Spline data model
Each spline has:- a
mid_price - bid regions below mid
- ask regions above mid
- sequence ordering
- current fill state
- risk-limited bid and ask capacity
start_offsetend_offsetdensity- optional top-level hidden take size
- lifespan / expiry
- bid offset
xmaps tomid_price - x - ask offset
xmaps tomid_price + x densityis the base-lot size available per tick in the region
100, bid region [1, 3), and density 5 exposes:
5lots at995lots at98
[1, 3) on the same spline exposes:
5lots at1015lots at102
How spline levels become visible
A spline level is eligible for the book when:- the spline is active
- the spline has a nonzero mid price
- the region has not expired
- the region still has unfilled size
- the spline trader has remaining risk capacity on that side
Risk caps
Before matching, Phoenix caps each spline’s available bid and ask size using the spline trader’s current risk state. The cap accounts for:- current margin and position state
leverage_decrease_in_bps- optional max position size limits
- the current risk action
Uncrossing and slide prices
Spline liquidity from different traders can cross when their mids and regions overlap. Phoenix resolves this before rendering or matching spline-only liquidity. The uncross path:- Matches crossed splines against FIFO liquidity first when the spline crosses the explicit book.
- Computes slide prices for remaining crossed spline-only liquidity.
- Displays and matches more aggressive spline bids at the slide bid.
- Displays and matches more aggressive spline asks at the slide ask.
Pro-rata fills
At a single spline price level, FIFO price-time priority does not apply across spline traders. Phoenix allocates the fill pro-rata by available size:- one spline price level consumes one
match_limitunit, even if multiple splines participate - one FIFO maker order consumes one
match_limitunit - spline liquidity at the same price fills before FIFO liquidity
- worse spline prices do not skip better FIFO prices
Hidden take size
top_level_hidden_take_size is not displayed as normal resting spline liquidity for incoming takers.
It is used when a spline itself takes FIFO liquidity during uncrossing. In that path, Phoenix can consume visible size at the current top tick, then hidden take size at that same tick, then visible size through deeper ticks.