Bitcoin Forum

Bitcoin => Project Development => Topic started by: naturallaw on July 16, 2011, 10:46:14 PM



Title: [ANN] Bitcoin Exchange API for node.js
Post by: naturallaw on July 16, 2011, 10:46:14 PM
I've just released the first version of a new API for interacting with Bitcoin exchanges for node.js. I've been using it for a couple weeks now and it seems to work pretty well, but no guarantees.

Goal:
The purpose of this project is to provide a robust enough interface to interact
with Bitcoin exchanges (in whatever way that might be) without going into things
that necessarily should be customized such as trading bot strategies.

Current Features:
  • Mostly written for compatibility with Mt Gox API
  • Known to work with: Mt Gox, TradeHill, Bitcoin7 (via ExchangeB7 class), ExchangeBitcoins
  • Check Account Balance in USD and BTC
  • Place Buy and Sell Orders
  • Find out the cost (USD) to buy a given amount of BTCs (including trade fee) on an exchange
  • Find out the gain in selling a given amount of BTCs (including trade fee) on an exchange

Install:
Code:
npm install btc-ex-api

Source:
https://github.com/freewil/btc-ex-api


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: nimnul on July 17, 2011, 05:28:53 AM
I appreciate this so much. If you had flattr I could donate.

But how did you get around https://github.com/joyent/node/issues/1302 ?

UPD: Your MtGox depth works (unlike mine!), and I'm glad to see proper error handling in the code. Library API and internal design are arcane with all this poor man's encapsulation using properties starting with _ and misuse of getters, prototypes and closures, but it's 0.0.1 and I hope we will get it ironed out over time.


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: naturallaw on July 17, 2011, 01:50:08 PM
Library API and internal design are arcane with all this poor man's encapsulation using properties starting with _ and misuse of getters, prototypes and closures, but it's 0.0.1 and I hope we will get it ironed out over time.

Please expand on this issue.


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: nimnul on August 06, 2011, 02:41:57 PM
I added issues to the git bug tracker


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: naturallaw on August 06, 2011, 03:56:10 PM
I added issues to the git bug tracker

lol, I don't know whether to thank you or curse you  ;)


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: nimnul on August 07, 2011, 12:16:37 PM
Well, I was seeking cooperation, not blame  ;)

We develop something like your library in-house for production use in our not yet released service, so we'd like to join the development.

Do you actively develop the library?


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: SAPer on August 07, 2011, 01:55:36 PM
nimnul, I have own implementation of node.js wrapper for mtgox api, you can check out links from this post: https://bitcointalk.org/index.php?topic=32889 Now I try to implement websocket mtgox api in my lib.


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: nimnul on August 07, 2011, 05:02:44 PM
mtgox API is of no use for me as it's easy to make one in 10 minutes.

What I need is a well-designed unified interface for all existing exchanges, not just mtgox and not just public data but also programmatic trading. The btc-ex-api package pretends to be just like that. Not all exchanges are supported, but many of them. We have implemented support for some more exchanges and plan to integrate that in btc-ex-api in the future. But as of now the interface has plenty of room for improvements, and I can even make a pull request with all required changes if my architectural proposals get approved by our small committee :)


Title: Re: [ANN] Bitcoin Exchange API for node.js
Post by: naturallaw on August 11, 2011, 07:54:59 PM
Do you actively develop the library?

I haven't been, I'm currently working on another bitcoin-related project for the time-being.