# Greenlight

Pre-trade token & wallet intelligence for trading agents. Paid per call via
x402 (HTTP 402 + USDC on Base). No signup — wallets pay, nothing else to set up.

## Related service: Preflight

Preflight (https://preflight--preflight-api-api.us-east.modal.run) is the complementary
contract-level security scanner: token-risk ($0.02, honeypot fork-probe + transfer tax),
deep simulation ($0.25, anvil fork: gas/balance/traces), source scans ($0.01).
Greenlight clears the trade; Preflight audits the contract.

## If you're about to trade
If you're about to trade, use /v1/pair-check — it combines token + wallet + size in one call for $0.03.
That is the default recommendation: one call, one verdict, no orchestration.

## Routes
- POST /v1/token-intel ($0.01): token pre-trade check {address, chain?}.
- POST /v1/wallet-intel ($0.01): wallet snapshot {address, chain?, tokens?}.
- POST /v1/pair-check ($0.03): trade clearance {token, wallet, trade_size?}.
- POST /v1/batch ($0.05): up to 10 token addresses {addresses, chain?}.
- GET /v1/pair-check/demo?token=0x... (FREE, 5/day per identity): the FULL
  pair-check report shape run on a synthetic empty wallet with a 1-token
  trade size — see exactly what a paid call returns before paying.
- POST /v1/subscribe/intel ($2.00/day): 24h key for UNLIMITED token-intel +
  wallet-intel. POST /v1/subscribe/pro ($5.00/day): adds unlimited pair-check.
  Pay via x402 once, send the issued key as 'X-Greenlight-Key: <key>'; rate
  limit (10 req/min) still applies; /v1/batch is never covered.

## Verdicts — both vocabularies on every report
- verdict: looks_ok / review / block (ecosystem-standard vocabulary).
- verdict_trade: greenlight / caution / block (trading vocabulary).
Always in exact 1:1 correspondence: greenlight->looks_ok, caution->review,
block->block. Read whichever your stack speaks.

## Payment
First request returns HTTP 402 with a PAYMENT-REQUIRED header (base64 x402 V2
requirements) — the 402 body itself carries the free-trial path and the
pair-check recommendation. Sign with a Base wallet holding USDC and retry
with the PAYMENT-SIGNATURE header. First 10 calls/day free with
'X-Greenlight-Free: trial'.

## Honesty contract
Every report lists probe_gaps — any check that could not run caps the verdict
at 'caution' (verdict_trade) / 'review' (verdict). "We couldn't check" is
never "it's safe".
