The FYERS API Bridge works based on “Signals”. A Signal is basically an indication (not decision) to Buy or Sell with specific conditions. The Bridge processes 4 types of Signals:
Long Entry (LE): Equivalent to fresh Buy for creating a Long position
Long Exit (LX): Equivalent to Sell for reducing/square-off Long position
Short Entry (SE): Equivalent to fresh Sell for creating Short position
Short Exit (SX): Equivalent to Buy for reducing/square-off Short position
Based on your Signal, and the settings provided under Symbol Settings, the API Bridge places orders in API with complete parameters. The settings given in Bridge over-rides the values received in Signal, whenever available and matched.
It’s a legacy feature which can be ignored
Input Symbol: This should be same as the symbol in your chart or other application such as Amibroker/MT4/Python/TradingView
Exchange Symbol: Actual symbol for placing orders via API. Eg. NIFTY for Nifty index futures.
Instrument Name: Should be selected from the drop-down. The Exchange value is taken automatically based on InstrumentName.
Expiry, Strike, Type: Applicable for derivatives.
Entry Order Type: Applicable for LE/SE signals
Exit Order Type: Applicable for LX/SX signals
A) Fixed Qty: A fixed integer qty will be used for all LE/SE/LX/SX signals.
B) Qty from SL: Calculates only for LE/SE signals. Risk is user-defined points Eg. 3000.StopLoss is taken from Signal: eg. 2. RoundLotSize for EQ segment should be given as 1.
Example: When the signal received in SBIN with 3000 risk, 2 rs StopLoss and RoundLotSize= 1, Bridge will place an order with quantity 1500. For LX/SX signals, qty is taken based on last sent LE/SE signal (regardless they are completed or not; Bridge does not check for NetPos here). Qty= int(Risk/(StopLoss*RoundLotSize) )*RoundLotSize.
C) Qty from Exposure: Exposure means the order value with which you want to take the position. It’s calculated only for LE/SE signals. Exposure is user-defined Eg. 10000. Price is taken from Signal: eg. 255.00. RoundLotSize for EQ segment should be given as 1.
Example: When the signal received in SBIN with 10000 exposure, at 255.00 and RoundLotSize= 1, Bridge will place an order with quantity 39. For LX/SX signals, qty is taken based on last sent LE/SE signal (regardless they are completed or not; Bridge not checks for NetPos here). Qty= int(Exposure/(Price*RoundLotSize) )*RoundLotSize
Note: For NSE Derivatives, you need to provide absolute quantity, not the number of lots. Eg. provide 75 for placing an order in one lot of Nifty Futures. For MCX, you need to give quantity in a number of lots. Eg. provide 1 for trading in one lot of Crudeoil contract.
Product Type: Select from drag-drop
MaxOpenPosition: Maximum allowed position for Long or Short trades. Eg., if you provide 100, it will reject new LE/SE signals if they can increase NetPos more than 100. It works for both Long and Short positions.
MaxProfit/MaxLoss: It squares off current position based on the Unrealized MTM received via API. Note that MaxProfit does not stop trading; if fresh signals are received, they will be processed.
Strategy Tag: only applicable to multi-strategy settings. The strategy tags provided through Application Settings -> Symbol Settings will be available here in the drop-down.
Note: If you are using multi-strategy or multi-product type in the same symbol, you should specify instrument in both Symbol Settings and Signal sent to bridge.
Entry From: You can set the time from which Trading will start, irrespective of your signals. For example, if you are trade intraday, and don’t want to trade in the first 15 minutes after market open, you can change Entry From to 9:30 AM.
Entry To: You can also set the time limit up to which Bridge will accept LE/SE. If you don’t want to take fresh trades after 3 pm, you can set this in “Entry To” setting.
Square Off Time: If you want to square-off all your positions at a particular time, you can set Time Based SquareOff. This will square-off all positions in MIS. or NRML. It will NOT square-off your holdings.
Delete All: Used to remove all symbol settings.
Mode (Default/PaperTrading): For placing live orders select Default or Pop Up mode. Paper Trading is available to test out the functionality of Bridge without using Trading API. However, Paper Trading mode has few limitations like unavailability of SquareOff, MaxLoss, MaxProfit etc. which are dependent on live data from the API.
Import/Export Symbols: You can import/export all symbols from csv file.
Show Full Log: Shows you very detailed log of all processing done by bridge