Introduction

    API Endpoint

        https://fsapi.algomojo.com/1.0/

                

Algomojo 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.

fs.algomojo.com

Version and API root URL
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.

Root URL
https://fsapi.algomojo.com/1.0/

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.


Exchanges


BSE - BSE Equity
NSE - NSE Equity
NFO - NSE Future and Options


Products


C - Cash & Carry for equity
I - Intraday
M - Margin Delivery


Price Types


MKT - Market Order
LMT - Limit Order
SL-LMT - Stop Loss Limit Order
SL-MKT - Stop Loss Market Order


Transaction Types


B - Buy
S - Sell


PlaceOrder


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/PlaceOrder

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/PlaceOrder



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35",
    "api_secret":"c2501f394684c759e918021aeab4e",
    "data": {
        "strg_name": "Test Strategy",
        "uid":"TV0XXX",
        "actid":"TV0XXX",
        "tsym":"EQUITAS-EQ",
        "exch":"NSE",
        "trantype":"B",
        "ret":"DAY",
        "prctyp":"SL-LMT",
        "qty":"1",
        "dscqty":"0",
        "MktPro":"NA",
        "prc":"94.05",
        "trgprc":"10",
        "prd":"C",
        "AMO":"NO",
        "ordersource":"WEB",
        "remarks":""
    }
}

Response example :

{
    "request_time": "16:55:11 25-06-2021",
    "stat": "Ok",
    "norenordno": "21062500000499"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
strg_name Strategy Name Yes
uid User ID Yes
actid Act ID Yes
exch Exchange name Yes
tsym Trading Symbol Yes
trantype Transtaction Type Yes
ret Retention - It can be one of the following
DAY
IOC
Yes
prctyp It can be one of the following
MKT - Market Order
LMT - Limit Order
SL-LMT - Stop Loss Limit Order
SL-MKT - Stop Loss Market Order
Yes
qty Quantity Yes
dscqty Disclosed Quantity Yes
MktPro Market Pro Yes
prc Price Yes
trgprc Trigger Price Yes
prd Shows if the order was either
C - Delivery
I - Intraday
M - Regular
Yes
AMO AMO - It can be one of the following
Yes
NO
Yes
ordersource WEB
Yes
remarks remarks No

PlaceMultiOrder


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/PlaceMultiOrder

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/PlaceMultiOrder



Request example :

{
    "api_key":"b48e4db30e47326722a388c03eb4ee26",
    "api_secret":"fc3ed44d0914b0e6466f9ff2e3ae003a",
    "data":
      {
          "orders" : 
            [
                {
                "order_refno":"1",
                "user_apikey":"b48e4db30e47326722a388c03eb4ee26",
                "api_secret":"fc3ed44d0914b0e6466f9ff2e3ae003a",
                "strg_name": "Test Strategy",
                "uid":"TV0XXX",
                "actid":"TV0XXX",
                "tsym":"EQUITAS-EQ",
                "exch":"NSE",
                "trantype":"B",
                "ret":"DAY",
                "prctyp":"SL-LMT",
                "qty":"1",
                "dscqty":"0",
                "MktPro":"NA",
                "prc":"94.05",
                "trgprc":"10",
                "prd":"C",
                "AMO":"NO",
                "ordersource":"WEB",
                "remarks":"",
                "bpprc":"",
                "blprc":"",
                "trailprc":""
                },
                {
                "order_refno":"2",
                "strg_name": "Test Strategy",
                "user_apikey":"b48e4db30e47326722a388c03eb4ee26",
                "api_secret":"fc3ed44d0914b0e6466f9ff2e3ae003a",
                "strg_name": "Test Strategy",
                "uid":"TV0XXX",
                "actid":"TV0XXX",
                "tsym":"EQUITAS-EQ",
                "exch":"NSE",
                "trantype":"B",
                "ret":"DAY",
                "prctyp":"SL-LMT",
                "qty":"1",
                "dscqty":"0",
                "MktPro":"NA",
                "prc":"94.05",
                "trgprc":"10",
                "prd":"C",
                "AMO":"NO",
                "ordersource":"WEB",
                "remarks":"",
                "bpprc":"",
                "blprc":"",
                "trailprc":""
                }
            ]
      }
}

Response example :

[
    {
        "request_time": "16:55:11 25-06-2021",
        "stat": "Ok",
        "norenordno": "21062500000499"
    },
    {
        "request_time": "16:55:11 25-06-2021",
        "stat": "Ok",
        "norenordno": "21062500000499"
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
order_refno Order Reference Number Yes
strg_name Strategy Name Yes
uid User ID Yes
actid Act ID Yes
tsym Trading Symbol Yes
exch Exchange name Yes
trantype Transtaction Type Yes
ret Retention - It can be one of the following
DAY
IOC
Yes
prctyp Order Type - It can be one of the following
MKT - Market Order
LMT - Limit Order
SL-LMT - Stop Loss Limit Order
SL-MKT - Stop Loss Market Order
Yes
qty Quantity Yes
dscqty Disclosed Quantity Yes
MktPro Market Pro Yes
prc Price Yes
trgprc Trigger Price Yes
prd Shows if the order was either
C - Delivery
I - Intraday
M - Regular
Yes
AMO AMO - It can be one of the following
Yes
NO
Yes
ordersource WEB Yes
remarks remarks Yes

PlaceFOOptionsOrder


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/PlaceFOOptionsOrder

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/PlaceFOOptionsOrder



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "strg_name":"Options_Strike",
        "spot_sym":"NIFTY",
        "expiry_dt":"01JUL21",
        "Ttranstype":"B",
        "opt_type":"C",
        "prctyp":"MKT",
        "qty":"25",
        "Price":"0",
        "TrigPrice":"0",
        "Pcode":"C",
        "strike_int":"50",
        "offset":"1"
    }
}

Response example :

{
    "request_time": "16:22:43 25-06-2021",
    "stat": "Ok",
    "norenordno": "21062500000498"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
strg_name Strategy Name Yes
spot_sym Trading Symbol Yes
expiry_dt Expiry Date Yes
Ttranstype Transtaction Type ( B / S ) Yes
opt_type C - Call Option
P - Put Option
Yes
prctyp Order Type - It can be one of the following
MKT - Market Order
LMT - Limit Order
SL-LMT - Stop Loss Limit Order
SL-MKT - Stop Loss Market Order
Yes
qty Quantity Yes
Price Price Yes
TrigPrice Trigger Price Yes
Pcode Shows if the order was either
C - Cash & Carry for equity (CNC)
M - Normal for futures and options (NRML)
I - Intraday Segment
Yes
strike_int Strike Interval Yes
offset Off Set Yes

ModifyOrder


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/ModifyOrder

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/ModifyOrder



Request example :

{
    "api_key":"c1997d92a3bb556a67dca7d1446b70",
    "api_secret":"5306433329e81ba41203653417063c",
    "data":
      {
        "uid":"Test Strategy",
        "tsym":"SBIN-EQ",
        "exch":"NSE",
        "prctyp":"LMT",
        "qty ":"1",
        "ret":"DAY",
		"norenordno":"201020000000080",
		"prc":"194.00",
		"trgprc":"0"
      }
}

Response example :

{
    "request_time":"14:14:08 26-05-2020",
    "stat":"Ok",
    "result":"20052600000103"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
tsym Trading Symbol Yes
exch Exchange Yes
prctyp Type of order. It can be one of the following
MKT - Market Order
LMT - Limit Order
SL_LMT - Stop Loss Limit Order
SL_MKT - Stop Loss Market Order
Yes
qty Quantity with which the order was placed Yes
ret Retention Yes
norenordno the order id for which the order must be modified Yes
prc Price at which the order was placed Yes
trgprc Trigger Price Yes

CancelOrder


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/CancelOrder

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/CancelOrder



Request example :

{
    "api_key":"c1997d92a3bb556a67dca7d1446b70",
    "api_secret":"5306433329e81ba41203653417063c",
    "data":
      {
		"norenordno":"21062500000499",
		"uid":"TV0XXX",
	  }
}

Response example :

{
	"request_time":"14:14:10 26-05-2020",
    "stat":"Ok",
    "result":"20052600000103"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
norenordno Nest Order Number Yes
uid User ID Yes

UserDetails


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/UserDetails

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/UserDetails



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca350",
    "api_secret":"c2501f394684c759e918021aeab06e",
    "data": {
        "uid":"TV0XX"
    }
}

Result Example:

{
    "request_time": "16:27:05 25-06-2021",
    "uname": "CLIENT NAME",
    "exarr": [
        "NSE",
        "NFO",
        "BSE"
    ],
    "prarr": [
        {
            "prd": "M",
            "s_prdt_ali": "Regular",
            "exch": [
                "NFO"
            ]
        },
        {
            "prd": "I",
            "s_prdt_ali": "IntraDay",
            "exch": [
                "NSE",
                "BSE",
                "NFO"
            ]
        },
        {
            "prd": "C",
            "s_prdt_ali": "Delivery",
            "exch": [
                "NSE",
                "BSE"
            ]
        }
    ],
    "orarr": [
        "LMT",
        "MKT",
        "SL-LMT",
        "SL-MKT"
    ],
    "brkname": "90047",
    "brnchid": "BANGALORE",
    "email": "YOUR EMAIL ID",
    "actid": "CLIENT ID",
    "uprev": "INVESTOR",
    "stat": "Ok"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User Id Yes

RESPONSE ATTRIBUTES

Attribute Datatype Description
uname string Name of the Client
brkname string Broker Name
email string E-mail address of the user
brnchid string Branch ID
actid array Account ID
products array Lists the products types to which the user has access
uprev string Up Rev
stat string Status
request_time string Requested Time
exarr array Array of Exchanges
prarr array Array of Products
orarr array Array of Order Type

Limits


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/Limits

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/Limits



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "actid":"TV0XXX"
    }
}

Response example :

{
    "request_time": "16:32:38 25-06-2021",
    "stat": "Ok",
    "cash": "2842.09",
    "daycash": "1.00",
    "payin": "60000.00",
    "payout": "0.00",
    "brkcollamt": "0.00",
    "unclearedcash": "0.00",
    "turnoverlmt": "50000000000.00",
    "pendordvallmt": "50000000000.00",
    "turnover": "2795753.10",
    "marginused": "59753.10",
    "margincurper": "95.08",
    "cbu": "188.10",
    "premium": "59565.00",
    "premium_d_m": "59565.00"
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
actid Act ID Yes

RESPONSE ATTRIBUTES

Attribute Datatype Description
cash string Cash
daycash string Day Cash
payin string Pay In Amount
payout string Pay Out
brkcollamt string The amount of Collateral
unclearedcash string Uncleared Cash
turnoverlmt string Turnover Limit
pendordvallmt string Pending Order Value Limit
turnover string Turn Over
marginused string Margin Used
margincurper string Margin current percentage
cbu string CAC Buy used
premium string Premium used
premium_d_m string Derivative Margin

Holdings


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/Holdings

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/Holdings



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "actid":"TV0XXX",
        "prd":"C/I/M"
    }
}

Response example:

[
    {
        "stat": "Ok",
        "exch_tsym": [
            {
                "exch": "NSE",
                "token": "20825",
                "tsym": "HUDCO-EQ",
                "pp": "2",
                "ti": "0.05"
            },
            {
                "exch": "BSE",
                "token": "540530",
                "tsym": "HUDCO",
                "pp": "2",
                "ti": "0.05"
            }
        ],
        "holdqty": "0",
        "dpqty": "10",
        "unplgdqty": "0",
        "brkcolqty": "0",
        "btstqty": "0",
        "usedqty": "0",
        "upldprc": "56.45"
    },
    {
        "stat": "Ok",
        "exch_tsym": [
            {
                "exch": "NSE",
                "token": "11184",
                "tsym": "IDFCFIRSTB-EQ",
                "pp": "2",
                "ti": "0.05"
            },
            {
                "exch": "BSE",
                "token": "539437",
                "tsym": "IDFCFIRSTB",
                "pp": "2",
                "ti": "0.05"
            }
        ],
        "holdqty": "0",
        "dpqty": "1",
        "unplgdqty": "0",
        "brkcolqty": "0",
        "btstqty": "0",
        "usedqty": "0",
        "upldprc": "59.35"
    },
    {
        "stat": "Ok",
        "exch_tsym": [
            {
                "exch": "NSE",
                "token": "3426",
                "tsym": "TATAPOWER-EQ",
                "pp": "2",
                "ti": "0.05"
            },
            {
                "exch": "BSE",
                "token": "500400",
                "tsym": "TATAPOWER",
                "pp": "2",
                "ti": "0.05"
            }
        ],
        "holdqty": "0",
        "dpqty": "1",
        "unplgdqty": "0",
        "brkcolqty": "0",
        "btstqty": "0",
        "usedqty": "0",
        "upldprc": "124.25"
    },
    {
        "stat": "Ok",
        "exch_tsym": [
            {
                "exch": "NSE",
                "token": "16852",
                "tsym": "EQUITAS-EQ",
                "pp": "2",
                "ti": "0.05"
            },
            {
                "exch": "BSE",
                "token": "539844",
                "tsym": "EQUITAS",
                "pp": "2",
                "ti": "0.05"
            }
        ],
        "holdqty": "0",
        "dpqty": "2",
        "unplgdqty": "0",
        "brkcolqty": "0",
        "btstqty": "0",
        "usedqty": "0",
        "upldprc": "94.08"
    },
    {
        "stat": "Ok",
        "exch_tsym": [
            {
                "exch": "BSE",
                "token": "532656",
                "tsym": "FACORALL",
                "pp": "2",
                "ti": "0.01"
            }
        ],
        "holdqty": "0",
        "btstqty": "2",
        "usedqty": "0",
        "upldprc": "4.01"
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
actid Act ID Yes
prd Product Type ("C/I/M") Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
exch_tsym Exchange Trading Symbol
holdqty Holding Quantity
dpqty DP Quantity
unplgdqty Unpledged quantity
brkcolqty Broker Collateral
btstqty BTST quantity
usedqty Holding used today
upldprc Average price uploaded along with holdings

OrderBook


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/OrderBook

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/OrderBook



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "actid":"TV0XXX"
    }
}

Response example :
[
    {
        "stat": "Ok",
        "norenordno": "21062500000499",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "tsym": "EQUITAS-EQ",
        "qty": "1",
        "trantype": "B",
        "prctyp": "SL-LMT",
        "ret": "DAY",
        "token": "16852",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "94.05",
        "trgprc": "10.00",
        "trailprc": "0.00",
        "dscqty": "0",
        "prd": "C",
        "status": "REJECTED",
        "norentm": "16:55:11 25-06-2021",
        "exch_tm": "00:00:00 01-01-1980",
        "remarks": "",
        "exchordid": "1100000013952781",
        "rejreason": "16387: Security is not allowed to trade in this market."
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000498",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NIFTY01JUL21C15900",
        "qty": "25",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "token": "52538",
        "pp": "2",
        "ls": "75",
        "ti": "0.05",
        "prc": "0.00",
        "prd": "C",
        "status": "REJECTED",
        "norentm": "16:22:43 25-06-2021",
        "remarks": "",
        "rejreason": "ORA:Product Delivery not enabled on exchange NFO"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000497",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NIFTY01JUL21C15900",
        "qty": "25",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "token": "52538",
        "pp": "2",
        "ls": "75",
        "ti": "0.05",
        "prc": "0.00",
        "prd": "C",
        "status": "REJECTED",
        "norentm": "16:18:39 25-06-2021",
        "remarks": "",
        "rejreason": "ORA:Product Delivery not enabled on exchange NFO"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000495",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NIFTY01JUL21C15900",
        "qty": "25",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "token": "52538",
        "pp": "2",
        "ls": "75",
        "ti": "0.05",
        "prc": "0.00",
        "prd": "C",
        "status": "REJECTED",
        "norentm": "16:18:24 25-06-2021",
        "remarks": "",
        "rejreason": "ORA:Product Delivery not enabled on exchange NFO"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000368",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "tsym": "EQUITAS-EQ",
        "qty": "1",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "16852",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "94.05",
        "trgprc": "10.00",
        "trailprc": "0.00",
        "avgprc": "94.05",
        "dscqty": "0",
        "prd": "C",
        "status": "COMPLETE",
        "fillshares": "1",
        "norentm": "15:29:59 25-06-2021",
        "exch_tm": "15:29:59 25-06-2021",
        "remarks": "",
        "exchordid": "1100000013148870"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000322",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "tsym": "EQUITAS-EQ",
        "qty": "1",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "16852",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "94.05",
        "trgprc": "10.00",
        "trailprc": "0.00",
        "avgprc": "94.05",
        "dscqty": "0",
        "prd": "C",
        "status": "COMPLETE",
        "fillshares": "1",
        "norentm": "14:43:51 25-06-2021",
        "exch_tm": "14:43:51 25-06-2021",
        "remarks": "",
        "exchordid": "1100000012271935"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000136",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.35",
        "dscqty": "0",
        "prd": "M",
        "status": "REJECTED",
        "norentm": "12:20:35 25-06-2021",
        "rejreason": "RED:RULE:{Dont allow collateral and daylong cash for option buy}Shortfall:INR 10,117.91 Available:INR 62,842.09 for C-TV0XXX [ONLINE]"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000135",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.30",
        "avgprc": "2.30",
        "dscqty": "0",
        "prd": "M",
        "status": "COMPLETE",
        "fillshares": "5700",
        "norentm": "12:23:18 25-06-2021",
        "exch_tm": "12:20:27 25-06-2021",
        "exchordid": "1500000032889806"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000134",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "11400",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.35",
        "dscqty": "0",
        "prd": "M",
        "status": "REJECTED",
        "norentm": "12:19:45 25-06-2021",
        "rejreason": "RED:RULE:{Dont allow collateral and daylong cash for option buy}Shortfall:INR 10,402.91 Available:INR 62,842.09 for C-TV0XXX [ONLINE]"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000115",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.50",
        "dscqty": "0",
        "prd": "M",
        "status": "REJECTED",
        "norentm": "11:41:33 25-06-2021",
        "rejreason": "RED:RULE:{Dont allow collateral and daylong cash for option buy}Shortfall:INR 7,862.91 Available:INR 52,842.09 for C-TV0XXX [ONLINE]"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000032",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "0.00",
        "avgprc": "2.75",
        "dscqty": "0",
        "prd": "M",
        "status": "COMPLETE",
        "fillshares": "5700",
        "norentm": "09:46:07 25-06-2021",
        "exch_tm": "09:46:07 25-06-2021",
        "exchordid": "1500000007873245"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000031",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "11400",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.70",
        "dscqty": "0",
        "prd": "M",
        "status": "REJECTED",
        "norentm": "09:45:18 25-06-2021",
        "rejreason": "RED:RULE:{Dont allow collateral and daylong cash for option buy}Shortfall:INR 8,147.91 Available:INR 52,842.09 for C-TV0XXX [ONLINE]"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000030",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "qty": "11400",
        "rorgqty": "11400",
        "trantype": "B",
        "prctyp": "LMT",
        "ret": "DAY",
        "token": "104510",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.70",
        "rorgprc": "2.65",
        "avgprc": "2.70",
        "dscqty": "0",
        "prd": "M",
        "status": "COMPLETE",
        "fillshares": "11400",
        "norentm": "09:59:49 25-06-2021",
        "exch_tm": "09:52:26 25-06-2021",
        "exchordid": "1500000007548034"
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
actid Act ID Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
stat string Status
norenordno string Nest Order Number
uid string User ID
actid string Account ID
exch string Exchange
tsym string Trading Symbol
qty string Order Quantity
trantype string Transtaction Type
prctyp string Price Type
ret string Retention
token string Token
pp string Price Precision
ls string Lot Size
ti string Tick Size
prc string Price
trgprc string Trigger Price
trailprc string Trialing Price
dscqty string Disclosed Quantity
prd string Product
status string Order Status
norentm string Nest Order Entry Time
exch_tm string Exchange Time
remarks string Remarksr
exchordid string Exchange Order ID
rejreason string Rejected Reason

SingleOrdHist


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/SingleOrdHist

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/SingleOrdHist



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "norenordno":"21062500000368"
    }
}

Response example :

[
    {
        "stat": "Ok",
        "norenordno": "21062600000052",
        "uid": "TV0001",
        "actid": "TV0001",
        "exch": "NSE",
        "tsym": "RELIANCE-EQ",
        "qty": "40",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "rejby": "RED",
        "kidid": "1",
        "exchordid": "",
        "pan": "AEQPV7108A",
        "ordersource": "WEB",
        "token": "2885",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "0.00",
        "dscqty": "0",
        "prd": "I",
        "status": "REJECTED",
        "rpt": "Rejected",
        "norentm": "16:25:34 26-06-2021",
        "remarks": "",
        "rejreason": "RED:Margin Shortfall:INR 39,109.64 Available:INR 2,979.16 for C-TV0001 [ONLINE]"
    },
    {
        "stat": "Ok",
        "norenordno": "21062600000052",
        "uid": "TV0001",
        "actid": "TV0001",
        "exch": "NSE",
        "tsym": "RELIANCE-EQ",
        "qty": "40",
        "trantype": "B",
        "prctyp": "MKT",
        "ret": "DAY",
        "rejby": "",
        "kidid": "1",
        "exchordid": "",
        "pan": "AEQPV7108A",
        "ordersource": "WEB",
        "token": "2885",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "0.00",
        "dscqty": "0",
        "prd": "I",
        "status": "PENDING",
        "rpt": "NewAck",
        "norentm": "16:25:34 26-06-2021",
        "remarks": ""
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
norenordno Order Number Yes

RESPONSE ATTRIBUTES

# Parameter Description
1 stat Ok or Not_Ok
2 exch Exchange Segment
3 tsym Trading symbol / contract on which order is placed.
4 norenordno Noren Order Number
5 prc Order Price
6 qty Order Quantity
7 prd Display product alias name, using prarr returned in user details.
8 status Order status
9 trantype B / S - Transaction type of the order
10 prctyp LMT / MKT Price type
11 fillshares Total Traded Quantity of this order
12 avgprc Average trade price of total traded quantity
13 rejreason If order is rejected, reason in text form
14 exchordid Exchange Order Number
15 cancelqty cancelqty
16 remarks Any message Entered during order entry.
17 dscqty Order disclosed quantity.
18 trgprc Order trigger price
19 ret DAY / IOC / EOS Order validity
20 uid Account ID
21 actid Account ID
22 bpprc Book Profit Price applicable only if product is selected as B (Bracket order )
23 blprc Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order )
24 trailprc Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order )
25 amo Yes / No
26 pp Price precision
27 ti Tick size
28 ls Lot size
29 ls Lot size
30 token Contract Token

PositionBook


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/PositionBook

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/PositionBook



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "actid":"TV0XXX"
    }
}

Response example :

[
    {
        "stat": "Ok",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "tsym": "EQUITAS-EQ",
        "prd": "C",
        "token": "16852",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "mult": "1",
        "prcftr": "1.000000",
        "daybuyqty": "2",
        "daysellqty": "0",
        "daybuyamt": "188.10",
        "daybuyavgprc": "94.05",
        "daysellamt": "0.00",
        "daysellavgprc": "0.00",
        "cfbuyqty": "0",
        "cfsellqty": "0",
        "netqty": "2",
        "netavgprc": "94.05",
        "upldprc": "0.00",
        "netupldprc": "94.05",
        "lp": "94.45",
        "urmtom": "0.80",
        "bep": "94.05",
        "rpnl": "-0.00"
    },
    {
        "stat": "Ok",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "tsym": "NTPC29JUL21C120",
        "prd": "M",
        "token": "104510",
        "dname": "NTPC JUL 120 CE ",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "mult": "1",
        "prcftr": "1.000000",
        "daybuyqty": "22800",
        "daysellqty": "0",
        "daybuyamt": "59565.00",
        "daybuyavgprc": "2.61",
        "daysellamt": "0.00",
        "daysellavgprc": "0.00",
        "cfbuyqty": "0",
        "cfsellqty": "0",
        "netqty": "22800",
        "netavgprc": "2.61",
        "upldprc": "0.00",
        "netupldprc": "2.61",
        "lp": "2.30",
        "urmtom": "-7125.00",
        "bep": "2.61",
        "rpnl": "-0.00"
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
actid Act ID Yes

Response

Success Response
Parameter Description
exch Exchangesegment
tsym Tradingsymbol/contract.
token Contracttoken
uid UserId
actid AccountId
prd Productnametobe
netqty NetPositionquantity
netavgprc Netpositionaverageprice
daybuyqty DayBuyQuantity
daysellqty DaySellQuantity
daybuyavgprc DayBuyaverageprice
daysellavgprc Daybuyaverageprice
daybuyamt DayBuyAmount
daysellamt DaySellAmount
cfbuyqty CarryForwardBuyQuantity
cforgavgprc OriginalAvgPrice
cfsellqty CarryForwardSellQuantity
cfbuyavgprc CarryForwardBuyaverage
cfsellavgprc CarryForwardBuyaverage
cfbuyamt Carry Forward Buy Amount
cfsellamt Carry Forward Sell Amount
lp LTP
rpnl RealizedPNL
urmtom UnrealizedMTOM.
bep Break even price
openbuyqty
opensellqty
openbuyamt
opensellamt
openbuyavgprc
opensellavgprc
mult
pp
prcftr gn*pn/(gd*pd).
ti Ticksize
ls Lotsize
request_time This will be present only in a failure response.

TradeBook


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/TradeBook

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/TradeBook



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "actid":"TV0XXX"
    }
}

Response example :

[
    {
        "stat": "Ok",
        "norenordno": "21062500000368",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "prctyp": "LMT",
        "ret": "DAY",
        "prd": "C",
        "flid": "29713994",
        "fltm": "25-06-2021 15:29:59",
        "trantype": "B",
        "tsym": "EQUITAS-EQ",
        "qty": "1",
        "token": "16852",
        "fillshares": "1",
        "flqty": "1",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "94.05",
        "flprc": "94.05",
        "norentm": "15:29:59 25-06-2021",
        "exch_tm": "15:29:59 25-06-2021",
        "remarks": "",
        "exchordid": "1100000013148870"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000322",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NSE",
        "prctyp": "LMT",
        "ret": "DAY",
        "prd": "C",
        "flid": "28886440",
        "fltm": "25-06-2021 14:43:51",
        "trantype": "B",
        "tsym": "EQUITAS-EQ",
        "qty": "1",
        "token": "16852",
        "fillshares": "1",
        "flqty": "1",
        "pp": "2",
        "ls": "1",
        "ti": "0.05",
        "prc": "94.05",
        "flprc": "94.05",
        "norentm": "14:43:51 25-06-2021",
        "exch_tm": "14:43:51 25-06-2021",
        "remarks": "",
        "exchordid": "1100000012271935"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000135",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "prctyp": "LMT",
        "ret": "DAY",
        "prd": "M",
        "flid": "625696123",
        "fltm": "25-06-2021 12:23:18",
        "trantype": "B",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "token": "104510",
        "fillshares": "5700",
        "flqty": "5700",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.30",
        "flprc": "2.30",
        "norentm": "12:23:18 25-06-2021",
        "exch_tm": "12:20:27 25-06-2021",
        "exchordid": "1500000032889806"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000030",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "prctyp": "LMT",
        "ret": "DAY",
        "prd": "M",
        "flid": "625334097",
        "fltm": "25-06-2021 09:59:49",
        "trantype": "B",
        "tsym": "NTPC29JUL21C120",
        "qty": "11400",
        "token": "104510",
        "fillshares": "11400",
        "flqty": "5700",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.70",
        "flprc": "2.70",
        "norentm": "09:59:49 25-06-2021",
        "exch_tm": "09:52:26 25-06-2021",
        "exchordid": "1500000007548034"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000030",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "prctyp": "LMT",
        "ret": "DAY",
        "prd": "M",
        "flid": "625334092",
        "fltm": "25-06-2021 09:59:49",
        "trantype": "B",
        "tsym": "NTPC29JUL21C120",
        "qty": "11400",
        "token": "104510",
        "fillshares": "5700",
        "flqty": "5700",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "2.70",
        "flprc": "2.70",
        "norentm": "09:59:49 25-06-2021",
        "exch_tm": "09:52:26 25-06-2021",
        "exchordid": "1500000007548034"
    },
    {
        "stat": "Ok",
        "norenordno": "21062500000032",
        "uid": "TV0XXX",
        "actid": "TV0XXX",
        "exch": "NFO",
        "prctyp": "MKT",
        "ret": "DAY",
        "prd": "M",
        "flid": "625263134",
        "fltm": "25-06-2021 09:46:07",
        "trantype": "B",
        "tsym": "NTPC29JUL21C120",
        "qty": "5700",
        "token": "104510",
        "fillshares": "5700",
        "flqty": "5700",
        "pp": "2",
        "ls": "5700",
        "ti": "0.05",
        "prc": "0.00",
        "flprc": "2.75",
        "norentm": "09:46:07 25-06-2021",
        "exch_tm": "09:46:07 25-06-2021",
        "exchordid": "1500000007873245"
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
actid Act ID Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
stat string Status
norenordno string Nest Order Number
uid string User ID
actid string Account ID
exch string Exchange to which the order is associated
prctyp string Price type of the Trade
tsym string Trading Symbol
ret string Retention
prd string Product
flid string Fill ID
fltm string Fill Time
trantype string Transtaction Type
qty string Quantity
token string Token Number
fillshares string Filled Shares
flqty string Fill Quantity
pp string Price Precision
ls string Last Price
ti string Tick Size
prc string Price
flprc string fill price
norentm string Nest Order Entry Time
exch_tm string Exchange Time
remarks string Remarks
exchordid string Exchange Order ID

GetQuotes


# Here is a curl example
curl \
-X POST https://fsapi.algomojo.com/1.0/GetQuotes

                

To get characters you need to make a POST call to the following url :
https://fsapi.algomojo.com/1.0/GetQuotes



Request example :

{
    "api_key":"29b97133f23fb5481a2fafddcca35072",
    "api_secret":"c2501f394684c759e918021aeab06e4e",
    "data": {
        "uid":"TV0XXX",
        "exch":"NSE",
        "token":"16852"
    }
}

Response example :
{
    "request_time": "17:59:23 25-06-2021",
    "stat": "Ok",
    "exch": "NSE",
    "tsym": "EQUITAS-EQ",
    "cname": "EQUITAS HOLDINGS LIMITED",
    "symname": "EQUITAS",
    "seg": "EQT",
    "instname": "EQ",
    "isin": "INE988K01017",
    "pp": "2",
    "ls": "1",
    "ti": "0.05",
    "mult": "1",
    "uc": "113.30",
    "lc": "75.60",
    "prcftr_d": "(1 / 1 ) * (1 / 1)",
    "token": "16852",
    "lp": "94.45",
    "c": "93.75",
    "h": "95.00",
    "l": "93.25",
    "ap": "94.32",
    "o": "93.50",
    "v": "889017",
    "ltq": "7",
    "ltt": "15:57:07",
    "tbq": "1",
    "tsq": "0",
    "bp1": "94.45",
    "sp1": "0.00",
    "bp2": "0.00",
    "sp2": "0.00",
    "bp3": "0.00",
    "sp3": "0.00",
    "bp4": "0.00",
    "sp4": "0.00",
    "bp5": "0.00",
    "sp5": "0.00",
    "bq1": "1",
    "sq1": "0",
    "bq2": "0",
    "sq2": "0",
    "bq3": "0",
    "sq3": "0",
    "bq4": "0",
    "sq4": "0",
    "bq5": "0",
    "sq5": "0",
    "bo1": "1",
    "so1": "0",
    "bo2": "0",
    "so2": "0",
    "bo3": "0",
    "so3": "0",
    "bo4": "0",
    "so4": "0",
    "bo5": "0",
    "so5": "0"
}

                

QUERY PARAMETERS

Request Parameter Description Mandatory
uid User ID Yes
exch Exchange Yes
token Token Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
stat string Status
exch string Exchange to which the order is associated
tsym string Trading Symbol
cname string Company Name
symname string Symbol Name
seg string Segment
instname string Intrument Name
isin string ISIN
pp string Price Precision
ls string Lot Size
ti string Tick Size
mult string Multiplier
uc string Upper Circuit
lc string Lower Circuit
prcftr_d string ((GN / GD) * (PN/PD))
token string Token Number
lp string Last Price
c string Close
h string High
l string Low
o string Open
v string Volume
ap string Average Price
ltq string Last Traded Quantity
ltt string Last Traded Time
tbq string Total Buy Quantity
tsq string Total Sell Quantity
bp1 string Best Buy Price 1
sp1 string Best Sell Price 1
bp2 string Best Buy Price 2
sp2 string Best Sell Price 2
bp3 string Best Buy Price 3
sp3 string Best Sell Price 3
bp4 string Best Buy Price 4
sp4 string Best Sell Price 4
bp5 string Best Buy Price 5
sp5 string Best Sell Price 5
bq1 string Best Buy Quantity 1
sq1 string Best Sell Quantity 1
bq2 string Best Buy Quantity 2
sq2 string Best Sell Quantity 2
bq3 string Best Buy Quantity 3
sq3 string Best Sell Quantity 3
bq4 string Best Buy Quantity 4
sq4 string Best Sell Quantity 4
bq5 string Best Buy Quantity 5
sq5 string Best Sell Quantity 5
bo1 string Best Buy Order 1
so1 string Best Sell Order 1
bo2 string Best Buy Order 2
so2 string Best Sell Order 2
bo3 string Best Buy Order 3
so3 string Best Sell Order 3
bo4 string Best Buy Order 4
so4 string Best Sell Order 4
bo5 string Best Buy Order 5
so5 string Best Sell Order 5