For the complete documentation index, see llms.txt. This page is also available as Markdown.

索引器 API

入门

TON 索引器API 提供了一种从 TON 网络访问索引区块链数据的强大方法。通过将区块链数据存储在 PostgreSQL 中,此 API 可以高效查询和检索历史信息。

Get Masterchain Info

get

Returns first and last blocks information, can be used as a start point for blockchain search process

Authorizations
X-API-KeystringRequired
Responses
200

Successful Response

application/json
get/api/v3/masterchainInfo
GET /api/v3/masterchainInfo HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "last": {
    "workchain": 1,
    "shard": "text",
    "seqno": 1,
    "root_hash": "text",
    "file_hash": "text",
    "global_id": 1,
    "version": 1,
    "after_merge": true,
    "before_split": true,
    "after_split": true,
    "want_merge": true,
    "want_split": true,
    "key_block": true,
    "vert_seqno_incr": true,
    "flags": 1,
    "gen_utime": "text",
    "start_lt": "text",
    "end_lt": "text",
    "validator_list_hash_short": 1,
    "gen_catchain_seqno": 1,
    "min_ref_mc_seqno": 1,
    "prev_key_block_seqno": 1,
    "vert_seqno": 1,
    "master_ref_seqno": 1,
    "rand_seed": "text",
    "created_by": "text",
    "tx_count": 1,
    "masterchain_block_ref": {
      "workchain": 1,
      "shard": "text",
      "seqno": 1
    },
    "prev_blocks": [
      {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      }
    ]
  },
  "first": {
    "workchain": 1,
    "shard": "text",
    "seqno": 1,
    "root_hash": "text",
    "file_hash": "text",
    "global_id": 1,
    "version": 1,
    "after_merge": true,
    "before_split": true,
    "after_split": true,
    "want_merge": true,
    "want_split": true,
    "key_block": true,
    "vert_seqno_incr": true,
    "flags": 1,
    "gen_utime": "text",
    "start_lt": "text",
    "end_lt": "text",
    "validator_list_hash_short": 1,
    "gen_catchain_seqno": 1,
    "min_ref_mc_seqno": 1,
    "prev_key_block_seqno": 1,
    "vert_seqno": 1,
    "master_ref_seqno": 1,
    "rand_seed": "text",
    "created_by": "text",
    "tx_count": 1,
    "masterchain_block_ref": {
      "workchain": 1,
      "shard": "text",
      "seqno": 1
    },
    "prev_blocks": [
      {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      }
    ]
  }
}

Get Blocks

get

Returns blocks by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
workchaininteger · nullableOptional

Block workchain.

shardstring · nullableOptional

Block shard id. Must be sent with workchain. Example: 8000000000000000

seqnointeger · nullableOptional

Block seqno. Must be sent with workchain and shard.

start_utimeinteger · nullableOptional

Query blocks with generation UTC timestamp after given timestamp.

end_utimeinteger · nullableOptional

Query blocks with generation UTC timestamp before given timestamp

start_ltinteger · nullableOptional

Query blocks with lt >= start_lt

end_ltinteger · nullableOptional

Query blocks with lt <= end_lt

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort results by UTC timestamp.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/blocks
GET /api/v3/blocks HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "blocks": [
    {
      "workchain": 1,
      "shard": "text",
      "seqno": 1,
      "root_hash": "text",
      "file_hash": "text",
      "global_id": 1,
      "version": 1,
      "after_merge": true,
      "before_split": true,
      "after_split": true,
      "want_merge": true,
      "want_split": true,
      "key_block": true,
      "vert_seqno_incr": true,
      "flags": 1,
      "gen_utime": "text",
      "start_lt": "text",
      "end_lt": "text",
      "validator_list_hash_short": 1,
      "gen_catchain_seqno": 1,
      "min_ref_mc_seqno": 1,
      "prev_key_block_seqno": 1,
      "vert_seqno": 1,
      "master_ref_seqno": 1,
      "rand_seed": "text",
      "created_by": "text",
      "tx_count": 1,
      "masterchain_block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "prev_blocks": [
        {
          "workchain": 1,
          "shard": "text",
          "seqno": 1
        }
      ]
    }
  ]
}

Get Shards By Masterchain Block

get

Returns one masterchain block (with seqno equal to argument) and some number of shard blocks (with masterchain_block_ref.seqno equal to argument)

Authorizations
X-API-KeystringRequired
Query parameters
seqnointegerRequired

Masterchain block seqno

Responses
200

Successful Response

application/json
get/api/v3/masterchainBlockShardState
GET /api/v3/masterchainBlockShardState?seqno=1 HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "blocks": [
    {
      "workchain": 1,
      "shard": "text",
      "seqno": 1,
      "root_hash": "text",
      "file_hash": "text",
      "global_id": 1,
      "version": 1,
      "after_merge": true,
      "before_split": true,
      "after_split": true,
      "want_merge": true,
      "want_split": true,
      "key_block": true,
      "vert_seqno_incr": true,
      "flags": 1,
      "gen_utime": "text",
      "start_lt": "text",
      "end_lt": "text",
      "validator_list_hash_short": 1,
      "gen_catchain_seqno": 1,
      "min_ref_mc_seqno": 1,
      "prev_key_block_seqno": 1,
      "vert_seqno": 1,
      "master_ref_seqno": 1,
      "rand_seed": "text",
      "created_by": "text",
      "tx_count": 1,
      "masterchain_block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "prev_blocks": [
        {
          "workchain": 1,
          "shard": "text",
          "seqno": 1
        }
      ]
    }
  ]
}

Get Address Book

get

Generates and returns a user-friendly address book for a given contract address list.

Authorizations
X-API-KeystringRequired
Query parameters
addressstring[]Required

List of addresses in any form. Max list size: 1024

Responses
200

Successful Response

application/json
get/api/v3/addressBook
GET /api/v3/addressBook?address=text HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": {
    "user_friendly": "text"
  }
}

Get Masterchain Block Shards

get

Returns all workchain blocks, that appeared after previous masterchain block.

Note: this method is not equivalent with /api/v2/shards.

Authorizations
X-API-KeystringRequired
Query parameters
seqnointegerRequired

Masterchain block seqno

Responses
200

Successful Response

application/json
get/api/v3/masterchainBlockShards
GET /api/v3/masterchainBlockShards?seqno=1 HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "blocks": [
    {
      "workchain": 1,
      "shard": "text",
      "seqno": 1,
      "root_hash": "text",
      "file_hash": "text",
      "global_id": 1,
      "version": 1,
      "after_merge": true,
      "before_split": true,
      "after_split": true,
      "want_merge": true,
      "want_split": true,
      "key_block": true,
      "vert_seqno_incr": true,
      "flags": 1,
      "gen_utime": "text",
      "start_lt": "text",
      "end_lt": "text",
      "validator_list_hash_short": 1,
      "gen_catchain_seqno": 1,
      "min_ref_mc_seqno": 1,
      "prev_key_block_seqno": 1,
      "vert_seqno": 1,
      "master_ref_seqno": 1,
      "rand_seed": "text",
      "created_by": "text",
      "tx_count": 1,
      "masterchain_block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "prev_blocks": [
        {
          "workchain": 1,
          "shard": "text",
          "seqno": 1
        }
      ]
    }
  ]
}

Get Transactions

get

Returns transactions by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
workchaininteger · nullableOptional

Block workchain.

shardstring · nullableOptional

Block shard id. Must be sent with workchain. Example: 8000000000000000

seqnointeger · nullableOptional

Block seqno. Must be sent with workchain and shard. Must be sent in hex form.

accountstring[]Optional

List of account addresses to get transactions. Can be sent in hex, base64 or base64url form.

exclude_accountstring[]Optional

Exclude transactions on specified account addresses

hashstring · nullableOptional

Transaction hash. Acceptable in hex, base64 and base64url forms.

ltinteger · nullableOptional

Transaction lt.

start_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp after given timestamp.

end_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp before given timestamp

start_ltinteger · nullableOptional

Query transactions with lt >= start_lt

end_ltinteger · nullableOptional

Query transactions with lt <= end_lt

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/transactions
GET /api/v3/transactions HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "transactions": [
    {
      "account": "text",
      "hash": "text",
      "lt": "text",
      "now": 1,
      "orig_status": "uninit",
      "end_status": "uninit",
      "total_fees": "text",
      "prev_trans_hash": "text",
      "prev_trans_lt": "text",
      "description": null,
      "block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "in_msg": {
        "hash": "text",
        "source": "text",
        "destination": "text",
        "value": "text",
        "fwd_fee": "text",
        "ihr_fee": "text",
        "created_lt": "text",
        "created_at": "text",
        "opcode": "text",
        "ihr_disabled": true,
        "bounce": true,
        "bounced": true,
        "import_fee": "text",
        "message_content": {
          "hash": "text",
          "body": "text",
          "decoded": {
            "type": "text_comment",
            "comment": "text"
          }
        },
        "init_state": {
          "hash": "text",
          "body": "text"
        }
      },
      "out_msgs": [
        {
          "hash": "text",
          "source": "text",
          "destination": "text",
          "value": "text",
          "fwd_fee": "text",
          "ihr_fee": "text",
          "created_lt": "text",
          "created_at": "text",
          "opcode": "text",
          "ihr_disabled": true,
          "bounce": true,
          "bounced": true,
          "import_fee": "text",
          "message_content": {
            "hash": "text",
            "body": "text",
            "decoded": {
              "type": "text_comment",
              "comment": "text"
            }
          },
          "init_state": {
            "hash": "text",
            "body": "text"
          }
        }
      ],
      "account_state_before": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "account_state_after": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "mc_block_seqno": 1
    }
  ],
  "address_book": {
    "ANY_ADDITIONAL_PROPERTY": {
      "user_friendly": "text"
    }
  }
}

Get Transactions By Masterchain Block

get

Returns transactions from masterchain block and from all shards.

Authorizations
X-API-KeystringRequired
Query parameters
seqnointegerRequired

Masterchain block seqno

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/transactionsByMasterchainBlock
GET /api/v3/transactionsByMasterchainBlock?seqno=1 HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "transactions": [
    {
      "account": "text",
      "hash": "text",
      "lt": "text",
      "now": 1,
      "orig_status": "uninit",
      "end_status": "uninit",
      "total_fees": "text",
      "prev_trans_hash": "text",
      "prev_trans_lt": "text",
      "description": null,
      "block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "in_msg": {
        "hash": "text",
        "source": "text",
        "destination": "text",
        "value": "text",
        "fwd_fee": "text",
        "ihr_fee": "text",
        "created_lt": "text",
        "created_at": "text",
        "opcode": "text",
        "ihr_disabled": true,
        "bounce": true,
        "bounced": true,
        "import_fee": "text",
        "message_content": {
          "hash": "text",
          "body": "text",
          "decoded": {
            "type": "text_comment",
            "comment": "text"
          }
        },
        "init_state": {
          "hash": "text",
          "body": "text"
        }
      },
      "out_msgs": [
        {
          "hash": "text",
          "source": "text",
          "destination": "text",
          "value": "text",
          "fwd_fee": "text",
          "ihr_fee": "text",
          "created_lt": "text",
          "created_at": "text",
          "opcode": "text",
          "ihr_disabled": true,
          "bounce": true,
          "bounced": true,
          "import_fee": "text",
          "message_content": {
            "hash": "text",
            "body": "text",
            "decoded": {
              "type": "text_comment",
              "comment": "text"
            }
          },
          "init_state": {
            "hash": "text",
            "body": "text"
          }
        }
      ],
      "account_state_before": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "account_state_after": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "mc_block_seqno": 1
    }
  ],
  "address_book": {
    "ANY_ADDITIONAL_PROPERTY": {
      "user_friendly": "text"
    }
  }
}

Get Transactions By Message

get

Returns transactions whose inbound/outbound message has the specified hash. This endpoint returns list of Transaction objects since collisions of message hashes can occur.

Authorizations
X-API-KeystringRequired
Query parameters
directionstring · enum · nullableRequired

Message direction.

Possible values:
msg_hashstring · nullableRequired

Message hash. Acceptable in hex, base64 and base64url forms.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/transactionsByMessage
GET /api/v3/transactionsByMessage?direction=in&msg_hash=text HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "transactions": [
    {
      "account": "text",
      "hash": "text",
      "lt": "text",
      "now": 1,
      "orig_status": "uninit",
      "end_status": "uninit",
      "total_fees": "text",
      "prev_trans_hash": "text",
      "prev_trans_lt": "text",
      "description": null,
      "block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "in_msg": {
        "hash": "text",
        "source": "text",
        "destination": "text",
        "value": "text",
        "fwd_fee": "text",
        "ihr_fee": "text",
        "created_lt": "text",
        "created_at": "text",
        "opcode": "text",
        "ihr_disabled": true,
        "bounce": true,
        "bounced": true,
        "import_fee": "text",
        "message_content": {
          "hash": "text",
          "body": "text",
          "decoded": {
            "type": "text_comment",
            "comment": "text"
          }
        },
        "init_state": {
          "hash": "text",
          "body": "text"
        }
      },
      "out_msgs": [
        {
          "hash": "text",
          "source": "text",
          "destination": "text",
          "value": "text",
          "fwd_fee": "text",
          "ihr_fee": "text",
          "created_lt": "text",
          "created_at": "text",
          "opcode": "text",
          "ihr_disabled": true,
          "bounce": true,
          "bounced": true,
          "import_fee": "text",
          "message_content": {
            "hash": "text",
            "body": "text",
            "decoded": {
              "type": "text_comment",
              "comment": "text"
            }
          },
          "init_state": {
            "hash": "text",
            "body": "text"
          }
        }
      ],
      "account_state_before": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "account_state_after": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "mc_block_seqno": 1
    }
  ],
  "address_book": {
    "ANY_ADDITIONAL_PROPERTY": {
      "user_friendly": "text"
    }
  }
}

Get Adjacent Transactions

get

Returns parent and/or children for specified transaction.

Authorizations
X-API-KeystringRequired
Query parameters
hashstringRequired

Transaction hash. Acceptable in hex, base64 and base64url forms.

directionstring · enum · nullableOptional

Direction transactions by lt.

Default: bothPossible values:
limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/adjacentTransactions
GET /api/v3/adjacentTransactions?hash=text HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "transactions": [
    {
      "account": "text",
      "hash": "text",
      "lt": "text",
      "now": 1,
      "orig_status": "uninit",
      "end_status": "uninit",
      "total_fees": "text",
      "prev_trans_hash": "text",
      "prev_trans_lt": "text",
      "description": null,
      "block_ref": {
        "workchain": 1,
        "shard": "text",
        "seqno": 1
      },
      "in_msg": {
        "hash": "text",
        "source": "text",
        "destination": "text",
        "value": "text",
        "fwd_fee": "text",
        "ihr_fee": "text",
        "created_lt": "text",
        "created_at": "text",
        "opcode": "text",
        "ihr_disabled": true,
        "bounce": true,
        "bounced": true,
        "import_fee": "text",
        "message_content": {
          "hash": "text",
          "body": "text",
          "decoded": {
            "type": "text_comment",
            "comment": "text"
          }
        },
        "init_state": {
          "hash": "text",
          "body": "text"
        }
      },
      "out_msgs": [
        {
          "hash": "text",
          "source": "text",
          "destination": "text",
          "value": "text",
          "fwd_fee": "text",
          "ihr_fee": "text",
          "created_lt": "text",
          "created_at": "text",
          "opcode": "text",
          "ihr_disabled": true,
          "bounce": true,
          "bounced": true,
          "import_fee": "text",
          "message_content": {
            "hash": "text",
            "body": "text",
            "decoded": {
              "type": "text_comment",
              "comment": "text"
            }
          },
          "init_state": {
            "hash": "text",
            "body": "text"
          }
        }
      ],
      "account_state_before": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "account_state_after": {
        "hash": "text",
        "balance": "text",
        "account_status": "uninit",
        "frozen_hash": "text",
        "code_hash": "text",
        "data_hash": "text"
      },
      "mc_block_seqno": 1
    }
  ],
  "address_book": {
    "ANY_ADDITIONAL_PROPERTY": {
      "user_friendly": "text"
    }
  }
}

Get Messages

get

Returns messages by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
hashstringOptional

Message hash. Acceptable in hex, base64 and base64url forms.

sourcestring · nullableOptional

The source account address. Can be sent in hex, base64 or base64url form. Use value null to get external messages.

destinationstring · nullableOptional

The destination account address. Can be sent in hex, base64 or base64url form. Use value null to get log messages.

body_hashstring · nullableOptional

Message body hash. Acceptable in hex, base64 and base64url forms.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/messages
GET /api/v3/messages HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "messages": [
    {
      "hash": "text",
      "source": "text",
      "destination": "text",
      "value": "text",
      "fwd_fee": "text",
      "ihr_fee": "text",
      "created_lt": "text",
      "created_at": "text",
      "opcode": "text",
      "ihr_disabled": true,
      "bounce": true,
      "bounced": true,
      "import_fee": "text",
      "message_content": {
        "hash": "text",
        "body": "text",
        "decoded": {
          "type": "text_comment",
          "comment": "text"
        }
      },
      "init_state": {
        "hash": "text",
        "body": "text"
      }
    }
  ]
}

Get Nft Collections

get

Returns NFT collections.

Authorizations
X-API-KeystringRequired
Query parameters
collection_addressstring · nullableOptional

NFT collection address. Must be sent in hex, base64 or base64url forms.

owner_addressstring · nullableOptional

Address of NFT collection owner. Must be sent in hex, base64 or base64url forms.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/nft/collections
GET /api/v3/nft/collections HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "nft_collections": [
    {
      "address": "text",
      "owner_address": "text",
      "last_transaction_lt": "text",
      "next_item_index": "text",
      "collection_content": null,
      "code_hash": "text",
      "data_hash": "text"
    }
  ]
}

Get Nft Items

get

Returns NFT items.

Authorizations
X-API-KeystringRequired
Query parameters
addressstring · nullableOptional

NFT address. Must be sent in hex, base64 or base64url forms.

owner_addressstring · nullableOptional

Address of NFT owner. Must be sent in hex, base64 or base64url forms.

collection_addressstring · nullableOptional

NFT collection address. Must be sent in hex, base64 or base64url forms.

indexstring · nullableOptional

NFT Item index. Use it together with collection address.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/nft/items
GET /api/v3/nft/items HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "nft_items": [
    {
      "address": "text",
      "collection_address": "text",
      "owner_address": "text",
      "init": true,
      "index": "text",
      "last_transaction_lt": "text",
      "code_hash": "text",
      "data_hash": "text",
      "content": null,
      "collection": {
        "address": "text",
        "owner_address": "text",
        "last_transaction_lt": "text",
        "next_item_index": "text",
        "collection_content": null,
        "code_hash": "text",
        "data_hash": "text"
      }
    }
  ]
}

Get Nft Transfers

get

Returns NFT transfers by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
addressstring · nullableOptional

Address of NFT owner. Must be sent in hex, base64 or base64url forms.

item_addressstring · nullableOptional

NFT item address. Must be sent in hex, base64 or base64url forms.

collection_addressstring · nullableOptional

NFT collection address. Must be sent in hex, base64 or base64url forms.

directionstring · enum · nullableOptional

Direction transactions by lt.

Default: bothPossible values:
start_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp after given timestamp.

end_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp before given timestamp

start_ltinteger · nullableOptional

Query transactions with lt >= start_lt

end_ltinteger · nullableOptional

Query transactions with lt <= end_lt

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/nft/transfers
GET /api/v3/nft/transfers HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "nft_transfers": [
    {
      "query_id": "text",
      "nft_address": "text",
      "transaction_hash": "text",
      "transaction_lt": "text",
      "transaction_now": 1,
      "old_owner": "text",
      "new_owner": "text",
      "response_destination": "text",
      "custom_payload": "text",
      "forward_amount": "text",
      "forward_payload": "text"
    }
  ]
}

Get Jetton Masters

get

Returns Jetton masters by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
addressstringOptional

Jetton Master address. Must be sent in hex, base64 or base64url forms.

admin_addressstringOptional

Address of Jetton Master's admin. Must be sent in hex, base64 or base64url forms.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/jetton/masters
GET /api/v3/jetton/masters HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "jetton_masters": [
    {
      "address": "text",
      "total_supply": "text",
      "mintable": true,
      "admin_address": "text",
      "last_transaction_lt": "text",
      "jetton_wallet_code_hash": "text",
      "jetton_content": null,
      "code_hash": "text",
      "data_hash": "text"
    }
  ]
}

Get Jetton Wallets

get

Returns Jetton wallets by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
addressstringOptional

Jetton wallet address. Must be sent in hex, base64 or base64url forms.

owner_addressstringOptional

Address of Jetton wallet's owner. Must be sent in hex, base64 or base64url forms.

jetton_addressstringOptional

Jetton Master. Must be sent in hex, base64 or base64url forms.

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
Responses
200

Successful Response

application/json
get/api/v3/jetton/wallets
GET /api/v3/jetton/wallets HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "jetton_wallets": [
    {
      "address": "text",
      "balance": "text",
      "owner": "text",
      "jetton": "text",
      "last_transaction_lt": "text",
      "code_hash": "text",
      "data_hash": "text"
    }
  ]
}

Get Jetton Transfers

get

Returns Jetton transfers by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
addressstring · nullableOptional

Account address. Must be sent in hex, base64 or base64url forms.

jetton_walletstring · nullableOptional

Jetton wallet address. Must be sent in hex, base64 or base64url forms.

jetton_masterstring · nullableOptional

Jetton master address. Must be sent in hex, base64 or base64url forms.

directionstring · enum · nullableOptional

Direction transactions by lt.

Default: bothPossible values:
start_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp after given timestamp.

end_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp before given timestamp

start_ltinteger · nullableOptional

Query transactions with lt >= start_lt

end_ltinteger · nullableOptional

Query transactions with lt <= end_lt

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/jetton/transfers
GET /api/v3/jetton/transfers HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "jetton_transfers": [
    {
      "query_id": "text",
      "source": "text",
      "destination": "text",
      "amount": "text",
      "source_wallet": "text",
      "jetton_master": "text",
      "transaction_hash": "text",
      "transaction_lt": "text",
      "transaction_now": 1,
      "response_destination": "text",
      "custom_payload": "text",
      "forward_ton_amount": "text",
      "forward_payload": "text"
    }
  ]
}

Get Jetton Burns

get

Returns Jetton burns by specified filters.

Authorizations
X-API-KeystringRequired
Query parameters
addressstring · nullableOptional

Account address. Must be sent in hex, base64 or base64url forms.

jetton_walletstring · nullableOptional

Jetton wallet address. Must be sent in hex, base64 or base64url forms.

jetton_masterstring · nullableOptional

Jetton master address. Must be sent in hex, base64 or base64url forms.

start_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp after given timestamp.

end_utimeinteger · nullableOptional

Query transactions with generation UTC timestamp before given timestamp

start_ltinteger · nullableOptional

Query transactions with lt >= start_lt

end_ltinteger · nullableOptional

Query transactions with lt <= end_lt

limitinteger · min: 1 · max: 256Optional

Limit number of queried rows. Use with offset to batch read.

Default: 128
offsetintegerOptional

Skip first N rows. Use with limit to batch read.

Default: 0
sortstring · enumOptional

Sort transactions by lt.

Default: descPossible values:
Responses
200

Successful Response

application/json
get/api/v3/jetton/burns
GET /api/v3/jetton/burns HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "jetton_burns": [
    {
      "query_id": "text",
      "owner": "text",
      "jetton_wallet": "text",
      "jetton_master": "text",
      "transaction_hash": "text",
      "transaction_lt": "text",
      "transaction_now": 1,
      "amount": "text",
      "response_destination": "text",
      "custom_payload": "text"
    }
  ]
}

Send Message

post

Send external message in boc base64 format to TON network. Returns message hash in hex format.

External messages are sent from the outside to the smart contracts to make them perform certain actions. For instance, a wallet smart contract expects to receive external messages signed by the wallet's owner.

Authorizations
X-API-KeystringRequired
Body

Message in base64 boc serialized format.

bocstringRequiredExample: te6ccgECBQEAARUAAkWIAWTtae+KgtbrX26Bep8JSq8lFLfGOoyGR/xwdjfvpvEaHg
Responses
200

Successful Response

application/json
message_hashstringRequired

Hash of sent message in hex format

Example: 383E348617141E35BC25ED9CD0EDEC2A4EAF6413948BF1FB7F865CEFE8C2CD44
post/api/v3/message
POST /api/v3/message HTTP/1.1
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "boc": "te6ccgECBQEAARUAAkWIAWTtae+KgtbrX26Bep8JSq8lFLfGOoyGR/xwdjfvpvEaHg"
}
{
  "message_hash": "383E348617141E35BC25ED9CD0EDEC2A4EAF6413948BF1FB7F865CEFE8C2CD44"
}

Run Get Method

post

Run get method of smart contract. Stack supports only num, cell and slice types:

[
    {
        "type": "num",
        "value": "0x12a"
    },
    {
        "type": "cell",
        "value": "te6..." // base64 encoded boc with cell
    },
    {
        "type": "slice",
        "value": "te6..." // base64 encoded boc with slice
    }
]
Authorizations
X-API-KeystringRequired
Body
addressstringRequired

Contract address in any format

Example: EQBSzBN6cnxDwDjn_IQXqgU8OJXUMcol9pxyL-yLkpKzYs9U
methodstringRequired

Method name to run

Example: seqno
Responses
200

Successful Response

application/json
gas_usedintegerRequired
exit_codeintegerRequired
post/api/v3/runGetMethod
POST /api/v3/runGetMethod HTTP/1.1
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "address": "EQBSzBN6cnxDwDjn_IQXqgU8OJXUMcol9pxyL-yLkpKzYs9U",
  "method": "seqno",
  "stack": [
    {
      "type": "num",
      "value": "0x12a"
    }
  ]
}
{
  "gas_used": 1,
  "exit_code": 1,
  "stack": [
    {
      "type": "cell",
      "value": [
        {
          "type": "cell",
          "value": "[Circular Reference]"
        }
      ]
    }
  ]
}

Estimate Fee

post

Estimate fees required for query processing.

Body, init_code and init_data accepted in base64 encoded format.

Authorizations
X-API-KeystringRequired
Body
addressstringRequired
bodystringRequired
init_codestring · nullableOptional
init_datastring · nullableOptional
ignore_chksigbooleanOptionalDefault: true
Responses
200

Successful Response

application/json
post/api/v3/estimateFee
POST /api/v3/estimateFee HTTP/1.1
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "address": "text",
  "body": "text",
  "init_code": "text",
  "init_data": "text",
  "ignore_chksig": true
}
{
  "source_fees": {
    "in_fwd_fee": 1,
    "storage_fee": 1,
    "gas_fee": 1,
    "fwd_fee": 1
  },
  "destination_fees": [
    {
      "in_fwd_fee": 1,
      "storage_fee": 1,
      "gas_fee": 1,
      "fwd_fee": 1
    }
  ]
}

Get Account Information

get

Get smart contract information.

Authorizations
X-API-KeystringRequired
Query parameters
addressstringRequired

Account address. Can be sent in raw or user-friendly form.

Responses
200

Successful Response

application/json
balancestringRequired
codestring · nullableRequired
datastring · nullableRequired
last_transaction_ltstring · nullableRequired
last_transaction_hashstring · nullableRequired
frozen_hashstring · nullableRequired
statusstring · enumRequiredPossible values:
get/api/v3/account
GET /api/v3/account?address=text HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "balance": "text",
  "code": "text",
  "data": "text",
  "last_transaction_lt": "text",
  "last_transaction_hash": "text",
  "frozen_hash": "text",
  "status": "uninit"
}

Get Wallet Information

get

Get wallet smart contract information. The following wallets are supported: v1r1, v1r2, v1r3, v2r1, v2r2, v3r1, v3r2, v4r1, v4r2. In case the account is not a wallet error code 409 is returned.

Authorizations
X-API-KeystringRequired
Query parameters
addressstringRequired

Smart contract address. Can be sent in raw or user-friendly form.

Responses
200

Successful Response

application/json
balancestringRequired
wallet_typestring · nullableRequired
seqnointeger · nullableRequired
wallet_idinteger · nullableRequired
last_transaction_ltstring · nullableRequired
last_transaction_hashstring · nullableRequired
statusstring · enumRequiredPossible values:
get/api/v3/wallet
GET /api/v3/wallet?address=text HTTP/1.1
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "balance": "text",
  "wallet_type": "text",
  "seqno": 1,
  "wallet_id": 1,
  "last_transaction_lt": "text",
  "last_transaction_hash": "text",
  "status": "uninit"
}

Last updated