newdoct
-Interested User-
Posts: 4
Joined: Jun 11, 2021
|
Posted: Jun 29, 2021 09:35 PM
Msg. 1 of 5
Hi, I'm doing some analysis on historical data and I noticed that there's an issue with the stock volume.
for otc EDS, I noticed for stock MMEX on 03/24/2021 I received this: MMEX,3,1,0.002100,136000,3,20210324, 160046,0.001300,0.002500,0.001240,0.001300,,,,,,,715078128,915839192,1171595226,1003328001,2835122197,7734,1730,1736,4268,0.013558,,,,,,,
The total Volume is 715078128 (0.7B), but the UpVolume is 1171595226 (1.17B), DownVolume is 1003328001 (1B), NeutralVolume is 2835122197 (2.83B). The number does not match here.
When I checked on some other site, the total Volume seems should be 5.01B, which makes sense.
Do we know the cause of this? And do we know if there are any more data like this?
|
newdoct
-Interested User-
Posts: 4
Joined: Jun 11, 2021
|
Posted: Jun 30, 2021 01:32 AM
Msg. 4 of 5
Hi Todd, this is end of day summary data, not minute data.
It is from the result directly from the api with request data: EDS,1,5,20210324,
do you mean the volume is the same as what directly supplied by the exchange?
It looks to me it was due to some data type conversion
The total by calculation is 5010045424, while total volume provided is 715078128. Difference is 4294967296 which is 2^32
I noticed for the daily volume, if it is > 4.3B, the number we get from the api will automatically deduct 4294967296. I've also noticed the daily volume returned by EDS command never greater than 4.3B.
additional data points for prof (all are retrieved by EDS command, please notice the difference between calculated total volume and the volume directly received by API): Symbol Date Volume(API) calculatedVol difference HCMC 20210617 170545572 4465517868 4294972296 HCMC 20210616 707350096 5002317392 4294967296 HCMC 20210602 1563198018 5858165314 4294967296 INCC 20210520 1770913032 6065880328 4294967296 HCMC 20210510 1390303020 5685270316 4294967296
If anyhow, the volume data is using int or unsigned int (32bit) to represent in the code, please consider using the data type with a bigger range. Edited by newdoct on Jun 30, 2021 at 01:33 AM
|