Skip to content

Installation

Requirements

  • Python 3.12 or higher
  • pip or UV package manager
  • TopStepX account with API access

Install from PyPI

pip install project-x-py

Or using UV (recommended):

uv add project-x-py

Install from Source

git clone https://github.com/TexasCoding/project-x-py.git
cd project-x-py
pip install -e .

Install with Optional Features

Real-time Features

pip install "project-x-py[realtime]"

Development Tools

pip install "project-x-py[dev]"

All Features

pip install "project-x-py[all]"

Environment Setup

Set your API credentials as environment variables:

export PROJECT_X_API_KEY="your-api-key"  # pragma: allowlist secret
export PROJECT_X_USERNAME="your-username"

Or create a .env file:

PROJECT_X_API_KEY=your-api-key  # pragma: allowlist secret
PROJECT_X_USERNAME=your-username

Verify Installation

import asyncio
from project_x_py import TradingSuite

async def verify():
    async with TradingSuite.create(["MNQ"]) as suite:
        print(f"Connected to account: {suite.client.account_info.name}")

asyncio.run(verify())

Next Steps