Earn

Preview an external-wallet exit

Quotes what redeeming the shares would pay right now, from the vault's live accounting — the read a truthful minAmountOut floor is derived from (assetsOut minus your chosen tolerance, quantized to assetDecimals). Read-only, no idempotency key, and it takes the exit's own gates: a delisted strategy or a provider disabled for new deposits stays quotable. POST because the parameters are a body; 501 when the provider cannot quote exits.

post/v1/earn/external-wallet/withdrawal-previews

Headers

x-project-idstring

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Example:prj_example

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Request body

positionIdstring required
sharesstring required

Shares the exit would redeem, decimal string in share units.

Example request

{
  "positionId": "earn_position_example",
  "shares": "10"
}

Response

Live exit quote

Example response

{
  "data": {
    "positionId": "earn_position_example",
    "assetsOut": "25.02",
    "assetDecimals": 6,
    "blockingIssues": [
      {
        "code": "SHARE_LOCKED"
      }
    ]
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}

Changes

Changed in 1 of the 13 revisions of this API.1