Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Conversation

@gezmisozkan
Copy link

Hi, I found an issue in timestamp parsing on Windows. When fetching symbols
with very old history (e.g. XAUUSD on OANDA), TradingView returns negative
Unix timestamps for pre-1970 data. datetime.fromtimestamp raises OSError on
Windows for negative values, causing get_hist to fail.

Replacing fromtimestamp with an epoch + timedelta(seconds) calculation fixes
the problem and works consistently across Windows, Linux, and macOS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant