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

# List monitor types

> Every monitor type you can create, with the JSON Schema its parameters must satisfy

export const MonitorsExperimental = () => <Warning>
    <strong>Monitors is experimental.</strong> Request and payload shapes can change without a deprecation window. Monitors isn't recommended for production workflows.
  </Warning>;

<MonitorsExperimental />

## Notes

* To authenticate, you'll need a [Tako API key](https://tako.com/console/api-keys). It's best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
* **Start here.** A monitor's `parameters` are validated against its type's schema, so read the type before you call [Create a monitor](/api-reference/monitors-create). This response is the authoritative list — the table below orients you, but a type added since this page was written appears only in the response.
* Each item carries `parameters_schema` (the JSON Schema `parameters` must satisfy), `description` (what the type watches and when it fires), `lookback_seconds` (how far back an occurrence may have happened and still fire), `subject_schema` (the shape of the resolved subject the type echoes back), and `fire_once_only`.
* `firing_enabled` reports whether this environment runs the rail that evaluates monitors. While it's `false`, [Create a monitor](/api-reference/monitors-create) still accepts a monitor and the monitor stays `active`, but nothing evaluates it and nothing fires.

## The registered types

Type names are namespaced `domain.subtype`.

| Type                     | Fires when                                                                                                                                                                                               |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `stocks.pct_change`      | A stock's move over your `window` reaches `threshold` percent in `direction`. The move is measured from the reference close at the start of the window, not from the price when you created the monitor. |
| `stocks.crosses`         | A stock's price crosses the `level` you set, measured against the prior session's close. A close sitting exactly on the level hasn't passed it.                                                          |
| `stocks.new_52w_extreme` | A stock passes the highest or lowest daily close of the 365 days before the current session, in `direction`. The extreme has to be passed, not matched.                                                  |
| `sports.game_start`      | A game for the team you watch starts. Stamped at the **scheduled** start, so a monitor created after that time never fires for that game — even if the real start was delayed.                           |
| `sports.game_result`     | A game for the team you watch ends in your `outcome`, by at least `margin` when you set one. A tie matches neither outcome.                                                                              |
| `sports.score_event`     | The team you watch scores, while a game is live or final. The opponent scoring doesn't fire it. NBA teams aren't accepted — watch those with `sports.game_result`.                                       |
| `sports.odds_crosses`    | A named game's line reaches the level you set.                                                                                                                                                           |

<Note>
  `stocks.pct_change` and `stocks.new_52w_extreme` are **state alerts**: a monitor you create while its condition already holds fires on the first bar that ends after creation, not only on a later change. On a delayed feed, that bar arrives as late as the feed's delay.
</Note>

## Finding a subject

The three team types take a `team_id` and `sports.odds_crosses` takes a `game_id`. Both come from [List sports games](/api-reference/sports-games) — a row's `home.id` and `away.id` are team ids, and its `id` is the game id.


## OpenAPI

````yaml GET /v1/monitor_types
openapi: 3.1.0
info:
  title: Knowledge Search API
  version: 1.0.0
servers:
  - url: https://tako.com/api/
    description: Tako Production API Server
security: []
paths:
  /v1/monitor_types:
    get:
      tags:
        - monitors
      summary: List monitor types
      description: >-
        Every registered monitor type, with the JSON Schema its parameters must
        satisfy. Each schema's description says what that type watches and when
        it fires. stocks.pct_change and stocks.new_52w_extreme are state alerts:
        a monitor you create while its condition already holds fires on the
        first bar that ends after creation, not only on a later change.


        **Experimental.** Request and payload shapes can change without a
        deprecation window. Monitors isn't recommended for production workflows.
      operationId: listMonitorTypes
      responses:
        '200':
          description: Every registered monitor type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorTypeList'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAPIError'
      security:
        - apiKey: []
components:
  schemas:
    MonitorTypeList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/MonitorTypeInfo'
          type: array
          title: Items
        firing_enabled:
          type: boolean
          title: Firing Enabled
          description: >-
            Whether this environment runs the rail that fires monitors. While it
            is false, createMonitor still accepts a monitor and the monitor
            stays active, but nothing evaluates it and it reports no firings.
      type: object
      required:
        - items
        - firing_enabled
      title: MonitorTypeList
    BaseAPIError:
      properties:
        error_message:
          type: string
          title: Error Message
        error_type:
          $ref: '#/components/schemas/APIErrorType'
      type: object
      required:
        - error_message
        - error_type
      title: BaseAPIError
    MonitorTypeInfo:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
          description: One sentence on what the type watches, from its docstring.
        parameters_schema:
          additionalProperties: true
          type: object
          title: Parameters Schema
          description: JSON Schema for the parameters createMonitor accepts.
        lookback_seconds:
          type: integer
          title: Lookback Seconds
          description: How far back an occurrence may have happened and still fire.
        fire_once_only:
          type: boolean
          title: Fire Once Only
          description: >-
            Whether this type reports an occurrence that stays true once it
            happens. When it is true, createMonitor accepts only fire_once=true.
        subject_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Subject Schema
          description: >-
            JSON Schema for the resolved subject this type echoes, and for each
            entry in candidates.
      type: object
      required:
        - name
        - description
        - parameters_schema
        - lookback_seconds
        - fire_once_only
      title: MonitorTypeInfo
    APIErrorType:
      type: string
      enum:
        - BAD_REQUEST
        - AUTHENTICATION_ERROR
        - INTERNAL_SERVER_ERROR
        - RELEVANT_RESULTS_NOT_FOUND
        - RATE_LIMIT_EXCEEDED
        - PAYMENT_REQUIRED
        - REQUEST_TIMEOUT
        - FORBIDDEN
        - NOT_FOUND
        - SERVICE_UNAVAILABLE
        - SERVICE_OVERLOADED
        - UNSUPPORTED_CONTENT_FORMAT
      title: APIErrorType
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-Key
      in: header

````