Agent Guide › Guides

Disclosure: this site contains referral links and MoneyTools earns a commission when you sign up or pay through them. MoneyTools also operates x402 Pay-Precheck and earns revenue from its paid calls. Nothing here is investment, financial or legal advice. Region restrictions apply (e.g. the United States) - follow each service's terms and your local law.

Pick the cheapest perp DEX for a trade with fees.json

/fees.json lists entry-tier maker/taker fees for Hyperliquid, dYdX, Lighter, Aster and Drift. Every number links to the venue's official fee page with a check date (currently 2026-11-03). Anything we could not confirm is null, never estimated. The file includes ourReferral fields: today only Lighter has an active MoneyTools referral link, and we earn a commission if you sign up through it. Referral status never changes the sort order.

The code only downloads JSON and does arithmetic. It does not connect to any exchange, hold keys or place orders.

1. The rule

  1. Drop venues whose fee is null (unconfirmed) - do not guess.
  2. Drop venues that restrict your region (check the restrictions text and the linked terms).
  3. Sort by taker fee, then maker fee; cost = notional × taker% / 100.

2. Python (stdlib only)

# From https://agent-guide.moneytools.workers.dev/guides/ (MIT). Disclosure: that site contains referral links and
# MoneyTools earns commission through them; MoneyTools also operates x402 Pay-Precheck and earns from its paid calls.
# Not investment, financial or legal advice. Region restrictions apply (e.g. United States). Read-only: no keys, no payments.
import json, urllib.request

UA = {"User-Agent": "my-agent/1.0 (+https://example.org/contact)"}  # default Python-urllib UA gets HTTP 403

FEES = "https://agent-guide.moneytools.workers.dev/fees.json"
NOTIONAL_USD = 10_000          # size of one taker fill
MY_REGION = "United States"    # crude text match against each venue's restrictions

with urllib.request.urlopen(urllib.request.Request(FEES, headers=UA), timeout=30) as r:
    data = json.load(r)

rows = []
for v in data["venues"]:
    if v["takerPct"] is None:                       # "Unconfirmed" -> never guess
        print(f"skip {v['name']}: fee unconfirmed")
        continue
    restricted = MY_REGION.lower() in (v["restrictions"] or "").lower()
    rows.append((v["takerPct"], v["makerPct"], v["name"], restricted, v["feeSource"]))

for taker, maker, name, restricted, src in sorted(rows):
    cost = NOTIONAL_USD * taker / 100
    flag = "  <- restricted in your region" if restricted else ""
    print(f"{name:12} taker {taker}%  maker {maker}%  taker fee on ${NOTIONAL_USD:,}: ${cost:.2f}{flag}")
    print(f"{'':12} source: {src}")
print("checked:", data["checked"])

Download: cheapest_perp.py. The region check is a plain text match and is not legal advice; read each venue's terms.

3. Output from the current file (entry tier, $10,000 taker fill)

VenueTakerMakerTaker fee on $10,000TierSource
Lighter0%0%$0.00Standard account (default), regular ordersofficial
Aster0.04%0%$4.00Perpetuals, Crypto - General pairs, base VIP rateofficial
Hyperliquid0.045%0.015%$4.50Tier 0 (14-day weighted volume up to $5M), perps, base rateofficial
dYdX0.05%0.01%$5.00Tier 1 (30-day trailing volume under $1M)official

Unconfirmed (skipped): Drift. With MY_REGION = "United States", every venue above is flagged as restricted.

4. Caveats the number alone hides

Fees are only part of trading cost (spread, slippage, funding, latency). Leveraged derivatives can cause large losses. Fees change often - verify on the official page before trading. Full table: /fees/.


Disclosure: this site contains referral links and MoneyTools earns a commission when you sign up or pay through them. MoneyTools also operates x402 Pay-Precheck and earns revenue from its paid calls. Nothing here is investment, financial or legal advice. Region restrictions apply (e.g. the United States) - follow each service's terms and your local law. Last updated 2026-11-03.