Last active
February 13, 2021 23:41
-
-
Save adamwhitakerwilson/cbe6b08a329edf3d1975bd29da3e546d to your computer and use it in GitHub Desktop.
Balancer D2 - Get current D1 fund balances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assume you know the address of the D2 fund, you can get D1 fund balances simply by passing the D2 | |
// into the address parameter using the Get token balances for address endpoint. | |
// https://api.covalenthq.com/v1/1/address/0x04df4fbb6a003d1db3dd83d6d3b9951455837fff/balances_v2/?key=.. | |
{ | |
"data": { | |
"address": "0x04df4fbb6a003d1db3dd83d6d3b9951455837fff", | |
"updated_at": "2021-02-13T23:30:41.937410301Z", | |
"next_update_at": "2021-02-13T23:35:41.937411131Z", | |
"quote_currency": "USD", | |
"chain_id": 1, | |
"items": [ | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Punk-Attr-5", | |
"contract_ticker_symbol": "PUNK-ATTR-5", | |
"contract_address": "0xab9c92a9337a1494c6d545e48187fa37144403c8", | |
"logo_url": "https://logos.covalenthq.com/tokens/0xab9c92a9337a1494c6d545e48187fa37144403c8.png", | |
"type": "cryptocurrency", | |
"balance": "7358876737422719794", | |
"quote_rate": 0, | |
"quote": 0, | |
"nft_data": null | |
}, | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Punk-Attr-4", | |
"contract_ticker_symbol": "PUNK-ATTR-4", | |
"contract_address": "0x49706a576bb823cde3180c930f9947d59e2ded4d", | |
"logo_url": "https://logos.covalenthq.com/tokens/0x49706a576bb823cde3180c930f9947d59e2ded4d.png", | |
"type": "cryptocurrency", | |
"balance": "22221096203648130202", | |
"quote_rate": 0, | |
"quote": 0, | |
"nft_data": null | |
}, | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Punk-Female", | |
"contract_ticker_symbol": "PUNK-FEMALE", | |
"contract_address": "0x27ffed7e5926fb2795fc85aaab558243f280a8a2", | |
"logo_url": "https://logos.covalenthq.com/tokens/0x27ffed7e5926fb2795fc85aaab558243f280a8a2.png", | |
"type": "cryptocurrency", | |
"balance": "23284773875589614819", | |
"quote_rate": 0, | |
"quote": 0, | |
"nft_data": null | |
}, | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Punk-Basic", | |
"contract_ticker_symbol": "PUNK-BASIC", | |
"contract_address": "0x69bbe2fa02b4d90a944ff328663667dc32786385", | |
"logo_url": "https://logos.covalenthq.com/tokens/0x69bbe2fa02b4d90a944ff328663667dc32786385.png", | |
"type": "cryptocurrency", | |
"balance": "25652511671057163261", | |
"quote_rate": 0, | |
"quote": 0, | |
"nft_data": null | |
}, | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Punk-Zombie", | |
"contract_ticker_symbol": "PUNK-ZOMBIE", | |
"contract_address": "0xf18ade29a225faa555e475ee01f9eb66eb4a3a74", | |
"logo_url": "https://logos.covalenthq.com/tokens/0xf18ade29a225faa555e475ee01f9eb66eb4a3a74.png", | |
"type": "cryptocurrency", | |
"balance": "1474857528130727571", | |
"quote_rate": 0, | |
"quote": 0, | |
"nft_data": null | |
}, | |
{ | |
"contract_decimals": 18, | |
"contract_name": "Ether", | |
"contract_ticker_symbol": "ETH", | |
"contract_address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", | |
"logo_url": "https://logos.covalenthq.com/tokens/0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png", | |
"type": "cryptocurrency", | |
"balance": "0", | |
"quote_rate": 1813.1509, | |
"quote": 0, | |
"nft_data": null | |
} | |
], | |
"pagination": null | |
}, | |
"error": false, | |
"error_message": null, | |
"error_code": null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment