How to integrate FYERS API Bridge with Python?

Integrating Python with FYERS API Bridge is extremely easy. You just need to execute the following Python v3 code for placing orders. If you need further help, do not hesitate to contact us at

import socket
# client code to connect with API bridge
HOST = ''  # The server's hostname or IP address
PORT = 56789    # The port used by the server

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect((HOST, PORT))
    # Symbol = Symbol | Expiry | Strike | OptionType
    # TrigPrice = TrigPrice | StopLoss | SquareOff | TrailingTicks
    # StrategyTag = StrategyTag | Port

   # s.sendall(b"8,SE,HDFC,L,1,1200,100,EQ,STG11")

    data = s.recv(1024)

print('Received', repr(data))

Was this article helpful?

Related Articles