Skip to main content

outcometick

The Python strategy SDK for outcometick.com — tick-level data for Polymarket and Predict.fun crypto Up/Down markets.

pip install outcometick
from outcometick import Strategy, Order


class MeanReversion(Strategy):
    def on_market_open(self, ctx, market):
        self.entered = False

    def on_tick(self, ctx, tick):
        z = ctx.zscore(tick.value, window=180)
        if self.entered or abs(z) < ctx.p.entry_z:
            return None
        side = "DOWN" if z > 0 else "UP"
        limit = ctx.book().best(side)
        if limit is None:
            return None
        self.entered = True
        return Order(side=side, size=ctx.p.size, limit=limit)

What is in here

The SDK surface your strategy imports, and nothing else:

Strategy the base class you subclass
Order what a hook returns; validates side, size and limit on construction
SIDES ("UP", "DOWN")

It is typed (py.typed), so your editor and mypy know the API. Everything a strategy can actually do arrives through ctx, which the runner constructs — there is deliberately nothing here to reach out with.

The hooks are not defined on the base class on purpose. A default no-op on_tick would turn "you declared a hook you did not implement" — a rejection fixable in seconds — into a run that quietly never trades and bills you for an empty equity curve.

Testing

pip install . && python -m unittest discover -s tests

Downloading data

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

from outcometick.data import DataClient, NO_VALUE

ot = DataClient()                                  # key from OT_KEY

meta = ot.meta()                                   # what can this key see?

res = 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

ot.download(res["files"][0], save_to="btc.csv.gz")  # checksum verified

from_ rather than from, because from is a Python keyword; it goes on the wire as from.

meta()["intervals"] holds real durations only — the none sentinel is reported separately under filterTokens, so code that builds an enum from it or parses the values as durations never meets a token.

Standard library only: no requests, no dependency added to your project.

Running a backtest

Submitting and replaying is done with the ot command line, which is distributed on npm because there is exactly one of it for both languages:

npm i -g outcometick
ot check .          # the same validator the queue runs
ot run   .          # replay locally against sample data
ot submit .         # send it to the queue

It runs Python strategies by spawning your local python3. Two CLIs would mean two copies of the validator, and the second copy is what makes "if it passes locally it will not be rejected on submit" stop being true.

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

Links

Metadata

Release files for outcometick 1.6.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for outcometick 1.6.5
File Size Uploaded
outcometick-1.6.5.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for outcometick 1.6.5
File Interpreter ABI Platform
outcometick-1.6.5-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / outcometick-1.6.5.tar.gz

Download URL outcometick-1.6.5.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c9eb112c1ca6779fc73862805f56be52b9518f0ad90d5a14764b1f5bc23ddb57
BLAKE2b-256 checksum
How to use checksums
0ec90de552f2b377ee3121fe3a659526555c1f3726e0c2b09acc5e7dc7ff895e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / outcometick-1.6.5-py3-none-any.whl

Download URL outcometick-1.6.5-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a31782ef0a6af3f69365bc131c58130d1c033b5fc9a884639f5b886d8a1dea2
BLAKE2b-256 checksum
How to use checksums
0af900103333c99a47421055b024cd19014ffbdf62b2a9875ab0b302c80d0e52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

2.3.1

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.8

2 release files

1.6.7

2 release files

1.6.6

2 release files

This release

1.6.5 This release

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page