Add tools/lmscan.py: live Local Market hauling-ad scan

Pulls real player-posted freight jobs from FIO's /localmarket/shipping
endpoints (public, no auth - distinct from the CONTD player-contract
system, which isn't exposed via any API). Ranks by margin after real
one-way fuel cost (puga.shipping.leg_cost), flagging ads that exceed the
account's ship hold or route through an unmeasured gateway.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 13:33:04 +02:00
co-authored by Claude Sonnet 5
parent 9a4c7cc57c
commit c660559f74
3 changed files with 100 additions and 0 deletions
+6
View File
@@ -22,6 +22,12 @@ def planets_full(refresh=False): return _g("/planet/allplanets/full", STATI
def workforce_needs(refresh=False): return _g("/global/workforceneeds", STATIC, refresh)
def systems(refresh=False): return _g("/systemstars", STATIC, refresh)
def stations(refresh=False): return _g("/exchange/station", STATIC, refresh)
def lm_shipping_source(planet: str, refresh=False):
"""Live Local Market hauling ads where `planet` is the pickup - public, no auth needed."""
return _g(f"/localmarket/shipping/source/{planet}", 15 * 60, refresh)
def lm_shipping_destination(planet: str, refresh=False):
"""Live Local Market hauling ads where `planet` is the drop-off - public, no auth needed."""
return _g(f"/localmarket/shipping/destination/{planet}", 15 * 60, refresh)
def own(path: str, ttl: int = 300, refresh: bool = False):