Skip to main content

JavaScript SDK
New

Welcome to the Market Data JavaScript SDK documentation. This SDK allows you to integrate Market Data services into your Node.js and TypeScript applications. It ships typed responses, runtime schema validation, and a functional error-handling pattern.

Quick Start

import { MarketDataClient } from "@marketdata/sdk";

// Initialize client
const client = new MarketDataClient({
token: "YOUR_API_TOKEN", // Optional - runs in demo mode without token
});

// Get stock prices
const prices = await client.stocks.prices("AAPL");
console.log(prices[0].mid); // 150.25

// Get historical candles
const candles = await client.stocks.candles("AAPL", {
resolution: "1H",
from: new Date("2024-01-01"),
to: new Date("2024-01-31"),
});

// Get market status
const status = await client.markets.status();

Open Source

The SDK is open source and available on GitHub. Feel free to contribute to the project, report bugs, or request new features.

Documentation

The best source for documentation on the SDK is right here. This documentation is the most up-to-date and accurate source of information on the SDK.

Using the SDK

This SDK is designed to help you get up and running with Market Data's APIs as quickly as possible, providing you with all the tools you need to access real-time stock and options prices, historical data, and much more.

Getting Started

  1. Install the SDK into a Node.js or TypeScript project.
  2. Set up your authentication token to access the API.
  3. Learn about the client and how to make your first API requests.
  4. Configure Settings to customize output format, date format, and other universal parameters.
  5. Explore the available endpoints for stocks, options, funds, markets, and utilities.

Support

  • If you have any questions or need further assistance, please don't hesitate to open a ticket at our helpdesk.
  • If you find a bug you may also open an issue in our GitHub repository. Please only open issues if you find a bug. Use our helpdesk for general questions or implementation assistance.