Alice Blue Utilize Free of Cost API to Automate Trades in Python





Open Alice Blue Trading Account Please Click Here.



CMD pip Installation Type and Enter: pip install alice_blue



Please Follow the Above Video then go for the Code Below for generation of access token and Programmatic Trading:



from alice_blue import *
import csv
access_token=AliceBlue.login_and_get_access_token(username='username',password='password',twoFA='twoFA',api_secret='api_secret')
print(access_token)
with open('access_token.txt','w') as wr1:
    wr=csv.writer(wr1)
    wr.writerow([access_token])
access_token=open('access_token.txt','r').read().strip()   
alice=AliceBlue(username='username',password='password',access_token=access_token, master_contracts_to_download=['NSE', 'BSE'])
tatasteel_nse_eq = alice.get_instrument_by_symbol('NSE', 'TATASTEEL')
print(tatasteel_nse_eq)