Skip to main content
POST
/
v1
/
perps
/
actions
curl -X POST https://api.yield.xyz/v1/perps/actions \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "hyperliquid",
    "type": "OPEN_POSITION",
    "args": {
      "market": "BTC-USD-PERP",
      "side": "LONG",
      "size": "0.5",
      "leverage": 10
    },
    "addresses": {
      "address": "0x...",
      "network": "hyperliquid"
    }
  }'

Documentation Index

Fetch the complete documentation index at: https://yieldxyz.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Execute Action

Creates a trading action (open position, close position, etc.).
curl -X POST https://api.yield.xyz/v1/perps/actions \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "hyperliquid",
    "type": "OPEN_POSITION",
    "args": {
      "market": "BTC-USD-PERP",
      "side": "LONG",
      "size": "0.5",
      "leverage": 10
    },
    "addresses": {
      "address": "0x...",
      "network": "hyperliquid"
    }
  }'

Response

{
  "id": "action_123",
  "status": "created",
  "transactions": [
    {
      "id": "tx_456",
      "unsignedTransaction": {...}
    }
  ]
}