1. Create
Call a create endpoint (createOrder, cancelOrder, createAuthorization, createWithdrawal) with your parameters. The backend returns an actions[] array, where each action contains:
action— The action type (e.g.,placeOrder,updateLeverage,placeTriggerOrder)description— Human-readable descriptiontypedData— EIP-712 typed data to sign
2. Sign
Sign eachtypedData payload. Who signs depends on the signing mode:
- USER mode: The user signs with their connected wallet
- USER_AGENT mode: The SDK’s local agent signs automatically
3. Submit
Send theactions[] array to the submit endpoint (POST /order or POST /authorization). Each element is an object containing the action type, the original typedData, and the signature.
A single create call can return multiple actions. For example, placing an order with TP/SL and a leverage change produces
updateLeverage, placeOrder, and placeTriggerOrder actions — all must be signed and submitted together.