Skip to main content
All paths are relative to the base URL. See authentication and errors and idempotency. Native Hyperliquid TWAPs do not support a builder-fee parameter and do not charge Legend’s builder fee. Hyperliquid trading fees still apply. These actions require perpetual markets. Positive isolated-margin amounts add margin; negative amounts remove it. Margin amounts use USDC decimal strings with at most six decimal places. TWAP duration follows the exchange’s 5–10,080 minute range. A command returns an operation UUID; TWAP creation also returns its native ID in exchange_id.

Set leverage and margin type

POST /v1/leverage Requires trading:write and Idempotency-Key.

Parameters

Request body

Example request

Response

See the OpenAPI schema for nested response objects and validation patterns. Illustrative successful response:

Add or remove isolated margin

POST /v1/margin Requires trading:write and Idempotency-Key.

Parameters

Request body

Example request

Response

See the OpenAPI schema for nested response objects and validation patterns. Illustrative successful response:

Create a native Hyperliquid TWAP

POST /v1/twaps Requires trading:write and Idempotency-Key.

Parameters

Request body

Example request

Response

See the OpenAPI schema for nested response objects and validation patterns. Illustrative successful response:

Cancel a native Hyperliquid TWAP

POST /v1/twaps/cancel Requires trading:write and Idempotency-Key.

Parameters

Request body

Example request

Response

See the OpenAPI schema for nested response objects and validation patterns. Illustrative successful response:

Retrieve an action result

GET /v1/operations/{id} Requires trading:read.

Parameters

Example request

Response

See the OpenAPI schema for nested response objects and validation patterns. Illustrative successful response: