Developers

Vault redemption queue

View the redemption queue of a vault you manage, highest priority first.

On this page

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.

Fetches the redemption queue for a vault, ordered by descending priority.

Urgent redemption requests, defined as having been pending >90% of the manager-defined maximum redemption period, have top priority (following insertion order).

Non-urgent redemption requests are otherwise prioritized by insertion order, unless they are >5x the size of the smallest redemption request.

E.g., If FIFO ordering (all non-urgent) is 1k -> 50k -> 100k -> 20k -> 10k -> 25k, then priority ordering is 1k -> 10k -> 50k -> 20k -> 100k -> 25k.

Only displays redemption requests that are eligible for automated redemption, i.e., have been pending for the manager-defined minimum redemption period.

SDKclient.vault_redemption_queue(...)
HTTPPOST https://trades.testnet.grvt.io/full/v1/vault_view_redemption_queue, or /lite/v1/vault_view_redemption_queue for lite names (the SDKs' default)
WebSocketmethod v1/vault_view_redemption_queue on wss://trades.testnet.grvt.io/ws/full, or /ws/lite for lite names
AuthSession required (Authentication)
RetriesRead: the SDKs retry retryable errors (rules)
Contract idvault.vault_redemption_queue (RPCVaultRedemptionQueueV1)

Request

Body type ApiVaultViewRedemptionQueueRequest. Fields the server fills are left out.

  • vault_idlite name vistring (uint64)required#
    The unique identifier of the vault to fetch the redemption queue for.

Response

Body type ApiVaultViewRedemptionQueueResponse (the same object is the JSON-RPC result over WebSocket).

  • redemption_queuelite name rqarray<VaultRedemptionRequest>required#
    Outstanding vault redemption requests, ordered by descending priority. Excludes requests that have not yet aged past the minimum redemption period.
    9 fields of VaultRedemptionRequest
    • request_timelite name rtstring (int64 unix ns)required#
      Set by the server. Time at which the redemption request was received by Grvt in unix nanoseconds
    • num_lp_tokenslite name nlstringrequired#
      The number of shares to redeem
    • max_redemption_period_timestamplite name mrstring (int64 unix ns)required#
      Set by the server. Time in unix nanoseconds, beyond which the request will be force-redeemed.
    • age_categorylite name acenum VaultRedemptionReqAgeCategoryrequired#
      Age category of this redemption request.
      4 values
      NORMAL, URGENT, OVERDUE, PRE_MIN (details).
    • is_managerlite name imbooloptional#
      true if this request belongs to the vault manager, omitted otherwise.
    • eligible_for_auto_redemption_timestamplite name efstring (int64 unix ns)required#
      Set by the server. Time in unix nanoseconds, beyond which the request will be eligible for automated redemption.
    • from_currencylite name fcstringrequired#
      The currency the vault pays: the vault's investment currency.
    • to_currencylite name tcstringrequired#
      The currency paid into the investor's funding account. Equal to from_currency when the request does not convert.
    • exchange_ratelite name erstringrequired#
      The signed rate the request is paid at, to_currency per unit of from_currency. 1 when the request does not convert.
  • pending_redemption_token_countlite name prstringrequired#
    Number of shares eligible for automated redemption (held in queue for at least the minimum redemption period).
  • urgent_redemption_token_countlite name urstringrequired#
    Number of shares nearing the maximum redemption period (>= 90% of maximum redemption period).
  • auto_redeemable_balancelite name arstringrequired#
    Amount available for automated redemption request servicing (in USD).
  • share_pricelite name spstringrequired#
    Current share price (in USD).
  • pre_minlite name pmobject PreMinRedemptionsrequired#
    Dedicated section for requests yet to wait at least the minimum redemption period.
    2 fields of PreMinRedemptions
    • requestslite name rarray<VaultRedemptionRequest>required#
      Pre-minimum-age redemption requests, ordered by age (first element is the oldest request that is pre-minimum-age). Fields: same as redemption_queue[] above.
    • token_countlite name tcstringrequired#
      Number of shares in the pre-minimum-age section of the vault's redemption queue.

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
Plus 6 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

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_redemption_queue(
        vault_id="3477045127917224",
    )
    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_view_redemption_queue" \
  -H "Content-Type: application/json" \
  -H "Cookie: gravity=$GRVT_COOKIE" \
  -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
  --data @- <<EOF
{
  "vault_id": "3477045127917224"
}
EOF

With lite field names:

curl -sS "https://trades.testnet.grvt.io/lite/v1/vault_view_redemption_queue" \
  -H "Content-Type: application/json" \
  -H "Cookie: gravity=$GRVT_COOKIE" \
  -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
  --data @- <<EOF
{
  "vi": "3477045127917224"
}
EOF
Build request
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers