GraphQL
Examples
- If you got timeout error - please, try on other filters or use paid token
Basic
Result is nano TON - divide by 10**9 to get TON
https://dton.io/graphql/
{
raw_account_states(address__friendly: "EQDrLq-X6jKZNHAScgghh0h1iog3StK71zn8dcmrOj8jPWRA"){
account_storage_balance_grams
}
}
https://dton.io/graphql/
{
raw_transactions(
address__friendly: "Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn"
order_by: "lt"
order_desc: true
lt_gt: "40379620000003" # pass last lt from prev request here
page_size: 150 # max transactions per 1 request
) {
address
workchain
lt
}
}
https://dton.io/graphql/
{
raw_account_states(
order_by: "account_storage_balance_grams"
order_desc: true,
account_deleted: 0
account_storage_balance_grams__gt: 100000000000
){
balance: account_storage_balance_grams
address
workchain
last_tx_at: gen_utime
}
}
https://dton.io/graphql/
{
raw_account_states(
order_by: "account_storage_balance_grams"
order_desc: true,
account_deleted: 0
account_storage_balance_grams__gt: 100000000000
){
balance: account_storage_balance_grams
address
workchain
last_tx_at: gen_utime
}
}https://dton.io/graphql/
{
raw_account_states(
order_by: "account_storage_balance_grams"
order_desc: true,
account_deleted: 0
account_storage_balance_grams__gt: 100000000000
){
balance: account_storage_balance_grams
address
workchain
last_tx_at: gen_utime
}
}
NFTs
https://dton.io/graphql/
{
raw_account_states(
parsed_nft_owner_address_address__friendly: "EQDrLq-X6jKZNHAScgghh0h1iog3StK71zn8dcmrOj8jPWRA"
order_by: "parsed_nft_index"
order_desc: true
parsed_nft_true_nft_in_collection: 1 # Check that collection approve NFT with such address
account_state_state_init_code_method_name: "get_nft_data"
account_deleted: 0
page_size: 10
page: 0
){
nft_address: address
nft_workchain: workchain
nft_index: parsed_nft_index
collection_address: parsed_nft_collection_address_address
collection_workchain: parsed_nft_collection_address_workchain
}
}
https://dton.io/graphql/
{
raw_account_states(
account_state_state_init_code_method_name: "get_nft_data"
parsed_nft_collection_address_address__friendly: "EQBPa7td5VDwGltzeSzsp32MkzqzlqHjAOsKtaX0mkMJhq_B"
order_by: "parsed_nft_index"
order_desc: true
parsed_nft_true_nft_in_collection: 1, # Check that collection approve NFT with such address
account_deleted: 0 # Account not deleted
){
nft_address: address
nft_workchain: workchain
nft_index: parsed_nft_index
collection_address: parsed_nft_collection_address_address
collection_workchain: parsed_nft_collection_address_workchain
parsed_nft_content_storage_type
parsed_nft_content_offchain_url
}
}
Jettons
https://dton.io/graphql/
{
raw_account_states(
account_state_state_init_code_method_name: "get_nft_data"
parsed_nft_collection_address_address__friendly: "EQBPa7td5VDwGltzeSzsp32MkzqzlqHjAOsKtaX0mkMJhq_B"
order_by: "parsed_nft_index"
order_desc: true
parsed_nft_true_nft_in_collection: 1, # Check that collection approve NFT with such address
account_deleted: 0 # Account not deleted
){
nft_address: address
nft_workchain: workchain
nft_index: parsed_nft_index
collection_address: parsed_nft_collection_address_address
collection_workchain: parsed_nft_collection_address_workchain
parsed_nft_content_storage_type
parsed_nft_content_offchain_url
}
}
https://dton.io/graphql/
{
groupTransactions(
by: ["gen_utime__toYYYYMMDD"]
aggregations: [
{field: "parsed_jetton_wallet_balance_diff", operation: "sum"},
{field: "parsed_jetton_wallet_balance_diff", operation: "avg"}]
filter_by: {
or__: [{address_friendly: "EQAFbVItAokA9p0I1SaZd2PEg7FZQIp449mTcAsD_Qrlfa9a"}],
gen_utime__gte: "2024-07-01 00:00:00",
gen_utime__lt: "2024-08-01 00:00:00"
parsed_jetton_wallet_balance_diff__gt: 0 # only positive balance topup
}
) {
parsed_jetton_wallet_balance_diff__sum
parsed_jetton_wallet_balance_diff__avg
}
}
https://dton.io/graphql/
{
raw_account_states(
parsed_jetton_wallet_owner_address_address__friendly: "UQDfmsDtWQP5D_YkXX-XlULvs4HivRaKY38ftT2hS5yAAIma" # owner address
account_deleted: 0 # account not deleted
parsed_jetton_wallet_data_is_approved: 1 # wallet is real
order_by: "parsed_jetton_wallet_balance"
order_desc: true
){
# Jetton address (concat workcahin:address for RAW form)
parsed_jetton_wallet_jetton_address_address
parsed_jetton_wallet_jetton_address_workchain
# Balance of jetton
parsed_jetton_wallet_balance
}
}
This example is available only for authorized users because of long request time.
https://dton.io/graphql/
{
wall_locks: groupAccountStates(
by: ["parsed_jetton_wallet_jetton_address_workchain", "parsed_jetton_wallet_jetton_address_address"]
filter_by: {
parsed_jetton_owner_code_hash: "12D793F9C449BEF45C7BB43685DE21D4E03C7118B5D38F0BF3C7B9BEB497900D" # All jettons with lock smart contract owner
}
aggregations: [
{field: "parsed_jetton_wallet_balance", operation: "sum"}, # Sum of locked balances
{operation: "count"} # Count of lock contracts
]
order_by: "parsed_jetton_wallet_balance__sum"
order_desc: true
) {
parsed_jetton_wallet_jetton_address_workchain
parsed_jetton_wallet_jetton_address_address
count
parsed_jetton_wallet_balance__sum
}
}
This example is available only for authorized users because of long request time.
https://dton.io/graphql/
{
wall_locks: groupAccountStates(
by: ["parsed_jetton_wallet_jetton_address_workchain", "parsed_jetton_wallet_jetton_address_address"]
filter_by: {
parsed_jetton_owner_code_hash: "12D793F9C449BEF45C7BB43685DE21D4E03C7118B5D38F0BF3C7B9BEB497900D" # All jettons with lock smart contract owner
}
aggregations: [
{field: "parsed_jetton_wallet_balance", operation: "sum"}, # Sum of locked balances
{operation: "count"} # Count of lock contracts
]
order_by: "parsed_jetton_wallet_balance__sum"
order_desc: true
) {
parsed_jetton_wallet_jetton_address_workchain
parsed_jetton_wallet_jetton_address_address
count
parsed_jetton_wallet_balance__sum
}
}
https://dton.io/graphql/
{
raw_account_states(
parsed_jetton_wallet_owner_address_address__friendly: "UQDfmsDtWQP5D_YkXX-XlULvs4HivRaKY38ftT2hS5yAAIma" # owner address
account_deleted: 0 # account not deleted
parsed_jetton_wallet_data_is_approved: 1 # wallet is real
order_by: "parsed_jetton_wallet_balance"
order_desc: true
){
# Jetton address (concat workcahin:address for RAW form)
parsed_jetton_wallet_jetton_address_address
parsed_jetton_wallet_jetton_address_workchain
# Balance of jetton
parsed_jetton_wallet_balance
}
}
This example is available only for authorized users because of long request time.
https://dton.io/graphql/
{
groupAccountStates(
by: ["parsed_jetton_wallet_jetton_address_workchain", "parsed_jetton_wallet_jetton_address_address"]
filter_by: {
parsed_jetton_wallet_data_is_approved: 1, # Account wallet data is approved by jetton
account_deleted: 0, # Account is not deleted
parsed_jetton_wallet_jetton_address_address__friendly: "EQALfk9nvSBhxD41SmFO3aM3R51CINSPs-ZUTAO2fz7bIJB8"} # Master jetton address
aggregations: [{operation: "count"}]
) {
count
}
}