In [1]:
from algomojo import *

#set the API Key and API secret key, Broker Code and the Version
#Broker Code "ab" = aliceblue, "tj" = tradejini, "zb" = zebu, "en" = enrich for the list of short codes supported kindly check with algomojo team
#default version used Ver = 1.0

tj=api("86cbef19e7e61ccee91e497690d5814e","a256707821d7b97988eef6b90a230e35",broker="tj",version=1.0)
client_id = "TS2499"

print(tj)
<algomojo.pyalgomojo.api object at 0x000002188A818AC0>
In [2]:
#mandatory parameters are send to place Limit Orders. 

tj.place_order("RELIANCE-EQ","NSE","S",qty=1,order_type='L',price='2030',product_type='MIS')
Out[2]:
{'NOrdNo': '201120000012092', 'stat': 'Ok'}
In [3]:
#Token ID is mandatory for Modifying the Order. Get the Token ID logging into Algomojo -> Watchlist -> Goto Security info
tj.modify_order(client_id,'201120000012092','RELIANCE-EQ','NSE','S','L','1950',1,2885)
Out[3]:
{'Result': ' NEST Order Number :201120000012092', 'stat': 'Ok'}
In [4]:
#cancel the pending orders, Pass the pending order id, symbol and the exchange to cancel the order
tj.cancelorder(client_id,'201120000012092','RELIANCE-EQ','NSE')
Out[4]:
{'Result': ' NEST Order Number :201120000012092', 'stat': 'Ok'}