Funds
This API allows you to fetch the available balance of your capital and commodity accounts.
USE CASE
Check how much balance is available before placing an order.
Details
- Shows the balance available for the user for capital as well as the commodity market.
- Your app needs the Transactions Info permission. Funds is part of that template, along with Orders, Positions, Trades, Holdings and Market Status.
- The request takes no parameters. The response returns a
fund_limitlist with one row per ledger heading. - Each row has an
id, atitle, anequityAmountfor the capital ledger and acommodityAmountfor the commodity ledger. - The sample response lists these titles: Total Balance, Utilized Amount, Clear Balance, Realized Profit and Loss, Collaterals, Fund Transfer, Receivables, Adhoc Limit, Limit at start of the day and Available Balance.
- Look up the row you need, for example Available Balance, by its
titleinstead of relying on its position in the list. - Available Balance = Total Balance - Utilized Amount.
- After you square off all positions, Utilized Amount is not blocked margin any more. It holds the brokerage and the realised loss (less the realised profit) of trades closed today.
- Balances are updated shortly after an order fills. A value read in the first moments after a fill can be out of date.
- To find out the margin a specific order needs, use the Margin Calculator.
- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | ok / error. |
code | int | API response code. |
message | string | Response or error message. |
fund_limit | array | One row per ledger heading, with the fields below. |
id | int | Unique identity for particular fund |
title | string | Each title represents a heading of the ledger |
equityAmount | float | The amount in the capital ledger for the above-mentioned title |
commodityAmount | float | The amount in the commodity ledger for the above-mentioned title |
Ledger headings
| id | title | Meaning |
|---|---|---|
1 | Total Balance | Total funds in the ledger: Clear Balance plus Collaterals, adjusted for the day's realised profit and loss. |
2 | Utilized Amount | Margin blocked for open positions and open orders, plus brokerage and the realised loss (less the realised profit) of trades closed today. |
3 | Clear Balance | Cash balance in the ledger, excluding collaterals. |
5 | Collaterals | Value of pledged holdings that counts towards margin. |
9 | Limit at start of the day | Cash balance at the start of the day. |
10 | Available Balance | Total Balance minus Utilized Amount: the amount available to trade. |
Last updated on