Skip to main content

ETH Category

tokenviewAbout 1 min

ETH Category

ETH Category:ETH、BSC、KCS、Beacon、MOVR

Send RawTransaction

POST https://services.tokenview.io/vipapi/onchainwallet/{lowercase-coin-abbr}?apikey={apikey}

Parameters

Apply to: Send a transaction that has been signed and sent into the block.

The POST request BODY is text in JSON format, you may just replace the "hexadecimal text" with a packaged transaction as follows:

{"jsonrpc": "2.0", "id":"viewtoken", "method": "eth_sendRawTransaction", "params": ["hexadecimal text"] }

Correct answer format

{"result":"tx hash","jsonrpc": "2.0", "id":"viewtoken"}

Error answer format

{"result":null,"error":{"error code":,"message":"error msg"},"jsonrpc": "2.0", "id":"viewtoken"}

Request

curl --location 'https://services.tokenview.io/vipapi/onchainwallet/eth' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id":"viewtoken", "method": "eth_sendRawTransaction", "params": ["0xf8695984f01db23082520894b0028b81dfe5463dd2b5802b76a0d3e18993e81a8609184e72a0008025a00d8c88cc81e7994ab0a8f0bbf02b609dd921ca078d91645d2c12d8353cd25611a022bbe387aa6bb7a01a52bdca2efda76ce90cf4778222cfced828ee580e4651cb"] }'

Response

{
    "jsonrpc": "2.0",
    "id": "viewtoken",
    "result": "0x806352ce30267f28a0562ec3f7a8dfa271a950992c8beec2c5d4c20eddc1bfbc"
}

GetTransactionCount

POST https://services.tokenview.io/vipapi/onchainwallet/{lowercase-coin-abbr}?apikey={apikey}

Parameters

Apply to: Get the Nonce of address

The POST request BODY is text in JSON format, as follows:

{"jsonrpc": "2.0", "id":"viewtoken", "method": "eth_getTransactionCount", "params": ["address hash"] }

Correct answer format

{"result":"nonce hexadecimal","jsonrpc": "2.0", "id":"viewtoken"}

Error answer format

{"result":null,"error":{"code":error code,"message":"error msg"},"jsonrpc": "2.0", "id":"viewtoken"}

Request

curl --location 'https://services.tokenview.io/vipapi/onchainwallet/eth' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_estimateGas", "params": [{"nonce": "0x6", "from": "0xa434a044d758cd940239c5258a9b14abde75d03f", "to": "0x6667ed6cb6e7accc4004e8844dbdd0e72d58c31c", "gas": "0x55F0", "gasPrice": "0x4190ab00", "value": "0x5bf32d963800", "data": "0x00"}]}'

Response

{"jsonrpc":"2.0","id":1,"result":"0x520c"}

EstimateGas

POST https://services.tokenview.io/vipapi/onchainwallet/{lowercase-coin-abbr}?apikey={apikey}

Parameters

The POST request BODY is text in JSON format, you may just replace the "hexadecimal text" with a packaged transaction as follows:

{"jsonrpc": "2.0", "id":"viewtoken", "method": "eth_estimateGas", "params": ["hexadecimal text"] }

Correct answer format

{"result":"tx hash","jsonrpc": "2.0", "id":"viewtoken"}

Error answer format

{"result":null,"error":{"code":error code,"message":"error msg"},"jsonrpc": "2.0", "id":"viewtoken"}

Request

curl --location 'https://services.tokenview.io/vipapi/onchainwallet/eth?apikey=MSfxNCmIT9me6c4GCDiGWjm1' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionCount", "params": ["0x445f06cc3c47e28c1f58f509043e491c6ff6af4a","latest"]}'

Response

{"jsonrpc":"2.0","id":1,"result":"0x2e"}

Last update: