Introduction
Algomojo Arrow API Bridge which helps traders/investors to build, monitor, execute their trading requirement automatically.
To use this API, you need an API key. Please login to your algomojo broker terminal to get your own API key
API Endpoint
https://amapi.algomojo.com/v1/
REST API URL
https://amapi.algomojo.com/v1/
Version
The current major stable version of the API is 1.0. All requests go to it by default. It is recommended that a specific version be requested explicity for production applications as major releases may break older implementations.
Each rest call will have 3 compulsory request parameters
1. api_key
2. api_secret
3. data
api_key is a key allocated to the User. Input will be in string format.
api_secret is a id received as response from Login 2FA.Input will be in string format.
data is a JSON object which is referred as Input in rest description table. If there is no input mentioned in the table you need to send it as a blank object or a blank string. Input will be in string format.
NOTE:- All APIs are considered as POST method. All the input as well as output data type will be in string format unless its mentioned in rest explanation section.
{
"status": "success",
"data": {}
}
{
"status": "error",
"error_msg": "Error Message",
"error_type": "E"
}
SUCCESSFUL RESPONSE
Each successful response rest will have parameters
1. status
2. data
ERROR RESPONSE
Each error response rest will have 3 parameters
1. status
2. error_msg
3. error_type
PlaceOrder
# Here is a curl example
curl \
-X POST https://amapi.algomojo.com/v1/PlaceOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"TC",
"strategy":"Test Strategy",
"exchange":"BSE",
"symbol":"YESBANK",
"action":"SELL",
"product":"CNC",
"pricetype":"MARKET",
"quantity":"1",
"price":"0",
"disclosed_quantity":"0",
"trigger_price":"0",
"amo":"NO",
"splitorder":"NO",
"split_quantity":"1"
}
}
Response example :
{
"status": "success",
"data": {
"broker": "TC",
"orderid": "4567872647236"
}
}
Request example for Split order:
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"zb",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"product":"CNC",
"pricetype":"MARKET",
"quantity":"10",
"price":"0",
"splitorder":"YES",
"split_quantity":"3"
}
}
Response example for Split order:
[
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221115000021732"
}
},
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221115000021733"
}
},
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221115000021734"
}
},
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221115000021737"
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
disclosed_quantity | Disclosed Quantity | No |
trigger_price | Trigger Price | No |
amo | AMO - It can be one of the following YES NO |
No |
splitorder | split order | No |
split_quantity | split quantity | No |
PLACEBOORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceBOOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceBOOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"AB",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK",
"action":"BUY",
"pricetype":"MARKET",
"quantity":"1",
"price":"16",
"squareoff":"10",
"stoploss":"10",
"trailing_stoploss":"1",
"trigger_price":"0",
"disclosed_quantity":"0",
}
}
Response example :
{
"status": "success",
"data": {
"broker": "AB",
"orderid": "22110900034729"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
squareoff | Square Off Value | Yes |
stoploss | Stoploss Value | Yes |
trailing_stoploss | Trailing Stoploss | Yes |
trigger_price | Trigger Price | No |
disclosed_quantity | Disclosed Quantity | No |
PlaceCOOrder
# Here is a curl example
curl \
-X POST https://amapi.algomojo.com/v1/PlaceCOOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceCOOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"zb",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"pricetype":"MARKET",
"quantity":"10",
"price":"0",
"stop_price":"10"
}
}
Response example :
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "2474578766623"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
stop_price | Stop Price | Yes |
PLACEFOOPTIONSORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceFOOptionsOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceFOOptionsOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"UP",
"strategy":"Test Strategy",
"spot_symbol":"NIFTY",
"expiry_date":"22DEC",
"action":"BUY",
"product":"NRML",
"pricetype":"MARKET",
"quantity":"50",
"price":"0",
"option_type":"CE",
"strike_int":"50",
"offset":"-2",
"splitorder":"NO",
"split_quantity":"50"
}
}
Response example :
{
"status": "success",
"data": {
"broker": "UP",
"symbol": "NIFTY22DEC18600CE",
"orderid": "221204000000826"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
strategy | Strategy | Yes |
spot_symbol | Spot symbol | Yes |
expiry_date | Expiry date | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
option_type | Option type | Yes |
strike_int | Strike Interval | Yes |
offset | Offset | No |
splitorder | split order | No |
split_quantity | split quantity | No |
PlaceSmartOrder
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceSmartOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceSmartOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"zb",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"product":"CNC",
"pricetype":"MARKET",
"quantity":"7",
"price":"0",
"position_size":"7",
"trigger_price":"0",
"disclosed_quantity":"0",
"amo":"NO",
"splitorder":"NO",
"split_quantity":"2"
}
}
Response example :
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221115000019082"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
position_size | Position Size | Yes |
trigger_price | Trigger Price | No |
disclosed_quantity | Disclosed Quantity | No |
amo | AMO - It can be one of the following YES NO |
No |
splitorder | split order | No |
split_quantity | split quantity | No |
PLACESTRATEGYORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceStrategyOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceStrategyOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"strategy_id":"ALGO",
"action":"BUY"
}
}
Response example :
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221117000043445"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
strategy_id | Strategy ID | Yes |
action | Action | Yes |
PlaceMultiOrder
# Here is a curl example
curl \
-X POST https://amapi.algomojo.com/v1/PlaceMultiOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceMultiOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"orders" :
[
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker": "AN",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"product":"CNC",
"pricetype":"MARKET",
"quantity":"4",
"price":"0",
"splitorder":"NO",
"split_quantity":"2"
}
},
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker":"ZB",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"product":"CNC",
"pricetype":"MARKET",
"quantity":"4",
"price":"0",
"splitorder":"YES",
"split_quantity":"2"
}
}
]
}
}
Response example :
[
{
"status": "success",
"data": {
"broker": "AN",
"orderid": "221122000714254"
}
},
[
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221122000714256"
}
},
{
"status": "success",
"data": {
"broker": "ZB",
"orderid": "221122000714258"
}
}
]
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
disclosed_quantity | Disclosed Quantity | No |
trigger_price | Trigger Price | No |
amo | AMO - It can be one of the following YES NO |
No |
splitorder | split order | No |
split_quantity | split quantity | No |
PLACEMULTIBOORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceMultiBOOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceMultiBOOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"orders" :
[
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker":"up",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK",
"action":"BUY",
"pricetype":"MARKET",
"quantity":"1",
"price":"0",
"squareoff":"10",
"stoploss":"10",
"trailing_stoploss":"1",
"trigger_price":"0",
"disclosed_quantity":"0"
}
},
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker":"tc",
"strategy":"Test Strategy",
"exchange":"NSE",
"symbol":"YESBANK-EQ",
"action":"BUY",
"pricetype":"MARKET",
"quantity":"1",
"price":"0",
"squareoff":"10",
"stoploss":"10",
"trailing_stoploss":"1",
"trigger_price":"0",
"disclosed_quantity":"0"
}
}
]
}
}
Response example :
[
{
"status": "success",
"data": {
"broker": "UP",
"orderid": "221116031410088"
}
},
{
"status": "success",
"data": {
"broker": "TC",
"orderid": "22115111000212"
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
strategy | Strategy Name | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
action | Action | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
squareoff | Square Off Value | Yes |
stoploss | Stoploss Value | Yes |
trailing_stoploss | Trailing Stoploss | Yes |
trigger_price | Trigger Price | No |
disclosed_quantity | Disclosed Quantity | No |
PLACEMULTIFOOPTIONSORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PlaceMultiFOOptionsOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PlaceMultiFOOptionsOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"orders" :
[
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker":"ab",
"strategy":"Test Strategy",
"spot_symbol":"NIFTY",
"expiry_date":"22D08",
"action":"BUY",
"product":"NRML",
"pricetype":"MARKET",
"quantity":"150",
"price":"0",
"option_type":"CE",
"strike_int":"50",
"offset":"-2",
"splitorder":"NO",
"split_quantity":"50"
}
},
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":{
"broker":"ZB",
"strategy":"Test Strategy",
"spot_symbol":"NIFTY",
"expiry_date":"01DEC22",
"action":"BUY",
"product":"NRML",
"pricetype":"MARKET",
"quantity":"150",
"price":"0",
"option_type":"CE",
"strike_int":"50",
"offset":"-2",
"splitorder":"YES",
"split_quantity":"50"
}
}
]
}
}
Response example :
[
{
"status": "success",
"data": {
"broker": "AB",
"symbol":"NIFTY22D0818700CE",
"orderid": "221115000096536"
}
},
{
"status": "success",
"data": {
"broker": "ZB",
"symbol":"NIFTY08DEC2218700CE",
"orderid": "221115000017413"
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
strategy | Strategy | Yes |
spot_symbol | Spot symbol | Yes |
expiry_date | Expiry date | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
quantity | Quantity | Yes |
price | Price | Yes |
option_type | Option type | Yes |
strike_int | Strike Interval | Yes |
offset | Offset | NO |
splitorder | split order | No |
split_quantity | split quantity | No |
modifyorder
# Here is a curl example
curl \
-X POST https://amapi.algomojo.com/v1/ModifyOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/ModifyOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"ab",
"exchange":"NSE",
"symbol":"RELIANCE-EQ",
"order_id":"221107000109641",
"action":"BUY",
"product":"CNC",
"pricetype":"LIMIT",
"price":"0",
"quantity":"1",
"disclosed_quantity":"0",
"trigger_price":"0",
"Filledqty":"0"
}
}
Response example :
{
"status": "success",
"data": {
"result": "220105000048291"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
exchange | Exchange name | Yes |
symbol | Trading Symbol | Yes |
order_id | Order ID | Yes |
action | Action | Yes |
product | Product Type | Yes |
pricetype | Price Type | Yes |
price | Price | Yes |
quantity | Quantity | Yes |
disclosed_quantity | Disclosed Quantity | No |
trigger_price | Trigger Price | No |
filledqty | Filled Quantity | Yes |
CancelOrder
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/CancelOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/CancelOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"UP",
"order_id":"221109008669042"
}
}
Response example :
{
"status": "success",
"data": {
"result": "221109008669042"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | broker code | Yes |
order_id | Order ID | Yes |
CancelAllOrder
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/CancelAllOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/CancelAllOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"UP"
}
}
Response example :
[
{
"status": "success",
"data": {
"orderid": "221109008669042"
}
},
{
"status": "success",
"data": {
"orderid": "221109008669042"
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | broker code | Yes |
ORDERHISTORY
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/OrderHistory
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/OrderHistory
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc",
"order_id":"22111500011211"
}
}
Response example :
{
"status": "success",
"data": [
{
"exchange": "NSE",
"symbol": "YESBANK-EQ",
"product": "CNC",
"pricetype": "MARKET",
"Ret": "DAY",
"price": "0",
"trigger_price": "",
"quantity": "1",
"disclosed_quantity": "0",
"action": "BUY",
"avgprc": "",
"fillshares": "",
"orderusermessage": "",
"exchordid": "1300000011288972",
"order_id": "22111500011211",
"status": "complete",
"rejreason": null,
"exchtimestamp": "",
"nestreqid": ""
},
{
"exchange": "NSE",
"symbol": "YESBANK-EQ",
"product": "CNC",
"pricetype": "MARKET",
"Ret": "DAY",
"price": "0",
"trigger_price": "",
"quantity": "1",
"disclosed_quantity": "0",
"action": "BUY",
"avgprc": "",
"fillshares": "",
"orderusermessage": "",
"exchordid": "1300000011288972",
"order_id": "22111500011211",
"status": "open",
"rejreason": null,
"exchtimestamp": "",
"nestreqid": ""
},
{
"exchange": "NSE",
"symbol": "YESBANK-EQ",
"product": "CNC",
"pricetype": "MARKET",
"Ret": "DAY",
"price": "0",
"trigger_price": "",
"quantity": "1",
"disclosed_quantity": "0",
"action": "BUY",
"avgprc": "",
"fillshares": "",
"orderusermessage": "",
"exchordid": "",
"order_id": "22111500011211",
"status": "pending",
"rejreason": null,
"exchtimestamp": "",
"nestreqid": ""
},
{
"exchange": "NSE",
"symbol": "YESBANK-EQ",
"product": "CNC",
"pricetype": "MARKET",
"Ret": "DAY",
"price": "0",
"trigger_price": "",
"quantity": "1",
"disclosed_quantity": "0",
"action": "BUY",
"avgprc": "",
"fillshares": "",
"orderusermessage": "",
"exchordid": "",
"order_id": "22111500011211",
"status": "pending",
"rejreason": null,
"exchtimestamp": "",
"nestreqid": ""
}
]
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
order_id | Order ID | Yes |
ORDERBOOK
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/OrderBook
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/OrderBook
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc"
}
}
Response example :
{
"status": "success",
"data": [
{
"exchange": "NSE",
"token": "11915",
"symbol": "YESBANK-EQ",
"product": "CNC",
"pricetype": "MARKET",
"Ret": "DAY",
"price": "00.00",
"trigger_price": "00.00",
"quantity": "1",
"disclosed_quantity": "0",
"action": "BUY",
"avgprc": "13.95",
"fillshares": "1",
"remarks": "--",
"exchordid": "1300000016630228",
"syomorderid": "",
"order_id": "220113000041330",
"orderentrytime": "Jan 13 2022 13:24:00",
"exchconfrmtime": "13-Jan-2022 13:24:00",
"status": "complete",
"ordvaldate": "NA",
"rejreason": "--"
}
]
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
ORDERSTATUS
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/OrderStatus
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/OrderStatus
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc",
"order_id":"22111800004192"
}
}
Response example :
{
"status": "success",
"data": {
"orderstatus": "open"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
order_id | Order ID | Yes |
TRADEBOOK
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/TradeBook
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/TradeBook
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc"
}
}
Response example :
[
{
"status": "success",
"data": [
{
"exchange": "NFO",
"product": "NRML",
"symbol": "INFY22NOV1500CE",
"pricetype": "MARKET",
"action": "SELL",
"quantity": "300",
"exchordid": "2300000001405312",
"order_id": "221111200149902",
"exchtime": "2022-11-11 09:18:58",
"price": "62"
}
]
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
POSITIONBOOK
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/PositionBook
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/PositionBook
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"ze"
}
}
Response example :
[
{
"status": "success",
"data": [
{
"exchange": "NFO",
"product": "NRML",
"symbol": "BHARATFORG24NOV22P840",
"token": "67528",
"cfbuyqty": "1000",
"cfbuyavgprc": "10.3",
"cfsellqty": "0",
"cfsellavgprc": "9.2",
"bqty": "0",
"buyavgprc": "0",
"sqty": "0",
"sellavgprc": "0",
"netqty": "1000",
"netbuyavgprc": "97.2",
"netsellavgprc": "87",
"netamt": "10.3",
"ltp": "7.5",
"bep": "10.3",
"realisedprofitloss": "-0",
"unrealisedprofitloss": "-2800"
},
{
"exchange": "NFO",
"product": "NRML",
"symbol": "BHARATFORG24NOV22F",
"token": "53438",
"cfbuyqty": "1000",
"cfbuyavgprc": "878.2",
"cfsellqty": "0",
"cfsellavgprc": "871.2",
"bqty": "0",
"buyavgprc": "0",
"sqty": "0",
"sellavgprc": "0",
"netqty": "1000",
"netbuyavgprc": "102",
"netsellavgprc": "89.5",
"netamt": "878.2",
"ltp": "886.2",
"bep": "878.2",
"realisedprofitloss": "-0",
"unrealisedprofitloss": "8000"
}
]
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
OPENPOSITIONBOOK
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/OpenPositions
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/OpenPositions
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc",
"symbol": "L&TFH24NOV22P80",
"product":"CNC"
}
}
Response example :
{
"status": "success",
"data": {
"exchange": "NFO",
"product": "NRML",
"symbol": "L&TFH24NOV22P80",
"token": "102572",
"cfbuyqty": "8924",
"cfbuyavgprc": "1.20",
"cfsellqty": "0",
"cfsellavgprc": "NA",
"bqty": "0",
"buyavgprc": "0.00",
"sqty": "0",
"sellavgprc": "0.00",
"netqty": "8924",
"netbuyavgprc": "NA",
"netsellavgprc": "NA",
"netamt": "1.20",
"ltp": "1.05",
"bep": "1.20",
"realisedprofitloss": "-0.00",
"unrealisedprofitloss": "-1338.60"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
symbol | Trading Symbol | No |
product | Product type | No(Mandatory if symbol is present) |
SQUAREOFFPOSITION
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/SquareOffPosition
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/SquareOffPosition
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"zb",
"exchange":"NSE",
"product":"CNC",
"symbol":"YESBANK-EQ"
}
}
Response example :
{
"status": "success",
"data": {
"symbol": "GRASIM24NOV22C1820",
"status": "closed"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
exchange | Exchange Segment | Yes |
product | Product Code | Yes |
symbol | Symbol Name | Yes |
SQUAREOFFALLPOSITION
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/SquareOffAllPosition
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/SquareOffAllPosition
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"sm"
}
}
Response example :
[
{
"status": "success",
"data": {
"symbol": "GRASIM29DEC22F",
"status": "closed"
}
},
{
"status": "success",
"data": {
"symbol": "BHARATFORG29DEC22F",
"status": "closed"
}
},
{
"status": "success",
"data": {
"symbol": "GRASIM24NOV22C1820",
"status": "closed"
}
},
{
"status": "success",
"data": {
"symbol": "NIFTY24NOV22C18000",
"status": "closed"
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
HOLDINGS
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/Holdings
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/Holdings
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc"
}
}
Response example:
[
{
"status": "success",
"data": {
[
{
"exchange": "NSE",
"token": "3478273",
"symbol": "ACE",
"isin": "INE731H01025",
"holdqty": "150",
"btst_qty": "0",
"sellable_qty": "0",
"average_price": "323.6",
"ltp": "315.85",
"product": "CNC",
"coll_qty": "0",
"coll_type": ""
}
]
}
}
]
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | broker code | Yes |
FUNDS
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/Funds
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/Funds
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"SM"
}
}
Response example :
{
"status": "success",
"data": [
{
"segment": "equity",
"bookedpnl": "NA",
"unbookedpnl": "NA",
"openingbalance": "0",
"credits": "0",
"payinamt": "0",
"utilizedamount": "0",
"payoutamt": "NA",
"varmargin": "NA",
"spanmargin": "NA",
"realisedmtom": "NA",
"unrealisedmtom": "NA",
"debits": "NA"
},
{
"segment": "commodity",
"bookedpnl": "NA",
"unbookedpnl": "NA",
"openingbalance": "0",
"credits": "0",
"payinamt": "0",
"utilizedamount": "0",
"payoutamt": "NA",
"varmargin": "NA",
"spanmargin": "NA",
"realisedmtom": "NA",
"unrealisedmtom": "NA",
"debits": "NA"
}
]
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker | Yes |
EXITBOORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/ExitBOOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/ExitBOOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc",
"order_id":"22111800004192"
}
}
Response example :
{
"status": "success",
"data": {
"result": "4562647236787"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
order_id | Order ID | Yes |
EXITCOORDER
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/ExitCOOrder
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/ExitCOOrder
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc",
"order_id":"22111800004192"
}
}
Response example :
{
"status": "success",
"data": {
"result": "2365674872647"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
order_id | Order ID | Yes |
GETQUOTE
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/GetQuote
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/GetQuote
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"fs",
"symbol":"YESBANK",
"exchange":"NSE"
}
}
Response example :
{
"status": "success",
"data": {
"symbol_name": "YESBANK",
"trading_symbl": "YESBANK-EQ",
"company_name": "YES BANK LIMITED",
"last_trade_time": "06/01/2022 15:59:58",
"last_price": "14.25",
"change": "00.00",
"change_per": "00.00",
"last_quantity": "4",
"buy_quantity": "4",
"sell_quantity": "303792",
"volume": "125481711",
"average_price": "14.26",
"open": "14.25",
"high": "14.45",
"low": "14.10",
"close": "14.25",
"tick_size": "5",
"multiplier": "1",
"lot_size": "1",
"decimalprecision": "2",
"yearly_low_price": "10.50",
"yearly_high_price": "18.60"
}
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker code | Yes |
symbol | Symbol | Yes |
exchange | Exchange | Yes |
Profile
# Here is a curl example
-X POST https://amapi.algomojo.com/v1/Profile
To get characters you need to make a POST call to the following url :
https://amapi.algomojo.com/v1/Profile
Request example :
{
"api_key":"{your_api_key}",
"api_secret":"{your_api_secret}",
"data":
{
"broker":"tc"
}
}
Result Example:
{
"status": "success",
"data": [
{
"client_id": "RLXXXX",
"name": "",
"email": "",
"exarr": [
"MF",
"NSE",
"BFO",
"CDS",
"NFO",
"BSE"
],
"prarr": [
"CNC",
"NRML",
"MIS",
"BO",
"CO"
]
}
]
}
QUERY PARAMETERS
Request Parameter | Description | Mandatory |
---|---|---|
broker | Broker Code | Yes |
Appendix
Broker
AB - Alice Blue
AN - Angel Broking
FS - Firstock
FY - Fyers
PT - Paytm
SM - Samco
TC - Tradejini
UP - Upstox
ZB - Zebu
ZE - Zerodha
Exchange
NSE - NSE Equity
NFO - NSE Futures & Options
CDS - NSE Currency
BSE - BSE Equity
BFO - BSE Futures & Options
BCD - BSE Currency
MCX - MCX Commodity
MCXSXCM - MCXSX Equity
MCXSXFO - MCXSX Futures & Options
MCXSX - MCXSX Currency
NCDEX - NCDEX Commodity
Product Type
CNC - Cash & Carry for equity
NRML - Normal for futures and options
MIS - Intraday Squareoff
CO - Cover Order
BO - Bracket Order
Price Type
MARKET - Market Order
LIMIT - Limit Order
SL - Stop Loss Limit Order
SL-M - Stop Loss Market Order
Action
BUY - Buy
SELL - Sell
Split Order
YES - Yes
NO - No
Order Status
rejected - Rejected
completed - Completed
open - Open
pending - Pending
cancelled - Cancelled
trigger_pending - Trigger_pending
AMO
YES - Yes
NO - No
Retention
DAY - Regular Order
IOC - Immediate or Cancel