Get transaction status
curl --request GET \
--url https://raptor.solanatracker.io/transaction/{signature}import requests
url = "https://raptor.solanatracker.io/transaction/{signature}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://raptor.solanatracker.io/transaction/{signature}', 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://raptor.solanatracker.io/transaction/{signature}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://raptor.solanatracker.io/transaction/{signature}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://raptor.solanatracker.io/transaction/{signature}")
.asString();require 'uri'
require 'net/http'
url = URI("https://raptor.solanatracker.io/transaction/{signature}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"signature": "<string>",
"status": "pending",
"sent_at": 123,
"slot": 123,
"confirmed_at": 123,
"latency_ms": 123,
"error": "<string>",
"transaction_base64": "<string>",
"transaction": {},
"events": [
{
"name": "<string>",
"data": "<string>",
"parsed": {}
}
]
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}API Reference
Solana 交易状态查询:Raptor API
查询通过 POST /send-transaction 发送的交易,约每秒轮询一次,直到状态不再是 pending。其他交易返回 404。
GET
/
transaction
/
{signature}
Get transaction status
curl --request GET \
--url https://raptor.solanatracker.io/transaction/{signature}import requests
url = "https://raptor.solanatracker.io/transaction/{signature}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://raptor.solanatracker.io/transaction/{signature}', 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://raptor.solanatracker.io/transaction/{signature}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://raptor.solanatracker.io/transaction/{signature}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://raptor.solanatracker.io/transaction/{signature}")
.asString();require 'uri'
require 'net/http'
url = URI("https://raptor.solanatracker.io/transaction/{signature}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"signature": "<string>",
"status": "pending",
"sent_at": 123,
"slot": 123,
"confirmed_at": 123,
"latency_ms": 123,
"error": "<string>",
"transaction_base64": "<string>",
"transaction": {},
"events": [
{
"name": "<string>",
"data": "<string>",
"parsed": {}
}
]
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}{
"error": "<string>",
"code": 123,
"message": "<string>"
}路径参数
Transaction signature (base58)
响应
Transaction status
Transaction signature (base58)
Transaction status
可用选项:
pending, confirmed, failed, expired Unix timestamp (ms) when transaction was sent
Slot where transaction was confirmed
Unix timestamp (ms) when transaction was confirmed
Time from send to confirm in milliseconds
Error message if failed
Raw transaction (base64 encoded)
Full parsed transaction with metadata
Parsed Raptor program events
Show child attributes
Show child attributes
此页面对您有帮助吗?