{
  "info": {
    "_postman_id": "0fd26cc7-57e4-4bc5-9493-d91766880f30",
    "name": "TradePolaris Data API",
    "description": "Generated from kappa-data-api-contract.json. Private-preview, read-only, trusted-server integration requests. Do not put apiKey in a shared environment export.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "if (!pm.collectionVariables.get(\"apiKey\")) {",
          "  throw new Error(\"Set the private apiKey collection variable before sending requests\");",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.tradepolaris.com/platform/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string",
      "description": "Private show-once key; keep it out of shared collection exports."
    },
    {
      "key": "datasetName",
      "value": "demo-equity-daily",
      "type": "string"
    },
    {
      "key": "version",
      "value": "7",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "list-datasets",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/datasets?q=example&asset_class=equity&limit=500&offset=0",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "datasets"
          ],
          "query": [
            {
              "key": "q",
              "value": "example",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "asset_class",
              "value": "equity",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "500",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            },
            {
              "key": "offset",
              "value": "0",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            }
          ]
        },
        "description": "Generated operation list-datasets. Parameters and route come from public contract 1.0.0-beta.1. Keep the collection-level bearer key private."
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test(\"HTTP 200\", function () { pm.response.to.have.status(200); });",
              "pm.test(\"request id is present\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Request-ID\")).to.match(/^[0-9a-f-]{36}$/i);",
              "});",
              "pm.test(\"catalog pagination signal is explicit\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Has-More\")).to.match(/^(true|false)$/);",
              "});"
            ]
          }
        }
      ]
    },
    {
      "name": "preview-dataset",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/datasets/{{datasetName}}/preview?version={{version}}&max_points=500",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "datasets",
            "{{datasetName}}",
            "preview"
          ],
          "query": [
            {
              "key": "version",
              "value": "{{version}}",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "max_points",
              "value": "500",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            }
          ]
        },
        "description": "Generated operation preview-dataset. Parameters and route come from public contract 1.0.0-beta.1. Keep the collection-level bearer key private."
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test(\"HTTP 200\", function () { pm.response.to.have.status(200); });",
              "pm.test(\"request id is present\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Request-ID\")).to.match(/^[0-9a-f-]{36}$/i);",
              "});"
            ]
          }
        }
      ]
    },
    {
      "name": "inspect-schema",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/datasets/{{datasetName}}/schema?version={{version}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "datasets",
            "{{datasetName}}",
            "schema"
          ],
          "query": [
            {
              "key": "version",
              "value": "{{version}}",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            }
          ]
        },
        "description": "Generated operation inspect-schema. Parameters and route come from public contract 1.0.0-beta.1. Keep the collection-level bearer key private."
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test(\"HTTP 200\", function () { pm.response.to.have.status(200); });",
              "pm.test(\"request id is present\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Request-ID\")).to.match(/^[0-9a-f-]{36}$/i);",
              "});"
            ]
          }
        }
      ]
    },
    {
      "name": "query-rows",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/datasets/{{datasetName}}/query?version={{version}}&symbol=DEMO&start=2026-01-01&end=2026-01-31&as_of=2026-01-31&columns=date,symbol,close&limit=500&offset=0&tail=false&format=json",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "datasets",
            "{{datasetName}}",
            "query"
          ],
          "query": [
            {
              "key": "version",
              "value": "{{version}}",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "symbol",
              "value": "DEMO",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "start",
              "value": "2026-01-01",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "end",
              "value": "2026-01-31",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "as_of",
              "value": "2026-01-31",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "columns",
              "value": "date,symbol,close",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "500",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            },
            {
              "key": "offset",
              "value": "0",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            },
            {
              "key": "tail",
              "value": "false",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            },
            {
              "key": "format",
              "value": "json",
              "description": "Optional; generated from the public contract.",
              "disabled": false
            }
          ]
        },
        "description": "Generated operation query-rows. Parameters and route come from public contract 1.0.0-beta.1. Keep the collection-level bearer key private."
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test(\"HTTP 200\", function () { pm.response.to.have.status(200); });",
              "pm.test(\"request id is present\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Request-ID\")).to.match(/^[0-9a-f-]{36}$/i);",
              "});"
            ]
          }
        }
      ]
    },
    {
      "name": "export-version",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/datasets/{{datasetName}}/export?version={{version}}&as_of=2026-01-31",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "datasets",
            "{{datasetName}}",
            "export"
          ],
          "query": [
            {
              "key": "version",
              "value": "{{version}}",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            },
            {
              "key": "as_of",
              "value": "2026-01-31",
              "description": "Optional; generated from the public contract.",
              "disabled": true
            }
          ]
        },
        "description": "Generated operation export-version. Parameters and route come from public contract 1.0.0-beta.1. The returned URL is a bearer artifact: download it separately without inherited collection auth."
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test(\"HTTP 200\", function () { pm.response.to.have.status(200); });",
              "pm.test(\"request id is present\", function () {",
              "  pm.expect(pm.response.headers.get(\"X-Request-ID\")).to.match(/^[0-9a-f-]{36}$/i);",
              "});",
              "pm.test(\"export is pinned and checksummed\", function () {",
              "  const body = pm.response.json();",
              "  pm.expect(body.version).to.eql(Number(pm.collectionVariables.get(\"version\")));",
              "  pm.expect(body.content_sha256).to.match(/^[a-f0-9]{64}$/);",
              "});"
            ]
          }
        }
      ]
    }
  ]
}
