Search
Transactions
Allows searching for transactions by various criteria (account, block, etc.) on the ICRC-1 ledger.
POST
/
search
/
transactions
Search for transactions
curl --request POST \
--url 'https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions' \
--header 'Content-Type: application/json' \
--data '
{
"operator": "<string>",
"max_block": 123,
"offset": 123,
"limit": 123,
"transaction_identifier": {
"hash": "<string>"
},
"coin_identifier": {
"identifier": "<string>"
},
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
}
}
'import requests
url = "https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions"
payload = {
"operator": "<string>",
"max_block": 123,
"offset": 123,
"limit": 123,
"transaction_identifier": { "hash": "<string>" },
"coin_identifier": { "identifier": "<string>" },
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
}
}
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({
operator: '<string>',
max_block: 123,
offset: 123,
limit: 123,
transaction_identifier: {hash: '<string>'},
coin_identifier: {identifier: '<string>'},
currency: {symbol: '<string>', decimals: 123, metadata: {}}
})
};
fetch('https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions', 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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions",
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([
'operator' => '<string>',
'max_block' => 123,
'offset' => 123,
'limit' => 123,
'transaction_identifier' => [
'hash' => '<string>'
],
'coin_identifier' => [
'identifier' => '<string>'
],
'currency' => [
'symbol' => '<string>',
'decimals' => 123,
'metadata' => [
]
]
]),
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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions"
payload := strings.NewReader("{\n \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions")
.header("Content-Type", "application/json")
.body("{\n \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions")
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 \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"transaction_identifier": {
"hash": "<string>"
},
"operations": [
{
"operation_identifier": {
"index": 123,
"network_index": 123
},
"related_operations": [
{
"index": 123,
"network_index": 123
}
],
"type": "<string>",
"status": "<string>",
"account": {
"address": "<string>",
"sub_account": {
"address": "<string>",
"metadata": {}
},
"metadata": {}
},
"amount": {
"value": "<string>",
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
},
"metadata": {}
},
"metadata": {}
}
],
"metadata": {}
}
],
"total_count": 123,
"next_offset": 123
}Body
application/json
Search for transactions
curl --request POST \
--url 'https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions' \
--header 'Content-Type: application/json' \
--data '
{
"operator": "<string>",
"max_block": 123,
"offset": 123,
"limit": 123,
"transaction_identifier": {
"hash": "<string>"
},
"coin_identifier": {
"identifier": "<string>"
},
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
}
}
'import requests
url = "https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions"
payload = {
"operator": "<string>",
"max_block": 123,
"offset": 123,
"limit": 123,
"transaction_identifier": { "hash": "<string>" },
"coin_identifier": { "identifier": "<string>" },
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
}
}
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({
operator: '<string>',
max_block: 123,
offset: 123,
limit: 123,
transaction_identifier: {hash: '<string>'},
coin_identifier: {identifier: '<string>'},
currency: {symbol: '<string>', decimals: 123, metadata: {}}
})
};
fetch('https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions', 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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions",
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([
'operator' => '<string>',
'max_block' => 123,
'offset' => 123,
'limit' => 123,
'transaction_identifier' => [
'hash' => '<string>'
],
'coin_identifier' => [
'identifier' => '<string>'
],
'currency' => [
'symbol' => '<string>',
'decimals' => 123,
'metadata' => [
]
]
]),
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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions"
payload := strings.NewReader("{\n \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\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://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions")
.header("Content-Type", "application/json")
.body("{\n \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://icrc-mainnet.icp.validationcloud.io/v1/<YOUR_API_KEY_HERE>/search/transactions")
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 \"operator\": \"<string>\",\n \"max_block\": 123,\n \"offset\": 123,\n \"limit\": 123,\n \"transaction_identifier\": {\n \"hash\": \"<string>\"\n },\n \"coin_identifier\": {\n \"identifier\": \"<string>\"\n },\n \"currency\": {\n \"symbol\": \"<string>\",\n \"decimals\": 123,\n \"metadata\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"transaction_identifier": {
"hash": "<string>"
},
"operations": [
{
"operation_identifier": {
"index": 123,
"network_index": 123
},
"related_operations": [
{
"index": 123,
"network_index": 123
}
],
"type": "<string>",
"status": "<string>",
"account": {
"address": "<string>",
"sub_account": {
"address": "<string>",
"metadata": {}
},
"metadata": {}
},
"amount": {
"value": "<string>",
"currency": {
"symbol": "<string>",
"decimals": 123,
"metadata": {}
},
"metadata": {}
},
"metadata": {}
}
],
"metadata": {}
}
],
"total_count": 123,
"next_offset": 123
}