tradovate
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Tradovate Typescript

NPM version NPM downloads MIT License Coverage Status

Robust TypeScript SDK for Tradovate API integration. Simplifies real-time market data handling, order management, and strategy deployment. Features WebSocket support, type safety, and tools for both live trading and backtesting.

Introduction

Video Preview

Project Status

Working on video examples for live and replay stratigies.

Installation

npm install tradovate --save
yarn add tradovate

Usage

Connecting to quote data can be done in a few lines of code.

import 'dotenv/config'
import {TradovateService, AccessTokenRequestBody, MarketDataSocket} from '../../src'

const credentials: AccessTokenRequestBody = {
    name: process.env.TV_USER!,
    password: process.env.TV_PASSWORD!,
    appId: process.env.TV_APP_ID,
    appVersion: '1.0.0',
    cid: process.env.TV_CID,
    sec: process.env.TV_SECRET
}

const service = new TradovateService()

const mdSocket = new MarketDataSocket()

async function main() {
    await service.connect(credentials)

    await mdSocket.connect()

    await mdSocket.subscribeQuote('ESU3', item => {
        console.log(item)
    })

    setTimeout(() => {
        mdSocket.disconnect()
    }, 30 * 60 * 1000)
}

main()

Note: you need a funded Tradovate account with API access enabled and a CME Information License Agreement (ILA) for above code to work.

License

Tradovate Typescript is freely distributable under the terms of the MIT license.

Package Sidebar

Install

npm i tradovate

Weekly Downloads

18

Version

1.0.3

License

MIT

Unpacked Size

436 kB

Total Files

51

Last publish

Collaborators

  • colbygilbert95