Bitcoin Forum
December 14, 2024, 05:14:34 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Re: Discussion for MtGox trade data downloader  (Read 406 times)
bitranox (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0



View Profile
August 26, 2013, 11:03:11 PM
 #1

this is some comment to following post https://bitcointalk.org/index.php?topic=221055.msg2945085#msg2945085

unfortunately I am only allowed to post in the newbie secton right now - however :

nitrous posted :
Quote
For other less popular currencies, however, I have found that there are many gaps, some quite long, and so without regular bq updates this is liable to break a script. Of course if you have an up to date database and can run your script regularly, at least once per day, this will not be a problem as you will catch all trades as they come in. Alternatively, you could manually advance the last_id if you haven't caught up to the current time yet, but you need to confirm the limit is indeed 86400s first.

The (very good and appreciated) "Unofficial Documentation for MtGox's HTTP API v2" has some glitches in the description for the API function money/trades/fetch :

(see https://bitbucket.org/nitrous/mtgox-api#markdown-header-moneytradesfetch)

there are not really "gaps" (except the one big gap for USD when they switch from a counter to microtimestamp)

the mtGox API function money/trades/fetch simply works as follows :

- it will return maximum 1000 records if a microtimestamp is transfered as parameter.
- and it will return maximum the trades that happend 86400 seconds after the given microtimestamp

if You dont pass a microtimestamp to the function You will receive the tradedate for a given currencypair within the last 86400 seconds (24 hours).
In that case the "1000 record" limit does not apply.

If no trades happened within the timespan of 86400 seconds for a given currencypair, You will not get back any datarows - what will only happen for some rarely traded currencypairs

so - if there were simply no trades within 24 hours, You will not receive any datarows back.
In that case You will need to add 86400 seconds to the timestamp (respectively 86400 * 1E6 microseconds) and query again for the next day.

As nitrox pointed out in some other posts, I would not recommend that every user should download the full trade history from mtgox because of serverload issues, etc ...

however - since the bq database is not updated until now, I will provide the full dumps until up-to-date in the next couple of days. (what will be updated daily or hourly - I wait for user requests on that issue)

I would love to post that on the forum that matters, not just in that newbie ......
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!