Vault API

Get Vault List with Contents

get

This API should be called at https://vault-content-api.teahouse.finance/vaults

Retrieve a list of vaults with content information.

  • deprecated vault: isActive=false

  • permissionless vault: isDefi=true, managed vault: isDefi=false

  • permissionless vault include: type=V3Pair or V3Port

  • base Token = assets[mainAssetIndex] can be used for vault value calculation in the future

Responses
200

Successfully retrieved vault list

application/json
get
/vaults
GET /vaults HTTP/1.1
Host: vault-api.teahouse.finance
Accept: */*
200

Successfully retrieved vault list

{
  "vaults": [
    {
      "ENS": "",
      "URLs": {
        "asset0Icon": "ic-usds.svg",
        "asset1Icon": "ic-usdc.svg",
        "shareIcon": ""
      },
      "asset0": {
        "address": "0xd74f5255d557944cf7dd0e45ff521520002d5748",
        "decimals": 18,
        "icon": "ic-usds.svg",
        "symbol": "USDs",
        "type": "ERC20"
      },
      "asset1": {
        "address": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
        "decimals": 6,
        "icon": "ic-usdc.svg",
        "symbol": "USDC.e",
        "type": "ERC20"
      },
      "assets": [
        {
          "address": "0xd74f5255d557944cf7dd0e45ff521520002d5748",
          "decimals": 18,
          "icon": "ic-usds.svg",
          "symbol": "USDs",
          "type": "ERC20"
        },
        {
          "address": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
          "decimals": 6,
          "icon": "ic-usdc.svg",
          "symbol": "USDC.e",
          "type": "ERC20"
        }
      ],
      "chain": "arbitrum",
      "chainId": "42161",
      "defaultSlippage": "0.02",
      "details": "The USDs-USDC.e pool runs the Teahouse <b>Weighted Moving Average (WMA) Strategy</b>, which optimizes liquidity efficiency with multiple positions and weight allocations to cover a wider spread and reduce impermanent/divergence loss (IL) compared to traditional LP. The strategy incorporates a self-adjusting, ROI-driven weight management algorithm, dynamically updating the rebalancing schedule to minimize costs.\n",
      "feeTier": "0.05%",
      "isActive": true,
      "isAsset0Main": false,
      "isDeFi": true,
      "links": {
        "details": "https://docs.teahouse.finance/teahouse-finance-1/lp-portfolio-vaults/about-lp-portfolio-vaults/strategies/weighted-moving-average-wma-lp-strategy",
        "fee": "https://docs.teahouse.finance/teahouse-finance-1/user-guides/fees"
      },
      "mainAssetIndex": 1,
      "marqueeLink": "",
      "marqueeWording": "",
      "name": "USDs-USDC.e 0.05%",
      "nodeType": "evm",
      "poolAddress": "0x50450351517117cb58189edba6bbad6284d45902",
      "positionGraph": "<iframe width='100%' height='100%' src='https://monitor.teahouse.finance/grafana/d-solo/fb6d67e2-9df3-42ce-b58b-7790967d9e87/website-embedded-charts?orgId=2&theme=dark&panelId=2' frameborder='0' allowfullscreen style='position:absolute; top:0; left: 0'></iframe>",
      "positionWording": "",
      "promotionInfo": {},
      "protocol": "uniswap",
      "rewardTokens": [],
      "riskLevel": "Low",
      "share": {
        "address": "0x1546B2aE60a2aDe3F8F1a9276c198e8f52212c05",
        "decimals": 30,
        "icon": "",
        "symbol": "TEA-PL-USDC-USDs"
      },
      "tags": [],
      "type": "V3Pair",
      "version": "BETA",
      "strategyType": "Single-Sided Strategy"
    }
  ]
}

Get Permissionless Vault Data List

get

Retrieve a list of permissionless vaults.

Responses
200

Successfully retrieved permissionless vaults

application/json
get
/vaults/type/permissionless
GET /vaults/type/permissionless HTTP/1.1
Host: vault-api.teahouse.finance
Accept: */*
200

Successfully retrieved permissionless vaults

{
  "vaults": [
    {
      "address": "0x1546B2aE60a2aDe3F8F1a9276c198e8f52212c05",
      "network": "polygon",
      "latestInfo": {
        "token0": {
          "tvl": "5761075844",
          "feeApr": 256335,
          "feeApr7dAvg": 153328,
          "feeEarned": "248970472",
          "shareTokenApr": 53374,
          "shareTokenApr7dAvg": 30874,
          "shareTokenPrice": "1032960252515792791345060"
        },
        "token1": {
          "tvl": "5326614841495103842522",
          "feeApr": 256403,
          "feeApr7dAvg": 153328,
          "feeEarned": "235488495329576537274",
          "shareTokenApr": 66566,
          "shareTokenApr7dAvg": 30874,
          "shareTokenPrice": "949951474506158601911781681458459228"
        },
        "outsideEmissionApr": 7336,
        "outsideEmissionApr7dAvg": 7336
      }
    }
  ]
}

Get Vault Info & Performance

get

Retrieve vault performance data between start and end timestamps.

Path parameters
chainIDintegerRequired

Blockchain ID, e.g., 137 (Polygon network)

contractAddressstringRequired

Vault contract address

startintegerRequired

Start timestamp (Unix time)

endintegerRequired

End timestamp (Unix time)

Responses
200

Successfully retrieved vault performance data

application/json
get
/vaults/permissionless/performance/{chainID}/{contractAddress}/{start}/{end}
GET /vaults/permissionless/performance/{chainID}/{contractAddress}/{start}/{end} HTTP/1.1
Host: vault-api.teahouse.finance
Accept: */*
200

Successfully retrieved vault performance data

{
  "vault": {
    "address": "0x1546B2aE60a2aDe3F8F1a9276c198e8f52212c05",
    "network": "polygon",
    "latestInfo": {
      "token0": {
        "tvl": "8589857324",
        "feeApr": 57523,
        "feeApr7dAvg": 153328,
        "shareTokenApr": 7307,
        "shareTokenApr7dAvg": 30874,
        "feeEarned": "0"
      },
      "token1": {
        "tvl": "8589996594",
        "feeApr": 57522,
        "feeApr7dAvg": 15332,
        "shareTokenApr": 25508,
        "shareTokenApr7dAvg": 30874,
        "feeEarned": "0"
      },
      "outsideEmissionApr": 7336,
      "outsideEmissionApr7dAvg": 7336
    }
  },
  "performance": {
    "token0": {
      "tvl": [
        {
          "timestamp": 1700611200,
          "value": "100004524"
        },
        {
          "timestamp": 1700697600,
          "value": "100008528"
        }
      ],
      "feeApr": [
        {
          "timestamp": 1700611200,
          "value": 39758
        },
        {
          "timestamp": 1700697600,
          "value": 57523
        }
      ],
      "feeEarned": [
        {
          "timestamp": 1700611200,
          "value": "9800000"
        },
        {
          "timestamp": 1700697600,
          "value": "7600000"
        }
      ],
      "shareTokenPrice": [
        {
          "timestamp": 1700611200,
          "value": "1000045241250000000000000"
        },
        {
          "timestamp": 1700697600,
          "value": "1000085282083333333333333"
        }
      ]
    },
    "token1": {
      "tvl": [
        {
          "timestamp": 1700611200,
          "value": "99977035"
        },
        {
          "timestamp": 1700697600,
          "value": "99991009"
        }
      ],
      "feeApr": [
        {
          "timestamp": 1700611200,
          "value": 39761
        },
        {
          "timestamp": 1700697600,
          "value": 57522
        }
      ],
      "feeEarned": [
        {
          "timestamp": 1700611200,
          "value": "9000000"
        },
        {
          "timestamp": 1700697600,
          "value": "5000000"
        }
      ],
      "shareTokenPrice": [
        {
          "timestamp": 1700611200,
          "value": "999770354375000000000000"
        },
        {
          "timestamp": 1700697600,
          "value": "999910096666666666666666"
        }
      ]
    }
  }
}

Get Account Share Transactions in Permissionless Vault

get

Retrieve share transaction logs for a given account within a time range.

There are four types of actions:

  • deposit

  • transfer_from

  • transfer_to

  • withdraw

Path parameters
addressstringRequired

Account wallet address

startTimestampintegerRequired

Start timestamp (Unix time)

endTimestampintegerRequired

End timestamp (Unix time)

Responses
200

Successfully retrieved share transaction

application/json
get
/vaults/permissionless/log/{address}/{startTimestamp}/{endTimestamp}
GET /vaults/permissionless/log/{address}/{startTimestamp}/{endTimestamp} HTTP/1.1
Host: vault-api.teahouse.finance
Accept: */*
200

Successfully retrieved share transaction

{
  "shareLogs": [
    {
      "chain": "arbitrum",
      "address": "0xB38je48B8Bc33CD65551BdaC8d954801D56625eeC",
      "logs": [
        {
          "action": "deposit",
          "amount": "61879765043050482000000000000",
          "blockNumber": 93279957,
          "timestamp": 1684761928,
          "transactionID": "0x690b8de6d339fefaa225120479ecd1be9763bc62c369f4d256cd53e61608eab8"
        },
        {
          "action": "transfer_from",
          "amount": "7000000000000000000000000000",
          "blockNumber": 100361489,
          "timestamp": 1686563899,
          "transactionID": "0xa43fe9d23dc1e8324cfe1f651fa48bf4bbef730d4a385c260ff443a049f6ac11"
        },
        {
          "action": "transfer_to",
          "amount": "2645652627219782324706064219",
          "blockNumber": 103153041,
          "timestamp": 1687280992,
          "transactionID": "0xd168f5dc70b6f6cd454c7f4abe5982683dc3e6589a9d29afa492287a25095302"
        },
        {
          "action": "withdraw",
          "amount": "48787907814269175862406707473",
          "blockNumber": 112739738,
          "timestamp": 1689755396,
          "transactionID": "0xdefc9d228bc0524681f33a1c370276bae731bec1e1e4b8c2e35a9d66e37861a8"
        }
      ]
    },
    {
      "chain": "arbitrum",
      "address": "0x99c2901d2883F8D295A989544f118e31eC21823e",
      "logs": [
        {
          "action": "deposit",
          "amount": "20996876202286889",
          "blockNumber": 112755686,
          "timestamp": 1689759386,
          "transactionID": "0x092001d70082e81765d37580d14a2ae5f91da449696cf9ff32a662e5077a0252"
        }
      ]
    }
  ]
}

Get Share Transaction in Permissionless Vault

get

Retrieve share transaction logs for a given permissionless vault within a time range.

Path parameters
chainIDintegerRequired

Blockchain ID, e.g., 137 for Polygon

contractAddressstringRequired

Vault contract address

startTimestampintegerRequired

Start timestamp (Unix time)

endTimestampintegerRequired

End timestamp (Unix time)

Responses
200

Successfully retrieved share transaction logs

application/json
get
/vaults/permissionless/log/shares/{chainID}/{contractAddress}/{startTimestamp}/{endTimestamp}
GET /vaults/permissionless/log/shares/{chainID}/{contractAddress}/{startTimestamp}/{endTimestamp} HTTP/1.1
Host: vault-api.teahouse.finance
Accept: */*
200

Successfully retrieved share transaction logs

{
  "vault": {
    "chain": "arbitrum",
    "address": "0x433821D0653548482Fa22479721db15fbcf303a3"
  },
  "logs": [
    {
      "fromAddress": "0x0000000000000000000000000000000000000000",
      "toAddress": "0xb5cdc9109970ee95586266df7ca69075bfc38eed",
      "amount": "41000000000000000",
      "blockNumber": 126314728,
      "timestamp": 1693380885,
      "transactionID": "0x3d4f62385bc2c7cc19663d9a57df5e69c7a2b273c4c53f9cccc03a0eb95a121a"
    },
    {
      "fromAddress": "0x74f03bd9a803424974d6526ed7200777c45d5b74",
      "toAddress": "0xcb9e65e48ca766781bee7f0ed017e3b8aa585527",
      "amount": "6187691493070",
      "blockNumber": 152518017,
      "timestamp": 1700548009,
      "transactionID": "0xcac53e79435b1d2d57e527dad5231ad25d48e4e59f78d50da1db7e0849c1bfca"
    },
    {
      "fromAddress": "0xb5cdc9109970ee95586266df7ca69075bfc38eed",
      "toAddress": "0x0000000000000000000000000000000000000000",
      "amount": "1247500000000000000",
      "blockNumber": 169261958,
      "timestamp": 1704950187,
      "transactionID": "0xaca1e0a01ddeec52562726b22c11bd93bdfe7660765bd60b963bd05875efbd4d"
    }
  ]
}

Last updated

Was this helpful?