NAV Navbar
cURL JavaScript PHP

Introduction

Welcome to the Bithomp API!

Bithomp API endpoints will give you access to information on XRPL addresses, usernames, validators, services and more.

We have language bindings in Shell, JavaScript and PHP. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Our services used by:

If we're missing your logo here, contact us.

Changelog

2nd February 2020

Added three new API endpoints:

22th January 2020

A query parameter forensic was added to the next API end-points:

20th January 2020

Added three new API endpoints:

17th January 2020

A new endpoint added:

11th January 2020

Added two API endpoints:

27th December 2019

Query parameters: verifiedDomain and hashicon were added in the API endpoint:

17th December 2019

Added two API endpoints:

Direct URL examples

XRPL Explorer

Validator pages

Username registration

XRPL account activation

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
// With javascript, you can just pass the correct header with each request
// Include jquery in order to use $.ajax or rewrite to vanila.js

function bithompRequest(url, callback) {
  $.ajax({
     url: url,
     type: "GET",
     contentType: "application/json",
     headers: {
        "x-bithomp-token": "abcd-abcd-0000-abcd-0123abcdabcd"
     },
     success: function(result) {
        callback(result);
     },
     error: function(error) {
        console.log(error);
        callback({"error": "error occurred"});
     }
  });
}

bithompRequest("api_endpoint_here", callback);
//replace callback with your function to process a received json

function curl_bithomp($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER,
        array('x-bithomp-token:abcd-abcd-0000-abcd-0123abcdabcd')
    );
    $output = curl_exec($ch);
    curl_close($ch);
    return $output;
}

print curl_bithomp("api_endpoint_here")

Make sure to replace abcd-abcd-0000-abcd-0123abcdabcd with your API key.

In order to use our APIs you need to request an API key via the following form.

Bithomp expects for the API key to be included in all API requests to the server in a header that looks like the following:

x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd

Get information for ONE

Address

curl "https://bithomp.com/api/v2/address/rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?service=true&username=true&parent=true&verifiedDomain=true&forensic=true"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getAddressInfo(json) {
  console.log(json)
}
bithompRequest("https://bithomp.com/api/v2/address/rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?service=true&username=true&parent=true&verifiedDomain=true&forensic=true", getAddressInfo);
$addressInfo = curl_bithomp("https://bithomp.com/api/v2/address/rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?service=true&username=true&parent=true&verifiedDomain=true&forensic=true");
print $addressInfo;

The above command returns JSON structured like this:

{
  "address": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
  "xAddress": "XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD2gYsjNFQLKYW33DzBm",
  "inception": 1513126312,
  "username": "xrptipbot",
  "service": {
    "name": "XRP Tip Bot",
    "domain": "xrptipbot.com",
    "socialAccounts": {
      "twitter": "xrptipbot"
    }
  },
  "forensic": 0,
  "verifiedDomain": "xrptipbot.com",
  "parent": {
    "address": "rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv",
    "xAddress": "XV3oNHx95sqdCkTDCBCVsVeuBmvh2du1vBfJR24EqdgwHDW",
    "inception": 1481884572,
    "service": {
      "name": "Bitstamp",
      "domain": "bitstamp.net",
      "socialAccounts": {
        "twitter": "Bitstamp",
        "facebook": "Bitstamp"
      }
    },
    "forensic": 0
  }
}

This endpoint retrieves information for a requested XRPL address.

HTTP Request

GET https://bithomp.com/api/v2/address/<address>

URL Parameters

Parameter Description
address The XRPL address, can be old r-address or a new X-address

Query Parameters

Parameter Default Description
service false If set to true, the result will also include Service details.
username false If set to true, the result will also include a username (rippletrade or bithomp).
verifiedDomain false If set true, the result will include a verifiedDomain if such exists.
forensic false If set to true, the result will include forensic status: 1, 2 or 3 from (the xrpforensics list), returns 0 if not found, returns 3 if found in bithomp's blacklist.
hashicon false If set true, the result will include hashicon which can be used in img's src="" or in css, as background's url. (The icon is the same for x-address and r-address, such hashicons used in ToastWallet and Bithomp.)
parent false If set to true, the result will include the same info for a parent account.

Username

curl "https://bithomp.com/api/v2/username/xrptipbot?service=true&parent=true&verifiedDomain=true&forensic=true"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getData(json) {
  console.log(json)
}
bithompRequest("https://bithomp.com/api/v2/username/xrptipbot?service=true&parent=true&verifiedDomain=true&forensic=true", getData);
$data = curl_bithomp("https://bithomp.com/api/v2/username/xrptipbot?service=true&parent=true&verifiedDomain=true&forensic=true");
print $data;

The above command returns JSON structured like this:

{
  "address": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
  "xAddress": "XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD2gYsjNFQLKYW33DzBm",
  "inception": 1513126312,
  "username": "xrptipbot",
  "service": {
    "name": "XRP Tip Bot",
    "domain": "xrptipbot.com",
    "socialAccounts": {
      "twitter": "xrptipbot"
    }
  },
  "forensic": 0,
  "verifiedDomain": "xrptipbot.com",
  "parent": {
    "address": "rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv",
    "xAddress": "XV3oNHx95sqdCkTDCBCVsVeuBmvh2du1vBfJR24EqdgwHDW",
    "inception": 1481884572,
    "service": {
      "name": "Bitstamp",
      "domain": "bitstamp.net",
      "socialAccounts": {
        "twitter": "Bitstamp",
        "facebook": "Bitstamp"
      }
    },
    "forensic": 0
  }
}

This endpoint retrieves information for a requested Username.

HTTP Request

GET https://bithomp.com/api/v2/username/<username>

URL Parameters

Parameter Description
username A bithomp or an old rippletrade username

Query Parameters

Parameter Default Description
service false If set to true, the result will also include Service details.
verifiedDomain false If set true, the result will include a verifiedDomain if such exists.
forensic false If set to true, the result will include forensic status: 1, 2 or 3 from (the xrpforensics list), returns 0 if not found, returns 3 if found in bithomp's blacklist.
hashicon false If set true, the result will include hashicon which can be used in img's src="" or in css, as background's url. (The icon is the same for x-address and r-address, such hashicons used in ToastWallet and Bithomp.)
parent false If set to true, the result will include the same info for a parent account.

Validator

curl "https://bithomp.com/api/v2/validator/nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getValidatorAddress(json) {
  console.log(json.publicKey + " validator's XRPL address: ", json.address);
}
bithompRequest("https://bithomp.com/api/v2/validator/nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA", getValidatorAddress);
$validatorAddress = curl_bithomp("https://bithomp.com/api/v2/validator/nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA");
print $validatorAddress;

The above command returns JSON structured like this:

{
  "publicKey": "nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
  "address": "rKontEGtDju5MCEJCwtrvTWQQqVAw5juXe"
}

This endpoint retrieves a XRPL address of a specific validator computed from the validator public key

HTTP Request

GET https://bithomp.com/api/v2/validator/<validatorPublicKey>

URL Parameters

Parameter Description
validatorPublicKey The public key of the validator to retrieve

Get information of ALL

Services

curl "https://bithomp.com/api/v2/services"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getData(json) {
  console.log(json)
}
bithompRequest("https://bithomp.com/api/v2/services", getData);
$data = curl_bithomp("https://bithomp.com/api/v2/services");
print $data;

The above command returns JSON structured like this:

{
  "total": 467,
  "lastUpdate": 1579417546,
  "services": [
    {
      "name": "Bithomp",
      "domain": "bithomp.com",
      "socialAccounts": {
        "twitter": "bithomp",
        "youtube": "channel/UCTvrMnG-Tpqi5FN9zO7GcWw",
        "instagram": "bithomp"
      },
      "addresses": [
        {
          "address": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z"
        },
        {
          "address": "rnk3N5hHnLS6nWncNh2R4D2ATiuEicjxXo"
        },
        {
          "address": "rhUYLd2aUiUVYkBZYwTc5RYgCAbNHAwkeZ",
          "name": "Bithomp activation"
        },
        {
          "address": "rBithomp3UNknnjo8HKNfyS5MN4kdPTZpW"
        },
        {
          "address": "rBithomp4vj5E2kUebx7tVwipBueg55XxS",
          "name": "Bithomp donations"
        },
        {
          "address": "rBithompKtixswR4bknJqYaxnm7yRhGYFq",
          "name": "Bithomp username"
        },
        {
          "address": "rKontEGtDju5MCEJCwtrvTWQQqVAw5juXe",
          "name": "Bithomp validator"
        }
      ]
    },
    {

    }
  ]
}

This endpoint retrieves a list of identified services.

HTTP Request

GET https://bithomp.com/api/v2/services

Response Format

Field Value Description
total Integer The amount of identified services.
lastUpdate Integer UNIX timestamp of the last data update.
services Array Array of services.
services[].name String A name of a service.
services[].domain String A domain of a service.
services[].socialAccounts Object An object with social account of a service. (twitter, youtube, instagram, facebook, medium, telegram, linkedin, reddit)
services[].addresses Array An array of service's addresses. Each address can have it's own (more specific) name, domain, socialAccounts.

Addresses from Services

curl "https://bithomp.com/api/v2/services/addresses"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getData(json) {
  console.log(json)
}
bithompRequest("https://bithomp.com/api/v2/services/addresses", getData);
$data = curl_bithomp("https://bithomp.com/api/v2/services/addresses");
print $data;

The above command returns JSON structured like this:

{
  "total": 1824,
  "lastUpdate": 1579417546,
  "addresses": {
    "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY": {
      "name": "XRP Tip Bot",
      "domain": "xrptipbot.com",
      "socialAccounts": {
        "twitter": "xrptipbot"
      }
    },
    "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV": {
      "name": "Ripple",
      "domain": "ripple.com",
      "socialAccounts": {
        "twitter": "Ripple",
        "facebook": "ripplepay",
        "linkedin": "ripple-labs"
      }
    },
  }
}

This endpoint retrieves a list of all identified service addresses.

HTTP Request

GET https://bithomp.com/api/v2/services/addresses

Response Format

Field Value Description
total Integer The amount of identified addresses.
lastUpdate Integer UNIX timestamp of the last data update.
addresses Object Object with identified addresses.
addresses.ADDRESS.name String A name of the ADDRESS's service.
addresses.ADDRESS.domain String A domain of the ADDRESS's service.
addresses.ADDRESS.socialAccounts Object An object with social account of the ADDRESS's service. (twitter, youtube, instagram, facebook, medium, telegram, linkedin, reddit)

Last update (services)

curl "https://bithomp.com/api/v2/services/lastUpdate"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function getData(json) {
  console.log(json)
}
bithompRequest("https://bithomp.com/api/v2/services/lastUpdate", getData);
$data = curl_bithomp("https://bithomp.com/api/v2/services/lastUpdate");
print $data;

The above command returns JSON structured like this:

{
  "lastUpdate": 1579527766,
  "totalServices": 475,
  "totalAddresses": 1832
}

This endpoint returns a timestamp of last DB update for services/addresses.

HTTP Request

GET https://bithomp.com/api/v2/services/lastUpdate

Response Format

Field Value Description
lastUpdate Integer UNIX timestamp of the last data update.
totalServices Integer The amount of identified services.
totalAddresses Integer The amount of identified addresses.

Transaction

Tx Lookup

curl "https://bithomp.com/api/v2/transaction/2D6894BCCA14919218576E8204E4715301989D98CAEDA304BB465949459972D3"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function printData(json) {
  console.log(JSON.stringify(json, undefined, 2));
}
bithompRequest("https://bithomp.com/api/v2/transaction/2D6894BCCA14919218576E8204E4715301989D98CAEDA304BB465949459972D3", printData);
$data = curl_bithomp("https://bithomp.com/api/v2/transaction/2D6894BCCA14919218576E8204E4715301989D98CAEDA304BB465949459972D3");
print $data;

The above command returns JSON structured like this:

{
  "type": "payment",
  "address": "rBRVqcXrm1YAbanngTxDfH15LNb6TjNmxk",
  "sequence": 98302,
  "id": "2D6894BCCA14919218576E8204E4715301989D98CAEDA304BB465949459972D3",
  "specification": {
    "source": {
      "address": "rBRVqcXrm1YAbanngTxDfH15LNb6TjNmxk",
      "maxAmount": {
        "currency": "XRP",
        "value": "31"
      },
      "tag": 1617004677
    },
    "destination": {
      "address": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z"
    }
  },
  "outcome": {
    "result": "tesSUCCESS",
    "timestamp": "2015-10-24T06:37:00.000Z",
    "fee": "0.020002",
    "balanceChanges": {
      "rBRVqcXrm1YAbanngTxDfH15LNb6TjNmxk": [
        {
          "currency": "XRP",
          "value": "-31.020002"
        }
      ],
      "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z": [
        {
          "currency": "XRP",
          "value": "31"
        }
      ]
    },
    "orderbookChanges": {},
    "ledgerVersion": 16658556,
    "indexInLedger": 4,
    "deliveredAmount": {
      "currency": "XRP",
      "value": "31"
    }
  }
}

This endpoint retrieves transaction details.
Page where it used on bithomp: https://bithomp.com/explorer/2D6894BCCA14919218576E8204E4715301989D98CAEDA304BB465949459972D3 .

HTTP Request

GET https://bithomp.com/api/v2/transaction/<id>

URL Parameters

Parameter Description
id Transaction id (hash)

Tx Decode

curl "https://bithomp.com/api/v2/transaction/decode/1200032280000000240000003241833237B8665D2F4E00135E8DE646589F68400000000000000C732103709723A5967EAAED571B71DB511D87FA44CC7CDDF827A37F457A25E14D862BCD74473045022100C6A6999BD33153C6A236D78438D1BFEEEC810CFE05D0E41339B577560C9143CA022074F07881F559F56593FF680049C12FC3BCBB0B73CE02338651522891D95886F981146078086881F39B191D63B528D914FEA7F8CA2293F9EA7C06636C69656E747D15426974686F6D7020746F6F6C20762E20302E302E337E0A706C61696E2F74657874E1F1"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function printData(json) {
  console.log(JSON.stringify(json, undefined, 2));
}
bithompRequest("https://bithomp.com/api/v2/transaction/decode/1200032280000000240000003241833237B8665D2F4E00135E8DE646589F68400000000000000C732103709723A5967EAAED571B71DB511D87FA44CC7CDDF827A37F457A25E14D862BCD74473045022100C6A6999BD33153C6A236D78438D1BFEEEC810CFE05D0E41339B577560C9143CA022074F07881F559F56593FF680049C12FC3BCBB0B73CE02338651522891D95886F981146078086881F39B191D63B528D914FEA7F8CA2293F9EA7C06636C69656E747D15426974686F6D7020746F6F6C20762E20302E302E337E0A706C61696E2F74657874E1F1", printData);
$data = curl_bithomp("https://bithomp.com/api/v2/transaction/decode/1200032280000000240000003241833237B8665D2F4E00135E8DE646589F68400000000000000C732103709723A5967EAAED571B71DB511D87FA44CC7CDDF827A37F457A25E14D862BCD74473045022100C6A6999BD33153C6A236D78438D1BFEEEC810CFE05D0E41339B577560C9143CA022074F07881F559F56593FF680049C12FC3BCBB0B73CE02338651522891D95886F981146078086881F39B191D63B528D914FEA7F8CA2293F9EA7C06636C69656E747D15426974686F6D7020746F6F6C20762E20302E302E337E0A706C61696E2F74657874E1F1");
print $data;

The above command returns JSON structured like this:

{
  "id": "9B124C14528ED14C0BDA17075A39B90ABED598B77A22DFEEBD913CAC07A513BC",
  "signedTransaction": {
    "TransactionType": "AccountSet",
    "Flags": 2147483648,
    "Sequence": 50,
    "EmailHash": "833237B8665D2F4E00135E8DE646589F",
    "Fee": "12",
    "SigningPubKey": "03709723A5967EAAED571B71DB511D87FA44CC7CDDF827A37F457A25E14D862BCD",
    "TxnSignature": "3045022100C6A6999BD33153C6A236D78438D1BFEEEC810CFE05D0E41339B577560C9143CA022074F07881F559F56593FF680049C12FC3BCBB0B73CE02338651522891D95886F9",
    "Account": "r9onCSkYP2tYcukw2KUHMZ1Sn5YixQCgmN",
    "Memos": [
      {
        "Memo": {
          "MemoType": "636C69656E74",
          "MemoData": "426974686F6D7020746F6F6C20762E20302E302E33",
          "MemoFormat": "706C61696E2F74657874"
        }
      }
    ]
  }
}

This endpoint decode a signed transaction.
Page on bithomp with the same decode function, but client-side: https://bithomp.com/submit/ .

HTTP Request

GET https://bithomp.com/api/v2/transaction/decode/<blob>

URL Parameters

Parameter Description
blob A signed transaction blob to decode

Tx Submit

curl -H "Content-Type: application/json"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
  --request POST
  --data '{"signedTransaction":"1200032280000000240000000368400000000000000C732103A71B44FD71C956C3CC0A540F2FBB577C4A300BC71244D86E4EB57220E58BFA26744730450221008D53E4188B39E8EF9953672B42C7ED3F7760F4B2FA51EC91A6EB0B693A6002B2022016384B9F552C75FD3BDE13C65E1CC3DA646AB10E3DD785EB2005620C6AF2C52B7710746573742E626974686F6D702E636F6D811485C536EFA7EAACCC51916E32FF720810A2226008F9EA7C06636C69656E747D16426974686F6D7020746F6F6C20762E20302E342E31317E0A706C61696E2F74657874E1F1","id":"BC35145B69F75FE5B41D6198D56203C2CFD2C1D968C09B09A37530CCB3AD2C6D"}'
  https://bithomp.com/api/v2/transaction/submit/
$.ajax({
   url: "https://bithomp.com/api/v2/transaction/submit/",
   type: "POST",
   contentType: "application/json",
   headers: {
      "x-bithomp-token": "abcd-abcd-0000-abcd-0123abcdabcd"
   },
   data: {
     "signedTransaction": "1200032280000000240000000368400000000000000C732103A71B44FD71C956C3CC0A540F2FBB577C4A300BC71244D86E4EB57220E58BFA26744730450221008D53E4188B39E8EF9953672B42C7ED3F7760F4B2FA51EC91A6EB0B693A6002B2022016384B9F552C75FD3BDE13C65E1CC3DA646AB10E3DD785EB2005620C6AF2C52B7710746573742E626974686F6D702E636F6D811485C536EFA7EAACCC51916E32FF720810A2226008F9EA7C06636C69656E747D16426974686F6D7020746F6F6C20762E20302E342E31317E0A706C61696E2F74657874E1F1",
     "id": "BC35145B69F75FE5B41D6198D56203C2CFD2C1D968C09B09A37530CCB3AD2C6D"
   },
   success: function(result) {
      console.log(JSON.stringify(result, undefined, 2));
   },
   error: function(error) {
      console.log(error);
   }
});

The above command returns JSON structured like one of those:

{
  "result": "tesSUCCESS",
  "id": "BC35145B69F75FE5B41D6198D56203C2CFD2C1D968C09B09A37530CCB3AD2C6D"
}

{
  "result": "terNO_ACCOUNT",
  "message": "The source account does not exist.",
  "id": "BC35145B69F75FE5B41D6198D56203C2CFD2C1D968C09B09A37530CCB3AD2C6D"
}

{
  "result": "terPRE_SEQ",
  "message": "Missing/inapplicable prior transaction.",
  "id": "BC35145B69F75FE5B41D6198D56203C2CFD2C1D968C09B09A37530CCB3AD2C6D"
}

This endpoint returns a final status of a submitted transaction.
Page where it used on bithomp: https://bithomp.com/explorer/?hwlogin .

HTTP Request

POST https://bithomp.com/api/v2/transaction/submit

POST Parameters

Parameter Description
id (Optional) A calculated hash of the signed transaction
signedTransaction A blob of signed transaction to submit

Historical data

Genesis

curl "https://bithomp.com/api/v2/genesis"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function printData(json) {
  console.log(JSON.stringify(json, undefined, 2));
}
bithompRequest("https://bithomp.com/api/v2/genesis", printData);
$data = curl_bithomp("https://bithomp.com/api/v2/genesis");
print $data;

The above command returns JSON structured like this:

{
  "count": 136,
  "inception": 1357010470,
  "ledger_index": 32570,
  "genesis_balance_all": 99999999999.99632,
  "balance_all": 483189349.682485,
  "balance_update": 1578499794,
  "genesis": [
    {
      "address": "rBKPS4oLSaV2KVVuHH8EpQqMGgGefGFQs7",
      "genesis_balance": 370,
      "genesis_index": 1,
      "balance": 20.009958
    },
    {
      "address": "rLs1MzkFWCxTbuAHgjeTZK4fcCDDnf2KRv",
      "genesis_balance": 10000,
      "genesis_index": 2,
      "rippletrade": "leotreasure",
      "balance": 4507.158497
    },
    {

    }
  ]
}

This endpoint retrieves a list of addresses from the first available ledger in XRPL history.
Page where it used on bithomp: https://bithomp.com/genesis.

HTTP Request

GET https://bithomp.com/api/v2/genesis

Response Format

Field Value Description
count Integer The amount of returned addresses.
inception Integer Inception UNIX timestamp.
ledger_index Integer Ledger index (the first available in history).
genesis_balance_all Float Sum of all balances in the ledger_index.
balance_all Float Sum of balances of those addresses on the balance_update time.
balance_update Integer UNIX timestamp of the last update of balances.
genesis Array Array of addresses in ledger_index.
genesis[].address String Address
genesis[].genesis_balance Float XRP balance on that genesis[].address on the time of inception.
genesis[].genesis_index Integer Index of the address in the ledger_index.
genesis[].rippletrade String Username that genesis[].address used on rippletrade.com.
genesis[].nickname String Username that genesis[].address used on bitcointalk.org or assign by Ripple (X.).
genesis[].balance Float XRP balance on that genesis[].address on the time of balance_update.

History of XRP price alerts

curl "https://bithomp.com/api/v2/price/xrp/alerts"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
function printData(json) {
  console.log(JSON.stringify(json, undefined, 2));
}
bithompRequest("https://bithomp.com/api/v2/price/xrp/alerts", printData);
$data = curl_bithomp("https://bithomp.com/api/v2/price/xrp/alerts");
print $data;

The above command returns JSON structured like this:

{
  "count": 50,
  "timestamp": 1578748266,
  "alerts": [
    {
      "currency": "btc",
      "change": "-10.07%",
      "timestamp_old": 1578344400,
      "timestamp_new": 1578415200,
      "rate_old": 0.00002959,
      "rate_new": 0.00002661
    },
    {
      "currency": "btc",
      "change": "+10.02%",
      "timestamp_old": 1578297600,
      "timestamp_new": 1578327600,
      "rate_old": 0.00002616,
      "rate_new": 0.00002878
    },
    {

    }
  ]
}

This endpoint retrieves a list of our XRP price alerts.
Page where it used on bithomp: https://bithomp.com/alerts.

HTTP Request

GET https://bithomp.com/api/v2/price/xrp/alerts

Response Format

Field Value Description
count Integer The amount of returned alert records.
timestamp Integer UNIX timestamp for a request.
alerts Array Array of alert records.
genesis[].currency String Currency (in XRP/currency pair).
genesis[].change String Price change percentage (ex.: +10.24%).
genesis[].timestamp_old Integer Unix timestamp in seconds for the price: genesis[].rate_old.
genesis[].timestamp_new Integer Unix timestamp in seconds for the price: genesis[].rate_new.
genesis[].rate_old Float The price at genesis[].timestamp_old.
genesis[].rate_new Float The price at genesis[].timestamp_new.

Errors

The Bithomp API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The requested data not allowed for your API key.
404 Not Found -- The data not found.
405 Method Not Allowed -- You tried to access API endpoint with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The data requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too often! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.