BTC-E appears to have an API available at https://btc-e.com/api/1/ticker but this only lists the BTC/USD pair data. They also offer pairs of BTC against alternate currencies like Ixcoin and Tenebrix. I've tried the obvious stuff a la https://btc-e.com/api/2/ticker but no dice.

I'll take an API from any other multi-currency exchange as well, really I just need a way to grab price easily from code without having to scrape HTML and deal with regex.

link|improve this question

I am interested in this, too. Sent a PM yesterday but no answer yet. – phelix Oct 7 '11 at 14:15
@phelix - see my answer. Not the best answer, but this is what we have. – ripper234 Oct 7 '11 at 16:06
feedback

2 Answers

up vote 3 down vote accepted

The URL to the api's for other currencies are:

  1. https://btc-e.com/api/2/1/ticker - BTC/USD
  2. https://btc-e.com/api/2/2/ticker - IXC/BTC
  3. https://btc-e.com/api/2/4/ticker - I0C/BTC
  4. https://btc-e.com/api/2/5/ticker - SC/BTC
  5. https://btc-e.com/api/2/6/ticker - SC/USD
  6. https://btc-e.com/api/2/7/ticker - GG/BTC
  7. https://btc-e.com/api/2/8/ticker - TBX/BTC
  8. https://btc-e.com/api/2/9/ticker - FBX/BTC
  9. https://btc-e.com/api/2/10/ticker - LTC/BTC
  10. https://btc-e.com/api/2/11/ticker - RUC/BTC
  11. https://btc-e.com/api/2/12/ticker - RUC/USD
  12. https://btc-e.com/api/2/13/ticker - NMC/BTC
  13. https://btc-e.com/api/2/14/ticker - LTC/USD
  14. https://btc-e.com/api/2/15/ticker - CLC/BTC
  15. https://btc-e.com/api/2/16/ticker - DVC/BTC

In the links below change the 1 to a number anywhere between 1-16 to match the category above.

Api for trades: https://btc-e.com/api/1/trades

Api for depth: https://btc-e.com/api/2/1/depth

Api for ticker: https://btc-e.com/api/2/1/ticker

By: dodoking

link|improve this answer
1  
Looks like they finally implemented the /api/#/... stuff for the alternate currencies. As for the number of links, keep asking & answering questions, you get more privileges with more rep, and that includes more links. Right now the automated system is still trying to decide if you're a spammer or not ;) – David Perry Jan 16 at 21:20
Thank you for the explanation on the privileges. Glad I could help with the information on the API's :) – dodoking Jan 17 at 23:11
feedback

I didn't find a working API, if all you need is the price then you can just parse their html. I just used these regexes for the min/max prices and averaged them:

<span id='min_price'>(\\d+(?:\\.)\\d+)
<span id='max_price'>(\\d+(?:\\.)\\d+)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.