Navigation

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

    shashwatVar

    @shashwatVar

    3
    Reputation
    7
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    shashwatVar Follow

    Best posts made by shashwatVar

    • Basket order support

      Hi team, wanted to know the support in the smart API SDK / API endpoints for the following action:

      • creating a basket order
      • adding stocks to a particular basket
      • ordering a basket

      cc @admin

      posted in General Discussion
      S
      shashwatVar
    • ws: acknowledgement on order rejection

      what ?

      • order via placeOrder method -> the returned response was this :
      {
        status: true,
        message: 'SUCCESS',
        errorcode: '',
        data: {
          script: 'MIDCPNIFTY05FEB2410375PE',
          orderid: '240205000140605',
          uniqueorderid: 'b837bc9d-8113-4bdc-b515-696e5bea278f'
        }
      }
      
      • on checking the angel platform saw that the order was rejected (placing an order through the placeOrder method, the returned response indicates success, but upon further verification on the Angel platform, the order appears to be rejected)
        WhatsApp Image 2024-02-05 at 11.38.05 AM.jpeg

      • need a way to detect order rejection programatically -> I understand that the first API call might not be directly responsible for executing the order (might be placing transit orders in a queue), hence it might not be able to return the correct order execution status. This is a crucial requirement -> otherwise there is a duplication of effort in terms of executing orders via the api and checking them simultaneously on the Platform.

      • the callee should be responded with what happened to the order. If there is already an implementation for the same, will be happy to know.

      posted in Bugs
      S
      shashwatVar

    Latest posts made by shashwatVar

    • 500 on placeOrder API

      Experiencing two occurrences of HTTP 500 errors while attempting to place orders today is concerning, especially in a trading environment where reliability is paramount. These server-side issues are not acceptable from a trading vendor's API.

      9989d7d1-5d69-47d6-96d1-0308f2b95670-image.png

      posted in Bugs
      S
      shashwatVar
    • RE: ws: acknowledgement on order rejection

      @Moderator_2 cool, can make do with the getOrderBook endpoint.

      posted in Bugs
      S
      shashwatVar
    • ws: acknowledgement on order rejection

      what ?

      • order via placeOrder method -> the returned response was this :
      {
        status: true,
        message: 'SUCCESS',
        errorcode: '',
        data: {
          script: 'MIDCPNIFTY05FEB2410375PE',
          orderid: '240205000140605',
          uniqueorderid: 'b837bc9d-8113-4bdc-b515-696e5bea278f'
        }
      }
      
      • on checking the angel platform saw that the order was rejected (placing an order through the placeOrder method, the returned response indicates success, but upon further verification on the Angel platform, the order appears to be rejected)
        WhatsApp Image 2024-02-05 at 11.38.05 AM.jpeg

      • need a way to detect order rejection programatically -> I understand that the first API call might not be directly responsible for executing the order (might be placing transit orders in a queue), hence it might not be able to return the correct order execution status. This is a crucial requirement -> otherwise there is a duplication of effort in terms of executing orders via the api and checking them simultaneously on the Platform.

      • the callee should be responded with what happened to the order. If there is already an implementation for the same, will be happy to know.

      posted in Bugs
      S
      shashwatVar
    • RE: Specified Order to be Market but turned into Limit

      @Moderator_2 client code: P396062

      posted in Bugs
      S
      shashwatVar
    • Specified Order to be Market but turned into Limit
      // call buy for hedge
      const callOrderResponse = await clientSession.smartApi.placeOrder({
      	variety: "NORMAL",
      	tradingsymbol: hedgeOptions.call!.symbol,
      	symboltoken: hedgeOptions.call!.token,
      	transactiontype: "BUY",
      	exchange: this.optionsConfig.activeIndex.chain_exchange,
      	ordertype: "MARKET",
      	producttype: "CARRYFORWARD",
      	duration: "DAY",
      	quantity: clientSession.TOTAL_LOTS * this.optionsConfig.activeIndex.quantity_per_lot,
      });
      											this.logger.info(callOrderResponse);
      
      // put buy for hedge
      const putOrderResponse = await clientSession.smartApi.placeOrder({
      	variety: "NORMAL",
      	tradingsymbol: hedgeOptions.put!.symbol,
      	symboltoken: hedgeOptions.put!.token,
      	transactiontype: "BUY",
      	exchange: this.optionsConfig.activeIndex.chain_exchange,
      	ordertype: "MARKET",
      	producttype: "CARRYFORWARD",
      	duration: "DAY",
      	quantity:clientSession.TOTAL_LOTS * this.optionsConfig.activeIndex.quantity_per_lot,
      });
      
      this.logger.info(putOrderResponse);
      

      Ran the above code today for some options.
      The ordertype can be seen as "MARKET", when the order got placed, got the response :

      {
        status: true,
        message: 'SUCCESS',
        errorcode: '',
        data: {
          script: 'SENSEX2411273100CE',
          orderid: '240112000072279',
          uniqueorderid: 'eb008852-18eb-49af-9999-850a304c3a6f'
        }
      }
      {
        status: true,
        message: 'SUCCESS',
        errorcode: '',
        data: {
          script: 'SENSEX2411270600PE',
          orderid: '240112000072292',
          uniqueorderid: '5e25fb58-c6eb-4704-bce3-faf671ebd431'
        }
      }
      

      but for one of these orders the orderType in the angel platform can be seen as LIMIT which was not expected :

      c1c83201-2a3e-4565-bef7-37196e901724-image.png

      posted in Bugs
      S
      shashwatVar
    • Historical API - error AB2001

      What ?

      • getting error AB2001 error code on calling getCandleData.

      code snippet:

      try {
      			const candleResponse = await this.sessionConfig.smartApi.getCandleData({
      				exchange: "NFO",
      				symboltoken: tokenNumber,
      				interval: "THREE_MINUTE",
      				fromdate: "2021-04-19 09:15",
      				todate: "2021-04-19 15:30",
      			});
      		} catch (error) {
      			console.log(error);
      		}
      

      tokenNumber is from an option chain that has not expired yet.

      8f354327-8231-43ef-a048-bfd78355969e-image.png

      posted in Bugs
      S
      shashwatVar
    • Basket order support

      Hi team, wanted to know the support in the smart API SDK / API endpoints for the following action:

      • creating a basket order
      • adding stocks to a particular basket
      • ordering a basket

      cc @admin

      posted in General Discussion
      S
      shashwatVar