Search…
API
Here are the articles in this section:

API

Data Types

Pool

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
IExchange
type
PoolType
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

IExchange

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

IExchangeReward

Attribute
Type
Description
tokenName
string
Exchange's liquidity mining reward name
rewardTokenAddress
string
Exchange's liquidity mining reward address

Safebox

Attribute
Type
Description
address
string
Asset address
safeboxAddress
string
Homora safebox address
cyTokenAddress
string
Iron Bank lending address

PoolAPY

Attribute
Type
Description
totalAPY
string
Total APY
tradingFeeAPY
string
Trading Fee APY
farminigAPY
string
Yield Farming APY

TokenDetails

Attribute
Type
Description
name
string
Token's name
logo
string
Logo source for Homora frontend
decimals
number
Token's decimals

Enum

PoolType

enum PoolType {
LiquidityProviding = 'Liquidity Providing',
YieldFarming = 'Yield Farming',
}

Exchange

enum Exchange {
UniswapV2 = 'Uniswap V2',
Sushiswap = 'Sushiswap',
Curve = 'Curve',
TraderJoe = 'Trader Joe',
TraderJoeMasterChefV3 = 'Trader Joe MasterChef V3',
TraderJoeBoostedMasterChef = 'Trader Joe Boosted MasterChef',
Pangolin = 'Pangolin',
PangolinV2 = 'Pangolin V2',
SpookySwap = 'SpookySwap',
SpiritSwap = 'SpiritSwap',
}

WTokenType

enum WTokenType {
WERC20 = 'WERC20',
WStakingRewards = 'WStakingRewards',
WMasterChef = 'WMasterChef',
WMasterChefJoeV3 = 'WMasterChefJoeV3',
WBoostedMasterChefJoe = 'WBoostedMasterChefJoe',
WLiquidityGauge = 'WLiquidityGauge',
WMiniChef = 'WMiniChef',
WMiniChefV2 = 'WMiniChefV2',
}

API Endpoint

Farm Pools

To get all of the farming pools of each chain.

Lend Pools

To get all of the lending pools of each chain

APYs

To get all of the farming pool's APYs of each chain

Token Details

To get all of the token details with the name and decimals of each chain

All Positions

To get all of the positions sorted by highest to lowest debt ratio of each chain. Only use with liquidation page only.

Subgraph

Endpoint

Query

positions {
id
owner
collateralSize
collateralToken {
token
tokenId
}
}

Data

  • id : Position ID
  • owner : Position owner address
  • collateralSize : 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.
Copy link
On this page
Page Navigation
API
Data Types
Enum
API Endpoint
Subgraph