Funding account summary
Get the total equity and balances of your main (funding) account.
On this page
Agent prompt
Write a small program that calls `account.funding_account_summary` on Grvt {environment} {using}.
Target environment: {environment} (chain ID {chainId}). Recorded signing cases keep their original environment.
{executionGuidance}
Read this first: {origin}/bundle/reference/rpc/funding_account_summary.md (~58 KB, plain Markdown: this page plus the AGENTS.md rules, Authentication and sessions, Errors and retries, Python SDK, Environments).
Fetch other pages from the index at {origin}/llms.txt only as you need them. {origin}/downloads/contract.json is a machine-readable contract for tools, not for reading.
Rules: follow AGENTS.md; do not send requests without the user asking you to; read credentials from environment variables; never retry writes automatically; show me the code and how to run it. URLs and generated code samples on this page: Testnet (chain ID 326). Other code on this page doesn't change: it stays on testnet until you switch it in your code. Tutorials, signing cases and live tools always use testnet.
| SDK | client. |
|---|---|
| HTTP | POST https:/, or / for lite names (the SDKs' default) |
| WebSocket | method v1/ on wss:/, or /ws/lite for lite names |
| Auth | Session required (Authentication) |
| Retries | Read: the SDKs retry retryable errors (rules) |
| Contract id | account. (RPCFundingAccountSummaryV1) |
Request
Body type EmptyRequest. Fields the server fills are left out.
No fields.
Response
Body type ApiFundingAccountSummaryResponse (the same object is the JSON-RPC result over WebSocket).
- The funding account summary
6 fields of
FundingAccountSummary- The main account ID of the account to which the summary belongs
- Total equity of the main account, denominated in USD
- The list of spot assets owned by this main account, and their balances
8 fields of
SpotBalance- The currency you hold a spot balance in
- This currency's balance in this sub-account.
- The index price of this currency. (reported in
USD) - The entry price of this spot currency. (reported in
USD) - The realized PnL of this spot currency. (reported in
USD) - The unrealized PnL of this spot currency. (reported in
USD) - The available to transfer amount of this spot currency.
- The amount borrowed in this currency, inclusive of accrued interest. Only reported by
account_summary, and only for multi-asset-mode sub-accounts
- The list of vault investments held by this main account
- Total balance of cash (stablecoin) currencies, denominated in USD
- Total balance of non-cash spot currencies, denominated in USD
- Client fee tier at the time of query
8 fields of
ClientTier- Per-currency borrow & collateral limits for this tier. Populated only in the funding_account_summary response; empty in raw config contexts.
4 fields of
ApiSpotBorrowConfig- BL — max borrowable amount, denominated in the asset. 0 = not borrowable.
- BR — annual borrow interest rate at this tier. Never exceeds the asset's maxBorrowRate.
- CL — max amount counted as collateral, denominated in the asset. 0 = unlimited.
Errors
Errors come back as {"code", "message", "status"} (lite {"c", "m", "s"}) with the HTTP status. Codes this call can return (all error codes):
5 errors any call can return; none specific to this one
1001Forbidden403- You are not authorized to access this functionality
1002InternalServer500- Internal Server Error
1003InvalidRequest400- Request could not be processed due to malformed syntax
1006RateLimit429retryable- You have surpassed the allocated rate limit for your tier
1008IPNotWhitelisted401- Your IP has not been whitelisted for access
Example
Example code
import os
from grvt import Grvt
with Grvt(
env=os.environ.get("GRVT_ENV", "testnet"),
api_key=os.environ["GRVT_API_KEY"],
) as client:
resp = client.funding_account_summary()
print(resp)
Raw HTTP (set GRVT_DOMAIN, see Environments; GRVT_COOKIE and GRVT_ACCOUNT_ID come from login):
With full field names:
curl -sS "https://trades.testnet.grvt.io/full/v1/funding_account_summary" \
-H "Content-Type: application/json" \
-H "Cookie: gravity=$GRVT_COOKIE" \
-H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
--data '{}'With lite field names:
curl -sS "https://trades.testnet.grvt.io/lite/v1/funding_account_summary" \
-H "Content-Type: application/json" \
-H "Cookie: gravity=$GRVT_COOKIE" \
-H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
--data '{}'Build request
Not sent from the docsThis call needs a logged-in session on the trading gateway. The docs only build the request: you see exactly what your code would send, and nothing is sent. See Authentication.