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 0x0000024693273AC0>
In [2]:
#Place Market Order
tj.place_order("TCS-EQ","NSE","B",1,product_type='MIS')
Out[2]:
{'NOrdNo': '201120000013145', 'stat': 'Ok'}
In [3]:
#Squareoff Open Position, Get the Token ID logging into Algomojo -> Watchlist -> Goto Security info
tj.squareoff(client_id,'TCS-EQ','11536',1,product_type='MIS')
Out[3]:
{'Result': 'ok', 'stat': 'Ok'}