Installation
Installation
This guide covers everything needed to install AxiomTradeAPI-py and verify the install worked.
System Requirements
- Python 3.8+ (Python 3.10 or newer recommended)
- 64-bit architecture
- Windows 10+, macOS 10.15+, or Ubuntu 18.04+
The SDK automatically installs its required dependencies: requests (HTTP client), websockets
(real-time streaming), and asyncio/typing support.
Quick Installation
pip install axiomtradeapi
# Verify installation
python -c "from axiomtradeapi import AxiomTradeClient; print('Installation successful')"Development install
# Includes testing, formatting, and doc-generation tooling
pip install axiomtradeapi[dev]Virtual environment (recommended)
python -m venv axiom_trading_env
# Activate it
source axiom_trading_env/bin/activate # macOS/Linux
axiom_trading_env\Scripts\activate # Windows
pip install axiomtradeapiAdvanced Installation Options
Docker
FROM python:3.11-slim
WORKDIR /app
RUN pip install axiomtradeapi
COPY . .
CMD ["python", "your_trading_bot.py"]docker build -t my-solana-bot .
docker run -d my-solana-botFrom source
git clone https://github.com/chipa-tech/AxiomTradeAPI-py.git
cd AxiomTradeAPI-py
pip install -e .
python -m pytest tests/Optional extras
# Faster JSON parsing and networking
pip install axiomtradeapi[fast]
# NumPy/Pandas/scikit-learn for analytics and ML-based strategies
pip install axiomtradeapi[ml]Basic Configuration
import logging
from axiomtradeapi import AxiomTradeClient
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
)
client = AxiomTradeClient(log_level=logging.INFO)
balance = client.GetBalance("BJBgjyDZx5FSsyJf6bFKVXuJV7DZY9PCSMSi5d9tcEVh")
print(f"Connection verified. Balance: {balance['sol']} SOL")
For WebSocket features and anything that requires an authenticated session, see Authentication.
Verify Installation
Save this as test_installation.py:
#!/usr/bin/env python3
"""AxiomTradeAPI-py installation verification script."""
import asyncio
import logging
from axiomtradeapi import AxiomTradeClient
async def test_installation():
print("Testing AxiomTradeAPI-py installation...")
try:
from axiomtradeapi import AxiomTradeClient
print("Import test: PASSED")
except ImportError as e:
print(f"Import test: FAILED - {e}")
return False
try:
client = AxiomTradeClient(log_level=logging.WARNING)
print("Client initialization: PASSED")
except Exception as e:
print(f"Client initialization: FAILED - {e}")
return False
try:
test_wallet = "BJBgjyDZx5FSsyJf6bFKVXuJV7DZY9PCSMSi5d9tcEVh"
balance = client.GetBalance(test_wallet)
print(f"Balance query: PASSED - {balance['sol']} SOL")
except Exception as e:
print(f"Balance query: FAILED - {e}")
return False
try:
wallets = [
"BJBgjyDZx5FSsyJf6bFKVXuJV7DZY9PCSMSi5d9tcEVh",
"Cpxu7gFhu3fDX1eG5ZVyiFoPmgxpLWiu5LhByNenVbPb",
]
balances = client.GetBatchedBalance(wallets)
print(f"Batch query: PASSED - {len(balances)} wallets processed")
except Exception as e:
print(f"Batch query: FAILED - {e}")
return False
try:
ws_client = client.ws
print("WebSocket client: PASSED")
except Exception as e:
print(f"WebSocket client: FAILED - {e}")
return False
print("All tests passed. AxiomTradeAPI-py is ready to use.")
return True
if __name__ == "__main__":
asyncio.run(test_installation())python test_installation.pyTroubleshooting
Python version compatibility
python --version
# Ubuntu/Debian
sudo apt update && sudo apt install python3.11
# macOS with Homebrew
brew install python@3.11SSL certificate errors
# macOS
/Applications/Python\ 3.x/Install\ Certificates.command
# Linux
sudo apt-get update && sudo apt-get install ca-certificatesPermission errors
pip install --user axiomtradeapi
# or use a virtual environment (recommended)
python -m venv trading_env
source trading_env/bin/activate
pip install axiomtradeapiNetwork/firewall issues
import requests
try:
response = requests.get("https://axiom.trade", timeout=10)
print(f"Network OK: {response.status_code}")
except Exception as e:
print(f"Network issue: {e}")
For anything not covered here, see the full Troubleshooting guide.
Performance Expectations
- Balance query: < 100ms average response time
- WebSocket connection: < 10ms latency
- Batch operations: 1000+ wallets per request
- Memory usage: < 50MB for basic operations
See Performance Optimization for tuning tips.
What’s Next?
- Authentication — configure API access
- Balance Queries — wallet monitoring
- WebSocket Integration — real-time data streaming
- Building Trading Bots — automated strategies
Or follow the full Getting Started tutorial to build your first application end to end.