Skip to main content

The MarketDX financial impact graph, in Python — news→market impact (why, who, direction, ripple) across stocks, commodities, FX, crypto, and private companies.

Project description

marketdx

The financial impact graph, in Python.
News → who it touches and why — the causal channel, the story's lean, and the ripple — across stocks, commodities, FX, crypto, and private companies.
A research, screening & feature layer — direction is the news's content lean, not a price forecast.

▶ Live playground · Docs & pricing · Sample dataset


pip install marketdx          # add [pandas] for .to_df():  pip install "marketdx[pandas]"
from marketdx import MarketDX

mdx = MarketDX(api_key="avn_live_…")                     # get a key at marketdx.lab.ai
for s in mdx.news(megatrend="ai-power", impact="indirect"):
    print(s.title, [(e.name, e.impact.net_direction) for e in s.entities])

That's the whole graph: every news event, every affected entity, labeled with direction, relevance, the causal aspect (the why), and whether it's the epicenter or a ripple — across five asset classes, including private companies ticker feeds can't see.

No key yet? Explore everything with zero signup in the playground, then grab a free key at marketdx.lab.ai.

Why the SDK (not just requests)

  • Typed graphsignal.entities[0].impact.aspects[0].direction with autocomplete, not raw dicts.
  • Auto-paginationfor s in mdx.news(...) walks every page for you. Nothing to manage.
  • Names, not idsmegatrend="ai-power" or "AI Power & Cooling" or 10040000 all work.
  • .to_df() — the whole result as a pandas DataFrame, one row per (event × entity × aspect).
  • Typed errorsAuthError, QuotaError, RateLimitError, BadRequestError, NotFoundError.

The graph, a few ways

# 1. Ripple: a themed event that also touches NON-thematic entities (our differentiator)
for s in mdx.news(megatrend="semiconductors", impact="indirect", max_items=50):
    ...

# 2. Beyond tickers: private companies in a trend (OpenAI, Anthropic, Ampere, ChangXin…)
for c in mdx.megatrends("semiconductors").off_coverage():
    print(c.name, c.type, "→", c.megatrend["node_name"])

# 3. Per-stock impact timeline + its news-derived rivals
tl    = mdx.stock("NVDA.US").news(aspect="competition")
peers = mdx.stock("NVDA.US").competitors()

# 4. News-driven screen — where the news leans positive on a theme (the model's read, for research)
positive_lean = mdx.stocks(megatrend="ai-power", direction="pos", country="US", order_by="news_count")

# 5. Semantic search — match news by MEANING, not keywords
hits = mdx.news_search("chip export controls to China")

Straight to pandas

.to_df() returns the same columns as the sample dataset (impact-signals.csv) — so anything you prototyped on the free CSV runs unchanged on the live graph:

df = mdx.news(megatrend="ai-power", impact="indirect").to_df()
# published_at · title · brief_text · entity_name · entity_ticker · entity_type · direction ·
# aspect · reason · relevance · impact · impact_score · node_name · entity_country · publisher · url

df.groupby(["entity_type", "direction"]).size()      # who the news lands on, +/− by asset class (the model's read)
df[df.aspect == "tariff"].entity_name.value_counts()  # who the tariff channel touches

Metering & errors

Every call carries X-Credits-Charged / X-RateLimit-*; check your balance any time (free, unmetered):

mdx.account()   # {'plan': …, 'credits': {'balance', 'daily_quota', 'resets_at', 'unlimited'}, 'rate_limit': …}
from marketdx.errors import QuotaError, RateLimitError

try:
    signals = mdx.news(megatrend="ai-power").to_list()
except RateLimitError as e:
    time.sleep(e.retry_after or 1)
except QuotaError:
    ...   # daily quota spent — resets 00:00 UTC

Enum values (aspect, direction, entity_type, …) are type hints for your editor — the API is the source of truth, so new values work without upgrading the SDK. The live list: mdx.enums().

Reference

news · news_search · news_types · megatrends (.stocks / .off_coverage) · gics (.stocks) · stocks (search + screener) · stock (.news / .competitors / .peers) · enums · account. Full API docs: marketdx.lab.ai.

License

MIT. Built by MarketDXdemocratizing financial data.

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

marketdx-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

marketdx-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file marketdx-0.1.0.tar.gz.

File metadata

  • Download URL: marketdx-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for marketdx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 28ebc0ad7410b6aa1a441b7c450a947730b5b74438b2e6c034695c270456c1ba
MD5 b6af49e82f50d79acc621b49cbc9326c
BLAKE2b-256 b06a0dcfdf6ecec720f6608cda279bf32b27ac9062fdfd31005820ccc2d93c9e

See more details on using hashes here.

File details

Details for the file marketdx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: marketdx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for marketdx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d0067da56da8c9e50efcc6a41a08c3b032d27077ee24e47ff39160419a19551
MD5 3b5de9edc81354bd9b8a70bbf5adac8d
BLAKE2b-256 890a28e61ec9731fe80b3a106fbd3cfa3c0422ed3bd5e4ed285c40ea25392ae1

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