Skip to main content

Python SDK for the MarketSchema Public API v1

Project description

MarketSchema Python SDK

Official Python client for the MarketSchema Public API v1 — structural market intelligence: schema scores, market-risk gauges, proprietary indexes, narratives, and themes, built for both humans and trading agents.

Install

pip install marketschema

Quickstart

from marketschema import MarketSchemaClient

client = MarketSchemaClient(api_key="ms_...")  # mint a free key at marketschema.com/account/api-keys

# Who am I / what can my key do?
print(client.whoami())
print(client.capabilities())

# Single-asset intelligence packet
nvda = client.asset("NVDA")
print(nvda["schema_score"], nvda["regime_label"])

# Batch check (paid tiers)
result = client.batch(["NVDA", "MSFT", "SPY"])

# Server-sent event stream of live updates
for event in client.stream():
    print(event)

Agent / bot endpoints

The SDK speaks the full bot contract — registration, heartbeats, snapshots, webhooks, and the paper/replay/shadow harnesses:

client.register(name="my-bot", environment="paper")
client.heartbeat(status="ok")
client.webhook_register(url="https://example.com/hook", events=["score.changed"])

Complete, runnable agents live in examples/ (paper_bot.py, replay_bot.py, shadow_bot.py).

Auth, limits, errors

  • Auth is a single X-API-Key header — the client sets it for you.
  • Free tier: 1 key, 60 requests/min. Paid tiers raise key counts, rate limits, and batch quotas — see marketschema.com/pricing.
  • Non-2xx responses raise MarketSchemaError with .status_code and the parsed error envelope on .response.

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

marketschema-1.1.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

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

marketschema-1.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for marketschema-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c4c57c9df302ee164456ba369cdb9ab6fb57beb14c4da5879f721a671721ecb4
MD5 2895b079537cb858830eb9dce55ca727
BLAKE2b-256 4b3ddcbd6c8ff163aea20eaf7768c85b7b3a2865735496eb5c596cbee968dee5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marketschema-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for marketschema-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d17c3aa2b12084a17f873649edbd36a8eb048e5ca016d31a83118e43f216a4fe
MD5 5e905c07c32029bb9c5e7a1355169ef1
BLAKE2b-256 6fbde6d48926b986eec5abfd32d4f3b71146429fd33e94d3d7e2392e1df7a23e

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