{"openapi":"3.1.0","info":{"title":"Poker Study AI preflop ranges","version":"1","description":"schemaVersion 1. sizeBb, stacks, blinds, and ante are big blinds. evs are small blinds (evUnit sb) relative to folding (evBaseline fold, fold EV is 0). Two small blinds are one big blind; evs are not rescaled. An omitted hand weight means 0. full=1 writes all 169 hold'em hands with explicit 0. A size code 40000+pct is a raise of pct percent of the pot after calling (blinds and a dead ante are in the pot): raiseTo = currentBet + (pct/100) * potAfterCall. Codes 0/1/3/5/14 are fold/call/all-in/min/3sb. Published nlmtt8 bundles store sizeBb and sizePctPot on each raise. openSizes on /config is the pack listing (2.2x rounds the decoded 2.19bb)."},"servers":[{"url":"https://www.pokerstudy.ai","description":"pokerdata.io/api/v1/ranges proxies these /api/ranges paths."}],"paths":{"/api/ranges/{game}/node":{"get":{"operationId":"getNode","summary":"Decision at a preflop node","parameters":[{"name":"game","in":"path","required":true,"schema":{"type":"string","enum":["nl","nl/v2","nl9","nlmtt8","plo","plo4hu","plo9","plo5","plo6hu"]}},{"name":"stack","in":"query","required":true,"schema":{"type":"number"},"description":"Stack depth in big blinds."},{"name":"history","in":"query","required":true,"schema":{"type":"string"},"description":"Action path ending in the position to act."},{"name":"hand","in":"query","required":false,"schema":{"type":"string"},"description":"Optional hand class, e.g. AKs."},{"name":"minFreq","in":"query","required":false,"schema":{"type":"number"},"description":"Drop weights at or below this frequency. Does not punch holes when full=1."},{"name":"full","in":"query","required":false,"schema":{"const":"1"},"description":"Hold'em: return all 169 hands with explicit 0 weights."}],"responses":{"200":{"description":"Actions at the node. Weights omit hands at frequency 0 unless full=1.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"},"example":{"schemaVersion":1,"units":{"stack":"bb","sizeBb":"bb","sizePctPot":"percent_of_pot_after_call","evs":"sb"},"game":"nlmtt8","stack":40,"history":"UTG_Fold_UTG1_Fold_LJ_Fold_HJ_Fold_CO_Fold_BTN","actor":"BTN","evUnit":"sb","evBaseline":"fold","actions":[{"action":"Fold","kind":"fold","weights":{"72o":1},"evs":{"72o":0}},{"action":"Open","kind":"raise","sizeBb":2.19,"sizePctPot":34,"weights":{"AA":1},"evs":{"AA":23.27}}]}}}}}}},"/api/ranges/{game}/range":{"get":{"operationId":"getRange","summary":"Range for one action","parameters":[{"name":"game","in":"path","required":true,"schema":{"type":"string","enum":["nl","nl/v2","nl9","nlmtt8","plo","plo4hu","plo9","plo5","plo6hu"]}},{"name":"stack","in":"query","required":true,"schema":{"type":"number"},"description":"Stack depth in big blinds."},{"name":"spot","in":"query","required":true,"schema":{"type":"string"},"description":"Action path ending in the action, e.g. UTG_Open."},{"name":"hand","in":"query","required":false,"schema":{"type":"string"},"description":"Optional hand class, e.g. AKs."},{"name":"minFreq","in":"query","required":false,"schema":{"type":"number"},"description":"Drop weights at or below this frequency. Does not punch holes when full=1."}],"responses":{"200":{"description":"One action's weights and, when the bundle stored them, its raise-to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Range"}}}}}}},"/api/ranges/{game}/config":{"get":{"operationId":"getConfig","summary":"Table config for one stack","parameters":[{"name":"game","in":"path","required":true,"schema":{"type":"string","enum":["nl","nl/v2","nl9","nlmtt8","plo","plo4hu","plo9","plo5","plo6hu"]}},{"name":"stack","in":"query","required":true,"schema":{"type":"number"},"description":"Stack depth in big blinds."}],"responses":{"200":{"description":"Seats, stacks, blinds, ante, open sizes, and which fields are unverified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"},"example":{"schemaVersion":1,"units":{"stack":"bb","stacks":"bb","blinds":"bb","ante":"bb","openSizes":"bb","evs":"sb"},"game":"nlmtt8","stack":40,"seats":["UTG","UTG1","LJ","HJ","CO","BTN","SB","BB"],"stacks":[40,40,40,40,40,40,40,40],"blinds":{"sb":0.5,"bb":1},"ante":1,"antePostedBy":"BB","stackIncludesAnte":true,"treeSizes":null,"openSizes":{"open":{"label":"2.2x","sizeBb":2.2},"sb":{"label":"2.8x","sizeBb":2.8},"note":null},"evUnit":"sb","evBaseline":"fold","unverified":[{"field":"treeSizes","reason":"Raise sizes are on each action of a node (sizeBb, sizePctPot, and the existing sizePct label). There is no separate tree-wide size list in the stored bundles."}]}}}}}}}},"components":{"schemas":{"Units":{"type":"object","description":"Unit of each numeric field. bb = big blinds. sb = small blinds. percent_of_pot_after_call is the pct in a 40000+pct size code.","properties":{"stack":{"const":"bb"},"sizeBb":{"const":"bb"},"sizePctPot":{"const":"percent_of_pot_after_call"},"evs":{"enum":["sb","none"]},"ante":{"const":"bb"},"blinds":{"const":"bb"},"openSizes":{"const":"bb"}}},"Action":{"type":"object","properties":{"action":{"type":"string","examples":["Fold","Open","60%"]},"kind":{"type":"string","enum":["fold","call","raise","allin","other"]},"sizeBb":{"type":["number","null"],"description":"Raise-to in big blinds. Null when the stored action has no size code."},"sizePctPot":{"type":["number","null"],"description":"Percent of the pot after calling. Null for all-in and absolute sizes."},"sizeReason":{"type":"string","description":"Why sizeBb and sizePctPot are null."},"weights":{"type":"object","additionalProperties":{"type":"number"},"description":"Hand class → frequency in [0, 1]. Omitted key means weight 0, except when full=1."},"evs":{"type":"object","additionalProperties":{"type":"number"},"description":"Hand class → EV in small blinds, relative to fold (0). Only hands the bundle scored."}}},"Node":{"type":"object","required":["schemaVersion","game","stack","history","actor","actions","units"],"properties":{"schemaVersion":{"const":1},"units":{"$ref":"#/components/schemas/Units"},"game":{"type":"string"},"stack":{"type":"number","description":"Stack depth in big blinds."},"history":{"type":"string"},"actor":{"type":"string"},"evUnit":{"type":["string","null"],"enum":["sb","bb",null],"description":"Unit of evs. sb when the bundle stores per-hand EV. null on NL v1 (no EV)."},"evBaseline":{"type":["string","null"],"enum":["fold",null],"description":"fold when every stored fold EV is 0."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"}}}},"Range":{"type":"object","properties":{"schemaVersion":{"const":1},"units":{"$ref":"#/components/schemas/Units"},"game":{"type":"string"},"stack":{"type":"number"},"spot":{"type":"string"},"sizeBb":{"type":["number","null"]},"sizePctPot":{"type":["number","null"]},"weights":{"type":"object","additionalProperties":{"type":"number"}},"evs":{"type":"object","additionalProperties":{"type":"number"}}}},"Config":{"type":"object","required":["schemaVersion","units","game","stack","unverified"],"properties":{"schemaVersion":{"const":1},"units":{"$ref":"#/components/schemas/Units"},"game":{"type":"string"},"stack":{"type":"number","description":"Requested depth in big blinds."},"seats":{"type":["array","null"],"items":{"type":"string"}},"stacks":{"type":["array","null"],"items":{"type":"number"},"description":"Starting stack of each seat, in bb, in seats order."},"blinds":{"type":["object","null"],"properties":{"sb":{"type":"number"},"bb":{"type":"number"}}},"ante":{"type":["number","null"],"description":"Dead ante in bb."},"antePostedBy":{"type":["string","null"],"enum":["BB","SB",null]},"stackIncludesAnte":{"type":["boolean","null"],"description":"True when the named depth is the starting stack and the ante is posted from it."},"treeSizes":{"type":["array","null"],"items":{"type":"string"}},"openSizes":{"type":["object","null"],"description":"Pack listing of first-in raise-to sizes, in bb. nlmtt8 only.","properties":{"open":{"$ref":"#/components/schemas/OpenSize"},"sb":{"$ref":"#/components/schemas/OpenSize"},"note":{"type":["string","null"]}}},"evUnit":{"type":["string","null"]},"evBaseline":{"type":["string","null"]},"importedAt":{"type":["string","null"]},"availableStacks":{"type":"array","items":{"type":"number"}},"unverified":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}}}}}},"OpenSize":{"type":"object","properties":{"label":{"type":"string","examples":["all-in","2x","2x","2x","2.2x","2.2x","2.5x","2.25x","2.5x","2.5x"]},"sizeBb":{"type":["number","null"],"description":"Raise-to in big blinds."}}}}}}