Title: MtGox python wrapper Post by: ezl on May 21, 2011, 08:18:44 AM Wrote this for myself so I could work on some automated trading strategies. Sharing it in case anyone else in the community is interested:
https://github.com/ezl/mtgox/blob/master/mtgox.py Title: Re: MtGox python wrapper Post by: laanwj on May 21, 2011, 08:22:09 AM Thanks, that could certainly be useful.
Would it make sense to include the exchange APIs also in bitcoin-python? Title: Re: MtGox python wrapper Post by: kseistrup on May 21, 2011, 09:11:41 AM Cool!
Title: Re: MtGox python wrapper Post by: theboos on May 21, 2011, 02:48:52 PM Whoa, thanks! I am literally right now working on a sort of extensible and automated MtGox desktop client in Python.
Title: Re: MtGox python wrapper Post by: kseistrup on May 21, 2011, 02:50:22 PM I am literally right now working on a sort of extensible and automated MtGox desktop client in Python. Sounds very interresting. Please give us a shout when you have something working that you'd like to share. Cheers, Title: Re: MtGox python wrapper Post by: cloon on July 25, 2011, 05:11:10 PM Great!
Sry for the noob question: what is urllib, urllib2 and json? how can i get and use it? I know how to make a bot more complex (getting more deciding functions) but i've no idea, how i can link it with Mtgox and how to get every trade data into phython. who knows it? Title: Re: MtGox python wrapper Post by: kseistrup on July 25, 2011, 05:26:49 PM Sry for the noob question: what is urllib, urllib2 and json? urllib, urllib2 and json are all python modules that should be available in any standard python distro. If not, you can get them from the Cheese Shop (http://pypi.python.org/). Quote i've no idea, how i can link it with Mtgox and how to get every trade data into phython. Mt. Gox has a websocket API (https://en.bitcoin.it/wiki/MtGox/API#Websocket_API) that gives you near real-time streaming trade data. Cheers, Title: Re: MtGox python wrapper Post by: cloon on July 25, 2011, 07:40:50 PM i found a test_urllib2.py on my disk is the same on yours or is this only a testversion?
i only want a history of the trades who gets automatically updated, where i could point my functions on... and the possibility to trade (and the whole thing in python) am i too stupid? ;-) thx 4 your help! Title: Re: MtGox python wrapper Post by: kseistrup on July 25, 2011, 07:57:16 PM i found a test_urllib2.py on my disk is the same on yours or is this only a testversion? I guess test_urllib2.py is a python script to test the urllib2 module, the real urllib2 is called urllib2.py. On a standard Linux distro you can most likely find it at /usr/lib/python2.[567]/urllib2.py (for python2.5 through 2.7). I have no clue about Windows or Mac. Quote i only want a history of the trades who gets automatically updated, where i could point my functions on... and the possibility to trade (and the whole thing in python) The websocket API is the way to go. Install python-websocket from the Cheese Shop, then look at the documentation at the previous link I gave you. The following is an extremely simple websocket client: Code: #!/usr/bin/env python Cheers, |