Reproducing Price/Volume over time chart from API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TerezaRodrigues
    Junior Member
    • Jul 2021
    • 4

    #1

    Reproducing Price/Volume over time chart from API

    I understand that the data used for creating the charts is in accordance with
    Code:
    EX_TRADED
    found in
    Code:
    listmarketbook
    .

    Code:
    ex.traded_volume → price | size
    But when trying to reproduce I came across a doubt.

    For example:

    The original graph shows a point bar with 3k volume and next one of it a 200 volume, when updating again this 3k bar rises to 10k, the 200 remains and another new one with 1k appears.

    Well, how does the chart update define if it is time to add a new value bar or if it should be added more volume to an existing one?

    I thought that with each update it recorded the new values, so in this case it would never complement an existing bar, but that's not what happens, sometimes it adds more volume to an already existing bar.

    I thought, ok, maybe if it stays at the same price, it complements the existing value and only generates a new bar if the price changes, however, sometimes the bar that receives more volume is not the most recent bar, sometimes it's the penultimate one, so new chart moves were made but it still had volumes added.
Working...
X