Skip to main content

Python SDK for the Markovian Protocol: verifiable market-regime data, on-chain ZK proofs, and STAMP commitment from a proof-of-intelligence Layer 1.

Project description

markovian

Python SDK for the Markovian Protocol, a proof-of-intelligence Layer 1 that produces ZK-verified market-regime classifications and commits arbitrary data to an immutable, Bitcoin-anchored chain.

pip install markovian

Why it exists

More than $400M has been lost to oracle manipulation since 2022. Every exploit shared a root cause: an external price feed that could be skewed. The Markovian Protocol removes the feed. Each block is a Markov state transition, s_N = M^N x s, where M is the protocol-published transition matrix and s derives deterministically from the previous block hash. A BN128 zero-knowledge proof attesting to that computation is verified on-chain, so the output (a regime classification of ACCUMULATION, MARKUP, or DISTRIBUTION) is reproducible and cannot be forged by any single party.

This package is the client for reading that data, verifying the proofs locally, and committing records to the chain.

Quickstart

The free tier is keyless. No account, no API key.

from markovian import MarkovianClient

client = MarkovianClient()

# Latest ZK-proven regime snapshot for liquid tickers
for r in client.latest():
    print(f"{r.ticker:<6} {r.regime:<14} {r.confidence*100:.1f}%")

# QQQ    DISTRIBUTION   61.3%
# SPY    DISTRIBUTION   67.8%
# GLD    DISTRIBUTION   99.0%

# Regime history for a single ticker
history = client.regime("QQQ", days=90)

# Snapshot across several tickers at once
snap = client.batch(["SPY", "QQQ", "GLD", "TLT"])

From the command line:

markovian latest
markovian regime QQQ 90
markovian tip

Verify a proof locally

Verification requires no trust in the API. The ZK circuit runs client-side against a Merkle root.

result = client.verify(merkle_root, local=True)
print(result["verified"], result.get("local_zk_verified"))

Commit data to the chain (STAMP)

STAMP writes any JSON-serialisable record to the chain permanently. The result is unforgeable, publicly verifiable, and Bitcoin-anchored.

client.faucet("my-wallet")                      # 100 free test MKV
proof = client.stamp({"event": "audit-2026"}, wallet="my-wallet")
print(proof["verify_url"])

Tiers

Tier Access Key
Free Liquid tickers, 90-day window None
Pro All tickers, full history, CSV export Required
Enterprise All of Pro, plus inline ZK proofs Required

Keys are issued at markovianprotocol.com.

API surface

  • latest() — current regime snapshot for liquid tickers
  • regime(ticker, days) — regime history for one ticker
  • batch(tickers) — snapshot across multiple tickers
  • catalog() — available tickers and coverage
  • verify(merkle_root, local) — verify a proof against the registry, optionally re-running the ZK circuit locally
  • stamp(data, wallet) — commit a record to the chain
  • faucet(wallet) — claim test MKV
  • watch(tickers, callback) — poll for regime transitions
  • tip(), block(height), ledger() — chain primitives

Requirements

Python 3.8+, with requests, numpy, and py_ecc (installed automatically).

Links

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markovian-1.2.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markovian-1.2.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file markovian-1.2.0.tar.gz.

File metadata

  • Download URL: markovian-1.2.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for markovian-1.2.0.tar.gz
Algorithm Hash digest
SHA256 0244563effe78ff79f74d29ac34072eb70af0a6752b39e8ffd0d5660b7d56820
MD5 3eb11ce9b0529d8632e8d33a1f782909
BLAKE2b-256 7993d69a4d41bb4ae40d2fb74edbc9b283dac1754e63835c714868684f79fa96

See more details on using hashes here.

File details

Details for the file markovian-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: markovian-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for markovian-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ffc6f50fa32f8b8dfe5b607cd1de33033ec53c5e105b52ff1f97487a389af9
MD5 eed2f5ef137363d3c5553247851b0206
BLAKE2b-256 b68ca819ad2a91ef36991ce61cb7b358d99e1700724ff9fe6740c88a25def910

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page