Last updated: November 11th, 2019

Introduction

AlgoNinja API which helps traders/investors to build, monitor, execute their trading requirement automatically.

Settings in AlgoNinja

Need to set your Client ID, API Key and API Secret Key.

Login to AlgoNinja

After all the settings, Click the login button.

Authentication

Login with Client ID


Enter your Tradejini Client ID and Click Submit. If you don't have an account, Click Here

Image Verification


Verify the image and enter your password and click Submit button.

2FA Verification


Enter the answers and click Submit button.

Marketwatch


Once it logged in successfully you get a page like this with the Marketwatch.

Screens


Activate Algo


Click the button 'START ALGO' to make the algo active in the application.

WATCHLIST


Click the Watchlist on the top to add symbols to your Watchlist. Type in search your symbols and add it to your Watchlist.



FUNDS


Click the FUNDS on the top to check the Funds and Margin details of your Account.



POSITIONS


Click the POSITONS on the top to check the Positions in your Account.



ALGOBOOK


Click the ALGOBOOK on the top to check the Orders Placed using AlgoNinja.



ORDERBOOK


Click the ORDERBOOK on the main screen to check the Orders Placed in your Account.



HOLDINGS


Click the HOLDINGS on the main screen the Holdings you are having in your account.



TRADEBOOK


Click the TRADEBOOK on the main screen shows the Trades done in your account.



LOGOUT


Click the LOGOUT on the main screen to logout from the main screem.



Amibroker Functions


Place Order


PlaceOrder( user_apikey, api_secret, s_prdt_ali, Tsym, exch, startery, Ttranstype, Ret, prctyp, qty, discqty, MktPro, Price, TrigPrice, Pcode, AMO)

Return

Parameter Type Value
user_apikey String Tradejini API Key
api_secret String Tradejini API Secret Key

PlaceBOOrder


PlaceBOOrder( user_apikey, api_secret, s_prdt_ali, Tsym, TokenNo, exch, startery, Ttranstype, Ret, qty, discqty, Price, SqrOffvalue, SLvalue, trailingSL, tSLticks)

Return

Type Value
String Order Id

FUNDS


PlaceCOOrder( user_apikey, api_secret, s_prdt_ali, Tsym, exch, startery, Ttranstype, Ret, prctyp, qty, discqty, MktPro, Price, TrigPrice, Pcode, AMO)

Return

Type Value
String Order Id

Symbol MTM


SymbolMTM( user_apikey, api_secret, exch, symbol)

Return

Type Value
Double Symbol MTM

Total MTM


TotalMTM( user_apikey, api_secret)

Return

Type Value
Double Total MTM

Open Position


OpenPosition( user_apikey, api_secret, exch, symbol)

Return

Type Value
Int Open Position

Algo Status


AlgoStatus()

Return

Type Value
String Algo Status

Fetch Symbol Token


FetchSymbolToken(Symbol)

Return

Type Value
String Symbol Token

Get LTP


GetLTP( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double LTP

Get Previous Close


GetPrevClose( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Close Price

Get High


GetHigh( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double High Price

Get Low


GetLow( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Low Price

Get Open Price


GetOpenPrice( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Open Price

Get Open Price


GetOpenPrice( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Open Price

Best Sell Price


BestSellPrice( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Best Sell Price

Best Buy Price


BestBuyPrice( user_apikey, api_secret, Exchange, SymbolToken)

Return

Type Value
Double Best Buy Price

Order Status


OrderStatus( user_apikey, api_secret, Exchange, Symbol)

Return

Type Value
String Order Status

Nest Order Number


NestOrderNumber( user_apikey, api_secret, Exchange, Symbol)

Return

Type Value
String Order Number

Syom OrderId


SyomOrderId( user_apikey, api_secret, Exchange, Symbol)

Return

Type Value
String Syom OrderId

SquareOff Position


SquareOffPosition( user_apikey, api_secret, Exchangeseg, Symbol, Pcode, Netqty)

Return

Type Value
String JSON Data

Exit BO Order


ExitBOOrder( user_apikey, api_secret, NestOrderNumber, SyomOrderId, status)

Return

Type Value
String JSON Data

Exit CO Order


ExitCOOrder( user_apikey, api_secret, NestOrd)

Return

Type Value
String JSON Data

Cancel Order


CancelOrder( user_apikey, api_secret, Symbol, Exchange, NestOrd)

Return

Type Value
String JSON Data

Modify Order


ModifyOrder( user_apikey, api_secret, Tsym, Exchangeseg, Transtype, Price, Prctype, Qty, Pcode, Dscqty, Trgprc, Validity, Nstordno)

Return

Type Value
String JSON Data

ATM (At The Money) Order


PlaceATMOrder( user_apikey, api_secret, _Symbol, _Exch, _startery, s_prdt_ali, _transaction_type, _qty, Pcode, Expiry, OptionType, strikeerval, _SymbolToken="", prctyp = "MKT", _price = 0)

Return

Type Value
String Contract Name

OTM(Out of The Money) Order


PlaceOTMOrder ( user_apikey, api_secret, _Symbol, _Exch, _startery, s_prdt_ali, _transaction_type, _qty, Pcode, Expiry, OptionType, strikeerval, _SymbolToken="", prctyp = "MKT", _price = 0)

Return

Type Value
String Contract Name

ITM (In The Money) Order


PlaceITMOrder( user_apikey, api_secret, Symbol, Exch, startegy, s_prdt_ali, transaction_type, qty, Pcode, Expiry, OptionType, strikeerval, step, SymbolToken = "", prctyp = "MKT", price = 0)

Return

Type Value
String Contract Name