Skip to main content
HyperliquidPolymarket
POST/exchange

Request Headers

string
required
Must be application/json

Request Body

object
required
Signed action.
number
required
Replay-protection nonce, e.g., 1701234567890. Resending the same signed request is rejected as nonce reuse.
object
required
Account owner or approved API wallet; use the exchange signing format.
string
Optional account-owner address. Rejects the request if the verified signer currently maps to another account. This unsigned check does not select an account or grant access.
number
Optional signed expiration in Unix milliseconds; a past deadline is rejected

Response

Response Fields

string
"ok" when item results are returned; inspect each result for success or failure.
string
Always "cancel".
object
Per-item cancellation results.
number
Zero-based request-item index
string
Requested Notional order ID
string
  • confirmed: Canceled. Orders not yet sent to the venue, such as local TP/SL and other trigger orders, are canceled locally and confirm immediately.
  • pending: Submitted; the venue did not confirm within 3 seconds.
  • failed: The venue refused the cancel or processing failed; see error.
  • rejected: Refused before reaching the venue; see error.
  • not_found: No order with this ID on your account.
  • no_venue_id: The order is still awaiting venue acceptance and cannot be canceled yet.
  • invalid_state: The order cannot be canceled in its current state, e.g., it is already canceling, filled, or canceled, or another action on it is still in progress.
string
Stored order ID when known; omitted for not_found
string
Optional per-item rejection or failure message.

Errors

These failures return HTTP 200 as per-item results; other items in the request still proceed.