bankr by bankrbot/openclaw-skills
npx skills add https://github.com/bankrbot/openclaw-skills --skill bankr使用自然语言执行加密货币交易和 DeFi 操作。提供两种集成方式:
@bankr/cli,获得开箱即用的终端体验https://api.bankr.bot两者在底层使用相同的 API 密钥和相同的异步作业工作流。
在使用任一选项之前,您需要一个 Bankr API 密钥。有两种获取方式:
选项 A:无头邮箱登录(推荐用于代理)
两步流程 — 发送 OTP,然后验证并完成设置。请参阅下面的“首次设置”部分,了解包含用户偏好提示的完整引导流程。
# 步骤 1 — 向邮箱发送 OTP
bankr login email user@example.com
# 步骤 2 — 验证 OTP 并生成 API 密钥(根据用户偏好选择选项)
bankr login email user@example.com --code 123456 --accept-terms --key-name "My Agent" --read-write
这将创建一个钱包、接受条款并生成一个 API 密钥 — 无需浏览器。在执行步骤 2 之前,询问用户是需要只读还是读写访问权限、是否需要 LLM 网关,以及他们偏好的密钥名称。
选项 B:Bankr 终端
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
bk_...两种选项都会自动配置 EVM 钱包(Base、Ethereum、Polygon、Unichain)和一个 Solana 钱包 — 无需手动设置钱包。
bun install -g @bankr/cli
或使用 npm:
npm install -g @bankr/cli
当用户要求使用邮箱登录时,引导他们完成以下流程:
步骤 1 — 发送验证码
bankr login email <user-email>
步骤 2 — 在一条消息中向用户询问 OTP 代码和所有偏好设置。 这可以避免不必要的来回沟通。询问:
--accept-terms,登录命令将失败。 您必须询问用户是否接受服务条款,并且除非用户已明确确认,否则不要传递 --accept-terms。--read-write)— 启用兑换、转账、订单、代币发行、杠杆交易、Polymarket 投注--llm)— llm.bankr.bot 的多模型 API(目前仅限于 Beta 测试者)。如果用户不需要,请跳过。--key-name)— API 密钥的显示名称(例如 "My Agent"、"Trading Bot")步骤 3 — 根据用户的选择构建并运行步骤 2 的命令。 如果用户没有明确接受服务条款,请勿执行 — 如果需要,请再次询问:
# 包含所有选项的示例
bankr login email <user-email> --code <otp> --accept-terms --key-name "My Agent" --read-write --llm
# 只读、无 LLM 的示例
bankr login email <user-email> --code <otp> --accept-terms --key-name "Research Bot"
任何未在命令行中提供的选项将由 CLI 交互式提示,因此您可以根据需要混合使用无头和交互式方式。
如果用户已有 API 密钥:
bankr login --api-key bk_YOUR_KEY_HERE
如果他们需要在 Bankr 终端创建一个:
bankr login --url — 打印终端 URLbk_... 密钥bankr login --api-key bk_THE_KEY如果您的 LLM 网关密钥与 API 密钥不同,请在登录时传递 --llm-key 或在之后运行 bankr config set llmKey YOUR_LLM_KEY。如果未设置,则 API 密钥将用于两者。完整详情请参阅 references/llm-gateway.md。
bankr whoami
bankr prompt "What is my balance?"
无需安装 CLI — 使用 curl、fetch 或任何 HTTP 客户端直接调用 API。
所有请求都需要 X-API-Key 请求头:
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?"}'
# 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')
# 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
# 3. 读取响应
echo "$RESULT" | jq -r '.response'
每个提示响应都包含一个 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?"}'
# → {"jobId": "job_abc", "threadId": "thr_XYZ", ...}
# 继续 — 传递 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"}'
省略 threadId 以开始新的对话。CLI 等效命令:bankr prompt --continue(重用上一个线程)或 bankr prompt --thread <id>。
| 端点 | 方法 | 描述 |
|---|---|---|
/agent/prompt | POST | 提交提示(异步,返回作业 ID) |
/agent/job/{jobId} | GET | 检查作业状态和结果 |
/agent/job/{jobId}/cancel | POST | 取消正在运行的作业 |
/agent/balances | GET | 跨链钱包余额(同步,可选 ?chains= 过滤器) |
/agent/sign | POST | 签署消息/交易(同步) |
/agent/submit | POST | 提交原始交易(同步) |
有关完整的 API 详情(请求/响应模式、作业状态、丰富数据、轮询策略),请参阅:
| 命令 | 描述 |
|---|---|
bankr login | 使用 Bankr API 进行身份验证(交互式菜单) |
bankr login email <address> | 向邮箱发送 OTP(无头步骤 1) |
bankr login email <address> --code <otp> [options] | 验证 OTP 并完成设置(无头步骤 2) |
bankr login --api-key <key> | 直接使用现有 API 密钥登录 |
bankr login --api-key <key> --llm-key <key> | 使用独立的 LLM 网关密钥登录 |
bankr login --url | 打印用于生成 API 密钥的 Bankr 终端 URL |
bankr logout | 清除存储的凭据 |
bankr whoami | 显示当前身份验证信息 |
bankr prompt <text> | 向 Bankr AI 代理发送提示 |
bankr prompt --continue <text> | 继续最近的对话线程 |
bankr prompt --thread <id> <text> | 继续特定的对话线程 |
bankr status <jobId> | 检查正在运行的作业的状态 |
bankr cancel <jobId> | 取消正在运行的作业 |
bankr balances | 显示所有链上的钱包代币余额(默认隐藏价值低于 1 美元的代币) |
bankr balances --low-value | 在输出中包含价值低于 1 美元的代币 |
bankr balances --chain <chains> | 按链过滤:base, polygon, mainnet, unichain, solana(逗号分隔) |
bankr balances --json | 输出原始 JSON 格式的余额 |
bankr skills | 显示所有 Bankr AI 代理技能及示例 |
| 命令 | 描述 |
|---|---|
bankr config get [key] | 获取配置值 |
bankr config set <key> <value> | 设置配置值 |
bankr --config <path> <command> | 使用自定义配置文件路径 |
有效的配置键:apiKey, apiUrl, llmKey, llmUrl
默认配置文件位置:~/.bankr/config.json。使用 --config 或 BANKR_CONFIG 环境变量覆盖。
| 变量 | 描述 |
|---|---|
BANKR_API_KEY | API 密钥(覆盖存储的密钥) |
BANKR_API_URL | API URL(默认:https://api.bankr.bot) |
BANKR_LLM_KEY | LLM 网关密钥(如果未设置,则回退到 BANKR_API_KEY) |
BANKR_LLM_URL | LLM 网关 URL(默认:https://llm.bankr.bot) |
环境变量覆盖配置文件值。配置文件值覆盖默认值。
| 命令 | 描述 |
|---|---|
bankr llm models | 列出可用的 LLM 模型 |
bankr llm credits | 检查信用余额 |
bankr llm credits add <amount> [--token <addr>] [-y] | 从钱包充值 LLM 信用 |
bankr llm credits auto [--enable/--disable] [--amount] [--threshold] [--tokens] | 查看或配置自动充值 |
bankr llm setup openclaw [--install] | 生成或安装 OpenClaw 配置 |
bankr llm setup opencode [--install] | 生成或安装 OpenCode 配置 |
bankr llm setup claude | 显示 Claude Code 环境设置 |
bankr llm setup cursor | 显示 Cursor IDE 设置说明 |
bankr llm claude [args...] | 通过 Bankr LLM 网关启动 Claude Code |
对于快速完成的简单请求:
bankr prompt "What is my ETH balance?"
bankr prompt "What's the price of Bitcoin?"
CLI 会自动处理完整的提交-轮询-完成工作流。您也可以使用简写形式 — 任何无法识别的命令都会被当作提示处理:
bankr What is the price of ETH?
对于包含 $ 或 shell 会展开的特殊字符的提示:
# 交互模式 — 无 shell 展开问题
bankr prompt
# 然后输入:Buy $50 of ETH on Base
# 或管道输入
echo 'Buy $50 of ETH on Base' | bankr prompt
与代理进行多轮对话:
# 第一条提示 — 自动启动新线程
bankr prompt "What is the price of ETH?"
# → Thread: thr_ABC123
# 继续对话(代理记得 ETH 上下文)
bankr prompt --continue "And what about BTC?"
bankr prompt -c "Compare them"
# 按 ID 恢复任何线程
bankr prompt --thread thr_ABC123 "Show me ETH chart"
线程 ID 在每次提示后会自动保存到配置中。--continue / -c 标志会重用上一个线程。
用于高级用途或长时间运行的操作:
# 提交并获取作业 ID
bankr prompt "Buy $100 of ETH"
# → Job submitted: job_abc123
# 检查特定作业的状态
bankr status job_abc123
# 如果需要,取消作业
bankr cancel job_abc123
Bankr LLM 网关 是 Claude、Gemini、GPT 和其他模型的统一 API — 通过单一端点提供多供应商访问、成本跟踪、自动故障转移和 SDK 兼容性。
基础 URL: https://llm.bankr.bot | 仪表板: bankr.bot/llm | API 密钥: bankr.bot/api
llmKey 则使用它,否则回退到您的 API 密钥bankr llm credits add 25 或在 bankr.bot/llm?tab=credits 充值,否则您将收到 402 错误bankr llm credits | 充值:bankr llm credits add <amount> | 自动充值:bankr llm credits auto --enable --amount 25 --tokens USDCbankr/(例如 bankr/claude-sonnet-4.6)。在直接 API 调用中,使用裸 ID(例如 claude-sonnet-4.6)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 Code
完整详情 — 设置路径、模型列表、提供商配置、SDK 示例、密钥管理和故障排除 — 请参阅:
bankr balances 或 GET /agent/balances)bankr balances --chain base,solana 或 GET /agent/balances?chains=base,solana| 链 | 原生代币 | 最适合 | Gas 成本 |
|---|---|---|---|
| Base | ETH | Memecoins、一般交易 | 非常低 |
| Polygon | MATIC | 游戏、NFT、频繁交易 | 非常低 |
| Ethereum | ETH | 蓝筹股、高流动性 | 高 |
| Solana | SOL | 高速交易 | 极低 |
| Unichain | ETH | 较新的 L2 选项 | 非常低 |
专用代理钱包 : 在构建自主代理时,请创建一个单独的 Bankr 账户,而不是使用您的个人钱包。这样可以隔离代理资金 — 如果密钥泄露,只有代理钱包会暴露。为其提供有限资金,并根据需要补充。
API 密钥类型 : Bankr 使用单一密钥格式(bk_...)和功能标志(agentApiEnabled、llmGatewayEnabled)。您可以选择通过 bankr config set llmKey 或 BANKR_LLM_KEY 配置独立的 LLM 网关密钥 — 当您希望对代理访问和 LLM 访问进行独立撤销或设置不同权限时很有用。
只读 API 密钥 : 具有 readOnly: true 的密钥会从代理会话中过滤所有写入工具(兑换、转账、质押、代币发行等)。/agent/sign 和 /agent/submit 端点将返回 403。非常适合监控机器人和研究代理。
IP 白名单 : 在您的 API 密钥上设置 allowedIps,以限制仅允许特定 IP 使用。来自非白名单 IP 的请求将在身份验证层被拒绝,并返回 403。
速率限制 : 100 条消息/天(标准),1,000 条/天(Bankr Club),或每个密钥自定义。从第一条消息起 24 小时后重置(滚动窗口)。LLM 网关使用基于信用的系统。
密钥安全规则:
BANKR_API_KEY、BANKR_LLM_KEY),切勿存储在源代码中~/.bankr/ 和 .env 添加到 .gitignore — CLI 将凭据存储在 ~/.bankr/config.json 中/agent/submit 一起使用 waitForConfirmation: true — 交易会立即执行,无需确认提示参考 : references/safety.md
# 检查余额
bankr prompt "What is my ETH balance on Base?"
# 检查价格
bankr prompt "What's the current price of PEPE?"
# 然后交易
bankr prompt "Buy $20 of PEPE on Base"
# 直接余额检查(无需 AI 代理,即时响应)
bankr balances
bankr balances --low-value # 包含价值低于 $1 的代币
bankr balances --chain base
bankr balances --chain base,solana
bankr balances --json
# 通过 AI 代理(自然语言,更丰富的上下文)
bankr prompt "Show my complete portfolio"
# 特定链
bankr prompt "What tokens do I have on Base?"
# 特定代币
bankr prompt "Show my ETH across all chains"
# DCA 策略
bankr prompt "DCA $100 into ETH every week"
# 止损保护
bankr prompt "Set stop loss for my ETH at $2,500"
# 限价订单
bankr prompt "Buy ETH if price drops to $3,000"
# 价格和分析
bankr prompt "Do technical analysis on ETH"
# 热门代币
bankr prompt "What tokens are trending on Base?"
# 比较代币
bankr prompt "Compare ETH vs SOL"
Bankr 使用基于作业的异步 API:
threadId),获取作业 ID 和线程 IDthreadIdbankr prompt 命令会自动处理此流程。当直接使用 REST API 时,请自行实现轮询循环(请参阅上面的选项 2 或下面的参考)。对于通过 CLI 进行手动作业控制,请使用 bankr status <jobId> 和 bankr cancel <jobId>。
有关 API 结构、作业状态、轮询策略和错误处理的详细信息,请参阅:
对于直接签名和交易提交,Bankr 还提供同步端点:
这些端点会立即返回(无需轮询),非常适合:
常见问题及解决方法:
bankr login 或检查 bankr whoami(CLI),或验证您的 X-API-Key 请求头(REST API)有关全面的错误故障排除、设置说明和调试步骤,请参阅:
~/.bankr/ 添加到 .gitignore全面的安全指南请参阅 references/safety.md。
bankr balances(直接,无需 AI 处理 — 默认隐藏低价值代币)bankr balances --low-value(包含价值低于 $1 的代币)bankr balances --chain base(单链)Solana (LaunchLab):
EVM (Clanker):
无需 AI 处理的直接消息签名:
# 签署纯文本消息
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!"}'
# 签署 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": {...}}'
# 签署交易但不广播
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}}'
无需 AI 处理的直接交易提交:
# 提交原始交易
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"},
"waitForConf
Execute crypto trading and DeFi operations using natural language. Two integration options:
@bankr/cli for a batteries-included terminal experiencehttps://api.bankr.bot directly from any language or toolBoth use the same API key and the same async job workflow under the hood.
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.
Option B: Bankr Terminal
bk_...)Both options automatically provision EVM wallets (Base, Ethereum, Polygon, Unichain) and a Solana wallet — no manual wallet setup needed.
bun install -g @bankr/cli
Or with npm:
npm install -g @bankr/cli
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 and all preferences in a single message. This avoids unnecessary back-and-forth. Ask for:
--accept-terms. You MUST ask for ToS acceptance and do not pass --accept-terms unless the user has explicitly confirmed.--read-write) — enables swaps, transfers, orders, token launches, leverage, Polymarket bets--llm) — multi-model API at llm.bankr.bot (currently limited to beta testers). Skip if user doesn't need it.--key-name) — a display name for the API key (e.g. "My Agent", "Trading Bot")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:
# 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"
| 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 ). 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.
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:
bankr login --url — prints the terminal URLbk_... keybankr login --api-key bk_THE_KEYIf 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 references/llm-gateway.md for full details.
bankr whoami
bankr prompt "What is my balance?"
No CLI installation required — call the API directly with curl, fetch, or any HTTP client.
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?"}'
# 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 status
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
# 3. Read the response
echo "$RESULT" | jq -r '.response'
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>.
| 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 |
For full API details (request/response schemas, job states, rich data, polling strategy), see:
Reference : references/api-workflow.md | references/sign-submit-api.md
| Command | Description |
|---|---|
bankr login | Authenticate with the Bankr API (interactive menu) |
bankr login email <address> | Send OTP to email (headless step 1) |
bankr login email <address> --code <otp> [options] | Verify OTP and complete setup (headless step 2) |
bankr login --api-key <key> | Login with an existing API key directly |
bankr login --api-key <key> --llm-key <key> | Login with separate LLM gateway key |
bankr login --url |
| Command | Description |
|---|---|
bankr config get [key] | Get config value(s) |
bankr config set <key> <value> | Set a config value |
bankr --config <path> <command> | Use a custom config file path |
Valid config keys: apiKey, apiUrl, llmKey, llmUrl
Default config location: ~/.bankr/config.json. Override with --config or BANKR_CONFIG env var.
| Variable | Description |
|---|---|
BANKR_API_KEY | API key (overrides stored key) |
BANKR_API_URL | API URL (default: https://api.bankr.bot) |
BANKR_LLM_KEY | LLM gateway key (falls back to BANKR_API_KEY if not set) |
BANKR_LLM_URL | LLM gateway URL (default: https://llm.bankr.bot) |
Environment variables override config file values. Config file values override defaults.
| Command | Description |
|---|---|
bankr llm models | List available LLM models |
bankr llm credits | Check credit balance |
bankr llm credits add <amount> [--token <addr>] [-y] | Top up LLM credits from wallet |
bankr llm credits auto [--enable/--disable] [--amount] [--threshold] [--tokens] | View or configure auto top-up |
bankr llm setup openclaw [--install] | Generate or install OpenClaw config |
bankr llm setup opencode [--install] |
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?
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 input
echo 'Buy $50 of ETH on Base' | bankr prompt
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.
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
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 | Dashboard: bankr.bot/llm | API Keys: bankr.bot/api
llmKey if configured, otherwise falls back to your API keybankr llm credits add 25 or at bankr.bot/llm?tab=credits before making any LLM calls, or you will get a 402 errorbankr llm credits | Top up: bankr llm credits add <amount> | Auto top-up: bankr llm credits auto --enable --amount 25 --tokens USDCbankr/ (e.g. bankr/claude-sonnet-4.6). In direct API calls, use bare IDs (e.g. claude-sonnet-4.6)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 gateway
For full details — setup paths, model list, provider config, SDK examples, key management, and troubleshooting — see:
Reference : references/llm-gateway.md
Reference : references/token-trading.md
bankr balances or GET /agent/balances)bankr balances --chain base,solana or GET /agent/balances?chains=base,solanaReference : references/portfolio.md
Reference : references/market-research.md
Reference : references/transfers.md
Reference : references/nft-operations.md
Reference : references/polymarket.md
Reference : references/leverage-trading.md
Reference : references/token-deployment.md
Reference : references/automation.md
Reference : references/arbitrary-transaction.md
| 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 |
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:
BANKR_API_KEY, BANKR_LLM_KEY), never in source code~/.bankr/ and .env to .gitignore — the CLI stores credentials in ~/.bankr/config.jsonwaitForConfirmation: true with /agent/submit — transactions execute immediately with no confirmation promptReference : references/safety.md
# 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"
# Direct balance check (no AI agent, instant response)
bankr balances
bankr balances --low-value # Include tokens under $1
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"
# 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"
# 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"
Bankr uses an asynchronous job-based API:
threadId), get job ID and thread IDthreadId for multi-turn conversationsThe 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 : references/api-workflow.md
For direct signing and transaction submission, Bankr also provides synchronous endpoints:
These endpoints return immediately (no polling required) and are ideal for:
Reference : references/sign-submit-api.md
Common issues and fixes:
bankr login or check bankr whoami (CLI), or verify your X-API-Key header (REST API)For comprehensive error troubleshooting, setup instructions, and debugging steps, see:
Reference : references/error-handling.md
~/.bankr/ to .gitignoreSee references/safety.md for comprehensive safety guidance.
bankr balances (direct, no AI processing — hides low-value tokens by default)bankr balances --low-value (include tokens under $1)bankr balances --chain base (single chain)Solana (LaunchLab):
EVM (Clanker):
Direct message signing without AI processing:
# Sign 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!"}'
# Sign EIP-712 typed data (permits, orders)
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": {...}}'
# 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}}'
Direct transaction submission without AI processing:
# Submit 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
}'
Reference : references/sign-submit-api.md
# Verify installation
which bankr
# Reinstall if needed
bun install -g @bankr/cli
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"
See references/error-handling.md for comprehensive troubleshooting.
bankr whoami to verify auth (CLI) or test with a curl to /_health (REST API)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.
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.
approved: false and become publicly visible after admin approvalbankr profile # View own profile
bankr profile create # Interactive creation wizard
bankr profile create --name "My Agent" --token 0x... --twitter myagent
bankr profile update --description "Updated description"
bankr profile delete # Delete own profile (with confirmation)
bankr profile add-update # Add a project update
bankr profile add-update --title "v2 Launch" --content "Shipped new features"
All commands support --json for structured output (enables programmatic use).
All endpoints require API key authentication via X-API-Key header.
| Method | Path | Description |
|---|---|---|
GET | /agent/profile | Get own profile |
POST | /agent/profile | Create profile |
PUT | /agent/profile | Update profile fields |
DELETE |
Create profile:
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:
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.
Weekly Installs
363
Repository
GitHub Stars
1.0K
First Seen
Feb 2, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykFail
Installed on
openclaw330
opencode296
codex284
gemini-cli282
github-copilot271
cursor271
xdrop 文件传输脚本:Bun 环境下安全上传下载工具,支持加密分享
20,700 周安装
AI智能体构建指南:工具调用、记忆与多步推理工作流设计
297 周安装
prompt-lookup AI提示词搜索与优化工具 | prompts.chat MCP服务器 | 提升AI提示词质量
297 周安装
Firebase应用托管基础教程:部署Next.js、Angular全栈Web应用
297 周安装
智能代码探索工具smart-explore:AST解析结构化代码搜索与导航
297 周安装
GrepAI Ollama 本地安装配置教程 - 私有化代码搜索嵌入模型设置指南
297 周安装
YouTube 全功能工具包:转录、搜索、频道分析 API | TranscriptAPI.com 集成
297 周安装
llm.bankr.bot| POST |
| Sign messages/transactions (sync) |
/agent/submit | POST | Submit raw transactions (sync) |
| Print Bankr Terminal URL for API key generation |
bankr logout | Clear stored credentials |
bankr whoami | Show current authentication info |
bankr prompt <text> | Send a prompt to the Bankr AI agent |
bankr prompt --continue <text> | Continue the most recent conversation thread |
bankr prompt --thread <id> <text> | Continue a specific conversation thread |
bankr status <jobId> | Check the status of a running job |
bankr cancel <jobId> | Cancel a running job |
bankr balances | Show wallet token balances across all chains (hides tokens under $1 by default) |
bankr balances --low-value | Include tokens valued under $1 in the output |
bankr balances --chain <chains> | Filter by chain(s): base, polygon, mainnet, unichain, solana (comma-separated) |
bankr balances --json | Output raw JSON balances |
bankr skills | Show all Bankr AI agent skills with examples |
| Generate or install OpenCode config |
bankr llm setup claude | Show Claude Code environment setup |
bankr llm setup cursor | Show Cursor IDE setup instructions |
bankr llm claude [args...] | Launch Claude Code via the Bankr LLM Gateway |
/agent/profile |
| Delete own profile |
POST | /agent/profile/update | Add a project update |