{
  "info": {
    "name": "PokerWorks Calculation API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Generated from contracts/public/calculation-api.openapi.json. Product keys are server-side credentials."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{productKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.pokerworks.io",
      "type": "string",
      "description": "PokerWorks API origin."
    },
    {
      "key": "productKey",
      "value": "pw_test_replace_with_your_product_key",
      "type": "string",
      "description": "Server-side PokerWorks product key. Do not publish it in browser/mobile code."
    }
  ],
  "item": [
    {
      "name": "Calculations",
      "item": [
        {
          "name": "Plan starting chip stacks",
          "description": "Calculate a physical chip starting-stack plan",
          "request": {
            "body": {
              "mode": "raw",
              "raw": "{\n  \"denominations\": [\n    {\n      \"value\": 1\n    }\n  ],\n  \"firstBigBlind\": 1,\n  \"firstSmallBlind\": 1,\n  \"players\": 2,\n  \"startingStack\": 1,\n  \"targetStyle\": \"efficient\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/v1/calculations/chips/starting-stack",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "calculations", "chips", "starting-stack"]
            }
          }
        },
        {
          "name": "Calculate Hold'em equity",
          "description": "Calculate Texas Holdem equity for exact hands or ranges",
          "request": {
            "body": {
              "mode": "raw",
              "raw": "{\n  \"players\": [\n    {\n      \"hand\": [\n        \"{{hand}}\"\n      ],\n      \"id\": \"{{id}}\",\n      \"mode\": \"hand\"\n    },\n    {\n      \"hand\": [\n        \"{{hand}}\"\n      ],\n      \"id\": \"{{id}}\",\n      \"mode\": \"hand\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/v1/calculations/equity/holdem",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "calculations", "equity", "holdem"]
            }
          }
        },
        {
          "name": "Calculate an ICM deal",
          "description": "Calculate an ICM final-table deal comparison",
          "request": {
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payouts\": [\n    {\n      \"amount\": 0,\n      \"place\": 1\n    }\n  ],\n  \"players\": [\n    {\n      \"id\": \"{{id}}\",\n      \"stack\": 1\n    },\n    {\n      \"id\": \"{{id}}\",\n      \"stack\": 1\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/v1/calculations/icm/deal",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "calculations", "icm", "deal"]
            }
          }
        },
        {
          "name": "Calculate a blind structure",
          "description": "Calculate a tournament blind structure",
          "request": {
            "body": {
              "mode": "raw",
              "raw": "{\n  \"anteStyle\": \"none\",\n  \"levelDurationMinutes\": 5,\n  \"pace\": \"gentle\",\n  \"players\": 2,\n  \"rebuys\": {\n    \"enabled\": false,\n    \"endsAfterLevel\": 1\n  },\n  \"startingStack\": 500,\n  \"targetDurationMinutes\": 30\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/v1/calculations/tournaments/blinds",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "calculations", "tournaments", "blinds"]
            }
          }
        },
        {
          "name": "Calculate tournament payouts",
          "description": "Calculate a tournament payout structure",
          "request": {
            "body": {
              "mode": "raw",
              "raw": "{\n  \"entrants\": 2,\n  \"paidPlaces\": \"auto\",\n  \"prizePool\": {\n    \"entryValue\": 0\n  },\n  \"rounding\": {\n    \"mode\": \"auto\",\n    \"residualPolicy\": \"first-place\"\n  },\n  \"style\": \"friendly\",\n  \"unit\": \"chips\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/v1/calculations/tournaments/payouts",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "calculations", "tournaments", "payouts"]
            }
          }
        }
      ]
    },
    {
      "name": "Health",
      "item": [
        {
          "name": "Check Calculation API health",
          "description": "Check whether the PokerWorks Calculation API edge is accepting requests. This response intentionally omits internal dependency names and readiness diagnostics.",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/v1/health",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "health"]
            }
          }
        }
      ]
    },
    {
      "name": "Usage",
      "item": [
        {
          "name": "Get current API usage",
          "description": "List usage and credit balance for the authenticated product key",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/v1/usage?limit={{limit}}",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "usage"],
              "query": [
                {
                  "key": "limit",
                  "value": "{{limit}}",
                  "description": "Maximum recent requests to return for the authenticated product-key environment current period. Defaults to 25."
                }
              ]
            }
          }
        }
      ]
    }
  ]
}
