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
- Add a new form to the project, and name it frmClient.
- Change the caption of the form to a TCP Client.
- Add a Winsock control to the form and name it tcpClient.
- Add two TextBox controls to frmClient. Name the first txtSend, and the second txtOutput.
- Draw a CommandButton control on the form and name it cmdConnect.
- Change the caption of the CommandButton control to Connect.
- 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
Example String to send to the port -“9”, “LE”,”SBIN”,”L”,””,”290″,”7″,”EQ”,””