Skip to content

Funds ​

Get account funds information including available cash, collateral, and margin utilization.

Endpoint URL ​

http
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/funds

Sample API Request ​

json
{
  "apikey": "<your_app_apikey>"
}

Sample cURL Request ​

bash
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 ​

json
{
  "status": "success",
  "data": {
    "availablecash": "320.66",
    "collateral": "0.00",
    "m2mrealized": "3.27",
    "m2munrealized": "-7.88",
    "utiliseddebits": "679.34"
  }
}

Request Body ​

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-

FundsSchema declares only apikey. Any other field returns HTTP 400.

Response Fields ​

FieldTypeDescription
statusstring"success" or "error"
dataobjectFunds data object

Data Object Fields ​

FieldTypeDescription
availablecashstringAvailable cash for trading
collateralstringCollateral margin (pledged holdings)
m2mrealizedstringRealized Mark-to-Market profit/loss
m2munrealizedstringUnrealized Mark-to-Market profit/loss
utiliseddebitsstringMargin utilized for positions

Understanding Funds ​

FieldDescription
Available CashFree cash available for new trades
CollateralMargin from pledged stocks/securities
Realized M2MProfit/loss from closed positions today
Unrealized M2MProfit/loss from open positions (not booked)
Utilized DebitsMargin 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