Trias explorer apitotal

/api/all_blocks


Get block list data

Request method

GET

Request address

https://www.tscscan.io/api/all_blocks_v1/?size=25&page=1&chain=default 

Request Parameters

parameterdescriptiontypedefaultrequired

chain

chain type(default/tm)

string

default

no

size

request data size per page

int

50

no

page

request pagination

int

1

no

Return Data Description

Trias return data

field_nametypedescription

code

int

status code, 200 for success

total_size

int

block total size

page

int

pagination

total_page

int

total pages

return_data

list dict

block data list

Block data

field_nametypedescription

number

int

block number

size

int

block size

timestamp

int

block timestamp

hash

string

block hash

blockReward

0

block award, field not used

transactionsCount

int

transactions count

credit_max

int

credit max

time

string

block time

avgFee

double

transaction avgFee (currently constant: 0.00332)

Trias return data example

{
    "code": 200,
    "total_size": 10000,
    "page": 1,
    "first_number": 0,
    "last_number": 0,
    "total_page": 400,
    "return_data": [
        {
        "hash": "0xe760278994abc32cfcf9421d13c2ed7d606d276fb35dff4e5663658f82397ffd",
            "miner": "0xDd38105Ee1915E04342568575869c94a1270805E",
            "number": 1607982,
            "transactionsCount": 0,
            "size": 850,
            "blockReward": "0 TSM",
            "timestamp": 1709206620,
            "credit_value": [
                {
                    "193bfba425e7d3451d8410f1f4fa4554812df713": 1124443
                },
                {
                    "279915786fb12e67f0f18b765ca6831d9a73a5e3": 1127407
                },
                {
                    "2ac30b3946da0fa0d94db97f680e0e1ebaaa3c86": 1126350
                },
                {
                    "3637f213c9dbd5e2d8c65a6410475aec410473d5": 1126503
                },
                {
                    "394fb9f059d2887a61abace3dccbbf32d91fa123": 1127840
                },
                {
                    "9a059e83defaef0b7dc650222dae7abc3dc0d0c7": 1126968
                },
                {
                    "dd38105ee1915e04342568575869c94a1270805e": 1125409
                },
                {
                    "ecb7bed0204d3b8d244e7a121d649ba654ede492": 1126141
                },
                {
                    "eef9becbf568559653fbce25d0b946cc2e30771c": 1128931
                }
            ],
            "gasLimit": 39843751,
            "gasUsed": 0,
            "time": 1709206620,
            "avgFee": 0.00332,
            "gas_used": "0(0.0000%)",
            "gas_Rate": 0.0,
            "blockcredit": 1125409
        },
        ...
}

/api/block_info


Get block basic information

Request method

GET

Request address

https://www.tscscan.io/api/block_info_v1/?block_hash=0xd0b8e8ae11ff0450373cf9b873c3c579d74a16c6c81abe161b644400aa8a86dc&chain=default 

Request Parameters

parameterdescriptiontypedefaultrequired

chain

chain type(default/tm)

string

default

no

block_hash

block hash

string

no

yes

Return Data Description

Trias return data

field_nametypedescription

code

int

status code, 200 for success

return_data

dict

block details

Block details

field_nametypedescription

number

int

block number

size

int

block size

timestamp

int

block timestamp

difficulty

string

block diffcultly value,hexstring

nonce

string

block nonce

parentHash

string

parent block hash

nextHash

string

next block hash

miner

string

block miner

gasLimit

int

block gasLimit

gas_used

int

block gasUsed

blockcredit

list dict

block credit

total_fee

int

block transaction total fee

is_computed

bool

is computed total_fee

blockReward

0

block award, field not used

transactionsCount

int

transaction count

time

string

transaction time

confirmations

int

latest block confirmation, >0 means no =0 is the latest

Return Data Example

Trias return data example

{
    "code": 200,
    "return_data": {
        "number": 1605753,
        "transactionsCount": 5,
        "timestamp": 1709199893,
        "size": 1635,
        "difficulty": "0x2",
        "nonce": "0x0000000000000000 ",
        "parentHash": "0x21c8c812f3e9bc23e83dab6484980a32f120d33186e88e20d69ee65225ba14be",
        "miner": "0x193bfBA425e7D3451d8410f1f4fa4554812Df713",
        "gasLimit": 40000000,
        "gasUsed": 110004,
        "credit_value": [
            {
            "0x193bfba425e7d3451d8410f1f4fa4554812df713": 1122840
            },
            {
                "0x279915786fb12e67f0f18b765ca6831d9a73a5e3": 1125698
            },
            {
                "0x2ac30b3946da0fa0d94db97f680e0e1ebaaa3c86": 1124665
            },
            {
                "0x3637f213c9dbd5e2d8c65a6410475aec410473d5": 1124799
            },
            {
                "0x394fb9f059d2887a61abace3dccbbf32d91fa123": 1126159
            },
            {
                "0x9a059e83defaef0b7dc650222dae7abc3dc0d0c7": 1125277
            },
            {
                "0xdd38105ee1915e04342568575869c94a1270805e": 1123698
            },
            {
                "0xecb7bed0204d3b8d244e7a121d649ba654ede492": 1124446
            },
            {
                "0xeef9becbf568559653fbce25d0b946cc2e30771c": 1127216
            }
        ],
        "is_computed": false,
        "total_fee": 0,
        "blockReward": "0 TSM",
        "stateRoot": "0xa9cbaf2df64f51df630a9831c180501aa77af8ea1699f7fcbf34e85e8adcb974",
        "hash": "0xd0b8e8ae11ff0450373cf9b873c3c579d74a16c6c81abe161b644400aa8a86dc",
        "confirmed": true,
        "time": "2024-02-29 17:44:53",
        "confirmations": 1019,
        "nextHash": "0x3623204e47e74e30e7caad8f7b8855e08b49a7d35831764fd5a1cc6f602665c7",
        "gas_used": "110004(0.2750%)",
        "Timestamp": "Feb-29-2024 09:44:53 AM +UTC",
        "status": "Confirmed",
        "blockcredit": 1122840
    }
}

/api/block_transactions


Get block details

Request method

GET

Request address

https://www.tscscan.io/api/block_transactions_v1/?size=25&page=1&chain=default&block_hash=0xd0b8e8ae11ff0450373cf9b873c3c579d74a16c6c81abe161b644400aa8a86dc

Request Parameters

Parameterdescriptiontypedefaultrequired

chain

chain type(default/tm)

string

default

no

block_hash

block hash

string

no

yes

size

request data size per page

int

50

no

page

request pagination

int

1

no

Return Data Description

Trias return data

field_nametypedescription

code

int

status code, 200 for success

total_size

int

sum of block sizes

page

int

pagination

total_page

int

total pages

return_data

list dict

block data list

Block transaction

field_nametypedescription

id

int

Database primary key (not useful for business scenarios)

blockHash

string

transaction blockHash

source

string

transaction from address

to

string

transaction to address

gas

int

transaction gas

gasPrice

int

transaction gas price

nonce

int

transaction nonce

hash

string

transaction hash

transactionIndex

int

transaction block Index

value

int

transaction value

v

int

transaction signature v field value

r

string

transaction signature r field value

s

string

transaction signature s field value

timestamp

int

transaction timesatmp

tx_str

string

transaction input string

type1

int

transaction type

fee

int

transaction fee

Return Data Example

Trias return data example

{"code": 200, "total_size": 5, "page": 1, "total_page": 1, "contract_count": 0, "address_transactions": 5, "return_data": [{"hash": "0xd6dd3e54d02429d270ad30757e9e5d1e6a6ff04de4070f1ad564ef7b39077135", "to": "0x0000000000000000000000000000000000001000", "gasPrice": 0, "source": "0x193bfBA425e7D3451d8410f1f4fa4554812Df713", "value": "0.00010312875", "gas": 9223372036854775807, "fee": "0", "blockNumber": 1605753, "status": "succ", "contract_label": true, "timestamp": 1709199893, "tokenamount": "0", "method": "Common"}...]}

api/all_transactions/


Get all block transaction data

Request method

GET

Request address

https://www.tscscan.io/api/all_transactions_v1/ 

Request Parameters

parameterdescriptiontypedefaultrequired

chain

chain type(default/tm)

string

default

no

size

request data size per page

int

50

no

page

request pagination

int

1

no

Return Data Description

Trias return data

Ffeld_nametypedescription

code

int

status code, 200 for success

total_size

int

block total sizes

page

int

pagination

total_page

int

total pages

return_data

list dict

block data list

Block transaction

field_nametypedescription

blockHash

string

transaction block hash

blockNumber

int

transaction block number

source

string

transaction source

to

string

transaction to address

hash

string

transaction hash

value

string

transaction value

time

string

transaction time

tx_str

string

transaction input field

type

int

transaction type

Return Data Example

Trias return data example

{
    "code":200,
    "total_size":10000,
    "page":1,
    "total_page":200,
    "total_sum": 10000,
    "return_data": {
        {
            "hash":"0xa2273891a95472a205dd4ce57c26abc34cef5807eba1d13229e4162ddc2d6f08",
            "source":"0x38580efe497b22acc29783273e725a2a4f2aeea4",
            "to":"0x0000000000000000000000000000000000001001",
            "value":"0x0",
            "blockNumber":3948,
            "blockHash":"0xe20b6c9b229997b9b4f79ca7d25815ff7ab557930547b1e7843d4a2e747e2402",
            "tx_str":"0xc96be4cb0000000000000000000000000000000000000000000000000000000000000000",
            "type":0,
            "time":"2023-02-02 08:35:32"
        }        
    }
}

api/transaction_info/


Get transaction details

Request method

GET

Request address

https://www.tscscan.io/api/transaction_info_v1/?tx_hash=0x718d0964fc023746aa0e46f537bfd562c78f5dfcaf8d750ac76b71000971ba18&time=1709205297 

Request Parameters

parametersdescriptiontypedefaultMust

chain

chain type(default/tm)

string

default

no

txhash

transaction hash

string

no

yes

Return Data Description

Trias return data

field_nametypedescription

code

int

status code, 200 for success

return_data

dict

transaction details

Transaction details

field_nametypedescription

blockHash

string

transaction blockHash

source

string

transaction from address

to

string

transaction to address

gas

int

transaction gas

gasPrice

int

transaction gas price

nonce

int

transaction nonce

hash

string

transaction hash

transactionIndex

int

transaction block Index

value

int

transaction value

v

int

transaction signature v field value

r

string

transaction signature r field value

s

string

transaction signature s field value

gasUsed

int

gas used size

timestamp

int

transaction timesatmp

tx_str

string

transaction input string

type1

int

transaction type

fee

int

transaction fee

gasLimit

int

transaction gas limit

time

string

transaction time

tokenamount

string

transfer token amount

gasamount

string

transfer native token amount

method

string

contract method

tokenname

string

token name

status

string

status

transfer_list

obj

contract transfer list

gas_rate

string

transaction gas rate

to_address

string

token contrat address

Return Data Example

Trias return data example

{
    "code": 200,
    "return_data": {
        "id": 19909,
        "blockHash": "0x0e96a9b198f8e47604b804faa29ffa32afc678bfe2faff6d46b3cf72b67d34d5",
        "blockNumber": 1607541,
        "source": "0x947DD1558257a631049Fad9D686f427F86033c16",
        "toaddr": "0x1FfC121a47a70f24b4628815cE325908ff91e71A",
        "gas": 100000,
        "gasPrice": "0.000000001",
        "nonce": 2965671,
        "hash": "0x718d0964fc023746aa0e46f537bfd562c78f5dfcaf8d750ac76b71000971ba18",
        "transactionindex": 3,
        "value": "0",
        "r": "0xa681c07bfc6accdf9c1a8421fd1c4b2ce8ca2c6c27a8f7933e55376174e92652",
        "s": "0x4ef2991ad06a043bae1e4d47cc8c52a59273dc607871701d9dedb86e2db25b5c",
        "v": "0x43",
        "gasUsed": 36676,
        "timestamp": 1709205297,
        "tx_str": "0xa9059cbb0000000000000000000000008b13509f034335e042fc536d48bb466e04cc752a0000000000000000000000000000000000000000000000000000000c1b710800",
        "type1": 0,
        "fee": "0.0001",
        "recipients": [
            ""
        ],
        "recipient": "0x8b13509F034335E042Fc536d48Bb466E04Cc752a",
        "tokenamount": "52000000000",
        "gasamount": "0                                                                 ",
        "method": "Transfer",
        "tokenname": "TRIAS",
        "status": "succ",
        "offchaintype": "nuse",
        "to": "0x1FfC121a47a70f24b4628815cE325908ff91e71A",
        "gasPriceGwei": "1",
        "transfer_list": [
            {
                "from": "0x947DD1558257a631049Fad9D686f427F86033c16",
                "to": "0x8b13509F034335E042Fc536d48Bb466E04Cc752a",
                "tokenamount": "0.000000052",
                "tokenname": "TRIAS",
                "real_name": "Trias Token",
                "contractaddress": "0x1FfC121a47a70f24b4628815cE325908ff91e71A"
            }
        ],
        "contract_label": true,
        "gasLimit": 100000,
        "gas_rate": "100000 | 36676 (36.676 %)",
        "time": "Feb-29-2024 11:14:57 AM +UTC",
        "to_address": "0x1FfC121a47a70f24b4628815cE325908ff91e71A"
    }
}

Last updated