Sandbox Mode
Test your strategies against live market data without risking real money. Sandbox orders route through a simulation adapter on each venue edge that matches against the real order book.
How it works
- Your order hits the SOR exactly like a live order
- The SOR picks the best venue(s) based on real market data
- Instead of submitting to the exchange, the edge's
SandboxAdaptorsimulates the fill - The fill price is realistic — it uses the actual book depth and simulates market impact
- Fills, positions, and TCA all work the same as live
Tip
Sandbox fills are slightly worse than mid price (simulating taker fees + market impact). This makes backtesting more conservative than production.
Two ways to use sandbox
Option 1: Sandbox API key
Use a seq_test_* key. All orders automatically route through sandbox.
bash
export SEQ_API_KEY="seq_test_a1b2c3d4..."
sequence buy ETH-USD 50 # sandbox fillOption 2: Per-order sandbox flag
With a live key, set sandbox=True on individual orders:
python
# Live key, but this order goes to sandbox
seq.buy("BTC-USD", 0.001, sandbox=True)bash
sequence buy BTC-USD 0.001 --sandboxWhat's real vs simulated
| Aspect | Sandbox | Live |
|---|---|---|
| Market data (quotes, book, trades) | Real | Real |
| Order routing (SOR venue selection) | Real | Real |
| Fill prices | Simulated (against real book) | Real exchange fills |
| Fees | Estimated (10 bps default) | Actual venue fees |
| Positions & P&L | Tracked in sandbox ledger | Tracked in live ledger |
| Exchange API keys required | No | Yes |
| TCA reports | Generated | Generated |
Sandbox settings
Configure sandbox behavior (requires seq_test_* key):
bash
curl https://api.sequencemkts.com/v1/sandbox/settings \
-H "Authorization: Bearer $SEQ_TEST_KEY"Reset sandbox state (clears positions and P&L):
bash
curl -X POST https://api.sequencemkts.com/v1/sandbox/reset \
-H "Authorization: Bearer $SEQ_TEST_KEY"