GETGet messages

TON Mainnethttps://ton-mainnet.nodit.io/api/v3/messages
CU50

Query messages that match the specified filters.

Query Parameters
msg_hashstring[]

Message hash in hex, base64, or base64url form.

body_hashstring

Hash of message body.

sourcestring

Source account address in hex, base64, or base64url form. Set this parameter to null to return external messages.

destinationstring

Destination account address in hex, base64, or base64url form. Set this parameter to null to return log messages.

opcodestring

Opcode of message in hex or signed 32-bit decimal form. An unprefixed value that parses as unsigned 32-bit hexadecimal is interpreted as hexadecimal.

start_utimeinteger (int32)

Query messages where created_at is at or after the specified timestamp.

end_utimeinteger (int32)

Query messages where created_at is at or before the specified timestamp.

start_ltinteger (int64)

Query messages where created_lt is at or above the specified value.

end_ltinteger (int64)

Query messages where created_lt is at or below the specified value.

directionstring (enum)

Direction of the message.

exclude_externalsboolean

Exclude external messages.

only_externalsboolean

Return only external messages.

limitinteger (int32)

Limit the number of rows to return. Use with offset to batch requests.

offsetinteger (int32)

Skip the first N rows. Use with limit to batch requests.

sortstring (enum)

Sort messages by lt. To return the latest messages with sort=desc, set start_lt to 1.

Responses
{address}object

Address book entry. The key is an address that appears in the response, in raw format workchain:hex.

domainstring

TON DNS domain linked to the address. null when no domain is associated.

interfacesstring[]

Contract interfaces detected for the address, for example wallet_v4r2. Can be null or empty when none are detected.

user_friendlystring

Address in user-friendly base64url format.

bounceboolean

Bounce flag of an internal message. If true, the message is returned to the sender when its processing fails. null for external messages.

bouncedboolean

Returns true if this internal message is itself a bounced message returned after a failed delivery; otherwise false. null for external messages.

created_atstring

Unix timestamp in seconds when the message was created, as a decimal string. null for external inbound messages.

Example: 0

created_ltstring

Logical time (lt) when the message was created, as a decimal string. null for external inbound messages.

Example: 0

decoded_opcodestring

Human-readable name of opcode when it is recognized, for example jetton_transfer. null if the opcode is unknown.

destinationstring

Recipient account address in raw format workchain:hex. null for external outbound messages.

extra_flagsstring

Extra flags of an internal message as a decimal string. The value occupies the message header field that previously held ihr_fee. null for external messages.

fwd_feestring

Forwarding fee paid for delivering this internal message, in nanograms. null for external messages.

Example: 0

hashstring

Hash of the message, base64 encoded.

hash_normstring

Normalized hash of an external inbound message, base64 encoded. It stays the same across re-serializations of the message, as defined in TEP-467. Present only for external inbound messages.

ihr_disabledboolean

Returns true if Instant Hypercube Routing (IHR) is disabled for this internal message; otherwise false. null for external messages.

ihr_feestring

Instant Hypercube Routing (IHR) fee of an internal message, in nanograms. null for external messages.

Example: 0

import_feestring

Import fee of an external inbound message, in nanograms. null for other message types.

Example: 0

in_msg_tx_hashstring

Hash of the transaction that received this message as its inbound message, base64 encoded. Omitted if that transaction is not known.

init_stateobject

StateInit attached to the message (contract code and initial data used for deployment): its hash, base64-encoded BoC, and decoded form. null if the message carries no StateInit.

bodystring

Serialized content (the message body, or the StateInit when used as init_state) in BoC format, base64 encoded.

decodedobject

Content decoded into a structured object when its format is recognized, for example a text comment or a known contract message. null if it cannot be decoded.

hashstring

Hash of the content cell, base64 encoded.

message_contentobject

Body of the message: its hash, base64-encoded BoC, and decoded form when the body is recognized.

bodystring

Serialized content (the message body, or the StateInit when used as init_state) in BoC format, base64 encoded.

decodedobject

Content decoded into a structured object when its format is recognized, for example a text comment or a known contract message. null if it cannot be decoded.

hashstring

Hash of the content cell, base64 encoded.

opcodestring

Operation code (opcode) of the message, taken from the first 32 bits of the message body. The API returns it as a hexadecimal string such as 0x0f8a7ea5; null if the body has no opcode.

out_msg_tx_hashstring

Hash of the transaction that created this message as one of its outbound messages, base64 encoded. Omitted for messages that were not sent by a transaction, such as external inbound messages.

sourcestring

Sender account address in raw format workchain:hex. null for external inbound messages.

valuestring

Amount of GRAM transferred with this internal message, in nanograms. null for external messages.

Example: 0

value_extra_currenciesobject

Extra currencies transferred with this message, as a map from currency ID to amount (decimal string). Empty if no extra currency is transferred.

{address}object

Metadata entry. The key is the address of the token contract, in raw format workchain:hex.

is_indexedboolean

Whether the metadata for this address has been indexed. When false, token_info may not be available yet.

token_infoobject[]

List of token metadata entries (Jetton, NFT collection, or NFT item) associated with the address.

descriptionstring

Description of the token from its metadata.

extraobject

Additional metadata fields that are not covered by the other properties, for example decimals, uri, and resized image URLs.

imagestring

URL of the token image from its metadata.

is_nsfwboolean

Whether the token is flagged as NSFW (not safe for work) content.

is_scamboolean

Whether the token is flagged as a scam.

namestring

Name of the token from its metadata.

nft_indexstring

Index of the NFT item within its collection, as a decimal string. Present only for NFT items.

symbolstring

Ticker symbol of the token from its metadata. Present for Jettons.

typestring

Kind of token contract the metadata belongs to, for example jetton_masters, nft_collections, or nft_items.

validboolean

Whether the token metadata was retrieved and parsed successfully.

X-API-KEY
Request
cURL
curl -X GET "https://ton-mainnet.nodit.io/api/v3/messages?msg_hash=3KKIL6PiMzHxz90KQ%2F9o1PNfvExh0yPB2cjNHu1rXjE%3D&direction=in&limit=1&offset=0&sort=desc" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Example · 200
{
  "messages": [
    {
      "hash": "3KKIL6PiMzHxz90KQ/9o1PNfvExh0yPB2cjNHu1rXjE=",
      "source": null,
      "destination": "0:B941E620DF58205A590B0D6EBE919C66B9BCEA7FCFD34F75633D221B7FA430A8",
      "value": null,
      "value_extra_currencies": null,
      "fwd_fee": null,
      "ihr_fee": null,
      "extra_flags": null,
      "created_lt": null,
      "created_at": null,
      "opcode": "0x68b1f95c",
      "decoded_opcode": null,
      "ihr_disabled": null,
      "bounce": null,
      "bounced": null,
      "import_fee": "0",
      "in_msg_tx_hash": "RstqIOXPnun8qlq22k20gYz3C0rWFJG844ogiHhM4jc=",
      "message_content": {
        "hash": "3QnjsyV42pPjeluassfNSAGwd5Qs1ezZlXnLQxJoq4c=",
        "body": "te6cckEBAgEAjQABnGix+VwC99BrO10ZI5LvT8E5XLId4nLLTUGv8oQJIr9/17UT4xl8/qwq2E4/g18BhBtItKCFHOMKJRtSk7KX2g8pqaMXawf40AAAATEAAwEAc0IAe7DE6mlmE+05R8zgswRwXaRNEWp/P4Hr57GNkJk7qg6gjw0YAAAAAAAAAAAAAAAAAABnE0Yp...",
        "decoded": {
          "@type": "wallet_signed_v4",
          "signature": "68B1F95C02F7D06B3B5D192392EF4FC1395CB21DE272CB4D41AFF2840922BF7FD7B513E3197CFEAC2AD84E3F835F01841B48B4A0851CE30A251B5293B297DA0F",
          "subwallet_id": "698983191",
          "valid_until": "1795684560",
          "msg_seqno": "305",
          "op": {
            "@type": "simple_send",
            "msgs": {
              "@type": "msgs_1",
              "msg_1": {
                "mode": "3",
                "msg": {
                  "@type": "message",
                  "info": {
                    "@type": "int_msg_info",
                    "ihr_disabled": true,
                    "bounce": false,
                    "bounced": false,
                    "src": {
                      "@type": "addr_none"
                    },
                    "dest": {
                      "@type": "addr_std",
                      "anycast": {
                        "@type": "nothing_from_maybe"
                      },
                      "workchain_id": "0",
                      "address": "F76189D4D2CC27DA728F99C16608E0BB489A22D4FE7F03D7CF631B213277541D"
                    },
                    "value": {
                      "@type": "currencies",
                      "grams": {
                        "@type": "nanograms",
                        "amount": {
                          "@type": "var_uint",
                          "len": "4",
                          "value": "300000000"
                        }
                      },
                      "other": {
                        "@type": "extra_currencies",
                        "dict": {
                          "@type": "hashmap_empty"
                        }
                      }
                    },
                    "ihr_fee": {
                      "@type": "nanograms",
                      "amount": {
                        "@type": "var_uint",
                        "len": "0",
                        "value": "0"
                      }
                    },
                    "fwd_fee": {
                      "@type": "nanograms",
                      "amount": {
                        "@type": "var_uint",
                        "len": "0",
                        "value": "0"
                      }
                    },
                    "created_lt": "0",
                    "created_at": "0"
                  },
                  "init": {
                    "@type": "nothing_from_maybe"
                  },
                  "body": {
                    "@type": "first_from_either",
                    "value": "te6ccgEBAQEACAAAC2cTRikwIA=="
                  }
                }
              }
            }
          }
        }
      },
      "init_state": null,
      "hash_norm": "KWMY2zPsMNxWkvXKWurm/+Pqg9FY7i78e8RLsbeu5eA="
    }
  ],
  "address_book": {
    "0:B941E620DF58205A590B0D6EBE919C66B9BCEA7FCFD34F75633D221B7FA430A8": {
      "user_friendly": "UQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqAaI",
      "domain": null,
      "interfaces": [
        "wallet_v4r2"
      ]
    }
  },
  "metadata": {}
}