API Trading

WebSocket

Trading API

Build event-driven equity and options trading applications with

Lightspeed Connect.


Send JSON messages over a persistent WebSocket connection and receive real-time order, execution, position, and account updates without repeatedly polling for changes.

Request API LoginLogin to the API Console

Event-Driven Trading API

A Persistent Connection for

Trading Workflows

Lightspeed Connect uses JSON messages over a long-lived WebSocket connection, providing two-way communication between your trading application and the API.


Your application can submit requests while Lightspeed Connect pushes execution reports, order status changes, position changes, and account updates through the connection as activity occurs.

Websocket Architecture

Your Application.

One Persistent Connection.

Maintain a two-way WebSocket session for sending trading requests and receiving event-driven updates.

Your Application

Trading logic, automation & workflows

WSS + JSON

Lightspeed Connect

Trading API

ORDER STATUS
EXECUTIONS
POSITIONS
ACCOUNT UPDATES

Build With Websockets

Designed for Event-Driven

Trading Applications

Two-Way Communication

Send requests and receive trading updates through the same persistent WebSocket session.

JSON Messages

Build against a message-based API using JSON over the WebSocket connection.

Real-Time Updates

Receive execution reports, status changes, positions, and account information as updates occur.

Equity Trading

Build custom U.S. equity trading workflows through Lightspeed Connect.

Options Trading

Develop single-leg and multi-leg equity options workflows with strategies of up to four legs.

Locate Workflows

Incorporate eligible hard-to-borrow locate quote and borrow requests into your application.

Plain Websocket + JSON

Build with Your Preferred Development Stack

Lightspeed Connect is a WebSocket API carrying JSON messages, allowing developers to build with WebSocket libraries across programming languages.


A Python adapter is also available for developers who want help handling common connection tasks including logon, heartbeats, required session fields, and reconnection.

Explore Developer Documentation

Trading Workflows

More Than Order Entry

Use Lightspeed Connect messages across the trading and account lifecycle.

Submit Orders

Send supported equity and options orders through the WebSocket session.

Manage Orders

Cancel and replace supported orders as your application workflow requires.

Monitor Executions

Process execution reports and order status updates pushed through the connection.


Track Positions

Receive changing position information through Lightspeed Connect.

Monitor Accounts

Receive account information including buying power, equity, margin, and P&L.

Request Locates

Incorporate eligible hard-to-borrow locate requests into custom trading workflows.

Development Workflow

Build, Test, and Prepare for Production

  1. 01

    Explore

    Review API messages, examples, and AI-ready documentation.

  2. 02

    Build

    Connect using your preferred WebSocket development stack.

  3. 03

    Test

    Validate messages with the API Console and Paper Trading.

  4. 04

    Go Live

    Complete testing and transition your integration to Production.

Lightspeed Connect Resources

Continue Building

Development

Paper Trading

Develop and validate your Lightspeed Connect integration in a simulated trading environment.

Developer Tools

AI-Ready API Documentation

Use machine-readable documentation and AI-assisted development resources.

Trading API

Options Trading API

Build single-leg and multi-leg equity options workflows.

Integrate Locates into Your Trading Workflow

Explore the Lightspeed Connect API documentation for

locate requests, quotes, and orders.

Stay up-to-date

Get the latest news and promos.