Querying SILO
You can build your own queries using a GraphQL Explorer and enter your endpoint to limit the data to exactly what you need.
Each entity has a plural version and a singular version. When querying for a single record response (e.g. account), you will need to supply the id for the entity. When querying for a list of responses (e.g. accounts), you may add filters using the 'where' clause.
Below are some sample queries you can use to gather information from the SILO contracts.
Main Market
fragment rates on Market {
rates {
side
rate
token {
id
}
}
}
query Markets {
lendingProtocols(block: { number: 18642057 }) {
totalValueLockedUSD
}
markets(
first: 5
orderBy: totalValueLockedUSD
orderDirection: desc
where: { inputToken_: { activeOracle_not: "null" } }
block: { number: 18642057 }
) {
id
name
isActive
archived
marketAssets {
asset {
id
symbol
name
decimals
lastPriceUSD
}
balance
}
inputToken {
id
}
outputToken {
id
}
...rates
}
}
{
"data": {
"lendingProtocols": [
{
"totalValueLockedUSD": "31654756.19623516090541036987741325"
}
],
"markets": [
{
"id": "0xfccc27aabd0ab7a0b2ad2b7760037b1eab61616b",
"name": "USDC",
"isActive": true,
"archived": false,
"marketAssets": [
{
"asset": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"lastPriceUSD": "1"
},
"balance": "364078400145"
},
{
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"lastPriceUSD": "2100.250075022509051901332528399629"
},
"balance": "744793426127992093125"
},
{
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"name": "XAI Stablecoin",
"decimals": 18,
"lastPriceUSD": "1"
},
"balance": "3664902613587539313319456"
}
],
"inputToken": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"outputToken": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"rates": [
{
"side": "BORROWER",
"rate": "3.434378284656",
"token": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
},
{
"side": "BORROWER",
"rate": "0.0007085319264",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "BORROWER",
"rate": "1.344572112672",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
{
"side": "LENDER",
"rate": "2.3590011102390599",
"token": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
},
{
"side": "LENDER",
"rate": "0.0000000611154161",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "LENDER",
"rate": "0.3615863356405243",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
}
]
},
{
"id": "0x4f5717f1efdec78a960f08871903b394e7ea95ed",
"name": "wstETH",
"isActive": true,
"archived": false,
"marketAssets": [
{
"asset": {
"id": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"symbol": "wstETH",
"name": "Wrapped liquid staked Ether 2.0",
"decimals": 18,
"lastPriceUSD": "2408.294929866506817127363832612126"
},
"balance": "601658380485446574568"
},
{
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"lastPriceUSD": "2100.250075022509051901332528399629"
},
"balance": "623319763908688439623"
},
{
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"name": "XAI Stablecoin",
"decimals": 18,
"lastPriceUSD": "1"
},
"balance": "771217449793349753242731"
}
],
"inputToken": {
"id": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"
},
"outputToken": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"rates": [
{
"side": "BORROWER",
"rate": "0.137159083296",
"token": {
"id": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"
}
},
{
"side": "BORROWER",
"rate": "0.0535833789408",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "BORROWER",
"rate": "2.436831753408",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
{
"side": "LENDER",
"rate": "0.001343759355935",
"token": {
"id": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"
}
},
{
"side": "LENDER",
"rate": "0.0003495347911237",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "LENDER",
"rate": "1.187656316557936",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
}
]
},
{
"id": "0x2eaf84b425822edf450fc5fdeec085f2e5ada98b",
"name": "cbETH",
"isActive": true,
"archived": false,
"marketAssets": [
{
"asset": {
"id": "0xbe9895146f7af43049ca1c1ae358b0541ea49704",
"symbol": "cbETH",
"name": "Coinbase Wrapped Staked ETH",
"decimals": 18,
"lastPriceUSD": "2214.509986723636758691980260177686"
},
"balance": "1045283373304657555837"
},
{
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"lastPriceUSD": "2100.250075022509051901332528399629"
},
"balance": "250155143931829327052"
},
{
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"name": "XAI Stablecoin",
"decimals": 18,
"lastPriceUSD": "1"
},
"balance": "936713155752097208926071"
}
],
"inputToken": {
"id": "0xbe9895146f7af43049ca1c1ae358b0541ea49704"
},
"outputToken": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"rates": [
{
"side": "BORROWER",
"rate": "0.000035225712",
"token": {
"id": "0xbe9895146f7af43049ca1c1ae358b0541ea49704"
}
},
{
"side": "BORROWER",
"rate": "0.0234909361872",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "BORROWER",
"rate": "0.322337229624",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
{
"side": "LENDER",
"rate": "0.0000000006204765",
"token": {
"id": "0xbe9895146f7af43049ca1c1ae358b0541ea49704"
}
},
{
"side": "LENDER",
"rate": "0.0000671786091185",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "LENDER",
"rate": "0.0207803524198505",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
}
]
},
{
"id": "0xb1590d554dc7d66f710369983b46a5905ad34c8c",
"name": "rETH",
"isActive": true,
"archived": false,
"marketAssets": [
{
"asset": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393",
"symbol": "rETH",
"name": "Rocket Pool ETH",
"decimals": 18,
"lastPriceUSD": "2292.625183628069381072962910193171"
},
"balance": "15101222667947455404"
},
{
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"lastPriceUSD": "2100.250075022509051901332528399629"
},
"balance": "180269965101087073548"
},
{
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"name": "XAI Stablecoin",
"decimals": 18,
"lastPriceUSD": "1"
},
"balance": "1550356627288000922924929"
}
],
"inputToken": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393"
},
"outputToken": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"rates": [
{
"side": "BORROWER",
"rate": "1.426541382648",
"token": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393"
}
},
{
"side": "BORROWER",
"rate": "1.5563409821568",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "BORROWER",
"rate": "0.1280269262592",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
{
"side": "LENDER",
"rate": "0.1453600202675915",
"token": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393"
}
},
{
"side": "LENDER",
"rate": "0.2948868793977595",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "LENDER",
"rate": "0.003278181697007",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
}
]
},
{
"id": "0xbc6594df90ddeada7cdd70dbc08e221a77512deb",
"name": "LUSD",
"isActive": true,
"archived": false,
"marketAssets": [
{
"asset": {
"id": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0",
"symbol": "LUSD",
"name": "LUSD Stablecoin",
"decimals": 18,
"lastPriceUSD": "0.9924404904383092540606718941941649"
},
"balance": "0"
},
{
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"lastPriceUSD": "2100.250075022509051901332528399629"
},
"balance": "1000000000000000"
},
{
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"name": "XAI Stablecoin",
"decimals": 18,
"lastPriceUSD": "1"
},
"balance": "1389926560519749010983303"
}
],
"inputToken": {
"id": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0"
},
"outputToken": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"rates": [
{
"side": "BORROWER",
"rate": "0",
"token": {
"id": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0"
}
},
{
"side": "BORROWER",
"rate": "0",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "BORROWER",
"rate": "0.3671964895248",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
{
"side": "LENDER",
"rate": "0",
"token": {
"id": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0"
}
},
{
"side": "LENDER",
"rate": "0",
"token": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
{
"side": "LENDER",
"rate": "0.0269706815118324",
"token": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
}
]
}
]
}
Basic Market
query BasicMarkets {
silos(first: 5) {
id
archived
baseAsset {
id
}
bridgeAsset {
id
}
market {
inputToken {
id
name
symbol
decimals
}
sToken {
id
}
spToken {
id
}
dToken {
id
}
}
}
}
{
"data": {
"silos": [
{
"id": "0x00c64ae39df498b8e77355d2085b8f968f0e3954",
"archived": false,
"baseAsset": {
"id": "0xf4d2888d29d722226fafa5d9b24f9164c092421e"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"market": [
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"sToken": {
"id": "0xb212bc5279369c2b04c4f33ea25ca602de07abfd"
},
"spToken": {
"id": "0x3f382b6f8deb8dd8a496307eceb4de83d67352da"
},
"dToken": {
"id": "0x4ded151c215758cea2661f9dcf3ec45605570466"
}
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"name": "XAI Stablecoin",
"symbol": "XAI",
"decimals": 18
},
"sToken": {
"id": "0xbae6f752ddc8e349eadae72559db483625be22f7"
},
"spToken": {
"id": "0x248f6ab12802598f367e57d0f83fa612a19fe492"
},
"dToken": {
"id": "0x2c9c886ad590c05888848209d75ec66cd6139801"
}
},
{
"inputToken": {
"id": "0xf4d2888d29d722226fafa5d9b24f9164c092421e",
"name": "LooksRare Token",
"symbol": "LOOKS",
"decimals": 18
},
"sToken": {
"id": "0x7fff1d70d5a48ac888ef453b01e50ae53384113d"
},
"spToken": {
"id": "0xb74bb1d717476e0392739b178395ef3435747ee1"
},
"dToken": {
"id": "0x62373f9cacdefb22bcac230e529a1ae25ec05a00"
}
}
]
},
{
"id": "0x03ff864f65a69e6c025f68f5695fa243f8d2d61b",
"archived": false,
"baseAsset": {
"id": "0x041dfd7e8497b3b47b2260fc0ced9443c67c9ed2"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"market": [
{
"inputToken": {
"id": "0x041dfd7e8497b3b47b2260fc0ced9443c67c9ed2",
"name": "Staked Curve.fi ETH/stETH Convex Deposit Silo",
"symbol": "stkcvxsteCRV-silo",
"decimals": 18
},
"sToken": {
"id": "0x1d6f0e3e549396a23a4101e64bfe2fd79ed1dce8"
},
"spToken": {
"id": "0xb99f4530fd0ffe3e259d682acd20ed8e2657e605"
},
"dToken": {
"id": "0xa41a28aa25d5de522d7d67bb4a3f443e732bbb0b"
}
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"sToken": {
"id": "0xf98b72b02969001b0093349ec39ce4f2d5c5592c"
},
"spToken": {
"id": "0x0bd0de6570af90ed61c855350018c09f91de8b7c"
},
"dToken": {
"id": "0x5a86245d6c5ad9f349ae3f853b836b60acb0122b"
}
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"name": "XAI Stablecoin",
"symbol": "XAI",
"decimals": 18
},
"sToken": {
"id": "0xccbb566fd1a30523e63099d0b0cd317a3b085059"
},
"spToken": {
"id": "0xfb26d5bf228617412e7a5df6ca579ebb916be683"
},
"dToken": {
"id": "0xb611f1336ad67bcecdb3b6fa4ff0b14853a6d851"
}
}
]
},
{
"id": "0x0a898eba24e6d1213f1e494d49e757640628aeec",
"archived": false,
"baseAsset": {
"id": "0xfcdeee2bfeae88e749e88a628e2c3401ec5eda3c"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"market": [
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"sToken": {
"id": "0x54cb4edecdc08f0470798eb6a979288132128535"
},
"spToken": {
"id": "0x2e3e4951a108e0e7467107653ed9e30898535f3d"
},
"dToken": {
"id": "0x57a4681f1b4a32ffa8bde55dc6feeb54941e10a4"
}
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"name": "XAI Stablecoin",
"symbol": "XAI",
"decimals": 18
},
"sToken": {
"id": "0x868eb1922b792b427a353524107d8d39d01b0b80"
},
"spToken": {
"id": "0x90c10c01f49009609c44eb78f3764b3d11d792e5"
},
"dToken": {
"id": "0x667615208bae460629ee36c7f4bbdbbf4af61854"
}
},
{
"inputToken": {
"id": "0xfcdeee2bfeae88e749e88a628e2c3401ec5eda3c",
"name": "Staked Curve.fi FRAX/USDC Convex Deposit Silo",
"symbol": "stkcvxcrvFRAX-silo",
"decimals": 18
},
"sToken": {
"id": "0x25a857a7db90d417d438f7de03b2c325c254576f"
},
"spToken": {
"id": "0x2860b3c313554966760a05ec438e5d86c82e8fad"
},
"dToken": {
"id": "0xab7b57450da82d0674625e641775318ec14cb934"
}
}
]
},
{
"id": "0x0bce613ef6a197e8c56be525cf173c27b49ac47d",
"archived": false,
"baseAsset": {
"id": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"market": [
{
"inputToken": {
"id": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"name": "Maker",
"symbol": "MKR",
"decimals": 18
},
"sToken": {
"id": "0xbc5983599e890443bf7cbc56bf2b6933dbc80f02"
},
"spToken": {
"id": "0xa08ffcedecbb0df7c4e4f3548a8da9e17ee0283b"
},
"dToken": {
"id": "0x8a0af25a58d506efb93c4fe1ce803754360ca538"
}
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"sToken": {
"id": "0x5693e813b39cf2768b0ce103c9d8088e9cb45fbf"
},
"spToken": {
"id": "0x02cf19e0bd0533c36dbb74ec6075584fc295b81a"
},
"dToken": {
"id": "0x1bcd41506c35d9174db5851a64594544ecdf37b0"
}
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"name": "XAI Stablecoin",
"symbol": "XAI",
"decimals": 18
},
"sToken": {
"id": "0xe8c5a2eca2cde8c7b03f260412d8bbb71b21e283"
},
"spToken": {
"id": "0xb914dc4e7ed2ed3e43154f8f6ae305ec039619d6"
},
"dToken": {
"id": "0x003d5ca37c7657f9cb511f8eb5bd4efe0ca23f7a"
}
}
]
},
{
"id": "0x0cb6c16798f2639a96e144b0524243f5fc1780b6",
"archived": false,
"baseAsset": {
"id": "0x5283d291dbcf85356a21ba090e6db59121208b44"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"market": [
{
"inputToken": {
"id": "0x5283d291dbcf85356a21ba090e6db59121208b44",
"name": "Blur",
"symbol": "BLUR",
"decimals": 18
},
"sToken": {
"id": "0xe485befd6aa753cffcbc1177a8f261eb8f2f6f82"
},
"spToken": {
"id": "0xc82a6ffab56eed8d78d3b8562176161770299a48"
},
"dToken": {
"id": "0x32fe7494dcf02ef7b0d0b1ea956bf13f273c9e92"
}
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"sToken": {
"id": "0x2247e52857ac7808992893e108a71d6a219db54d"
},
"spToken": {
"id": "0x142811e0b09bb95b4db8878890599527c2c2a0ad"
},
"dToken": {
"id": "0x4ec5c69dd214d8681ac802372a23b75cb5ee82d2"
}
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"name": "XAI Stablecoin",
"symbol": "XAI",
"decimals": 18
},
"sToken": {
"id": "0x9913638f9b12e77687aff57690ee7da3f8971cfc"
},
"spToken": {
"id": "0xe6ea54975d0c4195d7f3e44527f542af5819c453"
},
"dToken": {
"id": "0x607385fd3e2de43f434ba5e774170df23d97a74b"
}
}
]
}
]
}
}
Most at risk of liquidation - V3 ONLY
fragment positionFields on Position {
marketAsset: market {
inputToken {
id
}
}
snapshots(first: 1, orderBy: blockNumber, orderDirection: desc) {
blockNumber
hash
}
}
query QueryPositions {
siloPositions(
first: 5
skip: 0
where: { dTokenBalance_gt: 0, silo_: { id_not_in: [""] } }
orderBy: riskFactor
orderDirection: desc
block: { number_gte: 19112526 }
) {
id
account {
id
}
silo {
id
baseAsset {
id
}
bridgeAsset {
id
}
marketAssets: market {
inputToken {
id
symbol
decimals
lastPriceUSD
}
liquidationThreshold
}
}
totalCollateralValue
totalBorrowValue
riskFactor
riskScore
collateralPositions: positions(where: { sTokenBalance_gt: 0 }) {
sTokenBalance
sToken {
derivativeConversion
}
...positionFields
}
collateralOnlyPositions: positions(where: { spTokenBalance_gt: 0 }) {
spTokenBalance
...positionFields
}
debtPositions: positions(where: { dTokenBalance_gt: 0 }) {
dTokenBalance
dToken {
derivativeConversion
}
...positionFields
}
}
}
{
"data": {
"siloPositions": [
{
"id": "0x31f3b3b86a074e2ffc4fd75d8eb9721a75ee04dc-0xef1f82df5e1416fc8fc203420d8e3451e1c7d687",
"account": {
"id": "0xef1f82df5e1416fc8fc203420d8e3451e1c7d687"
},
"silo": {
"id": "0x31f3b3b86a074e2ffc4fd75d8eb9721a75ee04dc",
"baseAsset": {
"id": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"marketAssets": [
{
"inputToken": {
"id": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"symbol": "WBTC",
"decimals": 8,
"lastPriceUSD": "43081.13070585360735183995069250443"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18,
"lastPriceUSD": "2305.352727896261500078058211416915"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"decimals": 18,
"lastPriceUSD": "1"
},
"liquidationThreshold": "0.0000000010000001"
}
]
},
"totalCollateralValue": "26.40718071374015943438822681197585",
"totalBorrowValue": "21.7618512648009563519588448452707",
"riskFactor": "0.9695157630086599610452807568527247",
"riskScore": "21.09845783347447102492544605531852",
"collateralPositions": [
{
"sTokenBalance": "9999883999346598",
"sToken": {
"derivativeConversion": "1.145485752473693930683708730069486"
},
"marketAsset": {
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
"snapshots": [
{
"blockNumber": "15581184",
"hash": "0x45faa8dcf44468b534a6b0b5521e34e9cfb1259f869df52ba522bae6925d33ff"
}
]
}
],
"collateralOnlyPositions": [],
"debtPositions": [
{
"dTokenBalance": "49890",
"dToken": {
"derivativeConversion": "1.012500486400249036927506906883536"
},
"marketAsset": {
"inputToken": {
"id": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
}
},
"snapshots": [
{
"blockNumber": "16195567",
"hash": "0x38f676655f314a6621add9087df44b0249acec50e51b2b0a9df6bf4fddf4bb0c"
}
]
}
]
},
{
"id": "0xb1590d554dc7d66f710369983b46a5905ad34c8c-0xf2f6709f1917b3ecb2e97fadfec206cd56da76ed",
"account": {
"id": "0xf2f6709f1917b3ecb2e97fadfec206cd56da76ed"
},
"silo": {
"id": "0xb1590d554dc7d66f710369983b46a5905ad34c8c",
"baseAsset": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"marketAssets": [
{
"inputToken": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393",
"symbol": "rETH",
"decimals": 18,
"lastPriceUSD": "2528.003245037548002523965051889023"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18,
"lastPriceUSD": "2305.352727896261500078058211416915"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"decimals": 18,
"lastPriceUSD": "1"
},
"liquidationThreshold": "90"
}
]
},
"totalCollateralValue": "75.8276802636028734567222807490901",
"totalBorrowValue": "60.60850544289398489236958341940444",
"riskFactor": "0.9403442621821749272603240204475126",
"riskScore": "56.99286033266247743827058952848295",
"collateralPositions": [
{
"sTokenBalance": "32368899245681332",
"sToken": {
"derivativeConversion": "1.016160843305877923883982401708182"
},
"marketAsset": {
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
"snapshots": [
{
"blockNumber": "18523199",
"hash": "0x104b9788ab03783d9c3bab0761add4d95929ae73de4fab9990d60d067002054b"
}
]
}
],
"collateralOnlyPositions": [],
"debtPositions": [
{
"dTokenBalance": "23904840870537614",
"dToken": {
"derivativeConversion": "1.002928772333625496007291710727422"
},
"marketAsset": {
"inputToken": {
"id": "0xae78736cd615f374d3085123a210448e74fc6393"
}
},
"snapshots": [
{
"blockNumber": "18523172",
"hash": "0x7e86f0feae07b6aaf4492cf4ca01988e737d741a219e82e4e0452da1f7866c61"
}
]
}
]
},
{
"id": "0xcd7ae3373f7e76a817238261b8303fa17d2af585-0x128efd501c665b14ff2408f0fe8c727f13e5e49a",
"account": {
"id": "0x128efd501c665b14ff2408f0fe8c727f13e5e49a"
},
"silo": {
"id": "0xcd7ae3373f7e76a817238261b8303fa17d2af585",
"baseAsset": {
"id": "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"marketAssets": [
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18,
"lastPriceUSD": "2305.352727896261500078058211416915"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
"symbol": "weETH",
"decimals": 18,
"lastPriceUSD": "2371.291671510023435484500874531296"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"decimals": 18,
"lastPriceUSD": "1"
},
"liquidationThreshold": "0.0000000010000001"
}
]
},
"totalCollateralValue": "276.3996600955495876243550356049394",
"totalBorrowValue": "220.7462963468598670525100275578585",
"riskFactor": "0.9395869916199449564488059963322557",
"riskScore": "207.4103484957909078575171982770573",
"collateralPositions": [
{
"sTokenBalance": "116560529707562535",
"sToken": {
"derivativeConversion": "1.000002339998258700690484205200131"
},
"marketAsset": {
"inputToken": {
"id": "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee"
}
},
"snapshots": [
{
"blockNumber": "19095098",
"hash": "0x86bf07d6f985feb7aaa125ad4eb8840a49a3baf1dc23215617ea29e00c321ab4"
}
]
}
],
"collateralOnlyPositions": [],
"debtPositions": [
{
"dTokenBalance": "95720979924718579",
"dToken": {
"derivativeConversion": "1.000342928115019775577072674203063"
},
"marketAsset": {
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
"snapshots": [
{
"blockNumber": "19095103",
"hash": "0x704123344e39d2f9a71291ceae16f5f441567b157f72c93ff21b0f67c691f7df"
}
]
}
]
},
{
"id": "0xfccc27aabd0ab7a0b2ad2b7760037b1eab61616b-0x46c0a3baa03cb86ef3dc30dca6a2e9a5427e0488",
"account": {
"id": "0x46c0a3baa03cb86ef3dc30dca6a2e9a5427e0488"
},
"silo": {
"id": "0xfccc27aabd0ab7a0b2ad2b7760037b1eab61616b",
"baseAsset": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"marketAssets": [
{
"inputToken": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"decimals": 6,
"lastPriceUSD": "1"
},
"liquidationThreshold": "95"
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18,
"lastPriceUSD": "2305.352727896261500078058211416915"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"decimals": 18,
"lastPriceUSD": "1"
},
"liquidationThreshold": "0.0000000010000001"
}
]
},
"totalCollateralValue": "1.566198517392905748554136812741513",
"totalBorrowValue": "1.383886075078367030058811365786744",
"riskFactor": "0.9301006022645697940054184730355017",
"riskScore": "1.287153271895940825645103195103763",
"collateralPositions": [
{
"sTokenBalance": "1553879",
"sToken": {
"derivativeConversion": "1.007928234690671376956723665575964"
},
"marketAsset": {
"inputToken": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
},
"snapshots": [
{
"blockNumber": "17070774",
"hash": "0xdfef5f4fa8adaf7a9ea368f9a2277e8c68a3dd8dd5143d874db3fe25b6e6e1ef"
}
]
}
],
"collateralOnlyPositions": [],
"debtPositions": [
{
"dTokenBalance": "1353165622720189675",
"dToken": {
"derivativeConversion": "1.022702655050031368072024642431499"
},
"marketAsset": {
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
},
"snapshots": [
{
"blockNumber": "17070769",
"hash": "0xeb87fec36cbee9e2db74ee239af72ab7cf3af6abbd00606e987f35f5944d905e"
}
]
}
]
},
{
"id": "0xf5ffabab8f9a6f4f6de1f0dd6e0820f68657d7db-0xa896969811e0b3a5fd8e86de238e68122b603c61",
"account": {
"id": "0xa896969811e0b3a5fd8e86de238e68122b603c61"
},
"silo": {
"id": "0xf5ffabab8f9a6f4f6de1f0dd6e0820f68657d7db",
"baseAsset": {
"id": "0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5"
},
"bridgeAsset": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
{
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac"
}
],
"marketAssets": [
{
"inputToken": {
"id": "0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",
"symbol": "OHM",
"decimals": 9,
"lastPriceUSD": "13.52469934274851891265588117004675"
},
"liquidationThreshold": "85"
},
{
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18,
"lastPriceUSD": "2305.352727896261500078058211416915"
},
"liquidationThreshold": "90"
},
{
"inputToken": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI",
"decimals": 18,
"lastPriceUSD": "1"
},
"liquidationThreshold": "90"
}
]
},
"totalCollateralValue": "2.942820387334544315674251472843072",
"totalBorrowValue": "2.443595771605127424549345226178442",
"riskFactor": "0.9226204985462228904845042411876295",
"riskScore": "2.254511549043764869333039473897119",
"collateralPositions": [
{
"sTokenBalance": "1276516322957659",
"sToken": {
"derivativeConversion": "1"
},
"marketAsset": {
"inputToken": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
},
"snapshots": [
{
"blockNumber": "17698968",
"hash": "0x9f50fb25c0a20c47535c482ed732136675a9776951fda62c5e723e0d0750eaee"
}
]
}
],
"collateralOnlyPositions": [],
"debtPositions": [
{
"dTokenBalance": "147316360",
"dToken": {
"derivativeConversion": "1.226452593949547014247518707673039"
},
"marketAsset": {
"inputToken": {
"id": "0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5"
}
},
"snapshots": [
{
"blockNumber": "17698964",
"hash": "0x04172338503514e781b16de4f8b0e3c76542808daf5fa9e8e7ee1dd03935f158"
}
]
}
]
}
]
}
Interest rate example, can also be applied to InterestRateHourly
{
market(id: "0xa8897b4552c075e884bdb8e7b704eb10db29bf0d") {
id
name
rates {
side
token {
id
symbol
}
interestRateDaily(first: 10, orderBy: day, orderDirection: desc) {
day
timestamp
rateHigh
rateLow
rateAvg
rateLast
}
}
}
}
{
"data": {
"market": {
"id": "0xa8897b4552c075e884bdb8e7b704eb10db29bf0d",
"name": "wstETH",
"rates": [
{
"side": "BORROWER",
"token": {
"id": "0x5979d7b546e38e414f7e9822514be443a4800529",
"symbol": "wstETH"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "0.636866571384",
"rateLow": "0.636866571384",
"rateAvg": "0.636866571384",
"rateLast": "0.636866571384"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "0.6423874748352",
"rateLow": "0.636866571384",
"rateAvg": "0.6396450494629710376282782212086659",
"rateLast": "0.636866571384"
}
]
},
{
"side": "BORROWER",
"token": {
"id": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"symbol": "WETH"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "2.7131967893088",
"rateLow": "2.7038396512944",
"rateAvg": "2.706718770683446153846153846153846",
"rateLast": "2.7038396512944"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "2.716033301136",
"rateLow": "2.6671331411856",
"rateAvg": "2.695745529019210946408209806157355",
"rateLast": "2.7131967893088"
}
]
},
{
"side": "BORROWER",
"token": {
"id": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
"symbol": "USDC"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "6.7900824234432",
"rateLow": "6.7679353812816",
"rateAvg": "6.780472421452061538461538461538462",
"rateLast": "6.7900824234432"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "6.978896317368",
"rateLow": "6.7211762918256",
"rateAvg": "6.78817676165180387685290763968073",
"rateLast": "6.7679353812816"
}
]
},
{
"side": "LENDER",
"token": {
"id": "0x5979d7b546e38e414f7e9822514be443a4800529",
"symbol": "wstETH"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "0.0493773650385694",
"rateLow": "0.0493773512951291",
"rateAvg": "0.04937735782541639230769230769230769",
"rateLast": "0.0493773650385694"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "0.050237072675083",
"rateLow": "0.0493772732717314",
"rateAvg": "0.04980976297993667924743443557582668",
"rateLast": "0.0493773508713335"
}
]
},
{
"side": "LENDER",
"token": {
"id": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"symbol": "WETH"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "0.8961760473953493",
"rateLow": "0.89000420911402",
"rateAvg": "0.8919033774836127333333333333333333",
"rateLast": "0.8900048865320267"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "0.898050847972111",
"rateLow": "0.8660033803007828",
"rateAvg": "0.884734327989400857354618015963512",
"rateLast": "0.8961756902195887"
}
]
},
{
"side": "LENDER",
"token": {
"id": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
"symbol": "USDC"
},
"interestRateDaily": [
{
"day": 19752,
"timestamp": 1706572800,
"rateHigh": "4.6105271717526555",
"rateLow": "4.5805080629061384",
"rateAvg": "4.597496787585244830769230769230769",
"rateLast": "4.6105271717526555"
},
{
"day": 19751,
"timestamp": 1706486400,
"rateHigh": "4.8705019616179317",
"rateLow": "4.5174246640835196",
"rateAvg": "4.606543225966467343785632839224629",
"rateLast": "4.5805076451297779"
}
]
}
]
}
}
}
Activity feed for a market
query ActivityFeedBySilo(
$Market: String = "0xac3333401e69574d433307b31f43a7826eb6f8fd"
) {
events(
first: 10
orderBy: blockNumber
orderDirection: desc
where: { silo: $Market }
) {
timestamp
hash
logIndex
blockNumber
id
silo {
id
}
asset {
id
symbol
}
amount
amountUSD
account {
id
}
... on Borrow {
__typename
}
... on Deposit {
__typename
}
... on Liquidate {
__typename
}
... on Repay {
__typename
}
... on Withdraw {
__typename
}
}
}
{
"data": {
"events": [
{
"timestamp": "1706120291",
"hash": "0x119d7d6aa72432ff21b991870f7d77838377ff17bc92f6f4bc5817567fa9abf0",
"logIndex": 163,
"blockNumber": "19078233",
"id": "0x119d7d6aa72432ff21b991870f7d77838377ff17bc92f6f4bc5817567fa9abf0-163",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH"
},
"amount": "7868075660329299854",
"amountUSD": "17603.92909864312688737739968775736",
"account": {
"id": "0x0a39b0b5279d70f7565a78ff59f702aa3b1ea56c"
},
"__typename": "Withdraw"
},
{
"timestamp": "1706037959",
"hash": "0xd7533c39f191ae937e6e2d56eafb478c06da2ec1e154cb9656685d3a2ed8f4dc",
"logIndex": 163,
"blockNumber": "19071439",
"id": "0xd7533c39f191ae937e6e2d56eafb478c06da2ec1e154cb9656685d3a2ed8f4dc-163",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH"
},
"amount": "1000000000000000000",
"amountUSD": "2190.397447350112554485038763824315",
"account": {
"id": "0x5f205748ad7b643dfe71777493e55363879cfd7f"
},
"__typename": "Borrow"
},
{
"timestamp": "1706037659",
"hash": "0x994a673d20c184fca520c22d944300e2d2f67e4c38001789e3c01755108d6379",
"logIndex": 352,
"blockNumber": "19071414",
"id": "0x994a673d20c184fca520c22d944300e2d2f67e4c38001789e3c01755108d6379-352",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI"
},
"amount": "2681349787519888639654",
"amountUSD": "2681.349787519888639654",
"account": {
"id": "0x5f205748ad7b643dfe71777493e55363879cfd7f"
},
"__typename": "Repay"
},
{
"timestamp": "1706035487",
"hash": "0x8e7edce0569855c97591ba427d1cfa27b2a0c407e8e3285ae3c31492bd69085d",
"logIndex": 292,
"blockNumber": "19071234",
"id": "0x8e7edce0569855c97591ba427d1cfa27b2a0c407e8e3285ae3c31492bd69085d-292",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH"
},
"amount": "2460331170101647173",
"amountUSD": "5447.528583581976694454702037776411",
"account": {
"id": "0x5f205748ad7b643dfe71777493e55363879cfd7f"
},
"__typename": "Borrow"
},
{
"timestamp": "1706022539",
"hash": "0x17a9c56a91d24779d634b68e5132327d21bad90a05c738e39395c57d2fa938da",
"logIndex": 367,
"blockNumber": "19070165",
"id": "0x17a9c56a91d24779d634b68e5132327d21bad90a05c738e39395c57d2fa938da-367",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI"
},
"amount": "169471961174941922570444",
"amountUSD": "169471.961174941922570444",
"account": {
"id": "0xc04f84a02cc65f14f4e8c982a7a467ee88c5311e"
},
"__typename": "Withdraw"
},
{
"timestamp": "1706021675",
"hash": "0x7fcf5ba6702d67cf44d23afd9758332dc4e116bdc39bc0d4b3c6c61fd0cfc7c7",
"logIndex": 116,
"blockNumber": "19070093",
"id": "0x7fcf5ba6702d67cf44d23afd9758332dc4e116bdc39bc0d4b3c6c61fd0cfc7c7-116",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0x4a220e6096b25eadb88358cb44068a3248254675",
"symbol": "QNT"
},
"amount": "3250000000000000000000",
"amountUSD": "331581.2585403913125212409169840359",
"account": {
"id": "0xf3fcaba0702b49c33664058ed6dc745ed6d393f1"
},
"__typename": "Withdraw"
},
{
"timestamp": "1706021483",
"hash": "0xa8f285261cc35a3e51809e4039edd1180f96117903fb209cf0b9b0eb1959a0e1",
"logIndex": 143,
"blockNumber": "19070077",
"id": "0xa8f285261cc35a3e51809e4039edd1180f96117903fb209cf0b9b0eb1959a0e1-143",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI"
},
"amount": "156924329267870899364447",
"amountUSD": "156924.329267870899364447",
"account": {
"id": "0xf3fcaba0702b49c33664058ed6dc745ed6d393f1"
},
"__typename": "Repay"
},
{
"timestamp": "1706020391",
"hash": "0xa30da887edaa6ba11891ed01b528597afd757e14bc1f7031dbae405613f242f6",
"logIndex": 271,
"blockNumber": "19069987",
"id": "0xa30da887edaa6ba11891ed01b528597afd757e14bc1f7031dbae405613f242f6-271",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH"
},
"amount": "8497614855983501807",
"amountUSD": "18632.26522189283432615331390245473",
"account": {
"id": "0xf3fcaba0702b49c33664058ed6dc745ed6d393f1"
},
"__typename": "Repay"
},
{
"timestamp": "1705728899",
"hash": "0x6f57c3e0163f10bd3c07c09b2c00761778a1c469ee15ee7f9003e4675852e4c0",
"logIndex": 164,
"blockNumber": "19046015",
"id": "0x6f57c3e0163f10bd3c07c09b2c00761778a1c469ee15ee7f9003e4675852e4c0-164",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac",
"symbol": "XAI"
},
"amount": "22553136689219257663128",
"amountUSD": "22553.136689219257663128",
"account": {
"id": "0x750aaa6b24f82faf710776a7d0bdea3cfe6cb064"
},
"__typename": "Withdraw"
},
{
"timestamp": "1704830531",
"hash": "0xcb5308c8ce81698567240be4736d801957a7241e7d8a83faf8fb88493a5c816c",
"logIndex": 292,
"blockNumber": "18971654",
"id": "0xcb5308c8ce81698567240be4736d801957a7241e7d8a83faf8fb88493a5c816c-292",
"silo": {
"id": "0xac3333401e69574d433307b31f43a7826eb6f8fd"
},
"asset": {
"id": "0x4a220e6096b25eadb88358cb44068a3248254675",
"symbol": "QNT"
},
"amount": "547882313154235927965",
"amountUSD": "61736.29915451742767388169947767397",
"account": {
"id": "0x57d3d0772fabccdd9be52ccb0da8e70dc64589dc"
},
"__typename": "Withdraw"
}
]
}
}
Week of metrics for a market
query GetSiloMetricsWeek($silo: String = "CRV") {
markets(where: { name: $silo }) {
name
dailySnapshots(orderBy: blockNumber, orderDirection: desc, first: 7) {
dailyBorrowUSD
dailyDepositUSD
dailyLiquidateUSD
dailyRepayUSD
dailyWithdrawUSD
timestamp
totalBorrowBalanceUSD
totalDepositBalanceUSD
totalValueLockedUSD
}
}
}
{
"data": {
"markets": [
{
"name": "CRV",
"dailySnapshots": [
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "0",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "0",
"dailyWithdrawUSD": "273042.103393597947025428856075714",
"timestamp": "1703152067",
"totalBorrowBalanceUSD": "0",
"totalDepositBalanceUSD": "-28161.045918982247698391937322368414",
"totalValueLockedUSD": "28371.34018725441148948566523653374"
},
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "0",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "0",
"dailyWithdrawUSD": "45749.06376813152434012275176141142",
"timestamp": "1700475767",
"totalBorrowBalanceUSD": "0",
"totalDepositBalanceUSD": "-45645.610261003944948455363457239604",
"totalValueLockedUSD": "309268.53956642940274617865844554"
},
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "44190.49744655230162757139485592844",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "0",
"dailyWithdrawUSD": "0",
"timestamp": "1700397731",
"totalBorrowBalanceUSD": "0",
"totalDepositBalanceUSD": "44293.53337290412840962713341505386",
"totalValueLockedUSD": "263829.7074789957199261926226751454"
},
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "37300.27021281414521436632240523245",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "0",
"dailyWithdrawUSD": "37300.27021281414521436632240523245",
"timestamp": "1699614503",
"totalBorrowBalanceUSD": "0",
"totalDepositBalanceUSD": "37411.90682844212089014572308745332",
"totalValueLockedUSD": "248552.0211957515698869587838495326"
},
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "0",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "14520.3716776996465247949538735491",
"dailyWithdrawUSD": "0",
"timestamp": "1696283231",
"totalBorrowBalanceUSD": "29369.74515703264382151407838824996",
"totalDepositBalanceUSD": "16540.20980002114382664653827306544",
"totalValueLockedUSD": "239900.5777523712101101571712532575"
},
{
"dailyBorrowUSD": "15231.99221322590538032037859688151",
"dailyDepositUSD": "0",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "0",
"dailyWithdrawUSD": "0",
"timestamp": "1695918023",
"totalBorrowBalanceUSD": "15231.99221322590538032037859688151",
"totalDepositBalanceUSD": "32273.29928329608487263590682703001",
"totalValueLockedUSD": "246654.5374347264186194517571316542"
},
{
"dailyBorrowUSD": "0",
"dailyDepositUSD": "0",
"dailyLiquidateUSD": "0",
"dailyRepayUSD": "14768.10388036167052671254042932216",
"dailyWithdrawUSD": "0",
"timestamp": "1695652943",
"totalBorrowBalanceUSD": "29520.60681663771363720440956403727",
"totalDepositBalanceUSD": "16963.81003153796650810817648088037",
"totalValueLockedUSD": "242516.9016391561428020597063189442"
}
]
}
]
}
Account based position info
query QueryAccountPositions(
$account: String = "0xc255e0a1be0a4b7b8bf5ebe8d0aba162cf75bae2"
) {
positions(orderDirection: desc, where: { account: $account }) {
account {
id
}
depositCount
balance
blockNumberClosed
blockNumberOpened
borrowCount
isCollateral
liquidationCount
repayCount
side
timestampClosed
timestampOpened
withdrawCount
}
}
{
"data": {
"positions": [
{
"account": {
"id": "0xc255e0a1be0a4b7b8bf5ebe8d0aba162cf75bae2"
},
"depositCount": 0,
"balance": "0",
"blockNumberClosed": "0",
"blockNumberOpened": "18834884",
"borrowCount": 0,
"isCollateral": true,
"liquidationCount": 0,
"repayCount": 0,
"side": "LENDER",
"timestampClosed": "0",
"timestampOpened": "1703169479",
"withdrawCount": 0
},
{
"account": {
"id": "0xc255e0a1be0a4b7b8bf5ebe8d0aba162cf75bae2"
},
"depositCount": 0,
"balance": "0",
"blockNumberClosed": "0",
"blockNumberOpened": "18834888",
"borrowCount": 0,
"isCollateral": true,
"liquidationCount": 0,
"repayCount": 0,
"side": "BORROWER",
"timestampClosed": "0",
"timestampOpened": "1703169527",
"withdrawCount": 0
}
]
}
}
Last updated