enhancedGetTransactionsByAddress
Learn how to use the enhancedGetTransactionsByAddress JSON-RPC method.
POST
/
#enhancedGetTransactionsByAddress
enhancedGetTransactionsByAddress
curl --request POST \
--url 'https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"method": "enhancedGetTransactionsByAddress",
"params": [
{
"accountAddress": "6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe"
}
]
}
'import requests
url = "https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress"
payload = {
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"method": "enhancedGetTransactionsByAddress",
"params": [{ "accountAddress": "6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe" }]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
chainId: 101,
method: 'enhancedGetTransactionsByAddress',
params: [{accountAddress: '6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe'}]
})
};
fetch('https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress', 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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress",
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,
'chainId' => 101,
'method' => 'enhancedGetTransactionsByAddress',
'params' => [
[
'accountAddress' => '6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"result": [
{
"lamportsChange": 123,
"lamportsFee": 123,
"signature": "<string>",
"blockTime": 123,
"data": {
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"mint": "<string>",
"decimals": 123,
"amountTransfered": 123,
"sender": "<string>",
"receiver": "<string>",
"senderAssociatedTokenAddress": "<string>",
"receiverAssociatedTokenAddress": "<string>"
}
}
]
}Understanding enhancedGetTransactionsByAddress
enhancedGetTransactionsByAddressretrieves detailed parsed transaction history relating to a specific public address on Solana. It takes:address- a base58-encoded string.- Object, optional:
limit- integer (between1and1000, default1000).before- string, transaction hash.after- string, transaction hash.until- string, transaction hash.
Query example
JavaScript
const axios = require('axios');
(async () => {
const response = await axios.post('https://rpc.particle.network/solana', {
chainId: 103,
jsonrpc: '2.0',
id: 0,
method: 'enhancedGetTransactionsByAddress',
params: ['6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe'],
}, {
auth: {
username: 'Your Project Id',
password: 'Your Project Server Key',
}
});
console.log(response.data);
})();
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Request to get transactions for an account address.
Version of the JSON-RPC protocol, should be 2.0.
Example:
"2.0"
The request identifier.
Example:
1
The blockchain chain ID.
Example:
101
API method being called.
Available options:
enhancedGetTransactionsByAddress Parameters for getting transactions by address.
Account address details.
- Option 1
- Option 2
Show child attributes
Show child attributes
Response
200 - application/json
Successful response with transactions information.
Was this page helpful?
⌘I
enhancedGetTransactionsByAddress
curl --request POST \
--url 'https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"method": "enhancedGetTransactionsByAddress",
"params": [
{
"accountAddress": "6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe"
}
]
}
'import requests
url = "https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress"
payload = {
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"method": "enhancedGetTransactionsByAddress",
"params": [{ "accountAddress": "6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe" }]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
chainId: 101,
method: 'enhancedGetTransactionsByAddress',
params: [{accountAddress: '6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe'}]
})
};
fetch('https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress', 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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress",
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,
'chainId' => 101,
'method' => 'enhancedGetTransactionsByAddress',
'params' => [
[
'accountAddress' => '6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://rpc.particle.network/solana/#enhancedGetTransactionsByAddress")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc.particle.network/solana/#enhancedGetTransactionsByAddress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"chainId\": 101,\n \"method\": \"enhancedGetTransactionsByAddress\",\n \"params\": [\n {\n \"accountAddress\": \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"chainId": 101,
"result": [
{
"lamportsChange": 123,
"lamportsFee": 123,
"signature": "<string>",
"blockTime": 123,
"data": {
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"mint": "<string>",
"decimals": 123,
"amountTransfered": 123,
"sender": "<string>",
"receiver": "<string>",
"senderAssociatedTokenAddress": "<string>",
"receiverAssociatedTokenAddress": "<string>"
}
}
]
}