Finnhub API provides institutional-grade financial data to investors, fintech startups and investment firms. We support real-time stock price, global fundamentals and alternative data. https://finnhub.io/docs/api
Hi, I get the following message. Do you know why ?
Fatal error: Uncaught Finnhub\ApiException: [403]
Client error: GET https://finnhub.io/api/v1/forex/rates?base=USD&token=XXX resulted in a 403 Forbidden
response: {"error":"You don't have access to this resource."} in /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php:10504
Stack trace:
Hi, I get the following message. Do you know why ?
Fatal error: Uncaught Finnhub\ApiException: [403] Client error:
GET https://finnhub.io/api/v1/forex/rates?base=USD&token=XXX
resulted in a403 Forbidden
response: {"error":"You don't have access to this resource."} in /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php:10504 Stack trace:0 /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php(10479): Finnhub\Api\DefaultApi->forexRatesWithHttpInfo('USD', NULL)
1 /index.php(45): Finnhub\Api\DefaultApi->forexRates('USD')
2 {main} thrown in /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php on line 10504
<?php $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKey('token', 'XXX'); $client = new Finnhub\Api\DefaultApi( new GuzzleHttp\Client(), $config ); $client->forexRates("USD"); ?>