First Run¶
Before running with real trading, verify your setup using the safety modes.
Recommended: Start with Demo Environment¶
For the safest first run experience, use Kalshi's demo environment with paper trading:
# Set demo credentials (see https://docs.kalshi.com/getting_started/demo_env)
export KALSHI_DEMO_KEY_ID=your_demo_key_id
export KALSHI_DEMO_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...your demo key...
-----END RSA PRIVATE KEY-----"
# Run with paper trading and Kalshi demo
cargo run --manifest-path arbiter-engine/Cargo.toml -- \
--paper-trade --kalshi-demo
This provides:
- Real market data from Kalshi (demo mirrors production)
- Simulated order execution (no real trades)
- No risk to production credentials or capital
Check Connectivity¶
Verify your credentials and network connectivity without starting the trading loop:
# Check production connectivity
cargo run --manifest-path arbiter-engine/Cargo.toml -- --check-connectivity
# Check Kalshi demo connectivity
cargo run --manifest-path arbiter-engine/Cargo.toml -- --check-connectivity --kalshi-demo
This will:
- Initialize exchange clients with your credentials
- Test connectivity to Polymarket CLOB API
- Test connectivity to Kalshi Trading API (production or demo)
- Report success or failure for each exchange
- Exit immediately (no trading loop)
Expected Output¶
Checking Polymarket connectivity... OK
Checking Kalshi connectivity... OK
All connectivity checks passed.
Dry Run Mode¶
Test the full trading logic without submitting real orders:
In dry-run mode:
- All signing operations execute normally - verifies cryptographic correctness
- Order payloads are printed to stdout - inspect what would be sent
- No actual orders are submitted - safe for testing
- Simulated fills are returned - saga pattern executes fully
Use Cases¶
- Verify API key permissions
- Test order construction and signing
- Validate saga state machine transitions
- Debug without financial risk
Normal Operation¶
Once verified, run without flags for live trading:
Warning
Normal operation will execute real trades with real money. Ensure you understand the risks and have tested thoroughly in dry-run mode first.
Next Steps¶
- Paper Trading Guide - Test strategies without financial risk
- Review the Architecture to understand system behavior
- Check CLI Reference for all available options
- ADR-015: Kalshi Demo Environment - Technical details