EOD Data for NSE

Data for nse with API using python

The most important resource for algorithm development is: Data

To collect NSE End Of Day data we can use API calls.

Language: Python 3.6

import os
import pandas as pd

list_of_stocks = ['HDFCBANK','RELIANCE']

def get_eod_data_cash_stocks(list_of_stocks):
    count = 0
    for symbol in list_of_stocks:
        if count % 5 == 0 and count > 0:
            url = 'https://www.alphavantage.co/query?function='+
            df = pd.read_csv(url)
            df = df.iloc[::-1]
            count += 1
            print(symbol, count)
    print('Data Downloaded')    # print(symbol)



Leave a Reply

Your email address will not be published. Required fields are marked *