AI-powered crypto trading agent and LLM gateway via natural language. Use when the user wants to trade crypto, check portfolio balances, view token prices, transfer crypto, manage NFTs, use leverage, bet on Polymarket, deploy tokens, set up automated trading, sign and submit raw transactions, or access LLM models through the Bankr LLM gateway funded by your Bankr wallet. Supports Base, Ethereum, Polygon, Solana, and Unichain.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
AI-powered crypto trading agent and LLM gateway via natural language. Use when the user wants to trade crypto, check portfolio balances, view token prices, transfer crypto, manage NFTs, use leverage, bet on Polymarket, deploy tokens, set up automated trading, sign and submit raw transactions, or access LLM models through the Bankr LLM gateway funded by your Bankr wallet. Supports Base, Ethereum, Polygon, Solana, and Unichain.
author
BankrBot
license
MIT
tags
["crypto","defi","trading","wallet"]
env_needed
[{"name":"BANKR_API_KEY","description":"API key from the Bankr Terminal (optional if using email interactive login)","required":false},{"name":"BANKR_LLM_KEY","description":"Separate API key for the LLM gateway (optional)","required":false}]
Execute crypto trading and DeFi operations using natural language. Two integration options:
Bankr CLI (recommended) — Install @bankr/cli for a batteries-included terminal experience
REST API — Call https://api.bankr.bot directly from any language or tool
Both use the same API key and the same async job workflow under the hood.
🚨 Financial Safety Guardrails
These skills enable high-risk financial operations (leverage trading up to 100x, token deployment, Polymarket betting, raw transaction submission). You MUST adhere to the following safety rules:
Always confirm with the user before executing any transaction.
Display amounts, fees, slippage, and risk level before execution.
Refuse to execute leverage >10x without explicit double-confirmation.
Warn users about irreversible on-chain operations.
Getting an API Key
Before using either option, you need a Bankr API key. Two ways to get one:
Option A: Headless email login (recommended for agents)
Two-step flow — send OTP, then verify and complete setup. See "First-Time Setup" below for the full guided flow with user preference prompts.
# Step 1 — send OTP to email
bankr login email user@example.com
# Step 2 — verify OTP and generate API key (options based on user preferences)
bankr login email user@example.com --code 123456 --accept-terms --key-name "My Agent" --read-write
This creates a wallet, accepts terms, and generates an API key — no browser needed. Before running step 2, ask the user whether they need read-only or read-write access, LLM gateway, and their preferred key name.
Sign up / Sign in — Enter your email and the one-time passcode (OTP) sent to it
Generate an API key — Create a key with Agent API access enabled (the key starts with bk_...)
Both options automatically provision EVM wallets (Base, Ethereum, Polygon, Unichain) and a Solana wallet — no manual wallet setup needed.
Option 1: Bankr CLI (Recommended)
Install
This SKILL.md is very large, so SkillsMP previews the first section here.View on GitHub
bun install -g @bankr/cli
Or with npm:
npm install -g @bankr/cli
First-Time Setup
Headless email login (recommended for agents)
When the user asks to log in with an email, walk them through this flow:
Step 1 — Send verification code
bankr login email <user-email>
Step 2 — Ask the user for the OTP code they received via email.
Step 3 — Before completing login, ask the user about their preferences:
Accept Terms of Service — Present the Terms of Service link and confirm the user agrees. Required for new users — do not pass --accept-terms unless the user has explicitly confirmed.
Read-only or read-write API key?
Read-only (default) — portfolio, balances, prices, research only
Enable LLM gateway access? (--llm) — multi-model API at llm.bankr.bot (currently limited to beta testers). Skip if user doesn't need it.
Key name? (--key-name) — a display name for the API key (e.g. "My Agent", "Trading Bot")
Step 4 — Construct and run the step 2 command with the user's choices:
# Example with all options
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Agent" --read-write --llm
# Example read-only, no LLM
bankr login email <user-email> --code <otp> --accept-terms --key-name "Research Bot"
Login options reference
Option
Description
--code <otp>
OTP code received via email (step 2)
--accept-terms
Accept Terms of Service without prompting (required for new users)
--key-name <name>
Display name for the API key (e.g. "My Agent"). Prompted if omitted
--read-write
Enable write operations: swaps, transfers, orders, token launches, leverage, Polymarket bets. Without this flag, the key is read-only (portfolio, balances, prices, research only)
--llm
Enable LLM gateway access (multi-model API at llm.bankr.bot). Currently limited to beta testers
Any option not provided on the command line will be prompted interactively by the CLI, so you can mix headless and interactive as needed.
Login with existing API key
If the user already has an API key:
bankr login --api-key bk_YOUR_KEY_HERE
If they need to create one at the Bankr Terminal:
Run bankr login --url — prints the terminal URL
Present the URL to the user, ask them to generate a bk_... key
Run bankr login --api-key bk_THE_KEY
Separate LLM Gateway Key (Optional)
If your LLM gateway key differs from your API key, pass --llm-key during login or run bankr config set llmKey YOUR_LLM_KEY afterward. When not set, the API key is used for both. See the Advanced Reference Guide below (llm-gateway) for full details.
Verify Setup
bankr whoami
bankr prompt "What is my balance?"
Option 2: REST API (Direct)
No CLI installation required — call the API directly with curl, fetch, or any HTTP client.
Authentication
All requests require an X-API-Key header:
curl -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: bk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is my ETH balance?"}'
Quick Example: Submit → Poll → Complete
# 1. Submit a prompt — returns a job ID
JOB=$(curl -s -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is my ETH balance?"}')
JOB_ID=$(echo"$JOB" | jq -r '.jobId')
# 2. Poll until terminal statuswhiletrue; do
RESULT=$(curl -s "https://api.bankr.bot/agent/job/$JOB_ID" \
-H "X-API-Key: $BANKR_API_KEY")
STATUS=$(echo"$RESULT" | jq -r '.status')
[ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ] || [ "$STATUS" = "cancelled" ] && breaksleep 2
done# 3. Read the responseecho"$RESULT" | jq -r '.response'
Conversation Threads
Every prompt response includes a threadId. Pass it back to continue the conversation:
# Start — the response includes a threadId
curl -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is the price of ETH?"}'# → {"jobId": "job_abc", "threadId": "thr_XYZ", ...}# Continue — pass threadId to maintain context
curl -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "And what about SOL?", "threadId": "thr_XYZ"}'
Omit threadId to start a new conversation. CLI equivalent: bankr prompt --continue (reuses last thread) or bankr prompt --thread <id>.
API Endpoints Summary
Endpoint
Method
Description
/agent/prompt
POST
Submit a prompt (async, returns job ID)
/agent/job/{jobId}
GET
Check job status and results
/agent/job/{jobId}/cancel
POST
Cancel a running job
/agent/balances
GET
Wallet balances across chains (sync, optional ?chains= filter)
/agent/sign
POST
Sign messages/transactions (sync)
/agent/submit
POST
Submit raw transactions (sync)
For full API details (request/response schemas, job states, rich data, polling strategy), see:
Reference: See Advanced Reference Guide below (api-workflow) | the Advanced Reference Guide below (sign-submit-api)
CLI Command Reference
Core Commands
Command
Description
bankr login
Authenticate with the Bankr API (interactive menu)
For straightforward requests that complete quickly:
bankr prompt "What is my ETH balance?"
bankr prompt "What's the price of Bitcoin?"
The CLI handles the full submit-poll-complete workflow automatically. You can also use the shorthand — any unrecognized command is treated as a prompt:
bankr What is the price of ETH?
Interactive Prompt
For prompts containing $ or special characters that the shell would expand:
# Interactive mode — no shell expansion issues
bankr prompt
# Then type: Buy $50 of ETH on Base# Or pipe inputecho'Buy $50 of ETH on Base' | bankr prompt
Conversation Threads
Continue a multi-turn conversation with the agent:
# First prompt — starts a new thread automatically
bankr prompt "What is the price of ETH?"# → Thread: thr_ABC123# Continue the conversation (agent remembers the ETH context)
bankr prompt --continue"And what about BTC?"
bankr prompt -c "Compare them"# Resume any thread by ID
bankr prompt --thread thr_ABC123 "Show me ETH chart"
Thread IDs are automatically saved to config after each prompt. The --continue / -c flag reuses the last thread.
Manual Job Control
For advanced use or long-running operations:
# Submit and get job ID
bankr prompt "Buy $100 of ETH"# → Job submitted: job_abc123# Check status of a specific job
bankr status job_abc123
# Cancel if needed
bankr cancel job_abc123
LLM Gateway
The Bankr LLM Gateway is a unified API for Claude, Gemini, GPT, and other models — multi-provider access, cost tracking, automatic failover, and SDK compatibility through a single endpoint.
Base URL:https://llm.bankr.bot
Uses your llmKey if configured, otherwise falls back to your API key.
Quick Commands
bankr llm models # List available models
bankr llm credits # Check credit balance
bankr llm setup openclaw --install # Install Bankr provider into OpenClaw
bankr llm setup opencode --install # Install Bankr provider into OpenCode
bankr llm setup claude # Print Claude Code env vars
bankr llm setup cursor # Cursor setup instructions
bankr llm claude # Launch Claude Code through gateway
bankr llm claude --model claude-opus-4.6 # Launch with specific model
Direct SDK Usage
The gateway works with standard OpenAI and Anthropic SDKs — just override the base URL:
For full model list, provider config JSON shape, SDK examples (Python, TypeScript), all setup commands, and troubleshooting, see:
Reference: See Advanced Reference Guide below (llm-gateway)
Capabilities Overview
Trading Operations
Token Swaps: Buy/sell/swap tokens across chains
Cross-Chain: Bridge tokens between chains
Limit Orders: Execute at target prices
Stop Loss: Automatic sell protection
DCA: Dollar-cost averaging strategies
TWAP: Time-weighted average pricing
Reference: See Advanced Reference Guide below (token-trading)
Portfolio Management
Check balances across all chains (bankr balances or GET /agent/balances)
View USD valuations
Track holdings by token or chain
Real-time price updates
Multi-chain aggregation
Filter by chain: bankr balances --chain base,solana or GET /agent/balances?chains=base,solana
Reference: See Advanced Reference Guide below (portfolio)
Market Research
Token prices and market data
Technical analysis (RSI, MACD, etc.)
Social sentiment analysis
Price charts
Trending tokens
Token comparisons
Reference: See Advanced Reference Guide below (market-research)
Transfers
Send to addresses, ENS, or social handles
Multi-chain support
Flexible amount formats
Social handle resolution (Twitter, Farcaster, Telegram)
Reference: See Advanced Reference Guide below (transfers)
NFT Operations
Browse and search collections
View floor prices and listings
Purchase NFTs via OpenSea
View your NFT portfolio
Transfer NFTs
Mint from supported platforms
Reference: See Advanced Reference Guide below (nft-operations)
Polymarket Betting
Search prediction markets
Check odds
Place bets on outcomes
View positions
Redeem winnings
Reference: See Advanced Reference Guide below (polymarket)
Leverage Trading
Long/short positions (up to 50x crypto, 100x forex/commodities)
Crypto, forex, and commodities
Stop loss and take profit
Position management via Avantis on Base
Reference: See Advanced Reference Guide below (leverage-trading)
Token Deployment
EVM (Base): Deploy ERC20 tokens via Clanker with customizable metadata and social links
Solana: Launch SPL tokens via Raydium LaunchLab with bonding curve and auto-migration to CPMM
Creator fee claiming on both chains
Fee Key NFTs for Solana (50% LP trading fees post-migration)
Optional fee recipient designation with 99.9%/0.1% split (Solana)
Both creator AND fee recipient can claim bonding curve fees (gas sponsored)
Optional vesting parameters (Solana)
Rate limits: 1/day standard, 10/day Bankr Club (gas sponsored within limits)
Reference: See Advanced Reference Guide below (token-deployment)
Automation
Limit orders
Stop loss orders
DCA (dollar-cost averaging)
TWAP (time-weighted average price)
Scheduled commands
Reference: See Advanced Reference Guide below (automation)
Arbitrary Transactions
Submit raw EVM transactions with explicit calldata
Custom contract calls to any address
Execute pre-built calldata from other tools
Value transfers with data
Reference: See Advanced Reference Guide below (arbitrary-transaction)
Supported Chains
Chain
Native Token
Best For
Gas Cost
Base
ETH
Memecoins, general trading
Very Low
Polygon
MATIC
Gaming, NFTs, frequent trades
Very Low
Ethereum
ETH
Blue chips, high liquidity
High
Solana
SOL
High-speed trading
Minimal
Unichain
ETH
Newer L2 option
Very Low
Safety & Access Control
Dedicated Agent Wallet: When building autonomous agents, create a separate Bankr account rather than using your personal wallet. This isolates agent funds — if a key is compromised, only the agent wallet is exposed. Fund it with limited amounts and replenish as needed.
API Key Types: Bankr uses a single key format (bk_...) with capability flags (agentApiEnabled, llmGatewayEnabled). You can optionally configure a separate LLM Gateway key via bankr config set llmKey or BANKR_LLM_KEY — useful when you want independent revocation or different permissions for agent vs LLM access.
Read-Only API Keys: Keys with readOnly: true filter all write tools (swaps, transfers, staking, token launches, etc.) from agent sessions. The /agent/sign and /agent/submit endpoints return 403. Ideal for monitoring bots and research agents.
IP Whitelisting: Set allowedIps on your API key to restrict usage to specific IPs. Requests from non-whitelisted IPs are rejected with 403 at the auth layer.
Rate Limits: 100 messages/day (standard), 1,000/day (Bankr Club), or custom per key. Resets 24h from first message (rolling window). LLM Gateway uses a credit-based system.
Key safety rules:
Store keys in environment variables (BANKR_API_KEY, BANKR_LLM_KEY), never in source code
Add ~/.bankr/ and .env to .gitignore — the CLI stores credentials in ~/.bankr/config.json
Test with small amounts on low-cost chains (Base, Polygon) before production use
Use waitForConfirmation: true with /agent/submit — transactions execute immediately with no confirmation prompt
Rotate keys periodically and revoke immediately if compromised at bankr.bot/api
Reference: See Advanced Reference Guide below (safety)
Common Patterns
Check Before Trading
# Check balance
bankr prompt "What is my ETH balance on Base?"# Check price
bankr prompt "What's the current price of PEPE?"# Then trade
bankr prompt "Buy $20 of PEPE on Base"
Portfolio Review
# Direct balance check (no AI agent, instant response)
bankr balances
bankr balances --chain base
bankr balances --chain base,solana
bankr balances --json
# Via AI agent (natural language, richer context)
bankr prompt "Show my complete portfolio"# Chain-specific
bankr prompt "What tokens do I have on Base?"# Token-specific
bankr prompt "Show my ETH across all chains"
Set Up Automation
# DCA strategy
bankr prompt "DCA $100 into ETH every week"# Stop loss protection
bankr prompt "Set stop loss for my ETH at $2,500"# Limit order
bankr prompt "Buy ETH if price drops to $3,000"
Market Research
# Price and analysis
bankr prompt "Do technical analysis on ETH"# Trending tokens
bankr prompt "What tokens are trending on Base?"# Compare tokens
bankr prompt "Compare ETH vs SOL"
API Workflow
Bankr uses an asynchronous job-based API:
Submit — Send prompt (with optional threadId), get job ID and thread ID
Poll — Check status every 2 seconds
Complete — Process results when done
Continue — Reuse threadId for multi-turn conversations
The bankr prompt command handles this automatically. When using the REST API directly, implement the poll loop yourself (see Option 2 above or the reference below). For manual job control via CLI, use bankr status <jobId> and bankr cancel <jobId>.
For details on the API structure, job states, polling strategy, and error handling, see:
Reference: See Advanced Reference Guide below (api-workflow)
Synchronous Endpoints
For direct signing and transaction submission, Bankr also provides synchronous endpoints:
POST /agent/sign - Sign messages, typed data, or transactions without broadcasting
POST /agent/submit - Submit raw transactions directly to the blockchain
These endpoints return immediately (no polling required) and are ideal for:
Authentication flows (sign messages)
Gasless approvals (sign EIP-712 permits)
Pre-built transactions (submit raw calldata)
Reference: See Advanced Reference Guide below (sign-submit-api)
Error Handling
Common issues and fixes:
Authentication errors → Run bankr login or check bankr whoami (CLI), or verify your X-API-Key header (REST API)
Insufficient balance → Add funds or reduce amount
Token not found → Verify symbol and chain
Transaction reverted → Check parameters and balances
Rate limiting → Wait and retry
For comprehensive error troubleshooting, setup instructions, and debugging steps, see:
Reference: See Advanced Reference Guide below (error-handling)
Best Practices
Security
Never share your API key or LLM key
Use a dedicated agent wallet with limited funds for autonomous agents
Use read-only API keys for monitoring and research-only agents
Set IP whitelisting for server-side agents with known IPs
Verify addresses before large transfers
Use stop losses for leverage trading
Store keys in environment variables, not source code — add ~/.bankr/ to .gitignore
See the Advanced Reference Guide below (safety) for comprehensive safety guidance.
Trading
Check balance before trades
Specify chain for lesser-known tokens
Consider gas costs (use Base/Polygon for small amounts)
Start small, scale up after testing
Use limit orders for better prices
Automation
Test automation with small amounts first
Review active orders regularly
Set realistic price targets
Always use stop loss for leverage
Monitor execution and adjust as needed
Tips for Success
For New Users
Start with balance checks and price queries
Test with $5-10 trades first
Use Base for lower fees
Enable trading confirmations initially
Learn one feature at a time
For Experienced Users
Leverage automation for strategies
Use multiple chains for diversification
Combine DCA with stop losses
Explore advanced features (leverage, Polymarket)
Monitor gas costs across chains
Prompt Examples by Category
Trading
"Buy $50 of ETH on Base"
"Swap 0.1 ETH for USDC"
"Sell 50% of my PEPE"
"Bridge 100 USDC from Polygon to Base"
Portfolio
bankr balances (direct, no AI processing)
bankr balances --chain base (single chain)
"Show my portfolio"
"What's my ETH balance?"
"Total portfolio value"
"Holdings on Base"
Market Research
"What's the price of Bitcoin?"
"Analyze ETH price"
"Trending tokens on Base"
"Compare UNI vs SUSHI"
Transfers
"Send 0.1 ETH to vitalik.eth"
"Transfer $20 USDC to @friend"
"Send 50 USDC to 0x123..."
NFTs
"Show Bored Ape floor price"
"Buy cheapest Pudgy Penguin"
"Show my NFTs"
Polymarket
"What are the odds Trump wins?"
"Bet $10 on Yes for [market]"
"Show my Polymarket positions"
Leverage
"Open 5x long on ETH with $100"
"Short BTC 10x with stop loss at $45k"
"Show my Avantis positions"
Automation
"DCA $100 into ETH weekly"
"Set limit order to buy ETH at $3,000"
"Stop loss for all holdings at -20%"
Token Deployment
Solana (LaunchLab):
"Launch a token called MOON on Solana"
"Launch a token called FROG and give fees to @0xDeployer"
"Deploy SpaceRocket with symbol ROCK"
"Launch BRAIN and route fees to 7xKXtg..."
"How much fees can I claim for MOON?"
"Claim my fees for MOON" (works for creator or fee recipient)
"Show my Fee Key NFTs"
"Claim my fee NFT for ROCKET" (post-migration)
"Transfer fees for MOON to 7xKXtg..."
EVM (Clanker):
"Deploy a token called BankrFan with symbol BFAN on Base"
# Verify installationwhich bankr
# Reinstall if needed
bun install -g @bankr/cli
Authentication Issues
CLI:
# Check current auth
bankr whoami# Re-authenticate
bankr login
# Check LLM key specifically
bankr config get llmKey
REST API:
# Test your API key
curl -s "https://api.bankr.bot/_health" -H "X-API-Key: $BANKR_API_KEY"
API Errors
See the Advanced Reference Guide below (error-handling) for comprehensive troubleshooting.
Getting Help
Check error message in CLI output or API response
Run bankr whoami to verify auth (CLI) or test with a curl to /_health (REST API)
Consult relevant reference document
Test with simple queries first (bankr prompt "What is my balance?" or POST /agent/prompt)
Pro Tip: The most common issue is not specifying the chain for tokens. When in doubt, always include "on Base" or "on Ethereum" in your prompt.
Security: Keep your API key private. Never commit your config file to version control. Only trade amounts you can afford to lose.
Quick Win: Start by checking your portfolio (bankr prompt "Show my portfolio") to see what's possible, then try a small $5-10 trade on Base to get familiar with the flow.
📚 Advanced Reference Guide
The following sections were inlined from the former references/ directory.
📖 Reference: api-workflow.md
Bankr API Workflow Reference
Understanding the asynchronous job pattern for Bankr API operations.
The CLI handles submit-poll-complete automatically. For installation and login, see the main SKILL.md.
bankr prompt "What is my ETH balance?"# submit + poll + display
bankr status <jobId> # check a specific job
bankr cancel <jobId> # cancel a running job
Using the REST API Directly
Call the endpoints below with curl, fetch, or any HTTP client. All requests require an X-API-Key header.
Core Pattern: Submit-Poll-Complete
All operations follow this pattern:
1. SUBMIT → Send prompt, get job ID
2. POLL → Check status every 2s
3. COMPLETE → Process results
API Endpoints
POST /agent/prompt
Submit a natural language prompt to start a job.
CLI equivalent:bankr prompt "What is my ETH balance?"
Request:
curl -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is my ETH balance?"}'
Continue a conversation:
curl -X POST "https://api.bankr.bot/agent/prompt" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "And what about SOL?", "threadId": "thr_ABC123"}'
Request Body:
prompt (string, required): The prompt to send to the AI agent (max 10,000 characters)
threadId (string, optional): Continue an existing conversation thread. If omitted, a new thread is created.
curl -X GET "https://api.bankr.bot/agent/job/job_abc123" \
-H "X-API-Key: YOUR_API_KEY"
Response (200 OK):
{"success":true,"jobId":"job_abc123","threadId":"thr_XYZ789","status":"completed","prompt":"What is my ETH balance?","response":"You have 0.5 ETH worth approximately $1,825.","richData":[],"statusUpdates":[{"message":"Checking balances...","timestamp":"2025-01-26T10:00:00Z"},{"message":"Calculating USD values...","timestamp":"2025-01-26T10:00:02Z"}],"createdAt":"2025-01-26T10:00:00Z","completedAt":"2025-01-26T10:00:03Z","processingTime":3000}
Error Responses:
Status
Error
Cause
400
Job ID required
Missing job ID in path
401
Authentication required
Missing or invalid API key
404
Job not found
Job ID doesn't exist or doesn't belong to you
POST /agent/job/{jobId}/cancel
Cancel a pending or processing job. Cancel requests are idempotent — cancelling an already-cancelled job returns success.
{"success":true,"jobId":"job_abc123","status":"cancelled","prompt":"Swap 0.1 ETH for USDC","createdAt":"2025-01-26T10:00:00Z","cancelledAt":"2025-01-26T10:00:05Z"}
Error Responses:
Status
Error
Cause
400
Job ID required, Job already completed, or Job already failed
Invalid state for cancellation
401
Authentication required
Missing or invalid API key
404
Job not found
Job ID doesn't exist or doesn't belong to you
Job Status States
Status
Description
Action
pending
Job queued, not yet started
Keep polling
processing
Job is being processed
Keep polling, show updates
completed
Job finished successfully
Read response and richData
failed
Job encountered an error
Check error field
cancelled
Job was cancelled
No further action
Response Fields
Standard Fields
success: Boolean, true if request succeeded
jobId: Unique job identifier
threadId: Conversation thread ID (reuse to continue the conversation)
status: Current job status (pending, processing, completed, failed, cancelled)
prompt: Original user prompt
createdAt: ISO 8601 timestamp
Success Fields (status=completed)
response: Natural language response text
richData: Array of structured data objects (see Rich Data below)
completedAt: When job finished (ISO 8601)
processingTime: Duration in milliseconds
Progress Fields (status=processing)
statusUpdates: Array of progress messages ({message, timestamp})
startedAt: When processing began (ISO 8601)
cancellable: Boolean, whether the job can still be cancelled
Error Fields (status=failed)
error: Error message
completedAt: When failure occurred (ISO 8601)
Cancelled Fields (status=cancelled)
cancelledAt: When the job was cancelled (ISO 8601)
Rich Data Objects
Completed jobs may include a richData array containing structured data (e.g., token info, price quotes, charts). Each entry has:
The exact shape depends on the operation performed. The response field always contains a human-readable text summary regardless of what richData contains.
# Install the Bankr CLI
bun install -g @bankr/cli
# Or with npm
npm install -g @bankr/cli
# Verify installationwhich bankr
Not Authenticated
# Authenticate (opens browser for email/OTP flow)
bankr login
# Or set API key directly
bankr config set apiKey bk_your_key_here
# Set separate LLM key (optional, falls back to API key)
bankr config set llmKey your_llm_key_here
# Verify
bankr whoami
Config is stored at ~/.bankr/config.json. View current values with bankr config get.
REST API Authentication
If using the API directly without the CLI, test your key with:
Set BANKR_API_KEY (and optionally BANKR_LLM_KEY for the LLM gateway) as environment variables.
User-Friendly Error Messages
Template
[What went wrong]
This usually means: [Explanation]
To fix this:
1. [Step 1]
2. [Step 2]
3. [Step 3]
Need help? Visit https://bankr.bot/api
Examples
Balance Error:
You don't have enough ETH to complete this trade.
This usually means: Your wallet balance is too low for the trade amount plus gas fees.
To fix this:
1. Check your balance: "What is my ETH balance?"
2. Either reduce the trade amount
3. Or add more ETH to your wallet
You currently need at least $XX.XX worth of ETH.
Token Not Found:
Couldn't find the token "XYZ" on Base.
This usually means: The token symbol is wrong, the token doesn't exist on this chain, or it hasn't been indexed yet.
To fix this:
1. Double-check the token symbol spelling
2. Try specifying the chain: "Buy XYZ on Ethereum"
3. Or use the contract address instead
Try: "Search for XYZ token" to find it
Debugging Checklist
Before reporting an issue, check:
API key is set and correct
Config file exists and has valid JSON
Internet connection is working
api.bankr.bot is reachable
Wallet has sufficient balance (tokens + gas)
Token/market exists on specified chain
Command syntax is correct
No typos in token symbols or addresses
Recent similar operations worked
Getting Help
Check Status
# Verify authentication
bankr whoami# Test with a simple query
bankr prompt "What is my balance?"
1. Error occurs
↓
2. Read error message carefully
↓
3. Check this guide for known issue
↓
4. Apply suggested fix
↓
5. Test with small amount
↓
6. If still failing:
- Verify config
- Test API connectivity
- Report issue with details
Remember: Most errors have simple fixes. Read the error message carefully, check the basics (API key, balance, connection), and consult this guide.
📖 Reference: leverage-trading.md
Leverage Trading Reference
Trade with leverage using Avantis perpetuals on Base.
Overview
Avantis offers long/short positions on crypto, forex, and commodities via perpetuals on Base.
Remember: Leverage trading is a tool, not a get-rich-quick scheme. Most traders lose money. Start small, learn continuously, and never risk more than you can afford to lose.
📖 Reference: llm-gateway.md
LLM Gateway Reference
The Bankr LLM Gateway is a unified API for Claude, Gemini, GPT, and other models. It provides multi-provider access, cost tracking, automatic failover, and SDK compatibility through a single endpoint.
Base URL:https://llm.bankr.bot
The gateway accepts both https://llm.bankr.bot and https://llm.bankr.bot/v1 — it normalizes paths automatically. Works with both OpenAI and Anthropic API formats.
Authentication
The gateway uses your LLM key for authentication. The key resolution order:
BANKR_LLM_KEY environment variable
llmKey in ~/.bankr/config.json
Falls back to your Bankr API key (BANKR_API_KEY / apiKey)
Most users only need a single key for both the agent API and the LLM gateway. Set a separate LLM key only if your keys have different permissions or rate limits.
Setting the LLM Key
Via CLI:
bankr login --llm-key YOUR_LLM_KEY # during login
bankr config set llmKey YOUR_LLM_KEY # after login
Via environment variable:
export BANKR_LLM_KEY=your_llm_key_here
Verify:
bankr config get llmKey
Available Models
Model
Provider
Best For
claude-opus-4.6
Anthropic
Most capable, advanced reasoning
claude-opus-4.5
Anthropic
Complex reasoning, architecture
claude-sonnet-4.5
Anthropic
Balanced speed and quality
claude-haiku-4.5
Anthropic
Fast, cost-effective
gemini-3-pro
Google
Long context (2M tokens)
gemini-3-flash
Google
High throughput
gemini-2.5-pro
Google
Long context, multimodal
gemini-2.5-flash
Google
Speed, high throughput
gpt-5.2
OpenAI
Advanced reasoning
gpt-5.2-codex
OpenAI
Code generation
gpt-5-mini
OpenAI
Fast, economical
gpt-5-nano
OpenAI
Ultra-fast, lowest cost
kimi-k2.5
Moonshot AI
Long-context reasoning
qwen3-coder
Alibaba
Code generation, debugging
# Fetch live model list from the gateway
bankr llm models
Credits
Check your LLM gateway credit balance:
bankr llm credits
Returns your remaining USD credit balance. When credits are exhausted, gateway requests will fail with HTTP 402.
Tool Integrations
OpenClaw
Auto-install the Bankr provider into your OpenClaw config:
# Write config to ~/.openclaw/openclaw.json
bankr llm setup openclaw --install
# Preview the config without writing
bankr llm setup openclaw
This writes the following provider config (with your key and all available models):
Claude models are automatically configured with "api": "anthropic-messages" per-model overrides while all other models use the default "api": "openai-completions".
To use a Bankr model as your default in OpenClaw, add to openclaw.json:
# Launch Claude Code through the gateway
bankr llm claude
# Pass any Claude Code flags through
bankr llm claude --model claude-sonnet-4.5
bankr llm claude --allowedTools Edit,Write,Bash
bankr llm claude --resume
All arguments after claude are forwarded to the claude binary. The CLI sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN automatically from your config (using llmKey if set, otherwise apiKey).
Option B: Set environment variables
# Print the env vars to add to your shell profile
bankr llm setup claude
Add these to ~/.zshrc or ~/.bashrc so all Claude Code sessions use the gateway.
OpenCode
# Auto-install Bankr provider into ~/.config/opencode/opencode.json
bankr llm setup opencode --install
# Preview without writing
bankr llm setup opencode
Cursor
# Get step-by-step setup instructions with your API key
bankr llm setup cursor
The setup adds your key as the OpenAI API Key, sets https://llm.bankr.bot/v1 as the base URL override, and registers the available model IDs. When the base URL override is enabled, all model requests go through the gateway.
Direct SDK Usage
The gateway is compatible with standard OpenAI and Anthropic SDKs — just override the base URL.