Algo Trading with Python Startup Questions and Historical data limitations

bommina
i have already gone through several links for reference
https://kite.trade/forum/discussion/2875/is-there-any-limitation-on-getting-historical-data
https://kite.trade/forum/discussion/2604/convert-ticks-to-candle
https://kite.trade/forum/discussion/1927/downloading-historical-data

1. Is there any CDSL TPIN required for to use with python API, when i perform BUY with python API, do i need to provide TPIN for executing sell transaction (when ever my signal triggerd). if it is so? how to give TPIN authorization from PYTHON.
2. I have seen some examples (but not used), to download historical data, i need to provide "InstrumentToken", do you have map of tickers and insturument token? for example ICICIBANK instrument token, infy instrument token?
3. is there any reference to download and save historical data and live data to my local machine for later use?
4. i read your forums, based on that for 1 mintue data, i can query max 30days, so it is like that, how can i download 1 year of a single ticker data from python? you u have working sample code to that(download 1 year data for 1 min
5. again from forums but i did not get clarification, request you to not to provide any previous link and please answer here it self. question is: can i download nifty 500 EQUITY stocks (500 tickers)data for last two years 1 minute candle OHCLV. I can make 3 requests per second, so based on this condition, can i download unlimited tickers data of 1 minute,5 min and 15 min data?
6. for intraday if i want to download 1 min candle data for 200 symbols? do i need to call with python api to kite every 1 min? or do i have call back, where it will automatically recive data every 1 min
  • rakeshr
    @bommina
    Is there any CDSL TPIN required for to use with python API, when I perform BUY with python API, do I need to provide TPIN for executing sell transaction (whenever my signal triggered). if it is so?
    For buy transactions, you don't need TPIN but you need TPIN to sell if you have not provided POA.
    how to give TPIN authorization from PYTHON.
    You can manually pre-approve all the holdings from the kite web holdings.
    I have seen some examples (but not used), to download historical data, i need to provide "InstrumentToken", do you have map of tickers and insturument token?
    Yes, you need to provide an instrument token to fetch historical data. You can fetch the required instrument token from the complete instrument dump.
    is there any reference to download and save historical data and live data to my local machine for later use?
    No, we don't have any reference code for this. You can go through the above-mentioned thread.
    for 1 mintue data, i can query max 30days, so it is like that, how can i download 1 year of a single ticker data from python?
    You need to loop-in through the required period and fetch max 30days data at once.
    can i download nifty 500 EQUITY stocks (500 tickers)data for last two years 1 minute candle OHCLV. I can make 3 requests per second, so based on this condition, can i download unlimited tickers data of 1 minute,5 min and 15 min data?
    Yes, you can have fetch historical data for any number of contract, depending on you are fetching one instrument at a time with a max 3request/sec.
    for intraday if i want to download 1 min candle data for 200 symbols? do i need to call with python api to kite every 1 min? or do i have call back, where it will automatically receive data every 1 min
    Using historical data API(for 1 minute), you can fetch data for one contract at once with a maximum of up to 1-month of data. So, if you want to fetch Historical data for 200 symbols, you need to loop in 200 symbols with fetching 1 symbol data at once.
    There is no callback mechanism in Historical data APIs, you need to keep sending without exceeding the rate limit.
  • bommina
    @rakeshr Thanks you for your valuable answers. but i have still some more question on top of your answers, please clarify them also, because I'm spending time and efforts to achieve everything with python api. let me go through it.

    Ques:how to give TPIN authorization from PYTHON.
    Ans:You can manually pre-approve all the holdings from the kite web holdings.
    Ques: so if my python api buy some stocks, do i need to go to kite web and maually pre-approve the transaction for selling? is there any automatic process? if there is no automatic process or there is nothing from api, it will be difficult to approve each and every transaction for selling. because algo trading (python) can buy daily 100 transactions, so as you know it will be difficult to muaually approve these transactions for selling. please let me know how we can automate this process?

    Ques: can i make GTT buy transaction with python API? can i modify/update stoploss and target% of one GTT transaction 50 times(just for example, becz i want my python to update GTT based on market conditions ) in a day, is there any limitation on no of GTT transactions and it's modification.

    Ques: please provide me sample code if it is there for GTT orders
    i have already gone throuh couple of links about GTT
    https://kite.trade/forum/discussion/8930/sample-python-code-to-place-gtt-order/p1



  • sujith
    if there is no automatic process or there is nothing from api, it will be difficult to approve each and every transaction for selling. because algo trading (python) can buy daily 100 transactions, so as you know it will be difficult to muaually approve these transactions for selling. please let me know how we can automate this process?
    If it is intraday transactions then you don't need to do this. If you are selling from your holdings then a non-poa client has to authorize Demat debit on the CDSL portal, it is outside of our control. The authorization is a transaction between the depository and the client.
    If you don't want to authorize then you can courier a POA to our head office. You can know more here.
    Ques: can i make GTT buy transaction with python API? can i modify/update stoploss and target% of one GTT transaction 50 times(just for example, becz i want my python to update GTT based on market conditions ) in a day, is there any limitation on no of GTT transactions and it's modification.
    Yes, you can place GTT and modify it any number of times. But make sure to keep the check of 200 writes/minute of the Kite Connect APIs which includes any POST and PUT requests.

    You can check out the GTT examples here.


  • bommina
    bommina edited December 2020
    @sujith thank you for update.
    hey please let me know, doe's any one given POA for zerodha?, is there any disadvantages of giving this POA?
    @sujith , do you have any test/dummy api to check buy and sell orders, i will buy subscription for kite api, but i dont want to buy or make real transaction. i have gone through this link already
    https://nordible.com/zerodha-sandbox/ and https://kite.trade/forum/discussion/2972/sandbox-environment-or-test-account. is it still working? can you point me some working example.

    any python example for converting tick data to minute wise data, so i listen to websocket for my list of instruments, after 60 request(received from websocket), do i need to convert this data to 1 mintue tick data? or do you have any endpoint for 1 minute tick live data
  • rakeshr
    @bommina
    please let me know, doe's anyone given POA for Zerodha?
    Did get you on this? You mean do our client submit POA. Yes, many do, based on their ease.
    is there any disadvantages of giving this POA?
    You can go through this article to know about POA.
    do you have any test/dummy api to check buy and sell orders,
    No, currently we don't any official sandbox. You need to buy a kite connect API subscription to test the same.
    any python example for converting tick data to minute wise data
    You can go through this thread to know more.
Sign In or Register to comment.