BTTCScan
HomeTwitterKnowledge Base
Donau BTTCScan
Donau BTTCScan
  • Testnet BTTCScan
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Geth/Parity Proxy
    • Tokens
    • Stats
  • Visit Testnet BTTCScan
Powered by GitBook
On this page
  • Get BTTC Balance for a Single Address
  • Get BTTC Balance for Multiple Addresses in a Single Call
  • Get a list of 'Normal' Transactions By Address
  • Get a list of 'Internal' Transactions by Address
  • Get 'Internal Transactions' by Transaction Hash
  • Get "Internal Transactions" by Block Range
  • Get a list of 'BRC-20 Token Transfer Events' by Address
  • Get a list of 'BRC-721 Token Transfer Events' by Address
  • Get list of Blocks Validated by Address
  1. API Endpoints

Accounts

PreviousTestnet BTTCScanNextContracts

Last updated 1 year ago

Get BTTC Balance for a Single Address

Returns the BTTC balance of a given address.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=balance
   &address=0xa352a2476de85ea3bba5606ac61141cf78605b78
   &apikey=YourApiKeyToken

Try this endpoint in your

Query Parameters

Parameter
Description

address

the string representing the address to check for balance

tag

the string pre-defined block parameter, either earliest, pending or latest

Sample response

{
   "status":"1",
   "message":"OK",
   "result":"5008243924864904437771178825"
}

Tip: The result is returned in

Convert BTTC units using our

Get BTTC Balance for Multiple Addresses in a Single Call

Returns the balance of the accounts from a list of addresses.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=balancemulti
   &address=0x645de796d54ef73c46b859bcdfa194a08fa62566,0x9e1004ffa22fefa228664032048a543b1378d815,0xa352a2476de85ea3bba5606ac61141cf78605b78
   &tag=latest
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

address

the strings representing the addresses to check for balance, separated by , com

up to 20 addresses per call

tag

the string pre-defined block parameter, either earliest, pending or latest

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "account":"0x645de796d54ef73c46b859bcdfa194a08fa62566",
         "balance":"7962573886750000000000000"
      },
      {
         "account":"0x9e1004ffa22fefa228664032048a543b1378d815",
         "balance":"9866926828487777777777778"
      },
      {
         "account":"0xa352a2476de85ea3bba5606ac61141cf78605b78",
         "balance":"5008243459402904437771178825"
      }
   ]
}

Get a list of 'Normal' Transactions By Address

Returns the list of transactions performed by an address, with optional pagination.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=txlist
   &address=0x645de796d54ef73c46b859bcdfa194a08fa62566
   &startblock=0
   &endblock=99999999
   &page=1
   &offset=10
   &sort=asc
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

address

the string representing the addresses to check for balance

startblock

the integer block number to start searching for transactions

endblock

the integer block number to stop searching for transactions

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

sort

the sorting preference, use asc to sort by ascending and desc to sort by descending

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"8307450",
         "timeStamp":"1655207753",
         "hash":"0xa8d31db990656ab2718af45af3e319a785b3ba7e87bbba55ff814c709e0e78aa",
         "nonce":"24327",
         "blockHash":"0x7f28b1efd6d1391f8a5b6098fc776654db2fbc9ff14b832a27381ca3d3a7ca33",
         "transactionIndex":"0",
         "from":"0xf579f9c22b185800e3b6e6886ffc8584215c05a5",
         "to":"0x645de796d54ef73c46b859bcdfa194a08fa62566",
         "value":"10000000000000000000000000",
         "gas":"300000",
         "gasPrice":"300000000000000",
         "isError":"0",
         "txreceipt_status":"1",
         "input":"0x",
         "contractAddress":"",
         "cumulativeGasUsed":"21000",
         "gasUsed":"21000",
         "confirmations":"14805603",
         "methodId":"0x",
         "functionName":""
      },
      {
         "blockNumber":"8376168",
         "timeStamp":"1655364911",
         "hash":"0xc7892badd679bb2b32ef42c2df733fd604023910841709aae065a9e485121976",
         "nonce":"0",
         "blockHash":"0x712d8bf8f436eba8743e339b9e556c9d59637a2a6d55037c33af4a52fc3b964f",
         "transactionIndex":"0",
         "from":"0x645de796d54ef73c46b859bcdfa194a08fa62566",
         "to":"0xcee4b505233bc0719ab2cae556b179e53cffd3aa",
         "value":"0",
         "gas":"32609",
         "gasPrice":"300000000000000",
         "isError":"0",
         "txreceipt_status":"1",
         "input":"0x3798c7f2000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000062aadd2500000000000000000000000000000000000000000000000000000000004f18870000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000034e4654000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000251",
         "contractAddress":"",
         "cumulativeGasUsed":"32609",
         "gasUsed":"32609",
         "confirmations":"14736885",
         "methodId":"0x3798c7f2",
         "functionName":""
      }
   ]
}

Get a list of 'Internal' Transactions by Address

Returns the list of internal transactions performed by an address, with optional pagination.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=txlistinternal
   &address=0xa352a2476de85ea3bba5606ac61141cf78605b78
   &startblock=0
   &endblock=99999999
   &page=1
   &offset=10
   &sort=asc
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

address

the string representing the addresses to check for balance

startblock

the integer block number to start searching for transactions

endblock

the integer block number to stop searching for transactions

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

sort

the sorting preference, use asc to sort by ascending and desc to sort by descending

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"4348864",
         "timeStamp":"1646898055",
         "hash":"0x48be6b6e47ade4b0b4f11b85fc37551cb94bc77f53635adfb82ffcd04f15ea6e",
         "from":"0xd9dcae335acd3d4ffd2e6915dc702a59136ab46f",
         "to":"0xa352a2476de85ea3bba5606ac61141cf78605b78",
         "value":"1000000000000",
         "contractAddress":"",
         "input":"",
         "type":"call",
         "gas":"0",
         "gasUsed":"0",
         "traceId":"0_1",
         "isError":"0",
         "errCode":""
      },
      {
         "blockNumber":"6105502",
         "timeStamp":"1650525931",
         "hash":"0x9fff9a2ab393c5c074401d21e925a1654a84b3e69b92ca533f5b5e62be6471b9",
         "from":"0xd9dcae335acd3d4ffd2e6915dc702a59136ab46f",
         "to":"0xa352a2476de85ea3bba5606ac61141cf78605b78",
         "value":"10000000000000000000",
         "contractAddress":"",
         "input":"",
         "type":"call",
         "gas":"0",
         "gasUsed":"0",
         "traceId":"0_1",
         "isError":"0",
         "errCode":""
      }
   ]
}

Get 'Internal Transactions' by Transaction Hash

Returns the list of internal transactions performed within a transaction.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=txlistinternal
   &txhash=0x9fff9a2ab393c5c074401d21e925a1654a84b3e69b92ca533f5b5e62be6471b9
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

txhash

the string representing the transaction hash to check for internal transactions

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"6105502",
         "timeStamp":"1650525931",
         "from":"0xd9dcae335acd3d4ffd2e6915dc702a59136ab46f",
         "to":"0xa352a2476de85ea3bba5606ac61141cf78605b78",
         "value":"10000000000000000000",
         "contractAddress":"",
         "input":"",
         "type":"call",
         "gas":"0",
         "gasUsed":"0",
         "isError":"0",
         "errCode":""
      }
   ]
}

The isError field returns 0 for successful transactions and 1 for rejected/cancelled transactions.

Get "Internal Transactions" by Block Range

Returns the list of internal transactions performed within a block range, with optional pagination.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=txlistinternal
   &startblock=6105502
   &endblock=6106502
   &page=1
   &offset=10
   &sort=asc
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

startblock

the integer block number to start searching for transactions

endblock

the integer block number to stop searching for transactions

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

sort

the sorting preference, use asc to sort by ascending and desc to sort by descending

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"6105502",
         "timeStamp":"1650525931",
         "hash":"0x9fff9a2ab393c5c074401d21e925a1654a84b3e69b92ca533f5b5e62be6471b9",
         "from":"0xd9dcae335acd3d4ffd2e6915dc702a59136ab46f",
         "to":"0xa352a2476de85ea3bba5606ac61141cf78605b78",
         "value":"10000000000000000000",
         "contractAddress":"",
         "input":"",
         "type":"call",
         "gas":"0",
         "gasUsed":"0",
         "traceId":"0_1",
         "isError":"0",
         "errCode":""
      },
      {
         "blockNumber":"6105810",
         "timeStamp":"1650526567",
         "hash":"0x6822b6087a268cdb43542ada38fb8a4c7d77c164e66ca69bf79932d219e2cdc3",
         "from":"0xc4db404d417f34a9374914a6afafad273dfd0a1d",
         "to":"0x0000000000000000000000000000000000001010",
         "value":"1",
         "contractAddress":"",
         "input":"",
         "type":"call",
         "gas":"13880",
         "gasUsed":"13880",
         "traceId":"0_1",
         "isError":"0",
         "errCode":""
      }
   ]
}

The isError field returns 0 for successful transactions and 1 for rejected/cancelled transactions.

Get a list of 'BRC-20 Token Transfer Events' by Address

Returns the list of BRC-20 tokens transferred by an address, with optional filtering by token contract.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=tokentx
   &contractaddress=0x0f2b5005e5865ac67599b0777dc5bc4733a97b22
   &address=0x342ef59cdaf8ed9bcd2acb6d2633d15641c07cad
   &page=1
   &offset=5
   &sort=asc
   &apikey=YourApiKeyToken

Usage:

  • BRC-20 transfers from an address, specify the address parameter

  • BRC-20 transfers from a contract address, specify the contract address parameter

  • BRC-20 transfers from an address filtered by a token contract, specify both address and contract address parameters.

Query Parameters

Parameter
Description

address

the string representing the address to check for balance

contractaddress

the string representing the token contract address to check for balance

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

sort

the sorting preference, use asc to sort by ascending and desc to sort by descending

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"20736184",
         "timeStamp":"1681304856",
         "hash":"0x51efd193239f2152275c1b79655aed09f872dca566c1f3428567066a0a49879d",
         "nonce":"10",
         "blockHash":"0x51b7fd53481144d799ec7641d6040fcb5471e97480e4ed6e8e0d808a0dccb613",
         "from":"0x199a1f603f2df4947430a1466dd4db48c1d406dc",
         "contractAddress":"0x0f2b5005e5865ac67599b0777dc5bc4733a97b22",
         "to":"0x342ef59cdaf8ed9bcd2acb6d2633d15641c07cad",
         "value":"1000000000000000000000",
         "tokenName":"USDT Token",
         "tokenSymbol":"USDT",
         "tokenDecimal":"18",
         "transactionIndex":"0",
         "gas":"77184",
         "gasPrice":"9000000000000000",
         "gasUsed":"51456",
         "cumulativeGasUsed":"51456",
         "input":"deprecated",
         "confirmations":"2377025"
      },
      {
         "blockNumber":"20737900",
         "timeStamp":"1681308396",
         "hash":"0x52aa0f044f68cc216eb7202c56fcb7a6934771752928a9fbfd3c9b4907afb3b9",
         "nonce":"2",
         "blockHash":"0x2e49ca36a7ec0390ba01ec4456fcc5aab325502fd6b3467a007c3cf4771fa811",
         "from":"0x342ef59cdaf8ed9bcd2acb6d2633d15641c07cad",
         "contractAddress":"0x0f2b5005e5865ac67599b0777dc5bc4733a97b22",
         "to":"0xb06649e2d93d33a43e98f5318190bd5dfe0532ed",
         "value":"5000000000000000000",
         "tokenName":"USDT Token",
         "tokenSymbol":"USDT",
         "tokenDecimal":"18",
         "transactionIndex":"0",
         "gas":"195022",
         "gasPrice":"9000000000000000",
         "gasUsed":"192311",
         "cumulativeGasUsed":"192311",
         "input":"deprecated",
         "confirmations":"2375309"
      }
   ]
}

Get a list of 'BRC-721 Token Transfer Events' by Address

Returns the list of BRC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=tokennfttx
   &contractaddress=0xc118ea2dea6d83e971476d13cf462b70f317391c
   &address=0x0a0ace57566724a9fb53bae63171c9d4d3f5dd27
   &page=1
   &offset=100
   &sort=asc
   &apikey=YourApiKeyToken

Usage:

  • BRC-721 transfers from an address, specify the address parameter

  • BRC-721 transfers from a contract address, specify the contract address parameter

  • BRC-721 transfers from an address filtered by a token contract, specify both address and contract address parameters.

Query Parameters

Parameter
Description

address

the string representing the address to check for balance

contractaddress

the string representing the token contract address to check for balance

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

sort

the sorting preference, use asc to sort by ascending and desc to sort by descending

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"21234165",
         "timeStamp":"1682331942",
         "hash":"0xf2853ff41f230ddbecd8577066d9f02348778c226e2c4b1fb24f3714aaf8e22d",
         "nonce":"281",
         "blockHash":"0x22d988bdb0c9b1e7b1a528184123aaa1e0efc35328d883af273f34c23217bb75",
         "from":"0x0000000000000000000000000000000000000000",
         "contractAddress":"0xc118ea2dea6d83e971476d13cf462b70f317391c",
         "to":"0x0a0ace57566724a9fb53bae63171c9d4d3f5dd27",
         "tokenID":"10000",
         "tokenName":"CSQ",
         "tokenSymbol":"CSQ",
         "tokenDecimal":"0",
         "transactionIndex":"0",
         "gas":"251838",
         "gasPrice":"9000000000000000",
         "gasUsed":"249038",
         "cumulativeGasUsed":"249038",
         "input":"deprecated",
         "confirmations":"1879082"
      },
      {
         "blockNumber":"21234202",
         "timeStamp":"1682332020",
         "hash":"0x9a38e0bf48c1792b8e8912ee00667eb7ac32ba3862a996313fc06019a65fa980",
         "nonce":"282",
         "blockHash":"0x48029bd7bda18dda03f637b9d666409a72a99fddd8c999690ba9f53f5ba1da80",
         "from":"0x0000000000000000000000000000000000000000",
         "contractAddress":"0xc118ea2dea6d83e971476d13cf462b70f317391c",
         "to":"0x0a0ace57566724a9fb53bae63171c9d4d3f5dd27",
         "tokenID":"10001",
         "tokenName":"CSQ",
         "tokenSymbol":"CSQ",
         "tokenDecimal":"0",
         "transactionIndex":"0",
         "gas":"217638",
         "gasPrice":"9000000000000000",
         "gasUsed":"214838",
         "cumulativeGasUsed":"214838",
         "input":"deprecated",
         "confirmations":"1879045"
      }
   ]
}

Get list of Blocks Validated by Address

Returns the list of blocks validated by an address.

https://api-testnet.bttcscan.com/api
   ?module=account
   &action=getminedblocks
   &address=0xcb670b22515bcaeaa7b3ffb8149d303f00fb026e
   &blocktype=blocks
   &page=1
   &offset=10
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

address

the string representing the address to check for balance

blocktype

the string pre-defined block type, blocksfor canonical blocks

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "blockNumber":"23113261",
         "timeStamp":"1686207698",
         "blockReward":"0"
      },
      {
         "blockNumber":"23113252",
         "timeStamp":"1686207680",
         "blockReward":"0"
      }
   ]
}

Try this endpoint in your

Tip: The result is returned in

Convert BTTC units using our

​​ ​ Note : This API endpoint returns a maximum of 10000 records only.

Try this endpoint in your

Tip: Specify a smaller startblock and endblock range for faster search results.

Note : This API endpoint returns a maximum of 10000 records only.

Try this endpoint in your

Tip: Specify a smaller startblock and endblock range for faster search results

Note : This API endpoint returns a maximum of 10000 records only.

Try this endpoint in your

Note : This API endpoint returns a maximum of 10000 records only.

Try this endpoint in your

Try this endpoint in your

Try this endpoint in your

Try this endpoint in your

Note : The timeStamp is represented in

🎯
📝
💡
📝
💡
📝
📝
🔗
📖
browser
wei.
Unit Converter.
🔗
browser
📖
wei.
Unit Converter.
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
⌛
Unix timestamp.