snAPI.in cloud based trading platform.

Your Trading Strategy Produces Signals from tradingview.com's server
This consists of indicators on their charts that trigger alerts at key moments, like Buy, Take Profit, etc. Snapi.in do not provide or suggest any trading strategies or ideas to snapi.in users.

Send Alerts to special URL (snapi.in server) using tradingview webhook. You can copy URL from you snAPI account.
Special commands in the alert message are seen by the snapi.in ,and the trades are automatically executed even user is not connected to internet or online on snapi.in system.

Orders executed on Exchange..
Special commands in the alert message are seen by the snapi.in ,and the trades are automatically executed even user is not connected to internet or online on snapi.in system.

Tradingview PineScript/ Algorithm ideas


https://in.tradingview.com/u/snapi_algo_trading_india/#published-scripts

Above ideas are for educational purpose only. We do not recommend or suggest any strategy for trading and investing through snapi.in. We do not recieve any revenue from Tradingview.com


Why Tradingview.com

HTML5 Charts Depending on your needs, you can create simple charts to track one or two stocks or create multiple dynamic charts that track different markets. You can even draw on your charts.
Server-Side Alerts Set up alerts that go to your desktop or phone to notify you when certain conditions go outside your specified criteria. There are 12 different alert conditions that can be applied to indicators or drawing tools.
All your alerts run on powerful and backup-up servers, so you'll always get notified when alert condition happens and won't miss beat.
A Social Community of Active Traders See what other active traders are doing, gather ideas and collaborate with others in similar markets.
Get Realtime Merket Data for free You get realtime market data for NSE/MCX echanges for paid subscriptions.

Recommended Strategy Alert Message Format :
StrategyName,symbol,{{strategy.order.action}},{{close}},{{strategy.order.contracts}},{{strategy.position_size}}
Just replace symbol with any stock/future/option you want and copy and paste above message format in tradingview alerts for any strategy.

Alert Message format Decoded: StrategyName,symbol,action,price,qty,New_Position_Size

1 StrategyName (Mandatory) Your StrategyName is random field just to know alert is triggered on which strategy.snAPI does not have anything to do with this field.But is mandatory.
2 Symbol (Mandatory) Symbol to trade. This symbol should be saved in symbol settings table of user,who want this symbol to trade. e.g. NSE:SBIN-EQ,NSE:NIFTY20JUNFUT.
3 action (Mandatory) "LE" or "buy" : To open fresh long positions. Recently strategy alerts are introduced in tradingview.(placeholder{{strategy.order.action}} should returns "buy" for long conditions to snapi.in.)
"SE" or "sell" : To open fresh short positions. Recently strategy alerts are introduced in tradingview.(placeholder{{strategy.order.action}} should return "sell" for short conditions to snapi.in.)
"LX" : To close long position which is open.LX will not create new short position.
"SX" : To close short position which is open. SX will not creat new long positions.
4 price (Optional) price will utilized to place orders if saved setting is limit order for particular symbol.(placeholder {{close}} from tradingview will return current price for symbol to snapi.in).Put 0 if market Order.
5 Qty (Optional) If reccieved any quantity different than qty saved in symbol setting table, quantity recieved from tradingview signal will override quantity saved in symbol settings.(placeholder {{strategy.order.contracts}} from tradingview will return new order QTY for symbol to snapi.in)
6 New_Position_Size (optional) Optional but must for very effective order management. It is quantity which checks , what will be new position quantity after this order.(placeholder {{strategy.position_size}}from tradingview will return New_Position_Size for strategy).
7 ;(optional) If user want to trigger multple orders using single tradingview alert ";" is used.
singal order : StrategyName,symbol,action,price,qty,New_Position_Size
multiple orders : StrategyName,symbol,action,price,qty,New_Position_Size;StrategyName,symbol,action,price,qty,New_Position_Size
Create API app in fyers api dashboard.


App Name is for you to recognise the app which has been created.

Status of App must be Approved. Sometimes it takes time to get your app status from requested to approved .

Once you have created your app, you will be provided with an App ID and Secret ID. These are used to authenticate the application and to prevent unauthorised usage.

snAPI user will need this APP ID and Secret ID to login and get your automated trading setup done.

Redirection URL must be "https://snapi.in"

General Instructions

  1. Fyers API provides API token to each user. This token will be valid for 24 Hours.
  2. User needs to login to snAPI ID as well as fyers ID every morning to keep your token alive.
  3. If user dont login on particular day, trades wont be placed as user will get error " Invalid Token".
  4. Once user successfully logged in to snAPI ID and fyers ID in the morning( token is renewed), snAPI won't ask user to log in to fyers ID again on that particular day.
  5. snAPI recommend not to use fyers one or any other api application to monitor your trades and positions while trading session.
  6. Use any modern web browser(Chrome,Firefox ....) to monitor trades and positions.

After first time login. You will get message "Enter app Id and Secret key to login to Fyers account which is associated with this snapi account while sign up."
Put APP ID and Secret ID of app that we have created in fyers. api dashboard..


Use can save APP ID and Secret ID if want. It will be stored safely to snAPI database in encrypted format. No one can access your APP ID and Secret ID.
Once you click submit button.If the request succeed, Login button will appear , after clicking that button , the user will be redirected to the fyers.in login page to authorize the app.



Enter your fyers credentials & click on submit button. These credentials are not stored anywhere on snAPI.
After successful login you will see your fyers ID on top.


snAPI provides unique key to every user.
This key is used to in url of your tradingview webhook and for telegram integration.
This key is used to authenticate the snAPI application and to prevent unauthorised usage.
snAPI reccomend not to share your key with any one.
snAPI will not be resposible if someone misuses your key and false trades or orders are placed in user`s trading account.
User can change key anytime if needed.


Click on "GENERATE KEY" button on Signal Setting form after 1st time login.


Click on "Copy URL " button on Symbol Setting form.


Now paste this URL is tradingview alert webhook URL.
Note : Every time user changes key , tradingview alert webhook needs to be changes as well.


Options Webhook URL : If user have snAPI Professional subscription. Option URL is provided in options tab.
Note : Every time user changes key , tradingview alert webhook needs to be changes as well.
Note : Option URL is different URL from URL above, which is used for special option webhook.


- Number of rows to display.
Delete Button Delete row details.
Copy Symbol Button Copy alert messsage command with symbol in that row.(Copy & paste it in Tradingveiw alert as it is for strategies).
Symbol : Search symbol by NAME.Select symbol from dropdown or user can bring any symbol from fyers symbol list.
Product Type 1> INTRADAY 2>CNC 3> Cover Order 4>Bracket Order 5> MARGIN
Order Type1>LIMIT 2>MARKET 3>SL-M
QtySave quantity for orders.
Max QtyMaximum quantity for position.
Limit PriceLimit order price if user want to place order by buy/sell buttons.Price from tradingview signal will override this price.
Stop PricStop order price if user want to place order by buy/sell buttons.Price from tradingview signal will override this price.
Buy/Sell ButtonsTo place buy or Sell order from snAPI.
Save/UpdateSave or Update data in that row.
Loss(Points)Loss in points for CO or BO.
Profit(Points)Profit is points for CO or BO.

Signal Settings


Autotrade Switch To enable or disable automated trading in your account.Even if signals are recieved from tradingview, if this switch is disabled, orders won't be places.Intraday sqauare off function will not work if switch is disabled.
LX/SX will make postion 0 LX or SX action will make position size zero(Qty from symbol setting will be ignored).
LE/SE places order only if NetPosition = 0 LE/SE/buy/sell will place order only if net qty of the position is zero or there is no position of that symbol.
Time Based Trading Save trading time slot. Only signals between this slot will be processed, else user will get error message "Trade timing mismatched." and order won't be placed.Autotrade switch should be ON
Square off all positions To sqaure of your INTRADAY or ALL positions on particular time.Select type of positions and time from dropdown option and submit.Autotrade switch should be ON.
Generate Key Secret key to keep your account safe and prevent unauthorised usage.It is used in webhook url & for telegram integration.

Why Options webhook ?

  • To avoid span margin utilization we have created this webhook for option buyers.
  • Just save your Call and Put options in table.
  • When buy signal is recieved to options webhook, snAPI will process data and place order to buy that call option.
  • When sell signal is recieved to options webhook, snAPI will process data and place order to buy that put option.
  • Option Webhook only work with tradingview strategy alerts.
    Alert command for NIFTY : NIFTY,{{strategy.order.action}},{{close}},{{strategy.order.contracts}},{{strategy.position_size}}
  • Do not use same call or put options which are being used in symbol setting table.
  • Accuracy : No false or wrong exit or entry will be placed, even if manually intefered into positions.
  • Total time for order placement : 500ms-700ms(0.5 to 0.7 second)


Copy Button :To copy signal alert message.(Copy & paste it in Tradingveiw alert as it is for stratigies).
Index : Call you row or symbols by this name. NIFTY or BANKNIFTY
Call :LE/buy ( Buy side order) will place order for this Call Option.
Put :SE/sell ( Sell side order) will place order for this Put Option.
Product Type :1>INTRADAY 2>MARGIN.
Order Type :1>MARKET 2>LIMIT.
QTY :Qty for strategy.This strategy qty should be same as you have entered in your tradingview strategy order size while creating alert.
Save or Update :Save or update record.
Copy Options URL :Options URL of webhook is only for options records, not for symbol setting table records.

Why telegram ?

FAST : Telegram is the fastest messaging app on the market.
SYNCED : You can access your messages from all your devices at once.
SECURE : Everything on Telegram, including chats, groups, media, etc. is encrypted using a combination of 256-bit symmetric AES encryption, 2048-bit RSA encryption, and Diffie–Hellman secure key exchange.Not even telegram CEO Access your data.

Join Telergam bot using link : https://t.me/snapi_trading_bot

Join Telergam bot by Name : snAPI.in Algo Trading BoT - IN


1) Join the bot by command : /start
2) Bot will reply Please enter your key in the format key:"yourkey" :
3) Copy key from snAPI account using copy key button & paste it in telegram.

After succesfull telegram id registration you can type /help
Following Menu will appear
/positions : To get the current Positions AND M2M P&L
/funds : To get your funds information.
/autotradeOn : To switch on your autotrade swtch.
/autotradeOff : To To switch off your autotrade switch.
/exit : To exit position using market order. /exit:symbol-producttype Example :
/exit:NSE:SBIN-EQ-CNC or /exit:NSE:NIFTY20SEPFUT-INTRADAY

Snapi Side:

Signal : StrategyName,NSE:TATASTEEL-EQ,{{strategy.order.action}},{{close}},{{strategy.order.contracts}},{{strategy.position_size}}
Result :> snAPI will place market order for NSE:TATASTEEL-EQ with action and quantity as per tradingview strategy alert.Recommended if client is using trasingview strategies.
Signal : StrategyName,NSE:NIFTY20JUNFUT,SE
Result : Short NSE:NIFTY20JUNFUT Market Price QTY 75
Signal : StrategyName,NSE:TATASTEEL-EQ,{{strategy.order.action}}
Result : Long or Short(action as per your strategy alert.)
NSE:TATASTEEL-EQ Market Price QTY 1

Signal : StrategyName,NSE:TATASTEEL-EQ,LE,250,1000,1000
Result : snAPI will place market order for NSE:TATASTEEL-EQ with action : Long , quantity : 1000. (Why Last field 1000 is there ? If alert triggers twice by mistakly in tradingview, only one order will be placed.New position size sould be equal to 1000.)


Snapi Side:

Signal : StrategyName,NSE:TATASTEEL-EQ,{{strategy.order.action}},{{close}},{{strategy.order.contracts}},{{strategy.position_size}}
Result : snAPI will place Limit order for NSE:TATASTEEL-EQ with action, quantity and limit price as per tradingview strategy alert.Recommended if client is using trasingview strategies.
Signal : StrategyName,NSE:TATASTEEL-EQ,LE,250,1000,1000
Result : snAPI will place Limit order for NSE:TATASTEEL-EQ with action : Long , quantity : 1000 , limit price : 250. (Why Last field 1000 is there ? If alert triggers twice by mistakly in tradingview, only one order will be placed.New position size sould be equal to 1000.)

Snapi Side:

Signal : StrategyName,NSE:TATASTEEL-EQ,LE,375
Result : Long NSE:TATASTEEL-EQ QTY 1 Trigger price 375 SL-M.
Signal : StrategyName,NSE:TATASTEEL-EQ,SE,200,50,50
Result : Short NSE:TATASTEEL-EQ QTY 50 Trigger Price 200 SL-M


Order will not execute if CO & BO are stopped by your broker.
Snapi Side:

Signal : StrategyName,NSE:SBIN-EQ,LE,190,250,250
Result : Long NSE:SBIN-EQ QTY 1 Limit Price 190 stoploss 170 QTY 250.
Signal : StrategyName,NSE:SBIN-EQ,LE,{{close}},1000,1000
Result : Long NSE:SBIN-EQ Limit price (from tradingview). stoploss (current price from tradingview - 20). QTY 1000.


Order will not execute if CO & BO are stopped by your broker.
Snapi Side:

Signal : StrategyName,NSE:SBIN-EQ,LE,190,250,250
Result : Result : Long NSE:SBIN-EQ Limit Price 190 stoploss 170 takeprofit 210 QTY 250.
Signal : StrategyName,NSE:SBIN-EQ,LE,{{close}},1000,1000
Result : Long NSE:TATASTEEL-EQ Limit Price (current price from tradingview)
  • Stoploss (current price from tradingview - 20)
  • takeprofit (current price from tradingview + 20) QTY 1000.

Snapi Side:


Note: Do not use new line(enter/return) or spaces between signal.
Signal : StrategyName,NSE:NIFTY206810000CE,
LE;StrategyName,NSE:NIFTY206189900PE,LE

Result : Long NSE:NIFTY206810000CE Market Price QTY 75
Long NSE:NIFTY206189900PE Market price QTY 75

Snapi Side:


Note: Do not use new line(enter/return) or spaces between signal.
Signal : StrategyName,NSE:NIFTY206189900CE,LE;
StrategyName,NSE:NIFTY206189900PE,LE
SE;StrategyName,NSE:NIFTY206189800CE,SE

Result : Result : Long NSE:NIFTY206189900CE Market Price QTY 75
Long NSE:NIFTY206189900PE Market Price QTY 75
Short NSE:NIFTY206189800CE Market Price QTY 150