### Request example Source: https://services.tokenview.io/docs/node-service/btc/rawtransactions.html A cURL command example for invoking the signrawtransactionwithkey method. ```bash curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/btc?apikey={apikey}' \ --data '{"jsonrpc": "2.0", "method": "signrawtransactionwithkey", "params": ["myhex", "[\"key1\",\"key2\"]"]}' ``` -------------------------------- ### GET Transaction Confirmations Response JSON Example Source: https://services.tokenview.io/docs/api/blockchain/btc/transaction.html Example JSON response from the Transaction Confirmations endpoint, showing network, transaction ID, and confirmation count. ```json { "code": 1, "msg": "成功", "data": { "network": "BTC", "txId": "83f86073df3f88e6e32acce48db40e86c4931ebe2a4f520641b1f12d96b00aa3b", "confirmation": 193210 } } ``` -------------------------------- ### joinpsbts request example Source: https://services.tokenview.io/docs/node-service/btc/rawtransactions.html Example cURL request to join multiple PSBTs. ```bash curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/btc?apikey={apikey}' \ --data '{"jsonrpc": "2.0", "method": "joinpsbts", "params": ["psbt"]}' ``` -------------------------------- ### Example request header Source: https://services.tokenview.io/docs/transaction-track/subscription.html The header contains the X-Tokenview-Signature used for authentication verification. ```http Content-Type: application/json;charset=UTF-8 X-Tokenview-Signature: your-hashed-signature ``` -------------------------------- ### GET Transaction Info Response JSON Example Source: https://services.tokenview.io/docs/api/blockchain/btc/transaction.html Example JSON response from the Transaction Info endpoint with code 1 and message 成功, including block number, transaction ID, fee, confirmations, and input/output arrays. ```json { "code": 1, "msg": "成功", "data": { "type": "tx", "network": "BTC", "block_no": 573346, "height": 573346, "blockHash": "00000000000000000008d3817ca06a45b6a53e8ac632bb873f68acd73735bd3b", "index": 808, "time": 1556296856, "txid": "83f86073df488e6f32acce48db40e86c49393e2a4f520641b1f12d96b00aa3b", "fee": "0.00010775", "confirmations": 193210, "inputs": [ { "input_no": 0, "address": "1AqSbAsXh38zxE8Z61afpU65u4pxB9BBRcz", "value": "0.07920632", "received_from": { "output_no": 0, "txid": "fdc072a98dd017da8f3c0bcb0569f0b0ee33ef16a9dfb0e96e5066463e0e38142" } } ], "outputs": [ { "output_no": 0, "address": "1PuaubWLayAxAF8sAq6r41BAVYhSKAK4Nr", "value": "0.07849857" }, { "output_no": 1, "address": "17hLEAaZsaRxeBvpYB3JUjrwtSG8tUQaDG", "value": "0.0006" } ], "inputCnt": 1, "outputCnt": 2 } } ``` -------------------------------- ### Get NEO Address Balance - JSON Response Source: https://services.tokenview.io/docs/api/blockchain/neo/address.html Example response from the balance endpoint. The data field contains the balance as a string. ```json { "code": 1, "msg": "成功", "data": "37768679" } ``` -------------------------------- ### Get NFT transfers request and response Source: https://services.tokenview.io/docs/nft/basic/transcations.html This example shows the curl request to fetch NFT transfers for an Ethereum address and the corresponding JSON response structure. ```bash curl --location https://services.tokenview.io/nft/eth/blockdata/assets/tokentrans/all/0xab235c580f64a12da93886d478bc9c938abecfec/all/1/10?apikey={apikey} ``` ```json { "code": 1, "msg": "成功", "data": [ { "blockNo": 15236079, "collectionAddr": "0xce6e3a14b5f8ce2b05af0f117dc922769779aa3b", "collectionSymbol": "MEGAMI", "time": 1659080495, "txid": "0x83ba580d09a7597c7fe2e603e870ea919197fed3ec38695f5d700253c5c0ac77", "tokenInfo": { "h": "0xce6e3a14b5f8ce2b05af0f117dc922769779aa3b", "f": "MEGAMI", "s": "MEGAMI", "d": "0", "c": "RC721" }, "from": "0xab235c580f64a12da93886d478bc9c938abecfec", "to": "0x2c893b54e24188764ab71bbb72baca8990dea2e4", "nftId": "9269", "contractType": "1" }, { "blockNo": 15165986, "collectionAddr": "0xce6e3a14b5f8ce2b05af0f117dc922769779aa3b", "collectionSymbol": "MEGAMI", "time": 1658138842, "txid": "0x6a92f71b82e9b5fb20a881f73f10c9e3e342c2a50f50ef9f24fc45a3ac5a010f", "tokenInfo": { "h": "0xce6e3a14b5f8ce2b05af0f117dc922769779aa3b", "f": "MEGAMI", "s": "MEGAMI", "d": "0", "c": "RC721" }, "from": "0xe197535eefae6fc554e0bdf2cd96625694f63449", "to": "0xab235c580f64a12da93886d478bc9c938abecfec", "nftId": "9269", "contractType": "1" }, { "blockNo": 15126091, "collectionAddr": "0x6be69b2a9b153737887cfcdca7781ed1511c7e36", "collectionSymbol": "KGF", "time": 1657605164, "txid": "0x46a9193be0057cd2dfa1b2d17f042f7defa1b64eb26527399d35e5a5f7a8aa99", "tokenInfo": { "h": "0x6be69b2a9b153737887cfcdca7781ed1511c7e36", "f": "Killer GF", "s": "KGF", "d": "0", "c": "RC721" }, "from": "0x2098e959ef98d415bb0407b4b48234e407da5e76", "to": "0xab235c580f64a12da93886d478bc9c938abecfec", "nftId": "6073", "contractType": "1" }, { "blockNo": 14854638, "collectionAddr": "0x932261f9fc8da46c4a22e31b45c4de60623848bf", "collectionSymbol": "DNA", "time": 1653661297, "txid": "0xf771775ab167458b0d44fd48d6463c7b39dab5292209f547c7890b9595aa7b22", "tokenInfo": { "h": "0x932261f9fc8da46c4a22e31b45c4de60623848bf", "f": "Zerion DNA 1.0", "s": "DNA", "d": "0", "c": "RC721" }, "from": "0x0000000000000000000000000000000000000000", "to": "0xab235c580f64a12da93886d478bc9c938abecfec", "nftId": "17962", "contractType": "1" }, { "blockNo": 14853837, "collectionAddr": "0xab17cd6c1138336d7fae7d4dcd0aee2176a8e4bd", "collectionSymbol": "PGG", "time": 1653649967, "txid": "0x0b9337f61893b4a871098cd83302687675f4ef25573b5633d5a4fba4fe6f0b8f", "tokenInfo": { "h": "0xab17cd6c1138336d7fae7d4dcd0aee2176a8e4bd", "f": "PixelatedGanjaGators", "s": "PGG", "d": "0", "c": "RC721" }, "from": "0x0000000000000000000000000000000000000000", "to": "0xab235c580f64a12da93886d478bc9c938abecfec", "nftId": "2981", "contractType": "1" }, { "blockNo": 14853837, "collectionAddr": "0xab17cd6c1138336d7fae7d4dcd0aee2176a8e4bd", "collectionSymbol": "PGG", "time": 1653649967, "txid": "0x0b9337f61893b4a871098cd83302687675f4ef25573b5633d5a4fba4fe6f0b8f", "tokenInfo": { "h": "0xab17cd6c1138336d7fae7d4dcd0aee2176a8e4bd", "f": "PixelatedGanjaGators", "s": "PGG", "d": "0", "c": "RC721" } } ] } ``` -------------------------------- ### Retrieve Daily Active Address Statistics Source: https://services.tokenview.io/docs/api/blockchain/eth/charts.html Example request and response for fetching daily active address counts for Ethereum. ```bash curl --location https://services.tokenview.io/vipapi/chart/eth/daily_active_address?apikey={apikey} ``` ```json { "code": 200, "unit": null, "data": "[{\"2015-07-30\": 8894}, {\"2015-07-31\": 0}, {\"2015-08-01\": 0}, {\"2015-08-02\": 0}, {\"2015-08-03\": 0}, {\"2015-08-04\": 0}, {\"2015-08-05\": 0}, {\"2015-08-06\": 0}, {\"2015-08-07\": 1114}, {\"2015-08-08\": 860}, {\"2015-08-09\": 757}, {\"2015-08-10\": 1038}, {\"2015-08-11\": 2386}, {\"2015-08-12\": 926}, {\"2015-08-13\": 1316}, {\"2015-08-14\": 1621}, {\"2015-08-15\": 1346}, {\"2015-08-16\": 1217}, {\"2015-08-17\": 1255}, {\"2015-08-18\": 1302}, {\"2015-08-19\": 1384}, {\"2015-08-20\": 1189}, {\"2015-08-21\": 1445}, {\"2015-08-22\": 1429}, {\"2015-08-23\": 1608}, {\"2015-08-24\": 1441}, {\"2015-08-25\": 1608}, {\"2015-08-26\": 1560}, {\"2015-08-27\": 1616}, {\"2015-08-28\": 1564}, {\"2015-08-29\": 1394}, {\"2015-08-30\": 1639}, {\"2015-08-31\": 1534}, {\"2015-09-01\": 1575}, {\"2015-09-02\": 1524}, {\"2015-09-03\": 1461}, {\"2015-09-04\": 1464}, {\"2015-09-05\": 1498}, {\"2015-09-06\": 1603}, {\"2015-09-07\": 1665}, {\"2015-09-08\": 1560}, {\"2015-09-09\": 1556}, {\"2015-09-10\": 1547}, {\"2015-09-11\": 1713}, {\"2015-09-12\": 1561}, {\"2015-09-13\": 1623}, {\"2015-09-14\": 1643}, {\"2015-09-15\": 1501}, {\"2015-09-16\": 1523}, {\"2015-09-17\": 1528}, {\"2015-09-18\": 1499}, {\"2015-09-19\": 1382}, {\"2015-09-20\": 1486}, {\"2015-09-21\": 1556}, {\"2015-09-22\": 1590}, {\"2015-09-23\": 1754}, {\"2015-09-24\": 1607}, {\"2015-09-25\": 1565}, {\"2015-09-26\": 1422}, {\"2015-09-27\": 1430}, {\"2015-09-28\": 1554}, {\"2015-09-29\": 1543}, {\"2015-09-30\": 1511}, {\"2015-10-01\": 1485}, {\"2015-10-02\": 1386}, {\"2015-10-03\": 1404}, {\"2015-10-04\": 1403}, {\"2015-10-05\": 1447}, {\"2015-10-06\": 1439}, {\"2015-10-07\": 1393}, {\"2015-10-08\": 1349}, {\"2015-10-09\": 1380}, {\"2015-10-10\": 1283}, {\"2015-10-11\": 1319}, {\"2015-10-12\": 1370}, {\"2015-10-13\": 1505}, {\"2015-10-14\": 1613}, {\"2015-10-15\": 1533}, {\"2015-10-16\": 1405}, {\"2015-10-17\": 1382}, {\"2015-10-18\": 1354}, {\"2015-10-19\": 1471}, {\"2015-10-20\": 1342}, {\"2015-10-21\": 1531}, {\"2015-10-22\": 1440}, {\"2015-10-23\": 1575}, {\"2015-10-24\": 1711}, {\"2015-10-25\": 1631}, {\"2015-10-26\": 1678}, {\"2015-10-27\": 1771}, {\"2015-10-28\": 1730}, {\"2015-10-29\": 2005}, {\"2015-10-30\": 2290}, {\"2015-10-31\": 2013}, {\"2015-11-01\": 2143}, {\"2015-11-02\": 2070}, {\"2015-11-03\": 2109}, {\"2015-11-04\": 2086}, {\"2015-11-05\": 1967}, {\"2015-11-06\": 1841}, {\"2015-11-07\": 2162}, {\"2015-11-08\": 2333}, {\"2015-11-09\": 2115}, {\"2015-11-10\": 1913}, {\"2015-11-11\": 2091}, {\"2015-11-12\": 1852}, {\"2015-11-13\": 1850}, {\"2015-11-14\": 1817}, {\"2015-11-15\": 1790}, {\"2015-11-16\": 1899}, {\"2015-11-17\": 1930}, {\"2015-11-18\": 1896}, {\"2015-11-19\": 1898}, {\"2015-11-20\": 1782}, {\"2015-11-21\": 1751}, {\"2015-11-22\": 2043}, {\"2015-11-23\": 1793}, {\"2015-11-24\": 1864}, {\"2015-11-25\": 1736}, {\"2015-11-26\": 1824}, {\"2015-11-27\": 1666}, {\"2015-11-28\": 1666}, {\"2015-11-29\": 1686}, {\"2015-11-30\": 1806}, {\"2015-12-01\": 1798}, {\"2015-12-02\": 1699}, {\"2015-12-03\": 1792}, {\"2015-12-04\": 1802}, {\"2015-12-05\": 1785}, {\"2015-12-06\": 2162}, {\"2015-12-07\": 1984}, {\"2015-12-08\": 1826}, {\"2015-12-09\": 1778}, {\"2015-12-10\": 1815}, {\"2015-12-11\": 1831}, {\"2015-12-12\": 2177}, {\"2015-12-13\": 2026}, {\"2015-12-14\": 2224}, {\"2015-12-15\": 2189}, {\"2015-12-16\": 2178}, {\"2015-12-17\": 2500}"] } ``` -------------------------------- ### Create newHeads subscription request Source: https://services.tokenview.io/docs/node-service/websocket/subscription-api-endpoints/newheads.html Use wscat to initiate a newHeads subscription over WebSocket. Replace {network} and {apikey} with your specific values. ```bash wscat -c wss://services.tokenview.io/vipapi/websocket/node/{network}/{apikey} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` -------------------------------- ### GET 721 Token Holding Info on Address - Response Source: https://services.tokenview.io/docs/api/blockchain/eth/nft.html Example JSON response from the deprecated NFT endpoint, showing token holder addresses, quantities, and ratios. ```json { "code": 1, "msg": "成功", "data": { "page": 1, "size": 10, "total": 26372, "data": [ { "quantity": 290, "address": "0x7381c2e71a60cf9ef5ef8fbc7b040b390797e2ad", "ratio": 0.9292489105357601 }, { "quantity": 250, "address": "0xf139b56d638c25871da1c010697d7b5b9a214e02", "ratio": 0.8010766470135864 }, { "quantity": 128, "address": "0x8dea94ac7a9625e16195961059f88945aad80472", "ratio": 0.41015124327095615 }, { "quantity": 71, "address": "0xdca043d1aa8061d6577b361de32f6ae552b30339", "ratio": 0.22750576775185852 }, { "quantity": 70, "address": "0x659296437f67b947ba56b04dc3f20dc4c5f08516", "ratio": 0.22430146116380417 }, { "quantity": 70, "address": "0x6e09c5d2614c809312b1b739ca956ea287f2a12a", "ratio": 0.22430146116380417 }, { "quantity": 70, "address": "0x9b295182eb8b4c62c420596af8a07c65e549eb7e", "ratio": 0.22430146116380417 }, { "quantity": 70, "address": "0xd91749e967f83b493206535d736f0331b7084483", "ratio": 0.22430146116380417 }, { "quantity": 70, "address": "0xddff8b0b76bfbd717e1936c827ff2c4badbab99c", "ratio": 0.22430146116380417 }, { "quantity": 69, "address": "0x18eb5b2a1d221966e75d174c62f9e8afa431a54f", "ratio": 0.22109715457574983 } ] } } ``` -------------------------------- ### GET /vipapi/address/richrange/neo/1/200 Source: https://services.tokenview.io/docs/api/blockchain/neo/toprich.html Retrieves the list of top rich addresses on the NEO blockchain, sorted by balance in descending order. The endpoint supports pagination via start and end parameters in the path. ```APIDOC ## [GET] /vipapi/address/richrange/neo/1/200 ### Description Obtain the list of Top 200 rich addresses and the list is arranged in descending order of balance. ### Method GET ### Endpoint `https://services.tokenview.io/vipapi/address/richrange/neo/1/200?apikey={apikey}` ### Parameters #### Path Parameters - **start** (integer) - Required - The starting index for the rich list range. In the example, it is 1. - **end** (integer) - Required - The ending index for the rich list range. In the example, it is 200. #### Query Parameters - **apikey** (string) - Required - Your activated API key. Get it from the API system: https://services.tokenview.io ### Request Example ``` curl --location https://services.tokenview.io/vipapi/address/richrange/neo/1/10?apikey={apikey} ``` ### Response #### Success Response (200) - **code** (integer) - Response code, 1 indicates success. - **msg** (string) - Response message, e.g., "成功" (success). - **data** (array) - List of rich addresses. - **addr** (string) - The NEO address. - **balance** (number) - The balance of the address. - **addrAlias** (string|null) - Alias of the address, if any. - **txCnt** (integer) - Transaction count of the address. - **network** (string|null) - Network information, if any. #### Response Example ``` { "code": 1, "msg": "成功", "data": [ { "addr": "ANeo2toNeo3MigrationAddressxwPB2Hz", "balance": 37768679, "addrAlias": null, "txCnt": 19348, "network": null }, { "addr": "AQVh2pG732YvtNaxEGkQUei3YA4cvo7d2i", "balance": 27800304, "addrAlias": null, "txCnt": 18, "network": null }, { "addr": "Ae2d6qj91YL3LVUMkza7WQsaTYjzjHm4z1", "balance": 9762322, "addrAlias": null, "txCnt": 414, "network": null }, { "addr": "AZhafj46oNu6gn5CxRkdWVb7cDQF6okkL6", "balance": 4790101, "addrAlias": null, "txCnt": 84, "network": null }, { "addr": "AYSQMLw3PpFuKGarsUWesfmgRjkSQ6cxkt", "balance": 4653705, "addrAlias": null, "txCnt": 225686, "network": null }, { "addr": "AR4QmqYENiZAD6oXe7ftm6eDcwtHk7rVTT", "balance": 1471973, "addrAlias": null, "txCnt": 368420, "network": null }, { "addr": "AMoo1rHY2oNj6jCoQrGXhLPRxVwFYFtqH6", "balance": 696131, "addrAlias": null, "txCnt": 11, "network": null }, { "addr": "AULwXgpApvNVqqQ3rGE8xobKDqwax9Z4de", "balance": 631418, "addrAlias": null, "txCnt": 55, "network": null }, { "addr": "AM466VKWe5uMXmB4hCwPXWbacygXMifxRn", "balance": 600000, "addrAlias": null, "txCnt": 1, "network": null }, { "addr": "AGnmCC16ubaaKwgd44jTbRt63vr9PaigsE", "balance": 595584, "addrAlias": null, "txCnt": 78, "network": null } ] } ``` ``` -------------------------------- ### createwitness POST request Source: https://services.tokenview.io/docs/node-service/tron/vote.html Submits an application to become a witness using the specified owner address and URL. ```bash curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/createwitness?apikey={apikey}' \ --data '{ "owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292", "url": "007570646174654e616d6531353330363038383733343633", "permission_id": 0, "visible": true }' ``` -------------------------------- ### Get NEO Address Transaction List - JSON Response Source: https://services.tokenview.io/docs/api/blockchain/neo/address.html Example response from the transaction list endpoint. The data array contains transaction objects with details such as txid, block number, and from/to addresses. ```json { "code": 1, "msg": "成功", "data": [ { "appendixData": null, "pending": null, "type": "tx", "network": "NEO", "block_no": 9086412, "height": 9086412, "blockHash": null, "index": 15, "time": 1650062006, "txid": "0x948cbc7b2efc6efac9313e99d2012805cd94fd4074e289202764d1ce2ed5b395", "fee": null, "tType": "ContractTransaction", "confirmations": 719, "size": 262, "sysFee": "0", "netFee": "0", "gas": null, "script": null, "scripts": null, "from": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "AcPEc6MRznbaZyu3jPE2r6A5VvpPLJvFYN", "addressAlias": null, "unit": "NEO", "value": "49", "tokenInfo": null } ], "to": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "ANeo2toNeo3MigrationAddressxwPB2Hz", "addressAlias": null, "unit": "NEO", "value": "49", "tokenInfo": null } ], "tokenTransfer": null }, { "appendixData": null, "pending": null, "type": "tx", "network": "NEO", "block_no": 9085981, "height": 9085981, "blockHash": null, "index": 4, "time": 1650054882, "txid": "0x1733764d1229bf6b2dce40efab0bc5ab0f75fdbecd81c697257c79140e4c4ad0", "fee": null, "tType": "ContractTransaction", "confirmations": 1150, "size": 262, "sysFee": "0", "netFee": "0", "gas": null, "script": null, "scripts": null, "from": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "ARJehibfv8NaJ7rL1mFmCqTmFNDvqCWxos", "addressAlias": null, "unit": "NEO", "value": "178", "tokenInfo": null } ], "to": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "ANeo2toNeo3MigrationAddressxwPB2Hz", "addressAlias": null, "unit": "NEO", "value": "178", "tokenInfo": null } ], "tokenTransfer": null }, { "appendixData": null, "pending": null, "type": "tx", "network": "NEO", "block_no": 9085930, "height": 9085930, "blockHash": null, "index": 13, "time": 1650053990, "txid": "0x418f0ad8aa63a8d7af2796156e8d6d7cfa18849182cc68c4d2b3c62375129c26", "fee": null, "tType": "ContractTransaction", "confirmations": 1201, "size": 322, "sysFee": "0", "netFee": "0", "gas": null, "script": null, "scripts": null, "from": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "ARJehibfv8NaJ7rL1mFmCqTmFNDvqCWxos", "addressAlias": null, "unit": "NEO", "value": "178", "tokenInfo": null } ], "to": [ { "asset": "0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b", "address": "ANeo2toNeo3MigrationAddressxwPB2Hz", "addressAlias": null, "unit": "NEO", "value": "178", "tokenInfo": null } ], "tokenTransfer": null } ] } ``` -------------------------------- ### Create logs subscription with eth_subscribe Source: https://services.tokenview.io/docs/node-service/websocket.html Creates a logs subscription filtered by address and topics. The response returns a subscription id and then a notification with the matching log entry. ```shell wscat -c wss://services.tokenview.io/vipapi/websocket/node/{network}/{apikey} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` ```json { "id": 2, "jsonrpc": "2.0", "result": "0x4a8a4c0517381924f9838102c5a4dcb7" } { "jsonrpc": "2.0", "method": "eth_subscription", "params": { "subscription": "0x4a8a4c0517381924f9838102c5a4dcb7", "result": { "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "blockHash": "0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04", "blockNumber": "0x29e87", "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", "logIndex": "0x0", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"], "transactionHash": "0xe044a5540a67caafd07f802ab9f2af60bdfe337e395ecd84b4877a3d1ab4", "transactionIndex": "0x0" } } } ``` -------------------------------- ### Request newPendingTransactions subscription via wscat Source: https://services.tokenview.io/docs/node-service/websocket/subscription-api-endpoints/newpendingtransactions.html Use this command to initiate a subscription to new pending transactions. Replace {network} and {apikey} with your specific network and activated API key. ```bash wscat -c wss://services.tokenview.io/vipapi/websocket/node/{network}/{apikey} -x '{ "id": 1, "jsonrpc": "2.0", "method": "eth_subscribe", "params": ["newPendingTransactions"] }' ``` -------------------------------- ### GET Transaction Confirmations Request Crypto Example Source: https://services.tokenview.io/docs/api/blockchain/btc/transaction.html Curl command to retrieve the number of confirmations for a BTC transaction using the /tx/confirmation/btc/{transaction-hash} endpoint. Requires apikey and uses the BTC Category coin abbreviation. ```bash curl --location https://services.tokenview.io/vipapi/tx/confirmation/btc/83f86073df488e6f32acce48db7ea4b6b40e86c4931ebe2a4f520641b1f12d96b00aa3b?apikey={apikey} ``` -------------------------------- ### Get transfers by account & collection - JSON response Source: https://services.tokenview.io/docs/nft/basic/transcations.html Example JSON response from the transfers endpoint. The data array contains transfer records with fields like blockNo, txid, from, to, nftId, and amount. The amount field is only present for RC1155 collections. ```json { "code": 1, "msg": "成功", "data": { "page": 1, "size": 10, "total": 1, "data": [ { "blockNo": 15312973, "collectionAddr": "0x88d6f1be76b5a86cff11f76051f191f00dda116a", "collectionSymbol": "", "time": 1660115516, "txid": "0x185a649afe3785b36c7bb705c30eddb08a37a70e474add88c6d794fcd6ccf08e", "tokenInfo": { "h": "0x88d6f1be76b5a86cff11f76051f191f00dda116a", "f": "", "s": "", "d": "0", "c": "RC1155" }, "from": "0x7e9788608c9d5aad9660ae362c6bdc11b15e6292", "to": "0x41895cf5ec3faf9cf22992aeaba4f62f743e5b18", "nftId": "8", "contractType": "2", "amount": "2" } ] } } ``` -------------------------------- ### Subscribe to logs via wscat Source: https://services.tokenview.io/docs/node-service/websocket/subscription-api-endpoints/logs.html Use the wscat command to initiate a logs subscription for a specific network and API key. The request includes the method eth_subscribe and parameters for the address and topics. ```bash wscat -c wss://services.tokenview.io/vipapi/websocket/node/{network}/{apikey} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` -------------------------------- ### GET Transaction Info Request curl Example Source: https://services.tokenview.io/docs/api/blockchain/btc/transaction.html Curl command to retrieve transaction information for a BTC transaction using the /tx/btc/{transaction-hash} endpoint. Requires apikey; coin abbreviation parameter is the currency code such as btc, bsv, or ltc. ```bash curl --location https://services.tokenview.io/vipapi/tx/btc/83f86073df488e6f32acce48db40e86c4931ebe2a4f520641b1f12d96b00aa3b?apikey={apikey} ``` -------------------------------- ### Subscription Response Example Source: https://services.tokenview.io/docs/node-service/websocket/subscription-api-endpoints/tokenview_pendingtransactions.html A sample JSON response received from the WebSocket subscription when hashesOnly is set to false. ```json { "jsonrpc": "2.0", "method": "eth_subscription", "params": { "subscription": "0x2ab5239be033147ad679afe7e571e5a1", "result": { "blockHash": null, "blockNumber": null, "from": "0x2f4e7d5d324982ef77cd259b9385e77d122f12a5", "gas": "0xe407", "gasPrice": "0x1697cbdf4", "hash": "0x74759f6b716b700b740416a1f91082c7bb101f3aec7146fe3cdf6069a33804bb", "input": "0x23b872dd0000000000000000000000002e4da61e09709a6b78478e204fb657a2c5e890730000000000000000000000000fb8becf4fe62c0af8bc15c4022d4287419f4db0000000000000000000000000000000000000000000000000000000005a1510d0", "nonce": "0x49", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "transactionIndex": null, "value": "0x0", "type": "0x0", "chainId": "0x1", "v": "0x25", "r": "0xc2db03ad2fd312d934145b3ac86836bb050a4482db653aacc92ea62051c92517", "s": "0x43edc098e8fdcb7c0cb16762623c8cb2af9f92ca2865eb0fc01e0447893508d2" } } } ```