GithubHelp home page GithubHelp logo

krishnavelu / alice_blue Goto Github PK

View Code? Open in Web Editor NEW
133.0 29.0 82.0 123 KB

Official Python library for Alice Blue API trading

License: GNU General Public License v3.0

Python 100.00%
alice-blue python-library aliceblue trading trading-api stock-trading stock-market official api api-wrapper python sdk

alice_blue's Introduction

Official Python SDK for Alice Blue API

The Official Python library for communicating with the Alice Blue APIs.

Alice Blue Python library provides an easy to use wrapper over the HTTPS APIs.

The HTTP calls have been converted to methods and JSON responses are wrapped into Python-compatible objects.

Websocket connections are handled automatically within the library.

  • Author: krishnavelu
  • Unofficed is strategic partner of Alice Blue responsible for this git.
  • Alice Blue API trading is free for Unofficed members. Follow this to get API free.

Installation

This module is installed via pip:

pip install alice_blue

To force upgrade existing installations:

pip uninstall alice_blue
pip --no-cache-dir install --upgrade alice_blue

Getting started with API

Overview

There is only one class in the whole library: AliceBlue. The login_and_get_sessionID() static method is used to retrieve session ID from alice blue server. A session ID is valid for 24 hours. With session ID, you can instantiate an AliceBlue object. Ideally you only need to create a session ID once every day. Once the session ID is created new, it'll be stored in a temporary location. Next time, the same session ID will be used.

REST Documentation

The original REST API documentation is available here.

Using the API

Logging

The whole library is equipped with python's logging module for debugging. If more debug information is needed, enable logging using the following code.

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

Geting API Id and API secret

api_secret is unique for each and every account. You need to enable api trading and get api_secret from alice blue.

  1. Login to developer console.
  2. Click on 'Create New App'.
  3. Enter 'App Name' as you like. Enter 'Redirect URL' and 'Post Back URL' as https://ant.aliceblueonline.com/plugin/callback.
  4. Click on 'Save'.
  5. Copy the 'App Code' and 'App Secret'. You will need these to generate a session ID.

Getting an session ID

  1. Import alice_blue
from alice_blue import *
  1. Create session_id using login_and_get_sessionID() function with your username, password, 2FA (2fa is now year of birth), app_id and api_secret.
session_id = AliceBlue.login_and_get_sessionID(   username    = "username", 
                                                    password    = "password", 
                                                    twoFA       = "1993",
                                                    app_id      = "app_id",
                                                    api_secret  = "api_secret")

Problem getting access token

If you are facing problem getting access token, make sure the following are correct.

  1. username.
  2. password.
  3. 2FA.
  4. api secret.
  5. app id.

Even after verifying all these, if you are facing problem, contact alice customer care. They should enable the API access in their end. Don't create a new issue in this library for OAuth Error.

Create AliceBlue Object

Once you have your session_id, you can create an AliceBlue object with your session_id and username.

alice = AliceBlue(username = "username", session_id = session_id)

You can run these commands to check your newly created alice blue object.

  1. Get Balance
  2. Get Profile
  3. Get Daywise positions
  4. Get Netwise positions
  5. Get Holding positions

Get Balance

Code:

print(alice.get_balance()) # get balance / margin limits

Sample response

[{'symbol': 'ALL', 'cncMarginUsed': '0', 'spanmargin': '159440.00', 'branchAdhoc': '0.000000', 'adhocMargin': '0.000000', 'payoutamount': '0.00', 'cdsSpreadBenefit': '0', 'adhocscripmargin': '0.00', 'exposuremargin': '7774.30', 'scripbasketmargin': '0.00', 'credits': '114028.29', 'segment': 'ALL', 'net': '95012.20', 'turnover': '0.00', 'grossexposurevalue': '0.00', 'mfssAmountUsed': '0.00', 'realizedMtomPrsnt': '-6075.80', 'product': 'ALL', 'stat': 'Ok', 'cncSellCrditPrsnt': '0', 'debits': '243846.09', 'varmargin': '0.00', 'multiplier': '10.00', 'elm': '0.00', 'mfamount': '0.00', 'cashmarginavailable': '119428.29', 'brokeragePrsnt': '355.990260', 'cncRealizedMtomPrsnt': '0', 'notionalCash': '0.000000', 'directcollateralvalue': '0.00', 'cncBrokeragePrsnt': '0', 'valueindelivery': '0', 'nfoSpreadBenefit': '0', 'losslimit': '0', 'subtotal': '243846.09', 'rmsPayInAmnt': '0', 'unrealizedMtomPrsnt': '-0.00', 'coverOrderMarginPrsnt': '0', 'exchange': 'ALL', 'category': 'ABFS-COMMON', 'collateralvalue': '0.00', 'rmsIpoAmnt': '0', 'cncUnrealizedMtomPrsnt': '0', 'premiumPrsnt': '0'}, {'symbol': 'ALL', 'cncMarginUsed': '0', 'spanmargin': '0.00', 'branchAdhoc': '0.000000', 'adhocMargin': '0.000000', 'payoutamount': '0.00', 'cdsSpreadBenefit': '0', 'adhocscripmargin': '0.00', 'exposuremargin': '0.00', 'scripbasketmargin': '0.00', 'credits': '0.00', 'segment': 'COM', 'net': '0.00', 'turnover': '0.00', 'grossexposurevalue': '0.00', 'mfssAmountUsed': '0.00', 'realizedMtomPrsnt': '-0.00', 'product': 'ALL', 'stat': 'Ok', 'cncSellCrditPrsnt': '0', 'debits': '0.00', 'varmargin': '0.00', 'multiplier': '1.00', 'elm': '0.00', 'mfamount': '0.00', 'cashmarginavailable': '0.00', 'brokeragePrsnt': '0', 'cncRealizedMtomPrsnt': '0', 'notionalCash': '0.000000', 'directcollateralvalue': '0.00', 'cncBrokeragePrsnt': '0', 'valueindelivery': '0', 'nfoSpreadBenefit': '0', 'losslimit': '0', 'subtotal': '0.00', 'rmsPayInAmnt': '0', 'unrealizedMtomPrsnt': '-0.00', 'coverOrderMarginPrsnt': '0', 'exchange': 'ALL', 'category': 'NO_VAL', 'collateralvalue': '0.00', 'rmsIpoAmnt': '0', 'cncUnrealizedMtomPrsnt': '0', 'premiumPrsnt': '0'}]

Get Profile

Code

print(alice.get_profile()) # get profile

Sample response

{'accountStatus': 'Activated', 'dpType': 'CDSL', 'accountId': 'SP220xx', 'sBrokerName': 'ALICEBLUE', 'product': ['NRML', 'MIS', 'CNC', 'CO', 'BO'], 'accountName': 'xxxx xxxx', 'cellAddr': 'xxxxxxxxxx', 'emailAddr': '[email protected]', 'exchEnabled': 'bcs_fo|mcx_fo|nse_cm|bse_cm|nse_fo'}

Get Daywise Positions

Code

print(alice.get_daywise_positions()) # get daywise positions

Sample response

[{'realisedprofitloss': '-7,217.50', 'Fillsellamt': '292,062.50', 'Netqty': '0', 'Symbol': 'EICHERMOT', 'Instname': 'NA', 'Expdate': 'NA', 'LTP': '3,355.10', 'Opttype': 'XX', 'BLQty': 1.0, 'Token': '910', 'Fillbuyamt': '299,280.00', 'Fillsellqty': '87', 'Tsym': 'EICHERMOT-EQ', 'sSqrflg': 'Y', 'unrealisedprofitloss': '0.00', 'Buyavgprc': '3,440.00', 'MtoM': '-7,217.50', 'stat': 'Ok', 's_NetQtyPosConv': 'N', 'Sqty': '87', 'Sellavgprc': '3,357.04', 'PriceDenomenator': '1', 'PriceNumerator': '1', 'actid': 'SP220xx', 'posflag': 'true', 'Pcode': 'MIS', 'Stikeprc': '0', 'Bqty': '87', 'BEP': '0.00', 'Exchange': 'NSE', 'Series': 'EQ', 'GeneralDenomenator': '1', 'Type': 'DAY1', 'Netamt': '-7,217.50', 'companyname': 'EICHER MOTORS LTD', 'Fillbuyqty': '87', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_cm', 'discQty': '10'}, {'realisedprofitloss': '1,141.70', 'Fillsellamt': '298,216.70', 'Netqty': '0', 'Symbol': 'M&M', 'Instname': 'NA', 'Expdate': 'NA', 'LTP': '1,274.65', 'Opttype': 'XX', 'BLQty': 1.0, 'Token': '2031', 'Fillbuyamt': '297,075.00', 'Fillsellqty': '233', 'Tsym': 'M&M-EQ', 'sSqrflg': 'Y', 'unrealisedprofitloss': '0.00', 'Buyavgprc': '1,275.00', 'MtoM': '1,141.70', 'stat': 'Ok', 's_NetQtyPosConv': 'N', 'Sqty': '233', 'Sellavgprc': '1,279.90', 'PriceDenomenator': '1', 'PriceNumerator': '1', 'actid': 'SP220xx', 'posflag': 'true', 'Pcode': 'MIS', 'Stikeprc': '0', 'Bqty': '233', 'BEP': '0.00', 'Exchange': 'NSE', 'Series': 'EQ', 'GeneralDenomenator': '1', 'Type': 'DAY1', 'Netamt': '1,141.70', 'companyname': 'MAHINDRA & MAHINDRA LTD', 'Fillbuyqty': '233', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_cm', 'discQty': '10'}]

Get Netwise Positions

Code

print(alice.get_netwise_positions()) # get netwise positions

Sample response

[{'Instname': 'NA', 'Expdate': 'NA', 'CFsellqty': '0', 'Opttype': 'XX', 'Token': '910', 'CFSellavgprc': '0.00', 'sSqrflg': 'Y', 'unrealisedprofitloss': '0.00', 's_NetQtyPosConv': 'N', 'FillbuyamtCF': '0.00', 'Sqty': '87', 'Sellavgprc': '3,357.04', 'actid': 'SP220xx', 'netbuyamt': '299,280.00', 'Pcode': 'MIS', 'Bqty': '87', 'NetBuyavgprc': '3440.0', 'Exchange': 'NSE', 'companyname': 'EICHER MOTORS LTD', 'netbuyqty': '87', 'realisedprofitloss': '-7,217.50', 'Fillsellamt': '292,062.50', 'Netqty': '0', 'Symbol': 'EICHERMOT', 'LTP': '3,355.10', 'BLQty': 1.0, 'Fillbuyamt': '299,280.00', 'Fillsellqty': '87', 'Tsym': 'EICHERMOT-EQ', 'CFbuyqty': '0', 'Buyavgprc': '3,440.00', 'netSellamt': '292,062.50', 'MtoM': '-7,217.50', 'stat': 'Ok', 'FillsellamtCF': '0.00', 'PriceDenomenator': '1', 'netsellqty': '87', 'PriceNumerator': '1', 'posflag': 'true', 'Stikeprc': '0', 'BEP': '0.00', 'Series': 'EQ', 'GeneralDenomenator': '1', 'Type': 'DAY1', 'Netamt': '-7,217.50', 'NetSellavgprc': '3357.04', 'CFBuyavgprc': '0.00', 'Fillbuyqty': '87', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_cm', 'discQty': '10'}, {'Instname': 'NA', 'Expdate': 'NA', 'CFsellqty': '0', 'Opttype': 'XX', 'Token': '2031', 'CFSellavgprc': '0.00', 'sSqrflg': 'Y', 'unrealisedprofitloss': '0.00', 's_NetQtyPosConv': 'N', 'FillbuyamtCF': '0.00', 'Sqty': '233', 'Sellavgprc': '1,279.90', 'actid': 'SP220xx', 'netbuyamt': '297,075.00', 'Pcode': 'MIS', 'Bqty': '233', 'NetBuyavgprc': '1275.0', 'Exchange': 'NSE', 'companyname': 'MAHINDRA & MAHINDRA LTD', 'netbuyqty': '233', 'realisedprofitloss': '1,141.70', 'Fillsellamt': '298,216.70', 'Netqty': '0', 'Symbol': 'M&M', 'LTP': '1,274.65', 'BLQty': 1.0, 'Fillbuyamt': '297,075.00', 'Fillsellqty': '233', 'Tsym': 'M&M-EQ', 'CFbuyqty': '0', 'Buyavgprc': '1,275.00', 'netSellamt': '298,216.70', 'MtoM': '1,141.70', 'stat': 'Ok', 'FillsellamtCF': '0.00', 'PriceDenomenator': '1', 'netsellqty': '233', 'PriceNumerator': '1', 'posflag': 'true', 'Stikeprc': '0', 'BEP': '0.00', 'Series': 'EQ', 'GeneralDenomenator': '1', 'Type': 'DAY1', 'Netamt': '1,141.70', 'NetSellavgprc': '1279.9', 'CFBuyavgprc': '0.00', 'Fillbuyqty': '233', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_cm', 'discQty': '10'}, {'Instname': 'OPTIDX', 'Expdate': '1 Sep, 2022', 'CFsellqty': '0', 'Opttype': 'CE', 'Token': '51698', 'CFSellavgprc': '0.00', 'sSqrflg': 'Y', 'unrealisedprofitloss': '555.00', 's_NetQtyPosConv': 'N', 'FillbuyamtCF': '18,570.00', 'Sqty': '0', 'Sellavgprc': '0.00', 'actid': 'SP220xx', 'netbuyamt': '18,570.00', 'Pcode': 'NRML', 'Bqty': '0', 'NetBuyavgprc': '441.0', 'Exchange': 'NFO', 'companyname': '', 'netbuyqty': '50', 'realisedprofitloss': '0.00', 'Fillsellamt': '0.00', 'Netqty': '50', 'Symbol': 'BANKNIFTY', 'LTP': '382.50', 'BLQty': 25.0, 'Fillbuyamt': '0.00', 'Fillsellqty': '0', 'Tsym': 'BANKNIFTY2290139100CE', 'CFbuyqty': '50', 'Buyavgprc': '0.00', 'netSellamt': '0.00', 'MtoM': '555.00', 'stat': 'Ok', 'FillsellamtCF': '0.00', 'PriceDenomenator': '1', 'netsellqty': '0', 'PriceNumerator': '1', 'posflag': 'false', 'Stikeprc': '39100.0', 'BEP': '371.40', 'Series': 'XX', 'GeneralDenomenator': '1', 'Type': 'NET1', 'Netamt': '-18,570.00', 'NetSellavgprc': '0.00', 'CFBuyavgprc': '441.0', 'Fillbuyqty': '0', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_fo', 'discQty': 'NA'}, {'Instname': 'OPTIDX', 'Expdate': '1 Sep, 2022', 'CFsellqty': '100', 'Opttype': 'CE', 'Token': '51731', 'CFSellavgprc': '128.45', 'sSqrflg': 'Y', 'unrealisedprofitloss': '-150.00', 's_NetQtyPosConv': 'N', 'FillbuyamtCF': '0.00', 'Sqty': '0', 'Sellavgprc': '0.00', 'actid': 'SP220xx', 'netbuyamt': '0.00', 'Pcode': 'NRML', 'Bqty': '0', 'NetBuyavgprc': '0.00', 'Exchange': 'NFO', 'companyname': '', 'netbuyqty': '0', 'realisedprofitloss': '0.00', 'Fillsellamt': '0.00', 'Netqty': '-100', 'Symbol': 'BANKNIFTY', 'LTP': '96.00', 'BLQty': 25.0, 'Fillbuyamt': '0.00', 'Fillsellqty': '0', 'Tsym': 'BANKNIFTY2290139900CE', 'CFbuyqty': '0', 'Buyavgprc': '0.00', 'netSellamt': '9,450.00', 'MtoM': '-150.00', 'stat': 'Ok', 'FillsellamtCF': '9,450.00', 'PriceDenomenator': '1', 'netsellqty': '100', 'PriceNumerator': '1', 'posflag': 'false', 'Stikeprc': '39900.0', 'BEP': '94.50', 'Series': 'XX', 'GeneralDenomenator': '1', 'Type': 'NET1', 'Netamt': '9,450.00', 'NetSellavgprc': '128.45', 'CFBuyavgprc': '0.00', 'Fillbuyqty': '0', 'GeneralNumerator': '1', 'Exchangeseg': 'nse_fo', 'discQty': 'NA'}]

Get Holding Positions

Code

print(alice.get_holding_positions()) # get holding positions

Sample response

{'stat': 'Ok', 'HoldingVal': [{'WCqty': '0', 'BSEHOldingValue': '25700.00', 'hsflag': 'Y', 'Series1': 'A', 'HUqty': '200', 'authQty': '0', 'YSXHOldingValue': '0.00', 'CSEHOldingValue': '0.00', 'Ttrind': 'N', 'DaysMTM': '0', 'csflag': 'Y', 'WHqty': '0', 'Pcode': 'CNC', 'Price': '102.78', 'Exch4': '0', 'BuyQty': '0', 'Bsetsym': 'BANKBARODA', 'Exch5': '0', 'LTcse': '0.00', 'MCXHOldingValue': '0.00', 'Holdqty': '0', 'Exch1': 'nse_cm', 'Exch2': 'bse_cm', 'Exch3': '0', 'LTysx': '0.00', 'Haircut': '0.00', 'Scripcode': '532134', 'LTPValuation': '0', 'NSEHOldingValue': '25660.00', 'Ysxtsym': '0', 'Ltp': '128.50', 'Coltype': '--', 'Btst': '0', 'LTmcxsxcm': '0.00', 'Usedqty': '0', 'poaStatus': 'Y', 'Token5': '0', 'Nsetsym': 'BANKBARODA-EQ', 'CUqty': '0', 'Token2': '532134', 'Token1': '4668', 'Token4': '0', 'Token3': '0', 'SellableQty': '200', 'Mcxsxcmsym': '0', 'Csetsym': '0', 'authFlag': True, 'LTnse': '128.30', 'pdc': '125.9', 'Series': 'EQ', 'Colqty': '0', 'ExchSeg5': None, 'ExchSeg2': 'BSE', 'ExchSeg1': 'NSE', 'LTbse': '128.50', 'ExchSeg4': None, 'ExchSeg3': None, 'isin': 'INE028A01039', 'Tprod': 'NA'}, {'WCqty': '0', 'BSEHOldingValue': '772832.75', 'hsflag': 'Y', 'Series1': 'X', 'HUqty': '19345', 'authQty': '0', 'YSXHOldingValue': '0.00', 'CSEHOldingValue': '0.00', 'Ttrind': 'N', 'DaysMTM': '0', 'csflag': 'Y', 'WHqty': '0', 'Pcode': 'CNC', 'Price': '44.60', 'Exch4': '0', 'BuyQty': '0', 'Bsetsym': 'SMIFS', 'Exch5': '0', 'LTcse': '0.00', 'MCXHOldingValue': '0.00', 'Holdqty': '0', 'Exch1': '0', 'Exch2': 'bse_cm', 'Exch3': '0', 'LTysx': '0.00', 'Haircut': '0.00', 'Scripcode': '508905', 'LTPValuation': '0', 'NSEHOldingValue': '0.00', 'Ysxtsym': '0', 'Ltp': '39.95', 'Coltype': '--', 'Btst': '0', 'LTmcxsxcm': '0.00', 'Usedqty': '0', 'poaStatus': 'Y', 'Token5': '0', 'Nsetsym': '0', 'CUqty': '0', 'Token2': '508905', 'Token1': '0', 'Token4': '0', 'Token3': '0', 'SellableQty': '19345', 'Mcxsxcmsym': '0', 'Csetsym': '0', 'authFlag': True, 'LTnse': '0.00', 'pdc': '41.95', 'Series': '---', 'Colqty': '0', 'ExchSeg5': None, 'ExchSeg2': 'BSE', 'ExchSeg1': None, 'LTbse': '39.95', 'ExchSeg4': None, 'ExchSeg3': None, 'isin': 'INE641A01013', 'Tprod': 'NA'}], 'clientid': 'WBK293', 'Totalval': {'TotalMCXHoldingValue': '0.00', 'TotalCSEHoldingValue': '0.00', 'TotalNSEHoldingValue': '25660.00', 'TotalYSXHoldingValue': '0.00', 'TotalBSEHoldingValue': '798532.75'}}

Get master contracts

Getting master contracts allow you to search for instruments by symbol name and place orders. Master contracts are stored as an OrderedDict by token number and by symbol name in a local file. Whenever you get a trade update, order update, or quote update, the library will check if master contracts are loaded. If they are, it will attach the instrument object directly to the update. By default all master contracts of all enabled exchanges in your personal profile will be downloaded. i.e. If your profile contains the following as enabled exchanges ['NSE', 'BSE', 'MCX', NFO'] all contract notes of all exchanges will be downloaded by default. If you feel it takes too much time to download all exchange, or if you don't need all exchanges to be downloaded, you can specify which exchange to download contract notes while creating the AliceBlue object. Master contracts once downloaded is stored in temp location and reused the subsequent times. Master contracts are downloaded newly once a day (because new master contracts are updated everyday around 8:00am).

Code

alice = AliceBlue(username = "username", session_id = session_id, master_contracts_to_download=['NSE', 'BSE'])

This will reduce a few seconds in object creation time of AliceBlue object.

Get Scrip info

Get Scrip info from alice server (this is different from instrument object).

print(alice.get_scrip_info(alice.get_instrument_by_symbol("NSE", "INFY-EQ")))
{'optiontype': 'XX', 'SQty': 55, 'vwapAveragePrice': '1499.38', 'LTQ': '40', 'Ltp': '1511.65', 'LTP': '1511.65', 'DecimalPrecision': 2, 'openPrice': '1488.00', 'BRate': '00.00', 'defmktproval': '3', 'BQty': 0, 'symbolname': 'INFY', 'noMktPro': '0', 'LTT': '09/09/2022 15:59:32', 'mktpro': '1', 'TickSize': '5', 'Multiplier': 1, 'strikeprice': '00.00', 'TotalSell': '55', 'High': '1520.00', 'stat': 'Ok', 'BodLotQty': 1, 'yearlyHighPrice': '1953.90', 'yearlyLowPrice': '1367.15', 'exchFeedTime': '09-Sep-2022 16:18:43', 'PrvClose': '1511.65', 'SRate': '1511.65', 'Change': '00.00', 'Series': 'EQ', 'TotalBuy': 'NA', 'Low': '1480.00', 'UniqueKey': 'INFY', 'PerChange': '00.00', 'companyname': 'INFOSYS LIMITED', 'TradeVolume': '4816910', 'TSymbl': 'INFY-EQ', 'Exp': 'NA', 'LTD': 'NA'}

Instrument object

Instruments are represented by instrument objects. These are named-tuples that are created while getting the master contracts. They are used when placing an order and subscribing to a symbol. The structure of an instrument tuple is as follows:

Instrument = namedtuple('Instrument', ['exchange', 'token', 'symbol',
                                      'name', 'expiry', 'lot_size'])

All instruments have the fields mentioned above. Wherever a field is not applicable for an instrument (for example, equity instruments don't have strike prices), that value will be None.

Get tradable instruments

Symbols can be retrieved in multiple ways. Once you have the master contract loaded for an exchange, you can get an instrument in many ways.

Get a single instrument by it's name:

Code

tatasteel_nse_eq = alice.get_instrument_by_symbol('NSE', 'TATASTEEL-EQ')
reliance_nse_eq = alice.get_instrument_by_symbol('NSE', 'RELIANCE-EQ')
ongc_bse_eq = alice.get_instrument_by_symbol('BSE', 'ONGC-EQ')
india_vix_nse_index = alice.get_instrument_by_symbol('NSE', 'India VIX')
sensex_nse_index = alice.get_instrument_by_symbol('BSE', 'SENSEX')
nifty50_nse_index = alice.get_instrument_by_symbol('NSE', 'NIFTY 50')
banknifty_nse_index = alice.get_instrument_by_symbol('NSE', 'NIFTY Bank')

Get a single instrument by it's token number (generally useful only for BSE Equities):

Code

ongc_bse_eq = alice.get_instrument_by_token('BSE', 500312)
reliance_bse_eq = alice.get_instrument_by_token('BSE', 500325)
acc_nse_eq = alice.get_instrument_by_token('NSE', 22)

Get FNO instruments easily by mentioning expiry, strike & call or put.

Code

bn_fut = alice.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=True, strike=None, is_CE = False)
bn_call = alice.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=False, strike=30000, is_CE = True)
bn_put = alice.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=False, strike=30000, is_CE = False)

Search for symbols

Search for multiple instruments by matching the name. This works case insensitive and returns all instrument which has the name in its symbol. Code

all_sensex_scrips = alice.search_instruments('BSE', 'sEnSeX')
print(all_sensex_scrips)

The above code results multiple symbol which has 'sensex' in its symbol. Sample response

[Instrument(exchange='BSE', token=532985, symbol='KTKSENSEX', name='KOTAK MAHINDRA MUTUAL FUND', expiry=None, lot_size='1'), Instrument(exchange='BSE', token=535276, symbol='SBISENSEX', name='SBI MUTUAL FUND - SBI ETF SENS', expiry=None, lot_size='1'), Instrument(exchange='BSE', token=538683, symbol='SENSEXBEES', name='NIPPON INDIA ETF SENSEX', expiry=None, lot_size='1'), Instrument(exchange='BSE', token=540154, symbol='IDFSENSEXE', name='IDFC Mutual Fund', expiry=None, lot_size='1'), Instrument(exchange='BSE', token=199040, symbol='SENSEXBINAV', name='INAV NIPPO INDIA ETF SENSE', expiry=None, lot_size='1')]

Search for multiple instruments by matching multiple names

Code

multiple_underlying = ["INFY", "SBIN", "BHEL"]
all_scripts = alice.search_instruments('NFO', multiple_underlying)
print(all_scripts)

Live Feed Data and Market Depth Data

Once you have master contracts loaded & a tradable instrument, you can easily subscribe to market feedd/depth data.

Two types of Live data are available

You can subscribe any one type of live data for a given scrip. Using the LiveFeedType enum, you can specify what type of live feed you need.

  • LiveFeedType.TICK_DATA
  • LiveFeedType.DEPTH_DATA

Please refer to the original documentation here for more details of different types of live feeds.

Subscribe to a live feed

Code

alice.subscribe(alice.get_instrument_by_symbol('NSE', 'TATASTEEL-EQ'), LiveFeedType.TICK_DATA)
alice.subscribe(alice.get_instrument_by_symbol('BSE', 'RELIANCE-EQ'), LiveFeedType.DEPTH_DATA)

Subscribe to multiple instruments in a single call. Give an array of instruments to be subscribed.

Code

alice.subscribe([alice.get_instrument_by_symbol('NSE', 'TATASTEEL-EQ'), alice.get_instrument_by_symbol('NSE', 'ACC-EQ')], LiveFeedType.TICK_DATA)

Start getting live feed via websocket

Code

def event_handler_quote_update(message):
    print(f"quote update {message}")

alice.start_websocket(subscribe_callback=event_handler_quote_update)

alice.subscribe(alice.get_instrument_by_symbol('NSE', 'ONGC-EQ'), LiveFeedType.TICK_DATA)
sleep(10)

Unsubscribe to a live feed

Unsubscribe to an existing live feed.

Code

alice.unsubscribe(alice.get_instrument_by_symbol('NSE', 'TATASTEEL-EQ'), LiveFeedType.TICK_DATA)
alice.unsubscribe(alice.get_instrument_by_symbol('BSE', 'RELIANCE-EQ'), LiveFeedType.DEPTH_DATA)

Unsubscribe to multiple instruments in a single call. Give an array of instruments to be unsubscribed.

Code

alice.unsubscribe([alice.get_instrument_by_symbol('NSE', 'TATASTEEL-EQ'), alice.get_instrument_by_symbol('NSE', 'ACC-EQ')], LiveFeedType.TICK_DATA)

Get All Subscribed Symbols

Code

alice.get_all_subscriptions() # All

Market Status messages & Exchange messages.

Subscribe to market status & Exchange messages coming soon.

Subscribe to Market Status messages

Code

alice.subscribe_market_status_messages()

Getting market status messages.

Code

print(alice.get_market_status_messages())

Sample Response of get_market_status_messages()

[{'exchange': 'NSE', 'length_of_market_type': 6, 'market_type': b'NORMAL', 'length_of_status': 31, 'status': b'The Closing Session has closed.'}, {'exchange': 'NFO', 'length_of_market_type': 6, 'market_type': b'NORMAL', 'length_of_status': 45, 'status': b'The Normal market has closed for 22 MAY 2020.'}, {'exchange': 'CDS', 'length_of_market_type': 6, 'market_type': b'NORMAL', 'length_of_status': 45, 'status': b'The Normal market has closed for 22 MAY 2020.'}, {'exchange': 'BSE', 'length_of_market_type': 13, 'market_type': b'OTHER SESSION', 'length_of_status': 0, 'status': b''}]

Subscribe to exchange messages

Code

alice.subscribe_exchange_messages()

Getting market status messages.

Code

print(alice.get_exchange_messages())

Sample Response of get_exchange_messages()

[{'exchange': 'NSE', 'length': 32, 'message': b'DS : Bulk upload can be started.', 'exchange_time_stamp': 1590148595}, {'exchange': 'NFO', 'length': 200, 'message': b'MARKET WIDE LIMIT FOR VEDL IS 183919959. OPEN POSITIONS IN VEDL HAVE REACHED 84 PERCENT OF THE MARKET WIDE LIMIT.                                                                                       ', 'exchange_time_stamp': 1590146132}, {'exchange': 'CDS', 'length': 54, 'message': b'DS : Regular segment Bhav copy broadcast successfully.', 'exchange_time_stamp': 1590148932}, {'exchange': 'MCX', 'length': 7, 'message': b'.......', 'exchange_time_stamp': 1590196159}]

Market Status messages & Exchange messages through callbacks

Code

socket_opened = False
def market_status_messages(message):
    print(f"market status messages {message}")

def exchange_messages(message):
    print(f"exchange messages {message}")

alice.start_websocket(market_status_messages_callback=market_status_messages,
                      exchange_messages_callback=exchange_messages)
alice.subscribe_market_status_messages()
alice.subscribe_exchange_messages()
sleep(10)

Place an order

You can place following types of order through this API.

  1. Limit
  2. Market
  3. Stop Loss Limit
  4. Stop Loss Market
  5. Bracket Order
  6. AMO

Limit Order (Intraday Buy)

Code

print(alice.place_order(transaction_type = TransactionType.Buy, 
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 1,
                        order_type = OrderType.Limit, 
                        product_type = ProductType.Intraday, 
                        price = 500.0))

Sample reponse of place order

[{'stat': 'Ok', 'NOrdNo': '220909000171482'}]

Market Order (Delivery Sell)

print(alice.place_order(transaction_type = TransactionType.Sell,
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 0, 
                        order_type = OrderType.Market, 
                        product_type = ProductType.Delivery))

Stop Loss Limit order

print(alice.place_order(transaction_type = TransactionType.Sell, 
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 1, 
                        order_type = OrderType.StopLossLimit,
                        product_type = ProductType.Intraday, 
                        price = 500.0, 
                        trigger_price = 490.0))

Stop Loss Market order

print(alice.place_order(transaction_type = TransactionType.Sell, 
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 1, 
                        order_type = OrderType.StopLossMarket,
                        product_type = ProductType.Intraday, 
                        trigger_price = 490.0))

Bracket Order

print(alice.place_order(transaction_type = TransactionType.Sell,
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 1, 
                        order_type = OrderType.StopLossLimit,
                        product_type = ProductType.Intraday, 
                        price = 1464.0, 
                        trigger_price = 1466.0, 
                        stop_loss = 1450.0, 
                        target = 1480.0, 
                        trailing_sl = 1.0))

After Market Order

Code

print(alice.place_order(transaction_type = TransactionType.Buy, 
                        instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                        quantity = 1, 
                        order_type = OrderType.AfterMarketOrder,
                        product_type = ProductType.Delivery, 
                        price = 500.0))

Sample reponse of AMO order

[{'stat': 'Ok', 'NOrdNo': '220909000171690-after market order req received'}]

Modify Order

print(alice.modify_order(   order_id = order_id, 
                            transaction_type = TransactionType.Buy, 
                            instrument = alice.get_instrument_by_symbol("NSE", "INFY-EQ"), 
                            quantity = 2, 
                            order_type = OrderType.AfterMarketOrder,
                            product_type = ProductType.Delivery, 
                            price = 600.0))

Sample response of modify order

{'stat': 'Ok', 'Result': ' NEST Order Number :220909000171761'}

Cancel an order

order_id = 220909000171761
print(alice.cancel_order(order_id = order_id))

Sample response of cancel order

{'stat': 'Ok', 'Result': ' NEST Order Number :220909000171761'}

Getting order history and trade details

Get order history of all orders.

print(alice.get_order_history())
[{'Prc': '600.00', 'RequestID': '1', 'Cancelqty': 0, 'discQtyPerc': '10', 'customText': 'NA', 'Mktpro': 'NA', 'defmktproval': '3', 'optionType': 'XX', 'usecs': '078218', 'mpro': '1', 'Qty': 2, 'ordergenerationtype': 'AMO', 'Unfilledsize': 0, 'orderAuthStatus': '', 'Usercomments': 'NA', 'ticksize': '5', 'Prctype': 'AMO', 'Status': 'cancelled after market order', 'Minqty': 0, 'orderCriteria': 'NA', 'Exseg': 'nse_cm', 'Sym': 'INFY', 'multiplier': '1', 'ExchOrdID': 'NA', 'ExchConfrmtime': '--', 'Pcode': 'CNC', 'SyomOrderId': '', 'Dscqty': 0, 'Exchange': 'NSE', 'Ordvaldate': 'NA', 'accountId': 'SP220xx', 'exchangeuserinfo': '111111111111130', 'Avgprc': '00.00', 'Trgprc': '00.00', 'Trantype': 'B', 'bqty': '1', 'Trsym': 'INFY-EQ', 'Fillshares': 0, 'AlgoCategory': 'NA', 'sipindicator': 'N', 'strikePrice': '00.00', 'reporttype': 'NA', 'AlgoID': 'NA', 'noMktPro': '0', 'BrokerClient': '--', 'OrderUserMessage': '', 'decprec': '2', 'ExpDate': 'NA', 'COPercentage': 0.0, 'marketprotectionpercentage': '--', 'Nstordno': '220909000171761', 'ExpSsbDate': 'NA', 'OrderedTime': '09/09/2022 15:47:11', 'RejReason': '--', 'modifiedBy': 'SP220xx', 'Scripname': 'INFOSYS LIMITED', 'stat': 'Ok', 'orderentrytime': '', 'PriceDenomenator': '1', 'panNo': 'NA', 'RefLmtPrice': 0.0, 'PriceNumerator': '1', 'token': '1594', 'ordersource': 'NEST_REST_WEB', 'Validity': None, 'GeneralDenomenator': '1', 'series': 'EQ', 'InstName': '', 'GeneralNumerator': '1', 'user': 'SP220xx', 'remarks': '--', 'iSinceBOE': 1662718631}, {'Prc': '378.50', 'RequestID': '1', 'Cancelqty': 0, 'discQtyPerc': '10', 'customText': 'NA', 'Mktpro': 'NA', 'defmktproval': '3', 'optionType': 'XX', 'usecs': '428162', 'mpro': '1', 'Qty': 704, 'ordergenerationtype': '--', 'Unfilledsize': 0, 'orderAuthStatus': '', 'Usercomments': 'NA', 'ticksize': '5', 'Prctype': 'L', 'Status': 'complete', 'Minqty': 0, 'orderCriteria': 'NA', 'Exseg': 'nse_cm', 'Sym': 'HINDALCO', 'multiplier': '1', 'ExchOrdID': '1100000000211421', 'ExchConfrmtime': '09-Sep-2022 09:07:03', 'Pcode': 'MIS', 'SyomOrderId': '', 'Dscqty': 0, 'Exchange': 'NSE', 'Ordvaldate': 'NA', 'accountId': 'SP220xx', 'exchangeuserinfo': '333333333333100', 'Avgprc': '426.00', 'Trgprc': '00.00', 'Trantype': 'S', 'bqty': '1', 'Trsym': 'HINDALCO-EQ', 'Fillshares': 704, 'AlgoCategory': 'NA', 'sipindicator': 'N', 'strikePrice': '00.00', 'reporttype': 'fill', 'AlgoID': 'NA', 'noMktPro': '0', 'BrokerClient': '--', 'OrderUserMessage': '', 'decprec': '2', 'ExpDate': 'NA', 'COPercentage': 0.0, 'marketprotectionpercentage': '--', 'Nstordno': '220909000001363', 'ExpSsbDate': 'NA', 'OrderedTime': '09/09/2022 09:07:03', 'RejReason': '--', 'modifiedBy': '--', 'Scripname': 'HINDALCO  INDUSTRIES  LTD', 'stat': 'Ok', 'orderentrytime': 'Sep 09 2022 09:06:59', 'PriceDenomenator': '1', 'panNo': 'xxxxx', 'RefLmtPrice': 0.0, 'PriceNumerator': '1', 'token': '1363', 'ordersource': 'NEST_REST_TLAPI', 'Validity': 'DAY', 'GeneralDenomenator': '1', 'series': 'EQ', 'InstName': '', 'GeneralNumerator': '1', 'user': 'SP220xx', 'remarks': '--', 'iSinceBOE': 1662694623}]

Get order history of a particular order

print(alice.get_order_history(220909000171761))

Sample Response

[{'Prc': '600.00', 'Action': 'B', 'productcode': 'CNC', 'reporttype': 'NA', 'triggerprice': '0.0', 'filledShares': 0, 'disclosedqty': '0', 'exchangetimestamp': '--', 'ExchTimeStamp': '09/09/2022 15:47:11', 'symbolname': 'INFY', 'nestordernumber': '220909000171761', 'duration': None, 'OrderUserMessage': '', 'averageprice': '0.0', 'Qty': 2, 'ordergenerationtype': 'AMO', 'modifiedBy': 'SP220xx', 'filldateandtime': '-- --', 'Status': 'cancelled after market order', 'rejectionreason': '--', 'stat': 'Ok', 'PriceDenomenator': '1', 'exchangeorderid': None, 'PriceNumerator': '1', 'legorderindicator': '', 'customerfirm': 'C', 'ordersource': 'NEST_REST_WEB', 'GeneralDenomenator': '1', 'nestreqid': '1', 'Ordtype': 'AMO', 'unfilledSize': 0, 'scripname': 'INFOSYS LIMITED', 'GeneralNumerator': '1', 'bqty': 1, 'exchange': 'NSE', 'Trsym': 'INFY-EQ'}, {'Prc': '600.00', 'Action': 'B', 'productcode': 'CNC', 'reporttype': 'NA', 'triggerprice': '0.0', 'filledShares': 0, 'disclosedqty': '0', 'exchangetimestamp': '--', 'ExchTimeStamp': '09/09/2022 15:47:10', 'symbolname': 'INFY', 'nestordernumber': '220909000171761', 'duration': None, 'OrderUserMessage': '', 'averageprice': '0.0', 'Qty': 2, 'ordergenerationtype': 'AMO', 'modifiedBy': 'SP220xx', 'filldateandtime': '-- --', 'Status': 'modify after market order req received', 'rejectionreason': '--', 'stat': 'Ok', 'PriceDenomenator': '1', 'exchangeorderid': None, 'PriceNumerator': '1', 'legorderindicator': '', 'customerfirm': 'C', 'ordersource': 'NEST_REST_WEB', 'GeneralDenomenator': '1', 'nestreqid': '1', 'Ordtype': 'AMO', 'unfilledSize': 2, 'scripname': 'INFOSYS LIMITED', 'GeneralNumerator': '1', 'bqty': 1, 'exchange': 'NSE', 'Trsym': 'INFY-EQ'}, {'Prc': '500.00', 'Action': 'B', 'productcode': 'CNC', 'reporttype': 'NA', 'triggerprice': '0.0', 'filledShares': 0, 'disclosedqty': '1', 'exchangetimestamp': '--', 'ExchTimeStamp': '09/09/2022 15:47:09', 'symbolname': 'INFY', 'nestordernumber': '220909000171761', 'duration': 'DAY', 'OrderUserMessage': '', 'averageprice': '0.0', 'Qty': 1, 'ordergenerationtype': 'AMO', 'modifiedBy': '--', 'filldateandtime': '-- --', 'Status': 'after market order req received', 'rejectionreason': '--', 'stat': 'Ok', 'PriceDenomenator': '1', 'exchangeorderid': None, 'PriceNumerator': '1', 'legorderindicator': '', 'customerfirm': 'C', 'ordersource': 'NEST_REST_WEB', 'GeneralDenomenator': '1', 'nestreqid': '1', 'Ordtype': 'AMO', 'unfilledSize': 1, 'scripname': 'INFOSYS LIMITED', 'GeneralNumerator': '1', 'bqty': 1, 'exchange': 'NSE', 'Trsym': 'INFY-EQ'}]

Get trade book

print(alice.get_trade_book())

Sample Response

[{'Filltime': '15:10:00', 'usecs': '836064', 'Ordduration': 'DAY', 'ExchordID': '1100000022855645', 'Qty': 201, 'ordergenerationtype': '--', 'strikeprice': '00.00', 'AvgPrice': '1499.52', 'Prctype': 'MKT', 'Minqty': 0, 'Exchseg': 'nse_cm', 'Pcode': 'MIS', 'FillLeg': 1, 'Exchange': 'NSE', 'accountId': 'SP220xx', 'Price': '1499.40', 'Trantype': 'S', 'companyname': 'HDFC BANK LTD', 'Exchtime': '09-Sep-2022 15:10:00', 'bqty': 1, 'Filldate': '09-Sep-2022', 'AlgoCategory': 'NA', 'Custofrm': 'C', 'expdate': 'NA', 'optiontype': 'XX', 'AlgoID': 'NA', 'Symbol': '1333', 'Filledqty': 201, 'Time': '09/09/2022 15:10:00', 'symbolname': 'HDFCBANK', 'BrokerClient': '--', 'NOReqID': '1', 'Tsym': 'HDFCBANK-EQ', 'Nstordno': '220909000161876', 'ReportType': 'fill', 'Expiry': 'NA', 'stat': 'Ok', 'PriceDenomenator': '1', 'panNo': 'xxxxxxxxx', 'PriceNumerator': '1', 'posflag': 'false', 'GeneralDenomenator': '1', 'FillId': '29599427', 'Fillqty': 29, 'series': 'EQ', 'GeneralNumerator': '1', 'user': 'SP220xx', 'remarks': '--', 'iSinceBOE': 1662716400}, {'Filltime': '15:10:00', 'usecs': '835977', 'Ordduration': 'DAY', 'ExchordID': '1100000022855645', 'Qty': 201, 'ordergenerationtype': '--', 'strikeprice': '00.00', 'AvgPrice': '1499.55', 'Prctype': 'MKT', 'Minqty': 0, 'Exchseg': 'nse_cm', 'Pcode': 'MIS', 'FillLeg': 1, 'Exchange': 'NSE', 'accountId': 'SP220xx', 'Price': '1499.55', 'Trantype': 'S', 'companyname': 'HDFC BANK LTD', 'Exchtime': '09-Sep-2022 15:10:00', 'bqty': 1, 'Filldate': '09-Sep-2022', 'AlgoCategory': 'NA', 'Custofrm': 'C', 'expdate': 'NA', 'optiontype': 'XX', 'AlgoID': 'NA', 'Symbol': '1333', 'Filledqty': 162, 'Time': '09/09/2022 15:10:00', 'symbolname': 'HDFCBANK', 'BrokerClient': '--', 'NOReqID': '1', 'Tsym': 'HDFCBANK-EQ', 'Nstordno': '220909000161876', 'ReportType': 'fill', 'Expiry': 'NA', 'stat': 'Ok', 'PriceDenomenator': '1', 'panNo': 'xxxxxxxxx', 'PriceNumerator': '1', 'posflag': 'false', 'GeneralDenomenator': '1', 'FillId': '29599425', 'Fillqty': 162, 'series': 'EQ', 'GeneralNumerator': '1', 'user': 'SP220xx', 'remarks': '--', 'iSinceBOE': 1662716400}, {'Filltime': '15:10:00', 'usecs': '836021', 'Ordduration': 'DAY', 'ExchordID': '1100000022855645', 'Qty': 201, 'ordergenerationtype': '--', 'strikeprice': '00.00', 'AvgPrice': '1499.54', 'Prctype': 'MKT', 'Minqty': 0, 'Exchseg': 'nse_cm', 'Pcode': 'MIS', 'FillLeg': 1, 'Exchange': 'NSE', 'accountId': 'SP220xx', 'Price': '1499.45', 'Trantype': 'S', 'companyname': 'HDFC BANK LTD', 'Exchtime': '09-Sep-2022 15:10:00', 'bqty': 1, 'Filldate': '09-Sep-2022', 'AlgoCategory': 'NA', 'Custofrm': 'C', 'expdate': 'NA', 'optiontype': 'XX', 'AlgoID': 'NA', 'Symbol': '1333', 'Filledqty': 172, 'Time': '09/09/2022 15:10:00', 'symbolname': 'HDFCBANK', 'BrokerClient': '--', 'NOReqID': '1', 'Tsym': 'HDFCBANK-EQ', 'Nstordno': '220909000161876', 'ReportType': 'fill', 'Expiry': 'NA', 'stat': 'Ok', 'PriceDenomenator': '1', 'panNo': 'xxxxxxxxx', 'PriceNumerator': '1', 'posflag': 'false', 'GeneralDenomenator': '1', 'FillId': '29599426', 'Fillqty': 10, 'series': 'EQ', 'GeneralNumerator': '1', 'user': 'SP220xx', 'remarks': '--', 'iSinceBOE': 1662716400}]

Order properties as enums

Order properties such as TransactionType, OrderType, and others have been safely classified as enums so you don't have to write them out as strings.

TransactionType

Transaction types indicate whether you want to buy or sell. Valid transaction types are of the following:

  • TransactionType.Buy - buy
  • TransactionType.Sell - sell

OrderType

Order type specifies the type of order you want to send. Valid order types include:

  • OrderType.Market - Place the order with a market price
  • OrderType.Limit - Place the order with a limit price (limit price parameter is mandatory)
  • OrderType.StopLossLimit - Place as a stop loss limit order
  • OrderType.StopLossMarket - Place as a stop loss market order
  • OrderType.BracketOrder - Place as a bracket order
  • OrderType.AfterMarketOrder - Place as a after market order

ProductType

Product types indicate the complexity of the order you want to place. Valid product types are:

  • ProductType.Intraday - Intraday order that will get squared off before market close
  • ProductType.Delivery - Delivery order that will be held with you after market close

Example strategy using alice blue API

Here is an example moving average strategy using alice blue API. This strategy generates a buy signal when 5-EMA > 20-EMA (golden cross) or a sell signal when 5-EMA < 20-EMA (death cross).

Historical API

Alice Blue now supports downloading historical data for back testing.

  1. Historical data API will be available from 5:30 PM (evening) to 8 AM (Next day morning) on weekdays (Monday to Friday). Historical data will not be available during market hours
  2. Historical data API will be available fully during weekends and holidays.
  3. For NSE segment, 2 years of historical data will be provided.
  4. For NFO, CDS and MCX segments, current expiry data will be provided.

Code

print(alice.historical_data(alice.get_instrument_by_symbol("NSE", "INFY-EQ"),
                            datetime.datetime.now(), 
                            datetime.datetime.now(), 
                            HistoricalDataType.Minute))

Sample Reponse

{'stat': 'Ok', 'result': [{'volume': 130792.0, 'high': 1489.8, 'low': 1483.1, 'time': '2022-09-09 09:15:00', 'close': 1488.8, 'open': 1488.0}, {'volume': 33730.0, 'high': 1488.95, 'low': 1485.35, 'time': '2022-09-09 09:16:00', 'close': 1486.0, 'open': 1488.05}, {'volume': 28446.0, 'high': 1486.5, 'low': 1484.0, 'time': '2022-09-09 09:17:00', 'close': 1484.8, 'open': 1485.65}, {'volume': 33256.0, 'high': 1486.0, 'low': 1484.55, 'time': '2022-09-09 09:18:00', 'close': 1485.45, 'open': 1484.9}], 'message': None}

Read this before creating an issue

Before creating an issue in this library, please follow the following steps.

  1. Search the problem you are facing is already asked by someone else. There might be some issues already there, either solved/unsolved related to your problem. Go to issues page, use is:issue as filter and search your problem. image
  2. If you feel your problem is not asked by anyone or no issues are related to your problem, then create a new issue.
  3. Describe your problem in detail while creating the issue. If you don't have time to detail/describe the problem you are facing, assume that I also won't be having time to respond to your problem.
  4. Post a sample code of the problem you are facing. If I copy paste the code directly from issue, I should be able to reproduce the problem you are facing.
  5. Before posting the sample code, test your sample code yourself once. Only sample code should be tested, no other addition should be there while you are testing.
  6. Have some print() function calls to display the values of some variables related to your problem.
  7. Post the results of print() functions also in the issue.
  8. Use the insert code feature of github to inset code and print outputs, so that the code is displayed neat. image
  9. If you have multiple lines of code, use triple grave accent ( ``` ) to insert multiple lines of code. Example: image
  10. Here is an example of what I'm expecting while you are creating an issue.

alice_blue's People

Contributors

krishnavelu avatar proritu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alice_blue's Issues

"Invalid Price Type" error while placing Intraday SL-M order.

Placing SL-M order using below sample code is getting placed without error, but rejected on Alice blue web terminal with Rejected Reason "Invalid Price Type". Tried with other symbols and more appropriate trigger_price, but received rejection with same error. Not able to make out what does the error mean. Tried using different possible price like 0 , 0.0 , None , but in vain. Please have a look. Note: When same order is directly placed from https://ant.aliceblueonline.com/ its going through fine.

Code below to replicate:

TransactionType.Buy, OrderType.StopLossMarket, ProductType.Intraday

print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%8%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
print(
alice.place_order(transaction_type = TransactionType.Buy,
instrument = alice.get_instrument_by_symbol('NSE', 'YESBANK'),
quantity = 1,
order_type = OrderType.StopLossMarket,
product_type = ProductType.Intraday,
price = 0.0,
trigger_price = 47.75,
stop_loss = None,
square_off = None,
trailing_sl = None,
is_amo = False)
)

How long access tocken stay valid ??

so , how log the access tocken stay valid ?? do we have to generate it once daily similar to upstox and zeordha ?? once generate can we save and use it agin throug out the day ??

Getting None for Nifty option strike

Using latest code i.e. 0.0.6, for Nifty option/s getting None, please see the sample code

Nifty_call = alice.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2019, 12, 12), is_fut=False, strike=11950, is_CE = True)
Nifty_put = alice.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2019, 12, 12), is_fut=False, strike=11950, is_CE = False)

Could you please help me with this.

Exception while sending ping.

Getting exception while sending ping. Need to check if websocket is open, then send.

09:18:33.900.682, Subscribe, WARNING, Alice Websocket is in error - error Connection is already closed.
09:18:33.901.022, Subscribe, WARNING, Alice Websocket closed
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/krishna/PTrade/broker_alice/alice_blue/alice_blue/alice_blue.py", line 358, in __send_heartbeat
    self.__websocket.send(json.dumps(heart_beat), opcode = websocket._abnf.ABNF.OPCODE_PING)
  File "/home/krishna/.local/lib/python3.7/site-packages/websocket/_app.py", line 153, in send
    if not self.sock or self.sock.send(data, opcode) == 0:
  File "/home/krishna/.local/lib/python3.7/site-packages/websocket/_core.py", line 253, in send
    return self.send_frame(frame)
  File "/home/krishna/.local/lib/python3.7/site-packages/websocket/_core.py", line 278, in send_frame
    l = self._send(data)
  File "/home/krishna/.local/lib/python3.7/site-packages/websocket/_core.py", line 448, in _send
    return send(self.sock, data)
  File "/home/krishna/.local/lib/python3.7/site-packages/websocket/_socket.py", line 135, in send
    raise WebSocketConnectionClosedException("socket is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: socket is already closed.

API Key generate for order processing

I need some small understanding we are trying generate the API key and which format alice blue reading ApI key for order processing need some understanding for encryption and decryption formula . we are trying to develop Auto Buy/Sell Order through MT4.

Thanks for your support in Advance.

Not getting Nifty spot and FUT and live data

Hello Krishna Velu,

I am very thankful for this github repo, it is really good. Need your help trying to get the details for Nifty spot price and nifty FUT
<Response [200]>
nifty_nse_eq = alice.get_instrument_by_symbol('NFO', 'NIFTY'), it is giving following warning
WARNING:root:Cannot find symbol NFO NIFTY in master contract
or
nifty_nse_eq = alice.get_instrument_by_symbol('NSE', 'NIFTY'), it is giving following warning
WARNING:root:Cannot find symbol NSE NIFTY in master contract

niftyput = alice.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2019, 12, 26), is_fut=True, strike=12000, is_CE = False)
This is giving BANKNIFTY not NIFTY details

RuntimeWarning: Enable tracemalloc to get the object allocation traceback
quote update {'exchange': 'NFO', 'token': 48891, 'ltp': 32412.9, 'ltt': 1575090670, 'ltq': 20, 'volume': 3760, 'best_bid_price': 32412.9, 'best_bid_quantity': 1140, 'best_ask_price': 32412.95, 'best_ask_quantity': 400, 'total_buy_quantity': 7600, 'total_sell_quantity': 3500, 'atp': 32262.57, 'exchange_time_stamp': 1575090673, 'open': 31990.0, 'high': 33000.05, 'low': 31880.0, 'close': 32003.85, 'yearly_high': 17012772.81, 'yearly_low': 18356255.04, 'instrument': Instrument(exchange='NFO', token='48891', symbol='BANKNIFTY DEC FUT', name='', expiry=datetime.date(2019, 12, 26), lot_size='20')}
quote update {'exchange': 'NFO', 'token': 48891, 'ltp': 32412.9, 'ltt': 1575090670, 'ltq': 20, 'volume': 3760, 'best_bid_price': 32412.9, 'best_bid_quantity': 1140, 'best_ask_price': 32412.95, 'best_ask_quantity': 400, 'total_buy_quantity': 7600, 'total_sell_quantity': 3520, 'atp': 32262.57, 'exchange_time_stamp': 1575090674, 'open': 31990.0, 'high': 33000.05, 'low': 31880.0, 'close': 32003.85, 'yearly_high': 17012772.81, 'yearly_low': 18356255.04, 'instrument': Instrument(exchange='NFO', token='48891', symbol='BANKNIFTY DEC FUT', name='', expiry=datetime.date(2019, 12, 26), lot_size='20')}
quote update {'exchange': 'NFO', 'token': 48891, 'ltp': 32412.9, 'ltt': 1575090670, 'ltq': 20, 'volume': 3760, 'best_bid_price': 32412.9, 'best_bid_quantity': 1140, 'best_ask_price': 32412.95, 'best_ask_quantity': 400, 'total_buy_quantity': 7940, 'total_sell_quantity': 3520, 'atp': 32262.57, 'exchange_time_stamp': 1575090679, 'open': 31990.0, 'high': 33000.05, 'low': 31880.0, 'close': 32003.85, 'yearly_high': 17012772.81, 'yearly_low': 18356255.04, 'instrument': Instrument(exchange='NFO', token='48891', symbol='BANKNIFTY DEC FUT', name='', expiry=datetime.date(2019, 12, 26), lot_size='20')}

Also can you help me getting nifty spot price details

Thanks,

Alice Blue Updated the Authentication Mehod

Hi,

This was really helpful and i wanted to shift my system to Alice Blue from Upstox. But once the account is opened i come to know that they have updated API, and Im looking for sample code according to new method.

Not receiving ticks

Is anyone else facing a problem of websocket stopping randomly around 10 AM in the morning?
My algo was trading and I suddenly stopped receiving ticks even though websocket is open.

Subscribe - make API's such that it gives error message if more than 250 scrips are subscribed.

In Alice Blue there is a limitation of number of scrips can be subscribed. The limitation is 250 scrips.
This is mentioned nowhere. But came to know after multiple talks with alice blue guys.
Issue #6 is also due to this. The server doesn't give any error message, but disconnects randomly after few hours/minutes.
Make the subscribe call such that, it give error message or exception if more that 250 scrips are subscribed.

Unable to fetch Nifty FnO series

Can anyone please post the result for this:

alice.get_instrument_for_fno(symbol = 'NIFTY' , expiry_date=datetime.date(2019, 11, 28), is_fut=True, strike=None)

or mention any other method that you are using to fetch Options and Futures for NIFTY.

PS: This works for BANKNIFTY but not for NIFTY

MCX delivery with goldpetal futures

so if you try this order

    r = alice.place_order(transaction_type = TransactionType.Buy,
             instrument = alice.get_instrument_by_symbol('MCX', 'GOLDPETAL FEB FUT'),
             quantity = 1,
             order_type = OrderType.StopLossLimit,
             product_type = ProductType.Delivery,
             price = 3961.0,
             trigger_price = 3961.0,
             stop_loss = None,
             square_off = None,
             trailing_sl = None,
             is_amo = False)

You will have issue putting order , as goldpetal is MCX commodity but only delivry is allowed , so ProductType should be NRML in this case , I have modified code as below and it is working now .

        elif(product_type == ProductType.Delivery):
            
            print(instrument.token)
            if(instrument.exchange == 'NFO'):
                product_type = 'NRML'
            elif(instrument.exchange == 'MCX' and str(instrument.symbol).split()[0] == 'GOLDPETAL'):
                product_type = 'NRML'
            else:
                product_type = 'CNC'
        elif(product_type == ProductType.CoverOrder):

sorry for fast write up , but hope you will understand.

BO order not getting placed

I am trying to place the BO order, and below is the order dict which is finally getting posted:

{'exchange': 'MCX', 'order_type': 'LIMIT', 'instrument_token': 214909, 'quantity': 10, 'disclosed_quantity': 0, 'price': 4132.35, 'transaction_type': 'BUY', 'validity': 'DAY', 'source': 'web', 'order_tag': 'order1', 'stop_loss_value': 4130.35, 'square_off_value': 4150.35}

but getting below error always:

{'status': 'error', 'message': ' is not supported in MCX segment.', 'data': {}}

While Market order types are getting placed successfully.

Please let me know if any more info required for looking into this issue.

Thanks!

Unable to subscribe, getting error

alice.subscribe(alice.get_instrument_by_symbol('NSE', 'RELIANCE'), LiveFeedType.COMPACT)

File "C:\Users\ghost\Anaconda3\lib\site-packages\alice_blue\alice_blue.py", line 652, in subscribe
raise TypeError("Required parameter live_feed_type not of type LiveFeedType")

TypeError: Required parameter live_feed_type not of type LiveFeedType

I've tried with the other LiveFeed types but no success. Updated to the latest version. Previously, it was working fine. Any suggestions would be helpful

How to get the API Secret or activate the API

Hey,
I just opened my demat account with Alice Blue and couldn't find anything related to API on their website. I called their customer support too but did not get any proper response. It would be great if you could provide me with a link from which I can activate the API and get my API Secret.

Thankyou,
Parva

Need Help: Reading or parsing the message data

Hello,

could you please help how to get the symbol from Instrument, I have tried using json package but is not working.

{'exchange': 'NSE', 'token': 26009, 'ltp': 30761.4, 'ltt': 1580209829, 'ltq': 0, 'volume': 0, 'best_bid_price': 0.0, 'best_bid_quantity': 0, 'best_ask_price': 0.0, 'best_ask_quantity': 0, 'total_buy_quantity': 0, 'total_sell_quantity': 0, 'atp': 0.0, 'exchange_time_stamp': 1580209829, 'open': 30922.0, 'high': 31048.45, 'low': 30656.35, 'close': 30761.4, 'yearly_high': 32613.1, 'yearly_low': 26560.6, 'instrument': Instrument(exchange='NSE', token='26009', symbol='Nifty Bank', name='Nifty Bank', expiry=None, lot_size=None)}

Thanks,

Cover order Problem with a specific trigger price

I am trying to place cover order-

  • when trigger price is 4099: order placed successfully
  • when trigger price is 4100: Error Occurred :Enter Valid Trigger Price
  • when trigger price is 4101: order placed successfully
    see the screenshots below. Am I missing anything?
    image
    image
    image

NOT ABLE TO FETCH NIFTY SPOT

Respected sir,
I am not able to fetch Nifty50 spot price nor able to subscribe to live spot data please do the needful regarding the same
ps
already reffered to issue 18 and 27 I am currently working algo for nifty options which wont be possible without the same,
thankyou

Unable to generate access_token

Hello Sir,

I have received api secret key and alice blue has enabled the API for my client ID.

I have tried to generate the access_token using below syntax, but access_token has 'NoneType'.

access_token = AliceBlue.login_and_get_access_token('username', 'password', 'twoFA', 'api_secret', redirect_url='http://127.0.0.1/')

I will be very grateful for any inputs assisting me to develop the connection to my trading account.

As a result of above, the below code can not be operated as well

alice = AliceBlue('username', 'password', access_token='access_token')

how to install alice_blue on python

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

Order placement in another account

I just got to know that it is possible to generate access token and place order in another (2nd account which doesn't have an activated API) account with the API details of one account. (of course if the APP is authorized in another account)

If anyone has tried that, can you please quickly tell me how to proceed with it using this library?

TIA,
Parva

Not able to place stoplossMarket order

Facing issue with stoplossMarket order.

I am sending this-

alice.place_order(transaction_type = TransactionType.Buy, instrument = alice.get_instrument_by_symbol('NSE', 'BHEL'), quantity = 1, order_type = OrderType.StopLossMarket, product_type = ProductType.Intraday, price = 0.0, trigger_price = 43.2, stop_loss = None, square_off = None, trailing_sl = None, is_amo = False)

Although order is placed successfully with following message-

{'status': 'success', 'message': 'Order placed successfully', 'data': {'oms_order_id': '20XXXXXXXXXXXX18'}}

But order is getting rejected REJECT REASON
Invalid price type

image

Algo stops in the middle because of heartbeat error

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\I BALL\Anaconda3\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Users\I BALL\Anaconda3\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\alice_blue\alice_blue.py", line 358, in __send_heartbeat
self.__websocket.send(json.dumps(heart_beat), opcode = websocket._abnf.ABNF.OPCODE_PING)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_app.py", line 155, in send
"Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

Need help - getting multiple instrument price details

Need help - how to get the multiple instrument price details like below and how to retry based on token or symbol

BankNiftyPE = alice.get_instrument_for_fno(symbol='BANKNIFTY', expiry_date=datetime.date(2019, 12, 12),is_fut=False, strike=11900, is_CE=False)
BankNiftyCE = alice.get_instrument_for_fno(symbol='BANKNIFTY', expiry_date=datetime.date(2019, 12, 12),is_fut=False, strike=11900, is_CE=True)
BankNiftyPE = alice.get_instrument_for_fno(symbol='BANKNIFTY', expiry_date=datetime.date(2019, 12, 12),is_fut=False, strike=11950, is_CE=False)
BankNiftyCE = alice.get_instrument_for_fno(symbol='BANKNIFTY', expiry_date=datetime.date(2019, 12, 12),is_fut=False, strike=11950, is_CE=True)

Unable to retrieve access token

When trying to authenticate and retrieve the access token, getting the following error:
line 247, in login_and_get_access_token
code = resp.url[resp.url.index('=')+1:resp.url.index('&')]

ValueError: substring not found

I'm just following the steps mentioned and nothing has been changed in the code. I'm just trying to print the access token. Does this error mean that the access token isn't created, hence unable to retrieve. I have the antplus activated and have received the api secret.
Any help would be appreciated. Thanks

Unable to Generate Access token

I received my API secret but I am not able to generate access token, here are some details:

resp = <Response [200]>
resp.url = https://ant.aliceblueonline.com/oauth/consent?consent_challenge=4bbd6ebdd0a4440aaf39798eb8072d51

I modified the next line to this:

try:
code = resp.url[resp.url.index('=')+1:resp.url.index('&')]
except:
code = resp.url[resp.url.index('=')+1:]
as I didn't see any '&' symbol in the resp.url

without the modification, it was showing this error message:
code = resp.url[resp.url.index('=')+1:resp.url.index('&')]ValueError: substring not found

I am printing the url generated after setting the params and it looks like this:

https://ant.aliceblueonline.com/oauth2/token?client_id=********&client_secret=******************************************************************&grant_type=authorization_code&code=4bbd6ebdd0a4440aaf39798eb8072d51&redirect_uri=https://ant.aliceblueonline.com/plugin/callback&authorization_response=authorization_response

I still get access_token as 'None' only, is there any problem with my code or is it possible that they haven't activated my API yet?

Thanks,
Parva

unable to get access token

dear sir
i have opened account with aliceblue and am following your python script for getting access toke .with same credentials i am able to login in ant web .but am unable to get access token with api secret given by alice blue.
i am getting response to print access token as 'none'
will you please help

Some place_order() samples mentioned in description doesnt work.

Some place_order() samples mentioned in description doesnt work.

e.g.

print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
print(
   alice.place_order(transaction_type = TransactionType.Buy,
                     instrument = alice.get_instrument_by_symbol('NSE', 'INFY'),
                     quantity = 1,
                     order_type = OrderType.Limit,
                     product_type = ProductType.BracketOrder,
                     price = 8.0,
                     trigger_price = None,
                     stop_loss = 6.0,
                     square_off = 10.0,
                     trailing_sl = None,
                     is_amo = False)
)

Gives error:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{'status': 'error', 'message': ' is not supported in NSE segment.', 'data': {}}

Parameters looks to be fine. My account also has sufficient balance.

Additional Information:
Looks like sample orders with ProductType.BracketOrder are giving error.

The error message from alice seems vague, so you are the best judge to answer if it is a bug or not. You may replicate yourself.
Thanks.

Order updates is not websocket based.

All other brokers like zerodha & upstox has their order updates as websocket based.
Meaning you don't need to poll for getting an order update using get_order_history()
If you subscribe for order update, the subscribed function will be called whenever there is an order update.

This feature is not yet implemented in alice-blue server.

Error on unstable internet connectivity: socket is already closed

Run an ltp printing code and turn off your internet, connect the net again after 10 seconds and you should be able to replicate the error.

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\I BALL\Anaconda3\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Users\I BALL\Anaconda3\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\alice_blue\alice_blue.py", line 358, in __send_heartbeat
self.__websocket.send(json.dumps(heart_beat), opcode = websocket._abnf.ABNF.OPCODE_PING)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_app.py", line 153, in send
if not self.sock or self.sock.send(data, opcode) == 0:
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_core.py", line 253, in send
return self.send_frame(frame)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_core.py", line 278, in send_frame
l = self._send(data)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_core.py", line 448, in _send
return send(self.sock, data)
File "C:\Users\I BALL\Anaconda3\lib\site-packages\websocket_socket.py", line 135, in send
raise WebSocketConnectionClosedException("socket is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: socket is already closed.

Video tutorial required

Hi sir

Your documentation page how to get api key and access token not clearly shown.

Can you please upload videos on official youtube channel of alice blue.

Like zerodha they use kite.trade to get api credentials, in aliceblue i can't find any url for get api key, token

Thanks

Unable to close websocket manually

Hi @krishnavelu,

I'm unable to close the websocket object once I unsubscribe the instrument. I had been prototyping in jupyter notebook and see that the websocket does not close once subscribed.

How can I manually close it?

Need Info - How to square off position/s based on the net profit or net loss

Wanted to build a system based and automatic square off positions based on net profit or net loss for example

will be buying like following for example
bn_call = alice.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 12, 19), is_fut=False, strike=30000, is_CE = True)
bn_put = alice.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 12, 19), is_fut=False, strike=30000, is_CE = False)

If in case of tool profit or loss is more than 1000 rs /X amount wanted to square off the positions.
So what I wanted to know which API from AB can give this/this type of information it provides.
Could you, please provide some sample inputs on this.

Getting different scrip than what is subscribed

Hi, firstly thanks for the code, i am able to connect and start testing. When i search for the scrip i am getting the correct results... however when i subscribe for live feed using the same values, i get different script. Please find the code snippet and output screenshot.

print("------\n")
print(alice.get_instrument_by_symbol('NSE','RELIANCE'))
print("\n------\n")
socket_opened = False
def event_handler_quote_update(message):
print(f"quote update {message}")

def open_callback():
global socket_opened
socket_opened = True

alice.start_websocket(subscribe_callback=event_handler_quote_update,
socket_open_callback=open_callback,
run_in_background=True)
while(socket_opened==False):
pass
alice.subscribe(alice.get_instrument_by_symbol('NSE', 'RELIANCE'), LiveFeedType.COMPACT)
time.sleep(10)

Result screenshot
image

How to find LTP?

Hi Krishnavelu,

How to find Open, high, low, LTP of any given scrip?
Attached is the screenshot of how it works in zerodha
pls help with this.
Screenshot 2020-01-26 at 10 12 34 AM

ValueError: substring not found

i have same issue, code = resp.url[resp.url.index('=')+1:resp.url.index('&')]
ValueError: substring not found, please help me, what is the problem. I don't know to generate manually. My friend code working fine not generating this problem, but why for my account this error coming

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.