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) #set the API_key and API_secret_key for broker tradejini
ab=api("e59db3b62ab6528f6ced1103e5b0c4a8","e795f8ed449a31009825d43bae8ca0ef",broker="ab",version=1.0) #set the API_key and API_secret_key for broker Aliceblue

print(tj)
print(ab)
<algomojo.pyalgomojo.api object at 0x0000019FDF391EE0>
<algomojo.pyalgomojo.api object at 0x0000019FDF391F40>
In [2]:
#mandatory parameters are send to Bulk orders to the same account

tj.place_multi_order([{'ticker':'BHEL-EQ','exchange':'NSE','qty':1,'action':'B'},{'ticker':'NHPC-EQ','exchange':'NSE','qty':'1','action':'B'},{'ticker':'RELIANCE-EQ','exchange':'NSE','qty':'1','action':'B'}])
Out[2]:
[{'NOrdNo': '201120000011376', 'stat': 'Ok'},
 {'NOrdNo': '201120000011377', 'stat': 'Ok'},
 {'NOrdNo': '201120000011378', 'stat': 'Ok'}]
In [3]:
ab.place_multi_order([{'ticker':'BHEL-EQ','exchange':'NSE','qty':1,'action':'B'},{'ticker':'NHPC-EQ','exchange':'NSE','qty':'1','action':'B'},{'ticker':'RELIANCE-EQ','exchange':'NSE','qty':'1','action':'B'}])
Out[3]:
[{'NOrdNo': '201120000162520', 'stat': 'Ok'},
 {'NOrdNo': '201120000162521', 'stat': 'Ok'},
 {'NOrdNo': '201120000162533', 'stat': 'Ok'}]
In [4]:
#sending multi Bracket Orders. Token ID is mandatory for executing the Bracket Order. Get the Token ID logging into Algomojo -> Watchlist -> Goto Security info
order1=[{"ticker":"438","exchange":"NSE","action":"B","qty":"1","profit":"5","stoploss":"5"},{"ticker":"11184","exchange":"NSE","action":"B","qty":"1","profit":"10","stoploss":"10"}]

tj.place_multi_bo(order1)
Out[4]:
[{'nestOrderNumber': '201120000011405', 'stat': 'Ok'},
 {'nestOrderNumber': '201120000011407', 'stat': 'Ok'}]
In [5]:
order2=[{"ticker":"2388","exchange":"NSE","action":"B","qty":"1","profit":"5","stoploss":"5"},{"ticker":"438","exchange":"NSE","action":"B","qty":"1","profit":"10","stoploss":"10"}]
ab.place_multi_bo(order2)
Out[5]:
[{'nestOrderNumber': '201120000162708', 'stat': 'Ok'},
 {'nestOrderNumber': '201120000162710', 'stat': 'Ok'}]