AnonGTO API

Batch GTO Hand History Analysis With Webhooks

How to analyze thousands of poker hand history decisions automatically using batch GTO solving, HMAC-signed webhooks, EV loss grading, and spot caching.

A single 2-hour online poker session produces 200 to 600 non-trivial decisions. If you are building a hand history analyzer or automated leak finder, calling a synchronous solve endpoint one decision at a time from a web request will time out, burn concurrency slots, and make your users stare at a spinner.

The right architecture is asynchronous batch solving with signed webhooks—paired with a spot cache so common decisions are never paid for twice.

The batch analysis pipeline

  1. Parse the hand history into individual decision points (table setup, preflop action sequence, board cards, and street actions).
  2. Check your spot cache using a normalized hash of the request body. Preflop spots and common flop c-bet nodes hit cache at a very high rate.
  3. Submit cache misses as one batch to POST https://api.anongto.com/v1/batches with a webhook_url and your internal session_id in metadata.
  4. Verify the batch.completed webhook using the AnonGTO-Signature HMAC-SHA256 header.
  5. Page through GET /v1/batches/{id}/results, store each solved spot in your cache, and grade every hero decision by EV loss.

Why batches beat concurrent live calls

Batch items run in the background at low priority:

  • They do not consume your per-minute rate limit or live concurrency, so interactive users on your site stay fast.
  • Failed or invalid spots in a batch do not count against your daily quota.
  • If a huge upload hits your daily quota mid-way, the batch enters waiting_for_quota and automatically resumes after 00:00 UTC.

Grading a hero decision by EV loss

Frequency alone is a noisy grading metric: sometimes a hand mixes 50/50 between checking and betting with identical EV, while other times a 0% frequency play loses 1.8 bb immediately. Always grade on both frequency and EV gap:

def grade_decision(solve_res: dict, hero_combo: str, hero_action: str) -> dict:
    hand = solve_res["hands"].get(hero_combo)
    if not hand:
        return {"verdict": "out_of_range", "ev_loss_bb": None}

    strategy = hand["strategy"]
    freq = strategy.get(hero_action, 0.0)
    best_action = max(strategy, key=strategy.get)

    # Compare hero's action EV against the optimal line's EV
    action_evs = hand.get("action_evs", {})
    best_ev = max(action_evs.values()) if action_evs else hand["ev_bb"]
    picked_ev = action_evs.get(hero_action, hand["ev_bb"])
    ev_loss = max(0.0, best_ev - picked_ev)

    if ev_loss < 0.05 or freq >= 0.25:
        verdict = "good"
    elif ev_loss < 0.25:
        verdict = "inaccuracy"
    elif ev_loss < 0.75:
        verdict = "mistake"
    else:
        verdict = "blunder"

    return {
        "verdict": verdict,
        "ev_loss_bb": round(ev_loss, 3),
        "gto_freq": round(freq, 3),
        "best_action": best_action,
    }

Scaling to 10,000+ hands per day

  • Deduplicate across users. Two players facing a BTN 2.5bb open from the BB on Jh 9s 4d share the exact same solve response. Storing solved spots keyed by canonical request JSON turns linear API spend into logarithmic spend as your user base grows.
  • Pick the right plan. Builder ($49/mo) supports batches up to 500 spots (2,000 solves/day), Pro ($199/mo) supports 2,000 spots/batch (10,000 solves/day), and Business ($799/mo) supports 50,000 solves/day.

See the complete Flask webhook verification walkthrough in our Batch Hand Review Guide, or explore the Hand Review Use Case.

Try it with a free API key

100 solves a day, every endpoint, no card required. Wire the solver into your poker app, trainer, or bot in minutes.

More from the engineering blog