esp8266-crypto icon indicating copy to clipboard operation
esp8266-crypto copied to clipboard

[HTTPS] GET... failed, error: connection failed when trying to pull stock price from finnhub

Open swtrpeter37 opened this issue 3 years ago • 5 comments

Have a active api key from finnhub but I am getting the attached error code when trying to retrieve stock prices. Screenshot from 2021-08-30 21-37-35

swtrpeter37 avatar Aug 31 '21 02:08 swtrpeter37

The HTTPS key for FinnHub.io has expired (L38), I will need to regenerate it

// Fingerprint for finnhub.io - expires 27 Aug 2021
const uint8_t fingerprint_stock[20] = {0x2B, 0x34, 0xAD, 0x3F, 0x51, 0x8D, 0xA8, 0x5A, 0xD5, 0x53, 0xA3, 0x5D, 0x48, 0x13, 0x85, 0xC4, 0xA1, 0xA2, 0x60, 0x43};

I am reasonably sure that if you swap L38 for this it will work but I have no HW to test it ATM:

const uint8_t fingerprint_stock[20] = {0x95, 0xE6, 0xC6, 0x0D, 0xD3, 0x9E, 0xC0, 0xB2, 0x40, 0x7C, 0x47, 0x66, 0xB5, 0x89, 0x8F, 0x51, 0x72, 0x81, 0x27, 0xA6};

Valid until 11 Aug 2022

Once confirmed I will update main, thanks for reporting it

conorwalsh avatar Sep 02 '21 09:09 conorwalsh

@conorwalsh - This did not fix the issue. It starts progressing through the enabled cryptos and hangs up right before it is supposed to start the stocks. Below is what I am getting in serial monitor once it hangs up

HTTPS begin... HTTPS GET... [HTTPS] GET... failed, error: connection failed Wait a few seconds before next round...

swtrpeter37 avatar Sep 12 '21 01:09 swtrpeter37

where do you generate that thing and how to get my own

SsNiPeR1 avatar Sep 22 '22 19:09 SsNiPeR1

Does not work, the serial monitor reads:

HTTPS begin... HTTPS GET... [HTTPS] GET... failed, error: connection failed Wait a few seconds before next round...

now:

Wait a few seconds before next round...

Wait a few seconds before the next round...

How can this be solved?

MambaLoski avatar Nov 07 '22 20:11 MambaLoski

The cryptonator.com API is now dead so I would have to update the project to use a new API to make it work unfortuantely. If anyone has the time or HW to do so Pull Requests are welcome

conorwalsh avatar Oct 10 '23 19:10 conorwalsh