tryLocateSourceTx
curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTximport requests
url = "https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx', 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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx",
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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx"
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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx")
.asString();require 'uri'
require 'net/http'
url = URI("https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx")
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{
"block": {
"workchain": 123,
"shard": "<string>",
"seqno": 123,
"root_hash": "<string>",
"file_hash": "<string>"
},
"transaction_id": {
"lt": "<string>",
"hash": "<string>"
}
}TON node API
tryLocateSourceTx | TON v2
The tryLocateSourceTx method attempts to locate the source transaction in the TON blockchain based on the source address, destination address.
GET
/
tryLocateSourceTx
tryLocateSourceTx
curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTximport requests
url = "https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx', 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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx",
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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx"
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://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx")
.asString();require 'uri'
require 'net/http'
url = URI("https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/tryLocateSourceTx")
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{
"block": {
"workchain": 123,
"shard": "<string>",
"seqno": 123,
"root_hash": "<string>",
"file_hash": "<string>"
},
"transaction_id": {
"lt": "<string>",
"hash": "<string>"
}
}The
tryLocateSourceTx method attempts to locate the source transaction in the TON blockchain based on the source address, destination address, and the logical time of a result transaction. This method is useful for tracing back the origin of a transaction.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
TON billing: full (1 RU)This method is always billed as full. See Request units — TON method scope.
Parameters
source(string, required) — The source address of the result transaction. Example:UQAX2d4C2d48JeA-0y2_peGabRVumnKY22xPvkuEayC3zTI1.destination(string, required) — The destination address of the result transaction. Example:UQBP4mzpDIywL1SV-Wp9ZuBBlzprR9eXQgSYGEXiUEHm73vA.created_lt(string, required) — The logical time when the result transaction was created. Example:47597573000002.
JSON-RPC example
Shell
curl -X POST \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tryLocateSourceTx",
"params": {
"source": "UQAX2d4C2d48JeA-0y2_peGabRVumnKY22xPvkuEayC3zTI1",
"destination": "UQBP4mzpDIywL1SV-Wp9ZuBBlzprR9eXQgSYGEXiUEHm73vA",
"created_lt": "47597573000002"
}
}'
Response
block(object) — Information about the block containing the source transaction:workchain(integer) — The workchain ID of the block.shard(string) — The shard ID of the block.seqno(integer) — The sequence number of the block.root_hash(string) — The root hash of the block.file_hash(string) — The file hash of the block.
transaction_id(object) — The identifier of the source transaction:lt(string) — The logical time of the source transaction.hash(string) — The hash of the source transaction.
Use case
A possible use case for thetryLocateSourceTx method in TON is for applications or services that need to trace the origin of transactions. This method can be used to:
- Implement transaction history tracing in blockchain explorers.
- Analyze the chain of events leading to a specific transaction.
- Verify the authenticity of a transaction by tracing it back to its source.
- Debug smart contract interactions by identifying the initiating transaction.
Query Parameters
The source address of the result transaction
The destination address of the result transaction
The logical time when the result transaction was created
Last modified on June 22, 2026
Was this page helpful?