Exchange Rate

Contents

We get prices from the biggest and the most popular exchange platforms like:coinbase.com, gdax.com, bitstamp.com, bitfinex.com and store them in our database. You can get the current price with different currencies by Ticker API, convert USD to BTC via Tobtc API and get History by timestamp.

Ticker

Ticker is a current Market Prices and exchanges rate API.

Request:

currency btc, ltc Optional

currency=btc by default

Success Response Reference

Returns a JSON object with the currency codes as keys. "15m" is the 15 minutes delayed market price, "last" is the most recent market price, "symbol" is the currency symbol.

{symbol}, array Currency symbol code ISO 4217. Required
{last}, string Recent market price for last period. Required
{amount}, decimal Exchange rate. Required
Response example:

Error Response

Playground and Code examples:


Format and Variables:
Parameter Experiment with a value

Currency

 
Response from server:
635.86

ToBTC

Converts the value in the provided currency to a current exchange rate of bitcoins. This interface returns the amount in bitcoins, not Satoshis.

Request:

{currency}, string Сurrency of exchange
USD, EUR, GBP, RUB.
Required
{value}, DECIMAL(13,2) Velue in currency
Real amount with decimals.
Required

Success Response Reference

Response example:
0.02284

Error Response

Playground and Code examples:

<?php
  $data = file_get_contents("https://apirone.com/api/v1/tobtc?currency=USD&value=100");
  echo $data;
?>
Format and Variables:
Parameter Experiment with a value

Currency

Value

Execute
Response from server:
0.02284

ToLTC

Works same as tobtc interface but for Litecoin cryptocurrency.

Request:

{currency}, string Сurrency of exchange
USD, EUR, GBP, RUB.
Required
{value}, DECIMAL(13,2) Velue in currency
Real amount with decimals.
Required

History Rate

You can get the history of bitcoin exchange rates by sending currency parameter and Unix timestamp. But if you want to get early exchange rate, don't forget that bitcoin network started only on 3 January 2009, and the official exchangers came much later. The exchange rates are stored at intervals of 15 minutes. The request for the timestamp will be rounded up to the nearest 15-minute interval.

Request:

{currency}, string Сurrency of exchange
USD, EUR, GBP, RUB.
Required
{timestamp}, integer Unix timestamp Required
{crypto}, string BTC, LTC Optional, BTC by default

Success Response Reference

Example:

635.86

Error Response

Playground and Code examples:

<?php
  $data = file_get_contents("https://apirone.com/api/v1/rate?currency=USD&timestamp=1562609674&crypto=btc");
  echo $data;
?>
Format and Variables:
Parameter Experiment with a value

Currency

Timestamp

Crypto Currency

Execute
Response from server:
635.86