Send a transaction
Accepts a fully signed transaction and lands it. Returns the signature as soon as it is accepted (after preflight, unless skipPreflight), before it lands; track it with GET /v1/send/{signature}.
Send JSON, or raw bytes with Content-Type: application/octet-stream. With raw bytes, pass the options as query parameters: ?commitment=confirmed&maxRetries=3&skipPreflight=true. In JSON, body fields take precedence over query parameters.
Re-submitting an already-accepted transaction returns the same signature and does not re-send it.
curl --request POST \
--url https://send.archer.exchange/v1/send \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"transaction": "AQAAAA...base64...",
"commitment": "processed",
"encoding": "base64",
"maxRetries": 1,
"skipPreflight": false
}
'import requests
url = "https://send.archer.exchange/v1/send"
payload = {
"transaction": "AQAAAA...base64...",
"commitment": "processed",
"encoding": "base64",
"maxRetries": 1,
"skipPreflight": False
}
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({
transaction: 'AQAAAA...base64...',
commitment: 'processed',
encoding: 'base64',
maxRetries: 1,
skipPreflight: false
})
};
fetch('https://send.archer.exchange/v1/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://send.archer.exchange/v1/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' => 'AQAAAA...base64...',
'commitment' => 'processed',
'encoding' => 'base64',
'maxRetries' => 1,
'skipPreflight' => false
]),
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://send.archer.exchange/v1/send"
payload := strings.NewReader("{\n \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\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://send.archer.exchange/v1/send")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://send.archer.exchange/v1/send")
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 \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Query Parameters
Same as the JSON field. Use with a raw-bytes body.
processed, confirmed, finalized Same as the JSON field. Use with a raw-bytes body.
x >= 0Same as the JSON field. Use with a raw-bytes body.
Body
The fully signed transaction (legacy or v0), serialized and encoded as encoding.
"AQAAAA...base64..."
Commitment at which the transaction counts as landed (and re-sending stops). Also the commitment preflight simulates at.
processed, confirmed, finalized Encoding of transaction.
base64, base58 Re-sends after the first send, ~400 ms apart, while it hasn't landed. Capped at 149.
x >= 0Skip simulating the transaction before sending it.
Response
Accepted (or already accepted). The relay is now landing it.
The transaction's first signature (base58). Returned as soon as the transaction is accepted, before it lands.
"5r5Zb67VfBe3cGp27z53XVcQbF7oTmf9N4q2WoqDxWL716mSq8uttuZeABVksZRQPa28fTfJvDYiDcCYN685bDRr"
curl --request POST \
--url https://send.archer.exchange/v1/send \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"transaction": "AQAAAA...base64...",
"commitment": "processed",
"encoding": "base64",
"maxRetries": 1,
"skipPreflight": false
}
'import requests
url = "https://send.archer.exchange/v1/send"
payload = {
"transaction": "AQAAAA...base64...",
"commitment": "processed",
"encoding": "base64",
"maxRetries": 1,
"skipPreflight": False
}
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({
transaction: 'AQAAAA...base64...',
commitment: 'processed',
encoding: 'base64',
maxRetries: 1,
skipPreflight: false
})
};
fetch('https://send.archer.exchange/v1/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://send.archer.exchange/v1/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' => 'AQAAAA...base64...',
'commitment' => 'processed',
'encoding' => 'base64',
'maxRetries' => 1,
'skipPreflight' => false
]),
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://send.archer.exchange/v1/send"
payload := strings.NewReader("{\n \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\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://send.archer.exchange/v1/send")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://send.archer.exchange/v1/send")
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 \"transaction\": \"AQAAAA...base64...\",\n \"commitment\": \"processed\",\n \"encoding\": \"base64\",\n \"maxRetries\": 1,\n \"skipPreflight\": false\n}"
response = http.request(request)
puts response.read_body