Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cryptare API

Overview

The Cryptare API gives access to the data used by the Cryptare iOS App. The initial versions of the app used a lot of the same data provided by this API, however each user requested data individually. At the time it made sense because the app was essentially a side project for myself. There was also no need for storage of the data. As the app grew, and the number of users started increasing, new features required access to the history of exchange market prices. There were several reasons why I felt the need for this API:

  • Majority of exchanges do not provide access to their history of market statistics. This API stores this data which is publicly available anyway.
  • Each exchange has their own API with different rules. This API standardizes it and removes the learning curve for developers.
  • Having each user of the app make a new request to the Exchange API naturally increases the load on the Exchange server. Instead, a scalable solution would be to make a single request to the Exchange API and serve the response data to all the users. This API fulfills this need.
  • Because the database is a Firebase Real-time database, observers can be set up to listen for changes in the database in real-time. This is ideal for the cryptocurrency environment, which changes practically every second.

Design

The result of the API calls will return some or all of the following fields. This depends on the data provided by the exchange.

FieldDescription
buy_priceCurrent buy (ask) price of the exchange
sell_priceCurrent sell (bid) price price of the exchange
max_24hrsHighest price in the past 24 hours
min_24hrsLowest price in the past 24 hours
vol_24hrs or coin_volume_24hrsVolume of coins transferred in the past 24 hours
vol_30daysVolume of coins transferred in the past 30 days
fiat_volume_24hrsAmount of fiat money transferred in the past 24 hours
timestampUNIX format timestamp of data entry

Coindesk ("INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR")

Coindesk is used to get the current price

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "JPY", "CNY", "SGD", "EUR", "ZAR"]

Zebpay

URL: https://atalwcryptare.firebaseio.com/zebpay.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPfZ4ioSx2LLNxlIX" : {
"buy_price" : 841715.0,
"sell_price" : 824881.0,
"timestamp" : 1.512322021542984E9,
"vol_24hrs" : 781.32573379
}

Zebpay URL: https://api.zebpay.com/api/v1/ticker?currencyCode=INR

Coinsecure

URL: https://atalwcryptare.firebaseio.com/coinsecure.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"]
"-L-R_7BcPPxe8I9tmz-p" : {
"buy_price" : 849998.0,
"coin_volume_24hrs" : 21.211,
"fiat_volume_24hrs" : 1.779931356E7,
"max_24hrs" : 850000.0,
"min_24hrs" : 830000.0,
"sell_price" : 841599.0,
"timestamp" : 1.51230798052585E9
}

Coinsecure URL: https://api.coinsecure.in/v1/exchange/ticker

Koinex

URL: https://atalwcryptare.firebaseio.com/koinex_BTC_INR.json?print=pretty

Koinex supports several altcoins. In the URL, replace COIN in koinex_COIN_INR with any one of these ["BTC", "BCH", "ETH", "LTC", "XRP"]. For Example, https://atalwcryptare.firebaseio.com/koinex_LTC_INR.json

  • Supported coins = ["BTC", "BCH", "ETH", "LTC", "XRP"]
  • Supported currencies = ["INR"].
"-L-SQr7i_0b-0GLPjMO_" : {
"buy_price" : 855000.0,
"max_24hrs" : 862500.0,
"min_24hrs" : 770000.0,
"sell_price" : 853500.0,
"timestamp" : 1.512322331009709E9,
"vol_24hrs" : 124.644
}

Koinex URL: https://koinex.in/api/ticker

Throughbit

Pocketbits

URL: https://atalwcryptare.firebaseio.com/pocketbits.json?print=pretty

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR"].
"-L-SPoFniEpq0B3yTGgT" : {
"buy_price" : 849742,
"sell_price" : 825349,
"timestamp" : 1.51232205719493E9
}

Pocketbits URL: https://www.pocketbits.in/Index/getBalanceRates

LocalBitcoins

URL: https://atalwcryptare.firebaseio.com/localbitcoins_BTC_INR.json?print=pretty

LocalBitcoins supports different currencies. In the URL, replace CURRENCY in localbitcoins_BTC_CURRENCY with any one of these ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"]. For Example, https://atalwcryptare.firebaseio.com/localbitcoins_BTC_SGD.json

  • Supported coins = ["BTC"]
  • Supported currencies = ["INR", "USD", "GBP", "CNY", "SGD", "EUR", "ZAR"].
"-L-SPh4qGi1b8_10t3Uc" : {
"buy_price" : 852800.0,
"sell_price" : 810500.0,
"timestamp" : 1.512322027783203E9,
"vol_24hrs" : 14.60155067
}

Localbitcoins URLs:

Coinbase

Example URL: https://atalwcryptare.firebaseio.com/coinbase_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/coinbase_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "EUR"]
  • Note: Coinbase does not yet support GBP currency for ETH and LTC. (5 Dec, 2017)
"-L-Rx3Uxaz7JiUBVVHOU" : {
"buy_price" : "11913.25",
"max_24hrs" : 11795.0,
"min_24hrs" : 10762.0,
"sell_price" : "11677.34",
"timestamp" : 1.512314257803914E9,
"vol_24hrs" : 17214.74378967,
"vol_30days" : 770063.73086679
}

Coinbase URLs:

Kraken

Example URL: https://atalwcryptare.firebaseio.com/kraken_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/kraken_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC"]
  • Supported currencies = ["USD", "GBP", "JPY", "CAD", "EUR"]
  • Note: Kraken only supports ["USD", "EUR"] for LTC. (5 Dec, 2017)
"-L-aTXeq2CBrqCf1Ep9W" : {
"buy_price" : 11650.0,
"max_24hrs" : 11849.9,
"min_24hrs" : 11006.3,
"sell_price" : 11650.0,
"timestamp" : 1.512316383052561E9,
"vol_24hrs" : 3781.39453706
}

Kraken URL: https://api.kraken.com/0/public/Ticker?pair={0}{1} where {0}= coin and {1}= currency.

Note: Kraken uses XBT instead of BTC to denote Bitcoin.

Bitfinex

Example URL: https://atalwcryptare.firebaseio.com/bitfinex_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitfinex_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "BCH", "XRP"]
  • Supported currencies = BTC has ["USD", "EUR"] values. All other coins only have ["USD"].
"-L-aY-Y4z8mq87TzvB4g" : {
"buy_price" : 11666.0,
"max_24hrs" : 11842.0,
"min_24hrs" : 10718.0,
"sell_price" : 11664.0,
"timestamp" : 1.512475199170982E9,
"vol_24hrs" : 58576.69881667
}

Bitfinex URL: https://api.bitfinex.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Poloniex

Currently unsupported because Poloniex API access requires captcha verification.

Poloniex URL: https://poloniex.com/public?command=returnTicker

Gemini

Example URL: https://atalwcryptare.firebaseio.com/gemini_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/gemini_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH"]
  • Supported currencies = ["USD"]
"-L-aX1UZrGklkB4UHSPG" : {
"buy_price" : 11691.78,
"coin_volume_24hrs" : 7668.6324647363,
"fiat_volume_24hrs" : 8.793478945770213E7,
"sell_price" : 11691.77,
"timestamp" : 1.512474945323566E9
}

Gemini URL: https://api.gemini.com/v1/pubticker/{0}{1} where {0}= coin and {1}= currency.

Bitstamp

Example URL: https://atalwcryptare.firebaseio.com/bitstamp_BTC_USD.json?print=pretty

General URL: https://atalwcryptare.firebaseio.com/bitstamp_{0}_{1}.json where {0}= coin and {1}= currency.

  • Supported coins = ["BTC", "ETH", "LTC", "XRP"]
  • Supported currencies = ["USD", "EUR"]
"-L-SMU3d4YWpIp3ib080" : {
"buy_price" : 11671.99,
"max_24hrs" : 11800.01,
"min_24hrs" : 10770.32,
"sell_price" : 11661.01,
"timestamp" : 1.512321182378586E9,
"vol_24hrs" : 8015.99202548
}

Bitstamp URL: https://www.bitstamp.net/api/v2/ticker/{0}{1} where {0}= coin and {1}= currency.

Bittrex

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors