Vault manager investment history
List the investor history of a vault you manage.
On this page
Write a small program that calls `vault.vault_manager_investment_history` 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_manager_investment_history.md (~57 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.
Only for vault managers. Other accounts get error 1001.
| 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. (RPCVaultManagerInvestmentHistoryV1) |
Request
Body type ApiQueryVaultManagerInvestorHistoryRequest. Fields the server fills are left out.
- The unique identifier of the vault to filter by
- Whether to only return investments made by the manager
- Optional. Start time in unix nanoseconds
- Optional. End time in unix nanoseconds
Response
Body type ApiQueryVaultManagerInvestorHistoryResponse (the same object is the JSON-RPC result over WebSocket).
- Time at which the event was emitted in unix nanoseconds
- The off chain account id of the investor, only visible to the manager
- The unique identifier of the vault.
- The type of transaction that occurred. List of types: vaultInvest, vaultBurnLpToken, vaultRedeem
4 values
- The price of the vault LP tokens at the time of the event.
- The amount of Vault LP tokens invested or redeemed.
- The realized PnL of the vault.
- The performance fee of the vault.
- The vault leg's currency: the vault's investment currency, which the vault received or paid. Empty on a burn, which moves no tokens.
- The vault leg: the tokens of tokenCurrency the vault received on an invest or paid on a redemption. 0 on a burn, and on a vaultRedeem recorded before its results carried the amount.
- The currency that left its owner: on an invest the investor's source currency (the user leg), on a redemption tokenCurrency. A row without conversion has the vault leg's currency. Empty on a burn.
- The tokens of fromCurrency that left their owner: on an invest what the investor paid (the user leg), on a redemption numTokens. 0 on a burn, and on a vaultRedeem recorded before its results carried the amount.
- The currency that reached its owner: on a redemption the investor's payout currency (the user leg), on an invest tokenCurrency. A row without conversion has the vault leg's currency. Empty on a burn.
- The tokens of toCurrency that reached their owner: on a redemption what the investor received (the user leg), on an invest numTokens. 0 on a burn, and on a vaultRedeem recorded before its results carried the amount.
- The conversion fee in toCurrency: the difference between the two legs of a converting invest or redemption. 0 without conversion.
- The trading sub-account an invest was paid from. 0 for the funding account and on other rows.
- The wallet an invest was paid from: FUNDING for the funding account, otherwise SPOT or FUTURES. Unspecified on redemptions and burns.
3 values
- On a redemption, when its redemption request was made, in unix nanoseconds. 0 when unknown and on other rows.
Errors
Errors come back as {"code", "message", "status"} (lite {"c", "m", "s"}) with the HTTP status. Codes this call can return (all error codes):
8 errors any call can return; none specific to this one
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_manager_investment_history(
vault_id="2312134",
only_own_investments=True,
)
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_manager_investor_history" \
-H "Content-Type: application/json" \
-H "Cookie: gravity=$GRVT_COOKIE" \
-H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
--data @- <<EOF
{
"vault_id": "2312134",
"only_own_investments": true
}
EOFWith lite field names:
curl -sS "https://trades.testnet.grvt.io/lite/v1/vault_manager_investor_history" \
-H "Content-Type: application/json" \
-H "Cookie: gravity=$GRVT_COOKIE" \
-H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
--data @- <<EOF
{
"vi": "2312134",
"oo": true
}
EOF