gmx metadata and backfill in finaldata

This commit is contained in:
tim
2025-06-17 00:37:52 -04:00
parent 97f98ba7cf
commit a4a2f6e318

View File

@@ -78,6 +78,17 @@ event_handlers = {
'ClaimableFundingAmountPerSizeUpdated': None,
'FundingFeesClaimed': None,
'FeesClaimed': None,
'SetAvailableFeeAmount': None,
'BuybackFees': None,
'OrderSizeDeltaAutoUpdated': None,
'SubaccountAutoTopUp': None,
'SetSubaccountAutoTopUpAmount': None,
'SetMaxAllowedSubaccountActionCount': None,
'AffiliateRewardClaimed': None,
'CollateralClaimed': None,
'ExecutionFeeRefundCallback': None,
'PoolAmountUpdated': None,
'VirtualSwapInventoryUpdated': None,
@@ -217,6 +228,8 @@ async def fetch_price_updates():
},
"""
addr = t['tokenAddress']
if addr not in gmx_token_symbol_map:
continue
# GMX prices use 30 decimal places
price = (dec(t['minPrice']) + dec(t['maxPrice'])) / 2 * dec(10) ** dec(-30)
time = from_timestamp(t['timestamp'])