Solana archival JSON-RPC passthrough
curl --request POST \
--url https://api.lpagent.io/open-api/v1/rpc/historical \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignaturesForAddress",
"params": [
"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM",
{
"limit": 10
}
]
}
'import requests
url = "https://api.lpagent.io/open-api/v1/rpc/historical"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "getSignaturesForAddress",
"params": ["7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM", { "limit": 10 }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'getSignaturesForAddress',
params: ['7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM', {limit: 10}]
})
};
fetch('https://api.lpagent.io/open-api/v1/rpc/historical', 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://api.lpagent.io/open-api/v1/rpc/historical",
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([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'getSignaturesForAddress',
'params' => [
'7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM',
[
'limit' => 10
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.lpagent.io/open-api/v1/rpc/historical"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.lpagent.io/open-api/v1/rpc/historical")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lpagent.io/open-api/v1/rpc/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}RPC
Solana archival JSON-RPC passthrough
Transparent JSON-RPC 2.0 passthrough to an archival (“historical”) Solana RPC, for queries that
need state older than a standard node retains - e.g. getTransaction, getSignaturesForAddress
or getBlock against old slots.
The request body is forwarded verbatim and the upstream response is returned verbatim, so this accepts anything the upstream accepts. Point a Solana client straight at this URL.
Upstream behaviour worth knowing (all relayed to you unchanged, not imposed by us):
- Batches are supported - send an array - but every request in one batch must use the same
method. A mixed-method batch returns
-32602 Invalid params. - The archival endpoint serves a subset of Solana RPC. An unsupported method returns
-32601 Method not foundwith HTTP 403. - Archival queries are slow: a simple call is typically 5-8s, and the upstream occasionally
stalls. Requests are given 60s before we give up and return
504. Set client timeouts accordingly and retry on504.
Requires an active Premium or Enterprise API key. Usage counts against your plan’s rate limit.
POST
/
rpc
/
historical
Solana archival JSON-RPC passthrough
curl --request POST \
--url https://api.lpagent.io/open-api/v1/rpc/historical \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignaturesForAddress",
"params": [
"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM",
{
"limit": 10
}
]
}
'import requests
url = "https://api.lpagent.io/open-api/v1/rpc/historical"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "getSignaturesForAddress",
"params": ["7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM", { "limit": 10 }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'getSignaturesForAddress',
params: ['7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM', {limit: 10}]
})
};
fetch('https://api.lpagent.io/open-api/v1/rpc/historical', 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://api.lpagent.io/open-api/v1/rpc/historical",
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([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'getSignaturesForAddress',
'params' => [
'7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM',
[
'limit' => 10
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.lpagent.io/open-api/v1/rpc/historical"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.lpagent.io/open-api/v1/rpc/historical")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lpagent.io/open-api/v1/rpc/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"getSignaturesForAddress\",\n \"params\": [\n \"7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM\",\n {\n \"limit\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}请求体
application/json
A JSON-RPC 2.0 request object, or an array of them for a batch.
- object
- object[]
The body is of type object.
响应
Upstream response, passed through unchanged.
The response is of type object.
此页面对您有帮助吗?