openapi: 3.0.0 info: title: Kalshi Trade API Manual Endpoints account API version: 3.19.0 description: Manually defined OpenAPI spec for endpoints being migrated to spec-first approach servers: - url: https://external-api.kalshi.com/trade-api/v2 description: Production Trade API server - url: https://api.elections.kalshi.com/trade-api/v2 description: Production shared API server, also supported - url: https://external-api.demo.kalshi.co/trade-api/v2 description: Demo Trade API server - url: https://demo-api.kalshi.co/trade-api/v2 description: Demo shared API server, also supported tags: - name: account paths: /account/limits: get: operationId: GetAccountApiLimits summary: Get Account API Limits description: ' Endpoint to retrieve the API tier limits associated with the authenticated user.' tags: - account security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] responses: '200': description: Account API tier limits retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetAccountApiLimitsResponse' '401': description: Unauthorized '500': description: Internal server error /account/endpoint_costs: get: operationId: GetAccountEndpointCosts summary: List Non-Default Endpoint Costs description: Lists API v2 endpoints whose configured token cost differs from the default cost. Endpoints that use the default cost are omitted. tags: - account responses: '200': description: Non-default endpoint costs retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetAccountEndpointCostsResponse' '500': description: Internal server error components: schemas: GetAccountEndpointCostsResponse: type: object required: - default_cost - endpoint_costs properties: default_cost: type: integer description: Default token cost applied to endpoints that are not listed in `endpoint_costs`. This is currently 10. endpoint_costs: type: array description: API v2 endpoints whose configured token cost differs from `default_cost`. Endpoints that use the default cost are omitted. items: $ref: '#/components/schemas/EndpointTokenCost' GetAccountApiLimitsResponse: type: object required: - usage_tier - read - write properties: usage_tier: type: string description: User's API usage tier. read: $ref: '#/components/schemas/BucketLimit' write: $ref: '#/components/schemas/BucketLimit' BucketLimit: type: object description: 'Token-bucket budget for one rate-limit bucket. Each request deducts tokens equal to its endpoint cost; the bucket refills at refill_rate tokens per second up to bucket_capacity. A request is allowed if the bucket holds enough tokens to cover its cost; otherwise the request is rejected with HTTP 429. ' required: - refill_rate - bucket_capacity properties: refill_rate: type: integer description: Tokens added to the bucket per second. bucket_capacity: type: integer description: 'Maximum tokens the bucket can hold. When equal to refill_rate the bucket holds one second of budget; larger values represent burst headroom that idle clients accumulate and can spend in a single pulse (e.g. write buckets at non-Basic tiers hold two seconds of budget). ' EndpointTokenCost: type: object required: - method - path - cost properties: method: type: string description: HTTP method for the endpoint. path: type: string description: API route path for the endpoint. cost: type: integer description: Configured token cost for an endpoint whose cost differs from the default cost. securitySchemes: kalshiAccessKey: type: apiKey in: header name: KALSHI-ACCESS-KEY description: Your API key ID kalshiAccessSignature: type: apiKey in: header name: KALSHI-ACCESS-SIGNATURE description: RSA-PSS signature of the request kalshiAccessTimestamp: type: apiKey in: header name: KALSHI-ACCESS-TIMESTAMP description: Request timestamp in milliseconds