Perpetual Orders
Perpetual Orders: Agent Java SDK v0.3.0 integration, examples, parameters and response semantics.
This guide targets Agent Java SDK v0.3.0, Java 8+, and the tagged public contract. Examples run in a partner backend after initializing client in Quick Start.
Example prerequisites
The Java snippets share these imports. Initialize client using Quick Start and obtain platformUserId from the saved binding. Example user/order IDs must be replaced with your own persisted values.
listCurrentPerpetualOrders
Request model: CurrentPerpetualOrdersRequest.
Request fields
The example reads one page. For required fields, player scope, filter semantics, limit, cursor and bounded retries, follow Query overview. Keep all filters unchanged while paging; do not interpret an error as an empty result.
listPerpetualOrderHistory
Request model: PerpetualOrderHistoryRequest.
Request fields
The example reads one page. For required fields, player scope, filter semantics, limit, cursor and bounded retries, follow Query overview. Keep all filters unchanged while paging; do not interpret an error as an empty result.
Ordinary orders: current and history
Current: orders/current + orderCategory=NORMAL; History: orders/history + orderCategory=NORMAL.
The order history includes terminated ordinary orders. Each record cannot be regarded as fully completed based on the interface name alone. The current order page is a current status query, not a order event stream.
Conditional orders: current and history
Current: orders/current + orderCategory=CONDITIONAL; History: orders/history + orderCategory=CONDITIONAL. Both require explicit platformUserIds.
Conditional orders do not provide filledQuantity, remainingQuantity, avgFilledPrice for ordinary orders. If you need the transaction status of ordinary orders after triggering, query ordinary orders/transactions through generatedOrderId, and do not infer the transaction volume from the conditional order status.
Example response envelope
This is an illustrative empty page, not a sample of a completed trade. Resource-specific field tables above describe populated items[].data.