POSTTry locate source transaction

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/tryLocateSourceTx
CU40

Finds the transaction that sent a specific message. Given message parameters, returns the transaction on the source account that created this outgoing message. Useful for tracing where a message originated from.

Request Body
sourcestringrequired

Sender address. Empty string for external messages (sent from outside the blockchain).

destinationstringrequired

Recipient address.

created_ltstringrequired

Logical time when this message was created. Use with source and destination to uniquely identify a message.

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for extended transaction objects with decoded messages. Refer to the TonLib type reference for a full list.

addressobjectrequired

Account address object for this transaction.

@typestring (enum)required

TonLib type identifier for account address objects. Refer to the TonLib type reference for a full list.

account_addressstringrequired

The account address in raw format (workchain:hex), e.g. 0:abc123.... Use the pack address endpoint to convert to user-friendly base64 format.

accountstringrequired

Account address in raw format.

utimeintegerrequired

Unix timestamp when this transaction was executed.

datastringrequired

Full transaction data serialized as BoC, base64 encoded.

transaction_idobjectrequired

The transaction identifier, represented by logical time and transaction hash.

@typestring (enum)required

TonLib type identifier for transaction ID references. Refer to the TonLib type reference for a full list.

ltstringrequired

Logical time of the transaction. Use together with its hash for pagination and lookups.

hashstringrequired

SHA-256 hash of this transaction, encoded in base64.

feestringrequired

Total fees paid for this transaction, in nanograms.

storage_feestringrequired

Storage fees in nanograms deducted from the account balance during the storage phase of this transaction. Covers the cost of storing the contract state on-chain since the last transaction.

other_feestringrequired

Fees in nanograms deducted from the account balance during the computation and action phases of this transaction. Covers the cost of TVM execution and processing outgoing messages.

in_msgobject

The inbound message that triggered this transaction.

@typestring (enum)required

TonLib type identifier for extended message objects with decoded comments. Refer to the TonLib type reference for a full list.

hashstringrequired

SHA-256 hash of this message, encoded in base64.

sourcestringrequired

Sender address. Empty for external inbound messages.

destinationstringrequired

Recipient address.

valuestringrequired

GRAM amount transferred with this message, in nanograms.

extra_currenciesobject[]required

Array of extra currencies (native blockchain-level tokens, distinct from Jettons) transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if no extra currencies were transferred.

@typestring (enum)required

TonLib type identifier for extra currency balance entries. Refer to the TonLib type reference for a full list.

idinteger (int32)required

A 32-bit integer identifying the extra currency. Currency IDs are defined at the blockchain configuration level and stored in ConfigParam 7 of the masterchain. The extra-currency minting documentation describes the process.

amountstringrequired

Currency balance amount as a decimal string.

fwd_feestringrequired

Forwarding fee deducted from the message value, in nanograms.

ihr_feestringrequired

Instant Hypercube Routing (IHR) fee in nanograms.

created_ltstringrequired

Logical time when this message was created.

body_hashstringrequired

Hash of the message body. Useful for verifying content without the full payload.

msg_dataoneOfrequired

Message body payload (raw, text comment, or encrypted).

object 1object
@typestring (enum)

TonLib type identifier for raw (binary) message bodies. Refer to the TonLib type reference for a full list.

bodystring

Raw message body in BoC format, base64 encoded.

init_statestring

Contract init state (code + data) attached to this message, base64 encoded. Present only for deploy messages.

object 2object
@typestring (enum)

TonLib type identifier for plain text comment message bodies. Refer to the TonLib type reference for a full list.

textstring

UTF-8 text comment, base64 encoded.

object 3object
@typestring (enum)

TonLib type identifier for decrypted text message bodies. Refer to the TonLib type reference for a full list.

textstring

Decrypted UTF-8 text content, base64 encoded.

object 4object
@typestring (enum)

TonLib type identifier for encrypted text message bodies. Refer to the TonLib type reference for a full list.

textstring

Encrypted message payload, base64 encoded.

messagestring

Decoded UTF-8 text comment from the message body. Present only when the message body is a plain text comment (opcode 0x00000000). Empty string otherwise.

message_decode_errorstring

Error description if the message body could not be decoded as a text comment.

out_msgsobject[]required

Array of outbound messages produced by this transaction. Each message contains sender, recipient, GRAM amount (nanograms as string), forwarding fee, message body, and optional decoded text comment.

@typestring (enum)required

TonLib type identifier for extended message objects with decoded comments. Refer to the TonLib type reference for a full list.

hashstringrequired

SHA-256 hash of this message, encoded in base64.

sourcestringrequired

Sender address. Empty for external inbound messages.

destinationstringrequired

Recipient address.

valuestringrequired

GRAM amount transferred with this message, in nanograms.

extra_currenciesobject[]required

Array of extra currencies (native blockchain-level tokens, distinct from Jettons) transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if no extra currencies were transferred.

@typestring (enum)required

TonLib type identifier for extra currency balance entries. Refer to the TonLib type reference for a full list.

idinteger (int32)required

A 32-bit integer identifying the extra currency. Currency IDs are defined at the blockchain configuration level and stored in ConfigParam 7 of the masterchain. The extra-currency minting documentation describes the process.

amountstringrequired

Currency balance amount as a decimal string.

fwd_feestringrequired

Forwarding fee deducted from the message value, in nanograms.

ihr_feestringrequired

Instant Hypercube Routing (IHR) fee in nanograms.

created_ltstringrequired

Logical time when this message was created.

body_hashstringrequired

Hash of the message body. Useful for verifying content without the full payload.

msg_dataoneOfrequired

Message body payload (raw, text comment, or encrypted).

object 1object
@typestring (enum)

TonLib type identifier for raw (binary) message bodies. Refer to the TonLib type reference for a full list.

bodystring

Raw message body in BoC format, base64 encoded.

init_statestring

Contract init state (code + data) attached to this message, base64 encoded. Present only for deploy messages.

object 2object
@typestring (enum)

TonLib type identifier for plain text comment message bodies. Refer to the TonLib type reference for a full list.

textstring

UTF-8 text comment, base64 encoded.

object 3object
@typestring (enum)

TonLib type identifier for decrypted text message bodies. Refer to the TonLib type reference for a full list.

textstring

Decrypted UTF-8 text content, base64 encoded.

object 4object
@typestring (enum)

TonLib type identifier for encrypted text message bodies. Refer to the TonLib type reference for a full list.

textstring

Encrypted message payload, base64 encoded.

messagestring

Decoded UTF-8 text comment from the message body. Present only when the message body is a plain text comment (opcode 0x00000000). Empty string otherwise.

message_decode_errorstring

Error description if the message body could not be decoded as a text comment.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X POST "https://ton-mainnet.nodit.io/api/v2/tryLocateSourceTx" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "0:B941E620DF58205A590B0D6EBE919C66B9BCEA7FCFD34F75633D221B7FA430A8",
    "destination": "0:3CF5B3063BCD0A49C9562D1DEF8EBB9905B1D060276F6597130B4B86D2B1E26B",
    "created_lt": "119175197000014"
  }'
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "ext.transaction",
    "address": {
      "@type": "accountAddress",
      "account_address": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN"
    },
    "account": "0:B941E620DF58205A590B0D6EBE919C66B9BCEA7FCFD34F75633D221B7FA430A8",
    "utime": 1795684285,
    "data": "te6cckECEQEAA4cAA7V7lB5iDfWCBaWQsNbr6RnGa5vOp/z9NPdWM9Iht/pDCoAABsY6NIgUwnSsOv0jbRayi1JfIf2SbBDlXyA7dpC+R9+ktV2ELb/AAAbGOV0ATPawf3vQAFRhEz3IAQIDAgHgBAUAgnLadhrbAn3QWXnKWehwCyYZXBkTCb1M/TZyFtxPJk5irFBg...",
    "transaction_id": {
      "@type": "internal.transactionId",
      "lt": "119175197000012",
      "hash": "cCARN1a5L/VKRo3QMg5I0nZOnKMWCN0nzzMIDSBbP+E="
    },
    "fee": "708275",
    "storage_fee": "5",
    "other_fee": "708270",
    "in_msg": {
      "@type": "ext.message",
      "hash": "3LMq8VoAFqeXNU8Pi25oDRGB1I8YqzvVgc7P4WspEOM=",
      "source": "",
      "destination": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN",
      "value": "0",
      "extra_currencies": [],
      "fwd_fee": "0",
      "ihr_fee": "0",
      "created_lt": "0",
      "body_hash": "wq9pDfvz7yZIx2zFNoIqBaVbUbCmFy0FE7jMVGIifTA=",
      "msg_data": {
        "@type": "msg.dataRaw",
        "body": "te6cckECBgEAAVEAAp5Fr9gTyI4nPX9TfiJOEfk4ZOSdX7vF0Cx6iWwyev8n+FbIwKMpLfDQTNPxEn2K+99Sgk+UTFhqicf59R9y6gsOKamjF2sH+GkAAAEvAAMDAQIBaEIAXrowUuAURJXp1XxL687IaDubsUGRk8fHVcQlYY3fkPcga0nSAAAAAAAAAAAAAAAAAAED...",
        "init_state": ""
      },
      "message": "Ra/YE8iOJz1/U34iThH5OGTknV+7xdAseolsMnr/J/hWyMCjKS3w0EzT8RJ9ivvfUoJPlExYaonH+fUfcuoLDimpoxdrB/hpAAABLwADAw==\n"
    },
    "out_msgs": [
      {
        "@type": "ext.message",
        "hash": "2se82iX2y0u9oFs3yv8Yfx6ZZ4R8kKhisX2Apkd47Cc=",
        "source": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN",
        "destination": "EQC9dGClwCiJK9Oq-JfXnZDQdzdigyMnj46riErDG78h7uCJ",
        "value": "225000000",
        "extra_currencies": [],
        "fwd_fee": "100135",
        "ihr_fee": "0",
        "created_lt": "119175197000013",
        "body_hash": "IK/mQWQ6ID8/TH6uDVoIVT4MiaB/mDV3EI4R+w9CJEc=",
        "msg_data": {
          "@type": "msg.dataRaw",
          "body": "te6cckEBAwEAgAABrg+KfqUAAAAAAAAAADAuYwgAZ9PQmvl9/+GkdnKw6oQcdD2XBcSC0lfROP1Fek7i1u8ALlB5iDfWCBaWQsNbr6RnGa5vOp/z9NPdWM9Iht/pDCoIFXUqAQEBHuDbd1MAmjMAAAAAAAAuZAIAIwAAAHRqUogAawf4LQGJwt8AQDAUteE=",
          "init_state": ""
        },
        "message": "D4p+pQAAAAAAAAAAMC5jCABn09Ca+X3/4aR2crDqhBx0PZcFxILSV9E4/UV6TuLW7wAuUHmIN9YIFpZCw1uvpGcZrm86n/P0091Yz0iG3+kMKggVdSoB\n"
      },
      {
        "@type": "ext.message",
        "hash": "8JqQCxMvovGe0AgMgcHGNkE4Nqk112zQavBKkK1ZtuA=",
        "source": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN",
        "destination": "EQA89bMGO80KSclWLR3vjruZBbHQYCdvZZcTC0uG0rHia9fE",
        "value": "15000000",
        "extra_currencies": [],
        "fwd_fee": "44446",
        "ihr_fee": "0",
        "created_lt": "119175197000014",
        "body_hash": "B3hlNIFe3NaloEpo5fKjHwl5swyUzUytbfWMBXGs0HY=",
        "msg_data": {
          "@type": "msg.dataText",
          "text": "RXhlY3V0aW9uIGZlZS4="
        },
        "message": "Execution fee."
      }
    ]
  },
  "@extra": "1795684533:14:27.994"
}