Skip to content

Limits

Limits contain all the details about cash available, margin used, collateral margin, pay in for the day, etc.

POST: /api/limit

https://connect.thefirstock.com/api/limit

Request Details

Parameter Description
userId User Id of the login user
actid Account id of the logged in user
jKey Key Obtained on login success.

Code

from thefirstock import thefirstock

limit = thefirstock.firstock_Limits()
curl -X POST 'https://connect.thefirstock.com/api/limit' \
-H 'Content-Type: application/json' \
-d '{
    "userId": "",
    "jKey": "",
    "actid": ""
}'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.limits((err, result)=>{
    console.log("Error, ",err)
    console.log("Result: ",result)
})
using thefirstock;

class Program
{
public static void Main()
{
    Firstock firstock = new Firstock();
    var result = firstock.limits();
}
}

Response Details

Parameter Description
stat Ok or Not_Ok Place order success or failure indication
result Noren Order number of the canceled order.
request_time Response received time.
emsg This will be present only if Order cancelation fails
stat Ok or Not_Ok Limits request success or failure indication.
actid Account id
cash
payin Total Amount transferred using Payins today
payout Total amount requested for withdrawal today
brkcollamt Prevalued Collateral Amount
marginused Total margin / fund used today
mtomcurper Mtom current percentage
cbu CAC Buy used
csc CAC Sell Credits
rpnl Current realized PNL
unmtom Current unrealized mtom
span Span used
expo Exposure margin
premium Premium used
addscripbskmrg Total margin / fund used today
brokerage Brokerage amount
collateral Collateral calculated based on uploaded holdings
rzpnl_c_i Current realized PNL (Commodity Intraday)
rzpnl_c_m Current realized PNL (Commodity Margin)
uzpnl_e_i Current unrealized MTOM (Equity Intraday)
uzpnl_e_m Current unrealized MTOM (Equity Margin)
uzpnl_e_c Current unrealized MTOM (Equity Cash n Carry)
uzpnl_d_i Current unrealized MTOM (Derivative Intraday)
uzpnl_d_m Current unrealized MTOM (Derivative Margin)
uzpnl_f_i Current unrealized MTOM (FX Intraday)
uzpnl_f_m Current unrealized MTOM (FX Margin)
uzpnl_c_i Current unrealized MTOM (Commodity Intraday)
uzpnl_c_m Current unrealized MTOM (Commodity Margin)
span_d_i Span Margin (Derivative Intraday)
span_d_m Span Margin (Derivative Margin)
span_f_i Span Margin (FX Intraday)
span_f_m Span Margin (FX Margin)
span_c_i Span Margin (Commodity Intraday)
span_c_m Span Margin (Commodity Margin)
expo_d_i Exposure Margin (Derivative Intraday)
expo_d_m Exposure Margin (Derivative Margin)
expo_f_i Exposure Margin (FX Intraday)
expo_f_m Exposure Margin (FX Margin)
expo_c_i Exposure Margin (Commodity Intraday)
expo_c_m Exposure Margin (Commodity Margin)
premium_d_i Option premium (Derivative Intraday)
premium_d_m Option premium (Derivative Margin)
premium_f_i Option premium (FX Intraday)
premium_f_m Option premium (FX Margin)
premium_c_i Option premium (Commodity Intraday)
premium_c_m Option premium (Commodity Margin)
varelm_e_i Var Elm (Equity Intraday)
varelm_e_m Var Elm (Equity Margin)
varelm_e_c Var Elm (Equity Cash n Carry)
marprt_e_h Covered Product margins (Equity High leverage)
marprt_e_b Covered Product margins (Equity Bracket Order)
marprt_d_h Covered Product margins (Derivative High leverage)
marprt_d_b Covered Product margins (Derivative Bracket Order)
marprt_f_h Covered Product margins (FX High leverage)
marprt_f_b Covered Product margins (FX Bracket Order)
marprt_c_h Covered Product margins (Commodity High leverage)
marprt_c_b Covered Product margins (Commodity High leverage)
scripbskmar_e_i Scrip basket margin (Equity Intraday)
scripbskmar_e_m Scrip basket margin (Equity Margin)
scripbskmar_e_c Scrip basket margin (Equity Cash n Carry)
addscripbskmrg_ d_i Additional scrip basket margin (Derivative Intraday)
addscripbskmrg_ d_m Additional scrip basket margin (Derivative Margin)
addscripbskmrg_ f_i Additional scrip basket margin (FX Intraday)
addscripbskmrg_ f_m Additional scrip basket margin (FX Margin)
addscripbskmrg_ c_i Additional scrip basket margin (Commodity Intraday)
addscripbskmrg_ c_m Additional scrip basket margin (Commodity Margin)
brkage_e_i Brokerage (Equity Intraday)
brkage_e_m Brokerage (Equity Margin)
brkage_e_c Brokerage (Equity CAC)
brkage_e_h Brokerage (Equity Margin)
brkage_e_b Brokerage (Equity Bracket Order)
brkage_d_i Brokerage (Derivative Intraday)
brkage_d_m Brokerage (Derivative Margin)
brkage_d_h Brokerage (Derivative High Leverage)
brkage_d_b Brokerage (Derivative Bracket Order)
brkage_f_i Brokerage (FX Intraday)
brkage_f_m Brokerage (FX Margin)
brkage_f_h Brokerage (FX High Leverage)
brkage_f_b Brokerage (Derivative Bracket Order)
brkage_c_i Brokerage (Commodity Intraday)
brkage_c_m Brokerage (Commodity Margin)
request_time This will be present only in a successful response.
emsg This will be present only in a failure response
unclearedcash Uncleared Cash (Payin through cheques)
aux_daycash
aux_brkcollamt
aux_unclearedcash
daycash Additional leverage amount / Amount added to handle system errors - by broker.
turnoverlmt
pendordvallmt
prfname

Sample Response

{
"request_time": "01:01:40 30-05-2022",
"stat": "Ok",
"prfname": "ONLINE",
"cash": "609792.68",
"payin": "0.00",
"payout": "0.00",
"brkcollamt": "0.00",
"unclearedcash": "0.00",
"aux_daycash": "0.00",
"aux_brkcollamt": "0.00",
"aux_unclearedcash": "0.00",
"daycash": "1.00",
"turnoverlmt": "50000000000.00",
"pendordvallmt": "50000000000.00",
"collateral": "1107391.41"
}   
{
"stat":"Not_Ok",
"emsg":  "Server Timeout : "
}