Introduction

Algomojo broker application

ze.algomojo.com

Algomojo API Bridge which helps traders/investors to build, monitor and execute their trading requirement automatically.

To use this API, you need an API key & Secret. Please login to your algomojo broker application to get your own API key & Secret.

All inputs request and response are in JSON format.

ze.algomojo.com

API Endpoint

https://zeapi.algomojo.com/1.0/

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 API Endpoint
https://zeapi.algomojo.com/1.0/

Request JSON structure 

{
"api_key": "",
"api_secret":"",
"data": { }
}

Request structure
Each rest call will have 3 compulsory request parameters
1. api_key is a key allocated to the user for API authentication. Input will be in string format
2. api_secret is a key allocated to the user for API authentication. Input will be in string format.
3. 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.


Successful Response 

{
"status": "success", "data": {}
}
Failed Response

{
"status": "error","message": "Error message","error_type": "GeneralException"
}

Response structure
All responses from the API server are JSON with the content-type application/json
Successful
A successful 200 OK response always has a JSON response body with a status key with the value success. The data key contains the full response payload.
Failed
The status key in the response envelope contains the value error. The message key contains a textual description of the error and error_type contains the name of the exception. There may be an optional data key with additional payload..


API rate limit


end-point rate-limit
Quote 1req/second
Order placement 10req/second
All other endpoints 10req/second

ANNEXURE


Exchanges


Possible Values Description
NSE NSE (National Stock Exchange)
MCX MCX (Multi Commodity Exchange)
BSE BSE (Bombay Stock Exchange)
NFO NFO (Futures and Options)
BFO BFO (Futures and Options)
CDS CDS (Cash Derivatives)

Variety


Possible Values Description
regular Regular order
amo After Market Order

Products


Possible Values Description
CNC Cash and Carry(For equity only)
MIS Intraday - Applicable for all segments
NRML Normal - (Applicable only for derivatives)
CO Cover Order
BO Bracket Order

Order Types


Possible Values Description
LIMIT Limit order
MARKET Market order
SL Stop loss order
SL-M Stoploss Market order (SL-M)

Transaction Type


Possible Values Description
BUY BUY
SELL SELL

Order Validity


Possible Values Description
DAY Day is an order type which is valid for the whole trading day and stays pending till it is executed in respective trading day.
IOC Immediate Or Cancel - order type is where once the user punches the order, the order hits the exchange and if not executed immediately, the order stands cancelled

Order Status


Possible Values Description
PUT ORDER REQUEST RECEIVED Order request has been received by the backend
VALIDATION PENDING Order pending validation by the RMS (Risk Management System)
OPEN PENDING Order is pending registration at the exchange
MODIFY VALIDATION PENDING Order's modification values are pending validation by the RMS
MODIFY PENDING Order's modification values are pending registration at the exchange
TRIGGER PENDING Order's placed but the fill is pending based on a trigger price.
CANCEL PENDING Order's cancellation request is pending registration at the exchange
AMO REQ RECEIVED Same as PUT ORDER REQUEST RECEIVED, but for AMOs
REJECTED Rejected
COMPLETE Completed Order
REJECTED Rejected Order
CANCELLED Cancelled Order
OPEN Open Order

PlaceOrder

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

                

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



Request example :

{
    "api_key": "xxxxxxx",
    "api_secret":"xxxxxxx",
    "data": {
        "strg_name":"Test Order",
        "variety":"regular",
        "tradingsymbol":"RELIANCE",
        "exchange":"NSE",
        "transaction_type":"BUY",        
        "order_type":"MARKET",
        "quantity":"1",
        "product":"CNC",
        "price":"0",
        "trigger_price":"0",
        "disclosed_quantity":"0",                    
        "validity":"DAY",
        "tag":"amorder"
    }
}

Response example :

{
  "status": "success",
  "data": {
    "order_id": "151220000000000"
  }
}
                

QUERY PARAMETERS

Name Type Description
strg_name string Strategy name
variety string Order variety
tradingsymbol string Tradingsymbol of the instrument
exchange string Name of the exchange
transaction_type string BUY or SELL
order_type string Order type (MARKET, LIMIT etc.)
quantity string Quantity to transact
product string Margin product to use for the order (margins are blocked based on this) ?
price string The min or max price to execute the order at (for LIMIT orders)
trigger_price string The price at which an order should be triggered (SL, SL-M)
disclosed_quantity string Quantity to disclose publicly (for equity trades)
validity string Order validity
tag string An optional tag to apply to an order to identify it (alphanumeric, max 20 chars)

PlaceSplitOrder

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

                

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



Request example :

{
    "api_key": "xxxxxxx",
    "api_secret":"xxxxxxx",
    "data": {
        "strg_name":"Test Order",
        "variety":"regular",
        "tradingsymbol":"BANKNIFTY22MAR36500CE",
        "exchange":"NFO",
        "transaction_type":"BUY",        
        "order_type":"MARKET",
        "quantity":"2500",
        "product":"NRML",
        "price":"0",
        "trigger_price":"0",
        "disclosed_quantity":"0",                    
        "validity":"DAY",
        "tag":"amorder"
    }
}

Response example :

[
    {
        "status": "success",
          "data": {
            "order_id": "151220000000000"
          }
    },
    {
        "status": "success",
          "data": {
            "order_id": "15122000000001"
          }
    }
    {
        "status": "success",
          "data": {
            "order_id": "15122000000002"
          }
    }    
]
                

QUERY PARAMETERS

Name Type Description
strg_name string Strategy name
variety string Order variety
tradingsymbol string Tradingsymbol of the instrument
exchange string Name of the exchange
transaction_type string BUY or SELL
order_type string Order type (MARKET, LIMIT etc.)
quantity string Quantity to transact
product string Margin product to use for the order (margins are blocked based on this) ?
price string The min or max price to execute the order at (for LIMIT orders)
trigger_price string The price at which an order should be triggered (SL, SL-M)
disclosed_quantity string Quantity to disclose publicly (for equity trades)
validity string Order validity
tag string An optional tag to apply to an order to identify it (alphanumeric, max 20 chars)

PlaceMultiOrder


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

                

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



Request example :

{
    "api_key":"xxxxxxx",
    "api_secret":"xxxxxxx",
    "data":
      {
      "orders" : 
        [
            {
            "user_apikey":"xxxxxxx",
            "api_secret":"xxxxxxx",
            "strg_name":"Test Order",
            "variety":"regular",
            "tradingsymbol":"RELIANCE",
            "exchange":"NSE",
            "transaction_type":"BUY",        
            "order_type":"MARKET",
            "quantity":"1",
            "product":"CNC",
            "price":"0",
            "trigger_price":"0",
            "disclosed_quantity":"0",                    
            "validity":"DAY",
            "tag":"amorder"

            },
            {
            "user_apikey":"xxxxxxx",
            "api_secret":"xxxxxxx",
            "strg_name":"Test Order",
            "variety":"regular",
            "tradingsymbol":"INFY",
            "exchange":"NSE",
            "transaction_type":"BUY",        
            "order_type":"MARKET",
            "quantity":"1",
            "product":"CNC",
            "price":"0",
            "trigger_price":"0",
            "disclosed_quantity":"0",                    
            "validity":"DAY",
            "tag":"amorder"
            }
        ]
      }
}

Response example :

[
    {
        "status": "success",
          "data": {
            "order_id": "151220000000000"
          }
    },
    {
        "status": "success",
          "data": {
            "order_id": "15122000000001"
          }
    }
]
                

QUERY PARAMETERS

Request Parameter Description Mandatory
user_apikey string User API Key
api_secret string User API Secret
strg_name string Strategy name
variety string Order variety
tradingsymbol string Tradingsymbol of the instrument
exchange string Name of the exchange
transaction_type string BUY or SELL
order_type string Order type (MARKET, LIMIT etc.)
quantity string Quantity to transact
product string Margin product to use for the order (margins are blocked based on this) ?
price string The min or max price to execute the order at (for LIMIT orders)
trigger_price string The price at which an order should be triggered (SL, SL-M)
disclosed_quantity string Quantity to disclose publicly (for equity trades)
validity string Order validity
tag string An optional tag to apply to an order to identify it (alphanumeric, max 20 chars)

PlaceFOOptionsOrder


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

                

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



Request example :

{
    "api_key":"xxxxxxx",
    "api_secret":"xxxxxxx",
    "data":
      {
        "stgy_name":"Options",
        "spot_sym":"BANKNIFTY",
        "expiry_dt":"22JUL",
        "opt_type":"CE",
        "transaction_type":"BUY",
        "order_type":"MARKET",
        "quantity":"25",
        "price":"0",
        "trigger_price":"0",
        "product":"MIS",
        "strike_int":"100",
        "offset":"10"
      }
}

Response example :

{
    "status": "success",
      "data": {
        "order_id": "151220000000000"
      }
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
stgy_name Strategy Name Yes
spot_sym Trading Symbol Yes
expiry_dt Expiry Date Yes
transaction_type Transtaction Type Yes
opt_type CE
PE
Yes
order_type Order Type - It can be one of the following
MARKET - Market Order(MKT)
LIMIT - Limit Order(L)
SL - Stop Loss Limit Order(SL)
SL-M - Stop Loss Market Order(SL-M)
Yes
quantity Quantity Yes
price Price Yes
trigger_price Trigger Price Yes
product Shows if the order was either
MIS - Intraday - Applicable for all segments
NRML - Normal for futures and options (NRML)
Yes
strike_int Strike Interval Yes
offset Off Set Yes

ModifyOrder


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

                

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



Request example :

{
    "api_key": "xxxxxxx",
    "api_secret":"xxxxxxx",
    "data": {
        "variety":"regular",
        "order_id":"211103002192494",
        "order_type":"MARKET",
        "quantity":"1",
        "price":"0",
        "trigger_price":"0",
        "disclosed_quantity":"0",                    
        "validity":"DAY"
    }
}

Response example :

{
  "status": "success",
  "data": {
    "order_id": "211103002192494"
  }
}
                

QUERY PARAMETERS

Attribute Data Type Description
variety string Order variety
order_id string Unique order ID
order_type string Order type (MARKET, LIMIT etc.)
quantity string Quantity to transact
price string The min or max price to execute the order at (for LIMIT orders)
trigger_price string The price at which an order should be triggered (SL, SL-M)
disclosed_quantity string Quantity to disclose publicly (for equity trades)
validity string Order validity

CancelOrder


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

                

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



Request example :

{
    "api_key": "xxxxxxx",
    "api_secret":"xxxxxxx",
    "data": {
        "variety":"regular",
        "order_id":"211103002192494"
    }
}

Response example :

{
  "status": "success",
  "data": {
    "order_id": "211103002192494"
  }
}
                

QUERY PARAMETERS

Attribute Data Type Description
variety string Order variety
order_id string Unique order ID

profile


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

                

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



Request example :

{
    "api_key":"xxxxxxx",
    "api_secret":"xxxxxxx"
}

Result Example:

{
    "status": "success",
    "data": {
        "user_id": "XXXXXX",
        "user_type": "individual",
        "email": "xxxxx@xxxxx.com",
        "user_name": "J krishnan",
        "user_shortname": "Neela",
        "broker": "ZERODHA",
        "exchanges": [
            "NSE",
            "MF",
            "BSE"
        ],
        "products": [
            "CNC",
            "NRML",
            "MIS",
            "BO",
            "CO"
        ],
        "order_types": [
            "MARKET",
            "LIMIT",
            "SL",
            "SL-M"
        ],
        "avatar_url": null,
        "meta": {
            "demat_consent": "consent"
        }
    }
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attribute Datatype Description
user_id string User ID
user_type string Type of the User
email string E-mail address of the user
user_name string Name of the user
user_shortname string Short name of the user
broker string Broker Name
exchanges object Exchanges
products object Products
order_types object Type of Orders

Limits


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

                

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



Request example :

{
  "api_key":"xxxxxxx",
  "api_secret":"xxxxxxx"
}

Response example :

{
    "status": "success",
    "data": {
        "equity": {
            "enabled": true,
            "net": 484.15,
            "available": {
                "adhoc_margin": 0,
                "cash": 497,
                "opening_balance": 497,
                "live_balance": 484.15,
                "collateral": 0,
                "intraday_payin": 0
            },
            "utilised": {
                "debits": 12.85,
                "exposure": 0,
                "m2m_realised": 0,
                "m2m_unrealised": 0,
                "option_premium": 0,
                "payout": 0,
                "span": 0,
                "holding_sales": 0,
                "turnover": 0,
                "liquid_collateral": 0,
                "stock_collateral": 0,
                "delivery": 0
            }
        },
        "commodity": {
            "enabled": true,
            "net": 0,
            "available": {
                "adhoc_margin": 0,
                "cash": 0,
                "opening_balance": 0,
                "live_balance": 0,
                "collateral": 0,
                "intraday_payin": 0
            },
            "utilised": {
                "debits": 0,
                "exposure": 0,
                "m2m_realised": 0,
                "m2m_unrealised": 0,
                "option_premium": 0,
                "payout": 0,
                "span": 0,
                "holding_sales": 0,
                "turnover": 0,
                "liquid_collateral": 0,
                "stock_collateral": 0,
                "delivery": 0
            }
        }
    }
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attribute Datatype Description
enabled bool Indicates whether the segment is enabled for the user
net float Net cash balance available for trading (intraday_payin + adhoc_margin + collateral)
available.cash float Raw cash balance in the account available for trading (also includes intraday_payin)
available.intraday_payin float Amount that was deposited during the day
available.adhoc_margin float Additional margin provided by the broker
available.collateral float Margin derived from pledged stocks
utilised.m2m_unrealised float Un-booked (open) intraday profits and losses
utilised.m2m_realised float Booked intraday profits and losses
utilised.debits float Sum of all utilised margins (unrealised M2M + realised M2M + SPAN + Exposure + Premium + Holding sales)
utilised.span float SPAN margin blocked for all open F&O positions
utilised.option_premium float Value of options premium received by shorting
utilised.holding_sales float Value of holdings sold during the day
utilised.exposure float Exposure margin blocked for all open F&O positions
utilised.turnover float Utilised portion of the maximum turnover limit (only applicable to certain clients)
utilised.payout float Funds paid out or withdrawn to bank account during the day

Holdings


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

                

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



Request example :

{
  "api_key":"c1997d92a3bb556a67dca7d1446b70",
  "api_secret":"5306433329e81ba41203653417063c"
}

Response example:

{
    "status": "success",
    "data": [
        {
            "tradingsymbol": "YESBANK",
            "exchange": "BSE",
            "instrument_token": 136357892,
            "isin": "INE528G01035",
            "product": "CNC",
            "price": 0,
            "quantity": 0,
            "used_quantity": 0,
            "t1_quantity": 1,
            "realised_quantity": 0,
            "authorised_quantity": 0,
            "authorised_date": "2021-09-27 00:00:00",
            "opening_quantity": 1,
            "collateral_quantity": 0,
            "collateral_type": "",
            "discrepancy": false,
            "average_price": 12.9,
            "last_price": 12.86,
            "close_price": 12.86,
            "pnl": -0.040000000000000924,
            "day_change": 0,
            "day_change_percentage": 0
        }
    ]
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
tradingsymbol string Exchange tradingsymbol of the instrument
exchange string Exchange
isin string The standard ISIN representing stocks listed on multiple exchanges
t1_quantity int Quanity on T+1 day after order execution. Stocks are usually delivered into DEMAT accounts on T+2 ?
realised_quantity int Quantity delivered to Demat
quantity int Net quantity (T+1 + realised)
authorised_quantity int Quantity authorised at the depository for sale
average_price float Average price at which the net holding quantity was acquired
last_price float Last traded market price of the instrument
pnl float Net returns on the stock; Profit and loss
product string Margin product applied to the holding
collateral_quantity int Quantity used as collateral
collateral_type null,string Type of collateral

OrderBook


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

                

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



Request example :

{
    "api_key":"c1997d92a3bb556a67dca7d1446b7087",
    "api_secret":"5306433329e81ba41203653417063c71"
}

Response example :
{
    "status": "success",
    "data": [
        {
            "placed_by": "YOUR CLIENT ID",
            "order_id": "210925000012237",
            "exchange_order_id": "1100000000021665",
            "parent_order_id": null,
            "status": "COMPLETE",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 09:14:59",
            "exchange_update_timestamp": "2021-09-27 09:15:00",
            "exchange_timestamp": "2021-09-27 09:00:04",
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 1763.85,
            "filled_quantity": 1,
            "pending_quantity": 0,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        }
    ]
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
order_id string Unique order ID
parent_order_id string Order ID of the parent order (only applicable in case of multi-legged orders like BO and CO)
exchange_order_id null, string Exchange generated order ID. Orders that don't reach the exchange have null IDs
placed_by string ID of the user that placed the order. This may different from the user's ID for orders placed outside of Kite, for instance, by dealers at the brokerage using dealer terminals
variety string Order variety (regular, amo, bo, co etc.)
status string Current status of the order. Most common values or COMPLETE, REJECTED, CANCELLED, and OPEN. There may be other values as well.
tradingsymbol string Exchange tradingsymbol of the of the instrument
exchange string Exchange
instrument_token string The numerical identifier issued by the exchange representing the instrument. Used for subscribing to live market data over WebSocket
transaction_type string BUY or SELL
order_type string Order type (MARKET, LIMIT etc.)
product string> Margin product to use for the order (margins are blocked based on this) ?
validity string Order validity
price float Price at which the order was placed (LIMIT orders)
quantity int Quantity ordered
trigger_price float Trigger price (for SL, SL-M, CO orders)
average_price float Average price at which the order was executed (only for COMPLETE orders)
peding_quantity int Pending quantity to be filled
filled_quantity int Quantity that's been filled
disclosed_quantity int Quantity to be disclosed (may be different from actual quantity) to the public exchange orderbook. Only for equities
order_timestamp string Timestamp at which the order was registered by the API
exchange_timestamp string Timestamp at which the order was registered by the exchange. Orders that don't reach the exchange have null timestamps
exchange_update_timestamp string Timestamp at which an order's state changed at the exchange.
status_message null, string Textual description of the order's status. Failed orders come with human readable explanation
meta {}, string Map of arbitrary fields that the system may attach to an order.

OrderHistory


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

                

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



Request example :

{
    "api_key":"c1997d92a3bb556a67dca7d1446b7087",
    "api_secret":"5306433329e81ba41203653417063c71",
    "data":
      {
        "order_id": "170328000000030"
      }
}

Response example :

{
    "status": "success",
    "data": [
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": null,
            "parent_order_id": null,
            "status": "AMO REQ RECEIVED",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-25 18:45:23",
            "exchange_update_timestamp": null,
            "exchange_timestamp": null,
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 0,
            "filled_quantity": 0,
            "pending_quantity": 1,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        },
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": null,
            "parent_order_id": null,
            "status": "PUT ORDER REQ RECEIVED",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 08:57:44",
            "exchange_update_timestamp": null,
            "exchange_timestamp": null,
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 0,
            "filled_quantity": 0,
            "pending_quantity": 1,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        },
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": null,
            "parent_order_id": null,
            "status": "VALIDATION PENDING",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 08:57:46",
            "exchange_update_timestamp": null,
            "exchange_timestamp": null,
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 0,
            "filled_quantity": 0,
            "pending_quantity": 1,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        },
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": null,
            "parent_order_id": null,
            "status": "OPEN PENDING",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 08:57:54",
            "exchange_update_timestamp": null,
            "exchange_timestamp": null,
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 0,
            "filled_quantity": 0,
            "pending_quantity": 1,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        },
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": "1100000000021665",
            "parent_order_id": null,
            "status": "OPEN",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 09:00:03",
            "exchange_update_timestamp": "2021-09-27 09:00:04",
            "exchange_timestamp": "2021-09-27 09:00:04",
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 0,
            "filled_quantity": 0,
            "pending_quantity": 1,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        },
        {
            "placed_by": "CC4669",
            "order_id": "210925000012237",
            "exchange_order_id": "1100000000021665",
            "parent_order_id": null,
            "status": "COMPLETE",
            "status_message": null,
            "status_message_raw": null,
            "order_timestamp": "2021-09-27 09:14:59",
            "exchange_update_timestamp": "2021-09-27 09:15:00",
            "exchange_timestamp": "2021-09-27 09:00:04",
            "variety": "amo",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "order_type": "LIMIT",
            "transaction_type": "BUY",
            "validity": "DAY",
            "product": "MIS",
            "quantity": 1,
            "disclosed_quantity": 0,
            "price": 1763.85,
            "trigger_price": 0,
            "average_price": 1763.85,
            "filled_quantity": 1,
            "pending_quantity": 0,
            "cancelled_quantity": 0,
            "market_protection": 0,
            "meta": {},
            "tag": null,
            "guid": "01X5HsakfAXAbIo"
        }
    ]
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
order_id Order ID Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
order_id string Unique order ID
parent_order_id string Order ID of the parent order (only applicable in case of multi-legged orders like BO and CO)
exchange_order_id null, string Exchange generated order ID. Orders that don't reach the exchange have null IDs
placed_by string ID of the user that placed the order. This may different from the user's ID for orders placed outside of Kite, for instance, by dealers at the brokerage using dealer terminals
variety string Order variety (regular, amo, bo, co etc.)
status string Current status of the order. Most common values or COMPLETE, REJECTED, CANCELLED, and OPEN. There may be other values as well.
tradingsymbol string Exchange tradingsymbol of the of the instrument
exchange string Exchange
instrument_token string The numerical identifier issued by the exchange representing the instrument. Used for subscribing to live market data over WebSocket
transaction_type string BUY or SELL
order_type string Order type (MARKET, LIMIT etc.)
product string> Margin product to use for the order (margins are blocked based on this) ?
validity string Order validity
price float Price at which the order was placed (LIMIT orders)
quantity int Quantity ordered
trigger_price float Trigger price (for SL, SL-M, CO orders)
average_price float Average price at which the order was executed (only for COMPLETE orders)
peding_quantity int Pending quantity to be filled
filled_quantity int Quantity that's been filled
disclosed_quantity int Quantity to be disclosed (may be different from actual quantity) to the public exchange orderbook. Only for equities
order_timestamp string Timestamp at which the order was registered by the API
exchange_timestamp string Timestamp at which the order was registered by the exchange. Orders that don't reach the exchange have null timestamps
exchange_update_timestamp string Timestamp at which an order's state changed at the exchange.
status_message null, string Textual description of the order's status. Failed orders come with human readable explanation
meta {}, string Map of arbitrary fields that the system may attach to an order.

Positions


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

                

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



Request example :

{
    "api_key":"03f06157d7faf1ea3b2c93e5c3be1fa0",
    "api_secret":"529d68b86de86b7379a8c975ab08de8b",
    "data": {
        "pos_type":"NET"
    }
}

Response example :

{
    "status": "success",
    "data": {
        "net": [
            {
                "tradingsymbol": "INFY",
                "exchange": "NSE",
                "instrument_token": 408065,
                "product": "MIS",
                "quantity": 1,
                "overnight_quantity": 0,
                "multiplier": 1,
                "average_price": 1763.85,
                "close_price": 0,
                "last_price": 1728.45,
                "value": -1763.85,
                "pnl": -35.399999999999864,
                "m2m": -35.399999999999864,
                "unrealised": -35.399999999999864,
                "realised": 0,
                "buy_quantity": 1,
                "buy_price": 1763.85,
                "buy_value": 1763.85,
                "buy_m2m": 1763.85,
                "sell_quantity": 0,
                "sell_price": 0,
                "sell_value": 0,
                "sell_m2m": 0,
                "day_buy_quantity": 1,
                "day_buy_price": 1763.85,
                "day_buy_value": 1763.85,
                "day_sell_quantity": 0,
                "day_sell_price": 0,
                "day_sell_value": 0
            }
        ],
        "day": [
            {
                "tradingsymbol": "INFY",
                "exchange": "NSE",
                "instrument_token": 408065,
                "product": "MIS",
                "quantity": 1,
                "overnight_quantity": 0,
                "multiplier": 1,
                "average_price": 1763.85,
                "close_price": 0,
                "last_price": 1728.45,
                "value": -1763.85,
                "pnl": -35.399999999999864,
                "m2m": -35.399999999999864,
                "unrealised": -35.399999999999864,
                "realised": 0,
                "buy_quantity": 1,
                "buy_price": 1763.85,
                "buy_value": 1763.85,
                "buy_m2m": 1763.85,
                "sell_quantity": 0,
                "sell_price": 0,
                "sell_value": 0,
                "sell_m2m": 0,
                "day_buy_quantity": 1,
                "day_buy_price": 1763.85,
                "day_buy_value": 1763.85,
                "day_sell_quantity": 0,
                "day_sell_price": 0,
                "day_sell_value": 0
            }
        ]
    }
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
tradingsymbol string Exchange tradingsymbol of the instrument
exchange string Exchange
instrument_token uint32 The numerical identifier issued by the exchange representing the instrument. Used for subscribing to live market data over WebSocket
product string Margin product applied to the position
quantity int Quantity held
overnight_quantity int Quantity held previously and carried forward over night
multiplier int The quantity/lot size multiplier used for calculating P&Ls.
average_price float Average price at which the net position quantity was acquired
close_price float Closing price of the instrument from the last trading day
last_price float Last traded market price of the instrument
value float Net value of the position
pnl float Net returns on the position; Profit and loss
m2m float Mark to market returns (computed based on the last close and the last traded price)
unrealised float Unrelaised intraday returns
realised float Realised intraday returns
buy_quantity int Quantity bought and added to the position
buy_price float Average price at which quantities were bought
buy_value float Net value of the bought quantities
buy_m2m float Mark to market returns on the bought quantities
day_buy_quantity int Quantity bought and added to the position during the day
day_buy_price float Average price at which quantities were bought during the day
day_buy_value float Net value of the quantities bought during the day
sell_quantity int Quantity sold off from the position
sell_price float Average price at which quantities were sold
sell_value float Net value of the sold quantities
sell_m2m float Mark to market returns on the sold quantities
day_sell_quantity int Quantity sold off from the position during the day
day_sell_price float Average price at which quantities were sold during the day
day_sell_value float Net value of the quantities sold during the day

TradeBook


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

                

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



Request example :

{
    "api_key":"c1997d92a3bb556a67dca7d1446b7087",
    "api_secret":"5306433329e81ba41203653417063c71"
}

Response example :

{
    "status": "success",
    "data": [
        {
            "account_id": "CC4669",
            "trade_id": "25039569",
            "order_id": "210925000012237",
            "exchange": "NSE",
            "tradingsymbol": "INFY",
            "instrument_token": 408065,
            "product": "MIS",
            "average_price": 1763.85,
            "quantity": 1,
            "exchange_order_id": "1100000000021665",
            "transaction_type": "BUY",
            "fill_timestamp": "2021-09-27 09:15:00",
            "order_timestamp": "09:15:00",
            "exchange_timestamp": "2021-09-27 09:00:04"
        }
    ]
}
                

QUERY PARAMETERS

Request Parameter Description Mandatory
api_key Algomojo API Key Yes
api_secret Algomojo API Secret Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
trade_id string Exchange generated trade ID
order_id string Unique order ID
exchange_order_id null, string Exchange generated order ID
tradingsymbol string Exchange tradingsymbol of the o
exchange string Exchange
instrument_token string The numerical identifier issued by the exchange representing the instrument. Used for subscribing to live market data over WebSocket
transaction_type string BUY or SELL
product string Margin product to use for the order (margins are blocked based on this) ?
average_price float Price at which the was filled
filled int Filled quantity
fill_timestamp string Timestamp at which the trade was filled at the exchange
exchange_timestamp string Timestamp at which the order was registered by the exchange.

fetchtoken


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

                

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



Request example :

{
    "api_key":"03f06157d7faf1ea3b2c93e5c3be1fa0",
    "api_secret":"529d68b86de86b7379a8c975ab08de8b",
    "data": {
        "s":"RELIANCE"
    }
}

Response example :

{
    "status": true,
    "statusMessage": "SUCCESS",
    "errorcode": "",
    "data": {
        "token": "500325_BSE",
        "symbol": "RELIANCE",
        "trading_symbol": "RELIANCE"
    }
}

                

QUERY PARAMETERS

Request Parameter Description Mandatory
s Symbol Name (As per Watchlist in the fy.algomojo.com) Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
token string symbol token
tradingsymbol string Trading Symbol
symbol string Symbol Name

GetQuote


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

                

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



Request example :

{
    "api_key": "8b324049eaa09e807662cdd382ceea87",
    "api_secret":"4ee7b2226bc8178f052a57e983391765",
    "data": {
        "exchange":"NSE",
        "symbol":"INFY"
    }
}

Response example :

{
    "status": "success",
    "data": {
        "NSE:INFY": {
            "instrument_token": 408065,
            "timestamp": "2021-09-27 11:32:13",
            "last_trade_time": "2021-09-27 11:32:13",
            "last_price": 1726.55,
            "last_quantity": 1,
            "buy_quantity": 196218,
            "sell_quantity": 363653,
            "volume": 2018024,
            "average_price": 1745.17,
            "oi": 0,
            "oi_day_high": 0,
            "oi_day_low": 0,
            "net_change": 0,
            "lower_circuit_limit": 1587.5,
            "upper_circuit_limit": 1940.2,
            "ohlc": {
                "open": 1768.75,
                "high": 1769,
                "low": 1721.35,
                "close": 1763.85
            },
            "depth": {
                "buy": [
                    {
                        "price": 1726.25,
                        "quantity": 32,
                        "orders": 2
                    },
                    {
                        "price": 1726.15,
                        "quantity": 118,
                        "orders": 3
                    },
                    {
                        "price": 1726.1,
                        "quantity": 2,
                        "orders": 2
                    },
                    {
                        "price": 1726,
                        "quantity": 1405,
                        "orders": 45
                    },
                    {
                        "price": 1725.95,
                        "quantity": 2,
                        "orders": 1
                    }
                ],
                "sell": [
                    {
                        "price": 1726.55,
                        "quantity": 2,
                        "orders": 1
                    },
                    {
                        "price": 1726.6,
                        "quantity": 16,
                        "orders": 1
                    },
                    {
                        "price": 1726.65,
                        "quantity": 10,
                        "orders": 1
                    },
                    {
                        "price": 1726.7,
                        "quantity": 1,
                        "orders": 1
                    },
                    {
                        "price": 1727.1,
                        "quantity": 288,
                        "orders": 2
                    }
                ]
            }
        }
    }
}

                

QUERY PARAMETERS

Request Parameter Description Mandatory
symbol Symbol Name (As per Watchlist in the ze.algomojo.com) Yes
exchange Exchange Name Yes

RESPONSE ATTRIBUTES

Attributes Datatype Description
last_price float Last traded market price
volume int Volume traded today
buy_quantity int Total quantity of buy orders
sell_quantity int Total quantity of sell orders
open_interest float Total number of outstanding contracts held by market participants exchange-wide (only F&O)
last_quantity int Last traded quantity
last_time null, string Time of last trade
ohlc.open float Price at market opening
ohlc.high float Highest price today
ohlc.low float Lowest price today
ohlc.close float Closing price of the instrument from the last trading day
net_change float The absolute change from yesterday's close to last traded price
lower_circuit_limit float The current lower circuit limit
upper_circuit_limit float The current upper circuit limit
oi float The Open Interest for a futures or options contract ?
oi_day_high float The highest Open Interest recorded during the day
oi_day_low float The lowest Open Interest recorded during the day
depth.buy[].price float Price at which the depth stands
depth.buy[].orders int Number of open BUY (bid) orders at the price
depth.buy[].quantity int Net quantity from the pending orders
depth.sell[].price float Price at which the depth stands
depth.sell[].orders int Number of open SELL (ask) orders at the price
depth.sell[].quantity int Net quantity from the pending orders