Bitcoin Forum
May 17, 2024, 04:09:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Open Source Raspberry PI BitcoinTalker (Wallet watcher + Ticker)  (Read 3061 times)
vrhax (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile WWW
November 17, 2013, 07:59:10 AM
Last edit: November 17, 2013, 08:34:15 PM by vrhax
 #1

Hi all.

Even though I spend a large amount of my time in front of my computer, I don't always have time to watch the bit coin exchange tickers. Additionally, since I'm playing around with Raspberry PI and basically learning the ropes where that and python is concerned, I decided to write bitcoin ticker app that talks, as opposed to displaying current rates.

This app uses festival, and polls the current Bitstamp price (once, every 61s, to ensure it does not exceed their 600/10m polling rule), as well as computing the BTC value stored in a bitcoin-qt wallet which is running on a separate computer on the network. Notably, I didn't want it jabbering away every time the price changed. As such, it is designed to only speak based upon a user designated variance.

For example, only talk when the price has changed, up or down, by $5.00.

In addition to talking, it will print to a log. Though, in general, outside of debugging, and to keep storage requirements to a minimum, it is better to set the debug flag to 'False'.

And finally, this first pass example is somewhat of a kludge, in that it is my first attempt at writing a python script. So, at this point, it reflects USD only. For example, since I could  not figure out how to set up the tokens so that festival would correctly speak dollars, I kludged a string replace. So, if you want it to speak in a different currency, you will need to modify the dollar bit.

With that said, I thought I'd share the code, which I'm releasing on github, under an open source license: https://github.com/vrhax/BitTalker

Feedback and ideas are always welcomed. And, I'll be happy to answer any questions, should you have them.
vrhax (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile WWW
November 18, 2013, 02:17:26 AM
 #2

Mini update:

I've updated this script to read from a config file for settings. This allows the user to set the polling interval, exchange, exchange variance and exchange field to fetch.

The latter so you can choose which exchange you wish to monitor. To set the correct field, you'll need to view the exchange API. What this means, is that you can even monitor non-exchange sites, like coinbase.

The config file also includes the bitcoin-qt (client) login info, as well as a means to set the log file size, which, once reached, rolls the log over. Debug must be set to True for creating the log.

That said, I must admit, it's pretty nice having this thing talk when major (i.e., increase/decrease by n-amount) market price fluctuations are detected. This allows me to work on other projects, rather than (obsessively) watching the market ticker.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!