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. The API has two layers:
- Wallet API () — Direct, synchronous endpoints for portfolio, transfers, signing, and transaction submission
/wallet/* - Agent API () — AI-powered async prompt endpoint for natural language operations
/agent/*
使用自然语言执行加密货币交易和DeFi操作。提供两种集成选项:
- Bankr CLI(推荐)—— 安装即可获得功能齐全的终端体验
@bankr/cli - REST API—— 可从任意语言或工具直接调用
https://api.bankr.bot
两种方式使用相同的API密钥。API分为两层:
- 钱包API () —— 直接的同步端点,用于投资组合查询、转账、签名和交易提交
/wallet/* - Agent API () —— 基于AI的异步提示端点,用于自然语言操作
/agent/*
Getting an API Key
获取API密钥
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.
bash
undefined使用任意一种选项之前,你需要先获取Bankr API密钥。有两种获取方式:
选项A:无界面邮箱登录(推荐Agent使用)
两步流程——发送OTP,然后验证并完成设置。完整引导流程包含用户偏好提示,请参见下方“首次设置”部分。
bash
undefinedStep 1 — send OTP to email
步骤1 —— 向邮箱发送OTP
bankr login email user@example.com
bankr login email user@example.com
Step 2 — verify OTP and generate API key (options based on user preferences)
步骤2 —— 验证OTP并生成API密钥(可根据用户偏好选择选项)
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 which APIs they need (wallet, agent, both via `--read-write`, LLM gateway) and their preferred key name.
**Option B: Bankr Terminal**
1. Visit [bankr.bot/api](https://bankr.bot/api)
2. **Sign up / Sign in** — Enter your email and the one-time passcode (OTP) sent to it
3. **Generate an API key** — Create a key with **Wallet & 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.bankr login email user@example.com --code 123456 --accept-terms --key-name "My Agent" --read-write
该操作会创建钱包、接受服务条款并生成API密钥——无需浏览器操作。运行步骤2之前,请询问用户需要哪些API(钱包、Agent,通过`--read-write`同时启用两者,或LLM网关)以及他们偏好的密钥名称。
**选项B:Bankr终端**
1. 访问 [bankr.bot/api](https://bankr.bot/api)
2. **注册/登录** —— 输入你的邮箱和收到的一次性验证码(OTP)
3. **生成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
首次设置
Headless email login (recommended for agents)
无界面邮箱登录(推荐Agent使用)
When the user asks to log in with an email, walk them through this flow:
Step 1 — Send verification code
bash
bankr login email <user-email>Step 2 — Ask the user for the OTP code and all preferences in a single message. This avoids unnecessary back-and-forth. Ask for:
- OTP code — the code they received via email
- Accept Terms of Service (REQUIRED) — Present the Terms of Service link and confirm the user agrees. The login command will fail for new users without . You MUST ask for ToS acceptance and do not pass
--accept-termsunless the user has explicitly confirmed.--accept-terms - Which APIs do they need?
- Wallet API — enabled by default, use to disable
--no-wallet-api - Agent API () — AI-powered prompts and natural language operations
--agent-api - Token Launch — enabled by default, use to disable
--no-token-launch - Add to allow transactions (without it, enabled APIs are read-only)
--read-write
- Wallet API — enabled by default, use
- Enable LLM gateway access? () — multi-model API at
--llm(currently limited to beta testers). Skip if user doesn't need it.llm.bankr.bot - Key name? () — a display name for the API key (e.g. "My Agent", "Trading Bot")
--key-name
Step 3 — Construct and run the step 2 command with the user's choices. Do NOT execute if the user has not explicitly accepted the Terms of Service — ask again if needed:
bash
undefined当用户要求使用邮箱登录时,按照以下流程引导:
步骤1 —— 发送验证码
bash
bankr login email <user-email>步骤2 —— 在单条消息中向用户询问OTP验证码和所有偏好设置,避免不必要的来回沟通。需要询问的内容:
- OTP验证码 —— 用户通过邮箱收到的验证码
- 接受服务条款(必填) —— 提供服务条款链接并确认用户同意。**新用户如果不添加参数,登录命令会执行失败。**你必须向用户确认是否接受服务条款,除非用户明确同意,否则不要传入
--accept-terms参数。--accept-terms - 他们需要哪些API?
- 钱包API —— 默认启用,使用禁用
--no-wallet-api - Agent API () —— 基于AI的提示和自然语言操作
--agent-api - 代币发布 —— 默认启用,使用禁用
--no-token-launch - 添加允许执行交易(不添加该参数的话,已启用的API仅支持只读操作)
--read-write
- 钱包API —— 默认启用,使用
- 是否启用LLM网关访问权限? () —— 位于
--llm的多模型API(目前仅对beta测试者开放)。如果用户不需要可以跳过。llm.bankr.bot - 密钥名称? () —— API密钥的展示名称(例如"My Agent"、"Trading Bot")
--key-name
步骤3 —— 根据用户的选择构建并运行步骤2的命令。如果用户没有明确接受服务条款,请勿执行命令——如有需要可再次询问:
bash
undefinedFull access: wallet + agent with write + LLM
完整权限:钱包+Agent可写+LLM
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Agent" --agent-api --read-write --llm
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Agent" --agent-api --read-write --llm
Agent with write access (AI can execute transactions)
Agent可写权限(AI可以执行交易)
bankr login email <user-email> --code <otp> --accept-terms --key-name "Trading Agent" --agent-api --read-write
bankr login email <user-email> --code <otp> --accept-terms --key-name "Trading Agent" --agent-api --read-write
Default key (wallet + token launch, read-only)
默认密钥(钱包+代币发布,只读)
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Key"
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Key"
Agent read-only (research, prices, balances — no transactions)
Agent只读(研究、价格查询、余额查询——无交易权限)
bankr login email <user-email> --code <otp> --accept-terms --key-name "Research Agent" --agent-api
bankr login email <user-email> --code <otp> --accept-terms --key-name "Research Agent" --agent-api
LLM-only (no wallet, no token launch)
仅LLM权限(无钱包、无代币发布权限)
bankr login email <user-email> --code <otp> --accept-terms --key-name "LLM Client" --no-wallet-api --no-token-launch --llm
undefinedbankr login email <user-email> --code <otp> --accept-terms --key-name "LLM Client" --no-wallet-api --no-token-launch --llm
undefinedLogin options reference
登录选项参考
| Option | Description |
|---|---|
| OTP code received via email (step 2) |
| Accept Terms of Service without prompting (required for new users) |
| Display name for the API key (e.g. "My Agent"). Prompted if omitted |
| Disable Wallet API (enabled by default) |
| Enable Agent API (AI prompts, natural language operations) |
| Disable read-only mode (allow transactions). Without this, enabled APIs are read-only |
| Disable Token Launch API (enabled by default) |
| Enable LLM gateway access (multi-model API at |
| Comma-separated IP allowlist for the API key |
| Comma-separated EVM/Solana addresses the key can send to (auto-classified by 0x prefix) |
New key defaults (when no flags are passed):
| Flag | Default | To change |
|---|---|---|
| Enabled | |
| Disabled | |
| Enabled | |
| Disabled | |
| Enabled (read-only) | |
Any option not provided on the command line will be prompted interactively by the CLI, so you can mix headless and interactive as needed.
| 选项 | 描述 |
|---|---|
| 通过邮箱收到的OTP验证码(步骤2使用) |
| 无需提示直接接受服务条款(新用户必填) |
| API密钥的展示名称(例如"My Agent")。如果省略会弹窗提示 |
| 禁用钱包API(默认启用) |
| 启用Agent API(AI提示、自然语言操作) |
| 禁用只读模式(允许交易)。不添加该参数的话,已启用的API仅支持只读操作 |
| 禁用代币发布API(默认启用) |
| 启用LLM网关访问权限(位于 |
| API密钥允许访问的IP白名单,用逗号分隔 |
| 密钥允许转账的EVM/Solana地址列表,用逗号分隔(通过0x前缀自动识别链类型) |
新密钥默认配置(未传入任何参数时):
| 配置项 | 默认值 | 修改方式 |
|---|---|---|
| 启用 | |
| 禁用 | |
| 启用 | |
| 禁用 | |
| 启用(只读) | |
命令行中未提供的选项会由CLI交互式提示用户输入,因此你可以根据需要混合使用无界面和交互模式。
Login with existing API key
使用现有API密钥登录
If the user already has an API key:
bash
bankr login --api-key bk_YOUR_KEY_HEREIf they need to create one at the Bankr Terminal:
- Run — prints the terminal 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
如果用户已经有API密钥:
bash
bankr login --api-key bk_YOUR_KEY_HERE如果他们需要在Bankr终端创建密钥:
- 运行—— 打印终端URL
bankr login --url - 将URL提供给用户,要求他们生成一个开头的密钥
bk_... - 运行
bankr login --api-key bk_THE_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_KEYVerify Setup
验证设置
bash
bankr whoami
bankr wallet portfolio
bankr agent prompt "What is my balance?"bash
bankr whoami
bankr wallet portfolio
bankr agent 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 agent prompt --continue` (reuses last thread) or `bankr agent 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 agent prompt --continue`(复用上次的线程)或`bankr agent prompt --thread <id>`。API Endpoints Summary
API端点汇总
Wallet API (/wallet/*
) — Direct endpoints (synchronous)
/wallet/*钱包API (/wallet/*
) —— 直接端点(同步)
/wallet/*| Endpoint | Method | Auth | Description |
|---|---|---|---|
| GET | Read | Wallet info (address, chains) |
| GET | Read | Portfolio balances, supports |
| POST | Write | Transfer tokens (multi-chain, supports |
| POST | Write | Sign messages, typed data, or transactions |
| POST | Write | Submit raw transactions to chain |
- Read endpoints (,
/wallet/me) — any valid API key with a wallet/wallet/portfolio - Write endpoints (,
/wallet/transfer,/wallet/sign) — require/wallet/submit,walletApiEnabledcheck, andreadOnlyenforcementallowedRecipients - IP allowlist enforced on all endpoints
| 端点 | 请求方法 | 权限 | 描述 |
|---|---|---|---|
| GET | 只读 | 钱包信息(地址、支持的链) |
| GET | 只读 | 投资组合余额,支持 |
| POST | 可写 | 转账代币(多链支持,可强制校验 |
| POST | 可写 | 签名消息、结构化数据或交易 |
| POST | 可写 | 向链上提交原始交易 |
- 只读端点 (、
/wallet/me) —— 任意绑定了钱包的有效API密钥都可以访问/wallet/portfolio - 可写端点 (、
/wallet/transfer、/wallet/sign) —— 需要启用/wallet/submit、通过walletApiEnabled校验,并且符合readOnly限制allowedRecipients - 所有端点都会强制校验IP白名单
Agent API (/agent/*
) — AI-powered endpoints (async)
/agent/*Agent API (/agent/*
) —— 基于AI的端点(异步)
/agent/*| Endpoint | Method | Description |
|---|---|---|
| POST | Submit a prompt (async, returns job ID) |
| GET | Check job status and results |
| POST | Cancel a running job |
| 端点 | 请求方法 | 描述 |
|---|---|---|
| POST | 提交提示(异步,返回任务ID) |
| GET | 查询任务状态和结果 |
| POST | 取消运行中的任务 |
Deprecated endpoints
已废弃端点
The following endpoints still work but are deprecated in favor of :
/agent/*/wallet/*| Deprecated | Use Instead |
|---|---|
| |
| |
| |
| |
For full API details (request/response schemas, job states, rich data, polling strategy), see:
Reference: references/api-workflow.md | references/sign-submit-api.md
以下端点仍可使用,但已废弃,建议使用的对应端点:
/agent/*/wallet/*| 已废弃端点 | 替代端点 |
|---|---|
| |
| |
| |
| |
完整API详情(请求/响应 schema、任务状态、富数据、轮询策略)请参见:
参考文档: references/api-workflow.md | references/sign-submit-api.md
CLI Command Reference (v0.2.0)
CLI命令参考(v0.2.0)
CLI 0.2.0 organizes commands into three namespaces: , , and . Old flat commands (, , , etc.) still work as deprecated aliases.
walletagenttokensbalancespromptstatusCLI 0.2.0将命令分为三个命名空间:、和。旧的扁平命令(、、等)仍可作为已废弃的别名使用。
walletagenttokensbalancespromptstatusbankr wallet
— Wallet Operations
bankr walletbankr wallet
—— 钱包操作
bankr wallet| Command | Description |
|---|---|
| Show wallet info (default: whoami) |
| Portfolio balances across all chains (hides tokens under $1 by default) |
| Include profit/loss data |
| Include NFT holdings |
| Include both PnL and NFTs |
| Filter by chain(s): base, polygon, mainnet, unichain, solana (comma-separated) |
| Output raw JSON |
| Transfer tokens with symbol resolution |
| Transfer with explicit chain |
| Sign messages/typed data/transactions |
| Submit raw transactions |
| 命令 | 描述 |
|---|---|
| 展示钱包信息(默认:whoami) |
| 所有链上的投资组合余额(默认隐藏价值低于1美元的代币) |
| 包含盈亏数据 |
| 包含NFT持仓 |
| 同时包含PnL和NFT |
| 按链筛选:base、polygon、mainnet、unichain、solana(用逗号分隔) |
| 输出原始JSON |
| 转账代币,支持符号解析 |
| 指定链进行转账 |
| 签名消息/结构化数据/交易 |
| 提交原始交易 |
bankr agent
— AI Agent Operations
bankr agentbankr agent
—— AI Agent操作
bankr agent| Command | Description |
|---|---|
| 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 |
| View/manage agent profile |
| Show all Bankr AI agent skills with examples |
| 命令 | 描述 |
|---|---|
| 向Bankr AI Agent发送提示 |
| 继续最近的对话线程 |
| 继续指定的对话线程 |
| 查询运行中任务的状态 |
| 取消运行中的任务 |
| 查看/管理Agent个人资料 |
| 展示所有Bankr AI Agent技能及示例 |
bankr tokens
— Token Discovery
bankr tokensbankr tokens
—— 代币发现
bankr tokens| Command | Description |
|---|---|
| Search for tokens by name or symbol |
| Get detailed token information |
| 命令 | 描述 |
|---|---|
| 按名称或符号搜索代币 |
| 获取代币详细信息 |
Auth & Config Commands
鉴权与配置命令
| Command | Description |
|---|---|
| Authenticate with the Bankr API (interactive menu) |
| Send OTP to email (headless step 1) |
| Verify OTP and complete setup (headless step 2) |
| Login with an existing API key directly |
| Login with separate LLM gateway key |
| Print Bankr Terminal URL for API key generation |
| Clear stored credentials |
| Show current authentication info |
| 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| 命令 | 描述 |
|---|---|
| 向Bankr API鉴权(交互式菜单) |
| 向邮箱发送OTP(无界面步骤1) |
| 验证OTP并完成设置(无界面步骤2) |
| 直接使用现有API密钥登录 |
| 使用独立的LLM网关密钥登录 |
| 打印用于生成API密钥的Bankr终端URL |
| 清除存储的凭证 |
| 展示当前鉴权信息 |
| 获取配置值 |
| 设置配置值 |
| 使用自定义配置文件路径 |
有效配置键:、、、
apiKeyapiUrlllmKeyllmUrl默认配置路径:。可通过参数或环境变量覆盖。
~/.bankr/config.json--configBANKR_CONFIGDeprecated Aliases
已废弃别名
Old flat commands still work but prefer the namespaced versions:
| Deprecated | Use Instead |
|---|---|
| |
| |
| |
| |
| |
| |
旧的扁平命令仍可使用,但建议使用命名空间版本:
| 已废弃命令 | 替代命令 |
|---|---|
| |
| |
| |
| |
| |
| |
Environment 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 URL(默认: |
| LLM网关密钥(未设置时回退到 |
| LLM网关URL(默认: |
环境变量优先级高于配置文件值,配置文件值优先级高于默认值。
LLM Gateway Commands
LLM网关命令
| Command | Description |
|---|---|
| List available LLM models |
| Check credit balance |
| Top up LLM credits from wallet |
| View or configure auto top-up |
| 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模型 |
| 查询信用余额 |
| 从钱包充值LLM信用 |
| 查看或配置自动充值 |
| 生成或安装OpenClaw配置 |
| 生成或安装OpenCode配置 |
| 展示Claude Code环境设置方法 |
| 展示Cursor IDE设置说明 |
| 通过Bankr LLM网关启动Claude Code |
Core Usage
核心使用方法
Simple Query
简单查询
For straightforward requests that complete quickly:
bash
bankr agent prompt "What is my ETH balance?"
bankr agent 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 agent prompt "What is my ETH balance?"
bankr agent 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 agent prompt
bankr agent 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 agent prompt
undefinedecho 'Buy $50 of ETH on Base' | bankr agent prompt
undefinedConversation Threads
对话线程
Continue a multi-turn conversation with the agent:
bash
undefined与Agent继续多轮对话:
bash
undefinedFirst prompt — starts a new thread automatically
第一个提示 —— 自动开启新线程
bankr agent prompt "What is the price of ETH?"
bankr agent prompt "What is the price of ETH?"
→ Thread: thr_ABC123
→ 线程: thr_ABC123
Continue the conversation (agent remembers the ETH context)
继续对话(Agent会记住ETH上下文)
bankr agent prompt --continue "And what about BTC?"
bankr agent prompt -c "Compare them"
bankr agent prompt --continue "And what about BTC?"
bankr agent prompt -c "Compare them"
Resume any thread by ID
通过ID恢复任意线程
bankr agent 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 agent 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 agent prompt "Buy $100 of ETH"
bankr agent prompt "Buy $100 of ETH"
→ Job submitted: job_abc123
→ 任务已提交: job_abc123
Check status of a specific job
查询指定任务的状态
bankr agent status job_abc123
bankr agent status job_abc123
Cancel if needed
必要时取消任务
bankr agent cancel job_abc123
undefinedbankr agent 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.
Bankr LLM网关是Claude、Gemini、GPT等模型的统一API——通过单个端点即可实现多提供商访问、成本追踪、自动故障转移和SDK兼容性。
Key Concepts
核心概念
- Uses your if configured, otherwise falls back to your API key
llmKey - LLM credits (USD) and trading wallet (crypto) are completely separate balances — having crypto does NOT give you LLM credits
- New accounts start with $0 LLM credits — top up via or at bankr.bot/llm?tab=credits before making any LLM calls, or you will get a 402 error
bankr llm credits add 25 - Check credits: | Top up:
bankr llm credits| Auto top-up:bankr llm credits add <amount>bankr llm credits auto --enable --amount 25 --tokens USDC - In OpenClaw config, prefix model IDs with (e.g.
bankr/). In direct API calls, use bare IDs (e.g.bankr/claude-sonnet-4.6)claude-sonnet-4.6
- 如果配置了则使用该密钥,否则回退到API密钥
llmKey - **LLM信用(美元)和交易钱包(加密货币)**是完全独立的余额——持有加密货币不会自动获得LLM信用
- 新账户初始LLM信用为0美元——进行LLM调用前需要通过或访问bankr.bot/llm?tab=credits充值,否则会返回402错误
bankr llm credits add 25 - 查询信用:| 充值:
bankr llm credits| 自动充值:bankr llm credits add <amount>bankr llm credits auto --enable --amount 25 --tokens USDC - 在OpenClaw配置中,模型ID需要添加前缀(例如
bankr/)。直接调用API时使用原生ID即可(例如bankr/claude-sonnet-4.6)claude-sonnet-4.6
Quick Commands
常用命令
bash
bankr llm models # List available models
bankr llm credits # Check credit balance
bankr llm credits add 25 # Top up $25 credits (USDC)
bankr llm credits auto --enable --amount 25 --tokens USDC # Auto top-up
bankr llm setup openclaw --install # Install Bankr provider into OpenClaw
bankr llm setup claude # Print Claude Code env vars
bankr llm claude # Launch Claude Code through gatewaybash
bankr llm models # 列出可用模型
bankr llm credits # 查询信用余额
bankr llm credits add 25 # 充值25美元信用(USDC支付)
bankr llm credits auto --enable --amount 25 --tokens USDC # 开启自动充值
bankr llm setup openclaw --install # 将Bankr提供商安装到OpenClaw
bankr llm setup claude # 打印Claude Code环境变量
bankr llm claude # 通过网关启动Claude CodeModel Deprecation
模型废弃
The gateway supports model deprecation with auto-redirect to replacement models. Deprecated models return and response headers. Hard-deprecated models return HTTP 410 — update your model ID to the replacement indicated in the header.
X-Model-DeprecatedX-Model-ReplacementFor full details — setup paths, model list, provider config, SDK examples, key management, and troubleshooting — see:
Reference: references/llm-gateway.md
网关支持模型废弃功能,会自动重定向到替代模型。已废弃的模型会返回和响应头。强制废弃的模型会返回HTTP 410——请根据头信息中的提示更新为替代模型ID。
X-Model-DeprecatedX-Model-Replacement完整详情(设置路径、模型列表、提供商配置、SDK示例、密钥管理和故障排查)请参见:
参考文档: 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 (or
bankr wallet portfolio)GET /wallet/portfolio - View USD valuations with optional PnL tracking (or
--pnl)?include=pnl - View NFT holdings (or
--nfts)?include=nfts - Track holdings by token or chain
- Real-time price updates
- Multi-chain aggregation
- Filter by chain: or
bankr wallet portfolio --chain base,solanaGET /wallet/portfolio?chains=base,solana
Reference: references/portfolio.md
- 查看所有链上的余额(或
bankr wallet portfolio)GET /wallet/portfolio - 查看美元估值,可选PnL追踪(或
--pnl)?include=pnl - 查看NFT持仓(或
--nfts)?include=nfts - 按代币或链追踪持仓
- 实时价格更新
- 多链数据聚合
- 按链筛选:或
bankr wallet portfolio --chain base,solanaGET /wallet/portfolio?chains=base,solana
参考文档: 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
- 浏览和搜索合集
- 查看地板价和挂单
- 通过OpenSea购买NFT
- 查看你的NFT投资组合
- 转账NFT
- 从支持的平台 mint 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
- 做多/做空仓位(加密货币最高50x,外汇/大宗商品最高100x)
- 支持加密货币、外汇和大宗商品
- 止损和止盈
- 通过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可选 vesting 参数
- 速率限制:普通账户1次/天,Bankr Club会员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 | POL | 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 |
| World Chain | ETH | Uniswap V3/V4 swaps | Very Low |
| Arbitrum | ETH | DeFi, low-cost transactions | Very Low |
| BNB Chain | BNB | BSC ecosystem trading | Low |
| 链名称 | 原生代币 | 适用场景 | Gas成本 |
|---|---|---|---|
| Base | ETH | 模因币、普通交易 | 极低 |
| Polygon | POL | 游戏、NFT、高频交易 | 极低 |
| Ethereum | ETH | 蓝筹资产、高流动性 | 高 |
| Solana | SOL | 高速交易 | 极低 |
| Unichain | ETH | 新型L2选项 | 极低 |
| World Chain | ETH | Uniswap V3/V4兑换 | 极低 |
| Arbitrum | ETH | DeFi、低成本交易 | 极低 |
| BNB Chain | BNB | BSC生态交易 | 低 |
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 () with capability flags (, , , ). You can optionally configure a separate LLM Gateway key via or — useful when you want independent revocation or different permissions for agent vs LLM access.
bk_...walletApiEnabledagentApiEnabledtokenLaunchApiEnabledllmGatewayEnabledbankr config set llmKeyBANKR_LLM_KEYRead-Only API Keys: New keys default to . This filters all write tools (swaps, transfers, staking, token launches, etc.) from agent sessions. The , , and write endpoints return 403. Use during login or toggle in the web settings to disable. Ideal for monitoring bots and research agents.
readOnly: true/wallet/sign/wallet/submit/wallet/transfer--read-writeIP Whitelisting: Set on your API key to restrict usage to specific IPs. Requests from non-whitelisted IPs are rejected with 403 at the auth layer.
allowedIpsRate 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), never in source codeBANKR_LLM_KEY - Add and
~/.bankr/to.env— the CLI stores credentials in.gitignore~/.bankr/config.json - Test with small amounts on low-cost chains (Base, Polygon) before production use
- Use with
waitForConfirmation: true— transactions execute immediately with no confirmation prompt/wallet/submit - Rotate keys periodically and revoke immediately if compromised at bankr.bot/api
Reference: references/safety.md
专用Agent钱包: 构建自主Agent时,请创建独立的Bankr账户,不要使用个人钱包。这样可以隔离Agent资金——如果密钥泄露,仅会暴露Agent钱包。仅向其转入有限的资金,必要时再补充。
API密钥类型: Bankr使用单一密钥格式(),通过功能标记区分权限(、、、)。你可以通过或可选配置独立的LLM网关密钥——当你需要为Agent和LLM访问设置独立的撤销权限或不同权限时非常有用。
bk_...walletApiEnabledagentApiEnabledtokenLaunchApiEnabledllmGatewayEnabledbankr config set llmKeyBANKR_LLM_KEY只读API密钥: 新密钥默认开启。这会从Agent会话中过滤所有可写工具(兑换、转账、质押、代币发布等)。、和可写端点会返回403。登录时使用参数或在网页设置中关闭只读模式即可。非常适合监控机器人和研究类Agent使用。
readOnly: true/wallet/sign/wallet/submit/wallet/transfer--read-writeIP白名单: 在API密钥上设置可以限制仅特定IP可以访问。非白名单IP的请求会在鉴权层直接返回403拒绝。
allowedIps速率限制: 普通账户100条消息/天,Bankr Club会员1000条消息/天,或自定义单密钥限额。采用滚动窗口,从第一条消息开始24小时后重置。LLM网关采用信用制。
密钥安全规则:
- 将密钥存储在环境变量中(、
BANKR_API_KEY),永远不要写入源代码BANKR_LLM_KEY - 将和
~/.bankr/添加到.env中——CLI会将凭证存储在.gitignore~/.bankr/config.json - 生产使用前先在低成本链(Base、Polygon)上用小额资金测试
- 调用时使用
/wallet/submit——交易无需确认会立即执行waitForConfirmation: true - 定期轮换密钥,一旦泄露立即到bankr.bot/api撤销
参考文档: references/safety.md
Common Patterns
常用模式
Check Before Trading
交易前检查
bash
undefinedbash
undefinedCheck balance
检查余额
bankr wallet portfolio --chain base
bankr wallet portfolio --chain base
Check price
查询价格
bankr agent prompt "What's the current price of PEPE?"
bankr agent prompt "What's the current price of PEPE?"
Then trade
然后交易
bankr agent prompt "Buy $20 of PEPE on Base"
undefinedbankr agent prompt "Buy $20 of PEPE on Base"
undefinedPortfolio Review
投资组合查看
bash
undefinedbash
undefinedDirect portfolio check (no AI agent, instant response)
直接查询投资组合(无AI Agent处理,即时响应)
bankr wallet portfolio
bankr wallet portfolio --pnl # Include profit/loss data
bankr wallet portfolio --nfts # Include NFT holdings
bankr wallet portfolio --all # PnL + NFTs
bankr wallet portfolio --chain base
bankr wallet portfolio --chain base,solana
bankr wallet portfolio --json
bankr wallet portfolio
bankr wallet portfolio --pnl # 包含盈亏数据
bankr wallet portfolio --nfts # 包含NFT持仓
bankr wallet portfolio --all # PnL + NFTs
bankr wallet portfolio --chain base
bankr wallet portfolio --chain base,solana
bankr wallet portfolio --json
Via AI agent (natural language, richer context)
通过AI Agent查询(自然语言,更丰富的上下文)
bankr agent prompt "Show my complete portfolio"
bankr agent prompt "Show my complete portfolio"
Chain-specific
指定链查询
bankr agent prompt "What tokens do I have on Base?"
bankr agent prompt "What tokens do I have on Base?"
Token-specific
指定代币查询
bankr agent prompt "Show my ETH across all chains"
undefinedbankr agent prompt "Show my ETH across all chains"
undefinedSet Up Automation
设置自动化
bash
undefinedbash
undefinedDCA strategy
DCA策略
bankr agent prompt "DCA $100 into ETH every week"
bankr agent prompt "DCA $100 into ETH every week"
Stop loss protection
止损保护
bankr agent prompt "Set stop loss for my ETH at $2,500"
bankr agent prompt "Set stop loss for my ETH at $2,500"
Limit order
限价单
bankr agent prompt "Buy ETH if price drops to $3,000"
undefinedbankr agent prompt "Buy ETH if price drops to $3,000"
undefinedMarket Research
市场研究
bash
undefinedbash
undefinedToken discovery
代币发现
bankr tokens search PEPE
bankr tokens info USDC
bankr tokens search PEPE
bankr tokens info USDC
Price and analysis
价格和分析
bankr agent prompt "Do technical analysis on ETH"
bankr agent prompt "Do technical analysis on ETH"
Trending tokens
热门代币
bankr agent prompt "What tokens are trending on Base?"
bankr agent prompt "What tokens are trending on Base?"
Compare tokens
代币对比
bankr agent prompt "Compare ETH vs SOL"
undefinedbankr agent 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 agent promptbankr agent status <jobId>bankr agent 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 agent promptbankr agent status <jobId>bankr agent cancel <jobId>关于API结构、任务状态、轮询策略和错误处理的详情请参见:
参考文档: references/api-workflow.md
Synchronous Endpoints (Wallet API)
同步端点(钱包API)
For direct signing and transaction submission, use the Wallet API synchronous endpoints:
- POST /wallet/sign - Sign messages, typed data, or transactions without broadcasting
- POST /wallet/submit - Submit raw transactions directly to the blockchain
- POST /wallet/transfer - Transfer tokens with symbol resolution and multi-chain support
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)
- Programmatic token transfers
Reference: references/sign-submit-api.md
如需直接签名和提交交易,请使用钱包API同步端点:
- POST /wallet/sign - 签名消息、结构化数据或交易,不上链
- POST /wallet/submit - 直接向区块链提交原始交易
- POST /wallet/transfer - 转账代币,支持符号解析和多链
这些端点会立即返回结果(无需轮询),非常适合以下场景:
- 鉴权流程(签名消息)
- 无gas授权(签名EIP-712 permit)
- 预构建交易(提交原始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 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 to
~/.bankr/.gitignore
See references/safety.md for comprehensive safety guidance.
- 永远不要分享你的API密钥或LLM密钥
- 为自主Agent使用独立的、资金有限的专用Agent钱包
- 为监控和仅研究用途的Agent使用只读API密钥
- 为IP固定的服务端Agent设置IP白名单
- 大额转账前验证地址
- 杠杆交易使用止损
- 将密钥存储在环境变量中,不要写入源代码——将添加到
~/.bankr/.gitignore
全面的安全指南请参见references/safety.md。
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
投资组合
- (direct, no AI processing — hides low-value tokens by default)
bankr wallet portfolio - (include profit/loss)
bankr wallet portfolio --pnl - (include NFT holdings)
bankr wallet portfolio --nfts - (PnL + NFTs)
bankr wallet portfolio --all - (single chain)
bankr wallet portfolio --chain base - "Show my portfolio"
- "What's my ETH balance?"
- "Total portfolio value"
- "Holdings on Base"
- (直接查询,无AI处理——默认隐藏低价值代币)
bankr wallet portfolio - (包含盈亏)
bankr wallet portfolio --pnl - (包含NFT持仓)
bankr wallet portfolio --nfts - (PnL + NFTs)
bankr wallet portfolio --all - (单链查询)
bankr wallet portfolio --chain 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: {...}"
Transfers (Direct)
直接转账
Transfer tokens via CLI or Wallet API without AI processing:
bash
undefined无需AI处理,直接通过CLI或钱包API转账代币:
bash
undefinedCLI — token symbol resolution built in
CLI —— 内置代币符号解析能力
bankr wallet transfer --to vitalik.eth --token USDC --amount 50 --chain base
bankr wallet transfer --to 0x1234... --token ETH --amount 0.1
bankr wallet transfer --to vitalik.eth --token USDC --amount 50 --chain base
bankr wallet transfer --to 0x1234... --token ETH --amount 0.1
REST API
REST API
curl -X POST "https://api.bankr.bot/wallet/transfer"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"to": "vitalik.eth", "token": "USDC", "amount": "50", "chain": "base"}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"to": "vitalik.eth", "token": "USDC", "amount": "50", "chain": "base"}'
undefinedcurl -X POST "https://api.bankr.bot/wallet/transfer"
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"to": "vitalik.eth", "token": "USDC", "amount": "50", "chain": "base"}'
-H "X-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"to": "vitalik.eth", "token": "USDC", "amount": "50", "chain": "base"}'
undefinedSign API (Synchronous)
签名API(同步)
Direct message signing without AI processing:
bash
undefined无需AI处理,直接签名消息:
bash
undefinedSign a plain text message
签名纯文本消息
curl -X POST "https://api.bankr.bot/wallet/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/wallet/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结构化数据(permit、订单)
curl -X POST "https://api.bankr.bot/wallet/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/wallet/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/wallet/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/wallet/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)
提交API(同步)
Direct transaction submission without AI processing:
bash
undefined无需AI处理,直接提交交易:
bash
undefinedSubmit a raw transaction
提交原始交易
curl -X POST "https://api.bankr.bot/wallet/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/wallet/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 agent 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 wallet portfolio- 检查CLI输出或API响应中的错误信息
- 运行验证鉴权(CLI)或调用
bankr whoami测试(REST API)/_health - 查阅相关参考文档
- 先用简单查询测试(或
bankr agent prompt "What is my balance?")POST /agent/prompt
专业提示: 最常见的问题是没有为代币指定链。有疑问时,始终在提示中包含"on Base"或"on Ethereum"。
安全提示: 请妥善保管你的API密钥。永远不要将配置文件提交到版本控制。仅用你可以承受损失的金额进行交易。
快速上手: 先查询你的投资组合()了解可用功能,然后在Base上尝试一笔5-10美元的小额交易熟悉流程。
bankr wallet portfolioProfile Management
个人资料管理
Agents can create and manage public profile pages at bankr.bot/agents. Profiles showcase project metadata, team info, token data (chart + market cap), weekly fee revenue, shipped products, and a Twitter activity feed.
Eligibility: You must have deployed a token through Bankr (Doppler or Clanker) or be a fee beneficiary on the token to create a profile. The token address is verified against your deployment history and beneficiary records.
Agent可以在bankr.bot/agents创建并管理公开个人资料页面。资料会展示项目元数据、团队信息、代币数据(图表+市值)、周手续费收入、发布的产品和Twitter动态流。
资格要求: 你必须通过Bankr部署过代币(Doppler或Clanker),或者是代币的费用受益人才可以创建个人资料。系统会根据你的部署历史和受益人记录验证代币地址。
Profile Lifecycle
资料生命周期
- Deploy a token through Bankr (required prerequisite)
- Create a profile via CLI or REST API with the token address
- Populate metadata (team, products, revenue sources)
- Admin approval — profiles start with and become publicly visible after admin approval
approved: false - Maintain — post project updates, keep products and revenue sources current
- 通过Bankr部署代币(必要前提)
- 通过CLI或REST API创建资料,传入代币地址
- 填写元数据(团队、产品、收入来源)
- 管理员审核 —— 资料初始状态为,经管理员审核通过后才会公开可见
approved: false - 维护 —— 发布项目更新,保持产品和收入来源信息为最新
CLI Commands
CLI命令
bash
bankr agent profile # View own profile
bankr agent profile create # Interactive creation wizard
bankr agent profile create --name "My Agent" --token 0x... --twitter myagent
bankr agent profile update --description "Updated description"
bankr agent profile delete # Delete own profile (with confirmation)
bankr agent profile add-update # Add a project update
bankr agent profile add-update --title "v2 Launch" --content "Shipped new features"All commands support for structured output (enables programmatic use).
--jsonbash
bankr agent profile # 查看自己的资料
bankr agent profile create # 交互式创建向导
bankr agent profile create --name "My Agent" --token 0x... --twitter myagent
bankr agent profile update --description "Updated description"
bankr agent profile delete # 删除自己的资料(需要确认)
bankr agent profile add-update # 添加项目更新
bankr agent profile add-update --title "v2 Launch" --content "Shipped new features"所有命令都支持参数输出结构化数据(支持程序化使用)。
--jsonREST API Endpoints
REST API端点
All endpoints require API key authentication via header.
X-API-Key| Method | Path | Description |
|---|---|---|
| | Get own profile |
| | Create profile |
| | Update profile fields |
| | Delete own profile |
| | Add a project update |
Create profile:
bash
curl -X POST "https://api.bankr.bot/agent/profile" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectName": "My Agent", "tokenAddress": "0x...", "description": "An AI trading agent"}'Add a project update:
bash
curl -X POST "https://api.bankr.bot/agent/profile/update" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "v2 Launch", "content": "Shipped swap optimization and new UI"}'See references/agent-profiles.md for the full integration guide.
所有端点都需要通过头进行API密钥鉴权。
X-API-Key| 请求方法 | 路径 | 描述 |
|---|---|---|
| | 获取自己的资料 |
| | 创建资料 |
| | 更新资料字段 |
| | 删除自己的资料 |
| | 添加项目更新 |
创建资料:
bash
curl -X POST "https://api.bankr.bot/agent/profile" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectName": "My Agent", "tokenAddress": "0x...", "description": "An AI trading agent"}'添加项目更新:
bash
curl -X POST "https://api.bankr.bot/agent/profile/update" \
-H "X-API-Key: $BANKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "v2 Launch", "content": "Shipped swap optimization and new UI"}'完整集成指南请参见references/agent-profiles.md。