Skip to content

Commit 0d534fc

Browse files
v15.1.2 (#53)
1 parent d738233 commit 0d534fc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "sakit"
3-
version = "15.1.1"
3+
version = "15.1.2"
44
description = "Solana Agent Kit"
55
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
66
license = "MIT"

sakit/utils/dflow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ def calculate_safety_score(
444444
warnings.append(f"Moderate volume (${volume:,.0f})")
445445
score_points -= 10
446446

447-
# Liquidity check
448-
liquidity = market.get("liquidity", 0)
447+
# Liquidity check (DFlow API returns openInterest instead of liquidity)
448+
liquidity = market.get("liquidity") or market.get("openInterest", 0)
449449
if liquidity < 500:
450450
warnings.append("Low liquidity - may be hard to exit")
451451
score_points -= 30
@@ -534,7 +534,8 @@ def _apply_quality_filters(
534534
filtered = []
535535
for item in items:
536536
volume = item.get("volume", 0)
537-
liquidity = item.get("liquidity", 0)
537+
# DFlow API returns openInterest instead of liquidity for prediction markets
538+
liquidity = item.get("liquidity") or item.get("openInterest", 0)
538539

539540
if volume >= self.min_volume_usd and liquidity >= self.min_liquidity_usd:
540541
filtered.append(item)

0 commit comments

Comments
 (0)