Bitcoin Forum

Bitcoin => Project Development => Topic started by: shark255 on March 25, 2015, 11:28:19 AM



Title: get btc/doge/ltc price in usd API
Post by: shark255 on March 25, 2015, 11:28:19 AM
Can someone advice me a service where I can get usd price of btc/doge/ltc average on last 24h - just needed JSON or plain text return, wihthout html .

Thanks!


Title: Re: get btc/doge/ltc price in usd API
Post by: emrebey on March 25, 2015, 11:38:50 AM
exchanges have ticker api support generally.

for example, for poloniex: https://poloniex.com/public?command=returnTicker

just parse the output w/ json and you're good to go.


Title: Re: get btc/doge/ltc price in usd API
Post by: esotericizm on March 25, 2015, 12:19:37 PM
exchanges have ticker api support generally.

for example, for poloniex: https://poloniex.com/public?command=returnTicker

just parse the output w/ json and you're good to go.

Doesn't give you the price in USD though. I'm working on an altcoin JSON api for this reason but its still a while away.

Coinmarketcap's API will give you the last trade price in USD (not the 24hr average though afaik) for a given ticker.

http://coinmarketcap-nexuist.rhcloud.com/api/ltc


Title: Re: get btc/doge/ltc price in usd API
Post by: amacar on March 25, 2015, 04:30:13 PM
You can use bitcoinaverage for btc 24h average price.


Title: Re: get btc/doge/ltc price in usd API
Post by: JJ12880 on March 26, 2015, 12:46:02 AM
Do you mean something like this?  

http://easybyc.azurewebsites.net/api.aspx


I did this awhile back, not hard at all.
It should be pretty easy to setup for most major coins on bittrex, maybe a few hours tops I think.


JJ


Title: Re: get btc/doge/ltc price in usd API
Post by: jxm262 on March 27, 2015, 05:42:30 AM
Maybe follow me on github.  I don't have this currently, but will be actively working towards this...

https://github.com/jxm262

my xchange api gives the USD for a few exchanges - https://github.com/jxm262/xchange.js



PM me if you'd like.  Can change my priorities if needed.


Title: Re: get btc/doge/ltc price in usd API
Post by: emrebey on March 27, 2015, 09:08:20 AM
Maybe follow me on github.  I don't have this currently, but will be actively working towards this...

https://github.com/jxm262

my xchange api gives the USD for a few exchanges - https://github.com/jxm262/xchange.js



PM me if you'd like.  Can change my priorities if needed.

cool!

do have any plans to deploy it somewhere with like a JSON api?


Title: Re: get btc/doge/ltc price in usd API
Post by: coinpr0n on March 27, 2015, 09:33:18 AM
Kraken happens to have all those coins (BTC, DOGE and LTC) on their exchange ... perhaps you can look into using them for your API calls. I'm not sure about the volumes though. They are the highest BTC-EUR exchange but not so sure about USD.


Title: Re: get btc/doge/ltc price in usd API
Post by: jxm262 on March 27, 2015, 02:52:06 PM
@emrebey

Yeah , eventually.  For the moment, I'm just creating Node modules for other devs to use (so there can be a bunch of websites using the same backing code). 

If you don't plan to make a ton of requests, I can throw up a basic Node server with a Rest endpoint for you.  Just pm me here or on that slack group, would only take me a few mins to do.


Eventually, I'll make a much bigger website with some cool features.  But that will be after I have the infrastructure in place.


Title: Re: get btc/doge/ltc price in usd API
Post by: jxm262 on March 27, 2015, 03:09:28 PM
Just realized you said 'average on last 24h' .  I have another module for analytics like that :)

https://github.com/jxm262/btc-stats
https://www.npmjs.com/package/btc-stats


Again, it's currently just for a few exchanges.  It's part of the plan to add everything though.