All three reuse one paid client. Set it up once:
import os
from x402.clients.requests import x402_requests
from eth_account import Account
apex = x402_requests(Account.from_key(os.environ["EVM_PRIVATE_KEY"]))
def sig(name: str) -> dict:
return apex.get(f"https://apexrunner.ai/signals/{name}").json()
Workflow 01 — DCA timing agent
Use case: decide whether to add to a spot position, only when several independent conditions line up — so you accumulate into weakness instead of chasing.
Signals: dca-reentry-gate · fear-greed · regime-confluence
Logic: add only when the re-entry gate reads OPEN, sentiment is fearful (a contrarian entry condition), and the regime is ranging or neutral rather than trending or in crisis. Any one failing is a pass.
def should_dca() -> bool:
gate = sig("dca-reentry-gate")
fg = sig("fear-greed")
regime = sig("regime-confluence")
return (
gate["status"] == "OPEN"
and fg["value"] <= 25
and regime["regime"] in ("ranging", "neutral")
)
if should_dca():
place_dca_order() # your own execution layer
Workflow 02 — Risk management agent
Use case: decide whether to trim or hedge an open position before the market does it for you, by reading crowding and stress rather than price alone.
Signals: crowded-trade-detector · liquidation-pressure · portfolio-heat
Logic: raise a reduce-risk flag when a position is crowded and liquidation pressure is building and your own book is running hot. Crowding alone is noise; the combination is a setup for a cascade.
def risk_action(symbol: str) -> str:
crowd = sig("crowded-trade-detector")
liq = sig("liquidation-pressure")
heat = sig("portfolio-heat")
crowded = crowd["crowding_score"] >= 70 # 0-100, higher = more crowded
squeezing = liq["pressure"] == "elevated"
hot = heat["heat_pct"] >= 8 # your book's risk utilisation
if crowded and squeezing and hot:
return "REDUCE" # trim or hedge
if crowded and squeezing:
return "WATCH" # tighten stops, no new size
return "HOLD"
Workflow 03 — Execution optimizer
Use case: you've decided to trade; now place it well — choose the venue with the best expected fill and wait for a low-slippage window instead of crossing the spread on impulse.
Signals: optimal-order-routing · slippage-forecast · execution-window-optimizer
Logic: route to the venue the router favours, but only submit when the forecast slippage is acceptable and the window optimizer says conditions are favourable; otherwise hold and re-check.
def plan_execution(symbol: str, notional_usd: float) -> dict:
route = sig("optimal-order-routing")
slip = sig("slippage-forecast")
window = sig("execution-window-optimizer")
ok_to_send = (
slip["expected_bps"] <= 15 # cap acceptable slippage
and window["recommendation"] == "execute"
)
return {
"venue": route["best_venue"],
"send_now": ok_to_send,
"expected_slippage_bps": slip["expected_bps"],
}
Cost
A workflow costs the sum of its signals' list prices minus your wallet's discount tier (30% during the early-adopter window). Prices and discounts change, so rather than budgeting against a fixed total, call my-pricing for the exact amount a wallet will be charged:
curl https://apexrunner.ai/signals/my-pricing
trading-intelligence-bundle and risk-assessment-bundle — return the constituents in a single paid call. One payment, one request, lower total cost than calling each endpoint separately.