Installation
This guide will help you install the Market Data JavaScript SDK and configure it for your needs.
Prerequisites
Basic Installation
- pnpm
- npm
- yarn
pnpm add marketdata-sdk-js
npm install marketdata-sdk-js
yarn add marketdata-sdk-js
info
The SDK is in early development (version 0.0.1) and has not yet been published to npm. Until it is, install directly from GitHub:
pnpm add github:MarketDataApp/sdk-js
TypeScript Support
The SDK is written in TypeScript and ships first-class type definitions. No @types/* package is needed. The SDK builds to both ESM and CommonJS, so it works with either module system.
- ESM:
import { MarketDataClient } from "marketdata-sdk-js"; - CommonJS:
const { MarketDataClient } = require("marketdata-sdk-js");
Local Development Installation
For local development, clone the repository and install from the project directory:
# Clone the repository
git clone https://github.com/MarketDataApp/sdk-js.git
cd sdk-js
# Install dependencies
pnpm install
# Run the test suite (all mocked, no API calls)
pnpm test
# Build the dual CJS+ESM bundle
pnpm build
The project uses Corepack to pin the pnpm version. If pnpm is not available, enable Corepack first:
corepack enable
Core Dependencies
The SDK includes the following core dependencies (installed automatically):
dotenv: Loads environment variables from a.envfileneverthrow: FunctionalResulttype for error handlingp-limit: Concurrency pool for fan-out requestsp-retry: Retry logic with exponential backoffzod: Runtime schema validation and type inference
Next Steps
After installation, you'll need to:
- Set up your authentication token
- Learn about the client and how to make your first API requests
- Configure settings to customize output format, date format, and other universal parameters