bankr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBankr
Bankr
Execute crypto trading and DeFi operations using natural language. Two integration options:
- Bankr CLI (recommended) — Install for a batteries-included terminal experience
@bankr/cli - REST API — Call directly from any language or tool
https://api.bankr.bot
Both use the same API key and the same async job workflow under the hood.
通过自然语言执行加密货币交易与DeFi操作。提供两种集成方式:
- Bankr CLI(推荐)—— 安装以获得功能完备的终端使用体验
@bankr/cli - REST API—— 直接从任意语言或工具调用
https://api.bankr.bot
二者底层使用相同的API密钥与异步任务工作流。
Getting an API Key
获取API密钥
Before using either option, you need a Bankr API key:
- Visit bankr.bot/api
- 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_...
Creating a new account automatically provisions EVM wallets (Base, Ethereum, Polygon, Unichain) and a Solana wallet — no manual wallet setup needed.
使用任一方式前,你需要一个Bankr API密钥:
- 访问bankr.bot/api
- 注册/登录—— 输入你的邮箱及收到的一次性验证码(OTP)
- 生成API密钥—— 创建一个启用了Agent API访问权限的密钥(密钥以开头)
bk_...
创建新账户会自动配置EVM钱包(Base、Ethereum、Polygon、Unichain)和Solana钱包——无需手动设置钱包。
Option 1: Bankr CLI (Recommended)
方式1:Bankr CLI(推荐)
Install
安装
bash
bun install -g @bankr/cliOr with npm:
bash
npm install -g @bankr/clibash
bun install -g @bankr/cli或使用npm:
bash
npm install -g @bankr/cliFirst-Time Setup
首次设置
bash
undefinedbash
undefinedAuthenticate with Bankr (interactive — opens browser or paste key)
与Bankr进行身份验证(交互式——打开浏览器或粘贴密钥)
bankr login
bankr login
Verify your identity
验证身份
bankr whoami
The `bankr login` command gives you two choices:
**A) Open the Bankr dashboard** — The CLI opens [bankr.bot/api](https://bankr.bot/api) where you generate a key and paste it back.
**B) Paste an existing API key** — Select "Paste an existing Bankr API key" and enter it directly.bankr whoami
`bankr login`命令提供两种选择:
**A) 打开Bankr控制台**—— CLI会打开[bankr.bot/api](https://bankr.bot/api),你可以在此生成密钥并粘贴回终端。
**B) 粘贴现有API密钥**—— 选择"Paste an existing Bankr API key"并直接输入密钥。Separate LLM Gateway Key (Optional)
独立LLM网关密钥(可选)
If your LLM gateway key differs from your API key, pass during login or run afterward. When not set, the API key is used for both. See references/llm-gateway.md for full details.
--llm-keybankr config set llmKey YOUR_LLM_KEY如果你的LLM网关密钥与API密钥不同,可在登录时传递参数,或之后运行。若未设置,将默认使用API密钥同时用于二者。详见references/llm-gateway.md的完整说明。
--llm-keybankr config set llmKey YOUR_LLM_KEYNon-Interactive Login (for AI agents)
非交互式登录(适用于AI Agent)
If you cannot interact with terminal prompts, use these flags:
If the user needs to create an API key:
- Run — prints the dashboard URL
bankr login --url - Present the URL to the user, ask them to generate a key
bk_... - Run
bankr login --api-key bk_THE_KEY
If the user already has an API key:
bash
bankr login --api-key bk_YOUR_KEY_HERE若无法与终端提示交互,可使用以下参数:
如果用户需要创建API密钥:
- 运行—— 打印控制台URL
bankr login --url - 将URL提供给用户,要求其生成格式的密钥
bk_... - 运行
bankr login --api-key bk_THE_KEY
如果用户已有API密钥:
bash
bankr login --api-key bk_YOUR_KEY_HEREVerify Setup
验证设置
bash
bankr whoami
bankr prompt "What is my balance?"bash
bankr whoami
bankr prompt "What is my balance?"Option 2: REST API (Direct)
方式2:直接使用REST API
No CLI installation required — call the API directly with , , or any HTTP client.
curlfetch无需安装CLI——直接使用、或任意HTTP客户端调用API。
curlfetchAuthentication
身份验证
All requests require an header:
X-API-Keybash
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?"}'所有请求均需携带请求头:
X-API-Keybash
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
快速示例:提交→轮询→完成
bash
undefinedbash
undefined1. Submit a prompt — returns a job ID
1. 提交请求——返回任务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')
-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')
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')
-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 status
2. 轮询直到任务进入终端状态
while true; 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" ] && break sleep 2 done
-H "X-API-Key: $BANKR_API_KEY") STATUS=$(echo "$RESULT" | jq -r '.status') [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ] || [ "$STATUS" = "cancelled" ] && break sleep 2 done
while true; 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" ] && break sleep 2 done
-H "X-API-Key: $BANKR_API_KEY") STATUS=$(echo "$RESULT" | jq -r '.status') [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ] || [ "$STATUS" = "cancelled" ] && break sleep 2 done
3. Read the response
3. 读取响应结果
echo "$RESULT" | jq -r '.response'
undefinedecho "$RESULT" | jq -r '.response'
undefinedConversation Threads
对话线程
Every prompt response includes a . Pass it back to continue the conversation:
threadIdbash
undefined每个请求响应都会包含一个。将其传回即可继续对话:
threadIdbash
undefinedStart — the response includes a threadId
开始对话——响应中包含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?"}'
-H "X-API-Key: $BANKR_API_KEY"
-H "Content-Type: application/json"
-d '{"prompt": "What is the price of ETH?"}'
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?"}'
-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", ...}
→ {"jobId": "job_abc", "threadId": "thr_XYZ", ...}
Continue — pass threadId to maintain context
继续对话——传入threadId以保持上下文
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"}'
-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>`.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"}'
-H "X-API-Key: $BANKR_API_KEY"
-H "Content-Type: application/json"
-d '{"prompt": "And what about SOL?", "threadId": "thr_XYZ"}'
若不传入`threadId`则会开启新对话。对应的CLI命令为:`bankr prompt --continue`(复用最后一个线程)或`bankr prompt --thread <id>`。API Endpoints Summary
API端点汇总
| Endpoint | Method | Description |
|---|---|---|
| POST | Submit a prompt (async, returns job ID) |
| GET | Check job status and results |
| POST | Cancel a running job |
| POST | Sign messages/transactions (sync) |
| POST | Submit raw transactions (sync) |
For full API details (request/response schemas, job states, rich data, polling strategy), see:
Reference: references/api-workflow.md | references/sign-submit-api.md
| 端点 | 请求方法 | 描述 |
|---|---|---|
| POST | 提交请求(异步,返回任务ID) |
| GET | 检查任务状态与结果 |
| POST | 取消运行中的任务 |
| POST | 签署消息/交易(同步) |
| POST | 提交原始交易(同步) |
关于API的完整详情(请求/响应 schema、任务状态、富数据、轮询策略),请查看:
参考文档:references/api-workflow.md | references/sign-submit-api.md
CLI Command Reference
CLI命令参考
Core Commands
核心命令
| Command | Description |
|---|---|
| Authenticate with the Bankr API (interactive) |
| Print dashboard URL for API key generation |
| Login with an API key directly (non-interactive) |
| Login with separate LLM gateway key |
| Clear stored credentials |
| Show current authentication info |
| Send a prompt to the Bankr AI agent |
| Continue the most recent conversation thread |
| Continue a specific conversation thread |
| Check the status of a running job |
| Cancel a running job |
| Show all Bankr AI agent skills with examples |
| 命令 | 描述 |
|---|---|
| 与Bankr API进行身份验证(交互式) |
| 打印用于生成API密钥的控制台URL |
| 直接使用API密钥登录(非交互式) |
| 使用独立的LLM网关密钥登录 |
| 清除存储的凭证 |
| 显示当前身份验证信息 |
| 向Bankr AI Agent发送请求 |
| 继续最近的对话线程 |
| 继续指定的对话线程 |
| 检查运行中任务的状态 |
| 取消运行中的任务 |
| 显示Bankr AI Agent的所有技能及示例 |
Configuration Commands
配置命令
| Command | Description |
|---|---|
| Get config value(s) |
| Set a config value |
| Use a custom config file path |
Valid config keys: , , ,
apiKeyapiUrlllmKeyllmUrlDefault config location: . Override with or env var.
~/.bankr/config.json--configBANKR_CONFIG| 命令 | 描述 |
|---|---|
| 获取配置值 |
| 设置配置值 |
| 使用自定义配置文件路径 |
有效的配置键:、、、
apiKeyapiUrlllmKeyllmUrl默认配置文件位置:。可通过参数或环境变量覆盖。
~/.bankr/config.json--configBANKR_CONFIGEnvironment Variables
环境变量
| Variable | Description |
|---|---|
| API key (overrides stored key) |
| API URL (default: |
| LLM gateway key (falls back to |
| LLM gateway URL (default: |
Environment variables override config file values. Config file values override defaults.
| 变量 | 描述 |
|---|---|
| API密钥(覆盖存储的密钥) |
| API地址(默认: |
| LLM网关密钥(若未设置则回退使用 |
| LLM网关地址(默认: |
环境变量优先级高于配置文件,配置文件优先级高于默认值。
LLM Gateway Commands
LLM网关命令
| Command | Description |
|---|---|
| List available LLM models |
| Generate or install OpenClaw config |
| Generate or install OpenCode config |
| Show Claude Code environment setup |
| Show Cursor IDE setup instructions |
| Launch Claude Code via the Bankr LLM Gateway |
| 命令 | 描述 |
|---|---|
| 列出可用的LLM模型 |
| 生成或安装OpenClaw配置 |
| 生成或安装OpenCode配置 |
| 显示Claude Code环境设置说明 |
| 显示Cursor IDE设置说明 |
| 通过Bankr LLM网关启动Claude Code |
Core Usage
核心用法
Simple Query
简单查询
For straightforward requests that complete quickly:
bash
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:
bash
bankr What is the price of ETH?适用于快速完成的简单请求:
bash
bankr prompt "What is my ETH balance?"
bankr prompt "What's the price of Bitcoin?"CLI会自动处理完整的提交-轮询-完成流程。你也可以使用简写——任何未识别的命令都会被视为请求:
bash
bankr What is the price of ETH?Interactive Prompt
交互式请求
For prompts containing or special characters that the shell would expand:
$bash
undefined对于包含或会被Shell解析的特殊字符的请求:
$bash
undefinedInteractive mode — no shell expansion issues
交互模式——无Shell解析问题
bankr prompt
bankr prompt
Then type: Buy $50 of ETH on Base
然后输入:Buy $50 of ETH on Base
Or pipe input
或通过管道输入
echo 'Buy $50 of ETH on Base' | bankr prompt
undefinedecho 'Buy $50 of ETH on Base' | bankr prompt
undefinedConversation Threads
对话线程
Continue a multi-turn conversation with the agent:
bash
undefined与Agent进行多轮对话:
bash
undefinedFirst prompt — starts a new thread automatically
首次请求——自动开启新线程
bankr prompt "What is the price of ETH?"
bankr prompt "What is the price of ETH?"
→ Thread: thr_ABC123
→ 线程:thr_ABC123
Continue the conversation (agent remembers the ETH context)
继续对话(Agent会记住ETH相关上下文)
bankr prompt --continue "And what about BTC?"
bankr prompt -c "Compare them"
bankr prompt --continue "And what about BTC?"
bankr prompt -c "Compare them"
Resume any thread by ID
通过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.bankr prompt --thread thr_ABC123 "Show me ETH chart"
线程ID会在每次请求后自动保存到配置中。`--continue`/`-c`参数会复用最后一个线程。Manual Job Control
手动任务控制
For advanced use or long-running operations:
bash
undefined适用于高级使用场景或长时间运行的操作:
bash
undefinedSubmit and get job ID
提交请求并获取任务ID
bankr prompt "Buy $100 of ETH"
bankr prompt "Buy $100 of ETH"
→ Job submitted: job_abc123
→ 任务已提交:job_abc123
Check status of a specific job
检查指定任务的状态
bankr status job_abc123
bankr status job_abc123
Cancel if needed
必要时取消任务
bankr cancel job_abc123
undefinedbankr cancel job_abc123
undefinedLLM Gateway
LLM网关
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.botUses your if configured, otherwise falls back to your API key.
llmKeyBankr LLM网关是一个统一API,支持Claude、Gemini、GPT等多种模型——通过单一端点实现多供应商访问、成本追踪、自动故障转移及SDK兼容。
基础地址:
https://llm.bankr.bot若已配置则使用该密钥,否则回退使用API密钥。
llmKeyQuick Commands
快速命令
bash
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 modelbash
bankr llm models # 列出可用模型
bankr llm credits # 查看余额
bankr llm setup openclaw --install # 将Bankr提供者安装到OpenClaw
bankr llm setup opencode --install # 将Bankr提供者安装到OpenCode
bankr llm setup claude # 打印Claude Code环境变量
bankr llm setup cursor # Cursor设置说明
bankr llm claude # 通过网关启动Claude Code
bankr llm claude --model claude-opus-4.6 # 使用指定模型启动Direct SDK Usage
直接SDK使用
The gateway works with standard OpenAI and Anthropic SDKs — just override the base URL:
bash
undefined该网关兼容标准OpenAI和Anthropic SDK——只需覆盖基础地址即可:
bash
undefinedOpenAI-compatible
OpenAI兼容接口
curl -X POST "https://llm.bankr.bot/v1/chat/completions"
-H "Authorization: Bearer $BANKR_LLM_KEY"
-H "Content-Type: application/json"
-d '{"model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello"}]}'
-H "Authorization: Bearer $BANKR_LLM_KEY"
-H "Content-Type: application/json"
-d '{"model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello"}]}'
For full model list, provider config JSON shape, SDK examples (Python, TypeScript), all setup commands, and troubleshooting, see:
**Reference**: [references/llm-gateway.md](references/llm-gateway.md)curl -X POST "https://llm.bankr.bot/v1/chat/completions"
-H "Authorization: Bearer $BANKR_LLM_KEY"
-H "Content-Type: application/json"
-d '{"model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello"}]}'
-H "Authorization: Bearer $BANKR_LLM_KEY"
-H "Content-Type: application/json"
-d '{"model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello"}]}'
关于完整模型列表、供应商配置JSON格式、SDK示例(Python、TypeScript)、所有设置命令及故障排除,请查看:
**参考文档**:[references/llm-gateway.md](references/llm-gateway.md)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: references/token-trading.md
- 代币兑换:跨链买卖/兑换代币
- 跨链桥接:在链之间转移代币
- 限价订单:按目标价格执行交易
- 止损订单:自动卖出保护
- DCA策略:美元成本平均策略
- TWAP策略:时间加权平均定价
参考文档:references/token-trading.md
Portfolio Management
投资组合管理
- Check balances across all chains
- View USD valuations
- Track holdings by token or chain
- Real-time price updates
- Multi-chain aggregation
Reference: references/portfolio.md
- 查看所有链上的余额
- 查看美元估值
- 按代币或链追踪持仓
- 实时价格更新
- 多链聚合
参考文档:references/portfolio.md
Market Research
市场研究
- Token prices and market data
- Technical analysis (RSI, MACD, etc.)
- Social sentiment analysis
- Price charts
- Trending tokens
- Token comparisons
Reference: references/market-research.md
- 代币价格与市场数据
- 技术分析(RSI、MACD等)
- 社交情绪分析
- 价格图表
- 热门代币
- 代币对比
参考文档:references/market-research.md
Transfers
转账
- Send to addresses, ENS, or social handles
- Multi-chain support
- Flexible amount formats
- Social handle resolution (Twitter, Farcaster, Telegram)
Reference: references/transfers.md
- 向地址、ENS或社交账号转账
- 多链支持
- 灵活的金额格式
- 社交账号解析(Twitter、Farcaster、Telegram)
参考文档:references/transfers.md
NFT Operations
NFT操作
- Browse and search collections
- View floor prices and listings
- Purchase NFTs via OpenSea
- View your NFT portfolio
- Transfer NFTs
- Mint from supported platforms
Reference: references/nft-operations.md
- 浏览和搜索NFT合集
- 查看地板价与挂单
- 通过OpenSea购买NFT
- 查看你的NFT投资组合
- 转账NFT
- 从支持的平台铸造NFT
参考文档:references/nft-operations.md
Polymarket Betting
Polymarket投注
- Search prediction markets
- Check odds
- Place bets on outcomes
- View positions
- Redeem winnings
Reference: references/polymarket.md
- 搜索预测市场
- 查看赔率
- 对结果下注
- 查看持仓
- 提取奖金
参考文档:references/polymarket.md
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: references/leverage-trading.md
- 做多/做空仓位(加密货币最高50倍杠杆,外汇/大宗商品最高100倍)
- 支持加密货币、外汇和大宗商品
- 止损与止盈
- 通过Base上的Avantis管理仓位
参考文档:references/leverage-trading.md
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: references/token-deployment.md
- EVM(Base):通过Clanker部署ERC20代币,支持自定义元数据和社交链接
- Solana:通过Raydium LaunchLab发行SPL代币,支持绑定曲线和自动迁移至CPMM
- 两条链均支持创作者手续费提取
- Solana链的Fee Key NFT(迁移后可获得50%的LP交易手续费)
- 可选手续费接收方设置(Solana链支持99.9%/0.1%拆分)
- 创作者和手续费接收方均可提取绑定曲线手续费(Gas由平台赞助)
- 可选锁仓参数(Solana链)
- 速率限制:标准用户1天1次,Bankr Club用户1天10次(Gas在限制内由平台赞助)
参考文档:references/token-deployment.md
Automation
自动化
- Limit orders
- Stop loss orders
- DCA (dollar-cost averaging)
- TWAP (time-weighted average price)
- Scheduled commands
Reference: references/automation.md
- 限价订单
- 止损订单
- DCA(美元成本平均)
- TWAP(时间加权平均价格)
- 定时命令
参考文档:references/automation.md
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: references/arbitrary-transaction.md
- 提交包含明确calldata的原始EVM交易
- 向任意地址发起自定义合约调用
- 执行其他工具生成的预构建calldata
- 带数据的价值转移
参考文档:references/arbitrary-transaction.md
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 |
| 区块链 | 原生代币 | 适用场景 | 手续费 |
|---|---|---|---|
| Base | ETH | 迷因币、通用交易 | 极低 |
| Polygon | MATIC | 游戏、NFT、高频交易 | 极低 |
| Ethereum | ETH | 蓝筹币、高流动性资产 | 高 |
| Solana | SOL | 高速交易 | 极低 |
| Unichain | ETH | 新型Layer2选项 | 极低 |
Common Patterns
常见使用模式
Check Before Trading
交易前检查
bash
undefinedbash
undefinedCheck balance
检查余额
bankr prompt "What is my ETH balance on Base?"
bankr prompt "What is my ETH balance on Base?"
Check price
检查价格
bankr prompt "What's the current price of PEPE?"
bankr prompt "What's the current price of PEPE?"
Then trade
进行交易
bankr prompt "Buy $20 of PEPE on Base"
undefinedbankr prompt "Buy $20 of PEPE on Base"
undefinedPortfolio Review
投资组合回顾
bash
undefinedbash
undefinedFull portfolio
完整投资组合
bankr prompt "Show my complete portfolio"
bankr prompt "Show my complete portfolio"
Chain-specific
指定链的持仓
bankr prompt "What tokens do I have on Base?"
bankr prompt "What tokens do I have on Base?"
Token-specific
指定代币的跨链持仓
bankr prompt "Show my ETH across all chains"
undefinedbankr prompt "Show my ETH across all chains"
undefinedSet Up Automation
设置自动化
bash
undefinedbash
undefinedDCA strategy
DCA策略
bankr prompt "DCA $100 into ETH every week"
bankr prompt "DCA $100 into ETH every week"
Stop loss protection
止损保护
bankr prompt "Set stop loss for my ETH at $2,500"
bankr prompt "Set stop loss for my ETH at $2,500"
Limit order
限价订单
bankr prompt "Buy ETH if price drops to $3,000"
undefinedbankr prompt "Buy ETH if price drops to $3,000"
undefinedMarket Research
市场研究
bash
undefinedbash
undefinedPrice and analysis
价格与分析
bankr prompt "Do technical analysis on ETH"
bankr prompt "Do technical analysis on ETH"
Trending tokens
热门代币
bankr prompt "What tokens are trending on Base?"
bankr prompt "What tokens are trending on Base?"
Compare tokens
代币对比
bankr prompt "Compare ETH vs SOL"
undefinedbankr prompt "Compare ETH vs SOL"
undefinedAPI Workflow
API工作流
Bankr uses an asynchronous job-based API:
- Submit — Send prompt (with optional ), get job ID and thread ID
threadId - Poll — Check status every 2 seconds
- Complete — Process results when done
- Continue — Reuse for multi-turn conversations
threadId
The 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 and .
bankr promptbankr status <jobId>bankr cancel <jobId>For details on the API structure, job states, polling strategy, and error handling, see:
Reference: references/api-workflow.md
Bankr采用异步任务式API:
- 提交—— 发送请求(可选携带),获取任务ID和线程ID
threadId - 轮询—— 每2秒检查一次状态
- 完成—— 任务完成后处理结果
- 继续—— 复用进行多轮对话
threadId
bankr promptbankr status <jobId>bankr cancel <jobId>关于API结构、任务状态、轮询策略和错误处理的详情,请查看:
参考文档:references/api-workflow.md
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: references/sign-submit-api.md
对于直接签署和提交交易,Bankr还提供同步端点:
- POST /agent/sign - 签署消息、类型化数据或交易但不广播
- POST /agent/submit - 直接向区块链提交原始交易
这些端点会立即返回结果(无需轮询),适用于:
- 身份验证流程(签署消息)
- 无Gas授权(签署EIP-712许可)
- 预构建交易(提交原始calldata)
参考文档:references/sign-submit-api.md
Error Handling
错误处理
Common issues and fixes:
- Authentication errors → Run or check
bankr login(CLI), or verify yourbankr whoamiheader (REST API)X-API-Key - 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: references/error-handling.md
常见问题及解决方法:
- 身份验证错误 → 运行或检查
bankr login(CLI),或验证bankr whoami请求头(REST API)X-API-Key - 余额不足 → 充值或减少交易金额
- 代币未找到 → 验证代币符号和链
- 交易回滚 → 检查参数和余额
- 速率限制 → 等待后重试
关于全面的错误排查、设置说明和调试步骤,请查看:
参考文档:references/error-handling.md
Best Practices
最佳实践
Security
安全
- Never share your API key
- Start with small test amounts
- Verify addresses before large transfers
- Use stop losses for leverage trading
- Double-check transaction details
- 切勿分享你的API密钥
- 先使用小额测试金额
- 大额转账前验证地址
- 杠杆交易使用止损
- 仔细核对交易详情
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
- 交易前检查余额
- 小众代币需指定链
- 考虑Gas成本(小额交易使用Base/Polygon)
- 从小额交易开始,测试后再扩大规模
- 使用限价订单获取更优价格
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
- 从余额查询和价格查询开始
- 先测试5-10美元的交易
- 使用Base链以降低手续费
- 初始阶段启用交易确认
- 逐个学习功能
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
- 利用自动化执行策略
- 使用多条链进行多元化配置
- 结合DCA与止损策略
- 探索高级功能(杠杆、Polymarket)
- 监控各链的Gas成本
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"
- "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
投资组合
- "Show my portfolio"
- "What's my ETH balance?"
- "Total portfolio value"
- "Holdings on Base"
- "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"
- "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..."
- "Send 0.1 ETH to vitalik.eth"
- "Transfer $20 USDC to @friend"
- "Send 50 USDC to 0x123..."
NFTs
NFT
- "Show Bored Ape floor price"
- "Buy cheapest Pudgy Penguin"
- "Show my NFTs"
- "Show Bored Ape floor price"
- "Buy cheapest Pudgy Penguin"
- "Show my NFTs"
Polymarket
Polymarket
- "What are the odds Trump wins?"
- "Bet $10 on Yes for [market]"
- "Show my Polymarket positions"
- "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"
- "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%"
- "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"
- "Claim fees for my token MTK"
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"(创作者和手续费接收方均可使用)
- "Show my Fee Key NFTs"
- "Claim my fee NFT for ROCKET"(迁移后)
- "Transfer fees for MOON to 7xKXtg..."
EVM(Clanker):
- "Deploy a token called BankrFan with symbol BFAN on Base"
- "Claim fees for my token MTK"
Arbitrary Transactions
自定义交易
- "Submit this transaction: {to: 0x..., data: 0x..., value: 0, chainId: 8453}"
- "Execute this calldata on Base: {...}"
- "Send raw transaction with this JSON: {...}"
- "Submit this transaction: {to: 0x..., data: 0x..., value: 0, chainId: 8453}"
- "Execute this calldata on Base: {...}"
- "Send raw transaction with this JSON: {...}"
Sign API (Synchronous)
Sign API(同步)
Direct message signing without AI processing:
bash
undefined无需AI处理的直接消息签署:
bash
undefinedSign a plain text message
签署纯文本消息
curl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
curl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
Sign EIP-712 typed data (permits, orders)
签署EIP-712类型化数据(许可、订单)
curl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'
curl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'
Sign a transaction without broadcasting
签署交易但不广播
curl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTransaction", "transaction": {"to": "0x...", "chainId": 8453}}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTransaction", "transaction": {"to": "0x...", "chainId": 8453}}'
undefinedcurl -X POST "https://api.bankr.bot/agent/sign"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTransaction", "transaction": {"to": "0x...", "chainId": 8453}}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"signatureType": "eth_signTransaction", "transaction": {"to": "0x...", "chainId": 8453}}'
undefinedSubmit API (Synchronous)
Submit API(同步)
Direct transaction submission without AI processing:
bash
undefined无需AI处理的直接交易提交:
bash
undefinedSubmit a raw transaction
提交原始交易
curl -X POST "https://api.bankr.bot/agent/submit"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{ "transaction": {"to": "0x...", "chainId": 8453, "value": "1000000000000000000"}, "waitForConfirmation": true }'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{ "transaction": {"to": "0x...", "chainId": 8453, "value": "1000000000000000000"}, "waitForConfirmation": true }'
**Reference**: [references/sign-submit-api.md](references/sign-submit-api.md)curl -X POST "https://api.bankr.bot/agent/submit"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{ "transaction": {"to": "0x...", "chainId": 8453, "value": "1000000000000000000"}, "waitForConfirmation": true }'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{ "transaction": {"to": "0x...", "chainId": 8453, "value": "1000000000000000000"}, "waitForConfirmation": true }'
**参考文档**:[references/sign-submit-api.md](references/sign-submit-api.md)Resources
资源
- Documentation: https://docs.bankr.bot
- LLM Gateway Docs: https://docs.bankr.bot/llm-gateway/overview
- API Key Management: https://bankr.bot/api
- Terminal: https://bankr.bot/terminal
- CLI Package: https://www.npmjs.com/package/@bankr/cli
- Twitter: @bankr_bot
- 文档:https://docs.bankr.bot
- LLM网关文档:https://docs.bankr.bot/llm-gateway/overview
- API密钥管理:https://bankr.bot/api
- 终端:https://bankr.bot/terminal
- CLI包:https://www.npmjs.com/package/@bankr/cli
- Twitter:@bankr_bot
Troubleshooting
故障排除
CLI Not Found
CLI未找到
bash
undefinedbash
undefinedVerify installation
验证安装
which bankr
which bankr
Reinstall if needed
必要时重新安装
bun install -g @bankr/cli
undefinedbun install -g @bankr/cli
undefinedAuthentication Issues
身份验证问题
CLI:
bash
undefinedCLI:
bash
undefinedCheck current auth
检查当前身份验证状态
bankr whoami
bankr whoami
Re-authenticate
重新验证
bankr login
bankr login
Check LLM key specifically
单独检查LLM密钥
bankr config get llmKey
**REST API:**
```bashbankr config get llmKey
**REST API:**
```bashTest your API key
测试API密钥
curl -s "https://api.bankr.bot/_health" -H "X-API-Key: $BANKR_API_KEY"
undefinedcurl -s "https://api.bankr.bot/_health" -H "X-API-Key: $BANKR_API_KEY"
undefinedAPI Errors
API错误
See references/error-handling.md for comprehensive troubleshooting.
请查看references/error-handling.md获取全面的故障排查、设置说明和调试步骤。
Getting Help
获取帮助
- Check error message in CLI output or API response
- Run to verify auth (CLI) or test with a curl to
bankr whoami(REST API)/_health - Consult relevant reference document
- Test with simple queries first (or
bankr prompt "What is my balance?")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 () to see what's possible, then try a small $5-10 trade on Base to get familiar with the flow.
bankr prompt "Show my portfolio"- 查看CLI输出或API响应中的错误消息
- 运行验证身份(CLI)或通过curl调用
bankr whoami测试(REST API)/_health - 查阅相关参考文档
- 先测试简单请求(或
bankr prompt "What is my balance?")POST /agent/prompt
专业提示:最常见的问题是未为小众代币指定链。如有疑问,请求中务必包含“on Base”或“on Ethereum”。
安全提示:请妥善保管你的API密钥。切勿将配置文件提交到版本控制。仅交易你能承受损失的金额。
快速上手:先从查看投资组合开始()了解可用功能,然后在Base链上尝试5-10美元的小额交易熟悉流程。
bankr prompt "Show my portfolio"