# Viawallet Developer Documentation


# Notes

Endpoint: https://developers.viawallet.com/openapi/api

Unless otherwise noted, cryptocurrencies supported by API include BTC、BCH、BSV、LTC、DASH、DOGE、ZEC、DCR、FCH、DGB、LBC、BHA、RVN、ZEN、HNS

The {coin} parameter in the URL corresponds to the lowercase abbreviation of each cryptocurrency.

All APIs will return the following json objects. If the error code is code=0, it means success. For other error codes, they all indicate failure, and the message will describe the cause of the error. "data" is a json object or array, null if returns emtpy.

{
  "code": 0,          // error code 
  "data": {},         // result of request, json object、 array or null
  "message": "OK"     // cause of error
}

In particular, for the API that provides paging capability, the return format is as follows.

{
    "code": 0,
    "data": {
        "items": [],   // result array
        "limit": 10,   // displayed number of each page
        "nextkey": "", // paging cursor
        "page": 1      // page count
    },
    "message": "OK"
}

For GET and DELETE requests, the request parameters should be placed in the url.

For POST and PUT requests, the request parameters should be a json string placed in the request body with the Content-Type: application/json request header.

All requests have the tonce parameter for signing. The tonce value is a timestamp accurate to the millisecond, to ensure that the timestamp is less than the server time, and the difference between the time and the server time is no more than 1 minute.

The statistical period of daily data returned by the API is from 0: 00 to 24:00, Beijing time.

# Authentication

Each account or sub-account has a pair of api key and private key, which can be found on the API Management (opens new window) page. api key is used to identify the user's identity while private key is used to sign to verify the user's identity, please do not disclose.

Key Value
api key BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw
private key mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X

Each API requires authentication. The authentication method is to include the request header of X-API-KEY: <your_api_key> in the request. For example:

curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=675871' -H 'X-API-KEY: 16289e05354c3c3814b8f3045950395f'

In addition to authentication, a signature is also required. The steps of signature and request are as follows:

  1. Combine the request url and tonce parameters into the following form:
/openapi/api/btc/v1/block?tonce=1513746038205
  1. Calculate the HMAC SHA256 signature of request url with the key private key:
echo -n '/openapi/api/btc/v1/webhook/addresses?tonce=1513746038205' | openssl dgst -sha256 -hmac "mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X"
# output: 8c640807d23a80b32f52fbb163afaa677fb33d5b0784017cf47074594ff72f16
  1. In the request, bring the request header of X-API-KEY: <your_api_key> and X-SIGNATURE: < signature >. The "signature" is the signature calculated in the previous step, and the query string or request body of the previous step is used to make the request.
curl 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=666666&tonce=1513746038205' -H 'X-API-KEY: BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw' -H 'X-SIGNATURE: 8c640807d23a80b32f52fbb163afaa677fb33d5b0784017cf47074594ff72f16'
Example Request
Example Response
200 OK

# Notes

Endpoint: https://developers.viawallet.com/openapi/api

Unless otherwise noted, cryptocurrencies supported by API include BTC、BCH、BSV、LTC、DASH、DOGE、ZEC、DCR、FCH、DGB、LBC、BHA、RVN、ZEN、HNS

The {coin} parameter in the URL corresponds to the lowercase abbreviation of each cryptocurrency.

All APIs will return the following json objects. If the error code is code=0, it means success. For other error codes, they all indicate failure, and the message will describe the cause of the error. "data" is a json object or array, null if returns emtpy.

{
  "code": 0,          // error code 
  "data": {},         // result of request, json object、 array or null
  "message": "OK"     // cause of error
}

In particular, for the API that provides paging capability, the return format is as follows.

{
    "code": 0,
    "data": {
        "items": [],   // result array
        "limit": 10,   // displayed number of each page
        "nextkey": "", // paging cursor
        "page": 1      // page count
    },
    "message": "OK"
}

For GET and DELETE requests, the request parameters should be placed in the url.

For POST and PUT requests, the request parameters should be a json string placed in the request body with the Content-Type: application/json request header.

All requests have the tonce parameter for signing. The tonce value is a timestamp accurate to the millisecond, to ensure that the timestamp is less than the server time, and the difference between the time and the server time is no more than 1 minute.

The statistical period of daily data returned by the API is from 0: 00 to 24:00, Beijing time.

# Authentication

Each account or sub-account has a pair of api key and private key, which can be found on the API Management (opens new window) page. api key is used to identify the user's identity while private key is used to sign to verify the user's identity, please do not disclose.

Key Value
api key BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw
private key mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X

Each API requires authentication. The authentication method is to include the request header of X-API-KEY: <your_api_key> in the request. For example:

curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=675871' -H 'X-API-KEY: 16289e05354c3c3814b8f3045950395f'

In addition to authentication, a signature is also required. The steps of signature and request are as follows:

  1. Combine the request url and tonce parameters into the following form:
/openapi/api/btc/v1/block?tonce=1513746038205
  1. Calculate the HMAC SHA256 signature of request url with the key private key:
echo -n '/openapi/api/btc/v1/webhook/addresses?tonce=1513746038205' | openssl dgst -sha256 -hmac "mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X"
# output: 8c640807d23a80b32f52fbb163afaa677fb33d5b0784017cf47074594ff72f16
  1. In the request, bring the request header of X-API-KEY: <your_api_key> and X-SIGNATURE: < signature >. The "signature" is the signature calculated in the previous step, and the query string or request body of the previous step is used to make the request.
curl 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=666666&tonce=1513746038205' -H 'X-API-KEY: BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw' -H 'X-SIGNATURE: 8c640807d23a80b32f52fbb163afaa677fb33d5b0784017cf47074594ff72f16'
Example Request
Example Response
200 OK

# Addresses Tracking

This function is used to receive timely notification that the deposit/withdrawal (receiving/sending) transaction of the monitoring address is successfully connected to the chain. If a transaction occurs at the monitoring address and the balance changes, ViaWallet's back-end system will POST the transaction-related message to the Webhook URL you set through a webhook method.

# POST Set Webhook URL

/{coin}/v1/webhook/url
Params Type Required Note
address string yes address
webhook_url string yes callback url

Set the webhook URL. If a transaction occurs at the subscribed address and the balance changes, the back-end system of ViaWallet will call the URL you set and POST the message. After your server receives the notification, it must return 200 OK.

The message notifying POST of balance change is in JSON text and is formatted as follows

{
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",                             // address
    "tx_id":"df244cbc60f4220e5d90de0833b647bd7f376f5132314a1672dd9b5128302659", // transaction hash
    "date": 1612015420,                                                         // trading time (UTC)
    "confirmations": 1,                                                         // the number of confirmation of this transaction when the notice is first issued.
    "value": "-0.002135942",                                                    // balance change
    "coin": "BTC",                                                              // on which chain the transaction occurs
    "height": 10254665,                                                         // the block height where the transaction is packaged
}
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/url' \
--header 'Content-Type: application/json' \
--data-raw '{address=1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj,webhook_url=www.developers.viawallet.com}'
Example Response
200 OK
{
  "code": 0,
  "data": {},
  "message": "OK"
}

# Addresses Tracking

This function is used to receive timely notification that the deposit/withdrawal (receiving/sending) transaction of the monitoring address is successfully connected to the chain. If a transaction occurs at the monitoring address and the balance changes, ViaWallet's back-end system will POST the transaction-related message to the Webhook URL you set through a webhook method.

# POST Set Webhook URL

/{coin}/v1/webhook/url
Params Type Required Note
address string yes address
webhook_url string yes callback url

Set the webhook URL. If a transaction occurs at the subscribed address and the balance changes, the back-end system of ViaWallet will call the URL you set and POST the message. After your server receives the notification, it must return 200 OK.

The message notifying POST of balance change is in JSON text and is formatted as follows

{
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",                             // address
    "tx_id":"df244cbc60f4220e5d90de0833b647bd7f376f5132314a1672dd9b5128302659", // transaction hash
    "date": 1612015420,                                                         // trading time (UTC)
    "confirmations": 1,                                                         // the number of confirmation of this transaction when the notice is first issued.
    "value": "-0.002135942",                                                    // balance change
    "coin": "BTC",                                                              // on which chain the transaction occurs
    "height": 10254665,                                                         // the block height where the transaction is packaged
}
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/url' \
--header 'Content-Type: application/json' \
--data-raw '{address=1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj,webhook_url=www.developers.viawallet.com}'
Example Response
200 OK
{
  "code": 0,
  "data": {},
  "message": "OK"
}

# DELETE Delete Webhook URL

/{coin}/v1/webhook/url

Delete the callback url of an address. An address can have multiple callback urls, you can choose to delete one of them.

Params Type Required Note
address string yes subscription address
webhook_url string yes callback url to be delete
Example Request
curl --location --request DELETE 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/url?address=1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj&webhook_url=www.developers.viawallet.com' \
Example Response
200 OK
{
    "code": 0,
    "data": {},
    "message": "OK"
}

# DELETE Delete Webhook URL

/{coin}/v1/webhook/url

Delete the callback url of an address. An address can have multiple callback urls, you can choose to delete one of them.

Params Type Required Note
address string yes subscription address
webhook_url string yes callback url to be delete
Example Request
curl --location --request DELETE 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/url?address=1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj&webhook_url=www.developers.viawallet.com' \
Example Response
200 OK
{
    "code": 0,
    "data": {},
    "message": "OK"
}

# POST Add Subscription Address

/{coin}/v1/webhook/address

To add a new subscription address, you need to specify the currency name, monitoring address, and callback URL. When calling back, the X-SIGNATURE header will be added, and the value of X-SIGNATURE will be set to the HMAC SHA256 signature made with secret {webhook_url}?tonce={timestamp}, Here webhook_url is the callback of the monitoring address, and timestamp is the timestamp in milliseconds. For example:

webhook_url: https://developers.viawallet.com
tonce: 1513746038205

echo -n 'https://developers.viawallet.com?tonce=1513746038205' | openssl dgst -sha256 -hmac "mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X"
# output: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f

# added header
X-SIGNATURE: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f
Params Type Required Note
secret string yes used to sign
address string yes address
webhook_urls string yes seperate each url with a comma
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/address'\
--header 'Content-Type: application/json' \
--data-raw '{
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
    "webhook_urls":"www.viawallet.com,www.coinex.org"
}'
Example Response
200 OK
{
  "code": 0,
  "data": {},
  "message": "OK"
}

# POST Add Subscription Address

/{coin}/v1/webhook/address

To add a new subscription address, you need to specify the currency name, monitoring address, and callback URL. When calling back, the X-SIGNATURE header will be added, and the value of X-SIGNATURE will be set to the HMAC SHA256 signature made with secret {webhook_url}?tonce={timestamp}, Here webhook_url is the callback of the monitoring address, and timestamp is the timestamp in milliseconds. For example:

webhook_url: https://developers.viawallet.com
tonce: 1513746038205

echo -n 'https://developers.viawallet.com?tonce=1513746038205' | openssl dgst -sha256 -hmac "mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X"
# output: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f

# added header
X-SIGNATURE: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f
Params Type Required Note
secret string yes used to sign
address string yes address
webhook_urls string yes seperate each url with a comma
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/address'\
--header 'Content-Type: application/json' \
--data-raw '{
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
    "webhook_urls":"www.viawallet.com,www.coinex.org"
}'
Example Response
200 OK
{
  "code": 0,
  "data": {},
  "message": "OK"
}

# DELETE Delete Subscription Address

/{coin}/v1/webhook/address
Params Type Required Note
address string yes Address to delete
Example Request
curl --location --request DELETE 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/address/1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj'
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": {}
}

# DELETE Delete Subscription Address

/{coin}/v1/webhook/address
Params Type Required Note
address string yes Address to delete
Example Request
curl --location --request DELETE 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/address/1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj'
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": {}
}

# GET Review the subscriptioned addresses list

/{coin}/v1/webhook/addresses

To check monitoring address list, you need to specify the token name and page number

Params Type Required Note
page int no Pages
limit int no The number of returns
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/addresses'
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": [
    {
      "address": "1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
      "coin": "BTC",
      "webhook_urls": [
          "www.viawallet.com"
      ]
    }
  ]
    
}

# GET Review the subscriptioned addresses list

/{coin}/v1/webhook/addresses

To check monitoring address list, you need to specify the token name and page number

Params Type Required Note
page int no Pages
limit int no The number of returns
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/webhook/addresses'
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": [
    {
      "address": "1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
      "coin": "BTC",
      "webhook_urls": [
          "www.viawallet.com"
      ]
    }
  ]
    
}

# GET Review Webhook Historicial Request Record

/{coin}/v1/webhook/logs

To check the call history of webhook, you need to specify the token name and page number.

Params Type Required Note
page int no Pages
limit int no The number of returns

应答内容格式如下

{
    "date": 1616342401,                             // date
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj", // address
    "coin":"BTC",                                   // token name
    "webhook_url":"www.viawallet.com",              // call url
    "status_code":0,                                // status code returned by code
    "error":"error"                                 // incorrect information
}

Example Request
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": [
    { 
      "date": 1616342401, 
      "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
      "coin":"BTC",
      "webhook_url":"www.viawallet.com", 
      "status_code":0, 
      "error":"", 
    }
  ]
}

# GET Review Webhook Historicial Request Record

/{coin}/v1/webhook/logs

To check the call history of webhook, you need to specify the token name and page number.

Params Type Required Note
page int no Pages
limit int no The number of returns

应答内容格式如下

{
    "date": 1616342401,                             // date
    "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj", // address
    "coin":"BTC",                                   // token name
    "webhook_url":"www.viawallet.com",              // call url
    "status_code":0,                                // status code returned by code
    "error":"error"                                 // incorrect information
}

Example Request
Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": [
    { 
      "date": 1616342401, 
      "address":"1EaSi5xycF5Ufpy2uSvCbjtSfnVPgeCiaj",
      "coin":"BTC",
      "webhook_url":"www.viawallet.com", 
      "status_code":0, 
      "error":"", 
    }
  ]
}

# Public Chain Info

# GET Review Public Chain Info

/{coin}/v1/chain/info

Through the abbreviation of the public chain, the basic information of the public chain can be obtained, including block height, number of transactions, circulation of native tokens, network size, etc. The response content format is as follows:

{
    "id": 0,                                                                    // slp-44 index
    "symbol": "BTC",                                                            // token symbol
    "name": "Bitcoin",                                                          // token name
    "decimals": 8,                                                              // precision
    "block_time": 600000,                                                       // boock time
    "sample_address": "bc1quvuarfksewfeuevuc6tn0kfyptgjvwsvrprk9d",             // sample address
    "height": 675870,                                                           // current block height
    "hash": "0000000000000000000cd537a29662f9003844d40cd7fbd6bd34e04b5adb354f", // current block hash
    "size": 70390928311,                                                        // chain size
    "tota_txs": 29045598,                                                       // total transactions
    "circulation":16923962                                                      // network circulation
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/chain/info'
Example Response
200 OK
{

  "code": 0,
  "message": "OK",
  "data": {
    "id": 0,
    "symbol": "BTC",
    "name": "Bitcoin",
    "decimals": 8,
    "block_time": 600000,
    "sample_address": "bc1quvuarfksewfeuevuc6tn0kfyptgjvwsvrprk9d",
    "height": 675870,
    "hash": "0000000000000000000cd537a29662f9003844d40cd7fbd6bd34e04b5adb354f",
    "size": 70390928311,
    "tota_txs": 29045598
  }
}

# Public Chain Info

# GET Review Public Chain Info

/{coin}/v1/chain/info

Through the abbreviation of the public chain, the basic information of the public chain can be obtained, including block height, number of transactions, circulation of native tokens, network size, etc. The response content format is as follows:

{
    "id": 0,                                                                    // slp-44 index
    "symbol": "BTC",                                                            // token symbol
    "name": "Bitcoin",                                                          // token name
    "decimals": 8,                                                              // precision
    "block_time": 600000,                                                       // boock time
    "sample_address": "bc1quvuarfksewfeuevuc6tn0kfyptgjvwsvrprk9d",             // sample address
    "height": 675870,                                                           // current block height
    "hash": "0000000000000000000cd537a29662f9003844d40cd7fbd6bd34e04b5adb354f", // current block hash
    "size": 70390928311,                                                        // chain size
    "tota_txs": 29045598,                                                       // total transactions
    "circulation":16923962                                                      // network circulation
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/chain/info'
Example Response
200 OK
{

  "code": 0,
  "message": "OK",
  "data": {
    "id": 0,
    "symbol": "BTC",
    "name": "Bitcoin",
    "decimals": 8,
    "block_time": 600000,
    "sample_address": "bc1quvuarfksewfeuevuc6tn0kfyptgjvwsvrprk9d",
    "height": 675870,
    "hash": "0000000000000000000cd537a29662f9003844d40cd7fbd6bd34e04b5adb354f",
    "size": 70390928311,
    "tota_txs": 29045598
  }
}

# Block And Transaction Info

# GET Review Block Info

/{coin}/v1/block

Review Block Info

Params Type Required Note
hashOrHeight string no Block hash or block height

The return content format is as follows:

{
    "version": "549453824",                                                            // version, when it is null, the current field will not be returned
    "hash": "000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59",        // current block hash
    "merkle_root": "5a4d3d153156039a027fc2390a29de4b052ca89bc01dbb1adaab4da9340404cc", // merkle root
    "confirmations": 1,                                                                // confirmation quantity
    "stripped_size": 555212,
    "size": 2327663,                                                                   // current block size
    "date": 1616467429,                                                                // timestamp
    "nonce": 2854784024, 
    "bits ": 386719599,
    "txs":[
        "ddb91aeb7e7d0f7a45da6bd5d31eac569f1104795d0d1d45801b212a9e4bb9b1",            // transaction hash
    ]
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59'

Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": {
    "version": "549453824",
    "hash": "000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59", 
    "merkle_root": "5a4d3d153156039a027fc2390a29de4b052ca89bc01dbb1adaab4da9340404cc", 
    "confirmations": 1,
    "stripped_size": 555212, 
    "size": 2327663, 
    "date": 1616467429, 
    "nonce": 2854784024, 
    "bits ": 386719599, 
    "txs":[
        "ddb91aeb7e7d0f7a45da6bd5d31eac569f1104795d0d1d45801b212a9e4bb9b1", 
    ],   
  }
}

# Block And Transaction Info

# GET Review Block Info

/{coin}/v1/block

Review Block Info

Params Type Required Note
hashOrHeight string no Block hash or block height

The return content format is as follows:

{
    "version": "549453824",                                                            // version, when it is null, the current field will not be returned
    "hash": "000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59",        // current block hash
    "merkle_root": "5a4d3d153156039a027fc2390a29de4b052ca89bc01dbb1adaab4da9340404cc", // merkle root
    "confirmations": 1,                                                                // confirmation quantity
    "stripped_size": 555212,
    "size": 2327663,                                                                   // current block size
    "date": 1616467429,                                                                // timestamp
    "nonce": 2854784024, 
    "bits ": 386719599,
    "txs":[
        "ddb91aeb7e7d0f7a45da6bd5d31eac569f1104795d0d1d45801b212a9e4bb9b1",            // transaction hash
    ]
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/block?hashOrHeight=000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59'

Example Response
200 OK
{
  "code": 0,
  "message": "OK",
  "data": {
    "version": "549453824",
    "hash": "000000000000000000068bcb8f679a0783d3fb575ce34a968b14cbaf4744db59", 
    "merkle_root": "5a4d3d153156039a027fc2390a29de4b052ca89bc01dbb1adaab4da9340404cc", 
    "confirmations": 1,
    "stripped_size": 555212, 
    "size": 2327663, 
    "date": 1616467429, 
    "nonce": 2854784024, 
    "bits ": 386719599, 
    "txs":[
        "ddb91aeb7e7d0f7a45da6bd5d31eac569f1104795d0d1d45801b212a9e4bb9b1", 
    ],   
  }
}

# Address Balance and Transaction List

# GET Address Info

/{coin}/v1/address/info

Acquire address information through the public chain acronym and address, including balance, balance ranking, number of transactions, number of transfers, amount of earnings, and details of a recent transaction.

Params Type Required Note
address string yes The address to be review

The return content format is as follows:

{
    "address": "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2",                                // address
    "balance": 9973,                                                                // address balance needs to be divided by the precision of the token
    "balance_rank": 9758350,                                                        // balance ranking
    "total_txs": 27,                                                                // total transactions
    "total_tx_in": "15484598",                                                      // total transfers need to be divided by the precision of the token
    "total_tx_out": "15474625",                                                     // total withdrawals need to be divided by the precision of the token
    "latest_tx":{ 
          "id": "992b8c0b21b2df1fadee7977ef88cb311a307cd39d2ece3851d9a3e810167894", // txid
          "fee": "3008",                                                            // transction fee needs to be divided by the precision of the token
          "date": 1616367320,                                                       // timestamp
          "block": 675691,                                                          // block height
          "confirmation": 182,                                                      // confirmation quantity
          "status": "completed",                                                    // transaction status
          "inputs": [
            {
                "addresses": [
                    "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"                            // input address
                ],
                "tx": "f18b8e446b0270e57c0a1def0c7dc84d40aee9beaedb9482204b7f870397cabb", // input tx hash
                "script_sig": "483045022100c5aab529b01b16a772f911f2b402173245d8b5ad0ac7db82b16f394567db387302205a4ee767d726037449710a7cb0d42ed3294570466c256f0221e7bc8f62d8d06601210264d52cd6e3019188ae97178384a6c6c15d9ca25c019ad1ccbd5e5f72304c48b3",
                "type": "pubkeyhash",
                "value": 40700,                                                     // amoount
                "vfp": 0,                                                           // outputted index of a recent transaction
                "sequence": 4294967295
            },
            {
                "addresses": [
                   "1AQ1J6KJfM4AMjE33d2mZVyVnXoin1HpDM"
                 ],
                "tx": "fec9bcbdf5637b89424885dd219e51d50bde6ab73b508043e3037106f03cd0f8",
                "script_sig": "47304402203b2bea0ebfc925ae515cf48ac19bf750c0e9f313c3faf07b7efde8ae56d79838022020fe4eaa9c71ab962c13eab49107956e64dfc7ca07da6823d0b33f42b315dd4b0121032c791c9cecbe143c582f908396bf414775ce8c698ea5eb8d61ff1e8dfc652949",
                "type": "pubkeyhash",
                "value": 346572,
                "vfp": 0,
                "sequence": 4294967295
            }
          ],
            "outputs": [
                {
                    "addresses": [
                        "1H3YKH5EX6E7iMRoPZxuHwRPJnRSwGPnC"
                    ],
                    "script": "76a9140308c68df6134b45459f1384286b1137d32f8f1988ac",
                    "type": "pubkeyhash",
                    "value": 36132,
                    "n": 0,                                                         // ouput index
                    "next_position": 0,                                             // index of the spent transaction 
                    "ntx":"",                                                       // in which tx hash is spent
                },
                {
                    "addresses": [
                        "1KPW6tY3RovXNak2zAme4JCdcVunh6DLEL"
                    ],
                    "script": "76a914c9b3b53f60d100c362593bf86c89ac0ec8cdf5d688ac",
                    "type": "pubkeyhash",
                    "value": 348132,
                    "n": 1,
                    "next_position": 0,
                    "ntx":""
                }
            ],
            "memo": "",
            "metadata": null
        } 
    } // For a recent transaction, please see "Acquire block information based on block height or hash" to view the detailed field interpretation.
}
Example Request
curl --localtion --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/address/info?address=1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "address": "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2",
        "balance": 9973,
        "balance_rank": 9758350,
        "total_txs": 27,
        "total_tx_in": "15484598",
        "total_tx_out": "15474625",
        "latest_tx": {
            "id": "992b8c0b21b2df1fadee7977ef88cb311a307cd39d2ece3851d9a3e810167894",
            "fee": "3008",
            "date": 1616367320,
            "block": 675691,
            "confirmation": 182,
            "status": "completed",
            "inputs": [
                {
                    "addresses": [
                        "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"
                    ],
                    "tx": "f18b8e446b0270e57c0a1def0c7dc84d40aee9beaedb9482204b7f870397cabb",
                    "script_sig": "483045022100c5aab529b01b16a772f911f2b402173245d8b5ad0ac7db82b16f394567db387302205a4ee767d726037449710a7cb0d42ed3294570466c256f0221e7bc8f62d8d06601210264d52cd6e3019188ae97178384a6c6c15d9ca25c019ad1ccbd5e5f72304c48b3",
                    "type": "pubkeyhash",
                    "value": 40700,
                    "vfp": 0,
                    "sequence": 4294967295
                },
                {
                    "addresses": [
                        "1AQ1J6KJfM4AMjE33d2mZVyVnXoin1HpDM"
                    ],
                    "tx": "fec9bcbdf5637b89424885dd219e51d50bde6ab73b508043e3037106f03cd0f8",
                    "script_sig": "47304402203b2bea0ebfc925ae515cf48ac19bf750c0e9f313c3faf07b7efde8ae56d79838022020fe4eaa9c71ab962c13eab49107956e64dfc7ca07da6823d0b33f42b315dd4b0121032c791c9cecbe143c582f908396bf414775ce8c698ea5eb8d61ff1e8dfc652949",
                    "type": "pubkeyhash",
                    "value": 346572,
                    "vfp": 0,
                    "sequence": 4294967295
                }
            ],
            "outputs": [
                {
                    "addresses": [
                        "1H3YKH5EX6E7iMRoPZxuHwRPJnRSwGPnC"
                    ],
                    "script": "76a9140308c68df6134b45459f1384286b1137d32f8f1988ac",
                    "type": "pubkeyhash",
                    "value": 36132,
                    "n": 0,
                    "next_position": 0,
                },
                {
                    "addresses": [
                        "1KPW6tY3RovXNak2zAme4JCdcVunh6DLEL"
                    ],
                    "script": "76a914c9b3b53f60d100c362593bf86c89ac0ec8cdf5d688ac",
                    "type": "pubkeyhash",
                    "value": 348132,
                    "n": 1,
                    "next_position": 0,
                }
            ],
            "memo": "",
            "metadata": null
        }
    },
    "message": "OK"
}

# Address Balance and Transaction List

# GET Address Info

/{coin}/v1/address/info

Acquire address information through the public chain acronym and address, including balance, balance ranking, number of transactions, number of transfers, amount of earnings, and details of a recent transaction.

Params Type Required Note
address string yes The address to be review

The return content format is as follows:

{
    "address": "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2",                                // address
    "balance": 9973,                                                                // address balance needs to be divided by the precision of the token
    "balance_rank": 9758350,                                                        // balance ranking
    "total_txs": 27,                                                                // total transactions
    "total_tx_in": "15484598",                                                      // total transfers need to be divided by the precision of the token
    "total_tx_out": "15474625",                                                     // total withdrawals need to be divided by the precision of the token
    "latest_tx":{ 
          "id": "992b8c0b21b2df1fadee7977ef88cb311a307cd39d2ece3851d9a3e810167894", // txid
          "fee": "3008",                                                            // transction fee needs to be divided by the precision of the token
          "date": 1616367320,                                                       // timestamp
          "block": 675691,                                                          // block height
          "confirmation": 182,                                                      // confirmation quantity
          "status": "completed",                                                    // transaction status
          "inputs": [
            {
                "addresses": [
                    "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"                            // input address
                ],
                "tx": "f18b8e446b0270e57c0a1def0c7dc84d40aee9beaedb9482204b7f870397cabb", // input tx hash
                "script_sig": "483045022100c5aab529b01b16a772f911f2b402173245d8b5ad0ac7db82b16f394567db387302205a4ee767d726037449710a7cb0d42ed3294570466c256f0221e7bc8f62d8d06601210264d52cd6e3019188ae97178384a6c6c15d9ca25c019ad1ccbd5e5f72304c48b3",
                "type": "pubkeyhash",
                "value": 40700,                                                     // amoount
                "vfp": 0,                                                           // outputted index of a recent transaction
                "sequence": 4294967295
            },
            {
                "addresses": [
                   "1AQ1J6KJfM4AMjE33d2mZVyVnXoin1HpDM"
                 ],
                "tx": "fec9bcbdf5637b89424885dd219e51d50bde6ab73b508043e3037106f03cd0f8",
                "script_sig": "47304402203b2bea0ebfc925ae515cf48ac19bf750c0e9f313c3faf07b7efde8ae56d79838022020fe4eaa9c71ab962c13eab49107956e64dfc7ca07da6823d0b33f42b315dd4b0121032c791c9cecbe143c582f908396bf414775ce8c698ea5eb8d61ff1e8dfc652949",
                "type": "pubkeyhash",
                "value": 346572,
                "vfp": 0,
                "sequence": 4294967295
            }
          ],
            "outputs": [
                {
                    "addresses": [
                        "1H3YKH5EX6E7iMRoPZxuHwRPJnRSwGPnC"
                    ],
                    "script": "76a9140308c68df6134b45459f1384286b1137d32f8f1988ac",
                    "type": "pubkeyhash",
                    "value": 36132,
                    "n": 0,                                                         // ouput index
                    "next_position": 0,                                             // index of the spent transaction 
                    "ntx":"",                                                       // in which tx hash is spent
                },
                {
                    "addresses": [
                        "1KPW6tY3RovXNak2zAme4JCdcVunh6DLEL"
                    ],
                    "script": "76a914c9b3b53f60d100c362593bf86c89ac0ec8cdf5d688ac",
                    "type": "pubkeyhash",
                    "value": 348132,
                    "n": 1,
                    "next_position": 0,
                    "ntx":""
                }
            ],
            "memo": "",
            "metadata": null
        } 
    } // For a recent transaction, please see "Acquire block information based on block height or hash" to view the detailed field interpretation.
}
Example Request
curl --localtion --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/address/info?address=1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "address": "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2",
        "balance": 9973,
        "balance_rank": 9758350,
        "total_txs": 27,
        "total_tx_in": "15484598",
        "total_tx_out": "15474625",
        "latest_tx": {
            "id": "992b8c0b21b2df1fadee7977ef88cb311a307cd39d2ece3851d9a3e810167894",
            "fee": "3008",
            "date": 1616367320,
            "block": 675691,
            "confirmation": 182,
            "status": "completed",
            "inputs": [
                {
                    "addresses": [
                        "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"
                    ],
                    "tx": "f18b8e446b0270e57c0a1def0c7dc84d40aee9beaedb9482204b7f870397cabb",
                    "script_sig": "483045022100c5aab529b01b16a772f911f2b402173245d8b5ad0ac7db82b16f394567db387302205a4ee767d726037449710a7cb0d42ed3294570466c256f0221e7bc8f62d8d06601210264d52cd6e3019188ae97178384a6c6c15d9ca25c019ad1ccbd5e5f72304c48b3",
                    "type": "pubkeyhash",
                    "value": 40700,
                    "vfp": 0,
                    "sequence": 4294967295
                },
                {
                    "addresses": [
                        "1AQ1J6KJfM4AMjE33d2mZVyVnXoin1HpDM"
                    ],
                    "tx": "fec9bcbdf5637b89424885dd219e51d50bde6ab73b508043e3037106f03cd0f8",
                    "script_sig": "47304402203b2bea0ebfc925ae515cf48ac19bf750c0e9f313c3faf07b7efde8ae56d79838022020fe4eaa9c71ab962c13eab49107956e64dfc7ca07da6823d0b33f42b315dd4b0121032c791c9cecbe143c582f908396bf414775ce8c698ea5eb8d61ff1e8dfc652949",
                    "type": "pubkeyhash",
                    "value": 346572,
                    "vfp": 0,
                    "sequence": 4294967295
                }
            ],
            "outputs": [
                {
                    "addresses": [
                        "1H3YKH5EX6E7iMRoPZxuHwRPJnRSwGPnC"
                    ],
                    "script": "76a9140308c68df6134b45459f1384286b1137d32f8f1988ac",
                    "type": "pubkeyhash",
                    "value": 36132,
                    "n": 0,
                    "next_position": 0,
                },
                {
                    "addresses": [
                        "1KPW6tY3RovXNak2zAme4JCdcVunh6DLEL"
                    ],
                    "script": "76a914c9b3b53f60d100c362593bf86c89ac0ec8cdf5d688ac",
                    "type": "pubkeyhash",
                    "value": 348132,
                    "n": 1,
                    "next_position": 0,
                }
            ],
            "memo": "",
            "metadata": null
        }
    },
    "message": "OK"
}

# GET acquire UTXO list of an address

/{coin}/v1/utxo

Acquire the unspent UTXO list of the address through the public chain acronym and address, which is usually used for offline transaction signature.

Params Type Required Note
address string yes The address to be review
nextkey string no Paging cursor
limit int no The number of returns

The return content format is as follows:

{
    "code": 0,
    "data": {
        "items": [
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",                        // address
                "tx_id": "1733c83851565e7e0a2af7db43708f76a628d9e9efc5928fe0e91c93f82cb785",    // tx hash
                "height": 677958,                                                               // block height
                "value": 649552102,                                                             // utxo blance
                "position": 0,                                                                  // utxo in the transaction
                "script": "00143156afc4249915008020f932783319f3e610b97d",                       // script value
                "date": 1617675530                                                              // date
            },
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/utxo?address=18Zcyxqna6h7Z7bRjhKvGpr8HSfieQWXqj'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "items": [
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "1733c83851565e7e0a2af7db43708f76a628d9e9efc5928fe0e91c93f82cb785",
                "height": 677958,
                "value": 649552102,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617675530
            },
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "e31ff7aab365cd24c351da1d4d427e5389b65c8357325af02c56372fbc3ae582",
                "height": 677952,
                "value": 667970893,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617672757
            },
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "772c7d70f49c0f481bdc27fe37f085093075b2b8f5e48933e2153e0fe3146400",
                "height": 677931,
                "value": 713368079,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617659888
            }
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}

# GET acquire UTXO list of an address

/{coin}/v1/utxo

Acquire the unspent UTXO list of the address through the public chain acronym and address, which is usually used for offline transaction signature.

Params Type Required Note
address string yes The address to be review
nextkey string no Paging cursor
limit int no The number of returns

The return content format is as follows:

{
    "code": 0,
    "data": {
        "items": [
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",                        // address
                "tx_id": "1733c83851565e7e0a2af7db43708f76a628d9e9efc5928fe0e91c93f82cb785",    // tx hash
                "height": 677958,                                                               // block height
                "value": 649552102,                                                             // utxo blance
                "position": 0,                                                                  // utxo in the transaction
                "script": "00143156afc4249915008020f932783319f3e610b97d",                       // script value
                "date": 1617675530                                                              // date
            },
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/utxo?address=18Zcyxqna6h7Z7bRjhKvGpr8HSfieQWXqj'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "items": [
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "1733c83851565e7e0a2af7db43708f76a628d9e9efc5928fe0e91c93f82cb785",
                "height": 677958,
                "value": 649552102,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617675530
            },
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "e31ff7aab365cd24c351da1d4d427e5389b65c8357325af02c56372fbc3ae582",
                "height": 677952,
                "value": 667970893,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617672757
            },
            {
                "address": "bc1qx9t2l3pyny2spqpqlye8svce70nppwtaxwdrp4",
                "tx_id": "772c7d70f49c0f481bdc27fe37f085093075b2b8f5e48933e2153e0fe3146400",
                "height": 677931,
                "value": 713368079,
                "position": 0,
                "script": "00143156afc4249915008020f932783319f3e610b97d",
                "date": 1617659888
            }
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}

# GET Address Transaction List

/{coin}/v1/address/txs

Acquire the transaction history of an address through the public chain acronym and address.

Params Type Required Note
address string yes The address to be review
nextkey string no Paging cursor
limit int no The number of returns

The return content format is as follows:

{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "c7841cb796c64027391038673de23d2b242fd2108c1e7092b9207cf6ef46ecb8",  // txhash
                "fee": "-313828",                                                          // fee
                "date": 1617109308,                                                        // date 
                "block": 676997,                                                           // block height
                "confirmation": 966,                                                       // confirmations
                "status": "completed",                                                     // transaction status
                "inputs": [                                                                // transaction inputs
                    {
                        "addresses": [                                                     // address list
                            "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                        ],
                        "tx": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710", // inputted tx hash
                        "script_sig": "483045022100ae07c018a81ce86cd0324ff13cd5bbee4064180b818ec491d9aa6c63ccc84ae702202bb4040c6c94d6509a0cd56fe3625968dccbd3308d1cd2d0376f9f145f3f033b01210360c5c6cd2c7f93b68c834ca38ba27f9a2f6f4d74153bf0bc007cd17c8bda1cbf",                                                       // signature
                        "type": "pubkeyhash",
                        "value": 347238,                                                    // value
                        "vfp": 1,
                        "sequence": 4294967295
                    },
                    {
                        "tx": "83e6deea63ea60d2265a0fc3b1e41fa2b5d78e16543c6efb19694721786c01e8",
                        "script_sig": "473044022078b9464543b0e028e897aab1212cf8c9fe3b1fdbef7d603d7511e97a4f4c05820220224035cbadbd31b565b61985c50e25fd3eff678fdc0b147155f2d07de6b5e8cc012102c625fbd4a74117a739ee5489ccd98e3e824f8406adaec3274bed4699cf53f675",
                        "value": 0,
                        "vfp": 0,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [                                                                // transaction outputs
                    {
                        "addresses": [
                            "1AYnQmwWYuomJaJGNkUKkaGdi9Hdfjtkct"
                        ],
                        "script": "76a91468bbeee32eab032e8865d2ec07ff479a7ad8304288ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "8f4d66d927b55cc90c6a7641bc85bf80aed3bd694b6f1b04ac09671cd0389dda",
                        "value": 307895,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "addresses": [
                            "12JaDBoKxyz5UkzLj4hJqFkqJczY1FjZqs"
                        ],
                        "script": "76a9140e4aeb66a77a89e013d63e852232998031c8910e88ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "9e7cff97dfdeb08c158bf8e7fb22288562bf21bec6e61f20fa035893f4b2fb10",
                        "value": 353171,
                        "n": 1,
                        "next_position": 3
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "B1jgkPtsA1FQR21eYU",
        "page": 0
    },
    "message": "OK"
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/txs?address=1DfDKUMzSxJD8dontsxTvXVUUBZrQ24ZfA'

Example Response
200 OK

{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "c7841cb796c64027391038673de23d2b242fd2108c1e7092b9207cf6ef46ecb8",
                "fee": "-313828",
                "date": 1617109308,
                "block": 676997,
                "confirmation": 966,
                "status": "completed",
                "inputs": [
                    {
                        "addresses": [
                            "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                        ],
                        "tx": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710",
                        "script_sig": "483045022100ae07c018a81ce86cd0324ff13cd5bbee4064180b818ec491d9aa6c63ccc84ae702202bb4040c6c94d6509a0cd56fe3625968dccbd3308d1cd2d0376f9f145f3f033b01210360c5c6cd2c7f93b68c834ca38ba27f9a2f6f4d74153bf0bc007cd17c8bda1cbf",
                        "type": "pubkeyhash",
                        "value": 347238,
                        "vfp": 1,
                        "sequence": 4294967295
                    },
                    {
                        "tx": "83e6deea63ea60d2265a0fc3b1e41fa2b5d78e16543c6efb19694721786c01e8",
                        "script_sig": "473044022078b9464543b0e028e897aab1212cf8c9fe3b1fdbef7d603d7511e97a4f4c05820220224035cbadbd31b565b61985c50e25fd3eff678fdc0b147155f2d07de6b5e8cc012102c625fbd4a74117a739ee5489ccd98e3e824f8406adaec3274bed4699cf53f675",
                        "value": 0,
                        "vfp": 0,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [
                    {
                        "addresses": [
                            "1AYnQmwWYuomJaJGNkUKkaGdi9Hdfjtkct"
                        ],
                        "script": "76a91468bbeee32eab032e8865d2ec07ff479a7ad8304288ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "8f4d66d927b55cc90c6a7641bc85bf80aed3bd694b6f1b04ac09671cd0389dda",
                        "value": 307895,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "addresses": [
                            "12JaDBoKxyz5UkzLj4hJqFkqJczY1FjZqs"
                        ],
                        "script": "76a9140e4aeb66a77a89e013d63e852232998031c8910e88ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "9e7cff97dfdeb08c158bf8e7fb22288562bf21bec6e61f20fa035893f4b2fb10",
                        "value": 353171,
                        "n": 1,
                        "next_position": 3
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "B1jgkPtsA1FQR21eYU",
        "page": 0
    },
    "message": "OK"
}

# GET Address Transaction List

/{coin}/v1/address/txs

Acquire the transaction history of an address through the public chain acronym and address.

Params Type Required Note
address string yes The address to be review
nextkey string no Paging cursor
limit int no The number of returns

The return content format is as follows:

{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "c7841cb796c64027391038673de23d2b242fd2108c1e7092b9207cf6ef46ecb8",  // txhash
                "fee": "-313828",                                                          // fee
                "date": 1617109308,                                                        // date 
                "block": 676997,                                                           // block height
                "confirmation": 966,                                                       // confirmations
                "status": "completed",                                                     // transaction status
                "inputs": [                                                                // transaction inputs
                    {
                        "addresses": [                                                     // address list
                            "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                        ],
                        "tx": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710", // inputted tx hash
                        "script_sig": "483045022100ae07c018a81ce86cd0324ff13cd5bbee4064180b818ec491d9aa6c63ccc84ae702202bb4040c6c94d6509a0cd56fe3625968dccbd3308d1cd2d0376f9f145f3f033b01210360c5c6cd2c7f93b68c834ca38ba27f9a2f6f4d74153bf0bc007cd17c8bda1cbf",                                                       // signature
                        "type": "pubkeyhash",
                        "value": 347238,                                                    // value
                        "vfp": 1,
                        "sequence": 4294967295
                    },
                    {
                        "tx": "83e6deea63ea60d2265a0fc3b1e41fa2b5d78e16543c6efb19694721786c01e8",
                        "script_sig": "473044022078b9464543b0e028e897aab1212cf8c9fe3b1fdbef7d603d7511e97a4f4c05820220224035cbadbd31b565b61985c50e25fd3eff678fdc0b147155f2d07de6b5e8cc012102c625fbd4a74117a739ee5489ccd98e3e824f8406adaec3274bed4699cf53f675",
                        "value": 0,
                        "vfp": 0,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [                                                                // transaction outputs
                    {
                        "addresses": [
                            "1AYnQmwWYuomJaJGNkUKkaGdi9Hdfjtkct"
                        ],
                        "script": "76a91468bbeee32eab032e8865d2ec07ff479a7ad8304288ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "8f4d66d927b55cc90c6a7641bc85bf80aed3bd694b6f1b04ac09671cd0389dda",
                        "value": 307895,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "addresses": [
                            "12JaDBoKxyz5UkzLj4hJqFkqJczY1FjZqs"
                        ],
                        "script": "76a9140e4aeb66a77a89e013d63e852232998031c8910e88ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "9e7cff97dfdeb08c158bf8e7fb22288562bf21bec6e61f20fa035893f4b2fb10",
                        "value": 353171,
                        "n": 1,
                        "next_position": 3
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "B1jgkPtsA1FQR21eYU",
        "page": 0
    },
    "message": "OK"
}
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/txs?address=1DfDKUMzSxJD8dontsxTvXVUUBZrQ24ZfA'

Example Response
200 OK

{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "c7841cb796c64027391038673de23d2b242fd2108c1e7092b9207cf6ef46ecb8",
                "fee": "-313828",
                "date": 1617109308,
                "block": 676997,
                "confirmation": 966,
                "status": "completed",
                "inputs": [
                    {
                        "addresses": [
                            "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                        ],
                        "tx": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710",
                        "script_sig": "483045022100ae07c018a81ce86cd0324ff13cd5bbee4064180b818ec491d9aa6c63ccc84ae702202bb4040c6c94d6509a0cd56fe3625968dccbd3308d1cd2d0376f9f145f3f033b01210360c5c6cd2c7f93b68c834ca38ba27f9a2f6f4d74153bf0bc007cd17c8bda1cbf",
                        "type": "pubkeyhash",
                        "value": 347238,
                        "vfp": 1,
                        "sequence": 4294967295
                    },
                    {
                        "tx": "83e6deea63ea60d2265a0fc3b1e41fa2b5d78e16543c6efb19694721786c01e8",
                        "script_sig": "473044022078b9464543b0e028e897aab1212cf8c9fe3b1fdbef7d603d7511e97a4f4c05820220224035cbadbd31b565b61985c50e25fd3eff678fdc0b147155f2d07de6b5e8cc012102c625fbd4a74117a739ee5489ccd98e3e824f8406adaec3274bed4699cf53f675",
                        "value": 0,
                        "vfp": 0,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [
                    {
                        "addresses": [
                            "1AYnQmwWYuomJaJGNkUKkaGdi9Hdfjtkct"
                        ],
                        "script": "76a91468bbeee32eab032e8865d2ec07ff479a7ad8304288ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "8f4d66d927b55cc90c6a7641bc85bf80aed3bd694b6f1b04ac09671cd0389dda",
                        "value": 307895,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "addresses": [
                            "12JaDBoKxyz5UkzLj4hJqFkqJczY1FjZqs"
                        ],
                        "script": "76a9140e4aeb66a77a89e013d63e852232998031c8910e88ac",
                        "type": "pubkeyhash",
                        "next_tx_id": "9e7cff97dfdeb08c158bf8e7fb22288562bf21bec6e61f20fa035893f4b2fb10",
                        "value": 353171,
                        "n": 1,
                        "next_position": 3
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "B1jgkPtsA1FQR21eYU",
        "page": 0
    },
    "message": "OK"
}

# GET Address Pending Transaction List

/{coin}/v1/unconfirmed_txs

Obtain the pending transaction list of the address through the abbreviation of the public chain.

Params Type Required Note
address string yes The address to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/unconfirmed_txs/bc1qrg6paunl8vwcddejwqzeddfmckycytq2uqxx20'

Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data": [
        {
            "id": "fce47bbec9029369b511a1474f92c22f3c1687e8df763f1798ab9fdcf519b278",
            "fee": "2270",
            "date": 1616479878,
            "block": 0,
            "confirmation": 0,
            "status": "pending",
            "inputs": [
                {
                    "addresses": [
                        "1DTt8RuAbebwuSTpYPAwixShvT6oeck7We"
                    ],
                    "tx": "06208f276801896b42acb1567de9466ebc1ed33650120870d0b04462029d1197",
                    "script_sig": "483045022100b08f642ad75694212911503e51ae95b0e912e4cbb0f5d59ea6bcaecb0b425f520220139bdd50a9f4343faf96b84658a86c32958ab8414ef76ae70a0d38159dbe27a0012103e73051c6b5293f220d033758adfa238d3328e67b79ca5c382060471d8d3b7043",
                    "type": "pubkeyhash",
                    "value": 983021,
                    "vfp": 74,
                    "sequence": 4294967295
                }
            ],
            "outputs": [
                {
                    "addresses": [
                        "3DNtQzBExZgvo4w2iVuZNPsoQ5PXi4dfuy"
                    ],
                    "script": "a9148033c0de297577714c4883ba6f556ffe8b87c43d87",
                    "type": "scripthash",
                    "value": 14984,
                    "n": 0,
                    "next_position": 0,
                },
                {
                    "addresses": [
                        "1NQz4aMBujoua7t7yDcfcWXHFKNBxesxks"
                    ],
                    "script": "76a914eae3d75b47e6d1043daebe2d3b04bddb67fcb68f88ac",
                    "type": "pubkeyhash",
                    "value": 965767,
                    "n": 1,
                    "next_position": 0,
                }
            ],
            "memo": "",
            "metadata": null
        }
    ]
}

# GET Address Pending Transaction List

/{coin}/v1/unconfirmed_txs

Obtain the pending transaction list of the address through the abbreviation of the public chain.

Params Type Required Note
address string yes The address to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/unconfirmed_txs/bc1qrg6paunl8vwcddejwqzeddfmckycytq2uqxx20'

Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data": [
        {
            "id": "fce47bbec9029369b511a1474f92c22f3c1687e8df763f1798ab9fdcf519b278",
            "fee": "2270",
            "date": 1616479878,
            "block": 0,
            "confirmation": 0,
            "status": "pending",
            "inputs": [
                {
                    "addresses": [
                        "1DTt8RuAbebwuSTpYPAwixShvT6oeck7We"
                    ],
                    "tx": "06208f276801896b42acb1567de9466ebc1ed33650120870d0b04462029d1197",
                    "script_sig": "483045022100b08f642ad75694212911503e51ae95b0e912e4cbb0f5d59ea6bcaecb0b425f520220139bdd50a9f4343faf96b84658a86c32958ab8414ef76ae70a0d38159dbe27a0012103e73051c6b5293f220d033758adfa238d3328e67b79ca5c382060471d8d3b7043",
                    "type": "pubkeyhash",
                    "value": 983021,
                    "vfp": 74,
                    "sequence": 4294967295
                }
            ],
            "outputs": [
                {
                    "addresses": [
                        "3DNtQzBExZgvo4w2iVuZNPsoQ5PXi4dfuy"
                    ],
                    "script": "a9148033c0de297577714c4883ba6f556ffe8b87c43d87",
                    "type": "scripthash",
                    "value": 14984,
                    "n": 0,
                    "next_position": 0,
                },
                {
                    "addresses": [
                        "1NQz4aMBujoua7t7yDcfcWXHFKNBxesxks"
                    ],
                    "script": "76a914eae3d75b47e6d1043daebe2d3b04bddb67fcb68f88ac",
                    "type": "pubkeyhash",
                    "value": 965767,
                    "n": 1,
                    "next_position": 0,
                }
            ],
            "memo": "",
            "metadata": null
        }
    ]
}

# GET Transaction Details

/{coin}/v1/tx

Acquire the transaction details through the abbreviation of the public chain and tx hash.

Params Type Required Note
tx_id string yes The hash of transaction to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/tx?tx_id=5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710'

Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data": {
        "id": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710",
        "fee": "17706",
        "date": 1616171114,
        "block": 675336,
        "confirmation": 554,
        "status": "completed",
        "inputs": [
            {
                "addresses": [
                    "178monFk9M49PyVi2PmP1Whce8VyvdRZ9T"
                ],
                "tx": "1e67b7c8368edc33c2db3d93716054259eb019fd0cacf4728235e52e8de326ef",
                "script_sig": "4830450221009faabcc6f33a24b42a4181ea73f5a20044a0d339ee5bd928d06eb7b8f1b1eca80220321a8823d91503af497656fbdf87dde5d4781b8ddf545135527aa373d2f3dff70121025ff937e5b23ba3102662990da6dff055514d19f59aba93aaa54aed5eb9674a21",
                "type": "pubkeyhash",
                "value": 379913,
                "vfp": 1,
                "sequence": 4294967295
            }
        ],
        "outputs": [
            {
                "addresses": [
                    "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"
                ],
                "script": "76a914b10ba0d4d038c11c50e704ab145302f6c984afe688ac",
                "type": "pubkeyhash",
                "next_tx_id": "aef8039dbead733bf5f58c9ea37de771157dab24f76348cb4da675938c640506",
                "value": 14969,
                "n": 0,
                "next_position": 0,
            },
            {
                "addresses": [
                    "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                ],
                "script": "76a914200104085600bedcaad07ef371fdc1620f1c0a8088ac",
                "type": "pubkeyhash",
                "value": 347238,
                "n": 1,
                "next_position": 0,
            }
        ],
        "memo": "",
        "metadata": null
    }
}

# GET Transaction Details

/{coin}/v1/tx

Acquire the transaction details through the abbreviation of the public chain and tx hash.

Params Type Required Note
tx_id string yes The hash of transaction to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/tx?tx_id=5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710'

Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data": {
        "id": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710",
        "fee": "17706",
        "date": 1616171114,
        "block": 675336,
        "confirmation": 554,
        "status": "completed",
        "inputs": [
            {
                "addresses": [
                    "178monFk9M49PyVi2PmP1Whce8VyvdRZ9T"
                ],
                "tx": "1e67b7c8368edc33c2db3d93716054259eb019fd0cacf4728235e52e8de326ef",
                "script_sig": "4830450221009faabcc6f33a24b42a4181ea73f5a20044a0d339ee5bd928d06eb7b8f1b1eca80220321a8823d91503af497656fbdf87dde5d4781b8ddf545135527aa373d2f3dff70121025ff937e5b23ba3102662990da6dff055514d19f59aba93aaa54aed5eb9674a21",
                "type": "pubkeyhash",
                "value": 379913,
                "vfp": 1,
                "sequence": 4294967295
            }
        ],
        "outputs": [
            {
                "addresses": [
                    "1H98Xu8Te6Lgu2Pj1uA6N5azLbjBP9Ncz2"
                ],
                "script": "76a914b10ba0d4d038c11c50e704ab145302f6c984afe688ac",
                "type": "pubkeyhash",
                "next_tx_id": "aef8039dbead733bf5f58c9ea37de771157dab24f76348cb4da675938c640506",
                "value": 14969,
                "n": 0,
                "next_position": 0,
            },
            {
                "addresses": [
                    "13vDqiRpJ7h9oSri85e6wonvgtKYbVXiHp"
                ],
                "script": "76a914200104085600bedcaad07ef371fdc1620f1c0a8088ac",
                "type": "pubkeyhash",
                "value": 347238,
                "n": 1,
                "next_position": 0,
            }
        ],
        "memo": "",
        "metadata": null
    }
}

# GET Transaction Confirmations

/{coin}/v1/tx/confirmation

Acquire the number of confirmations through the abbreviation of the public chain and tx hash.

Params Type Required Note
tx_id string yes The translation hash to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/tx/confirmation?tx_id=5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710
'
Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data":{
        "confirmation": 554,
        "platform": "BTC",
        "tx_id": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710"
    }
}

# GET Transaction Confirmations

/{coin}/v1/tx/confirmation

Acquire the number of confirmations through the abbreviation of the public chain and tx hash.

Params Type Required Note
tx_id string yes The translation hash to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/tx/confirmation?tx_id=5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710
'
Example Response
200 OK
{
    "code":0,
    "message":"OK",
    "data":{
        "confirmation": 554,
        "platform": "BTC",
        "tx_id": "5d3c394304a52aeb7f0a055e3cbabce6462962db3009f2ca84da5247bc4bf710"
    }
}

# GET Block Transaction List

/{coin}/v1/block/txs

Acquire the transaction list of the block through the public chain abbreviation and block height.

Params Type Required Note
height int64 yes Block Height
nextkey string no Paging cursor
limit int no The number of returns
Example Request
curl --location --request GET 'http://developers.viawallet.com/openapi/api/btc/v1/block/txs?height=675639' \
--header 'X-API-Key: BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "3193f588fb1bcede00e809562dbdb07be94779e1ac90ffe95c7f4eeaea94af07",
                "fee": "0",
                "date": 1616340678,
                "block": 675639,
                "is_coinbase": true,
                "confirmation": 2314,
                "status": "completed",
                "inputs": [
                    {
                        "witness": [
                            "0000000000000000000000000000000000000000000000000000000000000000"
                        ],
                        "coinbase": "03374f0a04c6665760425443506f6f6cfabe6d6d78bd61a6381485d1fd757c08ca151acf8605357e6cfa591776eccda28bbf7b21020000007296cd100300e37527641c0000000000",
                        "value": 0,
                        "vfp": 4294967295,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [
                    {
                        "addresses": [
                            "14PUSkxZsGShcNmUBmxcYm5DcFq89S8jEG"
                        ],
                        "script": "76a9142528700ca7564d29160a93e629243d4ca15777e788ac",
                        "type": "pubkeyhash",
                        "value": 650979097,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "script": "6a24aa21a9ed2e336a4a683fb65e51eee595ebfd9d29ecb4c2b4ea65bb2489be3565db7e77e7",
                        "type": "nulldata",
                        "value": 0,
                        "n": 1,
                        "next_position": 0
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}

# GET Block Transaction List

/{coin}/v1/block/txs

Acquire the transaction list of the block through the public chain abbreviation and block height.

Params Type Required Note
height int64 yes Block Height
nextkey string no Paging cursor
limit int no The number of returns
Example Request
curl --location --request GET 'http://developers.viawallet.com/openapi/api/btc/v1/block/txs?height=675639' \
--header 'X-API-Key: BRfvZY97QaRa14Ci1F5vvP3KzwRxFFMw'
Example Response
200 OK
{
    "code": 0,
    "data": {
        "items": [
            {
                "id": "3193f588fb1bcede00e809562dbdb07be94779e1ac90ffe95c7f4eeaea94af07",
                "fee": "0",
                "date": 1616340678,
                "block": 675639,
                "is_coinbase": true,
                "confirmation": 2314,
                "status": "completed",
                "inputs": [
                    {
                        "witness": [
                            "0000000000000000000000000000000000000000000000000000000000000000"
                        ],
                        "coinbase": "03374f0a04c6665760425443506f6f6cfabe6d6d78bd61a6381485d1fd757c08ca151acf8605357e6cfa591776eccda28bbf7b21020000007296cd100300e37527641c0000000000",
                        "value": 0,
                        "vfp": 4294967295,
                        "sequence": 4294967295
                    }
                ],
                "outputs": [
                    {
                        "addresses": [
                            "14PUSkxZsGShcNmUBmxcYm5DcFq89S8jEG"
                        ],
                        "script": "76a9142528700ca7564d29160a93e629243d4ca15777e788ac",
                        "type": "pubkeyhash",
                        "value": 650979097,
                        "n": 0,
                        "next_position": 0
                    },
                    {
                        "script": "6a24aa21a9ed2e336a4a683fb65e51eee595ebfd9d29ecb4c2b4ea65bb2489be3565db7e77e7",
                        "type": "nulldata",
                        "value": 0,
                        "n": 1,
                        "next_position": 0
                    }
                ],
                "memo": "",
                "metadata": null
            },
        ],
        "limit": 10,
        "nextkey": "",
        "page": 1
    },
    "message": "OK"
}

# GET Pending Transaction Status

/{coin}/v1/unconfirmed_tx

The pending transaction means that it is still waiting to be packaged and has not yet entered the blockchain. Get the details of this transaction through the txid and the abbreviation of the public chain. If data returns null, there is no transaction in the queue to be confirmed.

Params Type Required Note
tx_id string yes The translation hash to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/unconfirmed_tx/816da806c69ec920e279c1d88aec48cd4c8da6be53634b9aab17ae64a3e0a090'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": {
        "id": "816da806c69ec920e279c1d88aec48cd4c8da6be53634b9aab17ae64a3e0a090",
        "fee": "11658",
        "date": 1616481573,
        "block": 0,
        "confirmation": 0,
        "status": "pending",
        "inputs": [
            {
                "addresses": [
                    "bc1q9akj4ekp0u4wrqlf9wmkcgna7y5wnn2x0uwhtz"
                ],
                "tx": "d4a758fbf0ce1dc9b1d7a9fb2cae232a8bffa6d830300b05be48047d1103af33",
                "type": "witness_v0_keyhash",
                "value": 2058732,
                "vfp": 0,
                "sequence": 4294967295
            }
        ],
        "outputs": [
            {
                "addresses": [
                    "35HFgtPENNGnR4UdyUUPRapVhUUQjQhFBD"
                ],
                "script": "a9142762029659834c03bb0470d82567a8ebde838e2687",
                "type": "scripthash",
                "value": 2047074,
                "n": 0,
                "next_position": 0,
            }
        ],
        "memo": "",
        "metadata": null
    }
}

# GET Pending Transaction Status

/{coin}/v1/unconfirmed_tx

The pending transaction means that it is still waiting to be packaged and has not yet entered the blockchain. Get the details of this transaction through the txid and the abbreviation of the public chain. If data returns null, there is no transaction in the queue to be confirmed.

Params Type Required Note
tx_id string yes The translation hash to be review
Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/unconfirmed_tx/816da806c69ec920e279c1d88aec48cd4c8da6be53634b9aab17ae64a3e0a090'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": {
        "id": "816da806c69ec920e279c1d88aec48cd4c8da6be53634b9aab17ae64a3e0a090",
        "fee": "11658",
        "date": 1616481573,
        "block": 0,
        "confirmation": 0,
        "status": "pending",
        "inputs": [
            {
                "addresses": [
                    "bc1q9akj4ekp0u4wrqlf9wmkcgna7y5wnn2x0uwhtz"
                ],
                "tx": "d4a758fbf0ce1dc9b1d7a9fb2cae232a8bffa6d830300b05be48047d1103af33",
                "type": "witness_v0_keyhash",
                "value": 2058732,
                "vfp": 0,
                "sequence": 4294967295
            }
        ],
        "outputs": [
            {
                "addresses": [
                    "35HFgtPENNGnR4UdyUUPRapVhUUQjQhFBD"
                ],
                "script": "a9142762029659834c03bb0470d82567a8ebde838e2687",
                "type": "scripthash",
                "value": 2047074,
                "n": 0,
                "next_position": 0,
            }
        ],
        "memo": "",
        "metadata": null
    }
}

# GET Top 100 Rich Address of Coin

/{coin}/v1/toprich

Through the abbreviation of the public chain, get the public chain's TOP100 wallet address list, including the wallet balance, and the list is sorted by the descending order of the balance. Supported coins: BTC、BCH、BSV、LTC、DOGE、FCH

Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/toprich'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "address": "3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13

        },
        {
            "addr": "16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13
        },
        {
            "addr": "16rCmCmbuWDhPjWTrpQGaU3EPdZF7MTdUk",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13
        }
    ...
    ]
}

# GET Top 100 Rich Address of Coin

/{coin}/v1/toprich

Through the abbreviation of the public chain, get the public chain's TOP100 wallet address list, including the wallet balance, and the list is sorted by the descending order of the balance. Supported coins: BTC、BCH、BSV、LTC、DOGE、FCH

Example Request
curl --location --request GET 'https://developers.viawallet.com/openapi/api/btc/v1/toprich'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "address": "3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13

        },
        {
            "addr": "16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13
        },
        {
            "addr": "16rCmCmbuWDhPjWTrpQGaU3EPdZF7MTdUk",
            "balance": 138660.86073724,
            "percent":13.4,
            "first_tx_time":1333003647,
            "last_tx_time":1616981507,
            "tx_count":1352,
            "tx_30day_count":13
        }
    ...
    ]
}

# Broadcast Transaction

# POST Broadcast Transaction

/{coin}/v1/sendtx

Broadcast a signed transaction

Params Type Required Note
tx_raw string yes Transaction has been signed
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/sendtx' \
--header 'Content-Type: application/json' \
--data-raw '{"tx_raw":"0100000001e5269c07fd5f609fe0cc479e365113f3054a8ebfc89ebd6d188defd3a2cc3c75010000006b483045022100c11aa61cebf9f4a337b07ef34b018a722a83a44f5f1db94d149cf7086f93aafa02200e2df5dfa6025a7292e5fc07a2508c98f4afe4bf59831f4c5fe1513728c5e80301210288521c776e00498c268215d12288b2b1ec87ba9b9bcee570df8b3da038d01f34ffffffff0222020000000000001976a9147e3f596889eb2c4666ea0823f05b0b7e0796192388ac79230000000000001976a9143a05fb822a4954af7d868d133963856fa3b5d7de88ac00000000"}'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": "53612a597bc416a5c0354b31023a3bb197468c8a81d1cad138629f56d50e1447"
}

# Broadcast Transaction

# POST Broadcast Transaction

/{coin}/v1/sendtx

Broadcast a signed transaction

Params Type Required Note
tx_raw string yes Transaction has been signed
Example Request
curl --location --request POST 'https://developers.viawallet.com/openapi/api/btc/v1/sendtx' \
--header 'Content-Type: application/json' \
--data-raw '{"tx_raw":"0100000001e5269c07fd5f609fe0cc479e365113f3054a8ebfc89ebd6d188defd3a2cc3c75010000006b483045022100c11aa61cebf9f4a337b07ef34b018a722a83a44f5f1db94d149cf7086f93aafa02200e2df5dfa6025a7292e5fc07a2508c98f4afe4bf59831f4c5fe1513728c5e80301210288521c776e00498c268215d12288b2b1ec87ba9b9bcee570df8b3da038d01f34ffffffff0222020000000000001976a9147e3f596889eb2c4666ea0823f05b0b7e0796192388ac79230000000000001976a9143a05fb822a4954af7d868d133963856fa3b5d7de88ac00000000"}'
Example Response
200 OK
{
    "code": 0,
    "message": "OK",
    "data": "53612a597bc416a5c0354b31023a3bb197468c8a81d1cad138629f56d50e1447"
}

# Error Code

Error Code Description
404 Router does not exist
1001 apikey cannot be null
1002 Invalid apikey
1003 Requests too frequent
1004 Signature verication failed
1005 Plan expire or limited
1006 Subscription address not found
1007 Unsupported currency
1008 The number of subscription address has reached the limit
1009 Invalid address
1010 Subscription address exits
1011 Could not parse raw transaction
1012 Transaction has been packed
1013 Inputs not found
1014 Transaction failed
Last Updated: 4/22/2021, 5:05:05 PM