Transactions

get

Retrieves the complete transactional context for a user's interaction with a specific vault, including available deposit/redeem steps, current balances, and claimable rewards.

Authorizations
Path parameters
userAddressstringRequired

User address

Pattern: ^0x[a-fA-F0-9]{40}$
networkstring · enumRequired

Network name

Possible values:
vaultAddressstringRequired

Vault address

Pattern: ^0x[a-fA-F0-9]{40}$
Responses
200
Transaction context information for a user and vault
application/json
get
GET //v2/transactions/context/{userAddress}/{network}/{vaultAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currentDepositStep": "deposit",
  "depositSteps": [
    {
      "actions": [
        "text"
      ],
      "actionsUrl": "text",
      "name": "deposit"
    }
  ],
  "currentRedeemStep": "deposit",
  "redeemSteps": [
    {
      "actions": [
        "text"
      ],
      "actionsUrl": "text",
      "name": "deposit"
    }
  ],
  "lpToken": {
    "address": "text",
    "tokenCaip": "text",
    "name": "text",
    "symbol": "text",
    "decimals": 1,
    "balanceNative": "text",
    "balanceUsd": "text"
  },
  "asset": {
    "address": "text",
    "assetCaip": "text",
    "name": "text",
    "symbol": "text",
    "decimals": 1,
    "assetLogo": "https://example.com",
    "assetPriceInUsd": "text",
    "balanceNative": "text",
    "balanceUsd": "text",
    "unclaimedNative": "text",
    "unclaimedUsd": "text",
    "positionValueInAsset": "text"
  },
  "additionalAssets": [
    {
      "address": "text",
      "assetCaip": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "assetLogo": "https://example.com",
      "assetPriceInUsd": "text",
      "balanceNative": "text",
      "balanceUsd": "text",
      "unclaimedNative": "text",
      "unclaimedUsd": "text",
      "positionValueInAsset": "text"
    }
  ],
  "childrenPositions": [
    {
      "address": "text",
      "lpToken": {
        "address": "text",
        "tokenCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "balanceNative": "text",
        "balanceUsd": "text"
      },
      "asset": {
        "address": "text",
        "assetCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "assetLogo": "https://example.com",
        "assetPriceInUsd": "text",
        "balanceNative": "text",
        "balanceUsd": "text",
        "unclaimedNative": "text",
        "unclaimedUsd": "text",
        "positionValueInAsset": "text"
      },
      "additionalAssets": [
        {
          "address": "text",
          "assetCaip": "text",
          "name": "text",
          "symbol": "text",
          "decimals": 1,
          "assetLogo": "https://example.com",
          "assetPriceInUsd": "text",
          "balanceNative": "text",
          "balanceUsd": "text",
          "unclaimedNative": "text",
          "unclaimedUsd": "text",
          "positionValueInAsset": "text"
        }
      ]
    }
  ],
  "vaultSpecificData": null,
  "rewards": {
    "claimable": [
      {
        "amount": "text",
        "asset": {
          "address": "text",
          "assetCaip": "text",
          "name": "text",
          "symbol": "text",
          "decimals": 1,
          "assetLogo": "https://example.com",
          "assetPriceInUsd": "text",
          "network": "mainnet"
        }
      }
    ],
    "currentStep": "deposit",
    "steps": [
      {
        "actions": [
          "text"
        ],
        "actionsUrl": "text",
        "name": "deposit"
      }
    ]
  }
}
get

Retrieves executable transaction payloads for specific actions (deposit, redeem, claim) for a user interacting with a vault, including ready-to-sign transaction data and optional simulation results.

Authorizations
Path parameters
actionstring · enumRequired

Action to be performed

Possible values:
userAddressstringRequired

User address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
networkstring · enumRequired

Network to get returns for

Possible values:
vaultAddressstringRequired

Vault address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
simulatebooleanOptional

Simulate the transaction

Default: false
assetAddressstringRequired

Address of the asset to be used in the transaction

Pattern: ^0x[a-fA-F0-9]{40}$
amountstringOptional

Only applicable to deposit, redeem, request-redeem, Amount of the asset to be used in the transaction

allbooleanOptional

Only applicable for redeem action. If true, all assets will be redeemed

Responses
200
Default Response
application/json
get
GET //v2/transactions/{action}/{userAddress}/{network}/{vaultAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currentActionIndex": 1,
  "actions": [
    {
      "name": "text",
      "tx": {
        "to": "text",
        "chainId": 1,
        "data": "text",
        "value": "text"
      },
      "simulation": {
        "url": "text",
        "status": "success",
        "tokensReceived": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "tokensSpent": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    }
  ]
}

Last updated