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"
}
}'
Actions
Execute an Action
Execute a trading action
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"
}
}'
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": {...}
}
]
}
⌘I

