> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aioka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Regime History

> Paginated regime detection history (last 7 days)

<Note>
  To use the playground, enter your API key in the **X-API-Key** field above.
  Requires BASIC tier key (\$49/mo). Contact [info@aioka.io](mailto:info@aioka.io) to upgrade.
</Note>

**Tier:** Basic (\$49/mo) 🔒
**Cache TTL:** 300 seconds

<RequestExample>
  ```bash curl theme={null}
  curl "https://api.aioka.io/v1/regime/history?page=1&per_page=48" \
    -H "X-API-Key: aik_basic_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "regimes": [
      {
        "regime": "BULL_TRENDING",
        "confidence": 0.84,
        "recorded_at": "2026-04-03T10:00:00Z"
      }
    ],
    "total": 336,
    "page": 1,
    "per_page": 48,
    "cached": false,
    "cache_ttl_seconds": 300
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/regime/history
openapi: 3.1.0
info:
  title: AIOKA Intelligence API
  description: |

    ## AI-powered crypto market intelligence

    AIOKA Intelligence API provides real-time access to our AI Council verdicts,
    market signals, regime detection, and Ghost Trader entry signals.

    ### Tiers
    - **Free**: 100 calls/day — Verdict + Regime
    - **Basic** ($49/mo): 1,000 calls/day — + Signals
    - **Pro** ($199/mo): 10,000 calls/day — + Council + Ghost

    ### Authentication
    Pass your API key in the `X-API-Key` header:

    ```
    X-API-Key: aik_free_xxxxxxxxxxxx
    ```

    ### Get your API key
    `POST /v1/keys/generate` (free tier, no credit card)
  contact:
    name: AIOKA Support
    url: https://docs.aioka.io/
    email: api@aioka.io
  license:
    name: Commercial
    url: https://aioka.io/terms
  version: 1.0.0
servers:
  - url: https://api.aioka.io
    description: Production — AIOKA Intelligence API
security: []
paths:
  /v1/regime/history:
    get:
      tags:
        - Regime
      summary: Regime History (last 7 days)
      description: |-
        Returns paginated regime detection history.

        **Tier:** Basic ($49/mo) 🔒
        **Cache TTL:** 300 seconds
        **Rate limit:** 1,000 calls/day, 30/minute
      operationId: get_regime_history_v1_regime_history_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 48
            title: Per Page
      responses:
        '200':
          description: Regime history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegimeHistoryResponse'
        '401':
          description: Invalid or missing API key
        '403':
          description: Basic tier required
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      security:
        - APIKeyHeader: []
components:
  schemas:
    RegimeHistoryResponse:
      properties:
        regimes:
          items:
            $ref: '#/components/schemas/RegimeHistoryItem'
          type: array
          title: Regimes
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        per_page:
          type: integer
          title: Per Page
        cached:
          type: boolean
          title: Cached
        cache_ttl_seconds:
          type: integer
          title: Cache Ttl Seconds
      type: object
      required:
        - regimes
        - total
        - page
        - per_page
        - cached
        - cache_ttl_seconds
      title: RegimeHistoryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RegimeHistoryItem:
      properties:
        regime:
          type: string
          title: Regime
        confidence:
          type: number
          title: Confidence
        recorded_at:
          type: string
          format: date-time
          title: Recorded At
      type: object
      required:
        - regime
        - confidence
        - recorded_at
      title: RegimeHistoryItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: 'Your AIOKA Intelligence API key (format: aik_{tier}_{random})'
      in: header
      name: X-API-Key

````