I generated an API access token last night which, still shows that it is valid for another 13 hours (as of this morning). But, when my code tried to use it, I received the error: “Invalid Token” (DH-906).
To confirm, I created another access token just now, and this new token works perfectly fine with the same code. So the issue is not with the code. The request (for OHLCV historical data, but I tested with other trading and data endpoints as well) works when using the newly generated token. The old token, in spite of showing as valid, does not work.
Because of this glitch, I missed out on trading in today’s early market session, which is usually when I make most of my profits. Please ensure this issue does not occur again tomorrow.