I’m subscribed to the Yahoo Finance API via RapidAPI and I’m calling the API using axios like this:
const apiKey = ref([MY API KEY])
const apiURL = ref('https://yahoo-finance127.p.rapidapi.com')
const headers = ref({
'x-rapidapi-key': apiKey.value,
'x-rapidapi-host': apiURL.value
})
axios.get(apiURL.value + '/price/NVDA', { headers: headers.value })
.then(response => console.log(response.data.data))
.catch(error => console.error(error.message))
Any idea why this is returning an error 500?