Get Ticker List
-
I want to get tickerList on the basis of API_KEY
const url = 'https://smartapi.angelbroking.com/rest/user/getMWStocks';
const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key
axios.get(url, {
headers: {
'X-UserType': 'USER',
'X-SourceID': 'WEB',
'Authorization':Bearer ${apiKey}
,
}
})
.then(response => {
if (response.status === 200) {
const tickerList = response.data.data;
console.log(tickerList);
}
})
.catch(error => {
console.error('Error fetching data:', error);
});