NAV

Introduction

Welcome to Bitails! We are a BSV archive, indexer, and UTXO manager that provides APIs, sockets, and other features for developers and companies working on BSV. With Bitails, you don't need to worry about the size of the BSV blockchain. Our focus is on providing exceptional services to help you build your ideas faster and with less effort. Try out our new features and easily manage UTXOs, send data to BSV, fetch data from BSV, watch entities, and create your applications with ease!

Pricing

Plans

Bitails offers a diverse range of flexible pricing plans to meet the unique needs of users. From basic plans ideal for small-scale usage to advanced packages tailored for larger enterprises, Bitails ensures both scalability and affordability.

Plan Features Monthly Yearly
Free
  • 10 requests per second
  • 1,000 requests per day
  • 10 MB transaction size limit
  • Email support
$0 $0
Basic
  • 30 requests per second
  • 300,000 requests per day
  • 20 MB transaction size limit
  • Additional features
  • Priority support
$300 $3300 (1 month free)
Professional
  • Unlimited requests per second
  • 500,000 requests per day
  • 40 MB transaction size limit
  • All Features
  • Dedicated support
$500 $5500 (1 month free)
Enterprise
  • Custom requests per second
  • Custom requests per day
  • Custom transaction size limit
  • All features
  • Custom Service Level Agreements (SLA)
Contact us for pricing Contact us for pricing

For detailed information on Bitails' pricing plans and to discuss a tailored solution that suits your specific requirements, please contact us at [email protected].

Authentication & API Key


curl -X GET "https://api.bitails.io/network/info" -H "apikey: XXXXXXXXXXXXXXXXXXXXXXXXXXX"

The NodeJS example for using the api key in a request.


const request = require('request');
const API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXX';
const ENDPOINT = 'api.bitails.io';
const sampleMethod = `https://${ENDPOINT}/network/info`;
const requestOptions = {
  url: sampleMethod,
  headers: {
    apikey: API_KEY,
  },
};
request.get(requestOptions, (err, resp, body) => {
if (err) {
    console.log(err);
  }
if (resp.statusCode !== 200) {
    console.log(resp.statusCode);
  }
  console.log("Response Body:", body);
});

To access Bitails' API services, users are required to include their unique API key in the request header. For users without an API key, access is limited to 10 transactions per second (TPS) and 1000 daily requests.

Swagger

The Swagger is available for both main net and test net.

Main net - API: https://api.bitails.io/swagger

Test net - API: https://test-api.bitails.io/swagger

Main net - mAPI: https://mapi.bitails.io/swagger

Test net - mAPI: https://test-mapi.bitails.io/swagger

Scripthash

Get Unspent of Scripthash


# c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232  
curl "https://api.bitails.io/scripthash/{scripthash}/unspent"

The above command returns JSON structured like this:

[
  {
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "unspent": [
    {
    "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
    "vout": 1,
    "satoshis": 3522,
    "time": "1645960789",
    "blockheight": 815019,
    "confirmations": 200,
    }
    ]
  }
] 

This endpoint retrieves unspent outputs(UTXOs) of a scripthash.

HTTP Request

GET https://api.bitails.io/scripthash/{scripthash}/unspent

Parameter Description
scripthash
from
limit

Get Unspent of Multiple Scripthashes

curl --location --request POST "https://api.bitails.io/scripthash/unspent/multi" \--header "Content-Type: application/json" \--data "{\"scripthashes\": [\"213fb7922dc20cae6bd1cbf27f708a15fc089efdac632118fc8fb60ef1899630\", \"bbec6039916d01db85a839e06d84d95415515a7d791393128303707e5dd1c211\"]}"

The above command returns JSON structured like this:

[
  {
    "scripthash": "bbec6039916d01db85a839e06d84d95415515a7d791393128303707e5dd1c211",
    "unspent": [
      {
        "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
        "vout": 1,
        "satoshis": 3522,
        "time": "1645960789",
        "blockheight": 815019,
        "confirmations": 200
      }
    ]
  },
  {
    "scripthash": "213fb7922dc20cae6bd1cbf27f708a15fc089efdac632118fc8fb60ef1899630",
    "unspent": [
      {
        "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
        "vout": 1,
        "satoshis": 3522,
        "time": "1645960789",
        "blockheight": 815019,
        "confirmations": 200
      }
    ]
  }
]

This endpoint retrieves unspent outputs (UTXOs) of a scripthash.

HTTP Request

GET https://api.bitails.io/scripthash/unspent/multi

Parameter Description
from Description for the 'from' parameter
limit Description for the 'limit' parameter

Get Balance of Scripthash


# c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232  
curl "https://api.bitails.io/scripthash/{scripthash}/balance"

The above command returns JSON structured like this:


{
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "confirmed": 36453,
    "unconfirmed": 1000,
    "summary": 37453,
    "count":34,
}

This endpoint retrieves the balance of a scripthash.

HTTP Request

GET https://api.bitails.io/scripthash/{scripthash}/balance

Parameter Description
scripthash

Get Balance of Multiple Scripthashes

curl --location --request POST "https://api.bitails.io/scripthash/balance/multi" \--header "Content-Type: application/json" \--data "{\"scripthashes\": [\"213fb7922dc20cae6bd1cbf27f708a15fc089efdac632118fc8fb60ef1899630\", \"bbec6039916d01db85a839e06d84d95415515a7d791393128303707e5dd1c211\"]}"

The above command returns JSON structured like this:

{
  "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
  "confirmed": 36453,
  "unconfirmed": 1000,
  "summary": 37453,
  "count": 34
}

This endpoint retrieves the total balance of multiple scripthashes.

HTTP Request

GET https://api.bitails.io/scripthash/balance/multi

Parameter Description
from Description for the 'from' parameter
limit Description for the 'limit' parameter

Get History of Scripthash


# c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232  
curl "https://api.bitails.io/scripthash/{scripthash}/history"

The above command returns JSON structured like this:

[
  {
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "histories": [
    {
    "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
    "inputSatoshis": 2000,
    "outputSatoshis": 0,
    "time": 1655049588,
    "blockheight": 815019,
    }
  ]
  }
]
  
  
  
  
  
  
  
  

This endpoint retrieves the history of a scripthash. Note that the inputSatoshis and outputSatoshis refer to the role of the scripthash in the transaction. In other words, when the inputSatoshis is a non-zero value, it means the scripthash was seen in the inputs of the transaction(Spent), and when the outputSatoshis is non-zero, it implies that the scripthash was seen in the output of the transaction(Received).

GET https://api.bitails.io/scripthash/{scripthash}/history

HTTP Request

URL Parameters

Parameter Description
scripthash
pgkey
limit Maximum 5000

Scenario Using pgkey

1. The first request has no pgkey - recommended limit=5000

2. The first response includes 5000 history(the set limit) plus one pgkey which acts as a place holder and points to the last served data.

3. in later requests, the pgkey should be sent to the server as well. Each response has a new pgkey which should be used in the next request.

How do we know when we get to the end of the history?

Good question! when you receive a response which has no pgkey anymore, it means you are at the end of the history. It is like you were scrolling a page and now you are at the end.

Get Details of Scripthash


# c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232  
curl "https://api.bitails.io/scripthash/{scripthash}/details"

The above command returns JSON structured like this:


{
  "balance":
              {
                  "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
                  "confirmed": 36453,
                  "unconfirmed": 1000,
                  "summary": 37453,
                  "count": 34,
              },
  "lastSeen":
              {
                  "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
                  "inputSatoshis": 0,
                  "outputSatoshis": 12120,
                  "time": 1655049588,
                  "blockheight": 815019,
              },
  "firstSeen": 
              {
                  "txid": "c3d6c4b466bc369561fa854cab42a6acd89aeeb528c5ffbde83e7a380dfc7914",
                  "inputSatoshis": 0,
                  "outputSatoshis": 12120,
                  "time": 1655049588,
                  "blockheight": 815019,
              },
}

This endpoint retrieves the details of a scripthash.

HTTP Request

GET https://api.bitails.io/scripthash/{scripthash}/details

Parameter Description
scripthash

Address

Get Unspent of Address


# 18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e  
curl "https://api.bitails.io/address/{address}/unspent"

The above command returns JSON structured like this:


  {
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "unspent":
              [
                {
                "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
                "vout": 1,
                "satoshis": 3522,
                "time": 1645960789,
                "blockheight": 815019,
                "confirmations": 200,
                }
              ]
  }

This endpoint retrieves unspent outputs(UTXO) of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/unspent

Parameter Description
address
from
limit

Get Unspent of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/unspent/multi" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
  {
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "unspent": 
    [
      {
        "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
        "vout": 1,
        "satoshis": 3522,
        "time": 1645960789,
        "blockheight": 815019,
        "confirmations": 200,
      }
    ]
  },
  {
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "unspent": 
    [
      {
        "txid": "1f13d03c29ae4e0b996fd72636087247fcb9326dcc28b4852b7ffa7e5180f619",
        "vout": 1,
        "satoshis": 3522,
        "time": 1645960789,
        "blockheight": 815019,
        "confirmations": 200,
      }
    ]
  }
] 

This endpoint retrieves unspent outputs(UTXO) of multiple addresses.

HTTP Request

POST https://api.bitails.io/address/unspent/multi

Parameter Description
from
limit

Get Balance of Address


# 18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e  
curl "https://api.bitails.io/address/{address}/balance"

The above command returns JSON structured like this:


{
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "confirmed": 36453,
    "unconfirmed": 1000,
    "summary": 37453,
    "count": 34,
}

This endpoint retrieves the balance of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/balance

Parameter Description
address

Get Balance of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/balance/multi" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


{
    "confirmed": 36453,
    "unconfirmed": 1000,
    "summary": 37453,
    "count": 34,
}

This endpoint retrieves the balance of an address.

HTTP Request

POST https://api.bitails.io/address/balance/multi

Get Balance of Multiple Addresses separately


  curl --location --request POST "https://api.bitails.io/address/balance/multi/seperate" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"1FWQiwK27EnGXb6BiBMRLJvunJQZZPMcGd\", \"1FWQiwK27EnGXb6BiBMRLJvunJQZZPMcGd\"]}"

The above command returns JSON structured like this:


[
  {
    "confirmed": 36453,
    "unconfirmed": 1000,
    "summary": 37453,
    "count": 34,
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  },
  {
  "confirmed": 36453,
  "unconfirmed": 1000,
  "summary": 37453,
  "count": 34,
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  }
]

This endpoint retrieves the balance of multiple addresses separately.

HTTP Request

POST https://api.bitails.io/address/balance/multi/seperate

Get History of Address


# 18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e  
curl "https://api.bitails.io/address/{address}/history"

The above command returns JSON structured like this:

[
  {
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "scripthash": "c79e8d823c1ce9b80c9c340a389409f489989800044466c9d05bfef12c472232",
    "histories": [
    {
    "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
    "inputSatoshis": 0,
    "outputSatoshis": 12120,
    "time": 1655049588,
    "blockheight": 815019,
    } 
  ]
  }
] 
  
  
  
  
  

This endpoint retrieves the history of an address. Note that the inputSatoshis and outputSatoshis refer to the role of the address in the transaction. In other words, when the inputSatoshis is a non-zero value, it means the address was seen in the inputs of the transaction(Spent), and when the outputSatoshis is non-zero, it implies that the address was seen in the output of the transaction(Received).

HTTP Request

GET https://api.bitails.io/address/{address}/history

Parameter Description
address
pgkey
limit Maximum 5000

Scenario Using pgkey

1. The first request has no pgkey - recommended limit=5000

2. The first response includes 5000 history(the set limit) plus one pgkey which acts as a place holder and points to the last served data.

3. in later requests, the pgkey should be sent to the server as well. Each response has a new pgkey which should be used in the next request.

How do we know when we get to the end of the history?

Good question! when you receive a response which has no pgkey anymore, it means you are at the end of the history. It is like you were scrolling a page and now you are at the end.

Get History of Multiple Addresses


curl --location --request POST "https://api.bitails.io/address/history/multi" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
  {
  "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
  "inputSatoshis": 1123,
  "outputSatoshis": 0,
  "time": 1655049588,
  "blockheight": 815019,
  },
  {
  "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
  "inputSatoshis": 3243,
  "outputSatoshis": 0,
  "time": 1655049588,
  "blockheight": 815019,
  }
]
  
  
  
  
  

This endpoint retrieves the history of an address. Note that the inputSatoshis and outputSatoshis refer to the role of the address in the transaction. In other words, when the inputSatoshis is a non-zero value, it means the address was seen in the inputs of the transaction(Spent), and when the outputSatoshis is non-zero, it implies that the address was seen in the output of the transaction(Received).

HTTP Request

POST https://api.bitails.io/address/history/multi

Parameter Description
from
limit

Get Details of Address


# 18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e  
curl "https://api.bitails.io/address/{address}/details"

The above command returns JSON structured like this:


  {
  "balance":
              {
                  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
                  "confirmed": 36453,
                  "unconfirmed": 1000,
                  "summary": 37453,
                  "count": 34,
              },
  "lastSeen":
              {
                  "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
                  "inputSatoshis": 0,
                  "outputSatoshis": 12120,
                  "time": 1655049588,
                  "blockheight": 815019,
              },
  "firstSeen": 
              {
                  "txid": "c3d6c4b466bc369561fa854cab42a6acd89aeeb528c5ffbde83e7a380dfc7914",
                  "inputSatoshis": 0,
                  "outputSatoshis": 12120,
                  "time": 1655049588,
                  "blockheight": 815019,
              },
}

This endpoint retrieves the details of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/details

Parameter Description
address

Get the Richest Addresses


curl "https://api.bitails.io/analytics/address/rich"

The above command returns JSON structured like this:


  [
    {
                  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
                  "scripthash": "dd5d03690485426ca964ec1cf5c05e1cf6b59952177f59ba735d958fe1945298",
                  "type": "pubkeyhash",
                  "balance": 3733434432453
    }
]

This endpoint retrieves the first 100 addresses with the highes BSV balance(This list gets updated on a daily basis around 2:00 A.M. UTC).

HTTP Request

GET https://api.bitails.io/analytics/address/rich

Parameter Description
address

Transaction

The Transaction API is used to retrieve the details of a transaction, find the documentation regarding sockets on transactions in the 'Socket' section.

Get Input of Transaction


# 687a32b54ea9a8f270e648cdd6666185e452e5a9a92cabfc506d1bc1e3ecc5ac  
curl "https://api.bitails.io/tx/{txid}/input/{inputIndex}"

The above command returns JSON structured like this:


{
    "index": 0,
    "source": {
        "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
        "index": 0,
        "script": "76a9141519647c1f457a5f7784ef552ce0538dd3a5678a88ac",
        "scripthash": "43451f28dff6dd3109af4b83e5fe7828120d1169d1c1c5106c58b2f7039d50c4",
        "satoshis": 18776
      },
    "scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
    "sequence": 4294967295,
}
 

This endpoint retrieves an input of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/input/{inputIndex}

Parameter Description
txid
index Input index

Get Inputs of Transaction


# f3f4e891bf22e62530acdedae2ec383cd961b8ca70039c4183c1dee16ef8463b  
curl "https://api.bitails.io/tx/{txid}/inputs/{fromIndex}/{toIndex}"

The above command returns JSON structured like this:


[
{
"index": 0,
"source": {
    "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
    "index": 0,
    "script": "76a9141519647c1f457a5f7784ef552ce0538dd3a5678a88ac",
    "scripthash": "43451f28dff6dd3109af4b83e5fe7828120d1169d1c1c5106c58b2f7039d50c4",
    "satoshis": 18776
  },
"scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
"sequence": 4294967295,
},
{
"index": 0,
"source": {
    "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
    "index": 0,
    "script": "76a9141519647c1f457a5f7784ef552ce0538dd3a5678a88ac",
    "scripthash": "43451f28dff6dd3109af4b83e5fe7828120d1169d1c1c5106c58b2f7039d50c4",
    "satoshis": 18776
  },
"scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
"sequence": 4294967295,
},
{
"index": 0,
"source": {
    "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
    "index": 0,
    "script": "76a9141519647c1f457a5f7784ef552ce0538dd3a5678a88ac",
    "scripthash": "43451f28dff6dd3109af4b83e5fe7828120d1169d1c1c5106c58b2f7039d50c4",
    "satoshis": 18776
  },
"scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
"sequence": 4294967295,
},
]

This endpoint retrieves multiple inputs of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/inputs/{fromIndex}/{toIndex}

Parameter Description
txid
from Starting index
to Ending index

Get Output of Transaction


# f3f4e891bf22e62530acdedae2ec383cd961b8ca70039c4183c1dee16ef8463b  
curl "https://api.bitails.io/tx/{txid}/output/{outputIndex}"

The above command returns JSON structured like this:


{
    "index": 0,
    "type": "nulldata"
    "reqSigs": -1,
    "scripthash": "cbb5deafd5267b5cc8b09e4396928035121de3135ff053117eceebb882875d82",
    "spent": "false",
    "scriptSize": 938,
    "partialScript": "false",
    "script": "006a2231394878696756345179427633744870515663554551797131707a5a56646f41757403626173106170706c69636174696f6e2f6a736f6e0100306d705f74726164655f76345f3148456d3235445a326276634c7548757132767759546357577638776d5a524569395f3108677a69702c656e634d3103261d4dff43edf620b6f92a35a7a0eeed02f628d0494aa0c7895baf15892a5b1305d702b7726a1e53f9b3820cd03a5b40055b54b0fefbfa2f021637d5f5fea58b345a79b3d58a3c3cc427cf1ba5e3daeb35a6de2c90d1aa95db008845104bdbd8bab185305da20f3ecc7b59a6641a077fa011a1891d5bfabc1bb24943eb4e58038720f9347d8ab16069e94a600e9c0d5adba29b293606cd8849ee9125bf40313a3ca71b3d24a3c873ab1dc4322fcd22c541e8d22987cd5ca4d143f36759c3caff75f7b9e3e2583741f15252265db54a6e1113da9fea1448d1fd37f1e4c9f90cdbd925190a35f9e0df4bd243c0d5de4d8aca62ba60e53a792249f23dcfe4910a54bee9b16bfbfe84c68ad4b9bdb8ba7ee81c9c92ede77b2b11f93d8369b624c1259ec19e300d6b83b85d3baf508bba206fc72f23ce48950ff83cf81e7989ebc07e6d8d86efddb6a9352ad5c64dfa8d444b809e84130f8466b2dfc8f62b61475dfda02ba976f34fdf08e51cf0960b3eb...",
}
 

This endpoint retrieves an output of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/output/{outputIndex}

Parameter Description
txid
index Output index

Get Outputs of Transaction


# 687a32b54ea9a8f270e648cdd6666185e452e5a9a92cabfc506d1bc1e3ecc5ac  
curl "https://api.bitails.io/tx/{txid}/outputs/{fromIndex}/{toIndex}"

The above command returns JSON structured like this:


[
{
"index": 0,
"type": "nulldata"
"reqSigs": -1,
"scripthash": "cbb5deafd5267b5cc8b09e4396928035121de3135ff053117eceebb882875d82",
"spent": "false",
"scriptSize": 938,
"partialScript": "false",
"script": "006a2231394878696756345179427633744870515663554551797131707a5a56646f41757403626173106170706c69636174696f6e2f6a736f6e0100306d705f74726164655f76345f3148456d3235445a326276634c7548757132767759546357577638776d5a524569395f3108677a69702c656e634d3103261d4dff43edf620b6f92a35a7a0eeed02f628d0494aa0c7895baf15892a5b1305d702b7726a1e53f9b3820cd03a5b40055b54b0fefbfa2f021637d5f5fea58b345a79b3d58a3c3cc427cf1ba5e3daeb35a6de2c90d1aa95db008845104bdbd8bab185305da20f3ecc7b59a6641a077fa011a1891d5bfabc1bb24943eb4e58038720f9347d8ab16069e94a600e9c0d5adba29b293606cd8849ee9125bf40313a3ca71b3d24a3c873ab1dc4322fcd22c541e8d22987cd5ca4d143f36759c3caff75f7b9e3e2583741f15252265db54a6e1113da9fea1448d1fd37f1e4c9f90cdbd925190a35f9e0df4bd243c0d5de4d8aca62ba60e53a792249f23dcfe4910a54bee9b16bfbfe84c68ad4b9bdb8ba7ee81c9c92ede77b2b11f93d8369b624c1259ec19e300d6b83b85d3baf508bba206fc72f23ce48950ff83cf81e7989ebc07e6d8d86efddb6a9352ad5c64dfa8d444b809e84130f8466b2dfc8f62b61475dfda02ba976f34fdf08e51cf0960b3eb...",
},
{
"index": 1,
"type": "pubkeyhash"
"reqSigs": 1,
"satoshis": 800,
"scripthash": "cbb5deafd5267b5cc8b09e4396928035121de3135ff053117eceebb882875d82",
"spent": "false",
"scriptSize": 25,
"partialScript": "false",
"script": "76a914feaf96c5b259c80d36bdd1d6f1d8caa9bb584fe188ac...",
]

This endpoint retrieves multiple outputs of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/outputs/{fromIndex}/{toIndex}

Parameter Description
txid
from Starting index
to Ending index

Get Transaction By ID


# c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0  
curl "https://api.bitails.io/tx/{txid}"

The above command returns JSON structured like this:

[
  {
    "txid": "c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0",
    "blockhash": "00000000000000001055c413778451e93e4ab0b4ee442900470abe777916da35",
    "blockheight": 742364,
    "inblockIndex": 5,
    "confirmations": 1234,
    "time": 1654203396,
    "size": 1128,
    "fee": 645,
    "ops": [0]
    "inputsCount": 2,
    "sumOfInputsSatoshis": 1247,
    "outputsCount": 2,
    "sumOfOutputsSatoshis": 602,
    "locktime": 0,
    "partialInputs": false,
    "inputs": [
        {
        "index": 0,
        "source": {
            "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
            "index": 0,
            "script": "76a914334e3f294c770f954055533c8141a91a7f7ab0fa88ac",
            "scripthash": "2d287814f112e35f2c665b7c29a4ff2e8c8435c1d6353e5a0b34432209e87f73",
            "satoshis": 18776
                  },
        "scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
        "sequence": 4294967295,
        },
        {
        "index": 1,
        "source": {
            "txid": "5a63449e5bcbc2e266857c9a2f90ae4cea9907b4dd16793d2db11f9524caaff7",
            "index": 0,
            "script": "76a914334e3f294c770f954055533c8141a91a7f7ab0fa88ac",
            "scripthash": "2d287814f112e35f2c665b7c29a4ff2e8c8435c1d6353e5a0b34432209e87f73",
            "satoshis": 18776
                  },
        "scriptSig": "483045022100cfda7d900ccce55c40089df9474e61177f27ac2f3be74b9e958805fab61c992202206ad20dbfcdb244fa8d49fbbb6fde6d5dbe43cd9f93e8d96b6bea983079f17829412102062d9f5d80fcd868c5db4ace2fb38d907296c0b2a00b603a0ec4237b850a04e7",
        "sequence": 4294967295,
        }
      ],
    "partialOutputs": false,
    "outputs": [
        {
        "index": 0,
        "type": "nulldata"
        "reqSigs": -1,
        "scripthash": "cbb5deafd5267b5cc8b09e4396928035121de3135ff053117eceebb882875d82",
        "spent": "false",
        "scriptSize": 938,
        "partialScript": "false",
        "script": "006a2231394878696756345179427633744870515663554551797131707a5a56646f41757403626173106170706c69636174696f6e2f6a736f6e0100306d705f74726164655f76345f3148456d3235445a326276634c7548757132767759546357577638776d5a524569395f3108677a69702c656e634d3103261d4dff43edf620b6f92a35a7a0eeed02f628d0494aa0c7895baf15892a5b1305d702b7726a1e53f9b3820cd03a5b40055b54b0fefbfa2f021637d5f5fea58b345a79b3d58a3c3cc427cf1ba5e3daeb35a6de2c90d1aa95db008845104bdbd8bab185305da20f3ecc7b59a6641a077fa011a1891d5bfabc1bb24943eb4e58038720f9347d8ab16069e94a600e9c0d5adba29b293606cd8849ee9125bf40313a3ca71b3d24a3c873ab1dc4322fcd22c541e8d22987cd5ca4d143f36759c3caff75f7b9e3e2583741f15252265db54a6e1113da9fea1448d1fd37f1e4c9f90cdbd925190a35f9e0df4bd243c0d5de4d8aca62ba60e53a792249f23dcfe4910a54bee9b16bfbfe84c68ad4b9bdb8ba7ee81c9c92ede77b2b11f93d8369b624c1259ec19e300d6b83b85d3baf508bba206fc72f23ce48950ff83cf81e7989ebc07e6d8d86efddb6a9352ad5c64dfa8d444b809e84130f8466b2dfc8f62b61475dfda02ba976f34fdf08e51cf0960b3eb...",
        },
        {
        "index": 1,
        "type": "pubkeyhash"
        "reqSigs": 1,
        "satoshis": 800,
        "scripthash": "cbb5deafd5267b5cc8b09e4396928035121de3135ff053117eceebb882875d82",
        "spent": "false",
        "scriptSize": 25,
        "partialScript": "false",
        "script": "76a914feaf96c5b259c80d36bdd1d6f1d8caa9bb584fe188ac...",
     }
    ]
  }
] 

This endpoint retrieves the parsed format of transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}

Parameter Description
txid

Get Transaction Status By ID


# c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0  
curl "https://api.bitails.io/tx/{txid}/status"

The above command returns JSON structured like this:

{
    "txid": "c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0",
    "blockhash": "00000000000000001055c413778451e93e4ab0b4ee442900470abe777916da35",
    "blockheight": 742364,
    "blocktime": 1654203396,
    "confirmations": 1234,
    "status": "confirmed|mempool|Not Found",
} 

This endpoint retrieves the status of a transaction(confirmed, mempool and Not Found).

HTTP Request

GET https://api.bitails.io/tx/{txid}/status

Parameter Description
txid

Get Multi Transactions Status By Their IDs


# c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0  
curl --location --request POST "https://api.bitails.io/tx/status/multi" \
--header "Content-Type: application/json" \
--data "{\"txsIds\": \["txid...\"]}"

The above command returns JSON structured like this:

[
  {
    "txid": "c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0",
    "blockhash": "00000000000000001055c413778451e93e4ab0b4ee442900470abe777916da35",
    "blockheight": 742364,
    "blocktime": 1654203396,
    "confirmations": 1234,
    "status": "confirmed|mempool|Not Found",
  }
] 

This endpoint retrieves the status of a batch of transactions(confirmed, mempool and Not Found).

HTTP Request

POST https://api.bitails.io/tx/status/multi

Parameter Description
txIds array of the txids

Get UTXO Status


# c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0  
curl "https://api.bitails.io/tx/{txid}/output/{outputIndex}/status"

The above command returns JSON structured like this:

{
    "txid": "c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0",
    "index": "00000000000000001055c413778451e93e4ab0b4ee442900470abe777916da35",
    "blockheight": 742364,
    "status": "exists|unknown",
    "spent": true|false,
}  

This endpoint retrieves the staus of a UTXO.

exists/false: The UTXO in mined in previous blocks and has not been spent in the mempool.

exists/true: The UTXO in mined in previous blocks but has been spent recently in a transaction which is not mined yet.

mempool/false: The UTXO just got created and has not been mined and spent.

mempool/true: The UTXO just got created and has not been mined but spent in another transaction which is also in the mempool.

Unknown: We dont know the UTXO(It was spent or didn't exists at all)

HTTP Request

GET https://api.bitails.io/tx/{txid}/output/{outputIndex}/status

Parameter Description
txid
index

Get Multi UTXOs Status


# c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0  
curl --location --request POST "https://api.bitails.io/tx/output/status/multi" \
--header "Content-Type: application/json" \
--data "{\"outputs\": [{\"txid\":\"txid...\", \"index\": number }]}"

The above command returns JSON structured like this:

[
  {
    "txid": "c32597ddd7d8623d7eb1ddd854ab36541e037dc1f9f0ab7aaf55d3a1e5a17af0",
    "index": "00000000000000001055c413778451e93e4ab0b4ee442900470abe777916da35",
    "blockheight": 742364,
    "status": "exists|unknown",
    "spent": true|false,
  }
]  

This endpoint retrieves the staus of multi UTXOs.

exists/false: The UTXO in mined in previous blocks and has not been spent in the mempool.

exists/true: The UTXO in mined in previous blocks but has been spent recently in a transaction which is not mined yet.

mempool/false: The UTXO just got created and has not been mined and spent.

mempool/true: The UTXO just got created and has not been mined but spent in another transaction which is also in the mempool.

Unknown: We dont know the UTXO(It was spent or didn't exists at all)

HTTP Request

POST https://api.bitails.io/tx/output/status/multi

Parameter Description
outputs array of txids and their indexes

Get Merkle Proof


# 13d94f78bcaddcadf0fb7672f788c62cb93d5cdaa73e187d44cee24849d80f89  
curl "https://api.bitails.io/tx/{txid}/proof"

The above command returns JSON structured like this:


{
"blockhash": "00000000000000000085985685d702b6c2911db73800cc5601333e2f60312ba2",
"branches": [
    {
        "pos": "R",
        "hash": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
        },
        {
        "pos": "L",
        "hash": "966d90b60347991a47feff12dd3533d89b68cda452488e236481da0456a169d6",
        },
        {
        "pos": "L",
        "hash": "ea0b162823c00a628575ab0c4c008837a1d8e6544932be457dff1c5ef8c5a2bc",
        },
        {
        "pos": "R",
        "hash": "831c2840c0882ca369fd18b5187ea55a3108245480c6b25ff6cd15ec0f563990",
    }
  ],
"hash": "13d94f78bcaddcadf0fb7672f788c62cb93d5cdaa73e187d44cee24849d80f89",
"merkleRoot": "10aff887bac4789106e85312b2afdcebd71926c15b0604236af9f2972ab30d8d"
}

This endpoint retrieves the proof of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/proof

Parameter Description
txid

Get Merkle Proof - TSC Format


# 13d94f78bcaddcadf0fb7672f788c62cb93d5cdaa73e187d44cee24849d80f89  
curl "https://api.bitails.io/tx/{txid}/proof/tsc"

The above command returns JSON structured like this:


{
"index": 6,
"txOrId": "13d94f78bcaddcadf0fb7672f788c62cb93d5cdaa73e187d44cee24849d80f89",
"target": "00000000000000000085985685d702b6c2911db73800cc5601333e2f60312ba2",
"nodes": [
"946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
"966d90b60347991a47feff12dd3533d89b68cda452488e236481da0456a169d6",
"ea0b162823c00a628575ab0c4c008837a1d8e6544932be457dff1c5ef8c5a2bc",
"831c2840c0882ca369fd18b5187ea55a3108245480c6b25ff6cd15ec0f563990",
"e9b4210567f28b3b77c4979c4ed8f9e5fd9a123eee01d0dd5f31d9dc6315286e",
"e6c435ede10b252f8ee4f8bdd43ee5c93414d8e02aefbcc3921e33da5c6802d3",
  ]
}

This endpoint retrieves the proof of a transaction.

HTTP Request

GET https://api.bitails.io/tx/{txid}/proof/tsc

Parameter Description
txid

Send Raw Transaction


 
curl --location --request POST "https://api.bitails.io/tx/broadcast" \
--header "Content-Type: application/json" \
--data "{\"raw\": \"hexRawTX...\" }"

The above command returns JSON structured like this:


{
"txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
}

This endpoint broadcasts the raw transaction up to 32MB in hex to the Blockchain.

HTTP Request

POST https://api.bitails.io/tx/broadcast

Request Body

Key Value
raw The raw format of tx in hex

Send Multi Raw Transactions


 
curl --location --request POST "https://api.bitails.io/tx/broadcast/multi" \
--header "Content-Type: application/json" \
--data "\"raws\": [\"hexRawTX...\", \"hexRawTX...\" ]"

The above command returns JSON structured like this:


[
  {
    "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
    "error":
    {
      "code": 0,
      "message": "string",
    }
  },
  {
    "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
    "error":
    {
      "code": 0,
      "message": "string",
    }
  }
]

This endpoint broadcasts the raw transaction up to 32MB in hex to the Blockchain.

HTTP Request

POST https://api.bitails.io/tx/broadcast/multi

Request Body

Key Value
raws The raw format of txs in hex

Send Big Raw Transaction


 
request(
  {
    url: 'https://test-api.bitails.io/tx/broadcast/multipart',
    method: 'POST',
    formData: { 
      raw: {
        value: Buffer.from(
          '0100000001944a3a02dd89a9eb0336a137.......',
          'hex'
        ),
        options: {
          filename: 'raw' 
        }
      }
    }
  },
  (err, res, body) => {
    console.log(err, body);
  }
);

The above command returns JSON structured like this:


{
"txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
}

This endpoint is usefull for broadcasting a huge transaction.

HTTP Request

POST https://api.bitails.io/tx/broadcast/multipart

Request Body

Key Value
raw The raw format of tx in hex

Block

Get Block By Height

  
curl "https://api.bitails.io/block/height/{height}"

The above command returns JSON structured like this:


{
  "hash": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
  "size": 81577,
  "height": 500000,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "4af279645e1b337e655ae3286fc2ca09f58eb01efa6ab27adedd1e9e6ec19091",
  "transactionCount": 150,
  "time": 1509343584,
  "mediantime": 1509336533,
  "nonce": 3604508752,
  "bits": "1809b91a",
  "chainwork": "0000000000000000000000000000000000000000007ae48aca46e3b449ad9714",
  "previousBlockHash": "0000000000000000043831d6ebb013716f0580287ee5e5687e27d0ed72e6e523",
  "nextBlockHash": "00000000000000000568f0a96bf4348847bc84e455cbfec389f27311037a20f3",
  "transactionsInputsCount": 468,
  "sumOfInputSatoshis": 2978761212445,
  "transactionsOutputsCount": 273,
  "sumOfOutputSatoshis": 2978758164777,
  "fees": 3047668,
  "averageFee": 20454,
  "feeRate": 37.43879907621247,
  "blockSubsidy": 1250000000,
  "minerId": "string",
  "orphan": false,
  "tags": 
  [
    {
        "tag": "nonstandard",
        count: 4,
    },
    {
        "tag": "upfile",
        count: 4,
    }
  ]
  "partialTransactions": true,
  "transactionsDetails": [
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      }
    ]
}
 

This endpoint retrieves a block data by height.

HTTP Request

GET https://api.bitails.io/block/height/{height}

Parameter Description
height Block Height

Count Blocks By Miner

  
curl "https://api.bitails.io/block/count?minerId={MinerName}"

The above command returns JSON structured like this:


  56736

This endpoint retrieves block counts based on the miner.

HTTP Request

GET https://api.bitails.io/block/count?minerId={Miner Name}

Parameter Description
minerId Miner Name

Get Block List

  
curl "https://api.bitails.io/block/list?fromHeight={height}&limit={limit}"

The above command returns JSON structured like this:


[
  {
    "hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",
    "confirmations": 819168,
    "height": 1000,
    "version": 1,
    "versionHex": "00000001",
    "merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
    "time": 1232346882,
    "mediantime": 1232344831,
    "nonce": 2595206198,
    "bits": "1d00ffff",
    "difficulty": 1,
    "chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",
    "previousBlockHash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",
    "nextBlockHash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6",
    "size": 216,
    "transactionsCount": 1,
    "details": {
      "transactionsInputsCount": 1,
      "sumOfInputSatoshis": 0,
      "transactionsOutputsCount": 1,
      "sumOfOutputSatoshis": 0,
      "totalFee": 0,
      "averageFee": 0,
      "age": 468760416,
      "minerId": ""
    }
  }
]

This endpoint retrieves a list of blocks with details.

HTTP Request

GET https://api.bitails.io/block/list??skip={skip}&limit={limit}&sort={sortBy}&direction={asc|desc}

URL Parameters

Parameter Description
skip number of blocks to skip
limit number of blocks to list
sortBy height|size|transactions|fees
direction asc|desc

Get Latest Block

  
curl "https://api.bitails.io/block/latest"

The above command returns JSON structured like this:


  {
  "hash": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
  "size": 81577,
  "height": 500000,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "4af279645e1b337e655ae3286fc2ca09f58eb01efa6ab27adedd1e9e6ec19091",
  "transactionCount": 150,
  "time": 1509343584,
  "mediantime": 1509336533,
  "nonce": 3604508752,
  "bits": "1809b91a",
  "chainwork": "0000000000000000000000000000000000000000007ae48aca46e3b449ad9714",
  "previousBlockHash": "0000000000000000043831d6ebb013716f0580287ee5e5687e27d0ed72e6e523",
  "nextBlockHash": "00000000000000000568f0a96bf4348847bc84e455cbfec389f27311037a20f3",
  "transactionsInputsCount": 468,
  "sumOfInputSatoshis": 2978761212445,
  "transactionsOutputsCount": 273,
  "sumOfOutputSatoshis": 2978758164777,
  "fees": 3047668,
  "averageFee": 20454,
  "feeRate": 37.43879907621247,
  "blockSubsidy": 1250000000,
  "minerId": "string",
  "orphan": false,
  "tags": 
  [
    {
        "tag": "nonstandard",
        count: 4,
    },
    {
        "tag": "upfile",
        count: 4,
    }
  ]
  "partialTransactions": true,
  "transactionsDetails": [
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      }
    ]
}
 

This endpoint retrieves the latest block.

HTTP Request

GET https://api.bitails.io/block/latest

Get Block By Hash

  
curl "https://api.bitails.io/block/{blockhash}"

The above command returns JSON structured like this:


  {
  "hash": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
  "size": 81577,
  "height": 500000,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "4af279645e1b337e655ae3286fc2ca09f58eb01efa6ab27adedd1e9e6ec19091",
  "transactionCount": 150,
  "time": 1509343584,
  "mediantime": 1509336533,
  "nonce": 3604508752,
  "bits": "1809b91a",
  "chainwork": "0000000000000000000000000000000000000000007ae48aca46e3b449ad9714",
  "previousBlockHash": "0000000000000000043831d6ebb013716f0580287ee5e5687e27d0ed72e6e523",
  "nextBlockHash": "00000000000000000568f0a96bf4348847bc84e455cbfec389f27311037a20f3",
  "transactionsInputsCount": 468,
  "sumOfInputSatoshis": 2978761212445,
  "transactionsOutputsCount": 273,
  "sumOfOutputSatoshis": 2978758164777,
  "fees": 3047668,
  "averageFee": 20454,
  "feeRate": 37.43879907621247,
  "blockSubsidy": 1250000000,
  "minerId": "string",
  "orphan": false,
  "tags": 
  [
    {
        "tag": "nonstandard",
        count: 4,
    },
    {
        "tag": "upfile",
        count: 4,
    }
  ]
  "partialTransactions": true,
  "transactionsDetails": [
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      },
      {
          "index": 0,
          "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
          "inputsCount": 2,
          "outputsCount": 2,
          "size": 350,
      }
    ]
}
 

This endpoint retrieves the block data by hash.

HTTP Request

GET https://api.bitails.io/block/{blockhash}

Parameter Description
hash Block Hash

Get Block Header by Height

  
curl "https://api.bitails.io/block/header/height/{blockheight}/raw"

The above command returns JSON structured like this:

{
  "header": "010000000c59cf62add14129195d91b7e55dad81b539002d7366acfc01902c0000000000ec5abb8c8b90e2e04c14648853ba9d262e4e8677b374a7da52650f2ea5ea1a9275f2794c9820691b0689738c",
}
 

This endpoint retrieves the block data by hash.

HTTP Request

GET https://api.bitails.io/block/header/height/{blockheight}/raw

Parameter Description
hash Block Hash

Get Transactions of Block

  
curl "https://api.bitails.io/block/{blockhash}/transactions"

The above command returns JSON structured like this:


 [
        {
        "index": 0,
        "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
        "inputsCount": 2,
        "outputsCount": 2,
        "size": 350,
        "ops": [4,6],
        "tags": ["string"]
        },
        {
        "index": 1,
        "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
        "inputsCount": 1,
        "outputsCount": 2,
        "size": 224,
        },
        {
        "index": 2,
        "txid": "946e8cf5a6d812f2cb666531ba59e80847abd6cdc05d65695a5fc41682d4379c",
        "inputsCount": 1,
        "outputsCount": 1,
        "size": 173,
        }
    ]
 

This endpoint retrieves the transactions of a block.

HTTP Request

GET https://api.bitails.io/block/{blockhash}/transactions

Parameter Description
hash Block Hash
from Starting Index
limit Number of Results

Get Stats of Transactions

  
curl "https://api.bitails.io/block/stats/tag/summary?fromTime={epocTime}&toTime={epocTime}"

The above command returns JSON structured like this:


 [
        {
        "tag": "string",
        "count": 1472,
        },
        {
        "tag": "string",
        "count": 1472,
        },
        {
        "tag": "string",
        "count": 1472,
        },
        {
        "tag": "string",
        "count": 1472,
        }
  ]
 

This endpoint retrieves the stats summary of transactions(based on the tags) in blocks(not including the transactions in Mempool).

HTTP Request

GET https://api.bitails.io/block/stats/tag/summary?fromTime=1684230509&toTime=1684930509

Parameter Description
fromTime Epoc - required
toTime

Get Histogram Stats of Transactions

  
curl "https://api.bitails.io/block/stats/tag/1h/histogram?fromTime=1700659941&toTime=1701091969"

The above command returns JSON structured like this:


  [
  {
    "time": 1700661491,
    "tags": [
      {
        "tag": "stas",
        "count": 7
      },
      {
        "tag": "tdxp",
        "count": 44
      },
      {
        "tag": "run",
        "count": 28
      }
    ]
  }
]

This endpoint retrieves the histogram summary of transactions(based on the tags) in blocks(not including the transactions in Mempool).

HTTP Request

GET https://api.bitails.io/block/stats/tag/1h/histogram?fromTime=1700659941&toTime=1701091969

Parameter Description
fromTime Epoc - required
toTime
period 1h, 24h, 7d

Get Histogram Mining Stats

  
curl "https://api.bitails.io/block/stats/mining/1h/histogram?fromTime=1700659941&toTime=1701091969"

The above command returns JSON structured like this:


 [
        {
        "time": "1700661491",
        "miners":
            [
                {
                "minerId": "string",
                "count": 1,
                "size": 423234,
                "fees": 685653,
                "txs": 1232
                }
            ]
        }
  ]
 

This endpoint retrieves the histogram summary of blocks mined by miners in a period of time.

HTTP Request

GET https://api.bitails.io/block/stats/tag/summary?fromTime=1684230509&toTime=1684930509

Parameter Description
fromTime Epoc - required
toTime
period 1h, 24h, 7d

Get Histogram Mining Metrics

  
curl "https://api.bitails.io/block/stats/props/1h/histogram?fromTime=1700659941&toTime=1701091969"

The above command returns JSON structured like this:


[
  {
  "averageNumOfTxs": 2501,
  "totalNumOfTxs": 2501,
  "totalTxsInputs": 3825,
  "totalTxsOutputs": 5628,
  "averageSize": 1049412,
  "totalSize": 1049412,
  "averageFees": 73,
  "txAverageFee": 73,
  "txMedianFee": 5,
  "totalBlockFees": 183119,
  "averageFeeRate": 0.17449676580790005,
  "averageTxSize": 419,
  "MedianTxSize": 293,
  "time": 1700661491
  },
  {
  "averageNumOfTxs": 2501,
  "totalNumOfTxs": 2501,
  "totalTxsInputs": 3825,
  "totalTxsOutputs": 5628,
  "averageSize": 1049412,
  "totalSize": 1049412,
  "averageFees": 73,
  "txAverageFee": 73,
  "txMedianFee": 5,
  "totalBlockFees": 183119,
  "averageFeeRate": 0.17449676580790005,
  "averageTxSize": 419,
  "MedianTxSize": 293,
  "time": 1700661491
  } 
]

This endpoint retrieves the histogram metrics for blocks mined in a period of time.

HTTP Request

GET https://api.bitails.io/block/stats/props/1h/histogram?fromTime=1700659941&toTime=1701091969

Parameter Description
fromTime Epoc - required
toTime
period 1h, 24h, 7d

Mempool

Get Mempool Info

  
curl "https://api.bitails.io/mempool"

The above command returns JSON structured like this:


  {
    "transactionsCount": 23764,
    "size": 10998880813,
    "circulatedSatoshis": "2976405264895",
    "age": 1776,
  }
 

This endpoint retrieves the Mempool info.

HTTP Request

GET https://api.bitails.io/mempool

Get Mempool transactions

 
   
curl "https://api.bitails.io/mempool/transactions"

The above command returns JSON structured like this:


[
  {
    "txid": "c09e7ecccc9305377b01c754e008b7bd434b092e0d629a1c836806a30d86338f",
    "countOfInputs": 2,
    "countOfOutputs": 1,
    "ops": [0],
    "size": 403,
    "timestamp": 1658243646,
  },
  {
  "txid": "c09e7ecccc9305377b01c754e008b7bd434b092e0d629a1c836806a30d86338f",
  "countOfInputs": 2,
  "countOfOutputs": 1,
  "ops": [0],
  "size": 403,
  "timestamp": 1658243646,
  },
  {
  "txid": "c09e7ecccc9305377b01c754e008b7bd434b092e0d629a1c836806a30d86338f",
  "countOfInputs": 2,
  "countOfOutputs": 1,
  "ops": [0],
  "size": 403,
  "timestamp": 1658243646,
  },
]
 

This endpoint retrieves the transactions in mempool.

HTTP Request

GET https://api.bitails.io/mempool/transactions

URL Parameters

Parameter Description
from Starting index
limit Number of transactions to retrieve

Network

Get Network Stats

  
curl "https://api.bitails.io/network/stats"

The above command returns JSON structured like this:


  [
    {
    "daily": "{",
    "transactions": 1858986,
    "tpsAverage": 21.759002588863734,
    "blocks": 140,
    "blockAverageTime": 610,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    },
    {
    "weekly": "{",
    "transactions": 1858986,
    "tpsAverage": 21.759002588863734,
    "blocks": 140,
    "blockAverageTime": 610,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    },
    {
    "monthly": "{",
    "transactions": 1858986,
    "tpsAverage": 21.759002588863734,
    "blocks": 140,
    "blockAverageTime": 610,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    },
    {
    "yearly": "{",
    "transactions": 1858986,
    "tpsAverage": 21.759002588863734,
    "blocks": 140,
    "blockAverageTime": 610,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    },
    {
    "alltime": "{",
    "transactions": 1858986,
    "tpsAverage": 21.759002588863734,
    "blocks": 140,
    "blockAverageTime": 610,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    },
]
 

This endpoint retrieves the network stats.

HTTP Request

GET https://api.bitails.io/network/stats

Get Network Info

  
curl "https://api.bitails.io/network/info"

The above command returns JSON structured like this:


    {
    "blocks": 747778,
    "bestblockhash": "000000000000000009103cdfe9355853a1653148d5be978141d31f7bf2786cee",
    "chainwork": "00000000000000000000000000000000000000000139ace7839b1aef60d83f3c",
    "difficulty": 74430838267.01804,
    "mediantime": 1657539582,
    "blockAverageSize": 120234565,
    "size": 18810864256,
    }

This endpoint retrieves the network info.

HTTP Request

GET https://api.bitails.io/network/info

Download

Download Transaction


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}"

The above command returns the transaction in binary and the following is one example on how to get the data:



  function bufferToHex (buffer) {
    return [...new Uint8Array (buffer)]
    .map (b => b.toString (16).padStart (2, "0"))
    .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914',
     {
          responseType: 'arraybuffer',
          headers: {
          'Content-Type': 'application/gzip'
     }
  })
  .then(async response => {
      console.log(bufferToHex(response.data));
  })
  .catch(error => {
      console.log({error});
});








This endpoint retrieves raw transaction data.

HTTP Request

GET https://api.bitails.io/download/tx/{txid}

Parameter Description
txid

Download Transaction in Hex


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}/hex"

The above command returns the transaction in hex and the following is one example on how to get the data:



  function bufferToHex (buffer) {
    return [...new Uint8Array (buffer)]
    .map (b => b.toString (16).padStart (2, "0"))
    .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914/hex',
     {
          responseType: 'arraybuffer',
          headers: {
          'Content-Type': 'application/gzip'
     }
  })
  .then(async response => {
      console.log(bufferToHex(response.data));
  })
  .catch(error => {
      console.log({error});
});








This endpoint retrieves raw transaction data in Hex.

HTTP Request

GET https://api.bitails.io/download/tx/{txid}/hex

Parameter Description
txid

Download Transaction Output


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}/output/{outputIndex}"

The above command returns the transaction output in binary, the following is one example on how to get the data:


function bufferToHex (buffer) {
      return [...new Uint8Array (buffer)]
      .map (b => b.toString (16).padStart (2, "0"))
      .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914/output/0',
       {
            responseType: 'arraybuffer',
            headers: {
            'Content-Type': 'application/gzip'
       }
    })
    .then(async response => {
        console.log(bufferToHex(response.data));
    })
    .catch(error => {
        console.log({error});
});










This endpoint retrieves specific transaction output( No need to download extra information).

HTTP Request

GET https://api.bitails.io/download/tx/{txid}/output/{outputIndex}

Parameter Description
txid
output Output index

Download Transaction Output in Hex


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}/output/{outputIndex}/hex"

The above command returns the transaction output in Hex, the following is one example on how to get the data:


function bufferToHex (buffer) {
      return [...new Uint8Array (buffer)]
      .map (b => b.toString (16).padStart (2, "0"))
      .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914/output/0/hex',
       {
            responseType: 'arraybuffer',
            headers: {
            'Content-Type': 'application/gzip'
       }
    })
    .then(async response => {
        console.log(bufferToHex(response.data));
    })
    .catch(error => {
        console.log({error});
});










This endpoint retrieves specific transaction output in Hex( No need to download extra information).

HTTP Request

GET https://api.bitails.io/download/tx/{txid}/output/{outputIndex}/hex

Parameter Description
txid
output Output index

Download Transaction Input


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}/input/{inputIndex}"

The above command returns the transaction input in binary, the following is one example on how to get the data:


function bufferToHex (buffer) {
      return [...new Uint8Array (buffer)]
      .map (b => b.toString (16).padStart (2, "0"))
      .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914/input/0',
       {
            responseType: 'arraybuffer',
            headers: {
            'Content-Type': 'application/gzip'
       }
    })
    .then(async response => {
        console.log(bufferToHex(response.data));
    })
    .catch(error => {
        console.log({error});
});










This endpoint retrieves specific transaction input( No need to download extra information).

HTTP Request

GET https://api.bitails.io/download/tx/{txid}/input/{inputIndex}

Parameter Description
txid
input Input index

Download Transaction Input in Hex


# 40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914 
curl "https://api.bitails.io/download/tx/{txid}/input/{inputIndex}/hex"

The above command returns the transaction input in Hex, the following is one example on how to get the data:


function bufferToHex (buffer) {
      return [...new Uint8Array (buffer)]
      .map (b => b.toString (16).padStart (2, "0"))
      .join ("");
}
axios.get('https://api.bitails.io/download/tx/40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914/input/0/hex',
       {
            responseType: 'arraybuffer',
            headers: {
            'Content-Type': 'application/gzip'
       }
    })
    .then(async response => {
        console.log(bufferToHex(response.data));
    })
    .catch(error => {
        console.log({error});
});










This endpoint retrieves specific transaction input in Hex( No need to download extra information).

HTTP Request

GET https://api.bitails.io/download/tx/{txid}/input/{inputIndex}/hex

Parameter Description
txid
input Input index

Search

Search Blockchain


curl "https://api.bitails.io/search?q={text}"

The above command returns JSON structured like this:


  {
    "ops": {
      "from": 0,
      "limit": 10,
      "total": 1400,
      "remain": 1390,
      "results":[
      {
      "txid": "40ff70b97334699d71a552ab5ea97c996fa8d64a9e0dc0041ec1701b10ed6914",
      "n": 0,
      "time": ,
      "highlight": [
      "Upfile-v1data:text/plain;base64,dGhpcyBpcyBhIHRlc3QgRmlsZQ==Upfile-v1"
       ]
      }
    ]
  }
}

This endpoint retrieves transactions including the search parameter.

HTTP Request

GET https://api.bitails.io/search?q={text}

Parameter Description
type all, ops, tx, block, scripthash, address
from Starting index
limit Ending index
fromTime Epoch
toTime Epoch

Socket

Fire up a socket and watch the network! A perfect tool for monitoring blockchain in real-time. It can be used for IoT devices, wallets and many other use cases.

Mempool Info


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('mempool',info => console.log(info))






Get mempool info in a 5 second interval

Topic

mempool

Watch All Transactions


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('tx', (data) => {
console.log(data);
});






Watch the network for all the transactions(different in output comparing to 'address' and 'scripthash' topics).

Topic

tx

Watch a Specific Transaction


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('tx-9e8ea17aa1fd450bf2e0ff41891e05286ba117d08f207f508094a2b1e0e7669d', (data) => {
console.log(data);
});






Watch the network for a specific transaction.

Topic

tx-{txid}

Watch all Addresses


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('lock-address', (data) => {
console.log(data);
});





Watch the network for all the addresses(different in output comparing to 'tx' and 'scripthash' topics).

Topic

lock-address

Lock to Address


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('lock-address-18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e', (data) => {
console.log(data);
});





This subscribes to a list of all the locked UTXOs (Unspent Transaction Outputs) associated with a specific address. It is triggered whenever the address is included in the outputs of a transaction, indicating that a new UTXOs associated with that address is created.

Topic

lock-address-{address}

Watch All Scripthashes


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('lock-scripthash', (data) => {
console.log(data);
});





Watch the network for all the scripthashes(different in output comparing to 'tx' and 'address' topics).

Topic

lock-scripthash

Lock to Scripthash


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('lock-scripthash-e4f725c7f7a95838f3fc8c138b7d5ce19dfbb8cd6cb9cb37f590533855dba399', (data) => {
console.log(data);
});





This subscribes to a list of all the locked UTXOs (Unspent Transaction Outputs) associated with a specific scripthash. It is triggered whenever the scripthash is included in the outputs of a transaction, indicating that a new UTXOs associated with that scripthash is created.

Topic

lock-scripthash-{scripthash}

Spent UTXOs on All Addresses


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('spent-address', (data) => {
console.log(data);
});





This endpoint lists all the spent UTXOs of any addresses.

Topic

spent-address

Spent UTXOs from an Address


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('spent-address-1GhhT4dXpqdtum9pS2Rqzbuyjm5gNDUHEU', (data) => {
console.log(data);
});





This subscribes to a list of all the spent UTXOs (Unspent Transaction Outputs) associated with a specific address. It is triggered whenever the address is included in the inputs of a transaction, indicating that the UTXOs associated with that address have been spent.

Topic

spent-address-{address}

Spent UTXOs on All scripthashes


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('spent-scripthash', (data) => {
console.log(data);
});





This endpoint lists all the spent UTXOs of any scripthashes.

Topic

spent-scripthash

Spent UTXOs from a Scripthash


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('spent-scripthash-e4f725c7f7a95838f3fc8c138b7d5ce19dfbb8cd6cb9cb37f590533855dba399', (data) => {
console.log(data);
});





This subscribes to a list of all the spent UTXOs (Unspent Transaction Outputs) associated with a specific scripthash. It is triggered whenever the scripthash is included in the inputs of a transaction, indicating that the UTXOs associated with that scripthash have been spent.

Topic

spent-scripthash-{scripthash}

Notify When the UTXO is Spent


const { io } = require('socket.io-client')
const endpoint ='https://api.bitails.io/global'
const socket = io(endpoint, { transports: ['websocket']})
socket.connect()
socket.on('utxo-spent-9e8ea17aa1fd450bf2e0ff41891e05286ba117d08f207f508094a2b1e0e7669d_0', (data) => {
console.log(data);
});





This endpoint notifies the user when the UTXO is spent.

Topic

utxo-spent-{txid_outputIndex}

Stas Protocol

Get Token-based UTXOs of an Address


curl "https://api.bitails.io/address/1AMzdZFfkJC7PnxXQndCPKp2q2v8TZSW9E/tokens/unspent?from=0&limit=10"

The above command returns JSON structured like this:


  {
    "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
    "utxos": [
    {
    "redeemAddr": "string",
    "symbol": "string",
    "txid": "string",
    "index": 0,
    "script": "string",
    "amount": 2000,
    }
    ]
  }

This endpoint retrieves unspent outputs(Stas-UTXOs) of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/tokens/unspent?from=0&limit=10

Parameter Description
address
from
limit

Get Token-based UTXOs of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/tokens/unspent/multi?from=0&limit=10" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
 {
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  "utxos": [
   {
   "redeemAddr": "string",
   "symbol": "string",
   "txid": "string",
   "index": 0,
   "script": "string",
   "amount": 2000,
   }
  ] 
 },
 {
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  "utxos": [
   {
   "redeemAddr": "string",
   "symbol": "string",
   "txid": "string",
   "index": 0,
   "script": "string",
   "amount": 2000,
   }
  ] 
 }
] 

This endpoint retrieves unspent outputs(Stas-UTXOs) of multiple addresses.

HTTP Request

POST https://api.bitails.io/address/tokens/unspent/multi?from=0&limit=10

Parameter Description
from
limit

The body of the POST request is in the following format:

{"addresses": ["address1", "address2", ...]}

Get UTXOs of a Token in an Address


  curl "https://api.bitails.io/address/mm3SVBJwqRi6fR2DwfLQ5arFLeJHXeuF91/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5/unspent?from=0&limit=10"

The above command returns JSON structured like this:


  {
      "address": "mm3SVBJwqRi6fR2DwfLQ5arFLeJHXeuF91",
      "utxos": [
      {
      "redeemAddr": "string",
      "symbol": "string",
      "txid": "string",
      "index": 0,
      "script": "string",
      "amount": 1000,
    }
  ]
  }
   
  

This endpoint retrieves the UTXOs of a specific token binded to a specific address.

HTTP Request

GET https://api.bitails.io/address/{address}/token/{tokenID}/symbol/{symbol}/unspent?from=0&limit=10

Parameter Description
address
tokenID
symbol
from
limit

Get UTXOs of a Token in Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5/unspent?from=0&limit=10" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
 {
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  "utxos": [
   {
   "redeemAddr": "string",
   "symbol": "string",
   "txid": "string",
   "index": 0,
   "script": "string",
   "amount": 2000,
   }
  ] 
 },
 {
  "address": "18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e",
  "utxos": [
   {
   "redeemAddr": "string",
   "symbol": "string",
   "txid": "string",
   "index": 0,
   "script": "string",
   "amount": 2000,
   }
  ] 
 }
] 

This endpoint retrieves the UTXOs of a specific token binded to multiple addresses.

HTTP Request

POST https://api.bitails.io/address/token/{tokenID}/symbol/{symbol}/unspent?from=0&limit=10

Parameter Description
tokenID
symbol
from
limit

The body of the POST request is in the following format:

{"addresses": ["address1", "address2", ...]}

Get Token-based Balance of an Address


curl "https://api.bitails.io/address/mm3SVBJwqRi6fR2DwfLQ5arFLeJHXeuF91/tokens/balance"

The above command returns JSON structured like this:


[
   {
    "redeemAddr": "string",
    "symbol": "string",
    "image": "string",
    "protocol": "string",
    "balance": 2000,
   }
] 

This endpoint retrieves the Token-based balance of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/tokens/balance

Parameter Description
address

Get Token-based Balance of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/tokens/balance/multi" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
    {
        "redeemAddr": "string",
        "symbol": "string",
        "image": "string",
        "protocol": "string",
        "balance": 2000,
    }
] 

This endpoint retrieves the Stas-based balance of multiple addresses.

HTTP Request

POST https://api.bitails.io/address/tokens/balance/multi

The body of the POST request is in the following format:

{"addresses": ["address1", "address2", ...]}

Get Token-based History of an Address


  curl "https://api.bitails.io/address/18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e/history/token?from=0&limit=10"

The above command returns JSON structured like this:


  [
     {
      "txid": "string",
      "tokenId": "string",
      "symbol": "string",
      "inputSatoshis": 0,
      "outputsSatoshis": 0,
      "time": 0,
     }
  ] 
  

This endpoint retrieves the Stas-based history of an address.

HTTP Request

GET https://api.bitails.io/address/{address}/history/token?from=0&limit=10

Parameter Description
address
from
limit

Get a Token's History of an Address


  curl "https://api.bitails.io/address/mm3SVBJwqRi6fR2DwfLQ5arFLeJHXeuF91/history/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5?from=0&limit=10"

The above command returns JSON structured like this:


  [
     {
      "txid": "string",
      "tokenId": "string",
      "symbol": "string",
      "inputSatoshis": 0,
      "outputsSatoshis": 0,
      "time": 0,
     }
  ] 
  

This endpoint retrieves the history of a specific token binded to an address.

HTTP Request

GET https://api.bitails.io/address/{address}/history/token/{tokenID}/symbol/{symbol}?from=0&limit=10

Parameter Description
address
tokenID
symbol
from
limit

Get Token-based History of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/history/token/multi?from=0&limit=10" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
    {
        "txid": "string",
        "tokenID": "string",
        "symbol": "string",
        "inputSatoshis": 0,
        "outputsSatoshis": 0,
        "time": 0,
    }
] 

This endpoint retrieves the Stas-based tokens history of multiple addresses.

HTTP Request

POST https://api.bitails.io/address/history/token/multi?from=0&limit=10

Parameter Description
from
limit

The body of the POST request is in the following format:

{"addresses": ["address1", "address2", ...]}

Get a Token's History of Multiple Addresses


  curl --location --request POST "https://api.bitails.io/address/history/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5/multi?from=0&limit=10" \
--header "Content-Type: application/json" \
--data "{\"addresses\": [\"18C5qX7sM98gKtgGqTAXTa53dnbyrSkx6e\", \"17F5qX7sM88gKtgGqTAXTa53dnbyrSkx6e\"]}"

The above command returns JSON structured like this:


[
    {
        "txid": "string",
        "tokenID": "string",
        "symbol": "string",
        "inputSatoshis": 0,
        "outputsSatoshis": 0,
        "time": 0,
    }
] 

This endpoint retrieves a specific token's history binded to multiple addresses.

HTTP Request

POST https://api.bitails.io/address/history/token/{tokenID}/symbol/{symbol}/multi?from=0&limit=10

Parameter Description
tokenID
symbol
from
limit

The body of the POST request is in the following format:

{"addresses": ["address1", "address2", ...]}

Get a Token Details


  curl "https://api.bitails.io/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5"

The above command returns JSON structured like this:


{
    "contractTxs":
      [
        "string"
      ],
    "issuanceTxs":
      [
        "string"
      ],
    "name": "string",
    "tokenId": "string",
    "protocolId": "string",
    "symbol": "string",
    "description": "string",
    "image": "string",
    "totalSupply": 0,
    "decimals": 0,
    "satsPerToken": 0,
  }
  

This endpoint retrieves the details of a token by token ID and symbol.

HTTP Request

GET https://api.bitails.io/token/{tokenID}/symbol/{symbol}

Parameter Description
tokenID
symbol

Get a Token Transactions History


  curl "https://api.bitails.io/token/3c9ca41f66c5b20d6aecf198fe9c35b3c5bf51bc/symbol/ABC5/tx"

The above command returns JSON structured like this:


    {
      "redeemAddr": "string",
      "tokenId": "string",
      "symbol": "string",
      "txs":[
      "string"
      ]  
    }
  

This endpoint retrieves the transaction history of a token by token ID and symbol.

HTTP Request

GET https://api.bitails.io/token/{tokenID}/symbol/{symbol}/tx

Parameter Description
tokenID
symbol

Token Existence Check


  curl "https://api.bitails.io/token/tx/0b616f44f8ab16614d334be5dab53fa57d10058db991f774b700632a2565817d/out/0/exists"

The above command returns JSON structured like this:


    {
      "exists": true,
      "isStas": true,
      "spent": false,
    }
  

This endpoint retrieves the existence of a output of a transaction, its relation to Stas Protocol, and its spent/unspent status.

HTTP Request

GET https://api.bitails.io/token/tx/{txid}/out/{outputIndex}/exists

Parameter Description
txid
outputIndex

Tokens List


  curl "https://api.bitails.io/token/list"

The above command returns JSON structured like this:


    [
      {
        "tokenId": "aeded8ce7e2d25544be184ceb16875ede4711425",
        "symbol": "USDXS",
        "imageUrl": "string",
        "owners": 676,
        "circulationSupply": 4756839,
        "utxos": 5432,
      },
      {
        "tokenId": "aeded8ce7e2d25544be184ceb16875ede4711425",
        "symbol": "USDXS",
        "imageUrl": "string",
        "owners": 676,
        "circulationSupply": 4756839,
        "utxos": 5432,
      },
      {
        "tokenId": "aeded8ce7e2d25544be184ceb16875ede4711425",
        "symbol": "USDXS",
        "imageUrl": "string",
        "owners": 676,
        "circulationSupply": 4756839,
        "utxos": 5432,
      }
    ]
  

This endpoint retrieves the STAS protocol top tokens based on the owners.

HTTP Request

GET https://api.bitails.io/token/list

Parameter Description
txid
outputIndex

ESV Server

To access ESV server try esv.bitails.io at TCP: 50001 and TLS: 50002

To run your own server or controbution to the project visit the Github page.

Errors

Error 404

As obvious as it is, a 404 error is generated when the page is not found

Error 500

Internal Error - And we are probably checking the system to see what happened!

Error 503

Scheduled Maintenance!

Contact Us

Contact Info

The following is the contact information for Bitails:

Thank you for using Bitails! (。♥‿♥。)🍻