Market Microstructure & Manipulation MCP avatar

Market Microstructure & Manipulation MCP

Pricing

Pay per event + usage

Go to Apify Store
Market Microstructure & Manipulation MCP

Market Microstructure & Manipulation MCP

Detect market manipulation, analyze order book dynamics, and optimize regulatory surveillance via advanced econometric and game-theoretic methods.

Pricing

Pay per event + usage

Rating

0.0

(0)

Developer

ryan clinton

ryan clinton

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Market Microstructure Manipulation MCP Server

Detect market manipulation, analyze order book dynamics, and optimize regulatory surveillance via advanced econometric and game-theoretic methods. This MCP server orchestrates 14 Apify actors across financial markets, SEC filings, insider trading, congressional stock disclosures, cryptocurrency, foreign exchange, and economic indicator sources. It applies Hawkes process order book simulation, Bayesian Online Changepoint Detection (BOCPD) for spoofing, spectral transfer entropy for cross-asset information flow, MRR spread decomposition, Fama-French event studies for insider flow, LASSO Granger causality, Student-t HMM regime classification, and extensive-form game theory for surveillance optimization.

What data can you access?

Data PointSourceCoverage
Stock market dataFinnhubUS equities, quotes, financials
SEC regulatory filingsEDGAR10-K, 10-Q, 8-K, and enforcement
Insider transactionsSEC Form 4Officer and director trades
Congressional stock tradesCongressional TrackerSenate and House member disclosures
Cryptocurrency marketsCoinGecko10,000+ coins and tokens
Currency exchange ratesExchange Rate Tracker150+ currency pairs
ECB reference ratesECB Exchange RatesEuro reference rates
Federal Reserve indicatorsFREDInterest rates, VIX, GDP
Labor market dataBLSCPI, unemployment, PPI
Federal regulationsFederal RegisterSEC/CFTC rulemakings
Tech community signalsHacker NewsMarket-relevant discussions
Website monitoringWebsite Change MonitorRegulatory page changes
Consumer complaintsCFPBFinancial product complaints
Exchange rate historyHistorical RatesLong-term FX time series

MCP Tools

ToolPriceDescription
simulate_order_book_dynamics$0.10Simulate multivariate Hawkes-process order book dynamics with queue-reactive intensity kernels. Returns branching ratio, criticality index, and queue imbalance.
detect_spoofing_manipulation$0.15Detect layering, spoofing, wash trading, and momentum ignition via BOCPD with Dirichlet-multinomial prior. Returns alerts with confidence scores.
measure_cross_asset_information$0.12Measure directed information flow via spectral transfer entropy and Hasbrouck information share from Johansen VECM decomposition.
decompose_spread_components$0.10Decompose bid-ask spread into adverse selection, inventory cost, and order processing via MRR model. Computes Kyle lambda, Roll measure, and Amihud illiquidity.
identify_insider_abnormal_flow$0.12Identify abnormal trading flow around insider/congressional transactions via event study methodology. CAR [-5,+30] with significance testing.
discover_manipulation_causality$0.12Discover directed causal links via LASSO-penalized Granger causality with van de Geer debiasing. F-statistics, p-values, and network density.
classify_market_regimes$0.10Classify market regimes (calm, volatile, crisis, recovery) via Student-t HMM. Transition matrix, stationary distribution, and Viterbi path.
optimize_surveillance_strategy$0.20Optimize regulatory surveillance via extensive-form game theory. Nash equilibrium, budget allocation, detection probability, and deterrence effect.

Data Sources

  • Finnhub Stock Search -- Real-time and historical stock data, company financials, earnings, and market metrics for US equities
  • SEC EDGAR Filing Search -- Securities and Exchange Commission regulatory filings including enforcement actions and litigation releases
  • SEC Insider Trading -- Form 4 insider transaction database tracking officer and director buys, sells, and option exercises with exact dates and values
  • Congressional Stock Tracker -- STOCK Act disclosures from US Senate and House members revealing congressional trading activity
  • CoinGecko Crypto Search -- Cryptocurrency market data covering 10,000+ coins with prices, volumes, market caps, and trading pairs
  • Exchange Rate Tracker -- Live currency exchange rates for cross-asset correlation analysis and FX market microstructure
  • Exchange Rate History -- Historical exchange rate time series for long-term trend analysis and regime detection
  • ECB Exchange Rates -- European Central Bank daily reference rates for EUR crosses used in cross-asset information flow measurement
  • FRED Economic Data -- Federal Reserve economic indicators including FEDFUNDS, VIX, GDP, and other macro variables driving market regimes
  • BLS Economic Data -- Bureau of Labor Statistics data including CPI, unemployment, and PPI for macroeconomic regime context
  • Federal Register -- SEC and CFTC regulatory actions, proposed rules, and enforcement orders affecting market structure
  • Hacker News Search -- Technology community discussion signals relevant to market events, IPOs, and security incidents
  • Website Change Monitor -- Monitoring regulatory and corporate website changes that may precede market-moving announcements
  • CFPB Complaints -- Consumer Financial Protection Bureau complaints for financial product manipulation context

How the scoring works

Each tool applies a specific quantitative finance algorithm to market data assembled from multiple sources.

Hawkes Process Order Book: Estimates multivariate intensity lambda_d(t) = mu_d + sum alpha exp(-beta(t-s)) via EM estimation. The branching ratio (spectral radius of alpha/beta matrix) indicates market criticality -- values approaching 1.0 signal instability.

BOCPD Spoofing Detection: Maintains run length posterior P(r_t | x_{1:t}) with normal-inverse-gamma conjugate prior and constant hazard function. Changepoints are classified by manipulation pattern (layering, spoofing, wash trading, momentum ignition).

Spectral Transfer Entropy: TE(f) = 1/(4pi) ln(S_Y(f)/S_{Y|X}(f)) computed from AR spectral estimates. Hasbrouck information share from Johansen VECM via Cholesky decomposition of innovation covariance.

MRR Spread Decomposition: Madhavan-Richardson-Roomans model decomposes spread into adverse selection, inventory, and order processing. Kyle lambda via OLS on signed flow, Roll measure from return autocovariance, Amihud illiquidity ratio.

Event Study (CAR): Cumulative Abnormal Return in [-5, +30] event window around insider/congressional transactions relative to expected return, with t-statistics for significance.

MetricInterpretation
Branching Ratio > 0.9Market near criticality, high self-excitation
BOCPD ChangepointPotential manipulation event detected
Transfer Entropy > 0Directed information flow from source to target asset
Kyle Lambda > 0Price impact per unit order flow (higher = less liquid)
CAR significantly positiveAbnormal returns following insider trade
Granger F-stat significantCausal influence between market variables

How to connect this MCP server

Claude Desktop

Add to your claude_desktop_config.json:

{
"mcpServers": {
"market-microstructure-manipulation": {
"url": "https://market-microstructure-manipulation-mcp.apify.actor/mcp"
}
}
}

Programmatic (cURL)

curl -X POST https://market-microstructure-manipulation-mcp.apify.actor/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"detect_spoofing_manipulation","arguments":{"query":"AAPL"}},"id":1}'

Other MCP clients

This server works with any MCP-compatible client including Cursor, Windsurf, Cline, and custom integrations. Point your client to https://market-microstructure-manipulation-mcp.apify.actor/mcp.

Use cases for market microstructure intelligence

Market surveillance

Detect spoofing, layering, wash trading, and momentum ignition patterns across equities and crypto markets using BOCPD changepoint detection with manipulation pattern classification.

Insider trading surveillance

Identify abnormal trading flow around SEC Form 4 insider transactions and congressional stock disclosures. CAR event studies reveal whether insider trades precede significant price movements.

Cross-asset lead-lag analysis

Measure directed information flow between assets using spectral transfer entropy. Identify which markets lead and which follow, useful for price discovery attribution and front-running detection.

Market quality assessment

Decompose bid-ask spreads into adverse selection, inventory, and order processing components. Kyle lambda and Amihud illiquidity provide market quality benchmarks for venue comparison.

Regime detection and forecasting

Classify current market regime (calm, volatile, crisis, recovery) using Student-t HMM. Transition probabilities and expected regime durations support portfolio allocation and risk management decisions.

Regulatory resource optimization

Optimize surveillance resource allocation using extensive-form game theory. Nash equilibrium analysis determines optimal budget distribution across surveillance actions for maximum deterrence effect.

How much does it cost?

This MCP uses pay-per-event pricing. You are only charged when a tool is called.

Tool costs range from $0.10 to $0.20 depending on the number of actors involved. The Apify Free plan includes $5 of monthly platform credits, enough for approximately 35-50 market microstructure queries per month.

Usage ExampleEstimated Cost
Single spoofing detection scan$0.15
Order book + regime classification$0.20
Full surveillance optimization$0.20
Cross-asset information flow analysis$0.12

How it works

  1. Tool call received -- Your MCP client sends a market query (ticker, asset class, or sector).
  2. Parallel actor execution -- Up to 14 Apify actors run simultaneously across equities, crypto, FX, SEC filings, insider trades, congressional disclosures, and economic indicators.
  3. Algorithm application -- The requested econometric or game-theoretic algorithm is applied: Hawkes process, BOCPD, transfer entropy, MRR decomposition, event study, Granger causality, HMM, or game theory.
  4. Pipeline integration -- Complex tools like surveillance optimization run prerequisite algorithms (BOCPD spoofing detection and HMM regime classification) first, then feed results into the game-theoretic optimizer.
  5. Structured response -- Results are returned as JSON with algorithm outputs, confidence metrics, alerts, and supporting market data.

FAQ

Q: Does this access real-time order book data? A: It uses market data from Finnhub, CoinGecko, and exchange rate sources. Order book simulation is based on collected price and volume data rather than live Level 2 order book feeds.

Q: What manipulation types can it detect? A: The BOCPD detector classifies four manipulation patterns: layering (placing and canceling orders), spoofing (deceptive large orders), wash trading (self-dealing), and momentum ignition (triggering cascading stops).

Q: Is congressional trading data legal to analyze? A: Yes. Congressional stock disclosures are public records under the STOCK Act. The data is fetched from public disclosure databases.

Q: How does the game-theoretic surveillance work? A: It models the regulator-manipulator interaction as an extensive-form zero-sum game, computing Nash equilibrium action probabilities via fictitious play. The output tells regulators how to allocate finite surveillance resources for maximum deterrence.

Q: Is the data real-time? A: Data is fetched live from each source at query time. Market data, SEC filings, and economic indicators reflect their current state.

Q: Is it legal to use this data? A: All data sources are publicly available. See Apify's guide on web scraping legality.

MCP ServerFocus
ryanclinton/investment-alternative-data-mcpAlternative data for investment analysis
ryanclinton/knowledge-graph-causal-discovery-mcpCausal discovery with Granger causality
ryanclinton/sovereign-debt-contagion-mcpSovereign risk and contagion modeling

Integrations

This MCP server runs on the Apify platform and integrates with the broader Apify ecosystem:

  • Apify API -- Call this MCP programmatically from any language via the Apify API
  • Scheduling -- Set up recurring manipulation scans on daily or hourly schedules
  • Webhooks -- Trigger alerts when spoofing is detected or regime transitions occur
  • Integrations -- Connect to Slack, Zapier, Make, or any webhook-compatible service for market surveillance notifications