1. Create
Call the create endpoint (/createAction) with your parameters. The backend returns an actions[] array, where each action contains:
action— The action type (e.g.,placeOrder,updateLeverage,placeTriggerOrder,cancelOrder,modifyOrder)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 /executeAction). 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. Similarly, modifyOrder with multiple modifications produces one modifyOrder action per order being modified.