Summary
Add a Python SDK end-to-end test that verifies the matching engine's auto-cancellation of expired orders works correctly through the full stack.
Background
The matching engine now supports automatic cancellation of expired orders via the expiresAfter field (seconds since epoch). When an order's expiration time passes, the ME's fast thread detects it and auto-cancels it. We should have a Python SDK test that exercises this full flow.
Suggested test flow
- Place a GTC order with a short
expires_after (e.g., current time + 5 seconds)
- Verify the order is accepted and resting in the book (via
GET /v2/wallet/{address}/openOrders or WebSocket orderChanges)
- Wait for the expiry time to pass (+ some margin for scan interval)
- Verify the order is no longer in open orders
- Optionally verify a
CANCELLED status update was received via WebSocket
Notes
- The
expiresAfter field is in seconds since epoch (per the OpenAPI spec)
- The ME scans for expired orders on a configurable interval (100-1000ms), so the test should allow a few seconds of margin
- This is a good candidate for the
examples/ directory or a dedicated tests/ integration test
- Can be tested against the cronos (testnet) environment
Summary
Add a Python SDK end-to-end test that verifies the matching engine's auto-cancellation of expired orders works correctly through the full stack.
Background
The matching engine now supports automatic cancellation of expired orders via the
expiresAfterfield (seconds since epoch). When an order's expiration time passes, the ME's fast thread detects it and auto-cancels it. We should have a Python SDK test that exercises this full flow.Suggested test flow
expires_after(e.g., current time + 5 seconds)GET /v2/wallet/{address}/openOrdersor WebSocketorderChanges)CANCELLEDstatus update was received via WebSocketNotes
expiresAfterfield is in seconds since epoch (per the OpenAPI spec)examples/directory or a dedicatedtests/integration test