# Interactive Brokers Flex Query API Credentials
# Copy this file to .env and fill in your actual credentials
# Single Account Configuration
QUERY_ID=your_query_id_here
TOKEN=your_token_here
# OR Multi-Account Configuration
# ACCOUNT_1_QUERY_ID=your_first_query_id
# ACCOUNT_1_TOKEN=your_first_token
# ACCOUNT_1_ALIAS=Main Trading
# ACCOUNT_1_ACCOUNT_ID=U12345678
# ACCOUNT_2_QUERY_ID=your_second_query_id
# ACCOUNT_2_TOKEN=your_second_token
# ACCOUNT_2_ALIAS=Retirement
# ACCOUNT_2_ACCOUNT_ID=U87654321
# 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
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/knishioka/ib-sec-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server