mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-21 02:03:14 +00:00
Exclude BTC swaps from avg premium calculation
This commit is contained in:
@ -116,7 +116,9 @@ def compute_premium_percentile(order):
|
|||||||
def compute_avg_premium(queryset):
|
def compute_avg_premium(queryset):
|
||||||
weighted_premiums = []
|
weighted_premiums = []
|
||||||
volumes = []
|
volumes = []
|
||||||
for tick in queryset:
|
|
||||||
|
# We exclude BTC, as LN <-> BTC swap premiums should not be mixed with FIAT.
|
||||||
|
for tick in queryset.exclude(currency=1000):
|
||||||
weighted_premiums.append(tick.premium * tick.volume)
|
weighted_premiums.append(tick.premium * tick.volume)
|
||||||
volumes.append(tick.volume)
|
volumes.append(tick.volume)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user