action field determines the operation.
These endpoints are intended to be used via
@lifi/perps-sdk. The typed data signing and submission flow is complex and best handled by the SDK.POST /createAction
Build provider-specific authorization steps. Signed EIP-712, WASM, EVM, and HMAC steps continue toPOST /executeAction; a SiweActionStep or a client-only session step is completed directly by the provider plugin and never submitted to /executeAction.
Request Body
Request Fields
provider: "meta" routes metaAcceptTerms, metaOnboard, and metaCreateReferralCode to a provider-independent handler instead of a venue plugin. No other action accepts the "meta" provider.Action Types
MarketRef
Many action params use amarket field with the MarketRef type:
PlaceOrderParams
TriggerOrderInput:
PlaceTriggerOrderParams
Place standalone TP/SL on an existing position.PlaceTwapOrderParams
Place a TWAP parent order that executes over a fixed duration.market, side, size, durationSeconds, and reduceOnly are provider-independent; the remaining fields are extras honoured only by the provider that advertises them on its placeTwapOrder action’s params descriptors (GET /providers) — a provider that does not advertise an extra ignores it.
CancelOrderParams
CancelTwapOrderParams
ModifyOrderParams
Lighter requiresid, price, and size on every modification — a Lighter modify transaction replaces the resting order wholesale — and rejects triggerPrice/limitPrice, since Lighter orders carry no trigger legs.
Each
ModifyOrderInput:
UpdateLeverageParams
UpdatePositionMarginParams
WithdrawalParams
ApproveAgentParams
AccountModeParams
Generic account-level operating-mode switch (e.g. Hyperliquid abstraction variants, Lighter UTA / Simple). The acceptedmode values are provider-specific — read them from the corresponding setup / options descriptor on GET /providers (the descriptor’s params[].values array enumerates them). @lifi/perps-types intentionally does not encode the per-provider value list, so providers can add new modes without a types release.
AccountTypeParams
Generic account-level fee/latency tier switch (e.g. Lighter standard / premium). Providers without tiering omit the action entirely.CancelAllOrdersParams
RegisterApiKeyParams
DepositParams
SendAssetParams
Response 201
ActionStep is a discriminated union by structural shape — the variant depends on the action’s signingMethod on the provider descriptor:
All variants carry the same
action field (the ActionType from the request). The example above shows the EIP-712 variant; the wasmBlob variant carries wasmSignParams and the evmTx variant (e.g. deposit) carries txParams in place of typedData. HmacActionStep is signed and submitted via executeAction. SiweActionStep and SessionActionStep carry no material submitted to executeAction: a signed SiweActionStep is exchanged for a venue session client-side, and a SessionActionStep carries no signable material at all — the SDK performs the venue call directly with its session token in both cases and skips executeAction. Ondo’s setReferrer is session-signed like a SessionActionStep, but is wire-shaped as a request-bearing HmacActionStep — the SDK submits its request directly with the session credential instead of HMAC-signing it, and also skips executeAction.
Responses
POST /executeAction
Submit signed payloads from/createAction.
Request Body
SignedActionStep mirrors ActionStep as a discriminated union — each variant carries the original payload plus its signed artefact:
The example above shows the EIP-712 variant. Submit signed steps in the same shape and order they were returned by
/createAction. SiweSignedActionStep (action, siwe, signature hex personal_sign) and SessionActionSteps are not submitted here — the SDK exchanges a signed SiweSignedActionStep for a venue session client-side, and a SessionActionStep carries no signable material at all; both skip /executeAction. Submitting action: 'siweLogin' to /executeAction is rejected with 400/2002 (ValidationError).
Response 202
ActionResult:
Responses
Order details (SDK)
Single-order lookup is served by the SDK directly from each provider viagetOrder — there is no LI.FI HTTP endpoint. The returned Order shape:
Order Schema
Order Status Values
SDK:
getOrder()