krishnavelu / alice_blue

Official Python library for Alice Blue API trading
GNU General Public License v3.0
134 stars 82 forks source link

how to install alice_blue on python #8

Closed sailoo121 closed 5 years ago

sailoo121 commented 5 years ago

sir, please make video on how to install python alice_blue package on python. I have installed Anaconda3 when in type "pip install alice_blue" in cmd its showing error.

please make a video so that so many people can solve this problem

thanks

boini sailoo hyderabad india

krishnavelu commented 5 years ago

Hello,

There are already so many videos available on 'how to install a package in python'. Alice Blue is just another package. It goes very well in normal python 3.7 (without anaconda) installation. I've not tested in anaconda environment.

Please be specific about your problem. Give more details about what problem you are facing, so that I can help you.

On Sat, Jun 15, 2019 at 8:46 AM sailoo121 notifications@github.com wrote:

sir, please make video on how to install python alice_blue package on python. I have installed Anaconda3 when in type "pip install alice_blue" in cmd its showing error.

please make a video so that so many people can solve this problem

thanks

boini sailoo hyderabad india

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/krishnavelu/alice_blue/issues/8?email_source=notifications&email_token=AJFI6JWGM44ZQVWQ6HYIQ4TP2TQDVA5CNFSM4HYO67B2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZWFHTA, or mute the thread https://github.com/notifications/unsubscribe-auth/AJFI6JRE5I2XVVW53PGQERTP2TQDVANCNFSM4HYO67BQ .

-- Regards Krishna Velu +1-315-849-8700

krishnavelu commented 5 years ago

PUT YOUR CAPS OFF!!! Don't shout in online forum.

krishnavelu commented 5 years ago
Error occurred. Please verify your api_secret

Did you got api_secret from alice blue?

krishnavelu commented 5 years ago

Activate API trading in your account. You’ll get client secret...

On Tue, Jun 18, 2019 at 21:41 MoraleJ notifications@github.com wrote:

how to get that... ? AliceBlue Team is not respoding on this Query

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/krishnavelu/alice_blue/issues/8?email_source=notifications&email_token=AJFI6JTDT4TIUWDOVPLSO3DP3GFC7A5CNFSM4HYO67B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYANVQY#issuecomment-503372483, or mute the thread https://github.com/notifications/unsubscribe-auth/AJFI6JS3WPCHN23OBG77G4DP3GFC7ANCNFSM4HYO67BQ .

-- Regards Krishna Velu +1-315-849-8700

MoraleJ commented 5 years ago

Krishna,

I received API secret from AliceBlue...

I have one question here in 2fA Do we need to provide all answers or what??

access_token = AliceBlue.login_and_get_access_token(username='username', password='password', twoFA='a', api_secret='api_secret')

krishnavelu commented 5 years ago

Its better to change your 2fa to ‘a’ Or else keep both answers same and pass that as argument as 2fa

MoraleJ commented 5 years ago

Its not working sir.. I am not getting how to get Access Token correctly..

krishnavelu commented 5 years ago

With the information “Its not working” no one in this world can help you other than you. Post some code snippet of what you’ve tried and what’s the error message you are getting.

MoraleJ commented 5 years ago

Hello Krishna,

Note: Alice_Blue Team is saying everything working at their end

This is error...

image

krishnavelu commented 5 years ago

Either one or multiple of your account you are passing as argument is wrong.

  1. User name
  2. Password
  3. 2FA
  4. Client secret
  5. Redirect URL. Very all the above. Else post code snippet.
MoraleJ commented 5 years ago

Can you explain how we should use

twoFA=' '

As we answers 2 questions when we log in through normal login...

I am troubling you as... AliceBlue Team is not helping me... As they themself don't understand the issue... And even don't have forums like Upstox and Zerodha...

So you are the only one person who can help me... If this does not resolved then I don't have option other than Zerodha and upstox... Which I don't want to do...

Trying to communicate with Aliceblue Team since last 15 Days... But they are not able to help me...

It will be really grateful if you do something for my issue... I am ready to share login details with you if you need...

krishnavelu commented 5 years ago

What is your answers of 2 factor authentication for your account...?

MoraleJ commented 5 years ago

As per your suggestion I made all of them as

a

MoraleJ commented 5 years ago

a

For all 2fA queso..

krishnavelu commented 5 years ago

Then pass twoFA=‘a’

MoraleJ commented 5 years ago

I tried this

twoFA='a'

but its not working..

image

MoraleJ commented 5 years ago

even i tried like this as well as we answer 2 twoFA question in normal login..

twoFA='aa'

and i get this error... I dont know why looking at this i have feeling like AliceBlue team has assigned me wrong API Secret... But they are saying no i we have assigned you correct API Secret... Loosing hopes from AliceBlue seriously ..

image

image

krishnavelu commented 5 years ago

image

ValueError: substring not found should not come. If possible printout the response you are getting.

print(resp) Before the exception line.

MoraleJ commented 5 years ago

When I use twoFA= 'a'

I get this error...

MoraleJ commented 5 years ago

And when I try twoFA= 'aa'...

Then I get this error....

krishnavelu commented 5 years ago

Please print the response you are getting. And paste the results. Insert a line print(resp) in alice_blue.py line no 244.

MoraleJ commented 5 years ago

And Aliceblue Team is saying they have assigned me correct API secret...

Really frustrating Experience...

MoraleJ commented 5 years ago

Krish Sir,

Issue is resolved there was issue with API Secret... I really appreciate support keep doing good work.

Thanks alot...

krishnavelu commented 5 years ago

Closing this issue as its resolved.

PRAKSH24884 commented 4 years ago

Sir my error is value error Substring not find please help

hareeshg60 commented 4 years ago

Is activating the api is free or paid?

krishnavelu commented 4 years ago

Its paid.

hareeshg60 commented 4 years ago

How much is the cost? And i do i get one?

On Sat, 14 Mar, 2020, 10:55 PM Krishna Velu, notifications@github.com wrote:

Its paid.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/krishnavelu/alice_blue/issues/8#issuecomment-599104144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORIL5AR6LNQ2U7M2EWYEILRHO4Z7ANCNFSM4HYO67BQ .

krishnavelu commented 4 years ago

Contact alice customer care

mahendran8888 commented 4 years ago

import csv from login import from alice_blue import access_token=AliceBlue.login_and_get_access_token(username='AB13',password='pra',twoFA='a',api_secret='CY19I1U0FIKGS5UPH9ENJGMZ52L5D3WA383OA15T8L69MAJTYAQ2QRN6LBEPQZWM') print(access_token)

This is my error:

Couldn't get access token {'error': 'invalid_grant', 'error_description': 'The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client', 'status_code': 400} None

alrtor commented 4 years ago

Change two factor to "a" and then try to get access token. Change twoFA at below url https://ant.aliceblueonline.com/

dharmaraj81 commented 4 years ago

Hi

The same error what @MoraleJ met

My code is

import logging logging.basicConfig(level=logging.DEBUG)

from alice_blue import *

access_token = AliceBlue.login_and_get_access_token(username='AB054905', password='****', twoFA='a', api_secret='WFSL8KJ3ILH413JL7CY1O35362CZ07XSYQR13RXXWV8HDWDM2FU8HZ23KYP')

print(access_token)

_** i have adjusted password and api_secret here_

But i have received error

ERROR:alice_blue.alice_blue:Couldn't get access token {'error': 'invalid_grant', 'error_description': 'The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client', 'status_code': 400}

if i contact to API team, they said, everything ok in their end

i dont know, how i can solve it

Thanks Dharma

dharmaraj81 commented 4 years ago

Hi @krishnavelu

Pls have a look on my code snippet above

and let me know the solutions

Thanks Dharma

jaydave1988 commented 4 years ago

Hi @krishnavelu ,

I am also getting the same error for few of my clients...

dharmaraj81 commented 4 years ago

Hi @jaydave1988

Have you got any solution for this issue, still my end, i am not able to generate token

but API team said, that they tested the credentials, and they can generate the access token

but i dont know how they have done the test

if you find the way to fix it, pls let me know

thanks dharma

dharmaraj81 commented 4 years ago

Hi @MoraleJ & @mahendran8888

you have met the same error when you connect and get the access token, have you resolved it??

if yes, pls let me know the way to resolve it

thanks dharma

dharmaraj81 commented 4 years ago

hi @krishnavelu

if i tried with Postman, it says, following error

image

pls find the solution for it tks

mahendran8888 commented 4 years ago

Hi

The same error what @MoraleJ met

My code is

import logging logging.basicConfig(level=logging.DEBUG)

from alice_blue import *

access_token = AliceBlue.login_and_get_accesstoken(username='AB054905', password='****', twoFA='a', api_secret='WFSL8KJ3ILH413JL7CY1O35362CZ07XSYQR13RXXWV8HDWDM2FU8HZ23KYP_')

print(access_token)

_** i have adjusted password and api_secret here_

But i have received error

ERROR:alice_blue.alice_blue:Couldn't get access token {'error': 'invalid_grant', 'error_description': 'The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client', 'status_code': 400}

if i contact to API team, they said, everything ok in their end

i dont know, how i can solve it

Thanks Dharma

What is your two factor authentication is it 'a'

dharmaraj81 commented 4 years ago

access_token = AliceBlue.login_and_get_accesstoken(username='AB054905', password='****', twoFA='a', api_secret='WFSL8KJ3ILH413JL7CY1O35362CZ07XSYQR13RXXWV8HDWDM2FU8HZ23KYP_')

yes, pls see here, i have given 'a' only

tks

dharmaraj81 commented 4 years ago

Hi @mahendran8888

tks for help, now only i could understand the issue about twoFA, now i set it fine, and connected, generated access token

but now i met new issue

image

pls have a look on screenshot, if you can, help me to fix it

tks

jaydave1988 commented 4 years ago

After resetting twofa key, it is working perfectly.

jaydave1988 commented 4 years ago

@dharmaraj81 , Sometimes aliceblue server is going down, so you will receive this type of error. try after some time, you will be able to login.

krishnavelu commented 4 years ago

@all verify your api id, api secret and redirect url. If anything is wrong, you get this error. Also try during market time if you are trying it first time.

MoraleJ commented 4 years ago

Sorry for late reply...

Is anyone waiting for something from me...??

MoraleJ commented 4 years ago

IMG_20200731_155437_364

No need to use Postman for access token generation..use code like this... @dharmaraj81

siddhesh1594 commented 4 years ago

After resetting twofa key, it is working perfectly.

what do you mean by resetting? Capture111 Capture22

krishnavelu commented 4 years ago

reset you 2FA to 'a'. Or both 2FA to same answer and pass that while creating AliceBlue object.