Post
Topic
Board Trading Discussion
Re: SierraChart bridge - Realtime Bitcoin charts [v0.5] (MtGox, Intersango, ...)
by
Mashuri
on 25/04/2013, 19:02:59 UTC
Every attempt I make to download the whole history, it often gets through a month or two but always ends up crapping out with a 502 error.  This is in Win 7 Ultimate 64.  Tried running as admin, increasing the buffer and running in XP SP3 compatibility mode all to no avail.

I'm just going to leave this here:

http://we.lovebitco.in/schart/sierrachartfeed.exe (windows 32 bit standalone exe)

or

http://we.lovebitco.in/schart/sierrachartfeed.py (python 2.7 source, replace old file)

Yes, it's fixed in a big way.


NOTE: rename or delete your old C:\SierraChart\data\*.scid files if you've been using the broken sierrachartfeed version, or want older history than you previously retrieved.


Code:
Usage: sierrachartfeed.py [options]

Options:
  -h, --help            show this help message and exit
  -d DATADIR, --datadir=DATADIR
                        Data directory of SierraChart software
  -y, --disable-history
                        Disable downloads from bitcoincharts.com
  -p PRECISION, --volume-precision=PRECISION
                        Change decimal precision for market volume.
  -s SYMBOLS, --symbols=SYMBOLS
                        Charts to watch, comma separated. Use * for streaming
                        all markets.
  -l HISTORY, --history=HISTORY
                        Number of days of history to retrieve (default=30).

I set the default "symbol" to only be mtgoxUSD. The symbols are the file names for the exchange you can see here: http://api.bitcoincharts.com/v1/csv/ - for multiple exchanges, use the command-line option like:
sierrachartfeed -smtgoxUSD,bitfloorUSD,btceUSD

This is my own code, you can examine how I solved the problem of reading from old to new without an external database to sort and with 0 chance of missing or duplicate trades being downloaded (although it does inevitably waste some bandwidth).

Update 1: smarter download size adaptation, days of history option, actual source comments
Update 2: fixed duplicate trade bug I created in update 1