The live engine, checked now
Everything below was read or computed on the server while this page loaded, and sits in its HTML: the engine’s own heartbeat, the latest minute of the record with Solana’s copy of its root, a Pacifica price read for this request, and the order the engine’s code builds now for the trade ticket’s default position (built on this server, never signed or sent).
No real position has opened yet. Every decision shown on the site so far is the demo book’s: paper fills at live Pacifica prices, labelled Demo or Paper fill.
Reload the page for a new check.
Engine state
From the heartbeat the engine writes while it runs, read for this request. Its mode, dry run and sealing are what the engine reports about itself; the heartbeat’s age and whether new positions are accepted are checked here.
- Reported by the engine: Paper-only mode: the engine runs the demo book; real opens wait until live trading is switched on
- Reported by the engine: Dry run off: a real position’s orders are signed and sent to Pacifica
- Reported by the engine: Sealing on: each minute with a decision is sealed on Solana
- Pass: Heartbeat 2 s ago; the engine writes one about every 10 s while it runs
- Not checked: New positions are not accepted right now: Live trading is not switched on yet: quotes and the demo book run, real opens wait.
The latest sealed minute
Read from the record, then from its seal transaction on Solana for this request. Every decision is a leaf; each minute’s leaves form a Merkle tree whose root is sealed on chain, in an SPL Memo signed by the sealer.
- Pass: The sample leaf’s JSON hashes to its id
- Pass: Its Merkle proof folds to the minute’s root
- Pass: The minute’s 2 leaves rebuild the same root
- Not checked: This minute is not sealed on Solana yet
Pacifica, read just now
The mid the engine decides on, read from Pacifica’s API for this request, and the top of the order book its market orders take from.
The order the engine would place now
Built on this site’s server at this load: priced by the quote code, sized and rounded by the same library the engine imports, and written by the engine’s own order builders as the Pacifica requests it signs. The engine itself sends orders only for real positions.
BTC call, 7 days, strike at today’s price, $50 floor
The defaults of the trade ticket. Strike 59,250, priced on BTC at 59,271.
- Pass: Size 0.01265 BTC: a whole number of Pacifica’s 0.00001 BTC lots, as the engine rounds it
- Pass: Notional $749.77 clears Pacifica’s $10 minimum order
- Pass: A market order with at most 1% slippage, not reduce-only: it opens the hedge
- Pass: Backstop trigger 54947: on Pacifica’s 1 tick for BTC
- Pass: The backstop is reduce-only, for the same 0.01265 BTC
- Pass: In the direction of a loss, the floor comes first (55,959), the backstop next (54,947), Pacifica’s liquidation estimate last (54,480)
- Pass: BTC is open for new positions
In order
- Cross margin at 25x on BTC (update_margin_mode, then update_leverage), before the open. The ticket asks for about $89.36 of free USDC on Pacifica before it opens: 1.2 × the $50 budget plus maintenance.
- Market order (create_market_order) to buy 0.01265 BTC, with at most 1% slippage: it takes the best ask, 59,271, and fills no worse than about 59,864. Its fills are read back from the account’s trade history by its client order id.
- Reduce-only stop-market backstop on Pacifica for the size held (create_stop_order): trigger 54947 on the mark price (−7.3%), where the loss would reach 110% of the budget. It closes the position if the engine is down, and is replaced after each resize.
The engine closes the hedge as soon as its loss (cash from fills net of real fees, plus the perp at the Pacifica mid, minus real funding) reaches 84.4% of the $50 budget: the floor, less the reserve it keeps to pay for the close itself.
For the size held at open, that is BTC at 55,959 (−5.6%); the price moves as the hedge resizes. With $67.50 of free USDC behind it ($7.50 of it maintenance), Pacifica’s liquidation price would sit near 54,480 (−8.1%), an estimate. A fast gap can land the close slightly past the floor.
{
"type": "create_market_order",
"data": {
"symbol": "BTC",
"amount": "0.01265",
"side": "bid",
"slippage_percent": "1",
"reduce_only": false,
"client_order_id": "5ef9b358-da3e-4500-9c2a-fa8948d64734"
}
}For a real position, the engine signs this data with the user’s agent key (ed25519) and posts it to Pacifica’s /orders/create_market endpoint. client_order_id is a fresh UUID for each order; amount is the size in BTC on Pacifica’s lot, side bid buys and ask sells, slippage_percent caps the fill at 1% from the price, reduce_only is false for an open.
The margin actions
[
{
"type": "update_margin_mode",
"data": {
"symbol": "BTC",
"is_isolated": false
}
},
{
"type": "update_leverage",
"data": {
"symbol": "BTC",
"leverage": 25
}
}
]The backstop order
{
"type": "create_stop_order",
"data": {
"symbol": "BTC",
"side": "ask",
"reduce_only": true,
"stop_order": {
"stop_price": "54947",
"trigger_price_type": "mark_price",
"amount": "0.01265",
"client_order_id": "ef544ea7-3666-4925-9a57-9e901f4440ec"
}
}
}Real positions
Positions opened from users’ own wallets, newest first, with the Pacifica order id of every fill.
No real position has opened yet, so the engine has sent no live order so far. The first one appears here with the Pacifica order id of every fill and the client order id the engine sent.
The demo book
The demo book runs the same engine code on paper fills at live Pacifica prices. Its positions and decisions carry a demo label everywhere they appear, so anyone can watch the engine decide before trading.
