.env.example•1.57 kB
# Interactive Brokers Flex Query API Credentials
# Copy this file to .env and fill in your actual credentials
# Flex Query Configuration
QUERY_ID=your_query_id_here
TOKEN=your_token_here
# Note: A single Flex Query can return data for multiple accounts
# Configure multiple accounts in your IB Flex Query settings, not here
# API Configuration (optional)
# API_TIMEOUT=30
# API_MAX_RETRIES=3
# API_RETRY_DELAY=5
# Analysis Settings (optional)
# DEFAULT_CURRENCY=USD
# TAX_RATE=0.30
# Data Directories (optional)
# DATA_DIR=data
# RAW_DATA_DIR=data/raw
# PROCESSED_DATA_DIR=data/processed
# ==========================================
# How to get your credentials:
# ==========================================
# 1. Log in to Interactive Brokers Account Management
# https://gdcdyn.interactivebrokers.com/AccountManagement
#
# 2. Go to Settings → Flex Web Service
#
# 3. Create a Flex Query:
# - Click "Create Query"
# - Select "Activity Flex Query"
# - Configure sections: Account Information, Cash Report, Open Positions, Trades
# - Save the query
#
# 4. Get credentials:
# - Query ID: Shown in the Flex Query list
# - Token: Click "Generate Token" for the query
#
# 5. Copy values to .env file (this file should NEVER be committed to git)
# ==========================================
# Security Notes:
# ==========================================
# - NEVER commit .env file to git
# - .env is already in .gitignore
# - gitleaks will prevent accidental commits
# - Rotate tokens regularly
# - Use separate tokens for development and production