GET: /otoken

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:

{
  "addresses": [] // returns all tokens if empty or not included
}

OTokenResponse

The oToken API returns an overall picture of oTokens matching the filter.

{
    "status": true,
    "data": {
        "xcnRate": "755208333333333520000",
        "dailyXcn": "4350000000000001075200000",
        "markets": [
            {
                "address": "0x714bd93ab6ab2f0bcfd2aeaf46a46719991d0d79",
                "symbol": "oETH",
                "name": "Onyx ETH",
                "underlyingAddress": null,
                "underlyingName": "ETH",
                "underlyingSymbol": "ETH",
                "xcnSpeeds": "0",
                "borrowerDailyXcn": "250000000000000128000000",
                "supplierDailyXcn": "250000000000000128000000",
                "xcnBorrowIndex": "101563446326140875638831300206417315703149",
                "xcnSupplyIndex": "12532288825800014126933188668761818197120128330832",
                "borrowRatePerBlock": "59881606925",
                "supplyRatePerBlock": "22546375746",
                "exchangeRate": "214836930735054681502184596",
                "underlyingPrice": "1659515600000000000000",
                "totalBorrows": "387561505267644545154",
                "totalBorrows2": "387.561505267644545154",
                "totalBorrowsUsd": "643164.363951138297937967",
                "totalSupply": "3832080662993",
                "totalSupply2": "38320.80662993",
                "totalSupplyUsd": "1366233.470450710467814039",
                "cash": "450403105212363562806",
                "totalReserves": "14662467902350476667",
                "reserveFactor": "200000000000000000",
                "collateralFactor": "800000000000000000",
                "borrowApy": "13.374750871510309211",
                "supplyApy": "4.840353471504475547",
                "borrowXcnApy": "12.756653694026939461",
                "supplyXcnApy": "5.815295060669746236",
                "liquidity": "747450.979388358645348136",
                "tokenPrice": "1659.5156",
                "totalDistributed": "21716087",
                "totalDistributed2": "21716087557387345448583890",
                "lastCalculatedBlockNumber": 18938839,
                "borrowerCount": 7,
                "supplierCount": 33,
                "mintGuardianPaused": false,
                "xcnSupplySpeeds": "43402777777777800000",
                "xcnBorrowSpeeds": "43402777777777800000",
                "underlyingDecimal": 18,
                "exchangeRate2": "46.54693197200993211181",
                "supplyCap": "0",
                "borrowCap": "0",
                "marketVolumeLog": {
                    "id": "ddfd509d-f789-4de9-b5a2-8ebe13309491",
                    "address": "0x714bd93ab6ab2f0bcfd2aeaf46a46719991d0d79",
                    "totalSupplyUsd": "1366229.250964562897913568",
                    "totalBorrowsUsd": "643159.089593453835562377",
                    "totalSupplyUsd24h": "16039.065784827014266023",
                    "totalBorrowsUsd24h": "7376.878055510907736948",
                    "blockNumber": 17948973,
                    "createdAt": "2023-08-19T13:00:00.000Z",
                    "updatedAt": "2023-08-19T13:00:00.000Z"
                }
            }
        ],
        "reserves": "69407.420914498200482794",
        "request": {
            "addresses": [
                "0x714bd93ab6ab2f0bcfd2aeaf46a46719991d0d79"
            ]
        },
        "marketVolumeLog": {
            "id": "1263a79f-fc22-423b-9ba4-bbc65d48f6ed",
            "address": null,
            "totalSupplyUsd": "10218660.24659954546743954",
            "totalBorrowsUsd": "6591584.210050754293459327",
            "totalSupplyUsd24h": "39847.341215374385430699",
            "totalBorrowsUsd24h": "8028.947397970366342879",
            "blockNumber": 17948973,
            "createdAt": "2023-08-19T13:00:00.000Z",
            "updatedAt": "2023-08-19T13:00:00.000Z"
        },
        "borrowerCount": 90,
        "supplierCount": 216,
        "offset": 0,
        "limit": 100,
        "total": 1
    }
}

OTokenResponseData

Market

This includes a list of oTokens contextualized to the full market.

MarketVolumeData

Last updated