Skip to main content
Solana priority fees change every 10 seconds. Agents that hardcode a fee either fail during congestion or overpay by 3x during quiet periods. This endpoint samples the current network, buckets fees into low/medium/high tiers, and returns plain-English llm_advice your model can act on directly.
Paid endpoint. Pass your key in the x-api-key header. See Get an API key.

Why agents use this

  • Fees move constantly. A static value is either wasteful or broken. There’s no correct hardcoded number.
  • LLM-native output. llm_advice is a plain sentence like “Network is quiet, use low tier to save 60%.” Feed it straight into your prompt.
  • Three-tier structure matches user intent. “Get me in fast” (high), “reasonable” (medium), “I’m patient” (low). Match to user preference or agent urgency.
  • Live congestion signal. current_congestion is a stable classifier your bot can log and monitor over time.

Use cases

  • Dynamic fee per trade. Loop your bot: call optimal-fee, use the tier that matches urgency, submit. Typical savings: 30-50% versus a fixed conservative fee.
  • Time mints to congestion dips. Poll every minute; auto-mint the moment current_congestion flips to LOW.
  • CI/monitoring alert. Slack notification when fees spike above a threshold so ops knows to pause automated batches.
  • Per-user fee preference in a DEX UI. Show the three tiers with description and estimated_time from the response. Users pick, bot executes.
  • Fee attribution in analytics. Log the recommended tier at trade time so you can compare theoretical optimum versus what you actually paid.

Recipe: adaptive fee selection for a trading bot

adaptive-fee.ts
Combine with Blockhash to build fully-configured transactions client-side without your own RPC. Two calls, no infra.