Bitcoin Forum

Bitcoin => Project Development => Topic started by: kokjo on April 19, 2011, 09:41:22 PM



Title: Python bindings for the Mt. Gox trading API (v0.01)
Post by: kokjo on April 19, 2011, 09:41:22 PM
hi!

I have made a api for trading at Mt. Gox. git repo: https://github.com/kokjo/MtGoxAPI

depenciies: pycurl
how to use:
Code:
>>> import MtGoxAPI
>>> client = MtGoxAPI.Client("your_username", "your_password")
>>> client.get_ticker()
{u'ticker': {u'sell': 1.1950000000000001, u'buy': 1.1830000000000001, u'last': 1.1950000000000001, u'vol': 14176, u'high': 1.1950000000000001, u'low': 1.1218999999999999}}
>>>

the public(data) api:
Code:
get_ticker()
get_depth()
get_trades()

the private(trading) api:
Code:
get_balance()
get_orders()
sell_btc(amount, price)
buy_btc(amount, price)

if you like it or use it please feel free to donate to 1EJXbMi5CjHeNmUQNpZgg72HWzEMX8tVja

happy hackin' :D


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: sortedmush on April 24, 2011, 12:43:01 PM
This is great. Thanks. 1btc sent.


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: kokjo on April 24, 2011, 12:58:04 PM
This is great. Thanks. 1btc sent.
thanks :D


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: hozer on April 24, 2011, 02:57:48 PM
Wonderful..

Now how much would you charge, and how long would it take you to get a single object-oriented python library for MtGox, BtcEx, and Britcoin API's?  .. Please release/license as open-source ;)


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: BioMike on April 24, 2011, 04:41:08 PM
So, kokjo beat me in releasing a MtGox Python api (working on a MyBitcoin python library atm).


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: FooDSt4mP on April 25, 2011, 08:29:44 AM
Thanks! Now I have a 13 line bot that watches the ask price and sells slightly lower than the best bid price if the ask drops below a certain price, and puts a bid in to rebuy a bit lower :).


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: kokjo on April 25, 2011, 08:36:42 AM
im glad seeing people using it :)

if you use it and want to see more of things like this from me, please feel free to donate: 1EJXbMi5CjHeNmUQNpZgg72HWzEMX8tVja


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: FooDSt4mP on April 26, 2011, 03:22:26 AM
Sent 5 BTC. I would love btcex support since they charge no fees on trades.  I'll offer 5 BTC for that as well.


Title: Re: Python bindings for the Mt. Gox trading API (v0.01)
Post by: kokjo on April 26, 2011, 08:49:40 AM
Sent 5 BTC. I would love btcex support since they charge no fees on trades.  I'll offer 5 BTC for that as well.
Thanks :D