The examples on this page use Hyperliquid (
provider: 'hyperliquid'). Replace the provider value with any supported provider from getProviders().PerpsClient.getOrder takes the same parameters and returns the same Order.
Order Status Values
The terminal statuses are
FILLED, CANCELLED, REJECTED and EXPIRED. getOrders returns OPEN, PENDING, ACCEPTED, PARTIALLY_FILLED and TRIGGERED orders by default; pass statuses to read others. isActiveOrderStatus(status) tests membership in that default set.
Acceptance vs execution
success: true on a placeOrder result means the venue accepted the order for submission. It can still end up REJECTED, CANCELLED or EXPIRED later, for example a post-only order that would cross, or a margin or reduce-only check that fails after acceptance. Watch the order after placing it:
- Subscribe to
orderUpdatesand react to terminal statuses. Its frames carryorders: Order[]andterminated: string[]. - Fall back to
getOrderwith theorderIdfrom the placement result while the stream has not delivered the order yet. - Show
statusReasonto the user onREJECTEDandCANCELLED.
id also accepts a client_order_index-prefixed form that resolves an order before the venue assigns its order_index — see Lighter / Trading.
Reference: Account — Orders (account reads are served by the SDK, not as HTTP endpoints)