Credit

Unwrap position from earn vault

Changed on

Creates list of contract calls to unwrap a position from an earn vault, converting vault shares back to the underlying asset.

get/credit/earn/unwrap

Request

  • Base URL
    https://api.sprinter.tech
  • URL
    https://api.sprinter.tech/credit/earn/unwrap
  • Auth
    none declared

Query parameters

ownerstring required

Owner address that holds the vault shares

receiverstring required

Address that will receive the unwrapped underlying tokens

amountstring required

Amount of shares to unwrap

assetstring required

Vault shares token address

slippagenumber

Slippage tolerance in percent (e.g. 0.5 = 0.5%)

chainstring required

Chain ID in CAIP format

Response

OK

amountOutstring required

Estimated amount of tokens to receive

minAmountOutstring required

Minimum amount of tokens to receive (after slippage)

tokenOutstring required

Token address that will be received after unwrapping

Example response

{
  "amountOut": "1000000",
  "minAmountOut": "997000",
  "tokenOut": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}

Changes

    • info

      the endpoint scheme security ApiKeyAuth was removed from the API

    • breaking

      the // response's property type changed from string to array for status

    • breaking

      the // response's property type changed from string to array for status

    • breaking

      the // response's property type changed from string to object for status