Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Announcing Top Gainers/ Losers, PCR and OI BuildUp APIs for SmartAPI Users

    General Discussion
    0
    16
    363
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Moderator_3 @SIMAMONDAL last edited by

      Hello @SIMAMONDAL
      Have you updated the sdk to the latest version and please check after the update .
      Regards,
      SmartAPI Team

      S 1 Reply Last reply Reply Quote 0
      • S
        SIMAMONDAL @Moderator_3 last edited by

        @Moderator_3 Please explain how to update the sdk to the latest version

        Please explain. Thanks for the previous reply.

        M 1 Reply Last reply Reply Quote 0
        • M
          Moderator_3 @SIMAMONDAL last edited by

          Hello @SIMAMONDAL
          Please go through the below link to get the idea
          https://github.com/angel-one/smartapi-python
          Regards,
          SmartAPI Team

          1 Reply Last reply Reply Quote 0
          • A
            ameliassk last edited by

            Is it still not working for you?
            Since you're getting Invalid API key error, can you please confirm that you're able to consume other APIs? Click here

            1 Reply Last reply Reply Quote 0
            • O
              omcv last edited by

              I got a question after going through the documentation of smart-api websocket2.0.

              Question: Can we get top gainers/losers through the websocket ?
              Is this currently supported ?

              Can some one kindly address my question. Thanks!

              A 1 Reply Last reply Reply Quote 0
              • A
                admin @omcv last edited by

                @omcv It is not supported via websocket.

                1 Reply Last reply Reply Quote 0
                • K
                  kalanithi @Moderator_1 last edited by

                  @Moderator_1 Hi Team, I am also getting the same error.

                  Response: {'success': False, 'message': 'Invalid API Key', 'errorCode': 'AG8004', 'data': ''}.
                  Below is the code I tried. Could you please help

                  import requests

                  Define the API endpoint

                  url = "https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers"

                  Define the headers (replace with actual values as required)

                  headers = {
                  "Authorization": "Bearer eyJhbGciOiJIUzxxxxxxx", #token
                  "Content-Type": "application/json",
                  "Accept": "application/json"
                  }

                  Define the request packet

                  payload = {
                  "datatype": "PercPriceGainers", # datatype
                  "expirytype": "NEAR" # expiry type
                  }

                  Send the POST request

                  response = requests.post(url, headers=headers, json=payload)

                  Check the response

                  if response.status_code == 200:
                  print("Request Successful")
                  print("Response:", response.json())
                  else:
                  print(f"Request Failed with status code {response.status_code}")
                  print("Response:", response.text)

                  1 Reply Last reply Reply Quote 0
                  • C
                    C54532785 last edited by

                    PercPriceGainers , PercOIGainers , Long Built Up are showing negative stocks. The data is not valid data

                    1 Reply Last reply Reply Quote 0
                    • C
                      C54532785 last edited by

                      Top gainers and loosers are displaying wrong values. Long build up is returning wrong value.

                      1 Reply Last reply Reply Quote 0
                      • W
                        whemant last edited by

                        hello @Moderator_1

                        I am getting an error AB1004 when the datatype = PercPriceGainers. Other datatypes PercOIGainers, PercOILosers, PercPriceLosers all working fine

                        login_obj = user_details['obj']

                        params = {
                        "datatype": "PercPriceGainers",
                        "expirytype": "NEAR"
                        }

                        print(login_obj.gainersLosers(params))

                        {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

                        This was working fine till yesterday.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          whemant @whemant last edited by

                          Am I the only one encountering this error? Why am I experiencing this issue only with 'PercPriceGainers' and not with 'PercPriceLosers'?

                          This has been happening since yesterday; it was working perfectly fine before that.

                          @Moderator_1 @Moderator_2 @Moderator_3, @Moderator_4 , could you please respond to this?

                          [E 250128 10:19:46 smartConnect:242] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '87:9e:2a:03:ef:88', 'Accept': 'application/json', 'X-PrivateKey': 'hidden', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'datatype': 'PercPriceGainers', 'expirytype': 'NEAR'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

                          1 Reply Last reply Reply Quote 0
                          • V
                            v66167 last edited by

                            @Moderator_1 said in Announcing Top Gainers/ Losers, PCR and OI BuildUp APIs for SmartAPI Users:

                            https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/OIBuildup

                            is this working for anybody?

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post