Batch Order Staging and Submission for OkEX Futures
Summary
This document describes a Python interface for preparing and submitting batches of futures orders through an exchange API. Users add orders locally with a side, price, and amount, optionally specifying a symbol, contract period, or counterparty-price execution. They can inspect or clear staged orders by symbol and contract, then submit all staged orders or a selected subset. The interface groups orders by symbol and contract period, sends batches of up to five orders, and pauses between requests to respect the rate limit described in the source. It returns order information from the API where available.
The material is an execution utility rather than a trading signal or strategy, and its spot interface is marked as unfinished. It documents a specific older API endpoint and exchange wrapper, so compatibility with current exchange APIs is not established. The code also has apparent implementation issues, including a parameter validation check that refers to the built-in type name instead of the side argument. Users would need to inspect and adapt the implementation before relying on it; no execution-quality or trading-performance evidence is provided.
Key ideas
- Orders are staged locally before being submitted as futures batches.
- Batch operations can be scoped to a symbol and contract period, and staged orders can be inspected or cleared.
- The implementation splits submissions into groups of at most five and inserts delays to observe the stated request limit.
- The spot interface is unfinished, and the documented endpoint targets an older exchange API.
- The sample code has an apparent validation defect and provides no evidence about execution quality or trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.