vaults.fyi
  • General
    • ๐ŸฆOverview
    • ๐Ÿ’กUse Cases
      • For Wallets and Apps
      • For Analysts
      • For Protocols & Product Teams
    • ๐Ÿ”ŽMethodology
      • vaults.fyi USD benchmark rate
      • vaults.fyi ETH benchmark rate
    • โ“FAQ
      • Vault requirements for inclusion on vaults.fyi
    • ๐Ÿค–AI
  • API
    • Introduction
      • Market data
      • Transactional support
      • Portfolio tracking
      • Personalized insights
  • Endpoints
    • General
    • Detailed Vaults
    • Historical
    • Portfolio
    • Transactions
    • Legacy (v1) endpoints
      • v1 Market data
        • Get historical data
          • Get historical APY and TVL data on single vault over timestamp range
          • Get historical APY on single vault over timestamp range
          • Get historical TVL on single vault at single timestamp
          • Get historical APY on single vault at single timestamp
        • Get data for multiple vaults
        • Get data on single vault
          • Get APY on single vault
        • Get benchmark rates
        • Get supported vaults, networks & tokens
          • /vaults
          • /networks
          • /tokens
          • /tags
      • v1 Contextual insights
        • Top vault options for address
        • Get single top option for address
        • [Etherscan cards] Get top USD, top ETH vault for address
      • v1 Generate payloads
        • Prepare calldata
          • Supply/Deposit
          • Withdraw/Redeem
            • Request redeem
            • Claim redeem
          • Claim rewards
        • Get contract interaction details
        • Get supported assets
        • Get supported vaults
      • v1 Position tracking
        • Get user balances
        • Get user positions
        • Get list of past vault txns by user address
        • Get estimated returns for user's vault position
  • Case Studies
    • Kraken Wallet
    • Etherscan Cards
  • Plans
    • Credits
      • Credits (v1 endpoints)
  • Links
    • vaults.fyi
    • X
    • Farcaster
    • Wallfacer Labs
Powered by GitBook
On this page
  1. Endpoints

Transactions

PreviousPortfolioNextLegacy (v1) endpoints

Last updated 3 days ago

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
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
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
401
Default Response
application/json
403
Default Response
application/json
500
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"
        }
      }
    }
  ]
}
  • GET/v2/transactions/context/{userAddress}/{network}/{vaultAddress}
  • GET/v2/transactions/{action}/{userAddress}/{network}/{vaultAddress}