Skip to main content

Limits

A limit order is an order to buy or sell a stock with a restriction on the maximum price to be paid or the minimum price to be received (the "limit price"). If the order is filled, it will only be at the specified limit price or better.

The limits provide comprehensive information regarding the available cash, utilized margin, collateral margin, daily pay-in, and other relevant details.

Method: POST

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

Request details

ParameterDescriptionData typesExample
userIdUser Id of the login userString"AA1999"
jKeyKey Obtained on login success.String"dl9b4e1b1c79042476fd96
11eed81003b2dc34c3f13b0
b60a4842fd5a24c9f3f2"
curl --location 'https://connect.thefirstock.com/api/V3/limit' \
--header 'Content-Type: application/json' \
--data '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38"
}'

Response success details

ParameterDescriptionData typesExamples
statusSuccessString"Success"
data.requestTimeResponse received time.String"15:50:24 15-02-2023"
data.cashCashString"-142.37"
data.payinTotal Amount transferred using Payins todayString"0.00"
data.marginusedTotal margin / fund used todayString"0.00"
data.brkcollamtPrevalued Collateral AmountString"0.00"
data.peak_marPeak margin used by the clientString"0.00"
data.spanSpan usedString"0.00"
data.expoExposure marginString"0.00"
data.premiumPremium usedString"0.00"
data.collateralCollateral calculated based on uploaded holdingsString"0.00"

Failure response details

ParameterDescriptionData TypeExample
statusFailedString"Failed"
codeHTTP CodeString"401"
nameType of errorString"INVALID_JKEY"
error.fieldError fieldString"jKey"
error.messageError messageString"jKey parameter is invalid"

Sample response

{
"status": "Success",
"data": {
"requestTime": "15:50:24 15-02-2023",
"cash": "-142.37",
"payin": "0.00",
"marginused": "0.00",
"brkcollamt": "0.00",
"peak_mar": "0.00",
"span": "0.00",
"expo": "0.00",
"premium": "0.00",
"collateral": "0.00"
}
}