How to integrate FYERS API Bridge with Excel using VBA coding?

How to integrate FYERS API Bridge with Excel using VBA coding?

FYERS API Bridge can be integrated with Excel and to Algo trade from Excel, you can code in VBA to for sending signals in FYERS API Bridge in excel. You need to create a TCP client as given below.

Read this article to understand how FYERS API Bridge works?

To create a TCP client

  1. Add a new form to the project, and name it frmClient.
  2. Change the caption of the form to a TCP Client.
  3. Add a Winsock control to the form and name it tcpClient.
  4. Add two TextBox controls to frmClient. Name the first txtSend, and the second txtOutput.
  5. Draw a CommandButton control on the form and name it cmdConnect.
  6. Change the caption of the CommandButton control to Connect.
  7. Add the code below to the form.

Important: Ensure that you change the value of the RemoteHost property to the friendly name of your computer.

 Private Sub Form_Load()
 ' The name of the Winsock control is tcpClient.
 ' Note: to specify a remote host, you can use
 ' the IP address (ex: "127.0.0.1") 
 tcpClient.RemoteHost = "RemoteComputerName"
 tcpClient.RemotePort = 30001
 End Sub
Private Sub cmdConnect_Click()
     ' Invoke the Connect method to initiate a
     ' connection.
     tcpClient.Connect
 End Sub
Private Sub txtSend_Change()
     tcpClient.SendData txtSend.Text
 End Sub
Private Sub tcpClient_DataArrival _
 (ByVal bytesTotal As Long)
     Dim strData As String
     tcpClient.GetData strData
     txtOutput.Text = strData
 End Sub

Source.

Example String to send to the port -“9”, “LE”,”SBIN”,”L”,””,”290″,”7″,”EQ”,””

    • Related Articles

    • How to integrate FYERS API Bridge with front-end platforms?

      You can send Signals in FYERS API Bridge through an external program such as Amibroker/MT4/TradingView/Python/C# etc. Understanding How Signals Work: The FYERS API Bridge works based on “Signals”. A Signal is basically an indication (not decision) to ...
    • How to integrate FYERS API Bridge Advanced Extension with TradingView?

      We have released FYERS API Bridge Advanced Extension for TradingView platform with few updates. Installation For the latest version of TradingView Extension, click Help from the top menu of FYERS APIBridge. Then go to Jump Start setup and follow ...
    • How do I sign up for FYERS API Bridge?

      FYERS API Bridge is a tool that allows you to connect your trading strategies with FYERS Trading API and execute orders on various platforms such as TradingView, Amibroker, MT4, Python, Excel, etc. To sign up for FYERS API Bridge, you need to: ...
    • How to integrate FYERS API Bridge with C# .NET?

      Using C# .NET to Algo trade via FYERS API Bridge is extremely easy as you just need to send data on FYERS API Bridge socket and use all inbuilt libraries in FYERS API Bridge. Check out the sample code as outlined below. //function: ...
    • How to integrate FYERS API Bridge with TradingView?

      You can deploy complex Algos using TradingView’s simple web charts. The best part is that it requires zero programming knowledge. Simple or sophisticated derivative Algos can be deployed in simple English using TV Alerts. How It Works: Add FYERS API ...