io.github.outcometick/outcometick·Crypto

outcometick

Polymarket and Predict.fun historical tick data, plus backtest quotes and status, over MCP

Stars
0
Version
2.13.1
License
MIT
Review
Passed
Language
JavaScript
Last commit
1h ago
Forks
0
Open issues
0
Registry update
Oct 14, 2026
backtestingclipolymarketprediction-marketsquantitative-financesdktrading-strategytypescript

Connect

npm
Terminal
$claude mcp add outcometick \  -e OT_KEY=<ot-key> \  -e OT_BACKTEST_KEY=<ot-backtest-key> \  -- npx -y [email protected]

Environment variables

  • OT_KEYsecret

    Data subscription key, for meta, list_files and download_file. Public tools work without it.

  • OT_BACKTEST_KEYsecret

    Backtest key, for backtest_runs and backtest_status. Public tools work without it.

Security review

Review passed

Reviewed 23m ago.

metadata
scanned
packages
1 checked

No findings.

Tools

This server runs on your machine, so its tool list is not fetched before install — the README below describes what it offers.

outcometick

The TypeScript / JavaScript strategy SDK and the ot command line for outcometick.com — tick-level data for Polymarket and Predict.fun crypto Up/Down markets.

npm i -g outcometick

ot check .                                           # validate, free, no data
ot run . --data ./polymarket-data-samples            # replay locally
ot submit . --assets btc,eth --days 30               # send it to the queue
ot status <run_id>                                   # where it got to
ot fetch  <run_id>                                   # download the report

Breaking in 2.0: backtests cover only the most recent 35 archived days, and the window moves forward as days are archived. A --from before the window, or --days longer than it, is refused with E_SCOPE before anything is uploaded, and the message names the current window. Use --days <n> for the most recent n days; the current dates are at https://outcometick.com/v1/backtest/capacity?venue=polymarket.

Writing a strategy

Fully typed — ot ships .d.ts declarations, so a strategy that type-checks is one the queue will accept.

import { Strategy, Order, type Ctx, type Tick } from "outcometick";

export default class MeanReversion extends Strategy<{ entry_z: number; size: number }> {
  private entered = false;

  onMarketOpen() { this.entered = false; }

  onTick(ctx: Ctx<{ entry_z: number; size: number }>, tick: Tick): Order | null {
    const z = ctx.zscore(tick.value, { window: 180 });
    if (this.entered || Math.abs(z) < ctx.p.entry_z) return null;
    const side = z > 0 ? "DOWN" : "UP";
    const limit = ctx.book().best(side);
    if (limit === null) return null;
    this.entered = true;
    return new Order({ side, size: ctx.p.size, limit });
  }
}

Plain JavaScript works too — the runtime is ESM with no build step.

The point of ot check

It runs the same validator the queue runs — the same module, not a copy. If it passes locally it will not be rejected on submit. That is only true because there is one implementation, which is why the validator and the static analysers ship in this package rather than being reimplemented client-side.

What ot run is and is not

It is the same engine, the same report and the same archive format the queue uses, against a local copy of the archive:

curl -L https://github.com/outcometick/polymarket-tick-data-samples/releases/latest/download/polymarket-data-samples.tar.gz | tar xz

It is not the sandbox. Locally your strategy runs as you, with your privileges, on your machine — which is fine, because it is your code. On our machines it runs in a container with no network, no writable filesystem and a hard CPU and wall-clock budget.

Testing

npm install && npm test

Requires python3 on PATH: one of the two static analysers is written in Python, and the CLI drives it the same way the API does.

Downloading data

The other half of the package: a client for the data subscription, on a separate import because it has nothing to do with writing a strategy.

import { DataClient, NO_VALUE } from "outcometick/data";

const ot = new DataClient();                    // key from OT_KEY

const meta = await ot.meta();                   // what can this key see?

const { files } = await ot.files({
  from: "2026-08-01", to: "2026-08-12",         // or date: "2026-08-12"
  asset: ["BTC", "ETH"],                        // the BASE symbol, not BTCUSD
  dataset: "prices",
  interval: ["5m", NO_VALUE],                   // "5m" alone EXCLUDES the
});                                             // period-less settlement streams

await ot.download(files[0], { saveTo: files[0].name });   // checksum verified

meta() reports the dimensions this key can actually reach. Note that intervals holds real durations only — the none sentinel is reported separately under filterTokens, so a caller that builds an enum from it or parses the values as durations never meets a token.

Downloads are checksum-verified: /v1/dl redirects to storage with the sha256 in a header, and the client follows that redirect itself so the checksum is not thrown away.

Rebuilding a Polymarket order book

book and price_change are stored at a capture cadence, so a removal can fall between two stored frames and leave a stale level behind. OrderBook applies the documented rebuild rule: snapshots replace a token's ladder, changes set absolute sizes (0 removes), and levels crossed by the newest best bid/ask (from best_bid_ask and from each change) are dropped. Feed it rows from the three files merged by recv_ms.

import { OrderBook } from "outcometick/data";

const book = new OrderBook();
for (const row of rows) book.apply(row);       // parsed objects or JSONL lines
book.ladder(tokenId);                           // { bids: [{ price, size }], asks: [...] }, best first
book.best(tokenId);                             // { bid, ask }

That removes every level the best prices have moved past, but it cannot restore what the dropped frames added or resized: until the next snapshot a level, at the top too, can be missing or carry an old size (best_bid_ask has prices only). best() is the best level of the rebuilt ladder, not the market's latest best bid/ask — read best_bid_ask rows for that.

Smart-money trade history

A separate subscription with its own key: daily files of the trades made by the top-ranked Polymarket traders.

const smart = new DataClient({ key: process.env.OT_SMART_KEY });
const { days } = await smart.smartDays();                  // newest first
const day = days.find((d) => d.lists.top100?.status === "published")?.day;
if (day) await smart.smartDownload(day, "top100", { saveTo: "top100.csv.zst" });  // verified

What the lists are and what each column means: https://outcometick.com/polymarket-smart-money-data

MCP server

ot mcp is a Model Context Protocol server over stdio, for coding assistants and agents. It reads, prices, validates and downloads; it never submits a backtest, because that spends credits. Needs Node 24 or newer.

{
  "mcpServers": {
    "outcometick": {
      "command": "npx",
      "args": ["-y", "outcometick", "mcp"],
      "env": {
        "OT_KEY": "<data subscription key, optional>",
        "OT_BACKTEST_KEY": "<backtest key, optional>"
      }
    }
  }
}

Claude Code: claude mcp add outcometick -e OT_KEY=<data key> -- npx -y outcometick mcp

ToolKeyWhat it does
coveragenoneWhat the archive holds per venue: assets, datasets, day range
plansnoneData subscription plans and their live prices
backtest_capacitynoneWhich days can be backtested now, and how busy the queue is
backtest_quotenonePrice a backtest scope in credits without submitting it
check_strategynoneValidate a strategy directory with the queue's own validator, locally
metaOT_KEYThe date window and filter values the data key can reach
list_filesOT_KEYSearch archive files the data key can download
download_fileOT_KEYDownload one file and verify its sha256
backtest_runsOT_BACKTEST_KEYRecent runs under the backtest key, and the credit balance
backtest_statusOT_BACKTEST_KEYOne run's status, credits and report summary

Writing your strategy in Python instead? The SDK for it is pip install outcometick. ot runs those too — it is the one CLI for both languages.

Full reference: https://outcometick.com/docs/sdk

Links

From the server's repository — third-party content, read it before running anything it suggests.

More in Crypto

Listing from the official MCP Registry · repository facts from GitHub, 27m ago.