Skip to main content

Address

tokenviewAbout 1 min

Address

Three Address Formats for Bitcoin Addresses:

Legacy (P2PKH - Pay To PubKey Hash)

For example: 1Fh7ajXabJBpZPZw8bjD3QU4CuQ3pRty9u

Nested SegWit (P2SH - Pay To Script Hash)

For example: 3KF9nXowQ4asSGxRRzeiTpDjMuwM2nypAN

Native SegWit (Bech32)

For example: bc1qf3uwcxaz779nxedw0wry89v9cjh9w2xylnmqc3

Balance

GET https://services.tokenview.io/vipapi/addr/b/{lowercase-coin-abbr}/{address}?apikey={apikey}

Parameters

Request

curl --location 'https://services.tokenview.io/vipapi/addr/b/btc/183hmJGRuTEi2YDCWy5iozY8rZtFwVgahM?apikey={apikey}'

Response

{
    "code": 1,
    "msg": "成功",
    "data": "0.0006679"  // address balance
}

Transaction List

GET https://services.tokenview.io/vipapi/address/{lowercase-coin-abbr}/{address}/{page}/{page-size}?apikey={apikey}

Parameters

  • {lowercase-coin-abbr}: btc, bsv, ltc ...(BTC Category);
  • {address}: the address of BTC Category;
  • {page}: 1,2,3,......50 (Max);
  • {page-size}: transactions per page. 50 transactions is the max per page.
  • {apikey}: Get your own apikey from the API system: https://services.tokenview.ioopen in new window

Request

curl --location 'https://services.tokenview.io/vipapi/address/btc/1AqSbAsXh3zxE8Z61afpU65u4pxB9BBRcz/1/50?apikey={apikey}'

Response

{
    "code": 1,
    "msg": "成功",
    "data": [
        {
            "type": "address",
            "network": "BTC",
            "hash": "1AqSbAsXh3zxE8Z61afpU65u4pxB9BBRcz",
            "txCount": 2,
            "spend": "-0.07920632",
            "receive": "0.07920632",
            "normalTxCount": 0,
            "txs": [
                {
                    "type": "tx",
                    "network": "BTC",
                    "block_no": 573346,
                    "height": 573346,
                    "index": 808,
                    "time": 1556296856,
                    "txid": "83f86073df488e6f32acce48db40e86c4931ebe2a4f520641b1f12d96b00aa3b",
                    "fee": "0.00010775",
                    "confirmations": 193054,
                    "inputs": [
                        {
                            "input_no": 0,
                            "address": "1AqSbAsXh3zxE8Z61afpU65u4pxB9BBRcz",
                            "value": "0.07920632",
                            "received_from": {
                                "output_no": 0,
                                "txid": "fdc072a98dd017a8f3c0bcb0569f0b0ee33ef16a9dfb0e96e50866463e038142"
                            }
                        }
                    ],
                    "outputs": [
                        {
                            "output_no": 0,
                            "address": "1PuaubWLayAxAF8sAq6r41BAVYhSKAK4Nr",
                            "value": "0.07849857"
                        },
                        {
                            "output_no": 1,
                            "address": "17hLEAaZsaRxeBvpYB3JUjrwtSG8tUQaDG",
                            "value": "0.0006"
                        }
                    ],
                    "inputCnt": 1,
                    "outputCnt": 2
                },
                {
                    "type": "tx",
                    "network": "BTC",
                    "block_no": 573331,
                    "height": 573331,
                    "index": 11,
                    "time": 1556288370,
                    "txid": "fdc072a98dd017a8f3c0bcb0569f0b0ee33ef16a9dfb0e96e50866463e038142",
                    "fee": "0.00170771",
                    "confirmations": 193069,
                    "inputs": [
                        {
                            "input_no": 0,
                            "address": "1HG1kf8JcMCaQgh7d5YH5JFyy8soM4cRyK",
                            "value": "0.08151403",
                            "received_from": {
                                "output_no": 1,
                                "txid": "cd957a317f547ff23f623ba47067cc294297fadef89fb0e3bd229f226c43c498"
                            }
                        }
                    ],
                    "outputs": [
                        {
                            "output_no": 0,
                            "address": "1AqSbAsXh3zxE8Z61afpU65u4pxB9BBRcz",
                            "value": "0.07920632"
                        },
                        {
                            "output_no": 1,
                            "address": "17vuVSWNNRzE7HVRasQSSw5gqNPUH1UNyj",
                            "value": "0.0006"
                        }
                    ],
                    "inputCnt": 1,
                    "outputCnt": 2
                }
            ]
        }
    ]
}

First Transaction

GET https://services.tokenview.io/vipapi/firsttx/{lowercase-coin-abbr}/{address}?apikey={apikey}

Parameters

Request

curl --location https://services.tokenview.io/vipapi/firsttx/btc/1AqSbAsXh3zxE8Z61afpU65u4pxB9BBRcz?apikey={apikey}

Response

{
    "code": 1,
    "msg": "成功",
    "data": {
        "block": 573331,
        "time": 1556288370
    }
}

Response Description

{
    "block": 573331, // The block height the transaction is on
    "time": 1556288370 // The time the transaction occurred
}

Pending Transaction List

GET https://services.tokenview.io/vipapi/pending/ntx/{lowercase-coin-abbr}/{address}?apikey={apikey}

Parameters

Request

curl --location https://services.tokenview.io/vipapi/pending/ntx/usdt/39ZEaLMDxWi5EWx9cQ2W3ixDP8rWHhz8GY?apikey={apikey}

Response

{
    "code": 1,
    "msg": "成功",
    "data": [
        {
            "type": "tx",
            "network": "USDT",
            "time": 1670468085,
            "txid": "f0af9582258bbce9e7712142a9150bf232aafcc707783fe81b94e7dd4318fd71",
            "fee": "0.00010000",
            "inputs": [
                {
                    "address": "39ZEaLMDxWi5EWx9cQ2W3ixDP8rWHhz8GY",
                    "value": "5000000.00000000"
                }
            ],
            "outputs": [
                {
                    "address": "37w1zHnZUDBqcR7jnxepXtREKQEHDnLN6Z",
                    "value": "5000000.00000000"
                }
            ],
            "inputCnt": 1,
            "outputCnt": 1,
            "type_int": 0,
            "type_str": "Simple Send"
        }
    ]
}
Last update: