Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. A224819
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by A224819

    • RE: Historical Data not Pulling prior October 2016 and Getting JSON Error

      @A224819

      Update on the JSON error: I tried to pull the json response code and it pulled 403:
      eb5d0ca1-3271-418b-a1d5-8cd39a87e603-image.png

      It seems to be some issue on AB's server? Can somebody please check?

      Thank you.

      posted in General Discussion
      A224819
      A224819
    • Historical Data not Pulling prior October 2016 and Getting JSON Error

      Hello team,

      I hope you all are well! I have been trying to pull historical data - the 15 minute OHLC to be specific, starting from 2010. However, it seems to be pulling starting from October 2016. I am using Python, if that helps:
      2f269240-43db-4834-9fce-bcf2f8a6bea1-image.png

      I am handling the format of the date correctly - so I am fine there.
      Here is a screenshot of the data pulled:
      15a6ecfa-b501-4225-b1a1-a33680b2e8a4-image.png

      Another issue I have noticed is I have been getting this error from a couple of days:
      7ea0bccd-eaf3-4252-ba73-5608b4738439-image.png

      Can somebody help me solve this issue?

      Thank you!

      posted in General Discussion
      A224819
      A224819
    • Suggestion: CSV or Excel File of Symbols

      Hello team,

      I hope you are well.

      The link to the list of instruments is too heavy for my browser to handle. It crashes every time I try to open it. I have also tried to extract the content of the page to a .txt file using the terminal on my linux machine but even the text editor I use to open this txt file is unable to handle the overwhelming content. I does show the data but with some limitation.

      Suggestion - It would be better if someone could create a CSV file and separate the equity symbols by NSE/BSE or the equity/options symbols.

      Thank you.

      Regards,
      Ahmed

      posted in Python SDK
      A224819
      A224819
    • Pulling Price Data Throws AB2000

      Hello team,

      The code I had been using was working perfectly and has suddenly started misbehaving. I am trying to pull price data and here is what it has suddenly started to give:

      68dbf5ba-56f1-4e0f-838f-5f660b06002e-image.png

      Can someone check why this issue suddenly? It was working well yesterday

      Thank you and best regards.

      posted in Python SDK
      A224819
      A224819
    • RE: Fetching LTP Gives 500 Internal Server Error

      @kaleps
      There were three errors:

      • The Symbol token was incorrect -> refer the link
      • The url used was incorrect -> check the documentation
      • I missed the authorization in the header. -> add to header as shown in the documentaion
      posted in Python SDK
      A224819
      A224819
    • RE: Fetching LTP Gives 500 Internal Server Error

      @admin
      Thanks a ton!

      posted in Python SDK
      A224819
      A224819
    • RE: Fetching LTP Gives 500 Internal Server Error

      Hi @admin

      I have tried doing that. I have copy-pasted your code exactly and still no luck:
      ddc3b130-7280-4f9b-8202-65d576f8e923-image.png

      Kindly assist me with this. It's been days now I am trying to pull LTP.

      You had said earlier that I have to try during market hours, but you did not clarify if the code won't work off-hours. I have tried now and will try the same code tomorrow morning and update a screenshot (which I am sure will still pull 404).

      Thank you.

      posted in Python SDK
      A224819
      A224819
    • RE: Fetching LTP Gives 500 Internal Server Error

      @admin ,

      I have been following the same link you have shared. Here is what i tried today during the trading hours:
      d80aa131-3a74-4e47-9b62-8164c22d8f26-image.png

      22cd6e39-c1d0-4e74-b462-42ab1253ca79-image.png

      Kindly tell me where I am going wrong?

      Please tell me how a working code would look like with the correct parameters. As I follow the documentation, I see we only pass the exchange, trading symbol and the symbol token.

      posted in Python SDK
      A224819
      A224819
    • API Returns Success on Cancel Order but the App Still Shows Pending Order

      Hello @admin :

      After failing to implement the API documentation, I thought of giving the smartapi a shot: in an attempt to test the code, I am trying to cancel the order I had placed on late Thursday (24 Dec) and here is what the code has returned:
      a7bed851-f899-428d-af5d-5264294677c2-image.png

      As you can see the cancellation was successful from the API end, but the app fails to reflect the same:
      367982aa-eac6-4646-a41c-712379ed9172-image.png

      Should I consider this order cancelled or still pending (as the app shows)?

      Appreciate your help 🙂

      posted in Python SDK
      A224819
      A224819
    • RE: Unable to Cancel Order - 404 Error

      FYI: I have also tried the upper case "NORMAL" and still same issue 😞

      posted in Python SDK
      A224819
      A224819
    • Unable to Cancel Order - 404 Error

      Hello team,

      Hope you are well.

      I am trying to cancel an order I had placed post trading hours on Thursday (24 Dec) and it gives me 404:
      c6fb8b2e-a5bc-48a7-a6a8-6da995949794-image.png

      038e845b-670c-4f68-bece-2d348530c59f-image.png

      Order ID:
      fefb15b0-b1e5-4c36-8558-ec567c92caf8-image.png

      I don't know what's going wrong since orders can be cancelled during non-trading hours too.

      Thank you.

      posted in Python SDK
      A224819
      A224819
    • RE: Unable to fetch LTP

      @Shailesh
      Bro, can you please tell me what package you are referring to? I am using the documentation (this part), which does take the params (header and the security/exchange symbol data):
      d1306824-7485-4e8a-b7cc-2351227d032c-image.png

      Also, I have tried removing the space and still no luck, mate! 😞
      a4ef1c6d-123c-4480-97b5-4b0cbe06a993-image.png

      Thank you.

      posted in General Discussion
      A224819
      A224819
    • RE: Fetching LTP Gives 500 Internal Server Error

      @rajanprabu
      Okay, so is this how it's designed? I mean to pull only during the trading hours?

      posted in Python SDK
      A224819
      A224819
    • RE: Unable to fetch LTP

      @sandipkhairnar

      I am also trying the same and getting 404 error. Here is a screenshot:
      3748fa8a-69b5-4026-91f1-045aeee11676-image.png

      I am trying to get the LTP for days now. Please help me. I have already tried the 'SmartConnect' approach and it gives me 500 (Internal Sever error). I am happy to continue with the API documentation.

      Kindly help me get through this.

      Thank you 🙂

      posted in General Discussion
      A224819
      A224819
    • Fetching LTP Gives 500 Internal Server Error

      Hello @admin , @rajanprabu @sandipkhairnar :

      I am trying to fetch the LTP and getting 500 (Internal Server Error). Please look into this:
      931f8cb8-48f9-4c09-b6cf-e4d9188feeb7-image.png

      Also, since you are suggesting us to use this method of implementing the API, how can the API documentation help us in this scenario? I had to go back to the SmartConnect class we are importing to check how the LTP is fetched. I think there should be a separate documentation when we use this (the smartconnect module) approach.

      Thank you for your help!

      posted in Python SDK
      A224819
      A224819
    • RE: historical data python

      @admin can you please tell us if AG plans to integrate historical data in the API. If not, we can simply use Zerodha's.

      Thank you.

      posted in Python SDK
      A224819
      A224819
    • RE: Authentication: AB1007 and Mac Format

      Hello, @prateekjjw001 @sandipkhairnar @admin

      As suggested, I tried using another IDE (Spyder3) and was still getting the same error. So, clearly it wasn't to do with the IDE. I just dug deeper into this and was able to SUCCESSFULLY fix this issue by installing two additional pip requirements. Hence, anyone getting 'No Module found: twisted' error should first install twisted using the below command:

      pip3 install twisted
      

      Then, if you get the 'No module found: OpenSSL' or 'No module found: autobahn'. Try the below codes. I don't know if the first one is necessary but I used it to fix my issue so probably it may help others too:

      pip install pyOpenSSL
      

      The other two which helped me get out of this headache I had since days were:

      pip3 install service_identity
      pip3 installed autobahn twisted
      

      Thank you all for your help so far 🙂

      posted in Python SDK
      A224819
      A224819
    • RE: Authentication: AB1007 and Mac Format

      @sandipkhairnar I have tried that. I have also tried switching the linux distro altogether. I am currently only Feren OS from Lubuntu.
      I have tried installing pyOpenSSL:
      0affbff8-d92d-4075-851c-2ace2fb81a4c-image.png

      However, there is one thing that baffles me and I would like @admin to take note of this issue:

      When I run the below code on PyCharm, it throws the old error - same as above (OpenSSL not found):

      from smartapi.smartConnect import SmartConnect
      

      b928e9c0-dc25-4c40-8f53-ceb5669d7065-image.png

      But, when I run the same command in the terminal, the first time it shows me error and the second time, it runs just fine:
      06ea8ddf-ee40-4774-bdee-59056f70a83a-image.png

      What perplexes me is that why:

      1. The code has to be run twice for it to work in the terminal
      2. Why does the import throw error in the PyCharm IDE.

      Guys, am I the only one facing this issue? If someone was get around this, can you please help me with it? I have been trying to play with this for days now but no luck.

      @admin please suggest an appropriate way out. I have literally changed the distro and typing this from the new linux distro as it did not work here as well.

      Thank you so much.

      Regards,
      Ahmed

      posted in Python SDK
      A224819
      A224819
    • RE: ModuleNotFoundError

      @rajanprabu Mate, I did think of it and tried uninstalling and re-installing the package:
      0f1eedac-1fae-4c60-b047-7cff2de8b65d-image.png
      b7c694d1-e265-4bcb-a0b6-eabde5fa17bc-image.png
      Still the same issue:
      3720b0dc-7056-439b-87f7-943f5eb58ff2-image.png
      Here is the debug:
      4ebbafc6-e453-45b0-a1f2-0b6420deae39-image.png

      Also, I am also a Linux user

      posted in Python SDK
      A224819
      A224819
    • RE: Authentication: AB1007 and Mac Format

      @admin Thank you.

      I have tried using the suggested approach, and you told me in the other post to follow this page to solve the 'twisted' module not found error. I did use the below to install it:

      pip install twisted
      

      but later it threw this error:

      26d700f1-0b9f-4fb4-bda3-da860965a0f3-image.png

      I will be posting all my issues on this thread so that it may serve as a 'refer-to' guide for many beginners. For tall the beginners I will try my best to assist as I progress with the development, so any reply here from the tech experts will be highly appreciated 🙂

      Thank you so much 🙂

      posted in Python SDK
      A224819
      A224819