curl --request POST \
--url https://hedgin.xyz/api/external/v1/transactions/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction": "AQABAg...",
"ticket": "eyJraW5kIjoiYnVpbGQi....mac"
}
'import requests
url = "https://hedgin.xyz/api/external/v1/transactions/send"
payload = {
"transaction": "AQABAg...",
"ticket": "eyJraW5kIjoiYnVpbGQi....mac"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction: 'AQABAg...', ticket: 'eyJraW5kIjoiYnVpbGQi....mac'})
};
fetch('https://hedgin.xyz/api/external/v1/transactions/send', 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://hedgin.xyz/api/external/v1/transactions/send",
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([
'transaction' => 'AQABAg...',
'ticket' => 'eyJraW5kIjoiYnVpbGQi....mac'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://hedgin.xyz/api/external/v1/transactions/send"
payload := strings.NewReader("{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hedgin.xyz/api/external/v1/transactions/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hedgin.xyz/api/external/v1/transactions/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}"
response = http.request(request)
puts response.read_body{
"signature": "<string>",
"receipt": "<string>",
"status": "pending"
}{
"error": {
"code": "Validation",
"message": "vault must be a public key"
}
}{
"error": {
"code": "Unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "Forbidden",
"message": "Action is not enabled for this key"
}
}{
"error": {
"code": "NotFound",
"message": "Vault not found"
}
}{
"error": {
"code": "BodyTooLarge",
"message": "Request body is too large"
}
}{
"error": {
"code": "SlippageToleranceExceeded",
"message": "Transaction rejected during simulation or preflight"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests, slow down"
}
}{
"error": {
"code": "Internal",
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": "RpcUnavailable",
"message": "Service temporarily unavailable"
}
}Send signed transaction
Requires key scope send and the builder action that produced the ticket.
Before the RPC call, the relay checks the ticket signature and expiry, the key, cluster, and program, current vault authority, that the message is unchanged, the fee payer, and the manager’s Ed25519 signature. A failed check returns 403 with code InvalidTicket, Forbidden, InvalidTransaction, or InvalidSignature. A phoenix/onboard ticket returns 403: submit it with POST /transactions/phoenix/onboard/submit.
status: "pending" means the RPC accepted the transaction. status: "unknown" means the RPC call failed in a way that leaves the outcome ambiguous. In both cases, keep signature and receipt and poll GET /transactions/status. A preflight rejection returns 422 and nothing was sent.
curl --request POST \
--url https://hedgin.xyz/api/external/v1/transactions/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction": "AQABAg...",
"ticket": "eyJraW5kIjoiYnVpbGQi....mac"
}
'import requests
url = "https://hedgin.xyz/api/external/v1/transactions/send"
payload = {
"transaction": "AQABAg...",
"ticket": "eyJraW5kIjoiYnVpbGQi....mac"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction: 'AQABAg...', ticket: 'eyJraW5kIjoiYnVpbGQi....mac'})
};
fetch('https://hedgin.xyz/api/external/v1/transactions/send', 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://hedgin.xyz/api/external/v1/transactions/send",
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([
'transaction' => 'AQABAg...',
'ticket' => 'eyJraW5kIjoiYnVpbGQi....mac'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://hedgin.xyz/api/external/v1/transactions/send"
payload := strings.NewReader("{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hedgin.xyz/api/external/v1/transactions/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hedgin.xyz/api/external/v1/transactions/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": \"AQABAg...\",\n \"ticket\": \"eyJraW5kIjoiYnVpbGQi....mac\"\n}"
response = http.request(request)
puts response.read_body{
"signature": "<string>",
"receipt": "<string>",
"status": "pending"
}{
"error": {
"code": "Validation",
"message": "vault must be a public key"
}
}{
"error": {
"code": "Unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "Forbidden",
"message": "Action is not enabled for this key"
}
}{
"error": {
"code": "NotFound",
"message": "Vault not found"
}
}{
"error": {
"code": "BodyTooLarge",
"message": "Request body is too large"
}
}{
"error": {
"code": "SlippageToleranceExceeded",
"message": "Transaction rejected during simulation or preflight"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests, slow down"
}
}{
"error": {
"code": "Internal",
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": "RpcUnavailable",
"message": "Service temporarily unavailable"
}
}Authorizations
API key issued by a Hedgin administrator, in the form hv1_<id>_<secret>. <id> is 1 to 48 characters and <secret> is 32 to 128 characters, both from [A-Za-z0-9_-].
Body
Response
Relay accepted or outcome unknown.
Base58 transaction signature (the manager's fee-payer signature).
Status receipt for GET /transactions/status. Valid for 24 hours and only for the key that sent it.
pending: the relay accepted the transaction. unknown: the outcome is ambiguous and the transaction may have landed. Neither value means confirmed.
pending, unknown 