buy to go long or buy an asset, sell to go short or sell, and manage to close or adjust a position. Requests and responses look the same on every venue. Any setup step, such as funding an account or completing an issuer’s KYC, comes back as an action for the user to complete first. Yield.xyz builds every transaction, your user signs it, and the API submits and tracks it. The Trade API uses the same project API key as the Earn API, sent in the x-api-key header, and is served at https://trade.yield.xyz/v1 once live.
For each market, the API returns the mark price, funding rate, open interest, volume and allowed leverage, along with price candles. For each user, it returns positions with PnL and liquidation price, open orders, balances and activity.
The Trade API is rolling out and is not live yet. Hyperliquid perps are live today through the Perps API at
https://perps.yield.xyz/v1: see Perps API today. Endpoint and field names on these pages come from the Trade API design and can change before launch.What you can trade
Each venue product is an integration with its own ID, such as
hyperliquid-perps or dinari-spot. Coverage lists every integration and its status. Core concepts explains how each product type maps onto the same endpoints.
How it works
- Pick an integration with
GET /v1/integrationsand a market withGET /v1/markets. - Optionally call
POST /v1/actions/buy/simulateto preview the price and see what the user still has to do first, such as funding or KYC. - Request
POST /v1/actions/buy,POST /v1/actions/sellorPOST /v1/actions/manage. The response lists every transaction to sign. - Sign each transaction in order and submit it with
POST /v1/transactions/{transactionId}/submit. - Poll
GET /v1/actions/{actionId}until it finishes, then readGET /v1/positions,GET /v1/ordersandGET /v1/balances.
What stays the same across venues
- The simple request is the same everywhere. A market ID, an address and an amount give you a market-rate trade, whether the market is a perp, an outcome share or a stock.
- Everything else is an optional argument. Limit price, leverage, margin mode, take profit, stop loss and slippage go in
arguments, and each integration declares the ones it supports in a schema you read from the API. - Unsupported arguments are rejected. The error names the argument, and a limit order never quietly becomes a market order.
- Prerequisites come back as pending actions. Funding, trading keys, approvals and KYC are returned as requests you can send as they are.
- Yield.xyz never holds user funds or signing keys. Where a venue needs a delegated trading key, your client generates and holds it.
Next steps
Core concepts
Integrations, markets, buy, sell and manage, simulate, signing, statuses and portfolio reads.
Perps
Perps on Hyperliquid today, Lighter with the Trade API, and how the live Perps API maps onto it.
Tokenized Stocks
Stocks, ETFs and funds from Dinari and Ondo Global Markets, with issuer KYC and trading hours.
Coverage
Every integration, its venue, product type and status.
Monetization
Builder and partner fees per venue, and where they are configured.
Perps API reference
The live Perps API: every endpoint, argument schema and response field.

