Author |
Topic: GF COM API Range/Volume Bar Subscription vs History Request (3 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
After requesting history for volume bars and range bars, we then subscribe to them.
There is an issue with the most recent bar coming back during the subscription vs the historical request. The most recent subscription, if the most recent historical bar doesn't meet the requirements, has a different bar timestamp. Here is an example. Requesting Volume 1000 bars so that once the volume hits 1000, we get a new bar. When doing the historical request, for an example, we get a bar at 7:25 PM which is the most recent valid historical request. Then when we get the subscription request back, the first subscription has a different timestamp, in this case it is 7:32 PM. The 7:25 PM bar does not have 1000 volume yet, but the subscription came back as a different timestamp indicating a new bar. Will you please make it so that the subscription has the same timestamp as the most current history request bar (unless the most recent history request bar has the correct volume). This issue also happens on range bars. Thanks |
||||
JSmith5611 Posts: 187 Joined: |
Because of the way that volume / range bars are created, that's really not possible.
They are generated based on the timestamps that are passed in (or current time if none is given) The better way of doing this is to do the subscription first, then doing the historical request using the timestamps of the first bar you get back from the subscription (this is how trader does it) Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
Sounds good, we will implement it that way, thank you very much.
|
||||