GET: /otoken
Last updated
Last updated
The oToken service retrieves information about an oToken. You can use this API to find out the values of interest rates.
OTokenRequest
The request to the oToken API can specify a number filters, such as which tokens to retrieve information about or moment in time. The following shows an example set of request parameters in JSON:
Type | Key | Description |
---|---|---|
OTokenResponse
The oToken API returns an overall picture of oTokens matching the filter.
OTokenResponseData
Market
This includes a list of oTokens contextualized to the full market.
MarketVolumeData
Type | Key | Description |
---|---|---|
Type | Key | Description |
---|---|---|
Type | Key | Description |
---|---|---|
Type | Key | Description |
---|---|---|
repeated string
addresses
List of token addresses to filter on, e.g.: ["0x...", ,"0x..."]
bool
status
If set false, indicates an error returning data
Struct
data
The result matching the requested filter. See OTokenResponseData
string
xcnRate
XCN speed per block
string
dailyXcn
Daily xcn distribution amount
uint32
borrowerCount
Borrower count
uint32
supplierCount
Supplier count
string
reserves
Total reserves in treasury in USD
Struct
request
The request parameters are echoed in the response. See OTokenRequest
Struct
marketVolumeLog
Market volume data. See MarketVolumeData
repeated Market
markets
The list of Market (see Market) matching the requested filter
bytes
address
The public Ethereum address of the oToken
string
symbol
The symbol of the oToken
string
name
The name of the oToken
bytes
underlyingAddress
The address of the underlying token
string
underlyingName
The name of the underlying token
string
underlyingSymbol
The symbol of the underlying token
string
xcnSpeeds
XCN speed per block
string
borrowerDailyXcn
Borrower daily XCN
string
supplierDailyXcn
Supplier daily XCN
string
xcnBorrowIndex
XCN borrow index
string
xcnSupplyIndex
XCN supply index
string
borrowRatePerBlock
The floating borrow interest rate
string
supplyRatePerBlock
The floating supply interest rate
string
exchangeRate
The oToken / underlying exchange rate. This rate increases over time as supply interest accrues.
string
underlyingPrice
The price of the underlying token in ETH
string
totalBorrows
The amount of underlying tokens borrowed from the oToken
string
totalBorrows2
The amount of underlying tokens borrowed from the oToken handled by decimals
string
totalBorrowsUsd
The USD amount of underlying tokens borrowed from the oToken
string
totalSupply
The number of oTokens in existence
string
totalSupply2
The number of oTokens in existence handled by decimals
string
totalSupplyUsd
The USD amount of oTokens in existence
string
cash
The current liquidity of the oToken
string
totalReserves
Total reserves
string
reserveFactor
Reserve factor
string
collateralFactor
The amount of the value of the underlying token that will count as collateral. eg. oEth with collataral factor 0.75 means 1 ETH of supply allows 0.75 ETH of borrowing
string
borrowApy
Borrow APY
string
supplyApy
Supply APY
string
borrowXcnApy
The floating XCN APY for borrowing this token
string
supplyXcnApy
The floating XCN APY for supplying this token
string
liquidity
Liquidity amount
string
tokenPrice
oToken price
string
totalDistributed
Total distributed XCN amount
string
totalDistributed2
Total distributed XCN amount handled by decimals
uint32
lastCalculatedBlockNumber
Last block number to update market data
uint32
borrowerCount
The number of accounts with outstanding borrows
uint32
supplierCount
The number of accounts holding this oToken
bool
mintGuardianPaused
Is mint guardian paused
string
xcnSupplySpeeds
XCN supply speeds
string
xcnBorrowSpeeds
XCN borrow speeds
uint32
underlyingDecimal
Decimal places for underlying token
string
exchangeRate2
Exchange rate handled by decimals
string
supplyCap
Maximum possible supply
string
borrowCap
Maximum possible borrow
MarketVolumeData
marketVolumeLog
Market volume data
string
id
Unique id of MarketVolumeData
string
address
The public Ethereum address of the oToken
string
totalSupplyUsd
Total supply USD
string
totalBorrowsUsd
Total borrows USD
string
totalSupplyUsd24h
24hr change of total supply USD
string
totalBorrowsUsd24h
24hr change of total borrow USD
uint32
blockNumber
Last calculated block number
Timestamp
createdAt
Created timestamp
Timestamp
updatedAt
Updated timestamp