Submit a native iceberg order¶
A native iceberg order is a venue primitive: trader sends a single order with a visible slice size and the total quantity. The exchange exposes only the visible slice on the book and auto-refreshes the next slice from the hidden remainder as the visible portion fills. Other participants see a sequence of small fills and level refills, not one big resting order.
flox ships IcebergExecutor for client-side slicing (each leg pays
a round-trip latency). The simulator also supports the venue's
native iceberg primitive, with no per-refresh latency unless you
configure one.
When to use which¶
| Scenario | Pick |
|---|---|
| Venue offers iceberg natively (CME, Eurex) | submit_iceberg |
| Client-controlled slicing on a venue without | IcebergExecutor |
| Hybrid (some venues, some not, one strategy) | submit_iceberg then fall back to executor algo on rejection |
Native iceberg is preferred when available: the venue handles the refresh atomically, no client-side network round-trip per slice.
Configure¶
A worked example (Python):
"""Submit a native iceberg order and watch its hidden remainder drain."""
import flox_py as flox
exec = flox.SimulatedExecutor()
# Instant refresh is the default; set non-zero for venues with refresh delay.
exec.set_iceberg_refresh_latency(0)
# 10 BTC total, 2 BTC visible per slice.
exec.submit_iceberg(order_id=1, side="buy", price=100.0,
total_quantity=10.0, visible_quantity=2.0)
hidden = exec.iceberg_hidden_remaining_raw(1)
print(f"after submit: hidden remainder raw = {hidden}")
assert hidden > 0
# Cancel cleans up both visible and hidden portions in one call.
exec.cancel_order(1)
print(f"after cancel: hidden remainder = {exec.iceberg_hidden_remaining_raw(1)}")
Behaviour the simulator guarantees¶
- Only
visible_quantityis added to the book queue at submit. - When the visible tranche fully fills, the simulator atomically
refreshes another slice of
min(visible_quantity, hidden_remainder)unless a refresh latency is configured, in which case the next slice is exposed atfill_time + latencyinstead. - The refreshed slice goes to the back of the queue at that
price level by default (override via
set_iceberg_priority_mode). - Cancel cancels both the visible portion and the hidden remainder in one call.
Refresh variants¶
Real venues differ on two iceberg knobs that materially change the fill profile for queue-position strategies:
| Knob | Default | Other modes | Models |
|---|---|---|---|
| Size randomisation | 0% (off) | up to ±100% uniform per refresh | Anti-detection ±10% on liquid spot |
| Refresh queue priority | back |
retain |
CME options + some Eurex contracts |
Inspect remaining hidden quantity¶
For diagnostics, the executor exposes the raw fixed-point hidden remainder per order ID:
The value drops by visible_quantity on each refresh and reaches 0
once the order is fully filled.
Notes¶
visible_quantitymust be strictly less thantotal_quantity— otherwise the order behaves as a regular limit (no hidden state created).- Refresh latency is a single venue-wide setting, not per-order. Most venues are instant; some inject 0.5-2ms between refresh and next-slice exposure.
- Self-trade prevention (T025) and rate-limit policy (T022) apply to native iceberg the same way they apply to limit orders.