generated from nathanwoodburn/python-webserver-template
feat: Add more logging for cardano
All checks were successful
Build Docker / BuildImage (push) Successful in 43s
All checks were successful
Build Docker / BuildImage (push) Successful in 43s
This commit is contained in:
parent
ba32272a53
commit
a82fedabaf
2
cache/154903f1c716802fd57eec282afe3cb8.json
vendored
2
cache/154903f1c716802fd57eec282afe3cb8.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761171.8015382, "result": 1.56}
|
||||
{"timestamp": 1736148137.3610523, "result": 1.605033}
|
2
cache/1981e30de11cf0845e8b5affb4dc75e0.json
vendored
2
cache/1981e30de11cf0845e8b5affb4dc75e0.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761044.8159094, "result": 3524.19}
|
||||
{"timestamp": 1736148072.9105287, "result": 3657.18}
|
2
cache/1ccff5c6f117409fea0c861aa44b8e62.json
vendored
2
cache/1ccff5c6f117409fea0c861aa44b8e62.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761168.669664, "result": 0.973388}
|
||||
{"timestamp": 1736148135.5155199, "result": 1.078}
|
2
cache/29409a8a40dd2d547a7a44b8f6758f54.json
vendored
2
cache/29409a8a40dd2d547a7a44b8f6758f54.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761041.3223195, "result": 4.24}
|
||||
{"timestamp": 1736148011.002414, "result": 4.39}
|
2
cache/32fbffa989a7d6c0472092fc8982713b.json
vendored
2
cache/32fbffa989a7d6c0472092fc8982713b.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761043.8674088, "result": 689.19}
|
||||
{"timestamp": 1736148008.9088044, "result": 709.43}
|
2
cache/4104ed0427efe63d4ca0dead970a4391.json
vendored
2
cache/4104ed0427efe63d4ca0dead970a4391.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761042.346921, "result": 210.71}
|
||||
{"timestamp": 1736148072.0298233, "result": 229.74}
|
2
cache/46c1ec7f5edb30c070003dc54e072f41.json
vendored
2
cache/46c1ec7f5edb30c070003dc54e072f41.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761167.2952592, "result": 4.81}
|
||||
{"timestamp": 1736148133.9794865, "result": 5.16}
|
2
cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json
vendored
2
cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761039.8468008, "result": 199.15}
|
||||
{"timestamp": 1736148006.2010005, "result": 214.35}
|
2
cache/60265613786b14e87a2dfba823dac3e7.json
vendored
2
cache/60265613786b14e87a2dfba823dac3e7.json
vendored
@ -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}]}
|
2
cache/6cc6c6a0b2d0654f551d33209c1fd824.json
vendored
2
cache/6cc6c6a0b2d0654f551d33209c1fd824.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761166.9944582, "result": 4.97}
|
||||
{"timestamp": 1736148134.3905075, "result": 5.35}
|
2
cache/6eec370e2713cfc84c84e1080b8a191a.json
vendored
2
cache/6eec370e2713cfc84c84e1080b8a191a.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734762527.4779243, "result": 555.700092455}
|
||||
{"timestamp": 1736148365.6652994, "result": 618.742658875}
|
2
cache/790b28a9a21cf694ad9577ef1072ac9e.json
vendored
2
cache/790b28a9a21cf694ad9577ef1072ac9e.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761039.4978867, "result": 0.004517624000000005}
|
||||
{"timestamp": 1736148005.1766274, "result": 0.004523624000000004}
|
2
cache/a071d7bdda25c22e42ad7840f17c4b0e.json
vendored
2
cache/a071d7bdda25c22e42ad7840f17c4b0e.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761105.7489936, "result": 1.001}
|
||||
{"timestamp": 1736148009.8783817, "result": 0.998474}
|
2
cache/a099e7e540e16a185b0279b9494e5099.json
vendored
2
cache/a099e7e540e16a185b0279b9494e5099.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734761043.1488986, "result": 98269}
|
||||
{"timestamp": 1736148007.9315152, "result": 99073}
|
2
cache/a0ee60913ba556f39d128e7d7249e788.json
vendored
2
cache/a0ee60913ba556f39d128e7d7249e788.json
vendored
@ -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"}]}
|
2
cache/c652e896f57f598d23e3dbebdb815ef6.json
vendored
2
cache/c652e896f57f598d23e3dbebdb815ef6.json
vendored
@ -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"}]}
|
2
cache/cardano_balance.json
vendored
2
cache/cardano_balance.json
vendored
@ -1 +1 @@
|
||||
{"balance": 82.83633}
|
||||
{"balance": 82.92772}
|
2
cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json
vendored
2
cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json
vendored
@ -1 +1 @@
|
||||
{"timestamp": 1734762344.403439, "result": 82.83633}
|
||||
{"timestamp": 1736148435.4791589, "result": 82.92772}
|
2
cache/d4e81748ee91683b2c48adaa5cf95187.json
vendored
2
cache/d4e81748ee91683b2c48adaa5cf95187.json
vendored
@ -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"}]}
|
@ -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:
|
||||
|
BIN
stWDBRN.bsdesign
BIN
stWDBRN.bsdesign
Binary file not shown.
Loading…
Reference in New Issue
Block a user