perps markets with buy to go long, sell to go short and manage to close or adjust a position. Three integrations are in its first set:
hyperliquid-xyz-perps markets are perpetual contracts, including ones that track an equity’s price. They are not share ownership and are not part of Tokenized Stocks.
The Trade API is not live yet. Hyperliquid perps are live today through the Perps API: see Perps API today for the mapping between the two. Names and shapes on this page can change before launch.
Opening and closing a position
buy opens or adds to a long and sell opens or adds to a short. The opposite side reduces the position, and an order that would flip it is rejected. A market ID such as hyperliquid-btc-usdc or lighter-eth-usdc comes from GET /v1/markets?integrationId=.
amountis margin in the collateral token;quantityis contracts in the base asset. Pass exactly one. Reducing always usesquantity.leveragemust sit inside the market’s leverage range.marginModeiscrossorisolatedand cannot change while a position or order is open.- Without
orderTypethe order is a market order, filled as an immediate-or-cancel limit at the worst price allowed bymaxSlippageBps. SetorderType: "limit"with alimitPricefor a resting good-till-canceled order. takeProfitPriceandstopLossPriceon the same request attach a take profit and a stop loss to the entry in one action.reduceOnly: trueguarantees the order only shrinks the position.
manage closePosition closes a market’s position with a reduce-only market order. Omit quantity to close it in full:
Managing a position
Editing an order is planned; until then, cancel and place a new order. Positions, orders and balances carry
pendingActions with these requests prefilled, so you can send them as they are.
Funding and account setup
Simulate lists what a user needs before their first trade, in order: funding, then the fee approval, then an optional trading key. Each comes back as a pending action.manage funddeposits collateral into the venue account. On Hyperliquid, USDC on Arbitrum goes to the Hyperliquid bridge and is credited in about a minute. Funds on another chain or token come back as afundingrequirement with the pending action to complete first.manage withdrawsends collateral back to the owner’s address.manage approveBuilderFeeapproves your project’s fee once per user. The firstbuyincludes it automatically.manage approveAgentregisters a trading key your client generated and holds. After it, orders need no wallet prompt. The key is optional on Hyperliquid and required on Lighter.manage setUnifiedAccountswitches a Hyperliquid account to shared collateral across perps, spot and HIP-3 dexes. The firstbuyincludes it where it is needed.
Hyperliquid
The user’s EVM address is the account, with no creation step. Every transaction is EIP-712 typed data (signingFormat: eip712_typed_data, submissionTarget: venue). Orders, cancels, leverage and margin changes are signed by the owner wallet or by an approved trading key; approveAgent, approveBuilderFee, withdraw and setUnifiedAccount are always signed by the owner. The venue returns each order’s outcome on submit (resting, filled or rejected), so the transaction is CONFIRMED as soon as it is accepted. Positions, balances, orders, fills, candles and the order book are all public, so no read grant is needed.
Lighter
Lighter is a ZK rollup on Ethereum that is coming with the Trade API. Every Lighter order is signed by a Lighter API key that your client holds, so a trading key is required, and setup is funding, then the trading key, then fees. Yield.xyz publishes the details when Lighter goes live.Perps API today
Hyperliquid perps are live through the Perps API athttps://perps.yield.xyz/v1, with the providers hyperliquid and hyperliquid-xyz. Integrate it today through the Perps guide, the Quickstart and the Perps API reference. The Trade API is the next version of the Perps API, and every Perps API operation except editOrder has a direct equivalent in it:
On the Perps API today,
POST /v1/actions returns 403 when the caller’s IP is in a banned region and 403 EXECUTE_FORBIDDEN when your project is disabled for the provider or for Perps. See Perps API objects for its error codes.
Geo-restrictions
Actions and simulate return403 for requests from a banned region, and integrations and markets disclose restrictedJurisdictions so you can filter before showing them. Venue rejections are returned to you as they are. See Geo-blocking for how bans are configured.
Monetization
Perps orders carry your project’s builder fee on Hyperliquid, from 0.01% to 0.1% of each fill, or its partner fee on Lighter. See Monetization.Ready-made interfaces
To launch Perps without building your own UI, host the Perps widget or the Perps dashboard. The widget is a compact module for an existing screen. The dashboard is a full desktop trading terminal. Both run on the Perps API with your project key.Next steps
Perps guide
Open a position end to end on the live Perps API: find a market, open, sign, submit, check positions.
Core concepts
Integrations, markets, arguments, simulate, signing and statuses on the Trade API.
Perps API reference
Every live Perps API endpoint, argument schema and response field.
Perpetuals disclaimer
Jurisdictional restrictions that apply to perps trading.

