Skip to content

REST v1 to v2 upgrade

Gabriel Cardona edited this page May 20, 2019 · 1 revision

Data Changes

The data format is slightly different fo address utxo and unconfirmed endpoints. In v1 the returned data is formatted like so:

curl -X GET "https://rest.bitcoin.com/v1/address/utxo/bitcoincash:qzstp4swtxg40rkn0j769vta3vkwyw4jj5fmdl2vtm" -H "accept: application/json"

[
  {
    txid: "eed7a318c696ed608387390dbc05033ed29c9c4e5918abeddaa86553b28c7dba",
    vout: 1,
    scriptPubKey: "76a914a0b0d60e5991578ed37cbda2b17d8b2ce23ab29588ac",
    amount: 0.00001537,
    satoshis: 1537,
    height: 551105,
    confirmations: 31640,
    legacyAddress: "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF",
    cashAddress: "bitcoincash:qzstp4swtxg40rkn0j769vta3vkwyw4jj5fmdl2vtm"
  }
]

In v2 the data is formatted like so:

curl -X GET "https://rest.bitcoin.com/v2/address/utxo/bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c" -H "accept: application/json"

{
  "utxos": [
    {
      "txid": "41e9a118765ecf7a1ba4487c0863e23dba343cc5880381a72f0365ac2546c5fa",
      "vout": 0,
      "amount": 0.01,
      "satoshis": 1000000,
      "height": 577125,
      "confirmations": 5620
    }
  ],
  "legacyAddress": "1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W",
  "cashAddress": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
  "slpAddress": "simpleledger:qzs02v05l7qs5s24srqju498qu55dwuj0c20jv8m5x",
  "scriptPubKey": "76a914a0f531f4ff810a415580c12e54a7072946bb927e88ac"
}

We moved the addresses and scriptPubKey from the indivdual UTXO to the parent object.

Single and Bulk Endpoints

In REST v2 we have single and bulk endpoints for each requests type. For example if you want to get address details for a single address you would use the address details single endpoint. If however you need address details for up to 20 addresses per request you would use the address details bulk endpoint.

Rate limits

Each endpoint has a rate-limit of 60 requests per minute. You can check the following HTTP Response headers to see how many requests you have remaining

 x-ratelimit-limit: 60
 x-ratelimit-remaining: 59

Bulk endpoints can accepts up to 20 items per request in the POST body. We're building a pro-tier service where each endpoint can have up to 600 requests per minute and each bulk endpoint can accepts up to 100 items per request. Please contact me if you're interested in being part of this paid pro-tier.

Deprecated endpoints

Our developer platform is no longer supporting the Wormhole Protocol. As such the following endpoint are deprecated and completely removed in v2.

dataRetrieval

payloadCreation