Navigation

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

    AB1018 : Failed to get symbol details

    C#/.Net SDK
    2
    9
    82
    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.
    • D
      divakar620 last edited by

      Please find below request and Responses. I loaded instruments couple of seconds back.. Still it showing weird responses.

      Error
      {"status":false,"message":"Failed to get symbol details","errorcode":"AB1018","data":null}

      Request
      {"orderid":null,"variety":"NORMAL","tradingsymbol":"NIFTY03NOV2118250CE","symboltoken":"43477","transactiontype":"SELL","exchange":"NSE","ordertype":"MARKET","producttype":"DELIVERY","duration":"DAY","price":null,"squareoff":"0","stoploss":"0","quantity":"50","triggerprice":"0"}

      Help me where it went wrong.

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

        HI @divakar620 Pass exchange as NFO.

        D 1 Reply Last reply Reply Quote 0
        • D
          divakar620 last edited by

          Now Getting Different Error
          Corrected Request
          {"orderid":null,"variety":"NORMAL","tradingsymbol":"NIFTY03NOV2117950PE","symboltoken":"43341","transactiontype":"SELL","exchange":"NFO","ordertype":"MARKET","producttype":"CARRYFORWARD","duration":"DAY","price":null,"squareoff":"0","stoploss":"0","quantity":"50","triggerprice":"0"}

          New Error:
          {"status":false,"message":"Internal Error","errorcode":"AB2001","data":null}

          1 Reply Last reply Reply Quote 0
          • D
            divakar620 @admin last edited by

            @admin
            Now Getting Different Error
            Corrected Request
            {"orderid":null,"variety":"NORMAL","tradingsymbol":"NIFTY03NOV2117950PE","symboltoken":"43341","transactiontype":"SELL","exchange":"NFO","ordertype":"MARKET","producttype":"CARRYFORWARD","duration":"DAY","price":null,"squareoff":"0","stoploss":"0","quantity":"50","triggerprice":"0"}

            New Error:
            {"status":false,"message":"Internal Error","errorcode":"AB2001","data":null}

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

              Hi @divakar620 Please go through below code
              https://smartapi.angelbroking.com/topic/1194/basic-smartapi-integration-using-python

              D 1 Reply Last reply Reply Quote 0
              • D
                divakar620 @admin last edited by

                @admin

                I am usign .Net. here is my Code: i don't see any wrong while comparing it with your reference..

                       //Place Order
                        OrderInfo ord = new OrderInfo();
                        ord.variety = AngelBroking.Constants.VARIETY_NORMAL;
                        ord.tradingsymbol ="NIFTY03NOV2118250CE"
                        ord.symboltoken = "43477";
                        ord.transactiontype = AngelBroking.Constants.TRANSACTION_TYPE_SELL;
                        ord.exchange = AngelBroking.Constants.EXCHANGE_NFO;
                        ord.ordertype = AngelBroking.Constants.ORDER_TYPE_MARKET;
                        ord.producttype = AngelBroking.Constants.PRODUCT_TYPE_CARRYFORWARD;
                        ord.duration = AngelBroking.Constants.VALIDITY_DAY.ToString();
                        ord.quantity = quantity.ToString();
                        obj = connect.placeOrder(ord);
                        OrderResponse Ores = obj.PlaceOrderResponse;
                

                Help me to find my problem..
                Question 2
                Also, I have 2nd Question as to hold WebSocket message, do we have any model from MessageEventArgs ?

                static void WriteResult(object sender, MessageEventArgs e)
                {

                        dynamic d = JsonConvert.DeserializeObject<dynamic>(e.Message);
                        Console.WriteLine("Tick Received : " + e.Message);
                    }
                
                D A 2 Replies Last reply Reply Quote 0
                • D
                  divakar620 @divakar620 last edited by

                  @admin .. Could you please clarify ?

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

                    HI @divakar620 this has been resolved kindly update the .net sdk.

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      divakar620 @admin last edited by

                      @admin

                      Is that update sdk is taking new build from git? if yes, i did same, but still problem exisit.

                              SmartApi connect = new SmartApi(api_key, JWTToken, RefreshToken);
                      
                              OutputBaseClass obj = new OutputBaseClass();
                      
                              //Login by client code and password
                              obj = connect.GenerateSession(Client_code, Password);
                              AngelToken agr = obj.TokenResponse;
                      
                              Console.WriteLine("------GenerateSession call output-------------");
                              Console.WriteLine(JsonConvert.SerializeObject(agr));
                              Console.WriteLine("----------------------------------------------");
                      
                              //Get Token
                              obj = connect.GenerateToken();
                              agr = obj.TokenResponse;
                      
                              Console.WriteLine("------GenerateToken call output-------------");
                              Console.WriteLine(JsonConvert.SerializeObject(agr));
                              Console.WriteLine("----------------------------------------------");
                      
                              //Get Profile
                              obj = connect.GetProfile();
                              GetProfileResponse gp = obj.GetProfileResponse;
                      
                              Console.WriteLine("------GetProfile call output-------------");
                              Console.WriteLine(JsonConvert.SerializeObject(gp));
                              Console.WriteLine("----------------------------------------------");
                      
                              OrderInfo ord = new OrderInfo();
                              ord.variety = AngelBroking.Constants.VARIETY_NORMAL;
                              ord.tradingsymbol = "NIFTY11NOV2118100CE";
                              ord.symboltoken = "50055";
                      
                              ord.transactiontype = AngelBroking.Constants.TRANSACTION_TYPE_BUY;
                      
                              ord.exchange = AngelBroking.Constants.EXCHANGE_NFO;
                              ord.ordertype = AngelBroking.Constants.ORDER_TYPE_MARKET;
                              ord.producttype = AngelBroking.Constants.PRODUCT_TYPE_CARRYFORWARD;
                              ord.duration = AngelBroking.Constants.VALIDITY_DAY.ToString();
                              ord.quantity = 50.ToString();
                      
                              obj = connect.placeOrder(ord);
                              OrderResponse Ores = obj.PlaceOrderResponse;
                              //LogOut
                              obj = connect.LogOut(Client_code);
                              LogOutResponse lg = obj.LogOutResponse;
                      
                              Console.WriteLine("------LogOut call output-------------");
                              Console.WriteLine(JsonConvert.SerializeObject(lg));
                              Console.WriteLine("----------------------------------------------");
                      

                      I am gettiung below response.
                      {"status":false,"message":"Internal Error","errorcode":"AB2001","data":null}

                      Please clarify me, as i am spending decernt time to build algos using Angel, but you API or WebSocket not upto the level of my expectation, i am not sure, whether as i doing wrong or, it your API fault.

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