twelvedata/twelvedata-python

[Bug] Weekend data (inconsistently) appearing in time_series data.

EdgyEdgemond opened this issue · 1 comments

Describe the bug
When requesting time_series data, saturday/sunday candles randomly appear. (I'm assuming this is a bug server side and not python side. But not sure how to raise that).

1day: saturday candle (2022-03-05)

{'datetime': '2022-03-07', 'open': '1.32290', 'high': '1.32410', 'low': '1.31025', 'close': '1.31245'}
{'datetime': '2022-03-05', 'open': '1.32385', 'high': '1.32495', 'low': '1.32175', 'close': '1.32275'}
{'datetime': '2022-03-04', 'open': '1.33515', 'high': '1.33575', 'low': '1.32025', 'close': '1.32375'}

8hour: sunday candles appear (no saturday candle though) (2022-03-06)

{'datetime': '2022-03-06 22:00:00', 'open': '1.31995', 'high': '1.32290', 'low': '1.31415', 'close': '1.31540'}
{'datetime': '2022-03-06 14:00:00', 'open': '1.32290', 'high': '1.32410', 'low': '1.31860', 'close': '1.31990'}
{'datetime': '2022-03-04 14:00:00', 'open': '1.32385', 'high': '1.32495', 'low': '1.32175', 'close': '1.32275'}
{'datetime': '2022-03-04 06:00:00', 'open': '1.33120', 'high': '1.33170', 'low': '1.32025', 'close': '1.32375'}

To Reproduce
Steps to reproduce the behavior:

    c = TDClient(apikey=XXXX)

    td = c.time_series(
        symbol="GBP/USD",
        interval="1day",
        outputsize=10,
        timezone="UTC",
    )

Expected behavior
Data for times when the market is closed doesn't appear, or at least appears consistently.

The issue is related to the API rather than the package. Please, reach service support here.