Get Fund And Margin
API to retrieve user funds data for both the equity and commodity markets, including data such as the margin utilized by the user, the available margin for trading, and the total payin amount during the day.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Query Parameters
Name | Required | Type | Description |
---|---|---|---|
segment | false | string | Determines the market segment related to the transaction. Without a specified segment in the request, the response will encompass results for both commodities and equities. Possible values: for Equity use SEC , for Commodity use COM |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"commodity": {
"used_margin": 555.23,
"payin_amount": 107.0,
"span_margin": 360.0,
"adhoc_margin": 0.0,
"notional_cash": 0.0,
"available_margin": 3874.5,
"exposure_margin": 75.13
},
"equity": {
"used_margin": 0.8,
"payin_amount": 200.0,
"span_margin": 0.0,
"adhoc_margin": 0.0,
"notional_cash": 0.0,
"available_margin": 15507.46,
"exposure_margin": 0.0
}
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for Balance |
data.used_margin | float | Positive values denote the amount blocked into an Open order or position. Negative value denotes the amount being released. |
data.payin_amount | float | Instant payin will reflect here |
data.span_margin | float | Amount blocked on futures and options towards SPAN |
data.adhoc_margin | float | Payin amount credited through a manual process |
data.notional_cash | float | The amount maintained for withdrawal |
data.available_margin | float | Total margin available for trading |
data.exposure_margin | float | Amount blocked on futures and options towards Exposure |
Error codes
Error code | Description |
---|---|
UDAPI100072 | The Funds service is accessible from 5:30 AM to 12:00 AM IST daily - Thrown when an funds API is called between midnight and 5:30 AM in the morning. |
NOTE
- The Funds service is down for maintenance from 12:00 AM to 5:30 AM IST daily and is not available for usage during these hours. Users are advised to plan their activities accordingly.
Examples
A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.
Loading...