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.1.0.tar.gz (9.5 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.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for markovian-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c19173ff5e95128a407370003caffc261bf8a8f8d5663ca9fc6d278508e367c4
MD5 66b98ae21cd808ec97ef0a63d68367e6
BLAKE2b-256 ecbceef124d974a0c5bf9b1891e730ac7b0edf97b9efb6b9b6832c0240c0d25f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: markovian-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6dc4c91cdf4cf894b8e4f93e176c655a3afffe68f0617abfe23c2547c9202b5
MD5 f4ef20be157d69174b40a9703bb1ab01
BLAKE2b-256 2710b1a79e36aa4b27f5ce5115eddc069526d47cab683520be279c951bce0109

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