Bitcoin Forum
May 06, 2024, 06:22:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: btcmon - Multiple exchange price monitor [python, bitcoincharts]  (Read 878 times)
deepceleron (OP)
Legendary
*
Offline Offline

Activity: 1512
Merit: 1028



View Profile WWW
November 19, 2013, 10:11:50 AM
 #1

I whipped up this console python code to watch the fun on exchanges, it gets data from bitcoincharts market API JSON, and then bitcoincharts socket stream, to keep up to date on exchange prices for all exchanges.

No fancy display, just a dump to console of select currencies across exchanges every time a price changes, displaying only exchanges with trades in the last two hours (currency list and how old is too old are command line options).

http://we.lovebitco.in/btcmon.py (python 2.7 source)

Quote from: btcmon.py

btceUSD      price change: -0.37200000 =======
anxhkUSD    :   824.99200000
bitkonanUSD :   800.00000000
bitstampUSD :   647.00000000
btceUSD     :   654.63000000
crytrUSD    :   600.00000000
justUSD     :   750.00000000
localbtcUSD :   732.43000000
mtgoxUSD    :   763.01000000
btcnCNY     :  5665.00000000
mtgoxCNY    :  4838.30029000

btceUSD      price change: +0.37300000 =======
anxhkUSD    :   824.99200000
bitkonanUSD :   800.00000000
bitstampUSD :   647.00000000
btceUSD     :   655.00300000
crytrUSD    :   600.00000000
justUSD     :   750.00000000
localbtcUSD :   732.43000000
mtgoxUSD    :   763.01000000
btcnCNY     :  5665.00000000
mtgoxCNY    :  4838.30029000
..

Command line options
-c, --currency, default=USD,CNY
    Currencies to watch, comma separated, no spaces.
-a --age, default=7200
    Hide tickers with no trades for xx seconds.

Don't restart it more than once every 15 minutes per http://bitcoincharts.com/about/markets-api/ policy.
(I'll make an exe after I make display less "dumpy")

bitcoincharts socket interface code is (from)/(as documented only in) sierrachartfeed.

Maybe this will turn into a gui charting app, but not likely. Maybe I'll make it more useful as a library, but not likely.
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!