Author

Topic: Simple MtGox Ticker (Read 1726 times)

sr. member
Activity: 246
Merit: 250
April 20, 2013, 03:39:43 AM
#10
Works awesome! Thanks nitrous!

Glad you like it  Grin
sr. member
Activity: 246
Merit: 250
April 20, 2013, 03:36:38 AM
#9
The ticker now uses the new MtGox ticker_fast method to be more reliable and provide more rapid updates (lag updates less often, however, as it is not cached AFAIK)

How often can we call ticker_fast without getting into trouble?

There's little information, but according to the original reddit thread (http://www.reddit.com/r/Bitcoin/comments/1c9npl/mtgox_fast_ticker_last_only_no_rate_limit_1second), there's no limit as the method is cached. Still, I'm not requesting more than twice per second with the app. I think for anything faster, the streaming API needs to be used.
newbie
Activity: 49
Merit: 0
April 19, 2013, 11:41:16 PM
#8
Works awesome! Thanks nitrous!
sr. member
Activity: 280
Merit: 250
April 19, 2013, 10:32:45 PM
#7
The ticker now uses the new MtGox ticker_fast method to be more reliable and provide more rapid updates (lag updates less often, however, as it is not cached AFAIK)

How often can we call ticker_fast without getting into trouble?
sr. member
Activity: 246
Merit: 250
April 17, 2013, 05:45:30 PM
#6
The ticker now uses the new MtGox ticker_fast method to be more reliable and provide more rapid updates (lag updates less often, however, as it is not cached AFAIK)
sr. member
Activity: 246
Merit: 250
April 12, 2013, 01:10:12 PM
#5
Text is now also formatted, so there are up and down arrows to tell you what's happening to the price, not just what it is now Smiley
sr. member
Activity: 246
Merit: 250
April 12, 2013, 08:58:23 AM
#4
The ticker now supports choosing different currencies:



If you want to set it up as a standalone mac application without py2app or equivalent, just open automator and do the following:



EDIT: If you want to run more than one at a time, you should reduce the rate of each ticker, otherwise you may get banned from using the API by the anti-DDoS protection.
sr. member
Activity: 246
Merit: 250
April 10, 2013, 11:35:48 PM
#3
I don't think the ticker API updates at more than 10s intervals. You might just be getting redundant data if you poll every 2 seconds. (Or risk being blocked by anti-DDOS stuff)

Well my ticker seems to get updates at more than 10s intervals, and I haven't got any trouble with anti-DDoS yet, but I updated it to check every 3s instead just in case. Any longer seems to be too slow, at least for me, but anyone who uses it is free to change the request time by changing the rate variable on line 7 in ticker.pyw (it is the number of seconds between requests).
hero member
Activity: 548
Merit: 502
So much code.
April 10, 2013, 11:25:06 PM
#2
I don't think the ticker API updates at more than 10s intervals. You might just be getting redundant data if you poll every 2 seconds. (Or risk being blocked by anti-DDOS stuff)
sr. member
Activity: 246
Merit: 250
April 10, 2013, 10:21:40 PM
#1
It seems that every time MtGox gets hit hard, so do most other Bitcoin related sites, making it hard to monitor the bitcoin exchange world. But the website going down doesn't always mean the API is down, so I quickly pulled together this simple GUI ticker in python:

https://bitbucket.org/nitrous/simple-mtgox-ticker/overview

It isn't my best code, but it works and gives you the current bid and ask price, as well as current lag. It tries to poll the server every 2 seconds, and if there's an error it won't lose the current information. Also, if you want help developing with the MtGox API, take a look at api.py - I'm developing a more advanced library for easy python access to MtGox, but in the meantime I stripped it down to the bare essentials with this project, so it should be helpful in conjunction with my v2 API documentation to see how accessing the API works.

To start, just run
Code:
pythonw ticker.pyw

  • If you want a different currency, just change it in ticker.pyw
  • Make sure you have python and Tkinter installed
  • You don't need an API key or secret to use this service

Note that under high load, the API is not always available, but when it is, you should at least be able to get the basic information, hope this helps Smiley

Jump to: