Skip to content

Instantly share code, notes, and snippets.

@TravisMullen
Last active July 5, 2018 11:59
Show Gist options
  • Save TravisMullen/155511ecb4cbc0fbc2bd95e3110c885f to your computer and use it in GitHub Desktop.
Save TravisMullen/155511ecb4cbc0fbc2bd95e3110c885f to your computer and use it in GitHub Desktop.
Oraclize ETH/USD Conversion
// Oraclize get data using `FlowCommunications/JSONPath`
// https://github.com/FlowCommunications/JSONPath#expression-syntax
// test with https://jsonpath.curiousconcept.com/
// these APIs are public and do not require Authorization
// from kraken (returns String)
json(https://api.kraken.com/0/public/Ticker?pair=ETHUSD).result.XETHZUSD.c.[0]
// from cryptocompare (returns Number[Float])
json(https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=USD).USD
// for BTC_ETH other alt coin conversions
json(https://poloniex.com/public?command=returnTicker).BTC_ETH.last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment