You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feeling that barchart has protected itself from bots getting data for free. It has been protected against bots with cloudflare or another protection system.
I have been trying all weekend to see what was happening, and it seems that it detects that it is not a real browser and does not send the cookie with the necessary token.
@anannnchim thanks for flagging this, I didn't notice. It does look like something has changed at Barchart. I'll look into it but it may take a while as I'm not using this currently and my premier subscription has expired
I have re-implemented this using a real browser with playwright. See the PR. Initial testing looks good. If anyone can help me with testing it would be appreciated. Post any issues or comments on the PR
I tested PR #40 successfully. The browser launched correctly, Barchart login completed without the previous CSRF/XSRF-token error, and a single-contract download produced a valid CSV containing Time, Open, High, Low, Close, and Volume data. Persisted authentication also worked as expected.
From my testing, PR #40 resolves the login issue reported here. Thank you for implementing the browser-based flow.
Activity
algo0749 commentedon Aug 31, 2026
I have a feeling that barchart has protected itself from bots getting data for free. It has been protected against bots with cloudflare or another protection system.
I have been trying all weekend to see what was happening, and it seems that it detects that it is not a real browser and does not send the cookie with the necessary token.
I personally have not found the solution.
bug-or-feature commentedon Aug 31, 2026
@anannnchim thanks for flagging this, I didn't notice. It does look like something has changed at Barchart. I'll look into it but it may take a while as I'm not using this currently and my premier subscription has expired
bug-or-feature commentedon Sep 5, 2026
I have re-implemented this using a real browser with playwright. See the PR. Initial testing looks good. If anyone can help me with testing it would be appreciated. Post any issues or comments on the PR
anannnchim commentedon Sep 14, 2026
I tested PR #40 successfully. The browser launched correctly, Barchart login completed without the previous CSRF/XSRF-token error, and a single-contract download produced a valid CSV containing Time, Open, High, Low, Close, and Volume data. Persisted authentication also worked as expected.
From my testing, PR #40 resolves the login issue reported here. Thank you for implementing the browser-based flow.
bug-or-feature commentedon Sep 14, 2026
@anannnchim thanks. I've been testing too, all good. I'll merge the PR shortly, and do a new release
bug-or-feature commentedon Sep 14, 2026
fixed by #40