Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Morthawt on June 11, 2011, 12:59:28 AM



Title: Bitcoin Exchange Watcher program V 1.5.2 [Open source]
Post by: Morthawt on June 11, 2011, 12:59:28 AM
I made a little program so I can keep an eye out on what exactly the prices are for bitcoins. This program, I wrote with AutoIt3. While autoit is not the best thing in the world and has its limitations it works and is very functional and pretty fast.

I did not like the idea of having to keep the web page open and keep refreshing the page, which is why I created this to automatically refresh the information from the API so that I can clearly see both values.

Features:

  • Monitor both buying and selling exchange rates via mtgox API
  • Refresh rate of the exchange rate checking can be customized
  • Audio alert when buy/sell rates hit within your desired targets
  • Ability to save your settings so each time you load the program it has your settings
  • Ability to reload settings from your saved ones and also wipe out your saved settings to default
  • Currency converter with up to date currency data ([BTC - any currency] [Any currency - BTC] via Google API
  • Always on top feature
  • Mini "on top" window to keep an eye on rates and save screen space
  • Donate menu which will copy my donations bitcoin address to your clipboard so you can donate to me

Download link: http://www.wuala.com/morthawt/btc.exchange.watcher/ (http://www.wuala.com/morthawt/btc.exchange.watcher/)

If you like the idea of having a little program you can keep open to check the current rates, feel free to donate something to me at the following bitcoin address: 1MTkF9ZTcXtgvQX245TwTL2Ko3NMvJHz6P

There is also a donate menu which will copy the bitcoin address to clipboard.

I hope you like this as much as I do.

I will update it if anything changes with the API or if bugs are found I will do my best to correct them as soon as possible.

Here are some little pictures of it:

http://img577.imageshack.us/img577/3230/btcwatcher.png http://img18.imageshack.us/img18/280/btcdelay.png

http://img829.imageshack.us/img829/8458/btcconvert.png http://img96.imageshack.us/img96/3106/btcmini.png


Thanks guys.

Change Log:

V 1.5.2
  • Updated the handeling of the Mt.Gox API

V 1.5
  • Changed the terminology on the alerting section, because I had overlooked those labels.

V 1.4.9
  • Changed terminology to bid and ask rather than buy and sell.

V 1.4.8
  • Changed menu text "Conversions" to "Tools" to accomodate new additional features.
  • Added a mini "always on top" currency watcher "MinX" for when you want to save screen space!

V 1.4.7
  • Added the ability to choose to have the program always on top.

V 1.4.6
  • Added extra menu's
  • Added a conversion feature to allow you to do calculations based on up to date currency conversion data (courtesy of google api).
  • Fixed the code so the main window cannot be used while other child windows are opened (close them to access the main window).

V 1.4.4
  • Added extra menu's
  • Added ability to save/load/clear your settings.
  • Added the ability to choose your own refresh delay for retrieving new exchange rate information.

V 1.4.2
  • Fixed some code to prevent further bugs of the previous kind (hopefully)
  • Altered the sizing of the window and its contents to "help" readability on systems with customized jumbo sized font sizes.
  • Altered the code to hopefully prevent audio warnings when the API goes down due to too many connections.
  • Recoded to check the API every 10 seconds for updated information to reduce number of connections and improve responsiveness of the interface.

V 1.4.1.2

  • Presumably I have now solved the bug that caused the program to intermittently crash.

V 1.4.1.1

  • Flipped the buy/sell areas over to be more logical
  • Added two different sounds depending on if its buying price or selling price (high-low frequency =  sell price / low-high frequency = buy price)
  • Altered the interface to make it smaller. It was originally larger due to tests I had done with the interface prior to first release.

V 1.4 released
 
  • Added ability to set an audio alarm to alert you to a desired current buying or selling price of bitcoins.

V 1.3 Public release


Feel free to report any bugs here on the forum thread.


Edit:
Included source code in the same directory on the download link if you want to check that out for any reason.


Title: Re: Bitcoin Exchange Watcher program (autoit)
Post by: Morthawt on June 11, 2011, 01:06:32 AM
I am toying with the idea of maybe adding a feature to warn you when a rate hits around a level the user puts in. I MAY include this feature if I can pull it off. Autoit is kind of limiting in the sense that it works only in serial and not parallel, that means it can only do 1 task at a time which is where the couple seconds lag may be between closing the program or bringing up a menu option when you click it because the program is still doing its job online with receiving the data and updating the on screen display.

I would love to pull it off though, so that you can type in a figure and if it hits (depending wether its selling or buying rate) on or above / on or below a certain figure to play an audio message. If I see people are liking it I will probably do my best to add that feature to it. Donations are always welcome motivation also :)

Enjoy.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Olomana on June 11, 2011, 01:48:17 AM
Thanks for this.  Suggestion: put the bid on the left, ask on the right.

Also, it is quite feasible to have AutoIt run tasks in parallel, or rather to simulate running them in parallel.  You put each task in its own subroutine.  Then you call all the tasks from a master dispatcher loop.  Each task checks its own timer and executes if it's time to execute, and otherwise just returns.  This is a "round-robin non-pre-emptive task scheduler".  (My experience writing bots to play Evony finally pays off!)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 02:06:42 AM
bid and ask? Im lost. This is the current buying rate and the current selling rate that you see when you go to mtgox to do some trading. As for parallel I could have multiple scripts separately being run, communicating through ini files but I figured I don't need to. I always can if I need to though.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 05:26:15 AM
Updated to version 1.4

I have added a feature to be able to have an audio beep when a particular exchange figure (either buying or selling rates) hit the area you are looking for. For example if you generated a bitcoin and are waiting until it is the most expensive, you may want to put a selling alert in for perhaps 30. Once the selling price hits 30 or more it will continually beep. Same with buy price, if you want to buy coins at the lowest price, lets say under $20... You could put 20 into the buy price alert and when the actual price drops to 20 or below, it will warn you just the same.

You can disable the sound alerting by unchecking the box, or setting both alert boxes back to 0 so this gives you the choice of leaving your figures there and just temp disabling the sound, or just zeroing the whole thing.

Enjoy and feel free to donate.

1MTkF9ZTcXtgvQX245TwTL2Ko3NMvJHz6P

Thank you


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Alex-Z on June 11, 2011, 05:49:47 AM
Is mt gox cool with you making a request every couple seconds?


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 05:58:02 AM
Well considering on the site they say "That's it. Now write a bot!" I would say yes. Nowhere on there does it mention anything about limiting your accesses.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Oldminer on June 11, 2011, 06:46:27 AM
Thanks for this - nice little gadget :)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Olomana on June 11, 2011, 07:03:13 AM
Nice sound effects, but the two different alerts should give different sounds.  Duhhh!

Bid = buying at, Ask = selling at.  The bid goes on the left.  People read left to right, and the smaller number goes on the left.  Might as well use the standard trading terminology and lay out the screen in the way people expect.

The screen should be much smaller, so it doesn't waste screen real estate.

Sorry to keep harping on user interface issues, but if you want people to use the program, good UI is more important than good programming.  If you have good code and a bad UI, they'll use your code and write their own UI.

I was looking at the API... looks like it would be easy enough to add a settings screen for a user ID and password, and display the user's current BTC and dollar balances.  Then you could sound an alert when the balance changes.  That would tell the user when one of his open orders executed.  Heh, this is starting to look like a framework for a trading bot.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: tiptopgemdotcom on June 11, 2011, 07:11:12 AM
This is a wonderful program.  Thanks so much!  :) :) :)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 03:43:19 PM
V 1.4.1.1 has been released. Check the first post for change details and a new screenshot.  8)

Regarding adding balances though, at this time I am unaware of any way to "post" information via AutoIt3. This would be required to make the API login to receive information.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 04:16:19 PM
working on a bugfix for a recurring issue with an array. I am not sure what the issue is, everything I try and fix it with is not having a beneficial impact at all. I am continuing to work on this.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 04:47:56 PM
Bug has been fixed! (I hope...)  ::)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: tymothy on June 11, 2011, 04:55:57 PM
Running on a 15.6" 1920x1080 screen and the digits are partially cutoff. Could you allow the window to be resized?


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 04:59:19 PM
is it cut off from the edge of the window, or are parts inside the window cut off.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 05:01:04 PM
Can you give me a printscreen of it please so I know "how" to fix it.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: tymothy on June 11, 2011, 07:37:37 PM
Can you give me a printscreen of it please so I know "how" to fix it.

http://i53.tinypic.com/10rpmhw.jpg


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Alex-Z on June 11, 2011, 07:47:34 PM
V 1.4.1.1 has been released. Check the first post for change details and a new screenshot.  8)

Regarding adding balances though, at this time I am unaware of any way to "post" information via AutoIt3. This would be required to make the API login to receive information.

You can,

Something like :
Code:
#include <IE.au3>
#include <http.au3>

$Header = "Content-Type: application/x-www-form-urlencoded"
$Host = "www.website.com"
$File = "/whatever.php"
$URL = "http://" & $Host & $File
$PostData = "name=steve"



$Socket = _HTTPConnect($Host)
_HTTPPost($Host, $File, $Socket, $PostData)
$recv = _HTTPRead($Socket,0)
MsgBox(0,"","BODY: "&$recv&" ERROR: "&@error)
_HTTPClose($Socket)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 07:57:39 PM
You have altered your windows settings to use large fonts or something and altered the title bar buttons size which is reducing the amount of space for the text. I have been working on adding some check for the bug I fixed to make sure it hopefully won't occur with something else. Plus I have been working on a way to make it not alert you erroneously when the API link has too many connections going to it. I also reduced its connections to 1 per 10 seconds.

I have also done my best to resize things so "most" things will fit on your screen but I can not guarentee this because you are not using standard windows settings. The only way I could 100% fix it would be to make all the text very tiny so that it appears normal size on your screen which would result in it being useless to 98% of everyone else because the text would be minuscule.

I hope this version works better for you. Download link in the first post.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 08:02:32 PM
V 1.4.1.1 has been released. Check the first post for change details and a new screenshot.  8)

Regarding adding balances though, at this time I am unaware of any way to "post" information via AutoIt3. This would be required to make the API login to receive information.

You can,

Something like :
Code:
#include <IE.au3>
#include <http.au3>

$Header = "Content-Type: application/x-www-form-urlencoded"
$Host = "www.website.com"
$File = "/whatever.php"
$URL = "http://" & $Host & $File
$PostData = "name=steve"



$Socket = _HTTPConnect($Host)
_HTTPPost($Host, $File, $Socket, $PostData)
$recv = _HTTPRead($Socket,0)
MsgBox(0,"","BODY: "&$recv&" ERROR: "&@error)
_HTTPClose($Socket)

yea its hypothetically possible but it would mean manually going in and editing all the GUI again which has to be edited in text plus then do all that specialized manual http connection code which is far too much. Plus it would only work for people using mtgox any way. At least this is the market in general so that people can then trade on what ever sites they like to trade on. If it were built in to AutoIt3 to be able to "post" then I would use it, but that takes too much memorizing and I hate copy/pasting code from sites to do things. Im a "either I understand it and can do it every time any time, or I don't do that" I hate copy/pasting code so much because it is not "my" code or something I can write from scratch.


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 11, 2011, 11:11:09 PM
Updated to version 1.4.4 to include saving/restoring/resetting of your settings. Also you can now choose the delay that the program will retrieve fresh exchange rate information (default 10 seconds)


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 12, 2011, 01:50:09 AM
Anyone got any feedback for me on the current state of the program or the progress its taking.

Comments, questions, feedback?

Thanks


Title: Re: Bitcoin Exchange Watcher program [Open source] (autoit)
Post by: Morthawt on June 12, 2011, 09:13:31 AM
Version 1.4.6
A currency conversion tool has been coded for the program now. I have enclosed both the ability to convert from bitcoin - another currency or how much bitcoin could be bought with a certain amount and type of currency.

Currency conversion is done via google's api and only requires the 3 digit currency code such as GBP or USD or CAD etc etc...

So now you can find out at a glance how many bitcoins you could buy, or how much money you could get from your bitcoins.

Enjoy another updated release.


Title: Re: Bitcoin Exchange Watcher program V 1.4.6 [Open source]
Post by: Oldminer on June 12, 2011, 10:59:39 AM
Yea the app was great as is but you have really excelled with the converter add-on. Donation will be coming your way shortly.

Thanks


Title: Re: Bitcoin Exchange Watcher program V 1.4.6 [Open source]
Post by: tymothy on June 12, 2011, 02:43:30 PM
Works fine with my slightly larger fonts now. Is it possible to give the option always keep the window in front or to show one of the prices as an icon in the tray when minimized? Then I could always know the price of bitcoins at a glance.


Title: Re: Bitcoin Exchange Watcher program V 1.4.6 [Open source]
Post by: Morthawt on June 12, 2011, 05:25:00 PM
Works fine with my slightly larger fonts now. Is it possible to give the option always keep the window in front or to show one of the prices as an icon in the tray when minimized? Then I could always know the price of bitcoins at a glance.

Thught about this, I need to research if I can do this. My attempt failed dismally.


Yea the app was great as is but you have really excelled with the converter add-on. Donation will be coming your way shortly.

Thanks

Thank you!


Title: Re: Bitcoin Exchange Watcher program V 1.4.6 [Open source]
Post by: Morthawt on June 12, 2011, 06:15:49 PM
Now I have successfully added a check box so that you can choose to keep the window on the top at all times, or simply uncheck it to have its normal behaviour.

Enjoy!


Title: Re: Bitcoin Exchange Watcher program V 1.4.6 [Open source]
Post by: tymothy on June 12, 2011, 06:21:21 PM
Now I have successfully added a check box so that you can choose to keep the window on the top at all times, or simply uncheck it to have its normal behaviour.

Enjoy!

I can see myself using this regularly. Bitcoins are headed your way.


Title: Re: Bitcoin Exchange Watcher program V 1.4.7 [Open source]
Post by: Morthawt on June 12, 2011, 06:35:47 PM
Thank you! I enjoy making something nice that can benefit everyone. Donations make you feel really good because its confirmation that someone out there really does appreciate and enjoy your work!

If anyone else has any comments, questions or feedback I would love to see it.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Morthawt on June 12, 2011, 08:41:05 PM
Updated: Added a miniature version of the watcher to the "tools" menu that is always on top, so when you want to keep an eye on the rates but save screen space, you can choose to bring up that mini window aptly named "MinX" :)

Enjoy.

EDIT:
I uploaded 1.4.8 again due to a mislabled label. Nothing major but before on the mini view, it updated to both saying "buy". That is now fixed.
Please download 1.4.8 again if you notice you got the early mislabled version.


EDIT:
I updated to 1.4.9  due to switching the terminology to bid and ask rather than the api's internal choice of buy and sell.

EDIT:
I updated to 1.5  due to overlooking a couple of labels that were still on the old "buy/sell" text.


Title: Re: Bitcoin Exchange Watcher program V 1.4.9 [Open source]
Post by: ISA on June 12, 2011, 10:15:28 PM
very n1


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Morthawt on June 13, 2011, 02:57:25 AM
Thanks. I do what I can to make it as functional and useful as possible.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: klaus on June 13, 2011, 08:53:14 AM
i like your tool, its very fine. Thanks!

Can you enlarge it to give users the choice eighter mtGox or tradehill quotes ?
maybe in options menu.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Morthawt on June 13, 2011, 02:04:59 PM
i like your tool, its very fine. Thanks!

Can you enlarge it to give users the choice eighter mtGox or tradehill quotes ?
maybe in options menu.

If tradehill add a similar API to their site I will look into the possibility of doing that. Right now they have no comparible API to the one that mtgox has.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: elpresidente on June 13, 2011, 03:37:27 PM
i like your tool, its very fine. Thanks!

Can you enlarge it to give users the choice eighter mtGox or tradehill quotes ?
maybe in options menu.

If tradehill add a similar API to their site I will look into the possibility of doing that. Right now they have no comparible API to the one that mtgox has.
I wonder if there is a way to adopt this for Namecoins at exchange.bitparking.com. I would be greatly interested in that.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Morthawt on June 13, 2011, 04:26:14 PM
They need a decent API with the vital statistics only. Those guys don't have any kind of API I can find. Most people and sites use mtgox as the "gold standard" value of bitcoin. If I add any other exchanges into the program I would need to add all of them which would make the program far too convoluted.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: elpresidente on June 13, 2011, 06:40:15 PM
They need a decent API with the vital statistics only. Those guys don't have any kind of API I can find. Most people and sites use mtgox as the "gold standard" value of bitcoin. If I add any other exchanges into the program I would need to add all of them which would make the program far too convoluted.
Well, I appreciate the work you have done. I'll throw a tip your way once I get a few more btc in.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Findeton on June 13, 2011, 07:48:25 PM
I like it!


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: Morthawt on June 13, 2011, 08:32:20 PM
Thanks!


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: flaxceed on June 21, 2011, 06:09:01 PM
Is a version with Tradehill data coming soon?


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: zef on June 26, 2011, 07:04:34 PM
At the time of this writing, gox is just coming back online, 107$ worth of trades have been made. The program seems to be confusing volume of trades with bids, as it shows $107.9 as the current bid.  Ask seems correct at $15, but bid should be also around 15.


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: bmoney on June 26, 2011, 07:23:05 PM
At the time of this writing, gox is just coming back online, 107$ worth of trades have been made. The program seems to be confusing volume of trades with bids, as it shows $107.9 as the current bid.  Ask seems correct at $15, but bid should be also around 15.

i am getting this as well


Title: Re: Bitcoin Exchange Watcher program V 1.5 [Open source]
Post by: AtlasONo on June 27, 2011, 01:15:48 AM
Which is strange because this is the only instance I've seen of volume being shown in place of bids  ???


Title: Re: Bitcoin Exchange Watcher program V 1.5.2 [Open source]
Post by: Morthawt on June 27, 2011, 09:45:59 PM
Updated version. Mt Gox had changed the API. This has now been updated.


Title: Re: Bitcoin Exchange Watcher program V 1.5.2 [Open source]
Post by: Bitcoinreminder.com on September 26, 2013, 05:58:28 PM
If you like to use something like this, but web based see

http://www.bitcoinreminder.com (http://www.bitcoinreminder.com).

Reminds you via email, text/SMS or even Jabber/GoogleTalk...