feat: Add more logging for cardano
All checks were successful
Build Docker / BuildImage (push) Successful in 43s

This commit is contained in:
Nathan Woodburn 2025-01-06 18:29:39 +11:00
parent ba32272a53
commit a82fedabaf
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
21 changed files with 23 additions and 21 deletions

View File

@ -1 +1 @@
{"timestamp": 1734761171.8015382, "result": 1.56}
{"timestamp": 1736148137.3610523, "result": 1.605033}

View File

@ -1 +1 @@
{"timestamp": 1734761044.8159094, "result": 3524.19}
{"timestamp": 1736148072.9105287, "result": 3657.18}

View File

@ -1 +1 @@
{"timestamp": 1734761168.669664, "result": 0.973388}
{"timestamp": 1736148135.5155199, "result": 1.078}

View File

@ -1 +1 @@
{"timestamp": 1734761041.3223195, "result": 4.24}
{"timestamp": 1736148011.002414, "result": 4.39}

View File

@ -1 +1 @@
{"timestamp": 1734761043.8674088, "result": 689.19}
{"timestamp": 1736148008.9088044, "result": 709.43}

View File

@ -1 +1 @@
{"timestamp": 1734761042.346921, "result": 210.71}
{"timestamp": 1736148072.0298233, "result": 229.74}

View File

@ -1 +1 @@
{"timestamp": 1734761167.2952592, "result": 4.81}
{"timestamp": 1736148133.9794865, "result": 5.16}

View File

@ -1 +1 @@
{"timestamp": 1734761039.8468008, "result": 199.15}
{"timestamp": 1736148006.2010005, "result": 214.35}

View File

@ -1 +1 @@
{"timestamp": 1734762489.5969255, "result": [{"name": "Jupiter Perpetuals Liquidity Provider Token", "apy": 33.97, "url": "https://jup.ag/perps-earn", "updated": 1734665686}, {"name": "Volo Staked SUI", "apy": 2.71, "url": "https://stake.volosui.com/", "updated": 1734665831}, {"name": "Cardano", "apy": 2.92, "url": "https://adastat.net/pools/08f05bcfaada3bb5c038b8c88c6b502ceabfd9978973159458c6535b", "updated": 1734666096}, {"name": "Jupiter Staked Solana", "apy": 11.39, "url": "https://solanacompass.com/stake-pools/8VpRhuxa7sUUepdY3kQiTmX9rS5vx4WgaXiAnXq4KCtr", "updated": 1734666296}]}
{"timestamp": 1736148384.6488435, "result": [{"name": "Jupiter Perpetuals Liquidity Provider Token", "apy": 14.84, "url": "https://jup.ag/perps-earn", "updated": 1736066605}, {"name": "Volo Staked SUI", "apy": 2.71, "url": "https://stake.volosui.com/", "updated": 1736066605}, {"name": "Cardano", "apy": 2.88, "url": "https://adastat.net/pools/08f05bcfaada3bb5c038b8c88c6b502ceabfd9978973159458c6535b", "updated": 1736066605}, {"name": "Jupiter Staked Solana", "apy": 9.92, "url": "https://solanacompass.com/stake-pools/8VpRhuxa7sUUepdY3kQiTmX9rS5vx4WgaXiAnXq4KCtr", "updated": 1736066605}]}

View File

@ -1 +1 @@
{"timestamp": 1734761166.9944582, "result": 4.97}
{"timestamp": 1736148134.3905075, "result": 5.35}

View File

@ -1 +1 @@
{"timestamp": 1734762527.4779243, "result": 555.700092455}
{"timestamp": 1736148365.6652994, "result": 618.742658875}

View File

@ -1 +1 @@
{"timestamp": 1734761039.4978867, "result": 0.004517624000000005}
{"timestamp": 1736148005.1766274, "result": 0.004523624000000004}

View File

@ -1 +1 @@
{"timestamp": 1734761105.7489936, "result": 1.001}
{"timestamp": 1736148009.8783817, "result": 0.998474}

View File

@ -1 +1 @@
{"timestamp": 1734761043.1488986, "result": 98269}
{"timestamp": 1736148007.9315152, "result": 99073}

View File

@ -1 +1 @@
{"timestamp": 1734762432.2559032, "result": [{"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 23.664735, "price": 4.24, "value": 100.3384764, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}, {"mint": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", "balance": 0.00056828, "price": 98269, "value": 55.84430732, "name": "Wrapped BTC (Wormhole)", "symbol": "wbtc"}, {"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.239815492, "price": 210.71, "value": 50.53152231932, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa", "balance": 0.03683279, "price": 689.19, "value": 25.3847905401, "name": "Binance Coin (Wormhole)", "symbol": "bnb"}, {"mint": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", "balance": 0.00255735, "price": 3524.19, "value": 9.0125872965, "name": "Ethereum (Wormhole)", "symbol": "eth"}, {"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "balance": 1.0, "price": 1.001, "value": 1.001, "name": "USDC", "symbol": "usdc"}, {"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.81, "value": 4.34270901467, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 22.852920128, "price": 4.97, "value": 113.57901303615999, "name": "Volo Staked SUI", "symbol": "vsui"}]}
{"timestamp": 1736148382.1951156, "result": [{"mint": "9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa", "balance": 0.03683279, "price": 709.43, "value": 26.130286209699996, "name": "Binance Coin (Wormhole)", "symbol": "bnb"}, {"mint": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", "balance": 0.00255735, "price": 3657.18, "value": 9.352689273, "name": "Ethereum (Wormhole)", "symbol": "eth"}, {"mint": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", "balance": 0.00056828, "price": 99073, "value": 56.30120444, "name": "Wrapped BTC (Wormhole)", "symbol": "wbtc"}, {"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "balance": 1.0, "price": 0.998474, "value": 0.998474, "name": "USDC", "symbol": "usdc"}, {"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.239815492, "price": 229.74, "value": 55.09521113208, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 38.996342, "price": 4.39, "value": 171.19394137999998, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 22.852920128, "price": 5.35, "value": 122.2631226848, "name": "Volo Staked SUI", "symbol": "vsui"}, {"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 5.16, "value": 4.65870655212, "name": "Sui", "symbol": "sui"}]}

View File

@ -1 +1 @@
{"timestamp": 1734762529.1204565, "result": [{"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.81, "value": 4.34270901467, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 22.852920128, "price": 4.97, "value": 113.57901303615999, "name": "Volo Staked SUI", "symbol": "vsui"}]}
{"timestamp": 1736148375.0232542, "result": [{"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 22.852920128, "price": 5.35, "value": 122.2631226848, "name": "Volo Staked SUI", "symbol": "vsui"}, {"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 5.16, "value": 4.65870655212, "name": "Sui", "symbol": "sui"}]}

View File

@ -1 +1 @@
{"balance": 82.83633}
{"balance": 82.92772}

View File

@ -1 +1 @@
{"timestamp": 1734762344.403439, "result": 82.83633}
{"timestamp": 1736148435.4791589, "result": 82.92772}

View File

@ -1 +1 @@
{"timestamp": 1734762543.2454257, "result": [{"name": "Kamino USDC Lending", "description": "Kamino USDC Lending", "apy": 12.16, "url": "https://app.kamino.finance/lending/reserve/DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek/Ga4rZytCpq1unD4DbEJ5bkHeUz9g3oh9AAFEi6vSauXp", "value": 50.28, "updated": "1734756585", "initial": 50, "bought": "1733717057", "type": "Lending"}, {"name": "dYdX MegaVault", "description": "dYdX MegaVault", "apy": 44, "url": "https://dydx.trade/vault", "value": 61.62, "updated": "1734756650", "initial": 60, "bought": "1733300000", "type": "Lending"}]}
{"timestamp": 1736148442.606954, "result": [{"name": "Kamino USDC Lending", "description": "Kamino USDC Lending", "apy": 9.5, "url": "https://app.kamino.finance/lending/reserve/DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek/Ga4rZytCpq1unD4DbEJ5bkHeUz9g3oh9AAFEi6vSauXp", "value": 50.5, "updated": "1736061253", "initial": 50, "bought": "1733717057", "type": "Lending"}, {"name": "dYdX MegaVault", "description": "dYdX MegaVault", "apy": 28, "url": "https://dydx.trade/vault", "value": 61.67, "updated": "1736061253", "initial": 60, "bought": "1733300000", "type": "Lending"}]}

View File

@ -354,13 +354,15 @@ def getCardanoBalance(address: str):
if response.status_code != 200:
print("Error getting cardano balance",flush=True)
# Get last known balance
return last
return last
data = response.json()
if "controlled_amount" in data:
with open("cache/cardano_balance.json", "w") as f:
json.dump({"balance": int(data["controlled_amount"]) / 1000000}, f)
return int(data["controlled_amount"]) / 1000000
print("Error getting cardano balance. Key not found",flush=True)
print(data,flush=True)
return last
except:

Binary file not shown.