diff --git a/scripts/surfer/crypto_funding_paper.py b/scripts/surfer/crypto_funding_paper.py index 399bd93d4..ab7c2623e 100644 --- a/scripts/surfer/crypto_funding_paper.py +++ b/scripts/surfer/crypto_funding_paper.py @@ -43,11 +43,19 @@ def get(url, tries=4): time.sleep(2 * (a + 1)) +def crypto_native(): + """Symbols whose underlying is a crypto COIN (excludes EQUITY/KR_EQUITY/COMMODITY/INDEX/ + PREMARKET tokenized-stock perps) — matches the universe the edge was validated on.""" + info = get(f"{FAPI}/fapi/v1/exchangeInfo") + return {s["symbol"] for s in info["symbols"] if s.get("underlyingType") == "COIN"} + + def universe(): - """Liquid USDT perps: symbol -> 24h quote volume (USD).""" + """Liquid CRYPTO-NATIVE USDT perps: symbol -> 24h quote volume (USD).""" + native = crypto_native() t = get(f"{FAPI}/fapi/v1/ticker/24hr") return {x["symbol"]: float(x["quoteVolume"]) for x in t - if x["symbol"].endswith("USDT") and float(x["quoteVolume"]) > LIQ_USD} + if x["symbol"].endswith("USDT") and x["symbol"] in native and float(x["quoteVolume"]) > LIQ_USD} def funding_hist(sym, limit=90):