API
Here are the articles in this section:
Attribute | Type | Description |
---|---|---|
key | string | Pool's key |
name | string | Pool's name (e.g. ETH/USDT) |
tokens | string[] | Pool's token addresses in lowercase |
lpTokenAddress | string | Pool's LP token address in lowercase |
poolAddress | string | [optional] Only use with Curve pool since pool address is holding the tokens not LP address |
wTokenAddress | string | Wrapper contract address |
exchange | IExchange | |
type | PoolType | |
wTokenType | WTokenType | |
pid | number | [optional] Only use with pools that need to be staked on a Masterchef-like contract and pools which wTokenType === WTokenType.WLiquidityGauge |
gid | number | [optional] Only use with Curve pool |
rewardSymbol | string | [optional] Pool's reward symbol, usually we use reward symbol from exchange.reward.tokenName |
rewardAddress | string | [optional] Pool's reward address, usually we use reward address from exchange.reward.rewardTokenAddress |
isFarmingDisabled | boolean | [optional] A pool that's been hidden on the Farm Pool page (deprecated soon) |
status | 'delisting' | 'delisted' | [optional] delisting = A pool that's going to be delisted soon. delisted = A pool that's been delisted. For both of the statuses, we'd recommend users to close their position. |
stakingAddress | string | [optional] Masterchef address of that pool. |
spellAddress | string | [optional] Pool's spell address, usually we use spellAddress from exchange.spellAddress |
migrateTo | string | [optinal] Pool that need to be migrate to a new pool |
uniswapV3Info | UniswapV3Pool |
Attribute | Type | Description |
---|---|---|
name | Exchange | Exchange Enum |
logo | string | Logo source for Homora's frontend |
spellAddress? | string | [optional] Exchange's spell address |
stakingAddress? | string | [optional] Exchange's staking address |
reward | IExchangeReward | Exchange's liquidity mining reward |
Attribute | Type | Description |
---|---|---|
tokenName | string | Exchange's liquidity mining reward name |
rewardTokenAddress | string | Exchange's liquidity mining reward address |
Attribute | Type | Description |
---|---|---|
address | string | Asset address |
safeboxAddress | string | |
cyTokenAddress | string | Iron Bank lending address |
Attribute | Type | Description |
---|---|---|
totalAPY | string | Total APY |
tradingFeeAPY | string | Trading Fee APY |
farminigAPY | string | Yield Farming APY |
Attribute | Type | Description |
---|---|---|
name | string | Token's name |
logo | string | Logo source for Homora frontend |
decimals | number | Token's decimals |
Attribute | Type | Description |
priceRatioBps | [number, number, number] | Recommended price range BPS, sorted from safe to risky range |
poolFeeBps | number | Pool’s Fee BPS |
tickSpacing | number | Pool’s tick spacing (1 / 10 / 60 / 200) |
Attribute | Type | Description |
lastUpdatedTimestamp | number | Last update timestamp in ms |
lastUpdatedTick | number | Latest pool’s tick |
priceRanges | [PriceRange, PriceRange, PriceRange] | Recommended price range, sorted from safe to risky range |
Attribute | Type | Description |
apr | number | Price range APR |
lower | TickInfo | Lower tick info |
upper | TickInfo | Upper tick info |
Attribute | Type | Description |
tick | number | Tick number |
price0 | string | Price of token0 / token1 |
price1 | string | Price of token1 / token0 |
Attribute | Type | Description |
positionId | string | Uniswap V3 position ID (not Homora position ID) |
tickLower | number | Position’s tick lower |
tickUpper | number | Position’s tick upper |
liquidity | string | Position’s liquidity size (Each position has a different LP price due to the diverse price range of each position.) |
apr | number | Position’s APR |
enum PoolType {
LiquidityProviding = 'Liquidity Providing',
YieldFarming = 'Yield Farming',
}
enum Exchange {
UniswapV2 = 'Uniswap V2',
UniswapV3 = 'Uniswap V3',
Sushiswap = 'Sushiswap',
Curve = 'Curve',
TraderJoe = 'Trader Joe',
TraderJoeMasterChefV3 = 'Trader Joe MasterChef V3',
TraderJoeBoostedMasterChef = 'Trader Joe Boosted MasterChef',
Pangolin = 'Pangolin',
PangolinV2 = 'Pangolin V2',
SpookySwap = 'SpookySwap',
SpookySwapV2 = 'SpookySwap V2',
SpiritSwap = 'SpiritSwap',
Beethovenx = 'Beethovenx',
}
enum WTokenType {
WERC20 = 'WERC20',
WStakingRewards = 'WStakingRewards',
WMasterChef = 'WMasterChef',
WMasterChefJoeV3 = 'WMasterChefJoeV3',
WBoostedMasterChefJoe = 'WBoostedMasterChefJoe',
WLiquidityGauge = 'WLiquidityGauge',
WMiniChef = 'WMiniChef',
WMiniChefV2 = 'WMiniChefV2',
WMasterChefBeets = 'WMasterChefBeets',
WMasterChefBoolV2 = 'WMasterChefBoolV2',
WUniswapV3 = 'WUniswapV3',
}
To get all of the farming pools of each chain.
- Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/pools
To get all of the lending pools of each chain
- Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/safeboxes
To get all of the farming pool's APYs of each chain
- Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/apys
To get all of the token details with the name and decimals of each chain
- Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/tokens
To get all of the positions sorted by highest to lowest debt ratio of each chain. Only use with liquidation page only.
- Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/positions
To get all of the Uniswap V3 pool’s price ranges and APRs
Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/uniswapv3/price-range
Example: https://api.homora.alphaventuredao.io/v2/10/uniswapv3/price-rangeTo get user’s Uniswap V3 position info
Endpoint:
https://api.homora.alphaventuredao.io/v2/[chainId]/uniswapv3/positions
Example: https://api.homora.alphaventuredao.io/v2/10/uniswapv3/positionspositions {
id
owner
collateralSize
collateralToken {
token
tokenId
}
}
id
: Position IDowner
: Position owner addresscollateralSize
: The size of the collateral (if 0 then the position is closed because there's no collateral left)collateralToken - token
: Wrap token contract address. It's an ERC-1155 contract that keep user positions.collateralToken - tokenId
: Token ID that determine the position info like LP address or PID.