tradescape-cli
v0.1.1
Published
CLI for Tradescape trading platform
Maintainers
Readme
Tradescape CLI
Command-line interface for the Tradescape trading platform.
Installation
cd tradescape-cli
bun install
bun run build
npm link # or: bun linkSetup
- Log into Tradescape
- Get your JWT token (from browser devtools or Chrome extension)
- Configure the CLI:
ts config set-token <your-jwt-token>Usage
Check Status
ts statusSetups
# List all setups
ts setups list
# List active setups
ts setups list --status active
# Get a specific setup
ts setups get 123
# Create a setup
ts setups create -p BTC/USDT -d long -e 42000 -t 45000 -s 40000Alerts
# List all alerts
ts alerts list
# List pending alerts for a pair
ts alerts list --status pending --pair BTC/USDT
# Create an alert
ts alerts create -p BTC/USDT -t 50000 -d above
# Delete an alert
ts alerts delete <alert-id>Trades
# List recent trades
ts trades list
# Sync trades from exchange
ts trades sync -e binance
# View open positions
ts trades positionsDaily Reports
# Today's summary
ts daily summary
# P&L for date range
ts daily pnl --from 2024-01-01 --to 2024-01-31Configuration
# Show current config
ts config show
# Set API URL (for local dev)
ts config set-url http://localhost:3000JSON Output
All list commands support --json flag for machine-readable output:
ts setups list --json | jq '.[] | .pair.symbol'Development
# Watch mode
bun run dev
# Type check
bun run typecheckAuthentication
The CLI uses JWT tokens for authentication. Tokens are stored in ~/.tradescape/config.json.
To get a token:
- Log into the web app with Discord
- Open browser devtools → Application → Local Storage
- Copy the JWT value from the extension's stored auth
Or if using the Chrome extension, the token is exchanged automatically from your session cookie.
