Pages:
Author

Topic: SierraChart bridge - Realtime Bitcoin charts [v0.5] (MtGox, Intersango, ...) - page 3. (Read 142193 times)

legendary
Activity: 1512
Merit: 1032
It looks like I found another bitcoincharts API bug for you programmers - bitcoincharts doesn't always return the correct 20,000 trades if you only specify the &start timestamp parameter.

Example:
http://api.bitcoincharts.com/v1/trades.csv?symbol=mtgoxUSD&start=1270000000
  - returns timestamps starting at 1279408157 (first trade 17 Jul 2010 23:09:17 GMT)
http://api.bitcoincharts.com/v1/trades.csv?symbol=mtgoxUSD&start=1290000000
 - returns timestamps starting at 1307725482
http://api.bitcoincharts.com/v1/trades.csv?symbol=mtgoxUSD&start=1290000000&end=1299000000
  - returns timestamps starting at 1290001901
http://api.bitcoincharts.com/v1/trades.csv?symbol=mtgoxUSD&start=1320000000
 - returns timestamps starting at 1320000026

edit: seems to be fixed.
edit: and then it's not again.
full member
Activity: 154
Merit: 100
Great work I have to admit.  Shocked
legendary
Activity: 1512
Merit: 1032
New version of Sierrachartfeed and direct-download history files, working again

Update 022:
  • Fixed to work again after bitcoincharts API changes,
  • Get all symbols option (--symbols=a) forces immediate history download of known tickers, instead of waiting to discover them only when a trade is seen,
  • Maybe better --help,
  • Error handling changes,
  • Maximum history to catch up default to 30 days.
  • Note, you must have a somewhat correct date/time on your computer or strange things may happen.

and update 023:
  • Days of history option now only enforced for fresh download, will always resume from last date in scid data to avoid creating gaps. (only was an issue because the first API break with 0.5 could have put old dates at end of scid and made downloading go crazy).
  • Fix 1 in 3 chance of not resuming after a long series of "result too big" errors if there were ever 20,000 trades in under 8 seconds. (Simply can't work correctly if there are ever more than 20,000 trades per second due to API limitation)

Code:
Usage: sierrachartfeedUTC-0.6.023.exe [options]

Options:
  -h, --help            show this help message and exit
  -d DATADIR, --datadir=DATADIR
                        Data directory of SierraChart software (default =
                        c:/SierraChart/data/
  -s SYMBOLS, --symbols=SYMBOLS
                        Ticker symbols to download, comma separated. * or a
                        for all. (default = mtgoxUSD)
  -l HISTORY, --history=HISTORY
                        Maximum days if no ticker history previously
                        downloaded (default = 30).
  -y, --disable-history
                        Disable trade history download; get live trades only
                        (default = False)
  -p PRECISION, --volume-precision=PRECISION
                        Multiply volume by this many decimal places before
                        import (default = 2).
  -t, --tickers         List all ticker symbols and exit

note: when using the single-letter option, there is no space between the option and the parameter


Download links:
http://we.lovebitco.in/schart/sierrachartfeedUTC-0.6.023.exe (4.0MB) (windows 32 bit standalone exe)
MD5: 93d1b5930c4f2efae571144920b7e774 *sierrachartfeedUTC-0.6.023.exe

http://we.lovebitco.in/schart/sierrachartfeedUTC-0.6.023.py (python 2.7 source - needs github files also)

SCID full history files (use if your data directory was screwed up by unannounced API changes):
from first recorded trade to Wed, 21 Aug 2013 23:59:59 GMT:
(extract to C:\SierraChart\data\ before starting SierraChartfeed)

MtGox only: http://we.lovebitco.in/schart/mtgoxUSD.scid.UTC.7z (22.6MB/227MB)
  • mtgoxUSD
Other current exchanges: http://we.lovebitco.in/schart/otherALL.scid.UTC.7z (19.0MB/200MB)
  • bit2cILS, bitboxUSD, bitcashCZK, bitcurexEUR, bitcurexPLN, bitkonanUSD, bitnzNZD, bitstampUSD, btcdeEUR, btceEUR, btceRUR, btceUSD, btchkexHKD, btcnCNY, cbxUSD, crytrEUR, crytrUSD, fbtcEUR, fbtcUSD, fybseSEK, fybsgSGD, icbitUSD, intrsngEUR, intrsngGBP, intrsngPLN, justLTC, justNOK, justXRP, kptnSEK, localbtcEUR, lybitCAD, lybitUSD, mrcdBRL, mtgoxAUD, mtgoxCAD, mtgoxCHF, mtgoxCNY, mtgoxDKK, mtgoxEUR, mtgoxGBP, mtgoxHKD, mtgoxJPY, mtgoxNZD, mtgoxPLN, mtgoxRUB, mtgoxSEK, mtgoxSGD, mtgoxTHB, rippleEUR, rippleUSD, rippleXRP, rmbtbCNY, rockEUR, rockSLL, rockUSD, vcxEUR, vcxUSD, virtexCAD, virwoxSLL, weexAUD, weexCAD, weexUSD
Past/retired exchanges (Tradehill, etc): http://we.lovebitco.in/schart/historic.scid.UTC.7z  (3.4MB/32.9MB)
  • aqoinEUR, b2cUSD, b7BGN, b7EUR, b7PLN, b7SAR, b7USD, bbmBRL, bcEUR, bcGBP, bcLREUR, bcLRUSD, bcmBMAUD, bcmBMGAU, bcmBMUSD, bcmLRUSD, bcmMBUSD, bcmPPUSD, bcmPXGAU, bcPGAU, bitchangePLN, bitfloorUSD, bitmarketAUD, bitmarketEUR, bitmarketGBP, bitmarketPLN, bitmarketRUB, bitmarketUSD, bitmeUSD, bitomatPLN, britcoinGBP, btc24EUR, btc24USD, btcexEUR, btcexJPY, btcexRUB, btcexUSD, btcexWMR, btcexWMZ, btcexYAD, btctreeUSD, cryptoxAUD, cryptoxUSD, exchbUSD, freshPLN, globalEUR, globalGBP, globalPLN, globalUSD, imcexEUR, imcexUSD, intrsngUSD, ruxumAUD, ruxumCHF, ruxumEUR, ruxumGBP, ruxumHKD, ruxumHUF, ruxumJPY, ruxumPLN, ruxumRUB, ruxumSEK, ruxumSGD, ruxumTHB, ruxumUAH, ruxumUSD, ruxumZAR, snwcnXRP, thAUD, thCLP, thEUR, thINR, thLRUSD, thUSD, wbxAUD
legendary
Activity: 1974
Merit: 1029
The script I use to maintain https://dl.dropboxusercontent.com/u/24587684/mtgox-daily/2013/09/04 (substitute any date, and/or use "mtgoxEUR-daily") still seems to work for me.
kvm
newbie
Activity: 40
Merit: 0
Thank you, deepceleron - very helpful findings! These endless changes are very discouraging, because sierrachartfeed is not the only software using Bitcoincharts API. I wrote something similar but for Metatrader platform:

https://bitcointalksearch.org/topic/live-bitcoin-charts-in-metatrader-4-for-any-market-bitcoinchartscom-160791

And guess what - it doesn't work anymore Sad
legendary
Activity: 1512
Merit: 1032
Bitcoincharts seems to have changed the API again, breaking software (sierrachartfeed might be the only software using it?) It is now returning a list of trades in order from oldest->newest. Epoch time query parameters do strange things:

  • The most recent 20,000 trades are returned if there are no time parameters,
  • If the &start time parameter is used alone, 20,000 trades since the start time are returned,
  • If the &start and &end parameters are used and return > 20,000 results, 20,000 trades since the start time are returned,
  • If the &start and &end parameters are used and return <= 20,000 results, the requested range is returned,
  • If the &end parameter is used alone and if the &end time parameter is after than the first of the most recent 20,000 trades, the most recent 20,000 trades list is truncated to the end time (unexpected/odd)
  • If the &end parameter is used alone and if the &end time parameter is before the first of the most recent 20,000 trades, no results are returned (unexpected/odd)

It would appear that "end" only serves to truncate the results of either the 20,000 trades from "start=" or the most recent 20,000 trades.

Notable is that if you get chunks of 20,000 results chronologically, software can't continue retrieval at the next epoch second after the last trade in the reply - there still might be more trades with the same timestamp. You must request that second again to continue, de-duping or discarding the previous last-second result data, or re-request a smaller time interval (which is what my fixed sierrachartfeed did on the reverse-sorted data). The end of a data request might look like the example below, but there are actually five trades with timestamp 1350659454 - two more trades still to get:
Code:
...
1350659256,11.680250000000,0.970000000000
1350659256,11.699890000000,6.722307690000
1350659287,11.680240000000,0.010000000000
1350659454,11.680140000000,3.000000000000
1350659454,11.680240000000,0.990000000000
1350659454,11.680240000000,1.000000000000

A new download algorithm will need to be written equivalent in work to my first rewrite...
Han
newbie
Activity: 40
Merit: 0
Is anyone else having trouble getting the BitstampUSD feed to update continuously like the MtGoxUSD feed?
full member
Activity: 124
Merit: 100
Recently I see some gaps in the chart. Is this appearing if I am not online 24/7?
Sometimes. Only if the internet connection is lost.
Usually the bridge checks for missing data upon starting up and fetch what's missing.
legendary
Activity: 2100
Merit: 1000
legendary
Activity: 1512
Merit: 1032
Can you add a option to export the data to CSV
There are already csv files for you to download at http://api.bitcoincharts.com/v1/csv/

Added:

SierraChart can export data into CSV format for you, after opening your exchange, choose Edit-> Export Intraday data to txt file. It exports to CSV in this format:

Code:
Date, Time, Open, High, Low, Last, Volume, Number of Trades, Bid Volume, Ask Volume
08/03/2013, 03:54:45, 104.00497, 104.00497, 104.00497, 104.00497, 1655, 1, 0, 0
08/03/2013, 03:54:46, 104.00502, 104.00502, 104.00502, 104.00502, 4244, 1, 0, 0
08/03/2013, 03:54:55, 104.00502, 104.00502, 104.00502, 104.00502, 1, 1, 0, 0

Note that these volumes are 100x larger than actual.
legendary
Activity: 938
Merit: 1000
chaos is fun...…damental :)
Can you add a option to export the data to CSV
legendary
Activity: 1512
Merit: 1032
New version of Sierrachartfeed and direct-download history files, now with old exchanges for your entertainment

Update 021:
  • Corrected crash downloading trade data with negative volume amounts in history (btc24EUR and ruxumUSD),
  • Fixed downloading of symbols with no recent trades for months (undocumented API issue),
  • Error handling of blank or invalid exchange symbols,
  • Faster history download on long periods of no trades.

Update 020:
-Tweak data request sizes.

Update 019:
-Fix error on initial request too large.

Update 018:
-All times in UTC instead of local time (allows easy data file interchange with other users and comparison with other ticker sources),
  REQUIRED: remove all existing C:\SierraChart\data\*.scid files before using this new bridge version.
-properly close IP sockets (not a fix for all 502 errors, apparently)
-faster update,
-remove about 1-5MB of redundant downloading at initialization,
-cosmetic tweaks: error stats and download times on console.

Code:
Usage: sierrachartfeedUTC-0.6.021.exe [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. (default = mtgoxUSD only)
  -l HISTORY, --history=HISTORY
                        Maximum days of history to retrieve (default = 14).
note: when using the single-letter option, there is no space between the option and the parameter


Download links:
(new version available)/sierrachartfeedUTC-0.6.021.exe (3.9MB) (windows 32 bit standalone exe)
MD5: fb686793172f142ecdb2150d701c9c99 *sierrachartfeedUTC-0.6.021.exe

http://we.lovebitco.in/schart/sierrachartfeedUTC-0.6.021.py (python 2.7 source - needs github files also)

SCID full history files:
from first recorded trade to Wed, 21 Aug 2013 23:59:59 GMT:
(extract to C:\SierraChart\data\ before starting SierraChartfeed)

MtGox only: http://we.lovebitco.in/schart/mtgoxUSD.scid.UTC.7z (22.6MB/227MB)
  • mtgoxUSD
Other current exchanges: http://we.lovebitco.in/schart/otherALL.scid.UTC.7z (19.0MB/200MB)
  • bit2cILS, bitboxUSD, bitcashCZK, bitcurexEUR, bitcurexPLN, bitkonanUSD, bitnzNZD, bitstampUSD, btcdeEUR, btceEUR, btceRUR, btceUSD, btchkexHKD, btcnCNY, cbxUSD, crytrEUR, crytrUSD, fbtcEUR, fbtcUSD, fybseSEK, fybsgSGD, icbitUSD, intrsngEUR, intrsngGBP, intrsngPLN, justLTC, justNOK, justXRP, kptnSEK, localbtcEUR, lybitCAD, lybitUSD, mrcdBRL, mtgoxAUD, mtgoxCAD, mtgoxCHF, mtgoxCNY, mtgoxDKK, mtgoxEUR, mtgoxGBP, mtgoxHKD, mtgoxJPY, mtgoxNZD, mtgoxPLN, mtgoxRUB, mtgoxSEK, mtgoxSGD, mtgoxTHB, rippleEUR, rippleUSD, rippleXRP, rmbtbCNY, rockEUR, rockSLL, rockUSD, vcxEUR, vcxUSD, virtexCAD, virwoxSLL, weexAUD, weexCAD, weexUSD
Past/retired exchanges (Tradehill, etc): http://we.lovebitco.in/schart/historic.scid.UTC.7z  (3.4MB/32.9MB)
  • aqoinEUR, b2cUSD, b7BGN, b7EUR, b7PLN, b7SAR, b7USD, bbmBRL, bcEUR, bcGBP, bcLREUR, bcLRUSD, bcmBMAUD, bcmBMGAU, bcmBMUSD, bcmLRUSD, bcmMBUSD, bcmPPUSD, bcmPXGAU, bcPGAU, bitchangePLN, bitfloorUSD, bitmarketAUD, bitmarketEUR, bitmarketGBP, bitmarketPLN, bitmarketRUB, bitmarketUSD, bitmeUSD, bitomatPLN, britcoinGBP, btc24EUR, btc24USD, btcexEUR, btcexJPY, btcexRUB, btcexUSD, btcexWMR, btcexWMZ, btcexYAD, btctreeUSD, cryptoxAUD, cryptoxUSD, exchbUSD, freshPLN, globalEUR, globalGBP, globalPLN, globalUSD, imcexEUR, imcexUSD, intrsngUSD, ruxumAUD, ruxumCHF, ruxumEUR, ruxumGBP, ruxumHKD, ruxumHUF, ruxumJPY, ruxumPLN, ruxumRUB, ruxumSEK, ruxumSGD, ruxumTHB, ruxumUAH, ruxumUSD, ruxumZAR, snwcnXRP, thAUD, thCLP, thEUR, thINR, thLRUSD, thUSD, wbxAUD
newbie
Activity: 26
Merit: 0
Port would be better.

I'm actually looking something like zoo of rss readers, but about trading.
full member
Activity: 124
Merit: 100
Is there any linux clone?
What GNU/Linux port of Sierra? Use wine. They say it runs..
newbie
Activity: 26
Merit: 0
slush,

Is there any linux clone?

Or how often do you make a linux port of Sierra?
hero member
Activity: 504
Merit: 500
Can you use this software to chart stamp..
Yes you can. Anything listed @ bitcoincharts all markets list. Hey try & tell us!

thx! Gonna try it when i get back from work =)
full member
Activity: 124
Merit: 100
Can you use this software to chart stamp..
Yes you can. Anything listed @ bitcoincharts all markets list.
But i think the quality wouldn't be the same. Hey try & tell us how do you like it!
hero member
Activity: 504
Merit: 500
hey =)

Can you use this software to chart bitstamp as well or is it only for mtgox?

(if not, does anyone know a software to chart bitstamp with?)

greetings
legendary
Activity: 1778
Merit: 1008
well mine stop working, and creating new user didnt fix. very sad

mines been ticking away problem free, and i haven't touched it for weeks.
sr. member
Activity: 378
Merit: 250
Born to chew bubble gum and kick ass
A temporary solution for those who like high quality charting for free

https://www.tradingview.com/e/?symbol=MTGOX:BTCUSD#
Pages:
Jump to: