Skip to main content
This page is a complete reference for building against Tako monitors. It’s written for coding agents and for developers who want the whole contract on one page. Every request runs after you supply an API key. The parameters and response fields match the live API, and the common mistakes have their own table. For the generated schemas, see the API reference, starting at Create a monitor. For the request Tako posts when a monitor fires, see Webhook deliveries. For an introduction, see the Overview.

What monitors do

A monitor watches Tako data for a condition. When the condition occurs, Tako records a firing and posts a signed request to each notification channel on the monitor.
  • Base URL: https://tako.com/api/
  • Auth: every endpoint on this page takes your API key in the X-API-Key request header. Create a key in the Tako console.
  • Rate limits: the monitors and notification channels endpoints allow 120 calls per minute, and 20,000 per day, per user. GET /v1/sports/games allows 60 calls per minute, and 5,000 per day. If you get a 429, wait for the time in its Retry-After header when it has one. Otherwise, back off with jittered exponential retry.
  • Limits: by default, you can hold 1 active monitor and 2 notification channels. Tako counts these limits per user, not across an account. A LIMIT_REACHED response’s limit gives your cap.
  • Endpoints:

Minimal working example

This script monitors AAPL for a 3% daily rise, as in the Overview. It creates a channel and a monitor, then reads the monitor back. It needs curl and jq, and a TAKO_API_KEY environment variable. Replace the URL with an https endpoint that you control.

Notification channels

A notification channel is an https endpoint that Tako posts firings to. Create the channel before the monitor that uses it. The 201 response is the only response that holds secret. Tako signs every delivery to the channel with it. See Verify the signature. If you lose the secret, delete the channel and create a new one. Tako pauses a channel after 2 consecutive failed deliveries, and sets its status_reason to delivery_failures. Monitors that post to a paused channel keep recording firings, and no one receives them. To resume the channel, fix the endpoint, then send PATCH /v1/notification_channels/{id} with {"status": "active"}.

Monitor types

Call GET /v1/monitor_types before you create a monitor. The response is the authoritative list, and each item holds these fields: The response also holds firing_enabled. While it’s false, the environment accepts monitors and evaluates none of them.
stocks.pct_change and stocks.new_52w_extreme are state alerts. If you create one while its condition already holds, the next price update fires it. stocks.crosses does the same when the price has already crossed your level. On a delayed feed, that update arrives as late as the feed’s delay. crypto.crosses, forex.crosses, and sports.odds_crosses work the other way: if the price or the line has already reached your level, the create fails.

Create a monitor

POST /v1/monitors takes these fields:

Check the resolved subject

Tako resolves your parameters to one subject when you create the monitor, and never resolves them again. Every monitor response holds that subject in subject. Check it before you rely on the monitor.
parameters comes back in the form that you send, with names as Tako resolved them. A ticker that you sent as aapl reads back as AAPL, with the exchange that Tako picked. A crypto monitor reads back its asset as a coinmarketcap_id, whichever name you created it with.

Handle a rejected create

A 400 response holds an error_type:

Name a sports subject

Sports monitors take ids from GET /v1/sports/games. Each row’s id is a game_id, and its home.id and away.id are team ids. This script monitors every 49ers win, as in the Overview. It finds the 49ers’ team id, pauses the AAPL monitor to free the active monitor slot, then creates a sports.game_result monitor that follows the team. CHANNEL_ID is a channel that you created, and MONITOR_ID is the AAPL monitor from the Minimal working example.
The endpoint covers one day back to seven days ahead. A team’s id doesn’t change, so you can store it and reuse it when the team has no game in the window. Filter with league, team, status, from, and to. A row whose source is schedule_table comes from a schedule without a live feed, and a monitor rejects its ids. For sports.game_start, sports.game_result, and sports.score_event, the ids combine this way:
  • game_id alone watches the whole game, and each firing reports both sides.
  • team_id alone follows that team’s games as they come.
  • game_id and team_id together watch one team’s side of one game.

Receive a delivery

Each delivery is a POST with a JSON body and these headers: webhook-id, webhook-timestamp, and webhook-signature. Tako follows the Standard Webhooks specification. For the full body, the verification code, and the payload fields for each type, see Webhook deliveries. A receiver needs to do these things, in order:
  1. Verify webhook-signature against the raw request bytes, with the channel’s secret. Reject a webhook-timestamp more than 5 minutes from the current time.
  2. Skip a webhook-id that you’ve already stored. Every retry of one delivery sends the same id.
  3. Store the body, and respond with a 2xx within 10 seconds.
  4. Do the slow work after you respond.
If a delivery gets a 408, a 429, a 5xx, or no response, Tako retries it 5 times over about 4 hours. Tako doesn’t retry any other status, and doesn’t follow redirects. For the retry schedule, see How Tako retries.

Check a monitor that hasn’t fired

Read the monitor with GET /v1/monitors/{id}. last_evaluated_at says when Tako last evaluated it, and last_evaluation_outcome says what that evaluation found: For every outcome, see the last_evaluation_outcome schema in Get a monitor. If the monitor is paused, status_reason says why: fired_once, expired, completed, or unloadable. It’s null when you paused the monitor yourself.

Check deliveries

GET /v1/monitors/{id}/firings lists the monitor’s firings, newest first. Each firing holds deliveries, with one entry for each channel: The deliveries list covers the last 30 days. Tako removes a firing that’s older than its type’s lookback window.

Change or remove a monitor

PATCH /v1/monitors/{id} changes two fields, and nothing else:
  • status: set paused to stop evaluating the monitor, or active to resume it. If active_until has passed, resuming returns 400.
  • channel_ids: replace the monitor’s channels with this list.
To change a monitor’s type, parameters, or active window, delete the monitor and create a new one. Deleting a monitor also deletes its firings. To keep the history, pause the monitor instead.

Common mistakes

Avoid these. They’re the mistakes that coding agents make most often with monitors.

Errors

A 400, 401, or 404 returns { "error_message": "...", "error_type": "..." }. A 429 returns { "detail": "..." }.