Prediction Market API for JavaScript

Query real-time prediction market consensus data in JavaScript. Zero dependencies, native fetch, Node.js 18+.

See Plans →

Summary: Node.js SDK for prediction market consensus data. npm install meridian-edge. Zero dependencies, native fetch, works with any framework.

Installation

npm install meridian-edge

Zero dependencies. Uses native fetch (Node.js 18+). Works in any JavaScript runtime that supports fetch.

Quick Start

const MeridianEdge = require('meridian-edge');

const client = new MeridianEdge({ apiKey: 'your-api-key' });

const consensus = await client.consensus({ sport: 'NBA' });
console.log(consensus.data);

Available Methods

MethodReturns
client.consensus(opts)Aggregated probabilities for active events
client.opportunities(opts)High-divergence events across platforms
client.markets(opts)All active markets with metadata
client.settlementsRecent(opts)Recently resolved events with outcomes
client.indicators(opts)Recent directional indicators
client.sports(sport)Today's data for a specific sport
client.status()API health check (no auth required)

Framework Compatibility

The SDK works with Vercel AI SDK, LangChain.js, Express, Next.js, and any Node.js project. The MeridianError class provides structured error handling with status codes and automatic retries on transient failures.

Related

Frequently Asked Questions

How do I install the prediction market JavaScript SDK?

Run npm install meridian-edge. The SDK requires Node.js 18+ and has zero dependencies. It handles authentication, retries, and rate limiting automatically.

Does the SDK work with Vercel AI SDK and LangChain.js?

Yes. The meridian-edge SDK can be used as a data source in Vercel AI SDK, LangChain.js, and any JavaScript or TypeScript framework. It returns structured JSON responses.

Is the JavaScript SDK data investment advice?

No. All data accessed through the SDK is for informational purposes only and does not constitute investment, financial, or trading advice. Prediction market participation involves risk of loss.

Get Full Access

Starter plan includes API access, the live dashboard, divergence alerts, and email digests.

See Plans →