Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

What is the basis for merging volumes? #103

Open
siderace opened this issue Jun 15, 2020 · 2 comments
Open

What is the basis for merging volumes? #103

siderace opened this issue Jun 15, 2020 · 2 comments

Comments

@siderace
Copy link

What is the basis for merging volumes?

I think it's in micrometers, is there a micrometer range? Or are there any other standards? Are the standards different for each exchange?

@Tucsky
Copy link
Owner

Tucsky commented Jun 15, 2020

If you are referring to the way trades are merged into one in the list, its based on milliseconds.
Most exchanges don't provide micro precision.
So once a trade is received, it becomes a bucket.
For every trades that come with the same exchange, side and same time (ms), its being added to the bucket (simple sum for vol, volume weighed average for bucket price).
If a trade come from same exchange but different side or time > bucket time, bucket is released and dispatched to the list...
Sometime no trades come to release it on time, and bucket is released by timeout (bucket time + 50ms).
Same for all exchanges, no obscure trickery here 😄

@siderace
Copy link
Author

Thank you very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants