Transactions
Submit a transaction
Submit the signed payload for an action transaction, or record the hash of one you already broadcast.
POST
/
v1
/
transactions
/
{transactionId}
/
submit
Submit transaction
curl --request POST \
--url https://perps.yield.xyz/v1/transactions/{transactionId}/submit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"signedPayload": "0x1234567890abcdef...",
"transactionHash": "0xabcdef1234567890..."
}
'import requests
url = "https://perps.yield.xyz/v1/transactions/{transactionId}/submit"
payload = {
"signedPayload": "0x1234567890abcdef...",
"transactionHash": "0xabcdef1234567890..."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signedPayload: '0x1234567890abcdef...',
transactionHash: '0xabcdef1234567890...'
})
};
fetch('https://perps.yield.xyz/v1/transactions/{transactionId}/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://perps.yield.xyz/v1/transactions/{transactionId}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'signedPayload' => '0x1234567890abcdef...',
'transactionHash' => '0xabcdef1234567890...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://perps.yield.xyz/v1/transactions/{transactionId}/submit"
payload := strings.NewReader("{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://perps.yield.xyz/v1/transactions/{transactionId}/submit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://perps.yield.xyz/v1/transactions/{transactionId}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}"
response = http.request(request)
puts response.read_body{
"link": "https://app.hyperliquid.xyz/exchange",
"status": "CONFIRMED",
"transactionHash": "0x1234567890abcdef...",
"error": "Order rejected: Insufficient margin",
"details": {
"orderStatus": "filled",
"fillPrice": 3900
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 401,
"timestamp": "2026-05-04T12:00:00.000Z",
"path": "/v1/actions",
"message": "Invalid API key",
"details": {
"message": "Invalid API key",
"code": "AUTH_INVALID_API_KEY"
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_FORBIDDEN",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_NOT_FOUND",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 429,
"timestamp": "2026-05-04T12:00:00.000Z",
"path": "/v1/actions",
"message": "Rate limit exceeded",
"details": {
"message": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"error": "Too Many Requests",
"retryAfter": 30
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_INTERNAL",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_BROADCAST_FAILED",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}There is one submit route in the Perps API and no separate submit-hash route. Send exactly one body field:
Sending both returns
Error envelope: Errors and retries.
| Body | Use when | Result status |
|---|---|---|
{ "signedPayload": "..." } | Yield.xyz submits it. For EIP712_TYPED_DATA transactions this is the signature. | QUEUED for Hyperliquid and Arbitrum typed-data transactions; otherwise the broadcast result |
{ "transactionHash": "..." } | You already broadcast the transaction yourself. | BROADCASTED |
400 SUBMIT_PAYLOAD_CONFLICT; sending neither fails validation with 400. These are not the Earn field names signedTransaction and hash.
A transaction can be submitted once: it must be in status CREATED, otherwise the call returns 400 SUBMIT_ALREADY_PROCESSED. Do not resubmit; poll Get an action for the outcome. Submit transactions in the order returned by Execute an action.
| Status | details.code | Cause |
|---|---|---|
| 400 | SUBMIT_ALREADY_PROCESSED | Transaction is no longer CREATED |
| 400 | SUBMIT_PAYLOAD_CONFLICT | Both signedPayload and transactionHash sent |
| 400 | SUBMIT_PAYLOAD_MISSING | Neither body field sent (normally caught by validation first) |
| 403 | SUBMIT_FORBIDDEN | Transaction belongs to another project (checked after the status check, so an already processed transaction returns 400 first) |
| 404 | SUBMIT_NOT_FOUND | Unknown transactionId |
| 404 | SUBMIT_PROVIDER_NOT_FOUND | The transaction’s provider is not available |
| 500 | SUBMIT_INTERNAL | Unexpected server error |
| 503 | SUBMIT_BROADCAST_FAILED | Broadcast failed |
Path Parameters
Body
application/json
Response
Transaction submitted successfully
⌘I
Submit transaction
curl --request POST \
--url https://perps.yield.xyz/v1/transactions/{transactionId}/submit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"signedPayload": "0x1234567890abcdef...",
"transactionHash": "0xabcdef1234567890..."
}
'import requests
url = "https://perps.yield.xyz/v1/transactions/{transactionId}/submit"
payload = {
"signedPayload": "0x1234567890abcdef...",
"transactionHash": "0xabcdef1234567890..."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signedPayload: '0x1234567890abcdef...',
transactionHash: '0xabcdef1234567890...'
})
};
fetch('https://perps.yield.xyz/v1/transactions/{transactionId}/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://perps.yield.xyz/v1/transactions/{transactionId}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'signedPayload' => '0x1234567890abcdef...',
'transactionHash' => '0xabcdef1234567890...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://perps.yield.xyz/v1/transactions/{transactionId}/submit"
payload := strings.NewReader("{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://perps.yield.xyz/v1/transactions/{transactionId}/submit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://perps.yield.xyz/v1/transactions/{transactionId}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signedPayload\": \"0x1234567890abcdef...\",\n \"transactionHash\": \"0xabcdef1234567890...\"\n}"
response = http.request(request)
puts response.read_body{
"link": "https://app.hyperliquid.xyz/exchange",
"status": "CONFIRMED",
"transactionHash": "0x1234567890abcdef...",
"error": "Order rejected: Insufficient margin",
"details": {
"orderStatus": "filled",
"fillPrice": 3900
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 401,
"timestamp": "2026-05-04T12:00:00.000Z",
"path": "/v1/actions",
"message": "Invalid API key",
"details": {
"message": "Invalid API key",
"code": "AUTH_INVALID_API_KEY"
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_FORBIDDEN",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_NOT_FOUND",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 429,
"timestamp": "2026-05-04T12:00:00.000Z",
"path": "/v1/actions",
"message": "Rate limit exceeded",
"details": {
"message": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"error": "Too Many Requests",
"retryAfter": 30
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_INTERNAL",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}{
"statusCode": 123,
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"message": "<string>",
"details": {
"code": "SUBMIT_BROADCAST_FAILED",
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"retryAfter": 123
},
"validation": {
"message": [
"<string>"
]
}
}
