Logging in to alice blue

Tried logging in to alice blue using
from alice_blue import *
access_token = AliceBlue.login_and_get_access_token(username=‘xxxx’, password=‘xxxx’, twoFA=‘a’, api_secret=‘xxx’)
but it is returning access token as none.

1 Like

This python module of alice_blue is not using the Oauth Module. Alice blue charges 500 INR for account-specific API but the one we have has the power to login to multiple accounts opened under specific sub-brokers.

I have given you the exact code for using OAuth Module in Slack as well as given a video demonstration on how to use it.

Happy trading!

PS: You can code the logic from there to this python module and this module will work as well. This module is coded by Krishna. He may have patches for making Oauthway work. Ask him personally in Slack.


which code you are talking about ?
can you please tell me


Can you please point me to a proper script to work with alice blue API. I have the API key, username and password. i am using krishna library as a wrapper to login but i am unable to login so far. just did a workaround by copying session token by manually login in and using it in the krishna’s script.

Thanks for your help.

I didn’t developed Krishna’s library. It is developed by Krishna. You can ask him in Slack. I have developed the library I just shared a link with.

Mine will work. Let me know where you’re stuck.

Hi dexter,

i ran the handle_streams method with websocket.enableTrace(True). Market is now closed and I hope this below Err message is Errno 110 is normal.
:arrow_forward: python ws_client.py
[Errno 110] Connection timed out


Unsure. Check in market time.

If you know about https://www.squareoff.in/ website. they allow to place order from their website using alice blue api.
can you guide which API we have to use for the same logic.
Thanks in advance.

Yes he runs some shit strategies that make him brokerage. Anyways, You can place order using Alice Blue API in many ways.

Try our slack channel bots or https://alicebot.in/. They function in same way. Google Oauth2 Mechanism (Like Facebook Login button?)

As Zerodha issued a guideline telling their marketing partners can not engage in fully Automated trading (See their streak, sensibull doesn’t allow full automated trading) I will suggest you to avoid this path.

But if you are making for “just aliceblue” go ahead.