Author

Topic: btcmon - Multiple exchange price monitor [python, bitcoincharts] (Read 902 times)

legendary
Activity: 1512
Merit: 1036
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.
Jump to: