Skip to content

Instantly share code, notes, and snippets.

@frostiq
Last active June 5, 2019 16:30
Show Gist options
  • Save frostiq/c09f887c84d55a8f75b05ab1ef4c0c13 to your computer and use it in GitHub Desktop.
Save frostiq/c09f887c84d55a8f75b05ab1ef4c0c13 to your computer and use it in GitHub Desktop.
var data = [
{
"provider": "CoinList",
"borrow": [
{
"symbol": "ETH",
"address": "0x0000000000000000000000000000000000000000",
"rate": 0.0365
},
{
"symbol": "BTC",
"address": null,
"rate": 0.0365
}
],
"supply": [
{
"symbol": "ETH",
"address": "0x0000000000000000000000000000000000000000",
"rate": 0.0292
},
{
"symbol": "BTC",
"address": null,
"rate": 0.0292
},
]
},
{
"provider": "Compound",
"borrow": [
{
"symbol": "ZRX",
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"rate": 0.0877953104041824
},
{
"symbol": "BAT",
"address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef",
"rate": 0.0507196661951232
},
{
"symbol": "REP",
"address": "0x1985365e9f78359a9b6ad760e32412f4a445e862",
"rate": 0.0501034405780224
},
{
"symbol": "ETH",
"address": "0x0000000000000000000000000000000000000000",
"rate": 0.0574781501163168
},
{
"symbol": "DAI",
"address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
"rate": 0.17827363808928
}
],
"supply": [
{
"symbol": "ZRX",
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"rate": 0.0066365020172448
},
{
"symbol": "BAT",
"address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef",
"rate": 0.0000730024572384
},
{
"symbol": "REP",
"address": "0x1985365e9f78359a9b6ad760e32412f4a445e862",
"rate": 0.0000103654564128
},
{
"symbol": "ETH",
"address": "0x0000000000000000000000000000000000000000",
"rate": 0.000859660469568
},
{
"symbol": "DAI",
"address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
"rate": 0.1161297586126944
}
]
}
]
var res = data.find(x => x.provider === 'Compound')
res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment