Vault investor summary
Get your investment summary for one vault.
On this page
Agent prompt
Write a small program that calls `vault.vault_investor_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/vault_investor_summary.md (~60 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 | vault. (RPCVaultInvestorSummaryV1) |
Request
Body type ApiVaultInvestorSummaryRequest. Fields the server fills are left out.
- The unique identifier of the vault to fetch the summary for.
Response
Body type ApiVaultInvestorSummaryResponse (the same object is the JSON-RPC result over WebSocket).
The summary of investments in the vault.
- The unique identifier of the vault sub-account.
- The number of vault LP tokens the investor holds: those in the funding account plus those in every sub-account.
- The average entry price (in USD) of the investor's vault LP tokens: the investor's invested notional divided by numLPTokens.
- The current price (in USD) of the vault LP tokens.
- The vault's total equity (in USD). The investor's holding is investorEquity.
- The all-time realized PnL (in USD) that the investor has received from the vault.
- The singleton pending redemption (omitted if none).
7 fields of
VaultRedemption- The number of LP Tokens requested for redemption.
- The valuation (in USD) of the redemption request.
- Set by the server. Time at which the redemption request was received by Grvt in unix nanoseconds
- Set by the server. Time in unix nanoseconds, beyond which the request will be force-redeemed.
- Omitted for redemption requests to non-cross exchange vaults. True if cancellation is blocked within the CEV allocation allowance for the user's current tier (e.g. because the user has already transferred out the spot balance underlying the redemption request).
- The currency the request pays into the investor's funding account: the vault's investment currency, unless the request converts.
- The signed rate the request is paid at,
to_currencyper unit of the vault's investment currency. 1 when the request does not convert.
- True if the requesting account is authorized to burn tokens on this vault, omitted otherwise.
- The number of the investor's vault LP tokens still within the vault's minimum investment period.
- The number of vault LP tokens the investor can request to redeem now: those past the minimum investment period, less any pending redemption.
- The investor's vault LP tokens within the minimum investment period, by the time they unlock (earliest first).
- One entry per sub-account holding the vault's LP tokens. Empty when no sub-account holds any.
5 fields of
VaultShareTradingBalance- The sub-account.
- The vault LP tokens in the sub-account.
- The current valuation (in USD) of the sub-account's vault LP tokens.
- An estimate of the vault LP tokens that can move back to the funding account without failing the sub-account's withdrawal checks.
- What the vault LP tokens add to the sub-account's margin (in USD): equity times the collateral value ratio. 0 when they don't count as collateral.
- The current valuation (in USD) of all the investor's vault LP tokens: numLPTokens times currentPrice.
- The investor's unrealized PnL (in USD): investorEquity less the investor's invested notional.
Errors
Errors come back as {"code", "message", "status"} (lite {"c", "m", "s"}) with the HTTP status. Codes this call can return (all error codes):
7000InvalidVaultID400- Vault ID provided is invalid and does not belong to any vault
7007InvestorNotVaultLP400- The investor is not an LP for this vault.
Plus 8 errors any call can return
1000Unauthorized401- You need to authenticate prior to using this functionality
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
1014GatewayTimeout504retryable- Upstream data service timed out, please try again
1015ServiceUnavailable503retryable- Upstream data service is temporarily unavailable, please try again
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.vault_investor_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/vault_investor_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/vault_investor_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.