Navigation

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

    PHP LTP API

    General Discussion
    4
    9
    125
    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.
    • A
      amanthuniya94 last edited by

      Hey
      I am using smart API in the PHP platform
      Everything is okay but I am a little lost to identify which API should I call to get the live trading data of NFO (Only for NFO)
      There is not much written in the documentation.
      Can you help me?
      May be it is something related to LTP but I am not sure how to call it through PHP

      Thank you in advance!

      W A 3 Replies Last reply Reply Quote 0
      • W
        webseos @amanthuniya94 last edited by

        @amanthuniya94

        I am struggling to get sample code how to request LTP, how to calculate Moving avg, EMA, RSI 14 etc

        Can you help

        V A 2 Replies Last reply Reply Quote 0
        • A
          admin @amanthuniya94 last edited by admin

          HI @amanthuniya94 said in PHP LTP API:

          Hey
          I am using smart API in the PHP platform
          Everything is okay but I am a little lost to identify which API should I call to get the live trading data of NFO (Only for NFO)
          There is not much written in the documentation.
          Can you help me?
          May be it is something related to LTP but I am not sure how to call it through PHP
          Thank you in advance!

          We have already noted this query on another thread and our team is working on it.

          1 Reply Last reply Reply Quote 0
          • V
            VishwaSolutions @webseos last edited by VishwaSolutions

            @webseos you can get data by using historic api for calculating SMAs. SDK in php is available on github with sample, i think it is community made API. For LTP i am trying to get data by using websocket, but it is not even connecting.

            A W 2 Replies Last reply Reply Quote 0
            • A
              admin @VishwaSolutions last edited by

              HI @VishwaSolutions follow below thread:
              https://smartapi.angelbroking.com/topic/1165/heartbeat-sending-failed/16?_=1628134014297

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

                @VishwaSolutions my websocket connected but not getting data, I saw console its connected

                // websocket(clientcode, feedtoken, script, task)
                var ws =new websocket('<?php echo $clientCode;?>', '<?php echo $feedToken;?>', 'nse_cm|2885', 'mw');

                	//connect to server
                	ws.connection().then(() => {
                        ws.runScript("nse_cm|2885", "mw");
                         // SCRIPT: exchange|token for multi stocks use & seperator, mcx_fo|222900  ### TASK: mw|sfi|dp
                
                        setTimeout(function () {
                            ws.close()
                        }, 3000)
                    });
                
                1 Reply Last reply Reply Quote 0
                • W
                  webseos @admin last edited by

                  @admin What is heart beat? I am confused. By the way I developed a code to get LTP: in PHP. If I can get LTP or 1 min GetCandleData why WEBSOCKET wss://....

                  ** Pls Add a category in PHP, all going to general discussion

                  https://smartapi.angelbroking.com/topic/1203/how-to-get-ltp-sample-source-code-in-php-added-a-getltp-function-error-handling-excluded

                  1 Reply Last reply Reply Quote 1
                  • W
                    webseos @amanthuniya94 last edited by

                    @amanthuniya94 See this link : https://smartapi.angelbroking.com/topic/1203/how-to-get-ltp-sample-source-code-in-php-added-a-getltp-function-error-handling-excluded

                    1 Reply Last reply Reply Quote 0
                    • A
                      aminastarks @webseos last edited by

                      @webseos said in PHP LTP API:

                      @amanthuniya94 mapquest directions

                      I am struggling to get sample code how to request LTP, how to calculate Moving avg, EMA, RSI 14 etc

                      Can you help

                      Kindly migrate my ID M301894

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