Funds
Get account funds information including available cash, collateral, and margin utilization.
Endpoint URL
Local Host : POST http://127.0.0.1:5000/api/v1/funds
Ngrok Domain : POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/funds
Custom Domain: POST https://<your-custom-domain>/api/v1/fundsSample API Request
{
"apikey": "<your_app_apikey>"
}Sample cURL Request
curl -X POST http://127.0.0.1:5000/api/v1/funds \
-H 'Content-Type: application/json' \
-d '{
"apikey": "<your_app_apikey>"
}'Sample API Response
Request Body
apikey
Your OpenAlgo API key
Mandatory
-
FundsSchema declares only apikey. Any other field returns HTTP 400.
Response Fields
status
string
"success" or "error"
data
object
Funds data object
Data Object Fields
availablecash
string
Available cash for trading
collateral
string
Collateral margin (pledged holdings)
m2mrealized
string
Realized Mark-to-Market profit/loss
m2munrealized
string
Unrealized Mark-to-Market profit/loss
utiliseddebits
string
Margin utilized for positions
Understanding Funds
Available Cash
Free cash available for new trades
Collateral
Margin from pledged stocks/securities
Realized M2M
Profit/loss from closed positions today
Unrealized M2M
Profit/loss from open positions (not booked)
Utilized Debits
Margin blocked for existing positions
Notes
Values are returned as strings for precision
availablecash is the amount available for new orders
collateral is margin from pledged holdings (varies by broker)
M2M values update in real-time with market prices
Total margin = availablecash + collateral
Back to: API Documentation
Last updated
Was this helpful?