# Table of Contents - [Bankr Documentation](#bankr-documentation) - [Token Launching Overview | Bankr Documentation](#token-launching-overview-bankr-documentation) - [Platform Overview | Bankr Documentation](#platform-overview-bankr-documentation) - [Supported Chains | Bankr Documentation](#supported-chains-bankr-documentation) - [Quick Start | Bankr Documentation](#quick-start-bankr-documentation) - [Fee Splitting | Bankr Documentation](#fee-splitting-bankr-documentation) - [Vaulting and Vesting | Bankr Documentation](#vaulting-and-vesting-bankr-documentation) - [Installing the Bankr Skill | Bankr Documentation](#installing-the-bankr-skill-bankr-documentation) - [Claiming Fees | Bankr Documentation](#claiming-fees-bankr-documentation) - [Available Skills | Bankr Documentation](#available-skills-bankr-documentation) - [Contributing Skills | Bankr Documentation](#contributing-skills-bankr-documentation) - [Transaction Types | Bankr Documentation](#transaction-types-bankr-documentation) - [Prompt Endpoint | Bankr Documentation](#prompt-endpoint-bankr-documentation) - [User Info | Bankr Documentation](#user-info-bankr-documentation) - [CLI | Bankr Documentation](#cli-bankr-documentation) - [Authentication | Bankr Documentation](#authentication-bankr-documentation) - [Submit Endpoint | Bankr Documentation](#submit-endpoint-bankr-documentation) - [Sign Endpoint | Bankr Documentation](#sign-endpoint-bankr-documentation) - [Job Management | Bankr Documentation](#job-management-bankr-documentation) - [Features Table | Bankr Documentation](#features-table-bankr-documentation) - [Installation | Bankr Documentation](#installation-bankr-documentation) - [Claude Plugins Overview | Bankr Documentation](#claude-plugins-overview-bankr-documentation) - [Leveraged Trading | Bankr Documentation](#leveraged-trading-bankr-documentation) - [Token Swaps | Bankr Documentation](#token-swaps-bankr-documentation) - [Transfers | Bankr Documentation](#transfers-bankr-documentation) - [NFTs | Bankr Documentation](#nfts-bankr-documentation) - [Polymarket | Bankr Documentation](#polymarket-bankr-documentation) - [API Reference | Bankr Documentation](#api-reference-bankr-documentation) - [LLM Gateway | Bankr Documentation](#llm-gateway-bankr-documentation) - [Agent API Overview | Bankr Documentation](#agent-api-overview-bankr-documentation) - [OpenClaw | Bankr Documentation](#openclaw-bankr-documentation) - [Portfolio & Balances | Bankr Documentation](#portfolio-balances-bankr-documentation) - [Zero to Earning Fees | Bankr Documentation](#zero-to-earning-fees-bankr-documentation) - [Social Deployment | Bankr Documentation](#social-deployment-bankr-documentation) - [Building a Self-Sustaining Agent | Bankr Documentation](#building-a-self-sustaining-agent-bankr-documentation) - [bankr-agent Plugin | Bankr Documentation](#bankr-agent-plugin-bankr-documentation) - [bankr-agent-dev Plugin | Bankr Documentation](#bankr-agent-dev-plugin-bankr-documentation) - [Client Setup | Bankr Documentation](#client-setup-bankr-documentation) - [DCA Orders | Bankr Documentation](#dca-orders-bankr-documentation) - [Stop Orders | Bankr Documentation](#stop-orders-bankr-documentation) - [bankr-x402-sdk-dev Plugin | Bankr Documentation](#bankr-x402-sdk-dev-plugin-bankr-documentation) - [TWAP Orders | Bankr Documentation](#twap-orders-bankr-documentation) - [Limit Orders | Bankr Documentation](#limit-orders-bankr-documentation) - [Prompt and Poll | Bankr Documentation](#prompt-and-poll-bankr-documentation) - [Examples | Bankr Documentation](#examples-bankr-documentation) - [AI Coding Tools | Bankr Documentation](#ai-coding-tools-bankr-documentation) - [OpenCode | Bankr Documentation](#opencode-bankr-documentation) - [Claude Code | Bankr Documentation](#claude-code-bankr-documentation) - [Codex | Bankr Documentation](#codex-bankr-documentation) - [Cursor | Bankr Documentation](#cursor-bankr-documentation) --- # Bankr Documentation [Skip to main content](https://docs.bankr.bot/#__docusaurus_skipToContent_fallback) On this page Build an AI agent. Launch a token. Trading fees pay for your compute. No ongoing costs. Why Bankr?[​](https://docs.bankr.bot/#why-bankr "Direct link to Why Bankr?") ----------------------------------------------------------------------------- Bankr is the infrastructure layer for self-sustaining AI agents. We handle the hard parts—wallets, trading, security—so you can focus on building. ### Built-in Wallet[​](https://docs.bankr.bot/#built-in-wallet "Direct link to Built-in Wallet") Every agent gets a cross-chain wallet. Trade, deploy contracts, manage DeFi. Gas fees covered. No extra setup required. ### Token Launchpad[​](https://docs.bankr.bot/#token-launchpad "Direct link to Token Launchpad") Fair launch a token for your agent. Trading fees flow back to fund compute. Self-sustaining from day one. ### Plug-in Skills[​](https://docs.bankr.bot/#plug-in-skills "Direct link to Plug-in Skills") Community-built skills for trading, social, and DeFi. One-click install. Your agent gets smarter over time. Supported Chains[​](https://docs.bankr.bot/#supported-chains "Direct link to Supported Chains") ------------------------------------------------------------------------------------------------ | Chain | Architecture | Native Token | | --- | --- | --- | | Base | EVM | ETH | | Ethereum | EVM | ETH | | Polygon | EVM | POL | | Unichain | EVM | ETH | | Solana | SVM | SOL | Quick Start[​](https://docs.bankr.bot/#quick-start "Direct link to Quick Start") --------------------------------------------------------------------------------- Choose your integration path: * **[OpenClaw Agent](https://docs.bankr.bot/openclaw/installation) ** — Install the Bankr skill and start trading in minutes * **[Agent API](https://docs.bankr.bot/agent-api/overview) ** — Full control via REST API with API key authentication * **[Claude Plugins](https://docs.bankr.bot/claude-plugins/overview) ** — Add Bankr capabilities to Claude Code * **[@bankr/sdk](https://docs.bankr.bot/sdk/installation) ** — TypeScript SDK for advanced integrations (manage your own wallet) From Zero to Earning Fees[​](https://docs.bankr.bot/#from-zero-to-earning-fees "Direct link to From Zero to Earning Fees") --------------------------------------------------------------------------------------------------------------------------- 1. **Connect your agent** via OpenClaw skill, API, or SDK 2. **Launch a token** on Base or Solana 3. **Earn trading fees** automatically as users trade your token 4. **Fund your compute** with the fees you earn Ready to build? Start with our [Quick Start Guide](https://docs.bankr.bot/getting-started/quick-start) . * [Why Bankr?](https://docs.bankr.bot/#why-bankr) * [Built-in Wallet](https://docs.bankr.bot/#built-in-wallet) * [Token Launchpad](https://docs.bankr.bot/#token-launchpad) * [Plug-in Skills](https://docs.bankr.bot/#plug-in-skills) * [Supported Chains](https://docs.bankr.bot/#supported-chains) * [Quick Start](https://docs.bankr.bot/#quick-start) * [From Zero to Earning Fees](https://docs.bankr.bot/#from-zero-to-earning-fees) --- # Token Launching Overview | Bankr Documentation [Skip to main content](https://docs.bankr.bot/token-launching/overview/#__docusaurus_skipToContent_fallback) On this page Launch a token for your AI agent and earn trading fees automatically. This is how agents fund themselves. Why Launch a Token?[​](https://docs.bankr.bot/token-launching/overview/#why-launch-a-token "Direct link to Why Launch a Token?") --------------------------------------------------------------------------------------------------------------------------------- When you launch a token through Bankr: 1. **Liquidity pool is created** — Your token is immediately tradeable 2. **Trading fees accumulate** — Every trade generates fees 3. **Fees flow to you** — Claim your earnings anytime 4. **Fund your compute** — Use fees to pay for your agent's API costs Supported Networks[​](https://docs.bankr.bot/token-launching/overview/#supported-networks "Direct link to Supported Networks") ------------------------------------------------------------------------------------------------------------------------------- | Chain | Vaulting | Vesting | Fee Splitting | | --- | --- | --- | --- | | Base | Yes | Yes | Yes | | Solana | Yes | Yes | Yes | Launching via Natural Language[​](https://docs.bankr.bot/token-launching/overview/#launching-via-natural-language "Direct link to Launching via Natural Language") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Simply tell Bankr what you want to deploy: "deploy a token called MyAgent with symbol AGENT on base""launch a token called CoolBot on solana""deploy a token with 20% vaulted for 30 days on base" Launching via Social (Built-in Virality)[​](https://docs.bankr.bot/token-launching/overview/#launching-via-social-built-in-virality "Direct link to Launching via Social (Built-in Virality)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Deploy directly from X (Twitter) by tagging @bankrbot: @bankrbot deploy a token called ViralAgent on solana This creates instant social proof and discoverability for your token. Deployment Limits[​](https://docs.bankr.bot/token-launching/overview/#deployment-limits "Direct link to Deployment Limits") ---------------------------------------------------------------------------------------------------------------------------- | User Type | Tokens Per Day | | --- | --- | | Standard | 1 | | Bankr Club | 10 | Gas is sponsored within these limits. Additional launches require paying gas yourself (~0.02 SOL on Solana). Fee Structure[​](https://docs.bankr.bot/token-launching/overview/#fee-structure "Direct link to Fee Structure") ---------------------------------------------------------------------------------------------------------------- ### Base[​](https://docs.bankr.bot/token-launching/overview/#base "Direct link to Base") Trading fees are split: | Recipient | Share | | --- | --- | | Deployer | 60% | | Bankr | 40% | Fees accumulate in your token and WETH from the 1% fee liquidity pool. ### Solana[​](https://docs.bankr.bot/token-launching/overview/#solana "Direct link to Solana") Fees are structured differently across the token lifecycle: **During Bonding Curve:** * 1% platform fee (to Bankr) * 0.5% creator fee (to your wallet) **After Migration to CPMM Pool:** * 50% of LP tokens locked to you (creator) * 40% of LP tokens locked to Bankr * 10% of LP tokens burned You earn ongoing trading fees from your locked LP position. Token Supply[​](https://docs.bankr.bot/token-launching/overview/#token-supply "Direct link to Token Supply") ------------------------------------------------------------------------------------------------------------- * **Base:** Fixed supply of 100 billion tokens (not mintable after deployment) * **Solana:** Configurable supply with default 6 decimals Next Steps[​](https://docs.bankr.bot/token-launching/overview/#next-steps "Direct link to Next Steps") ------------------------------------------------------------------------------------------------------- * [Vaulting and Vesting](https://docs.bankr.bot/token-launching/vaulting-vesting) — Lock tokens with time-based release * [Fee Splitting](https://docs.bankr.bot/token-launching/fee-splitting) — Route fees to collaborators or treasury * [Claiming Fees](https://docs.bankr.bot/token-launching/claiming-fees) — How to collect your earnings * [Why Launch a Token?](https://docs.bankr.bot/token-launching/overview/#why-launch-a-token) * [Supported Networks](https://docs.bankr.bot/token-launching/overview/#supported-networks) * [Launching via Natural Language](https://docs.bankr.bot/token-launching/overview/#launching-via-natural-language) * [Launching via Social (Built-in Virality)](https://docs.bankr.bot/token-launching/overview/#launching-via-social-built-in-virality) * [Deployment Limits](https://docs.bankr.bot/token-launching/overview/#deployment-limits) * [Fee Structure](https://docs.bankr.bot/token-launching/overview/#fee-structure) * [Base](https://docs.bankr.bot/token-launching/overview/#base) * [Solana](https://docs.bankr.bot/token-launching/overview/#solana) * [Token Supply](https://docs.bankr.bot/token-launching/overview/#token-supply) * [Next Steps](https://docs.bankr.bot/token-launching/overview/#next-steps) --- # Platform Overview | Bankr Documentation [Skip to main content](https://docs.bankr.bot/getting-started/overview/#__docusaurus_skipToContent_fallback) On this page Bankr is a Web3 AI companion platform that integrates LLM technology with DeFi protocols. It enables AI agents to execute blockchain transactions through natural language commands while Bankr handles security, routing, and execution. Core Capabilities[​](https://docs.bankr.bot/getting-started/overview/#core-capabilities "Direct link to Core Capabilities") ---------------------------------------------------------------------------------------------------------------------------- ### Natural Language Trading[​](https://docs.bankr.bot/getting-started/overview/#natural-language-trading "Direct link to Natural Language Trading") Your agent sends plain English commands. Bankr interprets them and executes the appropriate blockchain transactions. "swap $50 of ETH to USDC on base""buy $10 of BONK on solana""set a limit order to buy BNKR if it drops 10%" ### Multi-Chain Support[​](https://docs.bankr.bot/getting-started/overview/#multi-chain-support "Direct link to Multi-Chain Support") Bankr operates across five blockchain networks: * **Base** — Primary EVM chain with gas sponsorship * **Ethereum** — ETH mainnet for high-value operations * **Polygon** — Low-cost EVM transactions * **Unichain** — Uniswap's native chain * **Solana** — High-speed SVM transactions ### Security First[​](https://docs.bankr.bot/getting-started/overview/#security-first "Direct link to Security First") Every transaction passes through Bankr's Sentinel security system, which checks for: * Malicious contract addresses * Phishing attempts * Unusual transaction patterns * Prompt injection attacks ### Token Launching[​](https://docs.bankr.bot/getting-started/overview/#token-launching "Direct link to Token Launching") Deploy tokens on Base or Solana with built-in: * Liquidity pool creation * Fee sharing arrangements * Vaulting and vesting options Architecture[​](https://docs.bankr.bot/getting-started/overview/#architecture "Direct link to Architecture") ------------------------------------------------------------------------------------------------------------- ┌─────────────────┐│ Your Agent │└────────┬────────┘ │ Natural Language ▼┌─────────────────┐│ Bankr API │├─────────────────┤│ • Sentinel ││ • Fee Routing ││ • Multi-Chain │└────────┬────────┘ │ Transactions ▼┌─────────────────┐│ Blockchains ││ Base · Polygon ││ ETH · Unichain ││ Solana │└─────────────────┘ Integration Options[​](https://docs.bankr.bot/getting-started/overview/#integration-options "Direct link to Integration Options") ---------------------------------------------------------------------------------------------------------------------------------- | Method | Best For | Complexity | | --- | --- | --- | | [OpenClaw Skill](https://docs.bankr.bot/openclaw/installation) | AI agents using OpenClaw | Low | | [Claude Plugins](https://docs.bankr.bot/claude-plugins/overview) | Claude Code users | Low | | [Agent API](https://docs.bankr.bot/agent-api/overview) | Custom integrations | Medium | | [@bankr/sdk](https://docs.bankr.bot/sdk/installation) | TypeScript applications | Medium | Pricing[​](https://docs.bankr.bot/getting-started/overview/#pricing "Direct link to Pricing") ---------------------------------------------------------------------------------------------- The SDK uses x402 micropayments: * **$0.01 USDC per request** when using the @bankr/sdk * Payment is automatic using your wallet's USDC on Base * No subscriptions, no minimums, pay-as-you-go Next Steps[​](https://docs.bankr.bot/getting-started/overview/#next-steps "Direct link to Next Steps") ------------------------------------------------------------------------------------------------------- * [Quick Start Guide](https://docs.bankr.bot/getting-started/quick-start) — Get running in 5 minutes * [Features Overview](https://docs.bankr.bot/features/features-table) — See everything Bankr can do * [Token Launching](https://docs.bankr.bot/token-launching/overview) — Deploy your agent's token * [Core Capabilities](https://docs.bankr.bot/getting-started/overview/#core-capabilities) * [Natural Language Trading](https://docs.bankr.bot/getting-started/overview/#natural-language-trading) * [Multi-Chain Support](https://docs.bankr.bot/getting-started/overview/#multi-chain-support) * [Security First](https://docs.bankr.bot/getting-started/overview/#security-first) * [Token Launching](https://docs.bankr.bot/getting-started/overview/#token-launching) * [Architecture](https://docs.bankr.bot/getting-started/overview/#architecture) * [Integration Options](https://docs.bankr.bot/getting-started/overview/#integration-options) * [Pricing](https://docs.bankr.bot/getting-started/overview/#pricing) * [Next Steps](https://docs.bankr.bot/getting-started/overview/#next-steps) --- # Supported Chains | Bankr Documentation [Skip to main content](https://docs.bankr.bot/getting-started/supported-chains/#__docusaurus_skipToContent_fallback) On this page Bankr supports five blockchain networks, each with different capabilities and trade-offs. Chain Overview[​](https://docs.bankr.bot/getting-started/supported-chains/#chain-overview "Direct link to Chain Overview") --------------------------------------------------------------------------------------------------------------------------- | Chain | Type | Native Token | Gas Sponsorship | NFTs | Trading Engine | | --- | --- | --- | --- | --- | --- | | Base | EVM | ETH | Yes | Yes | Yes | | Ethereum | EVM | ETH | No | Yes | No | | Polygon | EVM | POL | Yes | Yes | No | | Unichain | EVM | ETH | Yes | Yes | No | | Solana | SVM | SOL | Limited | No | No | Base[​](https://docs.bankr.bot/getting-started/supported-chains/#base "Direct link to Base") --------------------------------------------------------------------------------------------- Base is the primary chain for Bankr with the most features enabled. **Capabilities:** * Token swaps via Uniswap V2/V3/V4 and Aerodrome * Token launching with fee sharing * Limit orders, stop orders, DCA, TWAP * NFT buying, selling, and minting * Leveraged trading via Avantis * Gas sponsorship for transactions **Block Explorer:** [Basescan](https://basescan.org/) Ethereum[​](https://docs.bankr.bot/getting-started/supported-chains/#ethereum "Direct link to Ethereum") --------------------------------------------------------------------------------------------------------- Ethereum mainnet for high-value operations. **Capabilities:** * Token swaps via Uniswap V2/V3/V4 * NFT buying, selling, and minting **Note:** Gas is not sponsored on Ethereum mainnet due to high costs. **Block Explorer:** [Etherscan](https://etherscan.io/) Polygon[​](https://docs.bankr.bot/getting-started/supported-chains/#polygon "Direct link to Polygon") ------------------------------------------------------------------------------------------------------ Low-cost EVM chain with Polymarket support. **Capabilities:** * Token swaps via Uniswap V2/V3/V4 * Polymarket betting * NFT buying, selling, and minting * Gas sponsorship for transactions **Block Explorer:** [Polygonscan](https://polygonscan.com/) Unichain[​](https://docs.bankr.bot/getting-started/supported-chains/#unichain "Direct link to Unichain") --------------------------------------------------------------------------------------------------------- Uniswap's native L2 chain. **Capabilities:** * Token swaps via Uniswap V2/V3/V4 * NFT buying, selling, and minting * Gas sponsorship for transactions **Block Explorer:** [Uniscan](https://uniscan.xyz/) Solana[​](https://docs.bankr.bot/getting-started/supported-chains/#solana "Direct link to Solana") --------------------------------------------------------------------------------------------------- High-speed SVM chain for fast trading. **Capabilities:** * Token swaps via Jupiter aggregator * Token launching via Raydium LaunchLab * Cross-chain swaps **Note:** Gas sponsorship is limited on Solana (1/day standard, 10/day Bankr Club for token launches). **Block Explorer:** [Orb Markets](https://www.orbmarkets.io/) Specifying Chains[​](https://docs.bankr.bot/getting-started/supported-chains/#specifying-chains "Direct link to Specifying Chains") ------------------------------------------------------------------------------------------------------------------------------------ When sending prompts, you can specify the chain: "swap $10 of USDC to ETH on base""buy $5 of BONK on solana""buy $20 of MATIC on polygon" If no chain is specified, Bankr will: 1. Use the chain where your balance is highest 2. Default to Base for EVM operations 3. Default to Solana for SOL-related operations Cross-Chain Operations[​](https://docs.bankr.bot/getting-started/supported-chains/#cross-chain-operations "Direct link to Cross-Chain Operations") --------------------------------------------------------------------------------------------------------------------------------------------------- Bankr supports cross-chain swaps between EVM chains using bridge aggregators: "swap $50 USDC from polygon to ETH on base" Cross-chain operations between EVM and Solana are not currently supported. * [Chain Overview](https://docs.bankr.bot/getting-started/supported-chains/#chain-overview) * [Base](https://docs.bankr.bot/getting-started/supported-chains/#base) * [Ethereum](https://docs.bankr.bot/getting-started/supported-chains/#ethereum) * [Polygon](https://docs.bankr.bot/getting-started/supported-chains/#polygon) * [Unichain](https://docs.bankr.bot/getting-started/supported-chains/#unichain) * [Solana](https://docs.bankr.bot/getting-started/supported-chains/#solana) * [Specifying Chains](https://docs.bankr.bot/getting-started/supported-chains/#specifying-chains) * [Cross-Chain Operations](https://docs.bankr.bot/getting-started/supported-chains/#cross-chain-operations) --- # Quick Start | Bankr Documentation [Skip to main content](https://docs.bankr.bot/getting-started/quick-start/#__docusaurus_skipToContent_fallback) On this page Get your AI agent trading in under 5 minutes. Option 1: OpenClaw Skill (Fastest)[​](https://docs.bankr.bot/getting-started/quick-start/#option-1-openclaw-skill-fastest "Direct link to Option 1: OpenClaw Skill (Fastest)") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Install in OpenClaw Tell your OpenClaw agent: > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) That's it. Your agent can now execute trades, check balances, and launch tokens. **Try it:** "what's the price of ETH?""buy $5 of BNKR on base""what are my balances?" Option 2: Agent API[​](https://docs.bankr.bot/getting-started/quick-start/#option-2-agent-api "Direct link to Option 2: Agent API") ------------------------------------------------------------------------------------------------------------------------------------ For custom integrations, use the REST API directly. ### 1\. Get an API Key[​](https://docs.bankr.bot/getting-started/quick-start/#1-get-an-api-key "Direct link to 1. Get an API Key") Sign up at [bankr.bot/api](https://bankr.bot/api) , generate an API key, and enable Agent API access. ### 2\. Send a Prompt[​](https://docs.bankr.bot/getting-started/quick-start/#2-send-a-prompt "Direct link to 2. Send a Prompt") curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{"prompt": "what is the price of ETH?"}' ### 3\. Poll for Results[​](https://docs.bankr.bot/getting-started/quick-start/#3-poll-for-results "Direct link to 3. Poll for Results") curl https://api.bankr.bot/agent/job/JOB_ID \ -H "X-API-Key: YOUR_API_KEY" See the [Agent API documentation](https://docs.bankr.bot/agent-api/overview) for full details. Option 3: Claude Plugins[​](https://docs.bankr.bot/getting-started/quick-start/#option-3-claude-plugins "Direct link to Option 3: Claude Plugins") --------------------------------------------------------------------------------------------------------------------------------------------------- For Claude Code users, install the Bankr plugin: claude plugin marketplace add BankrBot/claude-plugins Then install the specific plugin you need: * `bankr-agent` — Trading and Polymarket * `bankr-agent-dev` — Developer toolkit * `bankr-x402-sdk-dev` — SDK integration Option 4: TypeScript SDK (Advanced)[​](https://docs.bankr.bot/getting-started/quick-start/#option-4-typescript-sdk-advanced "Direct link to Option 4: TypeScript SDK (Advanced)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For applications that need to manage their own wallet and submit transactions directly. note The SDK returns transaction data for you to submit yourself. If you want Bankr to handle transactions, use the Agent API instead. Install the SDK: npm install @bankr/sdk# orbun add @bankr/sdk Use it: import { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: '0x...', // Your wallet private key baseUrl: 'https://api.bankr.bot',});const result = await client.promptAndWait({ prompt: 'what is the price of ETH?',});console.log(result.response);// For transactions, you'll receive tx data to submit yourselfif (result.transactions?.length) { // Submit using your own wallet infrastructure} See the [SDK documentation](https://docs.bankr.bot/sdk/installation) for full details. What's Next?[​](https://docs.bankr.bot/getting-started/quick-start/#whats-next "Direct link to What's Next?") -------------------------------------------------------------------------------------------------------------- Now that you're connected, explore what you can do: * [Features Table](https://docs.bankr.bot/features/features-table) — Complete list of capabilities with example prompts * [Token Launching](https://docs.bankr.bot/token-launching/overview) — Deploy a token and earn trading fees * [Automations](https://docs.bankr.bot/features/trading/dca-orders) — Set up DCA, limit orders, and stop-losses * [Option 1: OpenClaw Skill (Fastest)](https://docs.bankr.bot/getting-started/quick-start/#option-1-openclaw-skill-fastest) * [Option 2: Agent API](https://docs.bankr.bot/getting-started/quick-start/#option-2-agent-api) * [1\. Get an API Key](https://docs.bankr.bot/getting-started/quick-start/#1-get-an-api-key) * [2\. Send a Prompt](https://docs.bankr.bot/getting-started/quick-start/#2-send-a-prompt) * [3\. Poll for Results](https://docs.bankr.bot/getting-started/quick-start/#3-poll-for-results) * [Option 3: Claude Plugins](https://docs.bankr.bot/getting-started/quick-start/#option-3-claude-plugins) * [Option 4: TypeScript SDK (Advanced)](https://docs.bankr.bot/getting-started/quick-start/#option-4-typescript-sdk-advanced) * [What's Next?](https://docs.bankr.bot/getting-started/quick-start/#whats-next) --- # Fee Splitting | Bankr Documentation [Skip to main content](https://docs.bankr.bot/token-launching/fee-splitting/#__docusaurus_skipToContent_fallback) On this page Route trading fees to collaborators, treasury wallets, or partners. How Fee Splitting Works[​](https://docs.bankr.bot/token-launching/fee-splitting/#how-fee-splitting-works "Direct link to How Fee Splitting Works") --------------------------------------------------------------------------------------------------------------------------------------------------- When your token is traded, fees are generated. By default, your 60% share (Base) or creator fees (Solana) go to your deployer wallet. With fee splitting, you can route your share to a different address. Base Fee Splitting[​](https://docs.bankr.bot/token-launching/fee-splitting/#base-fee-splitting "Direct link to Base Fee Splitting") ------------------------------------------------------------------------------------------------------------------------------------ On Base, specify a different reward owner at deployment: "deploy TeamToken with fees going to 0x1234... on base" This routes your 60% share of trading fees to the specified address. The 40% Bankr platform fee is separate. ### Fee Recipient vs Vault Recipient[​](https://docs.bankr.bot/token-launching/fee-splitting/#fee-recipient-vs-vault-recipient "Direct link to Fee Recipient vs Vault Recipient") You can set different addresses for: | Recipient | Receives | Changeable? | | --- | --- | --- | | Fee recipient | Trading fees (60% share) | Yes (can be transferred) | | Vault recipient | Vested tokens | No (immutable) | "deploy a token with fees to 0xABC... and vault to 0xDEF... on base" ### Transferring Fee Ownership[​](https://docs.bankr.bot/token-launching/fee-splitting/#transferring-fee-ownership "Direct link to Transferring Fee Ownership") After deployment, the fee recipient can transfer their rights: "transfer fee ownership for 0x1234... to 0x5678..." **Warning:** This is irreversible. Both the recipient address and admin rights transfer together. Solana Fee Splitting[​](https://docs.bankr.bot/token-launching/fee-splitting/#solana-fee-splitting "Direct link to Solana Fee Splitting") ------------------------------------------------------------------------------------------------------------------------------------------ On Solana, specify a fee recipient at launch: "launch a token on solana with fees going to ABC123..." The fee recipient arrangement is **permanent** once created: **During Bonding Curve:** * Receives 0.5% of all trades (the "share fee") * Both creator and fee recipient can claim accumulated fees * Fees are split: 99.9% to recipient, 0.1% to creator as referrer fee **After Migration:** * Fee recipient can claim the Fee Key NFT * Say "claim my fees for TokenName" to receive the NFT * The NFT represents rights to ongoing LP trading fees warning Once a fee recipient is specified at launch on Solana, the deployer **cannot** transfer the Fee Key NFT to anyone else. It can only go to the designated fee recipient. Claiming Split Fees[​](https://docs.bankr.bot/token-launching/fee-splitting/#claiming-split-fees "Direct link to Claiming Split Fees") --------------------------------------------------------------------------------------------------------------------------------------- Fee recipients claim their earnings the same way deployers do: "claim my fees for TokenName" See [Claiming Fees](https://docs.bankr.bot/token-launching/claiming-fees) for details. * [How Fee Splitting Works](https://docs.bankr.bot/token-launching/fee-splitting/#how-fee-splitting-works) * [Base Fee Splitting](https://docs.bankr.bot/token-launching/fee-splitting/#base-fee-splitting) * [Fee Recipient vs Vault Recipient](https://docs.bankr.bot/token-launching/fee-splitting/#fee-recipient-vs-vault-recipient) * [Transferring Fee Ownership](https://docs.bankr.bot/token-launching/fee-splitting/#transferring-fee-ownership) * [Solana Fee Splitting](https://docs.bankr.bot/token-launching/fee-splitting/#solana-fee-splitting) * [Claiming Split Fees](https://docs.bankr.bot/token-launching/fee-splitting/#claiming-split-fees) --- # Vaulting and Vesting | Bankr Documentation [Skip to main content](https://docs.bankr.bot/token-launching/vaulting-vesting/#__docusaurus_skipToContent_fallback) On this page Lock a portion of your token supply with time-based release schedules. What is Vaulting?[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#what-is-vaulting "Direct link to What is Vaulting?") ----------------------------------------------------------------------------------------------------------------------------------- Vaulting locks a percentage of your token supply. This: * Signals long-term commitment to holders * Prevents immediate dumps * Builds trust with your community What is Vesting?[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#what-is-vesting "Direct link to What is Vesting?") -------------------------------------------------------------------------------------------------------------------------------- Vesting releases locked tokens gradually over time. You can configure: * **Cliff period** — Time before any tokens unlock * **Vesting duration** — Time over which tokens gradually release Base Token Vaulting[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#base-token-vaulting "Direct link to Base Token Vaulting") ------------------------------------------------------------------------------------------------------------------------------------------ On Base, you can vault 0-90% of the token supply: "deploy a token called MyAgent with 30% vaulted on base""deploy TeamToken with 20% vault, 7 day lockup, vesting over 30 days on base" ### Configuration Options[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#configuration-options "Direct link to Configuration Options") | Parameter | Description | Default | | --- | --- | --- | | Vault percentage | 0-90% of supply | 0% (no vault) | | Lockup/cliff | Minimum 7 days | 7 days | | Vesting duration | Days to fully vest | 0 (immediate after cliff) | | Vault recipient | Who receives vested tokens | Deployer | ### Example Configurations[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#example-configurations "Direct link to Example Configurations") **Simple lockup (no vesting):** "deploy a token with 25% vaulted for 14 days on base" After 14 days, all vaulted tokens unlock at once. **Lockup with vesting:** "deploy a token with 30% vault, 7 day cliff, 60 day vesting on base" After 7 days, tokens begin unlocking linearly over 60 days. Solana Token Vesting[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#solana-token-vesting "Direct link to Solana Token Vesting") --------------------------------------------------------------------------------------------------------------------------------------------- On Solana, vesting uses the Raydium LaunchLab mechanism: | Parameter | Description | | --- | --- | | `totalLockedAmount` | Number of tokens to lock (in token units with decimals) | | `cliffPeriod` | Seconds before vesting starts (e.g., 30 days = 2,592,000 seconds) | | `unlockPeriod` | Seconds over which tokens vest linearly | "launch a token on solana with 50% locked, 30 day cliff, 90 day vesting" note Solana vesting parameters are specified in **seconds**, not days. Bankr handles the conversion when you use natural language like "30 day cliff". Important Notes[​](https://docs.bankr.bot/token-launching/vaulting-vesting/#important-notes "Direct link to Important Notes") ------------------------------------------------------------------------------------------------------------------------------ * **Vault recipient is immutable** — On Base, you cannot change who receives vested tokens after deployment * **Minimum lockup** — Base requires at least 7 days * **No vault by default** — If you don't specify, no tokens are locked * [What is Vaulting?](https://docs.bankr.bot/token-launching/vaulting-vesting/#what-is-vaulting) * [What is Vesting?](https://docs.bankr.bot/token-launching/vaulting-vesting/#what-is-vesting) * [Base Token Vaulting](https://docs.bankr.bot/token-launching/vaulting-vesting/#base-token-vaulting) * [Configuration Options](https://docs.bankr.bot/token-launching/vaulting-vesting/#configuration-options) * [Example Configurations](https://docs.bankr.bot/token-launching/vaulting-vesting/#example-configurations) * [Solana Token Vesting](https://docs.bankr.bot/token-launching/vaulting-vesting/#solana-token-vesting) * [Important Notes](https://docs.bankr.bot/token-launching/vaulting-vesting/#important-notes) --- # Installing the Bankr Skill | Bankr Documentation [Skip to main content](https://docs.bankr.bot/openclaw/installation/#__docusaurus_skipToContent_fallback) On this page Add Bankr capabilities to your OpenClaw agent in one command. Installation[​](https://docs.bankr.bot/openclaw/installation/#installation "Direct link to Installation") ---------------------------------------------------------------------------------------------------------- Install in OpenClaw Tell your OpenClaw agent: > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) That's it. Your agent now has access to all Bankr features. What Gets Installed[​](https://docs.bankr.bot/openclaw/installation/#what-gets-installed "Direct link to What Gets Installed") ------------------------------------------------------------------------------------------------------------------------------- The Bankr skill enables your agent to: * **Trade tokens** across Base, Ethereum, Polygon, Unichain, and Solana * **Launch tokens** and earn trading fees * **Set automations** like DCA, limit orders, and stop-losses * **Check balances** and portfolio values * **Query prices** and market data * **Place bets** on Polymarket * **Trade with leverage** via Avantis Try It Out[​](https://docs.bankr.bot/openclaw/installation/#try-it-out "Direct link to Try It Out") ---------------------------------------------------------------------------------------------------- After installation, test with these commands: "what is the price of ETH?""what are my balances?""buy $5 of BNKR on base" Requirements[​](https://docs.bankr.bot/openclaw/installation/#requirements "Direct link to Requirements") ---------------------------------------------------------------------------------------------------------- * An OpenClaw-compatible agent Uninstalling[​](https://docs.bankr.bot/openclaw/installation/#uninstalling "Direct link to Uninstalling") ---------------------------------------------------------------------------------------------------------- To remove the skill: uninstall the bankr skill Updating[​](https://docs.bankr.bot/openclaw/installation/#updating "Direct link to Updating") ---------------------------------------------------------------------------------------------- Skills update automatically. To force an update: update the bankr skill Troubleshooting[​](https://docs.bankr.bot/openclaw/installation/#troubleshooting "Direct link to Troubleshooting") ------------------------------------------------------------------------------------------------------------------- ### "Skill not found"[​](https://docs.bankr.bot/openclaw/installation/#skill-not-found "Direct link to "Skill not found"") Ensure you're using the correct URL: https://github.com/BankrBot/openclaw-skills ### "Unable to execute trade"[​](https://docs.bankr.bot/openclaw/installation/#unable-to-execute-trade "Direct link to "Unable to execute trade"") Check that: * You have sufficient balance for the trade * You have gas for the transaction (or gas sponsorship applies) * The token/pair exists on the specified chain Next Steps[​](https://docs.bankr.bot/openclaw/installation/#next-steps "Direct link to Next Steps") ---------------------------------------------------------------------------------------------------- * [Available Skills](https://docs.bankr.bot/openclaw/available-skills) — Other skills you can install * [Contributing Skills](https://docs.bankr.bot/openclaw/contributing-skills) — Build and share your own skills * [Installation](https://docs.bankr.bot/openclaw/installation/#installation) * [What Gets Installed](https://docs.bankr.bot/openclaw/installation/#what-gets-installed) * [Try It Out](https://docs.bankr.bot/openclaw/installation/#try-it-out) * [Requirements](https://docs.bankr.bot/openclaw/installation/#requirements) * [Uninstalling](https://docs.bankr.bot/openclaw/installation/#uninstalling) * [Updating](https://docs.bankr.bot/openclaw/installation/#updating) * [Troubleshooting](https://docs.bankr.bot/openclaw/installation/#troubleshooting) * ["Skill not found"](https://docs.bankr.bot/openclaw/installation/#skill-not-found) * ["Unable to execute trade"](https://docs.bankr.bot/openclaw/installation/#unable-to-execute-trade) * [Next Steps](https://docs.bankr.bot/openclaw/installation/#next-steps) --- # Claiming Fees | Bankr Documentation [Skip to main content](https://docs.bankr.bot/token-launching/claiming-fees/#__docusaurus_skipToContent_fallback) On this page Collect the trading fees you've earned from your deployed tokens. Checking Your Fees[​](https://docs.bankr.bot/token-launching/claiming-fees/#checking-your-fees "Direct link to Checking Your Fees") ------------------------------------------------------------------------------------------------------------------------------------ See how much you've accumulated: "check my fees for TokenName""how much fees have I earned from 0x1234...?""show all my tokens with unclaimed fees" Claiming Fees[​](https://docs.bankr.bot/token-launching/claiming-fees/#claiming-fees-1 "Direct link to Claiming Fees") ----------------------------------------------------------------------------------------------------------------------- Collect your earnings: "claim my fees for TokenName""claim fees for 0x1234..." Fee Types by Chain[​](https://docs.bankr.bot/token-launching/claiming-fees/#fee-types-by-chain "Direct link to Fee Types by Chain") ------------------------------------------------------------------------------------------------------------------------------------ ### Base[​](https://docs.bankr.bot/token-launching/claiming-fees/#base "Direct link to Base") When you claim on Base, you receive two assets: | Asset | Description | | --- | --- | | Your token | From swap fees | | WETH | From trading fees | Both accumulate in the liquidity pool and are claimed together. ### Solana[​](https://docs.bankr.bot/token-launching/claiming-fees/#solana "Direct link to Solana") Solana fees depend on the token's lifecycle stage: **During Bonding Curve:** * Fees are paid in **SOL** * 0.5% creator fee from each trade * Claim with: `"claim my fees for TokenName"` **After Migration to CPMM:** * You hold a Fee Key NFT representing LP rights * Fees come from LP trading activity * Claim with: `"claim CPMM fees for TokenName"` tip If your token has migrated but you're trying to claim bonding curve fees, Bankr will guide you to use the correct claim method. Claim Frequency[​](https://docs.bankr.bot/token-launching/claiming-fees/#claim-frequency "Direct link to Claim Frequency") --------------------------------------------------------------------------------------------------------------------------- You can claim at any time. There's no minimum threshold, but consider gas costs when claiming small amounts. **Recommended approach:** * Check fees periodically: `"show my unclaimed fees"` * Claim when accumulated amount justifies gas cost * On Base, gas is low so claim more frequently * On Solana, claim transactions cost ~0.005 SOL Viewing All Your Tokens[​](https://docs.bankr.bot/token-launching/claiming-fees/#viewing-all-your-tokens "Direct link to Viewing All Your Tokens") --------------------------------------------------------------------------------------------------------------------------------------------------- See all tokens you've deployed and their fee status: "show all my deployed tokens""list my tokens with fees""show my Fee Key NFTs" # Solana only Troubleshooting[​](https://docs.bankr.bot/token-launching/claiming-fees/#troubleshooting "Direct link to Troubleshooting") --------------------------------------------------------------------------------------------------------------------------- **"No fees to claim"** * Your token may not have had recent trading activity * Fees might have already been claimed * On Solana, check if the token has migrated (use different claim method) **"Not authorized to claim"** * You must be the fee recipient for the token * Check if fee ownership was transferred **"Has a fee sharing arrangement"** (Solana) * Use the shared claim flow which splits fees automatically * Both creator and fee recipient can initiate claims **Transaction fails** * Ensure you have enough gas for the claim transaction * On Solana, ensure your wallet has some SOL for fees (~0.005 SOL) * [Checking Your Fees](https://docs.bankr.bot/token-launching/claiming-fees/#checking-your-fees) * [Claiming Fees](https://docs.bankr.bot/token-launching/claiming-fees/#claiming-fees-1) * [Fee Types by Chain](https://docs.bankr.bot/token-launching/claiming-fees/#fee-types-by-chain) * [Base](https://docs.bankr.bot/token-launching/claiming-fees/#base) * [Solana](https://docs.bankr.bot/token-launching/claiming-fees/#solana) * [Claim Frequency](https://docs.bankr.bot/token-launching/claiming-fees/#claim-frequency) * [Viewing All Your Tokens](https://docs.bankr.bot/token-launching/claiming-fees/#viewing-all-your-tokens) * [Troubleshooting](https://docs.bankr.bot/token-launching/claiming-fees/#troubleshooting) --- # Available Skills | Bankr Documentation [Skip to main content](https://docs.bankr.bot/openclaw/available-skills/#__docusaurus_skipToContent_fallback) On this page The OpenClaw skills repository contains multiple skills for different use cases. Repository Structure[​](https://docs.bankr.bot/openclaw/available-skills/#repository-structure "Direct link to Repository Structure") -------------------------------------------------------------------------------------------------------------------------------------- Skills are organized by provider: openclaw-skills/├── bankr/│ └── bankr/│ └── SKILL.md├── 8004.org/│ └── erc-8004/│ └── SKILL.md├── botchan/│ └── botchan/│ └── SKILL.md└── ... Each skill contains: * `SKILL.md` — Skill definition (required) * `references/` — Documentation files * `scripts/` — Helper utilities Bankr[​](https://docs.bankr.bot/openclaw/available-skills/#bankr "Direct link to Bankr") ----------------------------------------------------------------------------------------- **Provider:** `bankr` AI-powered crypto trading via natural language. The main Bankr skill for: * Portfolio management * Token trading * DeFi operations * Token launching Install in OpenClaw > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) ERC-8004[​](https://docs.bankr.bot/openclaw/available-skills/#erc-8004 "Direct link to ERC-8004") -------------------------------------------------------------------------------------------------- **Provider:** `8004.org` Agent registration on Ethereum using trustless agent NFTs. install the erc-8004 skill from https://github.com/BankrBot/openclaw-skills Botchan[​](https://docs.bankr.bot/openclaw/available-skills/#botchan "Direct link to Botchan") ----------------------------------------------------------------------------------------------- **Provider:** `botchan` CLI for onchain agent messaging on Base with: * Feed posting * Direct messaging capabilities install the botchan skill from https://github.com/BankrBot/openclaw-skills QRCoin[​](https://docs.bankr.bot/openclaw/available-skills/#qrcoin "Direct link to QRCoin") -------------------------------------------------------------------------------------------- **Provider:** `qrcoin` URL bidding platform on Base blockchain. install the qrcoin skill from https://github.com/BankrBot/openclaw-skills Yoink[​](https://docs.bankr.bot/openclaw/available-skills/#yoink "Direct link to Yoink") ----------------------------------------------------------------------------------------- **Provider:** `yoink` Onchain capture-the-flag game. install the yoink skill from https://github.com/BankrBot/openclaw-skills Coming Soon[​](https://docs.bankr.bot/openclaw/available-skills/#coming-soon "Direct link to Coming Soon") ----------------------------------------------------------------------------------------------------------- Additional providers are being developed: * Base — Base chain utilities * Neynar — Farcaster integration * Zapper — Portfolio tracking Installing Multiple Skills[​](https://docs.bankr.bot/openclaw/available-skills/#installing-multiple-skills "Direct link to Installing Multiple Skills") -------------------------------------------------------------------------------------------------------------------------------------------------------- You can install multiple skills: install the bankr skill from https://github.com/BankrBot/openclaw-skills install the botchan skill from https://github.com/BankrBot/openclaw-skills Listing Installed Skills[​](https://docs.bankr.bot/openclaw/available-skills/#listing-installed-skills "Direct link to Listing Installed Skills") -------------------------------------------------------------------------------------------------------------------------------------------------- Check what skills are installed: list my installed skills Skill Discovery[​](https://docs.bankr.bot/openclaw/available-skills/#skill-discovery "Direct link to Skill Discovery") ----------------------------------------------------------------------------------------------------------------------- Browse all available skills: show available skills from https://github.com/BankrBot/openclaw-skills * [Repository Structure](https://docs.bankr.bot/openclaw/available-skills/#repository-structure) * [Bankr](https://docs.bankr.bot/openclaw/available-skills/#bankr) * [ERC-8004](https://docs.bankr.bot/openclaw/available-skills/#erc-8004) * [Botchan](https://docs.bankr.bot/openclaw/available-skills/#botchan) * [QRCoin](https://docs.bankr.bot/openclaw/available-skills/#qrcoin) * [Yoink](https://docs.bankr.bot/openclaw/available-skills/#yoink) * [Coming Soon](https://docs.bankr.bot/openclaw/available-skills/#coming-soon) * [Installing Multiple Skills](https://docs.bankr.bot/openclaw/available-skills/#installing-multiple-skills) * [Listing Installed Skills](https://docs.bankr.bot/openclaw/available-skills/#listing-installed-skills) * [Skill Discovery](https://docs.bankr.bot/openclaw/available-skills/#skill-discovery) --- # Contributing Skills | Bankr Documentation [Skip to main content](https://docs.bankr.bot/openclaw/contributing-skills/#__docusaurus_skipToContent_fallback) On this page Build and share your own skills with the OpenClaw community. Repository[​](https://docs.bankr.bot/openclaw/contributing-skills/#repository "Direct link to Repository") ----------------------------------------------------------------------------------------------------------- Skills are contributed via pull request to: https://github.com/BankrBot/openclaw-skills Skill Structure[​](https://docs.bankr.bot/openclaw/contributing-skills/#skill-structure "Direct link to Skill Structure") -------------------------------------------------------------------------------------------------------------------------- Each skill requires this structure: your-provider/└── your-skill/ ├── SKILL.md # Required: Skill definition ├── references/ # Optional: Documentation └── scripts/ # Optional: Helper utilities Creating a Skill[​](https://docs.bankr.bot/openclaw/contributing-skills/#creating-a-skill "Direct link to Creating a Skill") ----------------------------------------------------------------------------------------------------------------------------- ### 1\. Fork the Repository[​](https://docs.bankr.bot/openclaw/contributing-skills/#1-fork-the-repository "Direct link to 1. Fork the Repository") git clone https://github.com/BankrBot/openclaw-skills.gitcd openclaw-skills ### 2\. Create Provider Directory[​](https://docs.bankr.bot/openclaw/contributing-skills/#2-create-provider-directory "Direct link to 2. Create Provider Directory") If you're a new provider: mkdir -p your-provider/your-skill ### 3\. Write SKILL.md[​](https://docs.bankr.bot/openclaw/contributing-skills/#3-write-skillmd "Direct link to 3. Write SKILL.md") Create `your-provider/your-skill/SKILL.md`: # Your Skill NameBrief description of what your skill does.## Capabilities- Capability 1- Capability 2- Capability 3## Usage Examples "example command 1" "example command 2" ## Requirements- Any prerequisites- API keys needed- etc. ### 4\. Add References (Optional)[​](https://docs.bankr.bot/openclaw/contributing-skills/#4-add-references-optional "Direct link to 4. Add References (Optional)") Documentation in `references/`: references/├── api-docs.md├── getting-started.md└── advanced-usage.md ### 5\. Add Scripts (Optional)[​](https://docs.bankr.bot/openclaw/contributing-skills/#5-add-scripts-optional "Direct link to 5. Add Scripts (Optional)") Helper utilities in `scripts/`: scripts/├── setup.sh└── helpers.ts Best Practices[​](https://docs.bankr.bot/openclaw/contributing-skills/#best-practices "Direct link to Best Practices") ----------------------------------------------------------------------------------------------------------------------- ### Clear Documentation[​](https://docs.bankr.bot/openclaw/contributing-skills/#clear-documentation "Direct link to Clear Documentation") * Write clear, specific descriptions * Include usage examples * Document all prerequisites ### Testing[​](https://docs.bankr.bot/openclaw/contributing-skills/#testing "Direct link to Testing") * Test your skill thoroughly before submitting * Include test cases in your PR description ### Commit Messages[​](https://docs.bankr.bot/openclaw/contributing-skills/#commit-messages "Direct link to Commit Messages") Use descriptive commit messages: git commit -m "Add weather-forecast skill for real-time weather data" Submitting a Pull Request[​](https://docs.bankr.bot/openclaw/contributing-skills/#submitting-a-pull-request "Direct link to Submitting a Pull Request") -------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. Create a Branch[​](https://docs.bankr.bot/openclaw/contributing-skills/#1-create-a-branch "Direct link to 1. Create a Branch") git checkout -b add-your-skill ### 2\. Commit Changes[​](https://docs.bankr.bot/openclaw/contributing-skills/#2-commit-changes "Direct link to 2. Commit Changes") git add .git commit -m "Add your-skill for description" ### 3\. Push and Create PR[​](https://docs.bankr.bot/openclaw/contributing-skills/#3-push-and-create-pr "Direct link to 3. Push and Create PR") git push origin add-your-skill Then create a pull request on GitHub with: * Clear description of the skill * Example use cases * Any dependencies or requirements Review Process[​](https://docs.bankr.bot/openclaw/contributing-skills/#review-process "Direct link to Review Process") ----------------------------------------------------------------------------------------------------------------------- After submitting: 1. Maintainers review your PR 2. Feedback may be requested 3. Once approved, skill is merged 4. Skill becomes available to all users Guidelines[​](https://docs.bankr.bot/openclaw/contributing-skills/#guidelines "Direct link to Guidelines") ----------------------------------------------------------------------------------------------------------- * **Maintain quality** — Clear, well-documented definitions * **Be helpful** — Skills should solve real problems * **Stay safe** — Don't include malicious functionality * **Respect users** — Be transparent about capabilities and limitations Getting Help[​](https://docs.bankr.bot/openclaw/contributing-skills/#getting-help "Direct link to Getting Help") ----------------------------------------------------------------------------------------------------------------- * Open an issue for questions * Join the community Discord * Check existing skills for examples * [Repository](https://docs.bankr.bot/openclaw/contributing-skills/#repository) * [Skill Structure](https://docs.bankr.bot/openclaw/contributing-skills/#skill-structure) * [Creating a Skill](https://docs.bankr.bot/openclaw/contributing-skills/#creating-a-skill) * [1\. Fork the Repository](https://docs.bankr.bot/openclaw/contributing-skills/#1-fork-the-repository) * [2\. Create Provider Directory](https://docs.bankr.bot/openclaw/contributing-skills/#2-create-provider-directory) * [3\. Write SKILL.md](https://docs.bankr.bot/openclaw/contributing-skills/#3-write-skillmd) * [4\. Add References (Optional)](https://docs.bankr.bot/openclaw/contributing-skills/#4-add-references-optional) * [5\. Add Scripts (Optional)](https://docs.bankr.bot/openclaw/contributing-skills/#5-add-scripts-optional) * [Best Practices](https://docs.bankr.bot/openclaw/contributing-skills/#best-practices) * [Clear Documentation](https://docs.bankr.bot/openclaw/contributing-skills/#clear-documentation) * [Testing](https://docs.bankr.bot/openclaw/contributing-skills/#testing) * [Commit Messages](https://docs.bankr.bot/openclaw/contributing-skills/#commit-messages) * [Submitting a Pull Request](https://docs.bankr.bot/openclaw/contributing-skills/#submitting-a-pull-request) * [1\. Create a Branch](https://docs.bankr.bot/openclaw/contributing-skills/#1-create-a-branch) * [2\. Commit Changes](https://docs.bankr.bot/openclaw/contributing-skills/#2-commit-changes) * [3\. Push and Create PR](https://docs.bankr.bot/openclaw/contributing-skills/#3-push-and-create-pr) * [Review Process](https://docs.bankr.bot/openclaw/contributing-skills/#review-process) * [Guidelines](https://docs.bankr.bot/openclaw/contributing-skills/#guidelines) * [Getting Help](https://docs.bankr.bot/openclaw/contributing-skills/#getting-help) --- # Transaction Types | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/transaction-types/#__docusaurus_skipToContent_fallback) On this page The Agent API returns various transaction types depending on the operation. These are returned in the `transactions` array of completed jobs. Common Structure[​](https://docs.bankr.bot/agent-api/transaction-types/#common-structure "Direct link to Common Structure") ---------------------------------------------------------------------------------------------------------------------------- All transactions follow this pattern: { "type": "transaction_type", "metadata": { "chainId": 8453, "to": "0x...", "data": "0x...", "value": "0", "gas": "150000" }} Swap Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#swap-transactions "Direct link to Swap Transactions") ------------------------------------------------------------------------------------------------------------------------------- ### `swap`[​](https://docs.bankr.bot/agent-api/transaction-types/#swap "Direct link to swap") Token-to-token or token-to-native swaps. { "type": "swap", "metadata": { "__ORIGINAL_TX_DATA__": { "chain": "base", "humanReadableMessage": "Swap 100 USDC for ETH", "inputTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "inputTokenAmount": "100000000", "inputTokenTicker": "USDC", "outputTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", "outputTokenTicker": "ETH", "receiver": "0x..." }, "transaction": { "chainId": 8453, "to": "0x...", "data": "0x...", "gas": "200000", "gasPrice": "1000000", "value": "0" } }} ### `swapCrossChain`[​](https://docs.bankr.bot/agent-api/transaction-types/#swapcrosschain "Direct link to swapcrosschain") Cross-chain swaps using bridge aggregators. { "type": "swapCrossChain", "metadata": { "chainId": 137, "description": "Bridge 50 USDC from Polygon to Base", "to": "0x...", "data": "0x...", "value": "0" }} Transfer Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#transfer-transactions "Direct link to Transfer Transactions") ------------------------------------------------------------------------------------------------------------------------------------------- ### `transfer_erc20`[​](https://docs.bankr.bot/agent-api/transaction-types/#transfer_erc20 "Direct link to transfer_erc20") ERC-20 token transfers. { "type": "transfer_erc20", "metadata": { "__ORIGINAL_TX_DATA__": { "chain": "base", "humanReadableMessage": "Send 50 USDC to 0x...", "inputTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "inputTokenAmount": "50000000", "inputTokenTicker": "USDC", "receiver": "0x..." }, "transaction": { "chainId": 8453, "to": "0x...", "data": "0x...", "gas": "65000", "gasPrice": "1000000", "value": "0" } }} ### `transfer_eth`[​](https://docs.bankr.bot/agent-api/transaction-types/#transfer_eth "Direct link to transfer_eth") Native ETH transfers. { "type": "transfer_eth", "metadata": { "__ORIGINAL_TX_DATA__": { "chain": "base", "humanReadableMessage": "Send 0.1 ETH to 0x...", "inputTokenAmount": "100000000000000000", "inputTokenTicker": "ETH", "receiver": "0x..." }, "transaction": { "chainId": 8453, "to": "0x...", "data": "0x", "gas": "21000", "gasPrice": "1000000", "value": "100000000000000000" } }} Approval Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#approval-transactions "Direct link to Approval Transactions") ------------------------------------------------------------------------------------------------------------------------------------------- ### `approval`[​](https://docs.bankr.bot/agent-api/transaction-types/#approval "Direct link to approval") Token approval for DEX or contract interaction. { "type": "approval", "metadata": { "__ORIGINAL_TX_DATA__": { "chain": "base", "humanReadableMessage": "Approve USDC for swap", "inputTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "inputTokenTicker": "USDC" }, "transaction": { "chainId": 8453, "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "data": "0x...", "gas": "50000", "gasPrice": "1000000", "value": "0" } }} Wrapper Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#wrapper-transactions "Direct link to Wrapper Transactions") ---------------------------------------------------------------------------------------------------------------------------------------- ### `convert_eth_to_weth`[​](https://docs.bankr.bot/agent-api/transaction-types/#convert_eth_to_weth "Direct link to convert_eth_to_weth") Wrap ETH to WETH. ### `convert_weth_to_eth`[​](https://docs.bankr.bot/agent-api/transaction-types/#convert_weth_to_eth "Direct link to convert_weth_to_eth") Unwrap WETH to ETH. NFT Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#nft-transactions "Direct link to NFT Transactions") ---------------------------------------------------------------------------------------------------------------------------- ### `buy_nft`[​](https://docs.bankr.bot/agent-api/transaction-types/#buy_nft "Direct link to buy_nft") Purchase an NFT from marketplace. ### `transfer_nft`[​](https://docs.bankr.bot/agent-api/transaction-types/#transfer_nft "Direct link to transfer_nft") Transfer NFT to another address. ### `mint_manifold_nft` / `mint_seadrop_nft`[​](https://docs.bankr.bot/agent-api/transaction-types/#mint_manifold_nft--mint_seadrop_nft "Direct link to mint_manifold_nft--mint_seadrop_nft") Mint NFTs from specific platforms. Trading Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#trading-transactions "Direct link to Trading Transactions") ---------------------------------------------------------------------------------------------------------------------------------------- ### `avantisTrade`[​](https://docs.bankr.bot/agent-api/transaction-types/#avantistrade "Direct link to avantistrade") Leveraged trading position on Avantis. { "type": "avantisTrade", "metadata": { "chainId": 8453, "description": "Open $50 long on BTC/USD with 10x leverage", "to": "0x...", "data": "0x...", "value": "0" }} Staking Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#staking-transactions "Direct link to Staking Transactions") ---------------------------------------------------------------------------------------------------------------------------------------- ### `manage_bankr_staking`[​](https://docs.bankr.bot/agent-api/transaction-types/#manage_bankr_staking "Direct link to manage_bankr_staking") Stake or unstake BANKR tokens. { "type": "manage_bankr_staking", "metadata": { "chainId": 8453, "description": "Stake 1000 BANKR", "to": "0x...", "data": "0x...", "value": "0" }} Executing Transactions[​](https://docs.bankr.bot/agent-api/transaction-types/#executing-transactions "Direct link to Executing Transactions") ---------------------------------------------------------------------------------------------------------------------------------------------- When you receive transactions in the response, you can: 1. **Execute with your own wallet** — Sign and broadcast using viem/ethers 2. **Use Bankr's hosted wallet** — Transactions execute automatically if using terminal For self-custody execution: import { createWalletClient, http } from 'viem';import { base } from 'viem/chains';const client = createWalletClient({ chain: base, transport: http(),});const hash = await client.sendTransaction({ to: transaction.metadata.transaction.to, data: transaction.metadata.transaction.data, value: BigInt(transaction.metadata.transaction.value), gas: BigInt(transaction.metadata.transaction.gas),}); * [Common Structure](https://docs.bankr.bot/agent-api/transaction-types/#common-structure) * [Swap Transactions](https://docs.bankr.bot/agent-api/transaction-types/#swap-transactions) * [`swap`](https://docs.bankr.bot/agent-api/transaction-types/#swap) * [`swapCrossChain`](https://docs.bankr.bot/agent-api/transaction-types/#swapcrosschain) * [Transfer Transactions](https://docs.bankr.bot/agent-api/transaction-types/#transfer-transactions) * [`transfer_erc20`](https://docs.bankr.bot/agent-api/transaction-types/#transfer_erc20) * [`transfer_eth`](https://docs.bankr.bot/agent-api/transaction-types/#transfer_eth) * [Approval Transactions](https://docs.bankr.bot/agent-api/transaction-types/#approval-transactions) * [`approval`](https://docs.bankr.bot/agent-api/transaction-types/#approval) * [Wrapper Transactions](https://docs.bankr.bot/agent-api/transaction-types/#wrapper-transactions) * [`convert_eth_to_weth`](https://docs.bankr.bot/agent-api/transaction-types/#convert_eth_to_weth) * [`convert_weth_to_eth`](https://docs.bankr.bot/agent-api/transaction-types/#convert_weth_to_eth) * [NFT Transactions](https://docs.bankr.bot/agent-api/transaction-types/#nft-transactions) * [`buy_nft`](https://docs.bankr.bot/agent-api/transaction-types/#buy_nft) * [`transfer_nft`](https://docs.bankr.bot/agent-api/transaction-types/#transfer_nft) * [`mint_manifold_nft` / `mint_seadrop_nft`](https://docs.bankr.bot/agent-api/transaction-types/#mint_manifold_nft--mint_seadrop_nft) * [Trading Transactions](https://docs.bankr.bot/agent-api/transaction-types/#trading-transactions) * [`avantisTrade`](https://docs.bankr.bot/agent-api/transaction-types/#avantistrade) * [Staking Transactions](https://docs.bankr.bot/agent-api/transaction-types/#staking-transactions) * [`manage_bankr_staking`](https://docs.bankr.bot/agent-api/transaction-types/#manage_bankr_staking) * [Executing Transactions](https://docs.bankr.bot/agent-api/transaction-types/#executing-transactions) --- # Prompt Endpoint | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/prompt-endpoint/#__docusaurus_skipToContent_fallback) On this page Submit natural language commands to the Bankr AI agent for processing. Endpoint[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#endpoint "Direct link to Endpoint") -------------------------------------------------------------------------------------------------- POST /agent/prompt Request[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#request "Direct link to Request") ----------------------------------------------------------------------------------------------- ### Headers[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#headers "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `Content-Type` | `application/json` | Yes | | `X-API-Key` | Your API key | Yes | ### Body[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#body "Direct link to Body") { "prompt": "swap $10 of ETH to USDC on base"} | Field | Type | Description | Required | | --- | --- | --- | --- | | `prompt` | string | Natural language command (max 10,000 characters) | Yes | | `threadId` | string | Continue an existing conversation thread | No | When `threadId` is provided, the agent loads prior messages from that thread so it has conversation context. If omitted, a new thread is created automatically. Response[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#response "Direct link to Response") -------------------------------------------------------------------------------------------------- ### Success (202 Accepted)[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#success-202-accepted "Direct link to Success (202 Accepted)") { "success": true, "jobId": "abc123def456", "threadId": "thr_XYZ789", "status": "pending", "message": "Job created successfully"} | Field | Type | Description | | --- | --- | --- | | `success` | boolean | Whether the request was successful | | `jobId` | string | Unique identifier for tracking this job | | `threadId` | string | Conversation thread ID (reuse to continue the conversation) | | `status` | string | Current status (`"pending"`) | | `message` | string | Human-readable message | ### Error Responses[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#error-responses "Direct link to Error Responses") **Invalid Request (400)** { "error": "Invalid request", "message": "Request body must include a prompt"} **Prompt Too Long (400)** { "error": "Prompt too long", "message": "Prompt must be 10,000 characters or less"} **Authentication Required (401)** { "error": "Authentication required", "message": "Please provide a valid API key"} **Agent Access Not Enabled (403)** { "error": "Agent API access not enabled", "message": "Enable agent access for your API key at bankr.bot/api"} Examples[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#examples "Direct link to Examples") -------------------------------------------------------------------------------------------------- ### Price Query[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#price-query "Direct link to Price Query") curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "what is the price of BTC?"}' ### Token Swap[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#token-swap "Direct link to Token Swap") curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "swap $50 of ETH to USDC on base"}' ### Balance Check[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#balance-check "Direct link to Balance Check") curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "what are my token balances?"}' ### Token Launch[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#token-launch "Direct link to Token Launch") curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "deploy a token called MyAgent with symbol AGENT on base"}' ### Continue a Conversation[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#continue-a-conversation "Direct link to Continue a Conversation") Use the `threadId` from a previous response to continue the conversation with context: curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "and what about SOL?", "threadId": "thr_XYZ789"}' Prompt Best Practices[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#prompt-best-practices "Direct link to Prompt Best Practices") ----------------------------------------------------------------------------------------------------------------------------------------- ### Be Specific[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#be-specific "Direct link to Be Specific") # Good"swap $10 of ETH to USDC on base"# Less clear"swap some eth" ### Specify Chains When Needed[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#specify-chains-when-needed "Direct link to Specify Chains When Needed") # Clear chain context"buy $5 of BONK on solana""swap 100 USDC to ETH on polygon" ### Include Amounts[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#include-amounts "Direct link to Include Amounts") # Good"buy $10 of BNKR"# Ambiguous"buy some BNKR" Next Steps[​](https://docs.bankr.bot/agent-api/prompt-endpoint/#next-steps "Direct link to Next Steps") -------------------------------------------------------------------------------------------------------- After submitting a prompt, poll for results using the [Job Management](https://docs.bankr.bot/agent-api/job-management) endpoints. * [Endpoint](https://docs.bankr.bot/agent-api/prompt-endpoint/#endpoint) * [Request](https://docs.bankr.bot/agent-api/prompt-endpoint/#request) * [Headers](https://docs.bankr.bot/agent-api/prompt-endpoint/#headers) * [Body](https://docs.bankr.bot/agent-api/prompt-endpoint/#body) * [Response](https://docs.bankr.bot/agent-api/prompt-endpoint/#response) * [Success (202 Accepted)](https://docs.bankr.bot/agent-api/prompt-endpoint/#success-202-accepted) * [Error Responses](https://docs.bankr.bot/agent-api/prompt-endpoint/#error-responses) * [Examples](https://docs.bankr.bot/agent-api/prompt-endpoint/#examples) * [Price Query](https://docs.bankr.bot/agent-api/prompt-endpoint/#price-query) * [Token Swap](https://docs.bankr.bot/agent-api/prompt-endpoint/#token-swap) * [Balance Check](https://docs.bankr.bot/agent-api/prompt-endpoint/#balance-check) * [Token Launch](https://docs.bankr.bot/agent-api/prompt-endpoint/#token-launch) * [Continue a Conversation](https://docs.bankr.bot/agent-api/prompt-endpoint/#continue-a-conversation) * [Prompt Best Practices](https://docs.bankr.bot/agent-api/prompt-endpoint/#prompt-best-practices) * [Be Specific](https://docs.bankr.bot/agent-api/prompt-endpoint/#be-specific) * [Specify Chains When Needed](https://docs.bankr.bot/agent-api/prompt-endpoint/#specify-chains-when-needed) * [Include Amounts](https://docs.bankr.bot/agent-api/prompt-endpoint/#include-amounts) * [Next Steps](https://docs.bankr.bot/agent-api/prompt-endpoint/#next-steps) --- # User Info | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/user-info/#__docusaurus_skipToContent_fallback) On this page Retrieve profile information for the authenticated API key holder, including wallet addresses, social accounts, and Bankr Club status. Endpoint[​](https://docs.bankr.bot/agent-api/user-info/#endpoint "Direct link to Endpoint") -------------------------------------------------------------------------------------------- GET /agent/me Request[​](https://docs.bankr.bot/agent-api/user-info/#request "Direct link to Request") ----------------------------------------------------------------------------------------- ### Headers[​](https://docs.bankr.bot/agent-api/user-info/#headers "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `X-API-Key` | Your API key | Yes | No request body is needed. Response[​](https://docs.bankr.bot/agent-api/user-info/#response "Direct link to Response") -------------------------------------------------------------------------------------------- ### Success (200 OK)[​](https://docs.bankr.bot/agent-api/user-info/#success-200-ok "Direct link to Success (200 OK)") { "success": true, "wallets": [ { "chain": "evm", "address": "0x1234567890abcdef1234567890abcdef12345678" }, { "chain": "solana", "address": "5FHwkrdxkAoGQ..." } ], "socialAccounts": [ { "platform": "farcaster", "username": "alice" }, { "platform": "twitter", "username": "alice_web3" } ], "refCode": "A1B2C3D4-BNKR", "bankrClub": { "active": true, "subscriptionType": "monthly", "renewOrCancelOn": 1720000000000 }, "leaderboard": { "score": 1250, "rank": 42 }} ### Response Fields[​](https://docs.bankr.bot/agent-api/user-info/#response-fields "Direct link to Response Fields") | Field | Type | Description | | --- | --- | --- | | `success` | boolean | Whether the request was successful | | `wallets` | array | User's wallet addresses (EVM is always present, Solana if set) | | `wallets[].chain` | string | `"evm"` or `"solana"` | | `wallets[].address` | string | Wallet address | | `socialAccounts` | array | Connected social accounts (non-archived) | | `socialAccounts[].platform` | string | Platform name (`farcaster`, `twitter`, `telegram`, etc.) | | `socialAccounts[].username` | string? | Username on that platform | | `refCode` | string? | Referral code | | `bankrClub.active` | boolean | Whether Bankr Club subscription is active | | `bankrClub.subscriptionType` | string? | `"monthly"` or `"yearly"` | | `bankrClub.renewOrCancelOn` | number? | Unix timestamp of next renewal or cancellation | | `leaderboard.score` | number | User score | | `leaderboard.rank` | number? | Leaderboard rank | ### Error Responses[​](https://docs.bankr.bot/agent-api/user-info/#error-responses "Direct link to Error Responses") **Authentication Required (401)** { "error": "Authentication required", "message": "Please provide a valid API key"} **Agent Access Not Enabled (403)** { "error": "Agent API access not enabled", "message": "Enable agent access for your API key at bankr.bot/api"} Examples[​](https://docs.bankr.bot/agent-api/user-info/#examples "Direct link to Examples") -------------------------------------------------------------------------------------------- ### curl[​](https://docs.bankr.bot/agent-api/user-info/#curl "Direct link to curl") curl https://api.bankr.bot/agent/me \ -H "X-API-Key: your_api_key_here" ### TypeScript[​](https://docs.bankr.bot/agent-api/user-info/#typescript "Direct link to TypeScript") const response = await fetch("https://api.bankr.bot/agent/me", { headers: { "X-API-Key": process.env.BANKR_API_KEY! },});const data = await response.json();console.log("Wallets:", data.wallets);console.log("Score:", data.leaderboard.score); ### Bankr CLI[​](https://docs.bankr.bot/agent-api/user-info/#bankr-cli "Direct link to Bankr CLI") bankr whoami The CLI `whoami` command displays your full profile info including wallet addresses, social accounts, Bankr Club status, and score. * [Endpoint](https://docs.bankr.bot/agent-api/user-info/#endpoint) * [Request](https://docs.bankr.bot/agent-api/user-info/#request) * [Headers](https://docs.bankr.bot/agent-api/user-info/#headers) * [Response](https://docs.bankr.bot/agent-api/user-info/#response) * [Success (200 OK)](https://docs.bankr.bot/agent-api/user-info/#success-200-ok) * [Response Fields](https://docs.bankr.bot/agent-api/user-info/#response-fields) * [Error Responses](https://docs.bankr.bot/agent-api/user-info/#error-responses) * [Examples](https://docs.bankr.bot/agent-api/user-info/#examples) * [curl](https://docs.bankr.bot/agent-api/user-info/#curl) * [TypeScript](https://docs.bankr.bot/agent-api/user-info/#typescript) * [Bankr CLI](https://docs.bankr.bot/agent-api/user-info/#bankr-cli) --- # CLI | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/cli/#__docusaurus_skipToContent_fallback) On this page The Bankr CLI (`@bankr/cli`) is a command-line interface built on top of the Agent API. It handles authentication, prompt submission, job polling, and result display out of the box. Installation[​](https://docs.bankr.bot/agent-api/cli/#installation "Direct link to Installation") -------------------------------------------------------------------------------------------------- ### Global install (recommended)[​](https://docs.bankr.bot/agent-api/cli/#global-install-recommended "Direct link to Global install (recommended)") # npmnpm install -g @bankr/cli# bunbun install -g @bankr/cli After installing globally, the `bankr` command is available everywhere: bankr --version ### Run without installing[​](https://docs.bankr.bot/agent-api/cli/#run-without-installing "Direct link to Run without installing") # npxnpx @bankr/cli what is the price of ETH?# bunxbunx @bankr/cli what is the price of ETH? Setup[​](https://docs.bankr.bot/agent-api/cli/#setup "Direct link to Setup") ----------------------------------------------------------------------------- ### Login[​](https://docs.bankr.bot/agent-api/cli/#login "Direct link to Login") bankr login Opens [bankr.bot/api](https://bankr.bot/api) in your browser so you can copy your API key, then prompts you to paste it. The key is stored in `~/.bankr/config.json`. #### Non-interactive flags[​](https://docs.bankr.bot/agent-api/cli/#non-interactive-flags "Direct link to Non-interactive flags") For AI agents or scripts that can't use interactive prompts: # Print the dashboard URL and exit (no browser, no prompts)bankr login --url# Log in directly with an API keybankr login --api-key bk_YOUR_KEY# Log in with a separate LLM gateway keybankr login --api-key bk_YOUR_KEY --llm-key YOUR_LLM_KEY You can also set keys via environment variables: export BANKR_API_KEY=your_api_key_hereexport BANKR_LLM_KEY=your_llm_key_here # optional, falls back to BANKR_API_KEY ### Verify setup[​](https://docs.bankr.bot/agent-api/cli/#verify-setup "Direct link to Verify setup") bankr whoami Displays your API key (masked), API URL, connection status, wallet addresses, linked wallets, social accounts, Bankr Club status, referral code, and score. Commands[​](https://docs.bankr.bot/agent-api/cli/#commands "Direct link to Commands") -------------------------------------------------------------------------------------- ### `bankr prompt [text...]`[​](https://docs.bankr.bot/agent-api/cli/#bankr-prompt-text "Direct link to bankr-prompt-text") Send a prompt to the Bankr AI agent. Submits the prompt, polls for completion, and displays the result. bankr prompt what is the price of ETH? #### Thread options[​](https://docs.bankr.bot/agent-api/cli/#thread-options "Direct link to Thread options") Continue a multi-turn conversation using threads: # Continue the most recent threadbankr prompt --continue "and what about SOL?"bankr prompt -c "compare them"# Continue a specific thread by IDbankr prompt --thread thr_ABC123 "tell me more" | Option | Description | | --- | --- | | `--thread ` | Continue a specific conversation thread | | `-c, --continue` | Continue the most recent thread | The response includes a `threadId` that is automatically saved. Use `--continue` to pick up where you left off, or `--thread` to resume any previous thread. #### Interactive and piped input[​](https://docs.bankr.bot/agent-api/cli/#interactive-and-piped-input "Direct link to Interactive and piped input") If no text is provided, the CLI opens an interactive input (which avoids shell expansion issues with `$` signs): bankr prompt# Enter your prompt: buy $50 of ETH on base You can also pipe input: echo "buy $50 of ETH on base" | bankr prompt ### `bankr status `[​](https://docs.bankr.bot/agent-api/cli/#bankr-status-jobid "Direct link to bankr-status-jobid") Check the status of a previously submitted job: bankr status abc123def456 ### `bankr cancel `[​](https://docs.bankr.bot/agent-api/cli/#bankr-cancel-jobid "Direct link to bankr-cancel-jobid") Cancel a pending or processing job: bankr cancel abc123def456 ### `bankr whoami`[​](https://docs.bankr.bot/agent-api/cli/#bankr-whoami "Direct link to bankr-whoami") Show current authentication and account info: bankr whoami ### `bankr skills`[​](https://docs.bankr.bot/agent-api/cli/#bankr-skills "Direct link to bankr-skills") List all available Bankr AI agent skills with examples: bankr skills ### `bankr llm models`[​](https://docs.bankr.bot/agent-api/cli/#bankr-llm-models "Direct link to bankr-llm-models") List all models available through the Bankr LLM Gateway: bankr llm models If you're authenticated, the CLI fetches the live model list from the gateway. Otherwise it shows the built-in catalog. ### `bankr llm setup `[​](https://docs.bankr.bot/agent-api/cli/#bankr-llm-setup-target "Direct link to bankr-llm-setup-target") Generate configuration to use the Bankr LLM Gateway with your coding agent. Supported targets: bankr llm setup openclaw # OpenClaw JSON configbankr llm setup openclaw --install # Write to ~/.openclaw/openclaw.jsonbankr llm setup opencode # OpenCode JSON configbankr llm setup opencode --install # Write to ~/.config/opencode/opencode.jsonbankr llm setup cursor # Cursor IDE setup instructionsbankr llm setup claude # Claude Code env var config The `--install` flag (available for OpenClaw and OpenCode) merges the Bankr provider into your existing config file without overwriting other providers. ### `bankr llm claude [args...]`[​](https://docs.bankr.bot/agent-api/cli/#bankr-llm-claude-args "Direct link to bankr-llm-claude-args") Launch Claude Code with all API requests routed through the Bankr LLM Gateway: bankr llm claudebankr llm claude --model claude-sonnet-4.5 This spawns `claude` with `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` set automatically from your Bankr config. If a separate `llmKey` is configured, it uses that; otherwise it falls back to your API key. All arguments are passed through to Claude Code. ### `bankr config get [key]`[​](https://docs.bankr.bot/agent-api/cli/#bankr-config-get-key "Direct link to bankr-config-get-key") Read configuration values. Without a key, shows all config: bankr config get # show allbankr config get apiKey # show API keybankr config get apiUrl # show API URLbankr config get llmKey # show LLM gateway keybankr config get llmUrl # show LLM gateway URL ### `bankr config set `[​](https://docs.bankr.bot/agent-api/cli/#bankr-config-set-key-value "Direct link to bankr-config-set-key-value") Set a configuration value. Supported keys: `apiKey`, `apiUrl`, `llmKey`, `llmUrl`. bankr config set llmKey YOUR_LLM_KEY ### `bankr logout`[​](https://docs.bankr.bot/agent-api/cli/#bankr-logout "Direct link to bankr-logout") Clear stored credentials: bankr logout Default command[​](https://docs.bankr.bot/agent-api/cli/#default-command "Direct link to Default command") ----------------------------------------------------------------------------------------------------------- Any unrecognized arguments are treated as a prompt: bankr what is the price of BNKR?# equivalent to: bankr prompt what is the price of BNKR? Thread options (`--thread`, `--continue`) are only available on the `prompt` subcommand. Configuration[​](https://docs.bankr.bot/agent-api/cli/#configuration "Direct link to Configuration") ----------------------------------------------------------------------------------------------------- The CLI uses this config precedence (highest to lowest): 1. **Environment variable** — `BANKR_API_KEY`, `BANKR_LLM_KEY`, `BANKR_API_URL`, `BANKR_LLM_URL` 2. **Config file** (`~/.bankr/config.json`) 3. **Defaults** (API URL: `https://api.bankr.bot`, LLM URL: `https://llm.bankr.bot`) ### Separate LLM key[​](https://docs.bankr.bot/agent-api/cli/#separate-llm-key "Direct link to Separate LLM key") If your LLM gateway key differs from your Bankr API key, you can configure them separately. The LLM key is used for all LLM gateway calls (`bankr llm models`, `bankr llm credits`, `bankr llm setup`, `bankr llm claude`). When not set, the API key is used for both. # Set during login (interactive prompt or flag)bankr login --llm-key YOUR_LLM_KEY# Or set via configbankr config set llmKey YOUR_LLM_KEY# Or via environment variableexport BANKR_LLM_KEY=your_llm_key_here Programmatic usage[​](https://docs.bankr.bot/agent-api/cli/#programmatic-usage "Direct link to Programmatic usage") -------------------------------------------------------------------------------------------------------------------- The CLI also exports its API client for use in Node.js/TypeScript projects: import { submitPrompt, pollJob, getUserInfo } from "@bankr/cli";// Submit and pollconst { jobId, threadId } = await submitPrompt("what is the price of ETH?");const result = await pollJob(jobId, { onStatus: (s) => console.log(s.status),});console.log(result.response);// Continue the conversation using the threadIdconst { jobId: jobId2 } = await submitPrompt("and what about BTC?", threadId);const result2 = await pollJob(jobId2);console.log(result2.response); // agent has context from the first question// Get user infoconst info = await getUserInfo();console.log(info.address, info.score); See the [npm package](https://www.npmjs.com/package/@bankr/cli) for the full API surface. * [Installation](https://docs.bankr.bot/agent-api/cli/#installation) * [Global install (recommended)](https://docs.bankr.bot/agent-api/cli/#global-install-recommended) * [Run without installing](https://docs.bankr.bot/agent-api/cli/#run-without-installing) * [Setup](https://docs.bankr.bot/agent-api/cli/#setup) * [Login](https://docs.bankr.bot/agent-api/cli/#login) * [Verify setup](https://docs.bankr.bot/agent-api/cli/#verify-setup) * [Commands](https://docs.bankr.bot/agent-api/cli/#commands) * [`bankr prompt [text...]`](https://docs.bankr.bot/agent-api/cli/#bankr-prompt-text) * [`bankr status `](https://docs.bankr.bot/agent-api/cli/#bankr-status-jobid) * [`bankr cancel `](https://docs.bankr.bot/agent-api/cli/#bankr-cancel-jobid) * [`bankr whoami`](https://docs.bankr.bot/agent-api/cli/#bankr-whoami) * [`bankr skills`](https://docs.bankr.bot/agent-api/cli/#bankr-skills) * [`bankr llm models`](https://docs.bankr.bot/agent-api/cli/#bankr-llm-models) * [`bankr llm setup `](https://docs.bankr.bot/agent-api/cli/#bankr-llm-setup-target) * [`bankr llm claude [args...]`](https://docs.bankr.bot/agent-api/cli/#bankr-llm-claude-args) * [`bankr config get [key]`](https://docs.bankr.bot/agent-api/cli/#bankr-config-get-key) * [`bankr config set `](https://docs.bankr.bot/agent-api/cli/#bankr-config-set-key-value) * [`bankr logout`](https://docs.bankr.bot/agent-api/cli/#bankr-logout) * [Default command](https://docs.bankr.bot/agent-api/cli/#default-command) * [Configuration](https://docs.bankr.bot/agent-api/cli/#configuration) * [Separate LLM key](https://docs.bankr.bot/agent-api/cli/#separate-llm-key) * [Programmatic usage](https://docs.bankr.bot/agent-api/cli/#programmatic-usage) --- # Authentication | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/authentication/#__docusaurus_skipToContent_fallback) On this page All Agent API endpoints require authentication via API key. Getting an API Key[​](https://docs.bankr.bot/agent-api/authentication/#getting-an-api-key "Direct link to Getting an API Key") ------------------------------------------------------------------------------------------------------------------------------- 1. Visit [bankr.bot/api](https://bankr.bot/api) 2. Sign in to your Bankr account 3. Generate a new API key 4. **Enable Agent API access** on the key Important Your API key must have Agent API access explicitly enabled. A standard API key without agent access will receive a 403 error. Using Your API Key[​](https://docs.bankr.bot/agent-api/authentication/#using-your-api-key "Direct link to Using Your API Key") ------------------------------------------------------------------------------------------------------------------------------- Include your API key in the `X-API-Key` header with every request: curl -X POST https://api.bankr.bot/agent/prompt \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{"prompt": "what is the price of ETH?"}' Requirements[​](https://docs.bankr.bot/agent-api/authentication/#requirements "Direct link to Requirements") ------------------------------------------------------------------------------------------------------------- * API key must be **active** (not revoked) * API key must have **Agent API access enabled** Error Responses[​](https://docs.bankr.bot/agent-api/authentication/#error-responses "Direct link to Error Responses") ---------------------------------------------------------------------------------------------------------------------- ### Missing or Invalid API Key (401)[​](https://docs.bankr.bot/agent-api/authentication/#missing-or-invalid-api-key-401 "Direct link to Missing or Invalid API Key (401)") { "error": "Authentication required", "message": "Please provide a valid API key"} ### Agent Access Not Enabled (403)[​](https://docs.bankr.bot/agent-api/authentication/#agent-access-not-enabled-403 "Direct link to Agent Access Not Enabled (403)") { "error": "Agent API access not enabled", "message": "Enable agent access for your API key at bankr.bot/api"} Security Best Practices[​](https://docs.bankr.bot/agent-api/authentication/#security-best-practices "Direct link to Security Best Practices") ---------------------------------------------------------------------------------------------------------------------------------------------- ### Keep Your Key Secret[​](https://docs.bankr.bot/agent-api/authentication/#keep-your-key-secret "Direct link to Keep Your Key Secret") * **Never commit** API keys to version control * **Never share** your key publicly or in client-side code * Use **environment variables** to store keys // Good - use environment variablesconst API_KEY = process.env.BANKR_API_KEY;// Bad - never hardcode keysconst API_KEY = "sk_live_abc123..."; ### Use a Dedicated Account[​](https://docs.bankr.bot/agent-api/authentication/#use-a-dedicated-account "Direct link to Use a Dedicated Account") Consider creating a separate Bankr account specifically for API access: * Limits exposure if the key is compromised * Allows you to control exactly what assets are at risk * Makes it easier to revoke access without affecting your main account ### Revoke Compromised Keys[​](https://docs.bankr.bot/agent-api/authentication/#revoke-compromised-keys "Direct link to Revoke Compromised Keys") If you suspect your API key has been leaked: 1. Go to [bankr.bot/api](https://bankr.bot/api) immediately 2. Revoke the compromised key 3. Generate a new key 4. Update your applications ### Monitor Usage[​](https://docs.bankr.bot/agent-api/authentication/#monitor-usage "Direct link to Monitor Usage") Regularly check your account for unexpected activity: * Unusual transactions * Unknown token swaps * Unexpected balance changes Environment Setup[​](https://docs.bankr.bot/agent-api/authentication/#environment-setup "Direct link to Environment Setup") ---------------------------------------------------------------------------------------------------------------------------- ### Node.js / TypeScript[​](https://docs.bankr.bot/agent-api/authentication/#nodejs--typescript "Direct link to Node.js / TypeScript") // Load from environmentconst API_KEY = process.env.BANKR_API_KEY;if (!API_KEY) { throw new Error('BANKR_API_KEY environment variable is required');}// Use in requestsconst response = await fetch('https://api.bankr.bot/agent/prompt', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, }, body: JSON.stringify({ prompt: 'what is the price of ETH?' }),}); ### .env File[​](https://docs.bankr.bot/agent-api/authentication/#env-file "Direct link to .env File") # .envBANKR_API_KEY=your_api_key_here Add `.env` to your `.gitignore`: # .gitignore.env.env.local.env.*.local * [Getting an API Key](https://docs.bankr.bot/agent-api/authentication/#getting-an-api-key) * [Using Your API Key](https://docs.bankr.bot/agent-api/authentication/#using-your-api-key) * [Requirements](https://docs.bankr.bot/agent-api/authentication/#requirements) * [Error Responses](https://docs.bankr.bot/agent-api/authentication/#error-responses) * [Missing or Invalid API Key (401)](https://docs.bankr.bot/agent-api/authentication/#missing-or-invalid-api-key-401) * [Agent Access Not Enabled (403)](https://docs.bankr.bot/agent-api/authentication/#agent-access-not-enabled-403) * [Security Best Practices](https://docs.bankr.bot/agent-api/authentication/#security-best-practices) * [Keep Your Key Secret](https://docs.bankr.bot/agent-api/authentication/#keep-your-key-secret) * [Use a Dedicated Account](https://docs.bankr.bot/agent-api/authentication/#use-a-dedicated-account) * [Revoke Compromised Keys](https://docs.bankr.bot/agent-api/authentication/#revoke-compromised-keys) * [Monitor Usage](https://docs.bankr.bot/agent-api/authentication/#monitor-usage) * [Environment Setup](https://docs.bankr.bot/agent-api/authentication/#environment-setup) * [Node.js / TypeScript](https://docs.bankr.bot/agent-api/authentication/#nodejs--typescript) * [.env File](https://docs.bankr.bot/agent-api/authentication/#env-file) --- # Submit Endpoint | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/submit-endpoint/#__docusaurus_skipToContent_fallback) On this page Submit transactions directly to the blockchain with optional confirmation waiting. Endpoint[​](https://docs.bankr.bot/agent-api/submit-endpoint/#endpoint "Direct link to Endpoint") -------------------------------------------------------------------------------------------------- POST /agent/submit Overview[​](https://docs.bankr.bot/agent-api/submit-endpoint/#overview "Direct link to Overview") -------------------------------------------------------------------------------------------------- The submit endpoint allows you to submit raw EVM transactions directly to the blockchain. Unlike the [Prompt Endpoint](https://docs.bankr.bot/agent-api/prompt-endpoint) which uses natural language, this endpoint accepts explicit transaction parameters. Key features: * **Direct transaction submission** — Bypass the AI agent for pre-built transactions * **Synchronous response** — Returns transaction hash immediately * **Optional confirmation** — Wait for on-chain confirmation or return immediately * **Full control** — Specify exact gas, nonce, and calldata Request[​](https://docs.bankr.bot/agent-api/submit-endpoint/#request "Direct link to Request") ----------------------------------------------------------------------------------------------- ### Headers[​](https://docs.bankr.bot/agent-api/submit-endpoint/#headers "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `Content-Type` | `application/json` | Yes | | `X-API-Key` | Your API key | Yes | ### Body[​](https://docs.bankr.bot/agent-api/submit-endpoint/#body "Direct link to Body") { "transaction": { "to": "0x...", "chainId": 8453, "value": "1000000000000000000", "data": "0x..." }, "description": "Transfer 1 ETH", "waitForConfirmation": true} ### Transaction Object[​](https://docs.bankr.bot/agent-api/submit-endpoint/#transaction-object "Direct link to Transaction Object") | Field | Type | Description | Required | | --- | --- | --- | --- | | `to` | string | Destination address | Yes | | `chainId` | number | Chain ID (8453 for Base, 1 for Ethereum, etc.) | Yes | | `value` | string | Value in wei (as string) | No | | `data` | string | Calldata (hex string starting with `0x`) | No | | `gas` | string | Gas limit | No | | `gasPrice` | string | Legacy gas price in wei | No | | `maxFeePerGas` | string | EIP-1559 max fee per gas | No | | `maxPriorityFeePerGas` | string | EIP-1559 priority fee | No | | `nonce` | number | Transaction nonce (auto-filled if omitted) | No | ### Additional Fields[​](https://docs.bankr.bot/agent-api/submit-endpoint/#additional-fields "Direct link to Additional Fields") | Field | Type | Description | Default | | --- | --- | --- | --- | | `description` | string | Human-readable description for logging | \- | | `waitForConfirmation` | boolean | Wait for transaction confirmation | `true` | Response[​](https://docs.bankr.bot/agent-api/submit-endpoint/#response "Direct link to Response") -------------------------------------------------------------------------------------------------- ### Success with Confirmation (200 OK)[​](https://docs.bankr.bot/agent-api/submit-endpoint/#success-with-confirmation-200-ok "Direct link to Success with Confirmation (200 OK)") When `waitForConfirmation: true` (default): { "success": true, "transactionHash": "0x...", "status": "success", "blockNumber": "12345678", "gasUsed": "21000", "signer": "0x...", "chainId": 8453} ### Success without Confirmation (200 OK)[​](https://docs.bankr.bot/agent-api/submit-endpoint/#success-without-confirmation-200-ok "Direct link to Success without Confirmation (200 OK)") When `waitForConfirmation: false`: { "success": true, "transactionHash": "0x...", "status": "pending", "signer": "0x...", "chainId": 8453} ### Response Fields[​](https://docs.bankr.bot/agent-api/submit-endpoint/#response-fields "Direct link to Response Fields") | Field | Type | Description | | --- | --- | --- | | `success` | boolean | `true` if submission succeeded | | `transactionHash` | string | The transaction hash | | `status` | string | `"success"`, `"reverted"`, or `"pending"` | | `blockNumber` | string | Block number (if confirmed) | | `gasUsed` | string | Gas used (if confirmed) | | `signer` | string | Address that signed the transaction | | `chainId` | number | Chain ID the transaction was submitted to | ### Error Responses[​](https://docs.bankr.bot/agent-api/submit-endpoint/#error-responses "Direct link to Error Responses") **Invalid Request (400)** { "error": "Invalid request", "message": "transaction object is required"} **Submission Failed (400)** { "success": false, "error": "Insufficient funds for gas", "transactionHash": "0x...", "status": "failed", "signer": "0x...", "chainId": 8453} **Authentication Required (401)** { "error": "Authentication required", "message": "Valid API key with associated wallet required"} **Agent Access Not Enabled (403)** { "error": "Agent API access not enabled", "message": "Enable agent access for your API key at bankr.bot/api"} Examples[​](https://docs.bankr.bot/agent-api/submit-endpoint/#examples "Direct link to Examples") -------------------------------------------------------------------------------------------------- ### Simple ETH Transfer[​](https://docs.bankr.bot/agent-api/submit-endpoint/#simple-eth-transfer "Direct link to Simple ETH Transfer") curl -X POST https://api.bankr.bot/agent/submit \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "transaction": { "to": "0xRecipientAddress", "chainId": 8453, "value": "1000000000000000000" }, "description": "Send 1 ETH to friend" }' ### ERC20 Transfer[​](https://docs.bankr.bot/agent-api/submit-endpoint/#erc20-transfer "Direct link to ERC20 Transfer") curl -X POST https://api.bankr.bot/agent/submit \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "transaction": { "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chainId": 8453, "value": "0", "data": "0xa9059cbb000000000000000000000000recipient000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240" }, "description": "Transfer 1 USDC" }' ### Contract Interaction[​](https://docs.bankr.bot/agent-api/submit-endpoint/#contract-interaction "Direct link to Contract Interaction") curl -X POST https://api.bankr.bot/agent/submit \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "transaction": { "to": "0xContractAddress", "chainId": 8453, "value": "0", "data": "0x..." }, "description": "Call myFunction on contract", "waitForConfirmation": true }' ### Fire-and-Forget[​](https://docs.bankr.bot/agent-api/submit-endpoint/#fire-and-forget "Direct link to Fire-and-Forget") Submit without waiting for confirmation: curl -X POST https://api.bankr.bot/agent/submit \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "transaction": { "to": "0xRecipientAddress", "chainId": 8453, "value": "100000000000000000" }, "waitForConfirmation": false }' ### With Custom Gas[​](https://docs.bankr.bot/agent-api/submit-endpoint/#with-custom-gas "Direct link to With Custom Gas") curl -X POST https://api.bankr.bot/agent/submit \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "transaction": { "to": "0xRecipientAddress", "chainId": 8453, "value": "1000000000000000000", "maxFeePerGas": "50000000000", "maxPriorityFeePerGas": "2000000000", "gas": "21000" } }' Supported Chains[​](https://docs.bankr.bot/agent-api/submit-endpoint/#supported-chains "Direct link to Supported Chains") -------------------------------------------------------------------------------------------------------------------------- | Chain | Chain ID | Native Token | | --- | --- | --- | | Ethereum | 1 | ETH | | Base | 8453 | ETH | | Polygon | 137 | MATIC | | Unichain | 130 | ETH | Use Cases[​](https://docs.bankr.bot/agent-api/submit-endpoint/#use-cases "Direct link to Use Cases") ----------------------------------------------------------------------------------------------------- ### Pre-Built Transactions[​](https://docs.bankr.bot/agent-api/submit-endpoint/#pre-built-transactions "Direct link to Pre-Built Transactions") Submit transactions built by external tools or SDKs: // Build transaction with viem/ethersconst tx = { to: contractAddress, data: encodeFunctionData({ ... }), chainId: 8453};// Submit via Bankrawait fetch('https://api.bankr.bot/agent/submit', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey }, body: JSON.stringify({ transaction: tx })}); ### Multi-Step Workflows[​](https://docs.bankr.bot/agent-api/submit-endpoint/#multi-step-workflows "Direct link to Multi-Step Workflows") Execute multiple transactions in sequence: // Step 1: Approveconst approveResult = await submitTx({ to: tokenAddress, data: encodeApprove(spender, amount), chainId: 8453});// Step 2: Swap (after approval confirms)if (approveResult.status === 'success') { await submitTx({ to: routerAddress, data: encodeSwap(...), chainId: 8453 });} ### Automation Backends[​](https://docs.bankr.bot/agent-api/submit-endpoint/#automation-backends "Direct link to Automation Backends") Submit transactions from automated systems: // Cron job or event-triggeredif (priceConditionMet) { await submitTx({ transaction: preBuiltSwapTx, description: 'Automated swap triggered by price condition' });} Sign vs Submit[​](https://docs.bankr.bot/agent-api/submit-endpoint/#sign-vs-submit "Direct link to Sign vs Submit") -------------------------------------------------------------------------------------------------------------------- | Feature | Sign Endpoint | Submit Endpoint | | --- | --- | --- | | Broadcasts to chain | No | Yes | | Returns signature | Yes | No (returns tx hash) | | Waits for confirmation | N/A | Optional | | Use case | Permits, auth, offline signing | Direct execution | Next Steps[​](https://docs.bankr.bot/agent-api/submit-endpoint/#next-steps "Direct link to Next Steps") -------------------------------------------------------------------------------------------------------- * [Sign Endpoint](https://docs.bankr.bot/agent-api/sign-endpoint) — Sign without broadcasting * [Transaction Types](https://docs.bankr.bot/agent-api/transaction-types) — Supported transaction formats * [Prompt Endpoint](https://docs.bankr.bot/agent-api/prompt-endpoint) — Natural language transactions * [Endpoint](https://docs.bankr.bot/agent-api/submit-endpoint/#endpoint) * [Overview](https://docs.bankr.bot/agent-api/submit-endpoint/#overview) * [Request](https://docs.bankr.bot/agent-api/submit-endpoint/#request) * [Headers](https://docs.bankr.bot/agent-api/submit-endpoint/#headers) * [Body](https://docs.bankr.bot/agent-api/submit-endpoint/#body) * [Transaction Object](https://docs.bankr.bot/agent-api/submit-endpoint/#transaction-object) * [Additional Fields](https://docs.bankr.bot/agent-api/submit-endpoint/#additional-fields) * [Response](https://docs.bankr.bot/agent-api/submit-endpoint/#response) * [Success with Confirmation (200 OK)](https://docs.bankr.bot/agent-api/submit-endpoint/#success-with-confirmation-200-ok) * [Success without Confirmation (200 OK)](https://docs.bankr.bot/agent-api/submit-endpoint/#success-without-confirmation-200-ok) * [Response Fields](https://docs.bankr.bot/agent-api/submit-endpoint/#response-fields) * [Error Responses](https://docs.bankr.bot/agent-api/submit-endpoint/#error-responses) * [Examples](https://docs.bankr.bot/agent-api/submit-endpoint/#examples) * [Simple ETH Transfer](https://docs.bankr.bot/agent-api/submit-endpoint/#simple-eth-transfer) * [ERC20 Transfer](https://docs.bankr.bot/agent-api/submit-endpoint/#erc20-transfer) * [Contract Interaction](https://docs.bankr.bot/agent-api/submit-endpoint/#contract-interaction) * [Fire-and-Forget](https://docs.bankr.bot/agent-api/submit-endpoint/#fire-and-forget) * [With Custom Gas](https://docs.bankr.bot/agent-api/submit-endpoint/#with-custom-gas) * [Supported Chains](https://docs.bankr.bot/agent-api/submit-endpoint/#supported-chains) * [Use Cases](https://docs.bankr.bot/agent-api/submit-endpoint/#use-cases) * [Pre-Built Transactions](https://docs.bankr.bot/agent-api/submit-endpoint/#pre-built-transactions) * [Multi-Step Workflows](https://docs.bankr.bot/agent-api/submit-endpoint/#multi-step-workflows) * [Automation Backends](https://docs.bankr.bot/agent-api/submit-endpoint/#automation-backends) * [Sign vs Submit](https://docs.bankr.bot/agent-api/submit-endpoint/#sign-vs-submit) * [Next Steps](https://docs.bankr.bot/agent-api/submit-endpoint/#next-steps) --- # Sign Endpoint | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/sign-endpoint/#__docusaurus_skipToContent_fallback) On this page Sign messages and transactions without broadcasting them to the network. Endpoint[​](https://docs.bankr.bot/agent-api/sign-endpoint/#endpoint "Direct link to Endpoint") ------------------------------------------------------------------------------------------------ POST /agent/sign Overview[​](https://docs.bankr.bot/agent-api/sign-endpoint/#overview "Direct link to Overview") ------------------------------------------------------------------------------------------------ The sign endpoint allows you to cryptographically sign: * **Plain text messages** — Standard Ethereum message signing (`personal_sign`) * **Typed data** — EIP-712 structured data signing (`eth_signTypedData_v4`) * **Transactions** — Sign a transaction without submitting it (`eth_signTransaction`) This is a **synchronous** endpoint that returns immediately with the signature. Request[​](https://docs.bankr.bot/agent-api/sign-endpoint/#request "Direct link to Request") --------------------------------------------------------------------------------------------- ### Headers[​](https://docs.bankr.bot/agent-api/sign-endpoint/#headers "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `Content-Type` | `application/json` | Yes | | `X-API-Key` | Your API key | Yes | ### Body[​](https://docs.bankr.bot/agent-api/sign-endpoint/#body "Direct link to Body") The request body varies based on the signature type. #### personal\_sign[​](https://docs.bankr.bot/agent-api/sign-endpoint/#personal_sign "Direct link to personal_sign") Sign a plain text message: { "signatureType": "personal_sign", "message": "Hello, Bankr!"} | Field | Type | Description | Required | | --- | --- | --- | --- | | `signatureType` | string | Must be `"personal_sign"` | Yes | | `message` | string | The message to sign | Yes | #### eth\_signTypedData\_v4[​](https://docs.bankr.bot/agent-api/sign-endpoint/#eth_signtypeddata_v4 "Direct link to eth_signTypedData_v4") Sign EIP-712 structured data: { "signatureType": "eth_signTypedData_v4", "typedData": { "domain": { "name": "MyApp", "version": "1", "chainId": 8453, "verifyingContract": "0x..." }, "types": { "Permit": [ { "name": "owner", "type": "address" }, { "name": "spender", "type": "address" }, { "name": "value", "type": "uint256" }, { "name": "nonce", "type": "uint256" }, { "name": "deadline", "type": "uint256" } ] }, "primaryType": "Permit", "message": { "owner": "0x...", "spender": "0x...", "value": "1000000", "nonce": "0", "deadline": "1707158800" } }} | Field | Type | Description | Required | | --- | --- | --- | --- | | `signatureType` | string | Must be `"eth_signTypedData_v4"` | Yes | | `typedData` | object | EIP-712 typed data structure | Yes | | `typedData.domain` | object | Domain separator (name, version, chainId, verifyingContract) | Yes | | `typedData.types` | object | Type definitions for the message | Yes | | `typedData.primaryType` | string | The primary type being signed | Yes | | `typedData.message` | object | The actual data to sign | Yes | #### eth\_signTransaction[​](https://docs.bankr.bot/agent-api/sign-endpoint/#eth_signtransaction "Direct link to eth_signTransaction") Sign a transaction without broadcasting: { "signatureType": "eth_signTransaction", "transaction": { "to": "0x...", "chainId": 8453, "value": "1000000000000000000", "data": "0x..." }} | Field | Type | Description | Required | | --- | --- | --- | --- | | `signatureType` | string | Must be `"eth_signTransaction"` | Yes | | `transaction.to` | string | Destination address | Yes | | `transaction.chainId` | number | Chain ID | Yes | | `transaction.value` | string | Value in wei | No | | `transaction.data` | string | Calldata (hex) | No | | `transaction.gas` | string | Gas limit | No | | `transaction.gasPrice` | string | Legacy gas price | No | | `transaction.maxFeePerGas` | string | EIP-1559 max fee | No | | `transaction.maxPriorityFeePerGas` | string | EIP-1559 priority fee | No | | `transaction.nonce` | number | Transaction nonce | No | Response[​](https://docs.bankr.bot/agent-api/sign-endpoint/#response "Direct link to Response") ------------------------------------------------------------------------------------------------ ### Success (200 OK)[​](https://docs.bankr.bot/agent-api/sign-endpoint/#success-200-ok "Direct link to Success (200 OK)") { "success": true, "signature": "0x...", "signer": "0x...", "signatureType": "personal_sign"} | Field | Type | Description | | --- | --- | --- | | `success` | boolean | `true` if signing succeeded | | `signature` | string | The hex-encoded signature | | `signer` | string | Address that produced the signature | | `signatureType` | string | The signature type used | ### Error Responses[​](https://docs.bankr.bot/agent-api/sign-endpoint/#error-responses "Direct link to Error Responses") **Invalid Request (400)** { "error": "Invalid request", "message": "signatureType is required"} **Missing Field (400)** { "error": "Invalid request", "message": "message is required for personal_sign"} **Signing Failed (400)** { "success": false, "error": "Signing failed", "signer": "0x...", "signatureType": "personal_sign"} **Authentication Required (401)** { "error": "Authentication required", "message": "Valid API key with associated wallet required"} **Agent Access Not Enabled (403)** { "error": "Agent API access not enabled", "message": "Enable agent access for your API key at bankr.bot/api"} Examples[​](https://docs.bankr.bot/agent-api/sign-endpoint/#examples "Direct link to Examples") ------------------------------------------------------------------------------------------------ ### Sign a Message[​](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-message "Direct link to Sign a Message") curl -X POST https://api.bankr.bot/agent/sign \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "signatureType": "personal_sign", "message": "Sign in to MyApp at 2025-01-26T10:00:00Z" }' ### Sign a Permit (EIP-2612)[​](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-permit-eip-2612 "Direct link to Sign a Permit (EIP-2612)") curl -X POST https://api.bankr.bot/agent/sign \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "signatureType": "eth_signTypedData_v4", "typedData": { "domain": { "name": "USD Coin", "version": "2", "chainId": 8453, "verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" }, "types": { "Permit": [ { "name": "owner", "type": "address" }, { "name": "spender", "type": "address" }, { "name": "value", "type": "uint256" }, { "name": "nonce", "type": "uint256" }, { "name": "deadline", "type": "uint256" } ] }, "primaryType": "Permit", "message": { "owner": "0xYourAddress", "spender": "0xSpenderAddress", "value": "1000000", "nonce": "0", "deadline": "1735689600" } } }' ### Sign a Transaction[​](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-transaction "Direct link to Sign a Transaction") curl -X POST https://api.bankr.bot/agent/sign \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key_here" \ -d '{ "signatureType": "eth_signTransaction", "transaction": { "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chainId": 8453, "value": "0", "data": "0xa9059cbb000000000000000000000000recipient0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240" } }' Use Cases[​](https://docs.bankr.bot/agent-api/sign-endpoint/#use-cases "Direct link to Use Cases") --------------------------------------------------------------------------------------------------- ### Authentication[​](https://docs.bankr.bot/agent-api/sign-endpoint/#authentication "Direct link to Authentication") Sign messages to prove wallet ownership for login flows: { "signatureType": "personal_sign", "message": "Sign in to MyApp\n\nNonce: abc123\nTimestamp: 2025-01-26T10:00:00Z"} ### Gasless Approvals (Permits)[​](https://docs.bankr.bot/agent-api/sign-endpoint/#gasless-approvals-permits "Direct link to Gasless Approvals (Permits)") Sign EIP-2612 permits to approve token spending without gas: { "signatureType": "eth_signTypedData_v4", "typedData": { ... }} ### Offline Transaction Signing[​](https://docs.bankr.bot/agent-api/sign-endpoint/#offline-transaction-signing "Direct link to Offline Transaction Signing") Sign transactions for later broadcast or multi-sig workflows: { "signatureType": "eth_signTransaction", "transaction": { ... }} Verifying Signatures[​](https://docs.bankr.bot/agent-api/sign-endpoint/#verifying-signatures "Direct link to Verifying Signatures") ------------------------------------------------------------------------------------------------------------------------------------ ### personal\_sign[​](https://docs.bankr.bot/agent-api/sign-endpoint/#personal_sign-1 "Direct link to personal_sign") Use `viem` or `ethers` to recover the signer: import { recoverMessageAddress } from 'viem';const signer = await recoverMessageAddress({ message: "Hello, Bankr!", signature: "0x..."}); ### eth\_signTypedData\_v4[​](https://docs.bankr.bot/agent-api/sign-endpoint/#eth_signtypeddata_v4-1 "Direct link to eth_signTypedData_v4") Verify typed data signatures: import { verifyTypedData } from 'viem';const isValid = await verifyTypedData({ address: "0x...", domain: { ... }, types: { ... }, primaryType: "Permit", message: { ... }, signature: "0x..."}); Next Steps[​](https://docs.bankr.bot/agent-api/sign-endpoint/#next-steps "Direct link to Next Steps") ------------------------------------------------------------------------------------------------------ * [Submit Endpoint](https://docs.bankr.bot/agent-api/submit-endpoint) — Submit signed transactions * [Transaction Types](https://docs.bankr.bot/agent-api/transaction-types) — Supported transaction formats * [Endpoint](https://docs.bankr.bot/agent-api/sign-endpoint/#endpoint) * [Overview](https://docs.bankr.bot/agent-api/sign-endpoint/#overview) * [Request](https://docs.bankr.bot/agent-api/sign-endpoint/#request) * [Headers](https://docs.bankr.bot/agent-api/sign-endpoint/#headers) * [Body](https://docs.bankr.bot/agent-api/sign-endpoint/#body) * [Response](https://docs.bankr.bot/agent-api/sign-endpoint/#response) * [Success (200 OK)](https://docs.bankr.bot/agent-api/sign-endpoint/#success-200-ok) * [Error Responses](https://docs.bankr.bot/agent-api/sign-endpoint/#error-responses) * [Examples](https://docs.bankr.bot/agent-api/sign-endpoint/#examples) * [Sign a Message](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-message) * [Sign a Permit (EIP-2612)](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-permit-eip-2612) * [Sign a Transaction](https://docs.bankr.bot/agent-api/sign-endpoint/#sign-a-transaction) * [Use Cases](https://docs.bankr.bot/agent-api/sign-endpoint/#use-cases) * [Authentication](https://docs.bankr.bot/agent-api/sign-endpoint/#authentication) * [Gasless Approvals (Permits)](https://docs.bankr.bot/agent-api/sign-endpoint/#gasless-approvals-permits) * [Offline Transaction Signing](https://docs.bankr.bot/agent-api/sign-endpoint/#offline-transaction-signing) * [Verifying Signatures](https://docs.bankr.bot/agent-api/sign-endpoint/#verifying-signatures) * [personal\_sign](https://docs.bankr.bot/agent-api/sign-endpoint/#personal_sign-1) * [eth\_signTypedData\_v4](https://docs.bankr.bot/agent-api/sign-endpoint/#eth_signtypeddata_v4-1) * [Next Steps](https://docs.bankr.bot/agent-api/sign-endpoint/#next-steps) --- # Job Management | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/job-management/#__docusaurus_skipToContent_fallback) On this page After submitting a prompt, use these endpoints to track and manage your jobs. Get Job Status[​](https://docs.bankr.bot/agent-api/job-management/#get-job-status "Direct link to Get Job Status") ------------------------------------------------------------------------------------------------------------------- GET /agent/job/{jobId} ### Headers[​](https://docs.bankr.bot/agent-api/job-management/#headers "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `X-API-Key` | Your API key | Yes | ### Path Parameters[​](https://docs.bankr.bot/agent-api/job-management/#path-parameters "Direct link to Path Parameters") | Parameter | Type | Description | | --- | --- | --- | | `jobId` | string | Job identifier from submit prompt response | ### Response (200 OK)[​](https://docs.bankr.bot/agent-api/job-management/#response-200-ok "Direct link to Response (200 OK)") { "success": true, "jobId": "abc123", "threadId": "thr_XYZ789", "status": "completed", "prompt": "what is the price of ETH?", "createdAt": "2024-01-15T10:30:00Z", "completedAt": "2024-01-15T10:30:03Z", "processingTime": 3000, "response": "ETH is currently trading at $3,245.67", "richData": [], "cancellable": false} ### Response Fields[​](https://docs.bankr.bot/agent-api/job-management/#response-fields "Direct link to Response Fields") | Field | Type | Description | When Present | | --- | --- | --- | --- | | `success` | boolean | Whether the request succeeded | Always | | `jobId` | string | Job identifier | Always | | `threadId` | string | Conversation thread ID | When set | | `status` | JobStatus | Current job status | Always | | `prompt` | string | Original prompt submitted | Always | | `createdAt` | string | ISO 8601 timestamp | Always | | `cancellable` | boolean | Whether job can be cancelled | pending/processing | | `statusUpdates` | StatusUpdate\[\] | Progress messages | When available | | `startedAt` | string | When processing started | processing | | `response` | string | AI agent's response | completed | | `richData` | RichData\[\] | Additional structured data | completed | | `completedAt` | string | When job finished | completed/failed | | `processingTime` | number | Duration in milliseconds | completed | | `error` | string | Error message | failed | | `cancelledAt` | string | When job was cancelled | cancelled | ### Job Status Values[​](https://docs.bankr.bot/agent-api/job-management/#job-status-values "Direct link to Job Status Values") | Status | Description | | --- | --- | | `pending` | Job is queued for processing | | `processing` | Job is currently being processed | | `completed` | Job finished successfully | | `failed` | Job encountered an error | | `cancelled` | Job was cancelled by user | ### Error Responses[​](https://docs.bankr.bot/agent-api/job-management/#error-responses "Direct link to Error Responses") **Job ID Required (400)** { "error": "Job ID required", "message": "Please provide a job ID"} **Job Not Found (404)** { "error": "Job not found", "message": "No job found with ID abc123"} Cancel Job[​](https://docs.bankr.bot/agent-api/job-management/#cancel-job "Direct link to Cancel Job") ------------------------------------------------------------------------------------------------------- POST /agent/job/{jobId}/cancel Cancel a pending or processing job. ### Headers[​](https://docs.bankr.bot/agent-api/job-management/#headers-1 "Direct link to Headers") | Header | Value | Required | | --- | --- | --- | | `X-API-Key` | Your API key | Yes | ### Path Parameters[​](https://docs.bankr.bot/agent-api/job-management/#path-parameters-1 "Direct link to Path Parameters") | Parameter | Type | Description | | --- | --- | --- | | `jobId` | string | Job identifier to cancel | ### Response (200 OK)[​](https://docs.bankr.bot/agent-api/job-management/#response-200-ok-1 "Direct link to Response (200 OK)") { "success": true, "jobId": "abc123", "status": "cancelled", "prompt": "swap $100 ETH to USDC", "createdAt": "2024-01-15T10:30:00Z", "cancelledAt": "2024-01-15T10:30:05Z"} note Cancel requests are idempotent. Cancelling an already-cancelled job returns success. ### Error Responses[​](https://docs.bankr.bot/agent-api/job-management/#error-responses-1 "Direct link to Error Responses") **Job Already Completed (400)** { "success": false, "error": "Job already completed", "message": "Cannot cancel a completed job"} **Job Already Failed (400)** { "success": false, "error": "Job already failed", "message": "Cannot cancel a failed job"} Polling Strategy[​](https://docs.bankr.bot/agent-api/job-management/#polling-strategy "Direct link to Polling Strategy") ------------------------------------------------------------------------------------------------------------------------- ### Recommended Approach[​](https://docs.bankr.bot/agent-api/job-management/#recommended-approach "Direct link to Recommended Approach") async function pollForCompletion(jobId: string, maxAttempts = 60) { const API_KEY = process.env.BANKR_API_KEY; for (let i = 0; i < maxAttempts; i++) { const response = await fetch( `https://api.bankr.bot/agent/job/${jobId}`, { headers: { 'X-API-Key': API_KEY }, } ); if (!response.ok) { throw new Error('Failed to fetch job status'); } const job = await response.json(); console.log(`Status: ${job.status}`); if (job.status === 'completed') { return { response: job.response, richData: job.richData, }; } if (job.status === 'failed') { throw new Error(job.error || 'Job failed'); } if (job.status === 'cancelled') { throw new Error('Job was cancelled'); } // Wait 2 seconds before next poll await new Promise((resolve) => setTimeout(resolve, 2000)); } throw new Error('Timeout waiting for job completion');} ### Polling Parameters[​](https://docs.bankr.bot/agent-api/job-management/#polling-parameters "Direct link to Polling Parameters") | Parameter | Recommended | Notes | | --- | --- | --- | | Interval | 2 seconds | Balance between responsiveness and API load | | Max attempts | 60 | ~2 minutes total timeout | | Total timeout | 2-5 minutes | Most jobs complete within 30 seconds | Complete Example[​](https://docs.bankr.bot/agent-api/job-management/#complete-example "Direct link to Complete Example") ------------------------------------------------------------------------------------------------------------------------- const API_BASE_URL = "https://api.bankr.bot/agent";const API_KEY = process.env.BANKR_API_KEY!;async function executePrompt(prompt: string) { // 1) Submit the prompt const submitResponse = await fetch(`${API_BASE_URL}/prompt`, { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": API_KEY, }, body: JSON.stringify({ prompt }), }); if (!submitResponse.ok) { const error = await submitResponse.json(); throw new Error(error.message || "Failed to submit prompt"); } const { jobId } = await submitResponse.json(); console.log(`Job submitted: ${jobId}`); // 2) Poll for completion const result = await pollForCompletion(jobId); return result;}async function pollForCompletion(jobId: string, maxAttempts = 60) { for (let i = 0; i < maxAttempts; i++) { const statusResponse = await fetch(`${API_BASE_URL}/job/${jobId}`, { headers: { "X-API-Key": API_KEY }, }); if (!statusResponse.ok) { throw new Error("Failed to fetch job status"); } const job = await statusResponse.json(); console.log(`Status: ${job.status}`); if (job.status === "completed") { return { response: job.response, richData: job.richData, }; } if (job.status === "failed") { throw new Error(job.error || "Job failed"); } if (job.status === "cancelled") { throw new Error("Job was cancelled"); } // Wait 2 seconds before next poll await new Promise((resolve) => setTimeout(resolve, 2000)); } throw new Error("Timeout waiting for job completion");}async function cancelJob(jobId: string) { const response = await fetch(`${API_BASE_URL}/job/${jobId}/cancel`, { method: "POST", headers: { "X-API-Key": API_KEY }, }); if (!response.ok) { const error = await response.json(); throw new Error(error.message || "Failed to cancel job"); } return response.json();}// Usageasync function main() { const result = await executePrompt("What is the current price of ETH?"); console.log("Response:", result.response); console.log("Rich Data:", result.richData);}main().catch(console.error); Rich Data[​](https://docs.bankr.bot/agent-api/job-management/#rich-data "Direct link to Rich Data") ---------------------------------------------------------------------------------------------------- Completed jobs may include `richData` with additional structured information: { "richData": [ { "type": "token_info", "symbol": "ETH", "price": 3245.67, "change24h": 2.3 }, { "type": "chart", "url": "https://..." } ]} The structure varies based on the type of query and response. * [Get Job Status](https://docs.bankr.bot/agent-api/job-management/#get-job-status) * [Headers](https://docs.bankr.bot/agent-api/job-management/#headers) * [Path Parameters](https://docs.bankr.bot/agent-api/job-management/#path-parameters) * [Response (200 OK)](https://docs.bankr.bot/agent-api/job-management/#response-200-ok) * [Response Fields](https://docs.bankr.bot/agent-api/job-management/#response-fields) * [Job Status Values](https://docs.bankr.bot/agent-api/job-management/#job-status-values) * [Error Responses](https://docs.bankr.bot/agent-api/job-management/#error-responses) * [Cancel Job](https://docs.bankr.bot/agent-api/job-management/#cancel-job) * [Headers](https://docs.bankr.bot/agent-api/job-management/#headers-1) * [Path Parameters](https://docs.bankr.bot/agent-api/job-management/#path-parameters-1) * [Response (200 OK)](https://docs.bankr.bot/agent-api/job-management/#response-200-ok-1) * [Error Responses](https://docs.bankr.bot/agent-api/job-management/#error-responses-1) * [Polling Strategy](https://docs.bankr.bot/agent-api/job-management/#polling-strategy) * [Recommended Approach](https://docs.bankr.bot/agent-api/job-management/#recommended-approach) * [Polling Parameters](https://docs.bankr.bot/agent-api/job-management/#polling-parameters) * [Complete Example](https://docs.bankr.bot/agent-api/job-management/#complete-example) * [Rich Data](https://docs.bankr.bot/agent-api/job-management/#rich-data) --- # Features Table | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/features-table/#__docusaurus_skipToContent_fallback) On this page Complete reference of Bankr capabilities with example prompts. Trading[​](https://docs.bankr.bot/features/features-table/#trading "Direct link to Trading") --------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Token Swap** | All | `"swap $50 of ETH to USDC"` `"buy $10 of BNKR on base"` `"sell all my BONK for SOL"` | | **Swap by Amount** | All | `"swap 0.1 ETH to USDC"` `"swap 100 USDC to BNKR"` | | **Swap by Percentage** | All | `"swap 50% of my USDC to ETH"` `"sell half my BNKR"` | | **Multi-Swap** | EVM | `"swap 10 USDC to BNKR and 5 USDC to DEGEN"` | | **Cross-Chain Swap** | EVM | `"swap $50 USDC from polygon to ETH on base"` | Automations[​](https://docs.bankr.bot/features/features-table/#automations "Direct link to Automations") --------------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Limit Order (Buy)** | EVM | `"buy 100 BNKR if it drops 10%"` `"buy $50 of ETH when price drops 15%"` | | **Limit Order (Sell)** | EVM | `"sell my BNKR when it rises 20%"` `"sell DEGEN when BTC reaches $50,000"` | | **Stop Order** | EVM | `"sell all my DEGEN if it drops 20%"` | | **DCA Order** | EVM | `"DCA $100 USDC into BNKR every day at 9am"` `"DCA $50 ETH into BNKR every 6 hours for 7 days"` | | **TWAP Order** | EVM | `"sell 1000 BNKR over the next 4 hours"` | | **Cancel Automation** | EVM | `"cancel my limit order"` `"cancel all my automations"` | Token Launching[​](https://docs.bankr.bot/features/features-table/#token-launching "Direct link to Token Launching") --------------------------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Deploy Token** | Base, Solana | `"deploy a token called MyAgent with symbol AGENT on base"` `"launch a token called MyAgent on solana"` | | **Deploy with Vault** | Base, Solana | `"deploy a token with 30% vaulted for 30 days on base"` | | **Deploy with Vesting** | Base, Solana | `"launch a token with 30 day cliff and 90 day vesting on solana"` | | **Deploy with Fee Split** | Base, Solana | `"deploy a token with fees going to 0x1234... on base"` | | **Check Fees** | Base, Solana | `"how much fees have I earned?"` `"check fees for TokenName"` | | **Claim Fees** | Base, Solana | `"claim my fees for TokenName"` | Leveraged Trading (Avantis)[​](https://docs.bankr.bot/features/features-table/#leveraged-trading-avantis "Direct link to Leveraged Trading (Avantis)") ------------------------------------------------------------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Long Position** | Base | `"buy $10 of GOLD"` `"long BTC/USD with 10x leverage"` | | **Short Position** | Base | `"short $25 of ETH/USD"` `"sell $10 of OIL with 5x leverage"` | | **With Stop Loss** | Base | `"buy $50 of BTC/USD with 5% stop loss"` | | **With Take Profit** | Base | `"long ETH with 200% take profit"` | | **Full Config** | Base | `"buy $25 BTC/USD with 10x leverage, 5% stop loss, 200% take profit"` | | **Close Position** | Base | `"close my BTC position"` | | **View Positions** | Base | `"show my Avantis positions"` | Polymarket[​](https://docs.bankr.bot/features/features-table/#polymarket "Direct link to Polymarket") ------------------------------------------------------------------------------------------------------ | Feature | Chains | Example Prompts | | --- | --- | --- | | **Search Markets** | Polygon | `"what are the odds the eagles win?"` `"search for bitcoin markets"` | | **Place Bet** | Polygon | `"bet $5 on eagles to win tonight"` `"buy 100 YES shares for trump winning"` | | **View Positions** | Polygon | `"show my Polymarket positions"` | | **Redeem Positions** | Polygon | `"redeem my winning polymarket positions"` | Portfolio & Balances[​](https://docs.bankr.bot/features/features-table/#portfolio--balances "Direct link to Portfolio & Balances") ----------------------------------------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Check Balances** | All | `"what are my balances?"` `"show my portfolio"` | | **Chain-Specific** | All | `"my balances on base"` `"solana balance"` | | **Token-Specific** | All | `"how much USDC do I have?"` | | **Portfolio Value** | All | `"what's my total portfolio worth?"` | Transfers[​](https://docs.bankr.bot/features/features-table/#transfers "Direct link to Transfers") --------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Send Tokens** | All | `"send 100 USDC to 0x1234..."` | | **Send Native** | All | `"send 0.1 ETH to vitalik.eth"` | | **Send to Social** | All | `"send $5 of DEGEN to @username"` | NFTs[​](https://docs.bankr.bot/features/features-table/#nfts "Direct link to NFTs") ------------------------------------------------------------------------------------ | Feature | Chains | Example Prompts | | --- | --- | --- | | **View NFTs** | EVM | `"show my NFTs"` `"what NFTs do I own on base?"` | | **Buy NFT** | EVM | `"buy this NFT: [opensea link]"` | | **Transfer NFT** | EVM | `"send my Noun to 0x1234..."` | | **Mint NFT** | EVM | `"mint from [manifold link]"` | | **List NFT** | EVM | `"list my NFT for 0.5 ETH"` | Market Data[​](https://docs.bankr.bot/features/features-table/#market-data "Direct link to Market Data") --------------------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Token Price** | All | `"price of ETH"` `"what's BTC trading at?"` | | **Multiple Prices** | All | `"prices of ETH, SOL, and MATIC"` | | **Price Chart** | All | `"show ETH chart"` | | **Technical Analysis** | All | `"analyze BNKR price action"` | | **Trending Tokens** | All | `"what's trending on base?"` `"top gainers today"` | | **Token Research** | All | `"tell me about BNKR"` `"research this token: 0x..."` | Staking[​](https://docs.bankr.bot/features/features-table/#staking "Direct link to Staking") --------------------------------------------------------------------------------------------- | Feature | Chains | Example Prompts | | --- | --- | --- | | **Stake BANKR** | Base | `"stake 1000 BANKR"` | | **Unstake** | Base | `"unstake my BANKR"` | | **View Staking** | Base | `"show my staking position"` | Chain-Specific Notes[​](https://docs.bankr.bot/features/features-table/#chain-specific-notes "Direct link to Chain-Specific Notes") ------------------------------------------------------------------------------------------------------------------------------------ ### Base[​](https://docs.bankr.bot/features/features-table/#base "Direct link to Base") * Full feature support * Gas sponsorship enabled * Trading engine for limit/stop orders * Avantis leveraged trading ### Ethereum[​](https://docs.bankr.bot/features/features-table/#ethereum "Direct link to Ethereum") * Swaps and transfers * NFT operations * No gas sponsorship (high gas costs) ### Polygon[​](https://docs.bankr.bot/features/features-table/#polygon "Direct link to Polygon") * Swaps and transfers * Polymarket integration * Gas sponsorship enabled ### Unichain[​](https://docs.bankr.bot/features/features-table/#unichain "Direct link to Unichain") * Swaps and transfers * NFT operations * Gas sponsorship enabled ### Solana[​](https://docs.bankr.bot/features/features-table/#solana "Direct link to Solana") * Swaps via Jupiter * Token launching * Limited gas sponsorship (1/day standard, 10/day Bankr Club) * [Trading](https://docs.bankr.bot/features/features-table/#trading) * [Automations](https://docs.bankr.bot/features/features-table/#automations) * [Token Launching](https://docs.bankr.bot/features/features-table/#token-launching) * [Leveraged Trading (Avantis)](https://docs.bankr.bot/features/features-table/#leveraged-trading-avantis) * [Polymarket](https://docs.bankr.bot/features/features-table/#polymarket) * [Portfolio & Balances](https://docs.bankr.bot/features/features-table/#portfolio--balances) * [Transfers](https://docs.bankr.bot/features/features-table/#transfers) * [NFTs](https://docs.bankr.bot/features/features-table/#nfts) * [Market Data](https://docs.bankr.bot/features/features-table/#market-data) * [Staking](https://docs.bankr.bot/features/features-table/#staking) * [Chain-Specific Notes](https://docs.bankr.bot/features/features-table/#chain-specific-notes) * [Base](https://docs.bankr.bot/features/features-table/#base) * [Ethereum](https://docs.bankr.bot/features/features-table/#ethereum) * [Polygon](https://docs.bankr.bot/features/features-table/#polygon) * [Unichain](https://docs.bankr.bot/features/features-table/#unichain) * [Solana](https://docs.bankr.bot/features/features-table/#solana) --- # Installation | Bankr Documentation [Skip to main content](https://docs.bankr.bot/sdk/installation/#__docusaurus_skipToContent_fallback) On this page Install the Bankr SDK for TypeScript/JavaScript applications that need to manage their own wallet and transaction submission. note **Most users should start with the [Agent API](https://docs.bankr.bot/agent-api/overview) or [OpenClaw skill](https://docs.bankr.bot/openclaw/installation) ** — they're simpler and handle wallet management for you. The SDK is designed for advanced use cases where you need: * To manage your own wallet and submit transactions yourself * Fine-grained control over transaction data * Integration with existing wallet infrastructure How the SDK Works[​](https://docs.bankr.bot/sdk/installation/#how-the-sdk-works "Direct link to How the SDK Works") -------------------------------------------------------------------------------------------------------------------- Unlike the Agent API (which executes transactions for you), the SDK: 1. Accepts prompts and returns **transaction data** 2. You submit the transactions to the blockchain using **your own wallet** 3. Payments are made via x402 micropayments ($0.01 USDC per request) This gives you full control but requires more integration work. Requirements[​](https://docs.bankr.bot/sdk/installation/#requirements "Direct link to Requirements") ----------------------------------------------------------------------------------------------------- * Node.js 18+ or Bun * USDC on Base (for x402 payments) * A wallet private key (for signing payments and transactions) Install[​](https://docs.bankr.bot/sdk/installation/#install "Direct link to Install") -------------------------------------------------------------------------------------- npm install @bankr/sdk# orbun add @bankr/sdk# oryarn add @bankr/sdk Dependencies[​](https://docs.bankr.bot/sdk/installation/#dependencies "Direct link to Dependencies") ----------------------------------------------------------------------------------------------------- The SDK uses these peer dependencies: * `viem` — Ethereum interactions * `x402-fetch` — Payment protocol These are included automatically. Quick Start[​](https://docs.bankr.bot/sdk/installation/#quick-start "Direct link to Quick Start") -------------------------------------------------------------------------------------------------- import { BankrClient } from '@bankr/sdk';// Initialize with your private keyconst client = new BankrClient({ privateKey: '0x...', // Your wallet private key baseUrl: 'https://api.bankr.bot', // Production endpoint});// Send a prompt and wait for resultsconst result = await client.promptAndWait({ prompt: 'what is the price of ETH?',});console.log(result.response);// "ETH is currently trading at $3,245.67" Configuration Options[​](https://docs.bankr.bot/sdk/installation/#configuration-options "Direct link to Configuration Options") -------------------------------------------------------------------------------------------------------------------------------- const client = new BankrClient({ // Required privateKey: '0x...', // Recommended baseUrl: 'https://api.bankr.bot', // Production API endpoint // Optional timeout: 600000, // Request timeout (10 min default) walletAddress: '0x...', // Context wallet (defaults to derived)}); Environment Variables[​](https://docs.bankr.bot/sdk/installation/#environment-variables "Direct link to Environment Variables") -------------------------------------------------------------------------------------------------------------------------------- Store your private key securely: # .envBANKR_PRIVATE_KEY=0x... import { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,}); TypeScript[​](https://docs.bankr.bot/sdk/installation/#typescript "Direct link to TypeScript") ----------------------------------------------------------------------------------------------- The SDK is fully typed. Import types as needed: import { BankrClient, BankrClientConfig, PromptOptions, JobStatus, Transaction,} from '@bankr/sdk'; Next Steps[​](https://docs.bankr.bot/sdk/installation/#next-steps "Direct link to Next Steps") ----------------------------------------------------------------------------------------------- * [Client Setup](https://docs.bankr.bot/sdk/client-setup) — Configuration details * [Prompt and Poll](https://docs.bankr.bot/sdk/prompt-and-poll) — Core usage patterns * [Examples](https://docs.bankr.bot/sdk/examples) — Common use cases * [How the SDK Works](https://docs.bankr.bot/sdk/installation/#how-the-sdk-works) * [Requirements](https://docs.bankr.bot/sdk/installation/#requirements) * [Install](https://docs.bankr.bot/sdk/installation/#install) * [Dependencies](https://docs.bankr.bot/sdk/installation/#dependencies) * [Quick Start](https://docs.bankr.bot/sdk/installation/#quick-start) * [Configuration Options](https://docs.bankr.bot/sdk/installation/#configuration-options) * [Environment Variables](https://docs.bankr.bot/sdk/installation/#environment-variables) * [TypeScript](https://docs.bankr.bot/sdk/installation/#typescript) * [Next Steps](https://docs.bankr.bot/sdk/installation/#next-steps) --- # Claude Plugins Overview | Bankr Documentation [Skip to main content](https://docs.bankr.bot/claude-plugins/overview/#__docusaurus_skipToContent_fallback) On this page Add Bankr capabilities to Claude Code with official plugins. Available Plugins[​](https://docs.bankr.bot/claude-plugins/overview/#available-plugins "Direct link to Available Plugins") --------------------------------------------------------------------------------------------------------------------------- | Plugin | Purpose | | --- | --- | | [bankr-agent](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin) | Trading, prices, Polymarket | | [bankr-agent-dev](https://docs.bankr.bot/claude-plugins/bankr-agent-dev) | Developer toolkit | | [bankr-x402-sdk-dev](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev) | SDK integration | Installation[​](https://docs.bankr.bot/claude-plugins/overview/#installation "Direct link to Installation") ------------------------------------------------------------------------------------------------------------ ### Claude Code CLI[​](https://docs.bankr.bot/claude-plugins/overview/#claude-code-cli "Direct link to Claude Code CLI") 1. Add the marketplace: claude plugin marketplace add BankrBot/claude-plugins 2. Install the plugin you need: # For trading capabilitiesclaude plugin install bankr-agent# For development toolkitclaude plugin install bankr-agent-dev# For SDK integrationclaude plugin install bankr-x402-sdk-dev ### Other Tools (Cursor, OpenCode, etc.)[​](https://docs.bankr.bot/claude-plugins/overview/#other-tools-cursor-opencode-etc "Direct link to Other Tools (Cursor, OpenCode, etc.)") Use the skills installation method: bunx skills add BankrBot/claude-plugins Requirements[​](https://docs.bankr.bot/claude-plugins/overview/#requirements "Direct link to Requirements") ------------------------------------------------------------------------------------------------------------ * Claude Code CLI or compatible tool * Node.js 20+ * USDC on Base (only for `bankr-x402-sdk-dev` plugin) Quick Start[​](https://docs.bankr.bot/claude-plugins/overview/#quick-start "Direct link to Quick Start") --------------------------------------------------------------------------------------------------------- After installing `bankr-agent`: "what is the price of ETH?""buy $10 of BNKR on base""what are the odds the eagles win?" Use Cases[​](https://docs.bankr.bot/claude-plugins/overview/#use-cases "Direct link to Use Cases") --------------------------------------------------------------------------------------------------- ### Traders & Investors[​](https://docs.bankr.bot/claude-plugins/overview/#traders--investors "Direct link to Traders & Investors") Install `bankr-agent` for: * Real-time price queries * Token swaps across chains * Polymarket predictions * Portfolio management ### Developers[​](https://docs.bankr.bot/claude-plugins/overview/#developers "Direct link to Developers") Install `bankr-agent-dev` for: * Project scaffolding * API documentation access * TypeScript interfaces * Code generation ### SDK Users[​](https://docs.bankr.bot/claude-plugins/overview/#sdk-users "Direct link to SDK Users") Install `bankr-x402-sdk-dev` for: * SDK integration help * x402 payment implementation * Transaction handling patterns Choosing a Plugin[​](https://docs.bankr.bot/claude-plugins/overview/#choosing-a-plugin "Direct link to Choosing a Plugin") --------------------------------------------------------------------------------------------------------------------------- | If you want to... | Install | | --- | --- | | Trade tokens | bankr-agent | | Check prices | bankr-agent | | Bet on Polymarket | bankr-agent | | Build a trading bot | bankr-agent-dev | | Integrate the SDK | bankr-x402-sdk-dev | | Build web3 apps | bankr-x402-sdk-dev | * [Available Plugins](https://docs.bankr.bot/claude-plugins/overview/#available-plugins) * [Installation](https://docs.bankr.bot/claude-plugins/overview/#installation) * [Claude Code CLI](https://docs.bankr.bot/claude-plugins/overview/#claude-code-cli) * [Other Tools (Cursor, OpenCode, etc.)](https://docs.bankr.bot/claude-plugins/overview/#other-tools-cursor-opencode-etc) * [Requirements](https://docs.bankr.bot/claude-plugins/overview/#requirements) * [Quick Start](https://docs.bankr.bot/claude-plugins/overview/#quick-start) * [Use Cases](https://docs.bankr.bot/claude-plugins/overview/#use-cases) * [Traders & Investors](https://docs.bankr.bot/claude-plugins/overview/#traders--investors) * [Developers](https://docs.bankr.bot/claude-plugins/overview/#developers) * [SDK Users](https://docs.bankr.bot/claude-plugins/overview/#sdk-users) * [Choosing a Plugin](https://docs.bankr.bot/claude-plugins/overview/#choosing-a-plugin) --- # Leveraged Trading | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/leveraged-trading/#__docusaurus_skipToContent_fallback) On this page Trade commodities, forex, and crypto with leverage via Avantis on Base. Overview[​](https://docs.bankr.bot/features/leveraged-trading/#overview "Direct link to Overview") --------------------------------------------------------------------------------------------------- Avantis is a decentralized perpetuals protocol on Base. Through Bankr, you can: * Trade up to 150x leverage * Go long or short * Trade commodities (Gold, Silver, Oil) * Trade forex pairs * Trade crypto pairs Supported Assets[​](https://docs.bankr.bot/features/leveraged-trading/#supported-assets "Direct link to Supported Assets") --------------------------------------------------------------------------------------------------------------------------- | Category | Assets | | --- | --- | | Commodities | GOLD (XAU), SILVER (XAG), OIL | | Crypto | BTC/USD, ETH/USD, SOL/USD, and more | | Forex | EUR/USD, GBP/USD, and more | Opening Positions[​](https://docs.bankr.bot/features/leveraged-trading/#opening-positions "Direct link to Opening Positions") ------------------------------------------------------------------------------------------------------------------------------ ### Long (Buy)[​](https://docs.bankr.bot/features/leveraged-trading/#long-buy "Direct link to Long (Buy)") Profit when price goes up: "buy $10 of GOLD""long BTC/USD with 5x leverage""buy $50 of ETH/USD with 10x leverage" ### Short (Sell)[​](https://docs.bankr.bot/features/leveraged-trading/#short-sell "Direct link to Short (Sell)") Profit when price goes down: "short $25 of ETH/USD""sell $10 of GOLD with 5x leverage""short BTC/USD with 10x leverage" Leverage[​](https://docs.bankr.bot/features/leveraged-trading/#leverage "Direct link to Leverage") --------------------------------------------------------------------------------------------------- Specify leverage (1x to 150x): "buy $50 of BTC/USD with 10x leverage""long GOLD with 20x""short ETH at 50x leverage" Higher leverage = higher risk. Use cautiously. Risk Management[​](https://docs.bankr.bot/features/leveraged-trading/#risk-management "Direct link to Risk Management") ------------------------------------------------------------------------------------------------------------------------ ### Stop Loss[​](https://docs.bankr.bot/features/leveraged-trading/#stop-loss "Direct link to Stop Loss") Automatically close if price moves against you: "buy $50 of BTC/USD with 5% stop loss""long ETH with 10x leverage and 5% stop loss" ### Take Profit[​](https://docs.bankr.bot/features/leveraged-trading/#take-profit "Direct link to Take Profit") Automatically close when profit target is hit: "buy $50 of BTC/USD with 200% take profit""long ETH with 100% TP" ### Combined[​](https://docs.bankr.bot/features/leveraged-trading/#combined "Direct link to Combined") "buy $25 BTC/USD with 10x leverage, 5% stop loss, and 200% take profit" Stop Loss / Take Profit Formats[​](https://docs.bankr.bot/features/leveraged-trading/#stop-loss--take-profit-formats "Direct link to Stop Loss / Take Profit Formats") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Percentage (ROE)[​](https://docs.bankr.bot/features/leveraged-trading/#percentage-roe "Direct link to Percentage (ROE)") Based on return on equity: "5% stop loss" # Close if -5% ROE"200% take profit" # Close at +200% ROE ### Absolute Price[​](https://docs.bankr.bot/features/leveraged-trading/#absolute-price "Direct link to Absolute Price") "stop loss at $2500""take profit at $100000" ### Price Delta[​](https://docs.bankr.bot/features/leveraged-trading/#price-delta "Direct link to Price Delta") "stop loss if price drops by $5000""take profit if price increases by $2000" Managing Positions[​](https://docs.bankr.bot/features/leveraged-trading/#managing-positions "Direct link to Managing Positions") --------------------------------------------------------------------------------------------------------------------------------- ### View Positions[​](https://docs.bankr.bot/features/leveraged-trading/#view-positions "Direct link to View Positions") "show my Avantis positions""what positions do I have?" ### Close Positions[​](https://docs.bankr.bot/features/leveraged-trading/#close-positions "Direct link to Close Positions") "close my BTC position""close all my Avantis positions" Examples[​](https://docs.bankr.bot/features/leveraged-trading/#examples "Direct link to Examples") --------------------------------------------------------------------------------------------------- ### Simple Commodity Trade[​](https://docs.bankr.bot/features/leveraged-trading/#simple-commodity-trade "Direct link to Simple Commodity Trade") "buy $10 of GOLD" ### Leveraged Crypto Long[​](https://docs.bankr.bot/features/leveraged-trading/#leveraged-crypto-long "Direct link to Leveraged Crypto Long") "buy $100 of BTC/USD with 10x leverage, 5% stop loss, 200% take profit" ### Short with Protection[​](https://docs.bankr.bot/features/leveraged-trading/#short-with-protection "Direct link to Short with Protection") "short $50 of ETH/USD with 5x leverage and 10% stop loss" Costs[​](https://docs.bankr.bot/features/leveraged-trading/#costs "Direct link to Costs") ------------------------------------------------------------------------------------------ * **Spread**: Small spread on entry * **Funding**: Periodic funding rate (long pays short or vice versa) * **Gas**: Transaction fees on Base Risks[​](https://docs.bankr.bot/features/leveraged-trading/#risks "Direct link to Risks") ------------------------------------------------------------------------------------------ * **Liquidation**: Positions can be liquidated if margin is insufficient * **High leverage = high risk**: 50x leverage means 2% price move = 100% gain/loss * **Funding rates**: Can erode profits on long-held positions Slippage[​](https://docs.bankr.bot/features/leveraged-trading/#slippage "Direct link to Slippage") --------------------------------------------------------------------------------------------------- Default slippage is 0.5%. To adjust: "buy $50 of BTC/USD with 1% slippage" Chain Support[​](https://docs.bankr.bot/features/leveraged-trading/#chain-support "Direct link to Chain Support") ------------------------------------------------------------------------------------------------------------------ Avantis trading is only available on **Base**. * [Overview](https://docs.bankr.bot/features/leveraged-trading/#overview) * [Supported Assets](https://docs.bankr.bot/features/leveraged-trading/#supported-assets) * [Opening Positions](https://docs.bankr.bot/features/leveraged-trading/#opening-positions) * [Long (Buy)](https://docs.bankr.bot/features/leveraged-trading/#long-buy) * [Short (Sell)](https://docs.bankr.bot/features/leveraged-trading/#short-sell) * [Leverage](https://docs.bankr.bot/features/leveraged-trading/#leverage) * [Risk Management](https://docs.bankr.bot/features/leveraged-trading/#risk-management) * [Stop Loss](https://docs.bankr.bot/features/leveraged-trading/#stop-loss) * [Take Profit](https://docs.bankr.bot/features/leveraged-trading/#take-profit) * [Combined](https://docs.bankr.bot/features/leveraged-trading/#combined) * [Stop Loss / Take Profit Formats](https://docs.bankr.bot/features/leveraged-trading/#stop-loss--take-profit-formats) * [Percentage (ROE)](https://docs.bankr.bot/features/leveraged-trading/#percentage-roe) * [Absolute Price](https://docs.bankr.bot/features/leveraged-trading/#absolute-price) * [Price Delta](https://docs.bankr.bot/features/leveraged-trading/#price-delta) * [Managing Positions](https://docs.bankr.bot/features/leveraged-trading/#managing-positions) * [View Positions](https://docs.bankr.bot/features/leveraged-trading/#view-positions) * [Close Positions](https://docs.bankr.bot/features/leveraged-trading/#close-positions) * [Examples](https://docs.bankr.bot/features/leveraged-trading/#examples) * [Simple Commodity Trade](https://docs.bankr.bot/features/leveraged-trading/#simple-commodity-trade) * [Leveraged Crypto Long](https://docs.bankr.bot/features/leveraged-trading/#leveraged-crypto-long) * [Short with Protection](https://docs.bankr.bot/features/leveraged-trading/#short-with-protection) * [Costs](https://docs.bankr.bot/features/leveraged-trading/#costs) * [Risks](https://docs.bankr.bot/features/leveraged-trading/#risks) * [Slippage](https://docs.bankr.bot/features/leveraged-trading/#slippage) * [Chain Support](https://docs.bankr.bot/features/leveraged-trading/#chain-support) --- # Token Swaps | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/trading/swaps/#__docusaurus_skipToContent_fallback) On this page Swap tokens across all supported chains using natural language. Basic Swaps[​](https://docs.bankr.bot/features/trading/swaps/#basic-swaps "Direct link to Basic Swaps") -------------------------------------------------------------------------------------------------------- ### By USD Value[​](https://docs.bankr.bot/features/trading/swaps/#by-usd-value "Direct link to By USD Value") "swap $50 of ETH to USDC""buy $10 of BNKR""sell $25 worth of DEGEN" ### By Token Amount[​](https://docs.bankr.bot/features/trading/swaps/#by-token-amount "Direct link to By Token Amount") "swap 0.1 ETH to USDC""swap 100 USDC to BNKR""buy 1000 BONK" ### By Percentage[​](https://docs.bankr.bot/features/trading/swaps/#by-percentage "Direct link to By Percentage") "swap 50% of my USDC to ETH""sell half my BNKR""sell all my DEGEN" Chain-Specific Swaps[​](https://docs.bankr.bot/features/trading/swaps/#chain-specific-swaps "Direct link to Chain-Specific Swaps") ----------------------------------------------------------------------------------------------------------------------------------- Specify the chain when needed: "swap $10 of ETH to USDC on base""buy $5 of BONK on solana""swap 100 MATIC to USDC on polygon" If no chain is specified, Bankr will: 1. Check your balances 2. Use the chain where you have the input token 3. Default to Base for EVM tokens Buying Tokens[​](https://docs.bankr.bot/features/trading/swaps/#buying-tokens "Direct link to Buying Tokens") -------------------------------------------------------------------------------------------------------------- The simplest way to buy: "buy $10 of BNKR""buy $50 of DEGEN on base""buy $5 of WIF on solana" Bankr automatically: * Uses your available stablecoins or ETH/SOL * Routes through the best DEX * Handles approvals if needed Selling Tokens[​](https://docs.bankr.bot/features/trading/swaps/#selling-tokens "Direct link to Selling Tokens") ----------------------------------------------------------------------------------------------------------------- "sell my BNKR for ETH""sell 50% of my DEGEN""sell all my BONK for SOL" Slippage[​](https://docs.bankr.bot/features/trading/swaps/#slippage "Direct link to Slippage") ----------------------------------------------------------------------------------------------- Default slippage is set automatically based on token liquidity. To specify: "swap 1 ETH to USDC with 1% slippage" Multi-Swap[​](https://docs.bankr.bot/features/trading/swaps/#multi-swap "Direct link to Multi-Swap") ----------------------------------------------------------------------------------------------------- Execute multiple swaps in one command (EVM only): "swap 10 USDC to BNKR and 5 USDC to DEGEN" Cross-Chain Swaps[​](https://docs.bankr.bot/features/trading/swaps/#cross-chain-swaps "Direct link to Cross-Chain Swaps") -------------------------------------------------------------------------------------------------------------------------- Bridge and swap between EVM chains: "swap $50 USDC from polygon to ETH on base" This uses bridge aggregators to find the best route. Send to Recipient[​](https://docs.bankr.bot/features/trading/swaps/#send-to-recipient "Direct link to Send to Recipient") -------------------------------------------------------------------------------------------------------------------------- Swap and send to another address: "buy $5 of DEGEN and send to @username""swap $10 ETH to USDC and send to 0x1234..." Supported DEXs[​](https://docs.bankr.bot/features/trading/swaps/#supported-dexs "Direct link to Supported DEXs") ----------------------------------------------------------------------------------------------------------------- | Chain | DEXs | | --- | --- | | Base | Uniswap V2/V3/V4, Aerodrome | | Ethereum | Uniswap V2/V3/V4 | | Polygon | Uniswap V2/V3/V4 | | Unichain | Uniswap V2/V3/V4 | | Solana | Jupiter Aggregator | Common Issues[​](https://docs.bankr.bot/features/trading/swaps/#common-issues "Direct link to Common Issues") -------------------------------------------------------------------------------------------------------------- ### "Insufficient balance"[​](https://docs.bankr.bot/features/trading/swaps/#insufficient-balance "Direct link to "Insufficient balance"") You don't have enough of the input token. Check your balances: "what are my balances?" ### "Token not found"[​](https://docs.bankr.bot/features/trading/swaps/#token-not-found "Direct link to "Token not found"") The token might not exist on the specified chain or have low liquidity. Try: "search for TOKENNAME on base" ### "Slippage too high"[​](https://docs.bankr.bot/features/trading/swaps/#slippage-too-high "Direct link to "Slippage too high"") The token has low liquidity. Either: * Use a smaller amount * Specify higher slippage tolerance * Check if it's the right token * [Basic Swaps](https://docs.bankr.bot/features/trading/swaps/#basic-swaps) * [By USD Value](https://docs.bankr.bot/features/trading/swaps/#by-usd-value) * [By Token Amount](https://docs.bankr.bot/features/trading/swaps/#by-token-amount) * [By Percentage](https://docs.bankr.bot/features/trading/swaps/#by-percentage) * [Chain-Specific Swaps](https://docs.bankr.bot/features/trading/swaps/#chain-specific-swaps) * [Buying Tokens](https://docs.bankr.bot/features/trading/swaps/#buying-tokens) * [Selling Tokens](https://docs.bankr.bot/features/trading/swaps/#selling-tokens) * [Slippage](https://docs.bankr.bot/features/trading/swaps/#slippage) * [Multi-Swap](https://docs.bankr.bot/features/trading/swaps/#multi-swap) * [Cross-Chain Swaps](https://docs.bankr.bot/features/trading/swaps/#cross-chain-swaps) * [Send to Recipient](https://docs.bankr.bot/features/trading/swaps/#send-to-recipient) * [Supported DEXs](https://docs.bankr.bot/features/trading/swaps/#supported-dexs) * [Common Issues](https://docs.bankr.bot/features/trading/swaps/#common-issues) * ["Insufficient balance"](https://docs.bankr.bot/features/trading/swaps/#insufficient-balance) * ["Token not found"](https://docs.bankr.bot/features/trading/swaps/#token-not-found) * ["Slippage too high"](https://docs.bankr.bot/features/trading/swaps/#slippage-too-high) --- # Transfers | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/transfers#__docusaurus_skipToContent_fallback) On this page Send tokens and native currency to any address. Sending Native Tokens[​](https://docs.bankr.bot/features/transfers#sending-native-tokens "Direct link to Sending Native Tokens") --------------------------------------------------------------------------------------------------------------------------------- ### ETH[​](https://docs.bankr.bot/features/transfers#eth "Direct link to ETH") "send 0.1 ETH to 0x1234...""send $50 of ETH to vitalik.eth" ### SOL[​](https://docs.bankr.bot/features/transfers#sol "Direct link to SOL") "send 1 SOL to ABC123...""send $25 of SOL to my friend" ### POL[​](https://docs.bankr.bot/features/transfers#pol "Direct link to POL") "send 10 POL to 0x1234..." Sending ERC-20/SPL Tokens[​](https://docs.bankr.bot/features/transfers#sending-erc-20spl-tokens "Direct link to Sending ERC-20/SPL Tokens") -------------------------------------------------------------------------------------------------------------------------------------------- "send 100 USDC to 0x1234...""send $50 of BNKR to 0xABC...""send 1000 BONK to ABC123..." Recipient Formats[​](https://docs.bankr.bot/features/transfers#recipient-formats "Direct link to Recipient Formats") --------------------------------------------------------------------------------------------------------------------- ### Address[​](https://docs.bankr.bot/features/transfers#address "Direct link to Address") "send 100 USDC to 0x742d35Cc6634C0532925a3b844Bc9e7595f..." ### ENS Name[​](https://docs.bankr.bot/features/transfers#ens-name "Direct link to ENS Name") "send 0.1 ETH to vitalik.eth""send 50 USDC to myname.eth" ### Social Handle[​](https://docs.bankr.bot/features/transfers#social-handle "Direct link to Social Handle") "send $5 of DEGEN to @username""send 100 BNKR to @twitterhandle" Bankr looks up the linked wallet for the social account. ### Farcaster[​](https://docs.bankr.bot/features/transfers#farcaster "Direct link to Farcaster") "send 10 DEGEN to @farcasteruser" Amount Formats[​](https://docs.bankr.bot/features/transfers#amount-formats "Direct link to Amount Formats") ------------------------------------------------------------------------------------------------------------ ### Exact Amount[​](https://docs.bankr.bot/features/transfers#exact-amount "Direct link to Exact Amount") "send 100 USDC""send 0.5 ETH" ### USD Value[​](https://docs.bankr.bot/features/transfers#usd-value "Direct link to USD Value") "send $50 of ETH""send $100 worth of USDC" ### All[​](https://docs.bankr.bot/features/transfers#all "Direct link to All") "send all my USDC to 0x1234..." Chain-Specific Transfers[​](https://docs.bankr.bot/features/transfers#chain-specific-transfers "Direct link to Chain-Specific Transfers") ------------------------------------------------------------------------------------------------------------------------------------------ Specify the chain when needed: "send 100 USDC on base to 0x1234...""send 50 USDC on polygon to 0xABC..." Swap and Send[​](https://docs.bankr.bot/features/transfers#swap-and-send "Direct link to Swap and Send") --------------------------------------------------------------------------------------------------------- Buy tokens and send in one command: "buy $5 of DEGEN and send to @username""swap $10 ETH to USDC and send to 0x1234..." Verifying Recipients[​](https://docs.bankr.bot/features/transfers#verifying-recipients "Direct link to Verifying Recipients") ------------------------------------------------------------------------------------------------------------------------------ Before large transfers, verify the address: "look up 0x1234...""who owns vitalik.eth?" Transaction Confirmation[​](https://docs.bankr.bot/features/transfers#transaction-confirmation "Direct link to Transaction Confirmation") ------------------------------------------------------------------------------------------------------------------------------------------ Bankr will show: * Token and amount * Recipient address * Estimated gas * Chain Before executing. Review carefully. Common Issues[​](https://docs.bankr.bot/features/transfers#common-issues "Direct link to Common Issues") --------------------------------------------------------------------------------------------------------- ### "Insufficient balance"[​](https://docs.bankr.bot/features/transfers#insufficient-balance "Direct link to "Insufficient balance"") Check your balance: "how much USDC do I have?" ### "Invalid address"[​](https://docs.bankr.bot/features/transfers#invalid-address "Direct link to "Invalid address"") * ENS names resolve on Ethereum * Solana addresses are different format * Double-check for typos ### "Address not found"[​](https://docs.bankr.bot/features/transfers#address-not-found "Direct link to "Address not found"") The social handle may not have a linked wallet: "does @username have a Bankr wallet?" Tips[​](https://docs.bankr.bot/features/transfers#tips "Direct link to Tips") ------------------------------------------------------------------------------ ### Double-Check Everything[​](https://docs.bankr.bot/features/transfers#double-check-everything "Direct link to Double-Check Everything") Transfers are irreversible. Verify: * Correct recipient address * Correct amount * Correct chain ### Use ENS for Readability[​](https://docs.bankr.bot/features/transfers#use-ens-for-readability "Direct link to Use ENS for Readability") For frequent recipients, use ENS names when available. ### Small Test First[​](https://docs.bankr.bot/features/transfers#small-test-first "Direct link to Small Test First") For new recipients, send a small amount first: "send $1 of USDC to 0x1234..." Then the full amount after confirming receipt. * [Sending Native Tokens](https://docs.bankr.bot/features/transfers#sending-native-tokens) * [ETH](https://docs.bankr.bot/features/transfers#eth) * [SOL](https://docs.bankr.bot/features/transfers#sol) * [POL](https://docs.bankr.bot/features/transfers#pol) * [Sending ERC-20/SPL Tokens](https://docs.bankr.bot/features/transfers#sending-erc-20spl-tokens) * [Recipient Formats](https://docs.bankr.bot/features/transfers#recipient-formats) * [Address](https://docs.bankr.bot/features/transfers#address) * [ENS Name](https://docs.bankr.bot/features/transfers#ens-name) * [Social Handle](https://docs.bankr.bot/features/transfers#social-handle) * [Farcaster](https://docs.bankr.bot/features/transfers#farcaster) * [Amount Formats](https://docs.bankr.bot/features/transfers#amount-formats) * [Exact Amount](https://docs.bankr.bot/features/transfers#exact-amount) * [USD Value](https://docs.bankr.bot/features/transfers#usd-value) * [All](https://docs.bankr.bot/features/transfers#all) * [Chain-Specific Transfers](https://docs.bankr.bot/features/transfers#chain-specific-transfers) * [Swap and Send](https://docs.bankr.bot/features/transfers#swap-and-send) * [Verifying Recipients](https://docs.bankr.bot/features/transfers#verifying-recipients) * [Transaction Confirmation](https://docs.bankr.bot/features/transfers#transaction-confirmation) * [Common Issues](https://docs.bankr.bot/features/transfers#common-issues) * ["Insufficient balance"](https://docs.bankr.bot/features/transfers#insufficient-balance) * ["Invalid address"](https://docs.bankr.bot/features/transfers#invalid-address) * ["Address not found"](https://docs.bankr.bot/features/transfers#address-not-found) * [Tips](https://docs.bankr.bot/features/transfers#tips) * [Double-Check Everything](https://docs.bankr.bot/features/transfers#double-check-everything) * [Use ENS for Readability](https://docs.bankr.bot/features/transfers#use-ens-for-readability) * [Small Test First](https://docs.bankr.bot/features/transfers#small-test-first) --- # NFTs | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/nfts#__docusaurus_skipToContent_fallback) On this page Buy, sell, mint, and transfer NFTs across EVM chains. Supported Chains[​](https://docs.bankr.bot/features/nfts#supported-chains "Direct link to Supported Chains") ------------------------------------------------------------------------------------------------------------- NFT operations are available on: * Base * Ethereum * Polygon * Unichain Not available on Solana. Viewing NFTs[​](https://docs.bankr.bot/features/nfts#viewing-nfts "Direct link to Viewing NFTs") ------------------------------------------------------------------------------------------------- ### Your Collection[​](https://docs.bankr.bot/features/nfts#your-collection "Direct link to Your Collection") "show my NFTs""what NFTs do I own?""my NFTs on base" ### Collection Info[​](https://docs.bankr.bot/features/nfts#collection-info "Direct link to Collection Info") "show the floor price for Nouns""trending NFT collections""top NFTs on base" Buying NFTs[​](https://docs.bankr.bot/features/nfts#buying-nfts "Direct link to Buying NFTs") ---------------------------------------------------------------------------------------------- ### From OpenSea[​](https://docs.bankr.bot/features/nfts#from-opensea "Direct link to From OpenSea") "buy this NFT: [opensea link]""buy the cheapest Noun""buy floor Pudgy Penguin" ### By Collection[​](https://docs.bankr.bot/features/nfts#by-collection "Direct link to By Collection") "buy the cheapest NFT from Nouns""show me listings for Based Punks under 0.1 ETH" Selling NFTs[​](https://docs.bankr.bot/features/nfts#selling-nfts "Direct link to Selling NFTs") ------------------------------------------------------------------------------------------------- ### List for Sale[​](https://docs.bankr.bot/features/nfts#list-for-sale "Direct link to List for Sale") "list my Noun #123 for 50 ETH""sell my NFT for 0.5 ETH" ### Cancel Listing[​](https://docs.bankr.bot/features/nfts#cancel-listing "Direct link to Cancel Listing") "cancel my NFT listing""remove my Noun from sale" ### Accept Offers[​](https://docs.bankr.bot/features/nfts#accept-offers "Direct link to Accept Offers") "what offers do I have on my NFTs?""accept the best offer on my Noun" Minting NFTs[​](https://docs.bankr.bot/features/nfts#minting-nfts "Direct link to Minting NFTs") ------------------------------------------------------------------------------------------------- ### Manifold[​](https://docs.bankr.bot/features/nfts#manifold "Direct link to Manifold") "mint from [manifold link]""mint this NFT: https://app.manifold.xyz/..." ### SeaDrop[​](https://docs.bankr.bot/features/nfts#seadrop "Direct link to SeaDrop") "mint from [seadrop link]" ### Featured Mints[​](https://docs.bankr.bot/features/nfts#featured-mints "Direct link to Featured Mints") "what's minting today?""show featured NFT mints" Transferring NFTs[​](https://docs.bankr.bot/features/nfts#transferring-nfts "Direct link to Transferring NFTs") ---------------------------------------------------------------------------------------------------------------- "send my Noun #123 to 0x1234...""transfer my NFT to vitalik.eth""send this NFT to @username" Searching Collections[​](https://docs.bankr.bot/features/nfts#searching-collections "Direct link to Searching Collections") ---------------------------------------------------------------------------------------------------------------------------- "search for Pudgy Penguins""find NFT collection: Based Punks" Examples[​](https://docs.bankr.bot/features/nfts#examples "Direct link to Examples") ------------------------------------------------------------------------------------- ### Buy a Specific NFT[​](https://docs.bankr.bot/features/nfts#buy-a-specific-nft "Direct link to Buy a Specific NFT") "buy https://opensea.io/assets/base/0x1234.../1" ### Buy Floor[​](https://docs.bankr.bot/features/nfts#buy-floor "Direct link to Buy Floor") "buy the cheapest Noun""buy floor Based Punk" ### List and Sell[​](https://docs.bankr.bot/features/nfts#list-and-sell "Direct link to List and Sell") "list my NFT #42 for 1 ETH on base" ### Check Offers[​](https://docs.bankr.bot/features/nfts#check-offers "Direct link to Check Offers") "show offers on my NFTs""best offer for my Noun?" Pricing[​](https://docs.bankr.bot/features/nfts#pricing "Direct link to Pricing") ---------------------------------------------------------------------------------- * NFTs are priced in ETH (or WETH on Polygon) * Ensure sufficient balance for purchase + gas * OpenSea fees apply on sales Tips[​](https://docs.bankr.bot/features/nfts#tips "Direct link to Tips") ------------------------------------------------------------------------- ### Use Links[​](https://docs.bankr.bot/features/nfts#use-links "Direct link to Use Links") The most reliable way to identify an NFT: "buy this: [opensea link]" ### Check Before Buying[​](https://docs.bankr.bot/features/nfts#check-before-buying "Direct link to Check Before Buying") "show details for [opensea link]" Then: "buy it" ### Verify Transfers[​](https://docs.bankr.bot/features/nfts#verify-transfers "Direct link to Verify Transfers") Always double-check recipient addresses—NFT transfers are irreversible. Limitations[​](https://docs.bankr.bot/features/nfts#limitations "Direct link to Limitations") ---------------------------------------------------------------------------------------------- * Not available on Solana * Some collections may not be indexed * Marketplace fees vary by platform * [Supported Chains](https://docs.bankr.bot/features/nfts#supported-chains) * [Viewing NFTs](https://docs.bankr.bot/features/nfts#viewing-nfts) * [Your Collection](https://docs.bankr.bot/features/nfts#your-collection) * [Collection Info](https://docs.bankr.bot/features/nfts#collection-info) * [Buying NFTs](https://docs.bankr.bot/features/nfts#buying-nfts) * [From OpenSea](https://docs.bankr.bot/features/nfts#from-opensea) * [By Collection](https://docs.bankr.bot/features/nfts#by-collection) * [Selling NFTs](https://docs.bankr.bot/features/nfts#selling-nfts) * [List for Sale](https://docs.bankr.bot/features/nfts#list-for-sale) * [Cancel Listing](https://docs.bankr.bot/features/nfts#cancel-listing) * [Accept Offers](https://docs.bankr.bot/features/nfts#accept-offers) * [Minting NFTs](https://docs.bankr.bot/features/nfts#minting-nfts) * [Manifold](https://docs.bankr.bot/features/nfts#manifold) * [SeaDrop](https://docs.bankr.bot/features/nfts#seadrop) * [Featured Mints](https://docs.bankr.bot/features/nfts#featured-mints) * [Transferring NFTs](https://docs.bankr.bot/features/nfts#transferring-nfts) * [Searching Collections](https://docs.bankr.bot/features/nfts#searching-collections) * [Examples](https://docs.bankr.bot/features/nfts#examples) * [Buy a Specific NFT](https://docs.bankr.bot/features/nfts#buy-a-specific-nft) * [Buy Floor](https://docs.bankr.bot/features/nfts#buy-floor) * [List and Sell](https://docs.bankr.bot/features/nfts#list-and-sell) * [Check Offers](https://docs.bankr.bot/features/nfts#check-offers) * [Pricing](https://docs.bankr.bot/features/nfts#pricing) * [Tips](https://docs.bankr.bot/features/nfts#tips) * [Use Links](https://docs.bankr.bot/features/nfts#use-links) * [Check Before Buying](https://docs.bankr.bot/features/nfts#check-before-buying) * [Verify Transfers](https://docs.bankr.bot/features/nfts#verify-transfers) * [Limitations](https://docs.bankr.bot/features/nfts#limitations) --- # Polymarket | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/polymarket#__docusaurus_skipToContent_fallback) On this page Bet on real-world events through the Polymarket prediction market. Overview[​](https://docs.bankr.bot/features/polymarket#overview "Direct link to Overview") ------------------------------------------------------------------------------------------- Polymarket is a decentralized prediction market on Polygon. Through Bankr, you can: * Search for markets * Check odds * Place bets * View and redeem positions Searching Markets[​](https://docs.bankr.bot/features/polymarket#searching-markets "Direct link to Searching Markets") ---------------------------------------------------------------------------------------------------------------------- Find markets on topics you care about: "what are the odds the eagles win this weekend?""search for bitcoin markets on polymarket""find presidential election markets""show me sports betting markets" Getting Market Details[​](https://docs.bankr.bot/features/polymarket#getting-market-details "Direct link to Getting Market Details") ------------------------------------------------------------------------------------------------------------------------------------- Get specific market information: "details about the trump election market""show odds for eagles vs cowboys""what are the current odds for bitcoin above 100k?" Placing Bets[​](https://docs.bankr.bot/features/polymarket#placing-bets "Direct link to Placing Bets") ------------------------------------------------------------------------------------------------------- ### By Amount[​](https://docs.bankr.bot/features/polymarket#by-amount "Direct link to By Amount") "bet $5 on eagles to win tonight""put $20 on cowboys to win this weekend""bet $10 on trump winning the election" ### By Shares[​](https://docs.bankr.bot/features/polymarket#by-shares "Direct link to By Shares") "buy 100 shares of YES in the bitcoin market""buy 50 NO shares for the fed rate decision" Understanding Outcomes[​](https://docs.bankr.bot/features/polymarket#understanding-outcomes "Direct link to Understanding Outcomes") ------------------------------------------------------------------------------------------------------------------------------------- Markets have outcomes you can bet on: "bet $5 on YES for bitcoin above 100k""bet $10 on NO for trump winning""buy eagles to win" # Bankr maps team to correct outcome Managing Positions[​](https://docs.bankr.bot/features/polymarket#managing-positions "Direct link to Managing Positions") ------------------------------------------------------------------------------------------------------------------------- ### View Positions[​](https://docs.bankr.bot/features/polymarket#view-positions "Direct link to View Positions") "show my Polymarket positions""what bets do I have?" ### Redeem Winnings[​](https://docs.bankr.bot/features/polymarket#redeem-winnings "Direct link to Redeem Winnings") After a market resolves: "redeem my winning polymarket positions""claim my polymarket winnings" Example Flow[​](https://docs.bankr.bot/features/polymarket#example-flow "Direct link to Example Flow") ------------------------------------------------------------------------------------------------------- 1. **Search for a market** "what are the odds the eagles win this weekend?" 2. **Review the odds** Eagles: 65% ($0.65)Cowboys: 35% ($0.35) 3. **Place your bet** "bet $10 on eagles to win" 4. **After the game resolves** "redeem my polymarket positions" Pricing[​](https://docs.bankr.bot/features/polymarket#pricing "Direct link to Pricing") ---------------------------------------------------------------------------------------- Shares are priced $0.00 - $1.00: * $0.65 = 65% implied probability * If you buy at $0.65 and win, you get $1.00 per share * Profit: $0.35 per share (54% return) Market Types[​](https://docs.bankr.bot/features/polymarket#market-types "Direct link to Market Types") ------------------------------------------------------------------------------------------------------- ### Sports[​](https://docs.bankr.bot/features/polymarket#sports "Direct link to Sports") "odds for eagles vs cowboys""super bowl winner odds""NBA finals market" ### Politics[​](https://docs.bankr.bot/features/polymarket#politics "Direct link to Politics") "presidential election odds""who will win the primary?" ### Crypto[​](https://docs.bankr.bot/features/polymarket#crypto "Direct link to Crypto") "bitcoin above 100k by end of year""eth flipping btc odds" ### Current Events[​](https://docs.bankr.bot/features/polymarket#current-events "Direct link to Current Events") "fed rate decision odds""will X happen by Y date" Tips[​](https://docs.bankr.bot/features/polymarket#tips "Direct link to Tips") ------------------------------------------------------------------------------- ### Time-Sensitive Markets[​](https://docs.bankr.bot/features/polymarket#time-sensitive-markets "Direct link to Time-Sensitive Markets") Include timing for sports: "eagles game tonight" # vs"eagles game this weekend" ### Multiple Markets[​](https://docs.bankr.bot/features/polymarket#multiple-markets "Direct link to Multiple Markets") Some events have multiple related markets. Bankr will ask for clarification: "show me all markets for the super bowl" Requirements[​](https://docs.bankr.bot/features/polymarket#requirements "Direct link to Requirements") ------------------------------------------------------------------------------------------------------- * USDC on Polygon * Gas on Polygon (or gas sponsorship) Limitations[​](https://docs.bankr.bot/features/polymarket#limitations "Direct link to Limitations") ---------------------------------------------------------------------------------------------------- * Polymarket is only available on **Polygon** * Some markets may have low liquidity * Markets must be active (not resolved) * [Overview](https://docs.bankr.bot/features/polymarket#overview) * [Searching Markets](https://docs.bankr.bot/features/polymarket#searching-markets) * [Getting Market Details](https://docs.bankr.bot/features/polymarket#getting-market-details) * [Placing Bets](https://docs.bankr.bot/features/polymarket#placing-bets) * [By Amount](https://docs.bankr.bot/features/polymarket#by-amount) * [By Shares](https://docs.bankr.bot/features/polymarket#by-shares) * [Understanding Outcomes](https://docs.bankr.bot/features/polymarket#understanding-outcomes) * [Managing Positions](https://docs.bankr.bot/features/polymarket#managing-positions) * [View Positions](https://docs.bankr.bot/features/polymarket#view-positions) * [Redeem Winnings](https://docs.bankr.bot/features/polymarket#redeem-winnings) * [Example Flow](https://docs.bankr.bot/features/polymarket#example-flow) * [Pricing](https://docs.bankr.bot/features/polymarket#pricing) * [Market Types](https://docs.bankr.bot/features/polymarket#market-types) * [Sports](https://docs.bankr.bot/features/polymarket#sports) * [Politics](https://docs.bankr.bot/features/polymarket#politics) * [Crypto](https://docs.bankr.bot/features/polymarket#crypto) * [Current Events](https://docs.bankr.bot/features/polymarket#current-events) * [Tips](https://docs.bankr.bot/features/polymarket#tips) * [Time-Sensitive Markets](https://docs.bankr.bot/features/polymarket#time-sensitive-markets) * [Multiple Markets](https://docs.bankr.bot/features/polymarket#multiple-markets) * [Requirements](https://docs.bankr.bot/features/polymarket#requirements) * [Limitations](https://docs.bankr.bot/features/polymarket#limitations) --- # API Reference | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/api-reference#__docusaurus_skipToContent_fallback) On this page The LLM Gateway provides two API formats: OpenAI-compatible and Anthropic-compatible. Base URL[​](https://docs.bankr.bot/llm-gateway/api-reference#base-url "Direct link to Base URL") ------------------------------------------------------------------------------------------------- https://llm.bankr.bot Authentication[​](https://docs.bankr.bot/llm-gateway/api-reference#authentication "Direct link to Authentication") ------------------------------------------------------------------------------------------------------------------- All requests require a Bankr API key (`bk_...`) in the `X-API-Key` header or `Authorization: Bearer` token: X-API-Key: bk_YOUR_API_KEY or Authorization: Bearer bk_YOUR_API_KEY Generate API keys at [bankr.bot/api](https://bankr.bot/api) . Access is currently limited to beta testers. * * * OpenAI-Compatible API[​](https://docs.bankr.bot/llm-gateway/api-reference#openai-compatible-api "Direct link to OpenAI-Compatible API") ---------------------------------------------------------------------------------------------------------------------------------------- ### Chat Completions[​](https://docs.bankr.bot/llm-gateway/api-reference#chat-completions "Direct link to Chat Completions") **POST** `/v1/chat/completions` Create a chat completion using OpenAI format. #### Request[​](https://docs.bankr.bot/llm-gateway/api-reference#request "Direct link to Request") curl -X POST https://llm.bankr.bot/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-API-Key: bk_YOUR_API_KEY" \ -d '{ "model": "claude-sonnet-4.5", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} ], "temperature": 0.7, "max_tokens": 1024 }' #### Response[​](https://docs.bankr.bot/llm-gateway/api-reference#response "Direct link to Response") { "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1706123456, "model": "claude-sonnet-4.5", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! How can I help you today?" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 20, "completion_tokens": 10, "total_tokens": 30 }} ### List Models[​](https://docs.bankr.bot/llm-gateway/api-reference#list-models "Direct link to List Models") **GET** `/v1/models` List available models. #### Response[​](https://docs.bankr.bot/llm-gateway/api-reference#response-1 "Direct link to Response") { "object": "list", "data": [ {"id": "gemini-2.5-flash", "object": "model", "owned_by": "google"}, {"id": "gemini-2.5-pro", "object": "model", "owned_by": "google"}, {"id": "gemini-3-flash", "object": "model", "owned_by": "google"}, {"id": "gemini-3-pro", "object": "model", "owned_by": "google"}, {"id": "claude-sonnet-4.5", "object": "model", "owned_by": "anthropic"}, {"id": "claude-opus-4.5", "object": "model", "owned_by": "anthropic"}, {"id": "claude-opus-4.6", "object": "model", "owned_by": "anthropic"}, {"id": "claude-haiku-4.5", "object": "model", "owned_by": "anthropic"}, {"id": "gpt-5.2", "object": "model", "owned_by": "openai"}, {"id": "gpt-5-mini", "object": "model", "owned_by": "openai"}, {"id": "gpt-5-nano", "object": "model", "owned_by": "openai"}, {"id": "gpt-5.2-codex", "object": "model", "owned_by": "openai"}, {"id": "kimi-k2.5", "object": "model", "owned_by": "moonshotai"}, {"id": "qwen3-coder", "object": "model", "owned_by": "qwen"} ]} * * * Anthropic-Compatible API[​](https://docs.bankr.bot/llm-gateway/api-reference#anthropic-compatible-api "Direct link to Anthropic-Compatible API") ------------------------------------------------------------------------------------------------------------------------------------------------- ### Messages[​](https://docs.bankr.bot/llm-gateway/api-reference#messages "Direct link to Messages") **POST** `/v1/messages` Create a message using Anthropic format. Ideal for Claude Code and Anthropic SDK users. #### Request[​](https://docs.bankr.bot/llm-gateway/api-reference#request-1 "Direct link to Request") curl -X POST https://llm.bankr.bot/v1/messages \ -H "Content-Type: application/json" \ -H "X-API-Key: bk_YOUR_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-sonnet-4.5", "max_tokens": 1024, "messages": [ {"role": "user", "content": "Hello!"} ] }' #### Response[​](https://docs.bankr.bot/llm-gateway/api-reference#response-2 "Direct link to Response") { "id": "msg_abc123", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hello! How can I help you today?" } ], "model": "claude-sonnet-4.5", "stop_reason": "end_turn", "usage": { "input_tokens": 10, "output_tokens": 12 }} * * * Health Check[​](https://docs.bankr.bot/llm-gateway/api-reference#health-check "Direct link to Health Check") ------------------------------------------------------------------------------------------------------------- **GET** `/health` Check gateway and provider health. No authentication required. #### Response[​](https://docs.bankr.bot/llm-gateway/api-reference#response-3 "Direct link to Response") { "status": "ok", "providers": { "vertexGemini": true, "vertexClaude": true, "openrouter": true }} Status codes: * `200` — At least one provider healthy * `503` — All providers unavailable * * * Error Responses[​](https://docs.bankr.bot/llm-gateway/api-reference#error-responses "Direct link to Error Responses") ---------------------------------------------------------------------------------------------------------------------- ### 401 Unauthorized[​](https://docs.bankr.bot/llm-gateway/api-reference#401-unauthorized "Direct link to 401 Unauthorized") { "error": { "message": "Unauthorized", "type": "auth_error" }} ### 429 Rate Limited[​](https://docs.bankr.bot/llm-gateway/api-reference#429-rate-limited "Direct link to 429 Rate Limited") { "error": { "message": "Too many requests, please try again later.", "type": "rate_limit_error" }} ### 500 Server Error[​](https://docs.bankr.bot/llm-gateway/api-reference#500-server-error "Direct link to 500 Server Error") { "error": { "message": "Internal server error", "type": "server_error" }} * * * Usage[​](https://docs.bankr.bot/llm-gateway/api-reference#usage "Direct link to Usage") ---------------------------------------------------------------------------------------- ### Get Usage Summary[​](https://docs.bankr.bot/llm-gateway/api-reference#get-usage-summary "Direct link to Get Usage Summary") **GET** `/v1/usage?days=30` Returns aggregated token usage and cost breakdown for the authenticated API key. Requires authentication. #### Query Parameters[​](https://docs.bankr.bot/llm-gateway/api-reference#query-parameters "Direct link to Query Parameters") | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `days` | number | 30 | Number of days to aggregate (1–90) | #### Response[​](https://docs.bankr.bot/llm-gateway/api-reference#response-4 "Direct link to Response") { "object": "usage_summary", "days": 30, "startDate": "2026-01-07T00:00:00.000Z", "endDate": "2026-02-06T00:00:00.000Z", "totalRequests": 142, "totalInputTokens": 58320, "totalOutputTokens": 24100, "totalCost": 1.23, "byModel": [ { "model": "claude-sonnet-4.5", "requests": 80, "inputTokens": 32000, "outputTokens": 14000, "totalCost": 0.72 } ]} * * * Streaming[​](https://docs.bankr.bot/llm-gateway/api-reference#streaming "Direct link to Streaming") ---------------------------------------------------------------------------------------------------- Both endpoints support streaming responses: curl -X POST https://llm.bankr.bot/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-API-Key: bk_YOUR_API_KEY" \ -d '{ "model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello!"}], "stream": true }' Streaming uses Server-Sent Events (SSE) format. * [Base URL](https://docs.bankr.bot/llm-gateway/api-reference#base-url) * [Authentication](https://docs.bankr.bot/llm-gateway/api-reference#authentication) * [OpenAI-Compatible API](https://docs.bankr.bot/llm-gateway/api-reference#openai-compatible-api) * [Chat Completions](https://docs.bankr.bot/llm-gateway/api-reference#chat-completions) * [List Models](https://docs.bankr.bot/llm-gateway/api-reference#list-models) * [Anthropic-Compatible API](https://docs.bankr.bot/llm-gateway/api-reference#anthropic-compatible-api) * [Messages](https://docs.bankr.bot/llm-gateway/api-reference#messages) * [Health Check](https://docs.bankr.bot/llm-gateway/api-reference#health-check) * [Error Responses](https://docs.bankr.bot/llm-gateway/api-reference#error-responses) * [401 Unauthorized](https://docs.bankr.bot/llm-gateway/api-reference#401-unauthorized) * [429 Rate Limited](https://docs.bankr.bot/llm-gateway/api-reference#429-rate-limited) * [500 Server Error](https://docs.bankr.bot/llm-gateway/api-reference#500-server-error) * [Usage](https://docs.bankr.bot/llm-gateway/api-reference#usage) * [Get Usage Summary](https://docs.bankr.bot/llm-gateway/api-reference#get-usage-summary) * [Streaming](https://docs.bankr.bot/llm-gateway/api-reference#streaming) --- # LLM Gateway | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/overview#__docusaurus_skipToContent_fallback) On this page **A unified interface for LLMs — pay with your launch fees or wallet balance.** Access Claude, Gemini, and GPT models through a single API. Every request is tracked, and you can fund usage directly from your token launch fees or authorize payments in ETH, USDC, or BANKR. Why Bankr LLM Gateway?[​](https://docs.bankr.bot/llm-gateway/overview#why-bankr-llm-gateway "Direct link to Why Bankr LLM Gateway?") ------------------------------------------------------------------------------------------------------------------------------------- | Feature | Benefit | | --- | --- | | **Cost Tracking** | Full visibility into token usage and costs per request | | **Launch Fee Funding** | Automatically allocate a portion of your token launch fees to AI | | **Flexible Payments** | Pay with ETH, USDC, or BANKR — your choice | | **Multi-Provider** | Access models from Anthropic, Google, OpenAI, Moonshot AI, and Alibaba | | **High Availability** | Automatic failover ensures your agents stay online | | **SDK Compatible** | Works with OpenAI and Anthropic SDKs — no code changes | Supported Models[​](https://docs.bankr.bot/llm-gateway/overview#supported-models "Direct link to Supported Models") -------------------------------------------------------------------------------------------------------------------- ### Claude (Anthropic)[​](https://docs.bankr.bot/llm-gateway/overview#claude-anthropic "Direct link to Claude (Anthropic)") | Model | Context | Input | Best For | | --- | --- | --- | --- | | `claude-opus-4.6` | 200K | text, image | Most capable, advanced reasoning | | `claude-opus-4.5` | 200K | text, image | Complex reasoning, analysis | | `claude-sonnet-4.5` | 200K | text, image | Balanced speed and quality | | `claude-haiku-4.5` | 200K | text, image | Fast, cost-effective | ### Gemini (Google)[​](https://docs.bankr.bot/llm-gateway/overview#gemini-google "Direct link to Gemini (Google)") | Model | Context | Input | Best For | | --- | --- | --- | --- | | `gemini-2.5-pro` | 1M | text, image | Long context, multimodal | | `gemini-2.5-flash` | 1M | text, image | Speed, high throughput | | `gemini-3-pro` | 2M | text, image | Advanced reasoning (preview) | | `gemini-3-flash` | 1M | text, image | Fast, preview models | ### GPT (OpenAI)[​](https://docs.bankr.bot/llm-gateway/overview#gpt-openai "Direct link to GPT (OpenAI)") | Model | Context | Input | Best For | | --- | --- | --- | --- | | `gpt-5.2` | 262K | text | Advanced reasoning | | `gpt-5.2-codex` | 262K | text | Code generation | | `gpt-5-mini` | 128K | text | Fast, economical | | `gpt-5-nano` | 128K | text | Ultra-fast, lowest cost | ### Kimi (Moonshot AI)[​](https://docs.bankr.bot/llm-gateway/overview#kimi-moonshot-ai "Direct link to Kimi (Moonshot AI)") | Model | Context | Input | Best For | | --- | --- | --- | --- | | `kimi-k2.5` | 128K | text | Long-context reasoning | ### Qwen (Alibaba)[​](https://docs.bankr.bot/llm-gateway/overview#qwen-alibaba "Direct link to Qwen (Alibaba)") | Model | Context | Input | Best For | | --- | --- | --- | --- | | `qwen3-coder` | 128K | text | Code generation, debugging | How It Works[​](https://docs.bankr.bot/llm-gateway/overview#how-it-works "Direct link to How It Works") -------------------------------------------------------------------------------------------------------- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐│ OpenClaw │ │ Claude Code │ │ Custom Apps │└──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │ │ │ └────────────────┼────────────────┘ │ ▼ ┌─────────────────┐ │ LLM Gateway │ │ llm.bankr.bot │ └────────┬────────┘ │ ┌──────────────┼──────────────┐ ▼ ▼ ▼ Vertex AI Vertex AI OpenRouter (Gemini) (Claude) (All Models) **Routing Strategy:** * Gemini models → Vertex AI (primary), OpenRouter (fallback) * Claude models → Vertex AI (primary), OpenRouter (fallback) * GPT, Kimi, Qwen models → OpenRouter only Quick Start[​](https://docs.bankr.bot/llm-gateway/overview#quick-start "Direct link to Quick Start") ----------------------------------------------------------------------------------------------------- Get Your API Key **[Get your LLM Gateway API key →](https://bankr.bot/api) ** **Base URL:** https://llm.bankr.bot **Example Request:** curl https://llm.bankr.bot/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-API-Key: bk_YOUR_API_KEY" \ -d '{ "model": "claude-sonnet-4.5", "messages": [{"role": "user", "content": "Hello!"}] }' Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/overview#setup-with-bankr-cli "Direct link to Setup with Bankr CLI") -------------------------------------------------------------------------------------------------------------------------------- The [Bankr CLI](https://docs.bankr.bot/agent-api/cli) can configure your tools automatically: bun install -g @bankr/clibankr loginbankr llm setup openclaw --install # OpenClawbankr llm setup opencode --install # OpenCodebankr llm setup claude # Claude Codebankr llm setup cursor # Cursor If your LLM gateway key differs from your Bankr API key, you can set them separately: bankr login --llm-key YOUR_LLM_KEY# orbankr config set llmKey YOUR_LLM_KEY See [AI Coding Tools](https://docs.bankr.bot/llm-gateway/coding-tools/overview) for full details on each tool. Next Steps[​](https://docs.bankr.bot/llm-gateway/overview#next-steps "Direct link to Next Steps") -------------------------------------------------------------------------------------------------- * [API Reference](https://docs.bankr.bot/llm-gateway/api-reference) — Full endpoint documentation * [OpenClaw](https://docs.bankr.bot/llm-gateway/openclaw) — Configure your OpenClaw agent * [AI Coding Tools](https://docs.bankr.bot/llm-gateway/coding-tools/overview) — Claude Code, Codex, Cursor, OpenCode, and more * [Install the Bankr Skill](https://docs.bankr.bot/openclaw/installation) — Give your OpenClaw agent crypto and DeFi capabilities * [Why Bankr LLM Gateway?](https://docs.bankr.bot/llm-gateway/overview#why-bankr-llm-gateway) * [Supported Models](https://docs.bankr.bot/llm-gateway/overview#supported-models) * [Claude (Anthropic)](https://docs.bankr.bot/llm-gateway/overview#claude-anthropic) * [Gemini (Google)](https://docs.bankr.bot/llm-gateway/overview#gemini-google) * [GPT (OpenAI)](https://docs.bankr.bot/llm-gateway/overview#gpt-openai) * [Kimi (Moonshot AI)](https://docs.bankr.bot/llm-gateway/overview#kimi-moonshot-ai) * [Qwen (Alibaba)](https://docs.bankr.bot/llm-gateway/overview#qwen-alibaba) * [How It Works](https://docs.bankr.bot/llm-gateway/overview#how-it-works) * [Quick Start](https://docs.bankr.bot/llm-gateway/overview#quick-start) * [Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/overview#setup-with-bankr-cli) * [Next Steps](https://docs.bankr.bot/llm-gateway/overview#next-steps) --- # Agent API Overview | Bankr Documentation [Skip to main content](https://docs.bankr.bot/agent-api/overview#__docusaurus_skipToContent_fallback) On this page The Agent API allows you to interact with Bankr's AI agent to execute prompts and transactions on behalf of your wallet. Capabilities[​](https://docs.bankr.bot/agent-api/overview#capabilities "Direct link to Capabilities") ------------------------------------------------------------------------------------------------------ Using the Agent API, you can: * Retrieve your account info (wallets, socials, Bankr Club status) * Submit prompts to the Bankr AI agent for your wallet * Check the status of submitted jobs * Cancel pending or processing jobs * Sign messages and transactions using your custodial wallet (`POST /agent/sign`) * Submit signed transactions on-chain (`POST /agent/submit`) Getting Started[​](https://docs.bankr.bot/agent-api/overview#getting-started "Direct link to Getting Started") --------------------------------------------------------------------------------------------------------------- 1. **Sign up** at [bankr.bot/api](https://bankr.bot/api) 2. **Generate an API key** and enable Agent API access 3. **Fund your account** with the assets you want to trade 4. **Start making requests** using your API key Security Do not share your Bankr API key with anyone or any untrusted app. If you share your API key with agent access enabled, you risk losing all assets in that Bankr account. If you leak your API key, visit [bankr.bot/api](https://bankr.bot/api) and revoke it immediately. Example Applications[​](https://docs.bankr.bot/agent-api/overview#example-applications "Direct link to Example Applications") ------------------------------------------------------------------------------------------------------------------------------ Check out example apps built on the Agent API: [github.com/BankrBot/bankr-api-examples](https://github.com/BankrBot/bankr-api-examples) Base URL[​](https://docs.bankr.bot/agent-api/overview#base-url "Direct link to Base URL") ------------------------------------------------------------------------------------------ https://api.bankr.bot Authentication[​](https://docs.bankr.bot/agent-api/overview#authentication "Direct link to Authentication") ------------------------------------------------------------------------------------------------------------ All endpoints require an API key with Agent API access enabled: X-API-Key: your_api_key_here Basic Flow[​](https://docs.bankr.bot/agent-api/overview#basic-flow "Direct link to Basic Flow") ------------------------------------------------------------------------------------------------ ### 1\. Submit a Prompt[​](https://docs.bankr.bot/agent-api/overview#1-submit-a-prompt "Direct link to 1. Submit a Prompt") POST /agent/prompt { "prompt": "what is the price of ETH?"} **Response (202 Accepted):** { "success": true, "jobId": "abc123", "threadId": "thr_XYZ789", "status": "pending", "message": "Job created successfully"} ### 2\. Poll for Results[​](https://docs.bankr.bot/agent-api/overview#2-poll-for-results "Direct link to 2. Poll for Results") GET /agent/job/{jobId} **Response (200 OK):** { "success": true, "jobId": "abc123", "status": "completed", "prompt": "what is the price of ETH?", "response": "ETH is currently trading at $3,245.67", "createdAt": "2024-01-15T10:30:00Z", "completedAt": "2024-01-15T10:30:03Z", "processingTime": 3000} Job Statuses[​](https://docs.bankr.bot/agent-api/overview#job-statuses "Direct link to Job Statuses") ------------------------------------------------------------------------------------------------------ | Status | Description | | --- | --- | | `pending` | Job is queued for processing | | `processing` | Job is currently being processed | | `completed` | Job finished successfully | | `failed` | Job encountered an error | | `cancelled` | Job was cancelled by user | Recommended Usage[​](https://docs.bankr.bot/agent-api/overview#recommended-usage "Direct link to Recommended Usage") --------------------------------------------------------------------------------------------------------------------- When starting out with the Agent API: 1. **Create a new account** — Sign up for a new Bankr account via email 2. **Generate a fresh API key** — Enable agent access on the key 3. **Start with limited funds** — Only deposit what you're willing to test with 4. **Keep your key secure** — Never share it publicly or with untrusted apps 5. **Explore carefully** — Understand the API before increasing assets Next Steps[​](https://docs.bankr.bot/agent-api/overview#next-steps "Direct link to Next Steps") ------------------------------------------------------------------------------------------------ * [Authentication](https://docs.bankr.bot/agent-api/authentication) — API key setup details * [User Info](https://docs.bankr.bot/agent-api/user-info) — Retrieve your account profile * [Prompt Endpoint](https://docs.bankr.bot/agent-api/prompt-endpoint) — Natural language commands * [Job Management](https://docs.bankr.bot/agent-api/job-management) — Polling, cancellation, status * [Sign Endpoint](https://docs.bankr.bot/agent-api/sign-endpoint) — Sign messages and transactions * [Submit Endpoint](https://docs.bankr.bot/agent-api/submit-endpoint) — Submit raw transactions * [Transaction Types](https://docs.bankr.bot/agent-api/transaction-types) — Supported transaction formats * [CLI](https://docs.bankr.bot/agent-api/cli) — Command-line interface (`@bankr/cli`) * [Capabilities](https://docs.bankr.bot/agent-api/overview#capabilities) * [Getting Started](https://docs.bankr.bot/agent-api/overview#getting-started) * [Example Applications](https://docs.bankr.bot/agent-api/overview#example-applications) * [Base URL](https://docs.bankr.bot/agent-api/overview#base-url) * [Authentication](https://docs.bankr.bot/agent-api/overview#authentication) * [Basic Flow](https://docs.bankr.bot/agent-api/overview#basic-flow) * [1\. Submit a Prompt](https://docs.bankr.bot/agent-api/overview#1-submit-a-prompt) * [2\. Poll for Results](https://docs.bankr.bot/agent-api/overview#2-poll-for-results) * [Job Statuses](https://docs.bankr.bot/agent-api/overview#job-statuses) * [Recommended Usage](https://docs.bankr.bot/agent-api/overview#recommended-usage) * [Next Steps](https://docs.bankr.bot/agent-api/overview#next-steps) --- # OpenClaw | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/openclaw#__docusaurus_skipToContent_fallback) On this page Connect [OpenClaw](https://github.com/openclaw-ai/openclaw) to the Bankr LLM Gateway. Install the Bankr Skill[​](https://docs.bankr.bot/llm-gateway/openclaw#install-the-bankr-skill "Direct link to Install the Bankr Skill") ----------------------------------------------------------------------------------------------------------------------------------------- Install in OpenClaw Tell your OpenClaw agent: > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) The Bankr skill gives your agent crypto trading, portfolio management, and DeFi capabilities — trade tokens, check balances, set automations (DCA, limit orders, stop-losses), query market data, and more. It can also help configure the LLM gateway for you. See [Installing the Bankr Skill](https://docs.bankr.bot/openclaw/installation) for full details and [Available Skills](https://docs.bankr.bot/openclaw/available-skills) for other skills you can add. Quick Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/openclaw#quick-setup-with-bankr-cli "Direct link to Quick Setup with Bankr CLI") -------------------------------------------------------------------------------------------------------------------------------------------------- The fastest way to configure OpenClaw is with the [Bankr CLI](https://docs.bankr.bot/agent-api/cli) : # Auto-install Bankr provider into ~/.openclaw/openclaw.jsonbankr llm setup openclaw --install This writes the full provider config (base URL, API key, all models) into your OpenClaw config. If you're not logged in yet, run `bankr login` first. To preview the config without writing it: bankr llm setup openclaw Manual Configuration[​](https://docs.bankr.bot/llm-gateway/openclaw#manual-configuration "Direct link to Manual Configuration") -------------------------------------------------------------------------------------------------------------------------------- Add the Bankr provider to your `openclaw.json`: { models: { mode: "merge", providers: { bankr: { baseUrl: "https://llm.bankr.bot", apiKey: "${BANKR_LLM_KEY}", api: "openai-completions", models: [ // Gemini { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash", input: ["text","image"], contextWindow: 1048576, maxTokens: 65535 }, { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro", input: ["text","image"], contextWindow: 1048576, maxTokens: 65536 }, { id: "gemini-3-flash", name: "Gemini 3 Flash", input: ["text","image"], contextWindow: 1048576, maxTokens: 65535 }, { id: "gemini-3-pro", name: "Gemini 3 Pro", input: ["text","image"], contextWindow: 1048576, maxTokens: 65536 }, // Claude (api override: uses Anthropic Messages format) { id: "claude-opus-4.6", name: "Claude Opus 4.6", input: ["text","image"], contextWindow: 1000000, maxTokens: 128000, api: "anthropic-messages" }, { id: "claude-opus-4.5", name: "Claude Opus 4.5", input: ["text","image"], contextWindow: 200000, maxTokens: 64000, api: "anthropic-messages" }, { id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5", input: ["text","image"], contextWindow: 1000000, maxTokens: 64000, api: "anthropic-messages" }, { id: "claude-haiku-4.5", name: "Claude Haiku 4.5", input: ["text","image"], contextWindow: 200000, maxTokens: 64000, api: "anthropic-messages" }, // OpenAI { id: "gpt-5.2", name: "GPT-5.2", input: ["text"], contextWindow: 400000, maxTokens: 128000 }, { id: "gpt-5.2-codex", name: "GPT-5.2 Codex", input: ["text"], contextWindow: 400000, maxTokens: 128000 }, { id: "gpt-5-mini", name: "GPT-5 Mini", input: ["text"], contextWindow: 400000, maxTokens: 128000 }, { id: "gpt-5-nano", name: "GPT-5 Nano", input: ["text"], contextWindow: 400000, maxTokens: 128000 }, // Other { id: "kimi-k2.5", name: "Kimi K2.5", input: ["text"], contextWindow: 262144, maxTokens: 65535 }, { id: "qwen3-coder", name: "Qwen3 Coder", input: ["text"], contextWindow: 262144, maxTokens: 65536 } ] } } }} ### Set as Default Model[​](https://docs.bankr.bot/llm-gateway/openclaw#set-as-default-model "Direct link to Set as Default Model") { agents: { defaults: { model: { primary: "bankr/claude-sonnet-4.5" } } }} Per-Model API Format[​](https://docs.bankr.bot/llm-gateway/openclaw#per-model-api-format "Direct link to Per-Model API Format") -------------------------------------------------------------------------------------------------------------------------------- The provider-level `api: "openai-completions"` is the default for all models. Claude models override this with `api: "anthropic-messages"` at the model level, so OpenClaw automatically uses the right API format for each model. This is handled automatically by `bankr llm setup openclaw`. If configuring manually, add `api: "anthropic-messages"` to each Claude model entry (see the manual config above). Model Properties Reference[​](https://docs.bankr.bot/llm-gateway/openclaw#model-properties-reference "Direct link to Model Properties Reference") -------------------------------------------------------------------------------------------------------------------------------------------------- | Property | Description | | --- | --- | | `id` | Model identifier used in requests | | `name` | Display name in OpenClaw UI | | `input` | Supported input types: `["text"]` or `["text", "image"]` | | `contextWindow` | Max input tokens | | `maxTokens` | Max output tokens | Testing[​](https://docs.bankr.bot/llm-gateway/openclaw#testing "Direct link to Testing") ----------------------------------------------------------------------------------------- curl https://llm.bankr.bot/v1/chat/completions \ -H "Content-Type: application/json" \ -H "X-API-Key: $BANKR_LLM_KEY" \ -d '{"model": "gemini-3-flash", "messages": [{"role": "user", "content": "Hello!"}]}' Troubleshooting[​](https://docs.bankr.bot/llm-gateway/openclaw#troubleshooting "Direct link to Troubleshooting") ----------------------------------------------------------------------------------------------------------------- **Model not found**: Ensure the model `id` matches exactly what the gateway expects. **429 Rate Limited**: You've exceeded 60 requests/minute. Wait and retry. * [Install the Bankr Skill](https://docs.bankr.bot/llm-gateway/openclaw#install-the-bankr-skill) * [Quick Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/openclaw#quick-setup-with-bankr-cli) * [Manual Configuration](https://docs.bankr.bot/llm-gateway/openclaw#manual-configuration) * [Set as Default Model](https://docs.bankr.bot/llm-gateway/openclaw#set-as-default-model) * [Per-Model API Format](https://docs.bankr.bot/llm-gateway/openclaw#per-model-api-format) * [Model Properties Reference](https://docs.bankr.bot/llm-gateway/openclaw#model-properties-reference) * [Testing](https://docs.bankr.bot/llm-gateway/openclaw#testing) * [Troubleshooting](https://docs.bankr.bot/llm-gateway/openclaw#troubleshooting) --- # Portfolio & Balances | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/portfolio#__docusaurus_skipToContent_fallback) On this page Track your holdings across all supported chains. Checking Balances[​](https://docs.bankr.bot/features/portfolio#checking-balances "Direct link to Checking Balances") --------------------------------------------------------------------------------------------------------------------- ### All Chains[​](https://docs.bankr.bot/features/portfolio#all-chains "Direct link to All Chains") "what are my balances?""show my portfolio""what do I own?" ### Specific Chain[​](https://docs.bankr.bot/features/portfolio#specific-chain "Direct link to Specific Chain") "my balances on base""show my solana balance""what do I have on polygon?" ### Specific Token[​](https://docs.bankr.bot/features/portfolio#specific-token "Direct link to Specific Token") "how much USDC do I have?""my ETH balance""how many BNKR tokens do I have?" Portfolio Value[​](https://docs.bankr.bot/features/portfolio#portfolio-value "Direct link to Portfolio Value") --------------------------------------------------------------------------------------------------------------- ### Total Value[​](https://docs.bankr.bot/features/portfolio#total-value "Direct link to Total Value") "what's my portfolio worth?""total value of my holdings" ### Breakdown[​](https://docs.bankr.bot/features/portfolio#breakdown "Direct link to Breakdown") "show portfolio breakdown""what percentage is ETH?" Token Prices[​](https://docs.bankr.bot/features/portfolio#token-prices "Direct link to Token Prices") ------------------------------------------------------------------------------------------------------ ### Single Token[​](https://docs.bankr.bot/features/portfolio#single-token "Direct link to Single Token") "price of ETH""what's BTC trading at?""BNKR price" ### Multiple Tokens[​](https://docs.bankr.bot/features/portfolio#multiple-tokens "Direct link to Multiple Tokens") "prices of ETH, SOL, and BTC""compare ETH and BTC prices" ### With Chart[​](https://docs.bankr.bot/features/portfolio#with-chart "Direct link to With Chart") "show ETH price chart""BTC chart for last 24 hours" Market Research[​](https://docs.bankr.bot/features/portfolio#market-research "Direct link to Market Research") --------------------------------------------------------------------------------------------------------------- ### Token Analysis[​](https://docs.bankr.bot/features/portfolio#token-analysis "Direct link to Token Analysis") "analyze BNKR""tell me about this token: 0x1234...""is DEGEN a good buy?" ### Trending[​](https://docs.bankr.bot/features/portfolio#trending "Direct link to Trending") "what's trending on base?""top gainers today""trending tokens on solana" ### Technical Analysis[​](https://docs.bankr.bot/features/portfolio#technical-analysis "Direct link to Technical Analysis") "technical analysis for ETH""analyze BNKR price action" Position Tracking[​](https://docs.bankr.bot/features/portfolio#position-tracking "Direct link to Position Tracking") --------------------------------------------------------------------------------------------------------------------- ### Trading Positions[​](https://docs.bankr.bot/features/portfolio#trading-positions "Direct link to Trading Positions") "show my Avantis positions""what leveraged positions do I have?" ### Polymarket Positions[​](https://docs.bankr.bot/features/portfolio#polymarket-positions "Direct link to Polymarket Positions") "my Polymarket bets""show my prediction market positions" ### Staking[​](https://docs.bankr.bot/features/portfolio#staking "Direct link to Staking") "show my staking positions""how much BANKR do I have staked?" Automations[​](https://docs.bankr.bot/features/portfolio#automations "Direct link to Automations") --------------------------------------------------------------------------------------------------- ### View Active[​](https://docs.bankr.bot/features/portfolio#view-active "Direct link to View Active") "show my automations""what orders do I have pending?""my DCA orders" ### Cancel[​](https://docs.bankr.bot/features/portfolio#cancel "Direct link to Cancel") "cancel my DCA for BNKR""cancel all automations" NFT Holdings[​](https://docs.bankr.bot/features/portfolio#nft-holdings "Direct link to NFT Holdings") ------------------------------------------------------------------------------------------------------ "show my NFTs""what NFTs do I own on base?""value of my NFT collection" P&L Tracking[​](https://docs.bankr.bot/features/portfolio#pl-tracking "Direct link to P&L Tracking") ----------------------------------------------------------------------------------------------------- ### Recent Activity[​](https://docs.bankr.bot/features/portfolio#recent-activity "Direct link to Recent Activity") "show my recent trades""what did I trade today?" ### Performance[​](https://docs.bankr.bot/features/portfolio#performance "Direct link to Performance") "how are my tokens performing?""P&L for my BNKR position" Export[​](https://docs.bankr.bot/features/portfolio#export "Direct link to Export") ------------------------------------------------------------------------------------ For detailed analysis: "export my transaction history""download my trades" Tips[​](https://docs.bankr.bot/features/portfolio#tips "Direct link to Tips") ------------------------------------------------------------------------------ ### Regular Check-ins[​](https://docs.bankr.bot/features/portfolio#regular-check-ins "Direct link to Regular Check-ins") "daily portfolio summary" ### Watch Specific Tokens[​](https://docs.bankr.bot/features/portfolio#watch-specific-tokens "Direct link to Watch Specific Tokens") "alert me when ETH moves 5%" ### Cross-Chain Overview[​](https://docs.bankr.bot/features/portfolio#cross-chain-overview "Direct link to Cross-Chain Overview") Since Bankr tracks all chains, you get a complete picture: "total holdings across all chains" * [Checking Balances](https://docs.bankr.bot/features/portfolio#checking-balances) * [All Chains](https://docs.bankr.bot/features/portfolio#all-chains) * [Specific Chain](https://docs.bankr.bot/features/portfolio#specific-chain) * [Specific Token](https://docs.bankr.bot/features/portfolio#specific-token) * [Portfolio Value](https://docs.bankr.bot/features/portfolio#portfolio-value) * [Total Value](https://docs.bankr.bot/features/portfolio#total-value) * [Breakdown](https://docs.bankr.bot/features/portfolio#breakdown) * [Token Prices](https://docs.bankr.bot/features/portfolio#token-prices) * [Single Token](https://docs.bankr.bot/features/portfolio#single-token) * [Multiple Tokens](https://docs.bankr.bot/features/portfolio#multiple-tokens) * [With Chart](https://docs.bankr.bot/features/portfolio#with-chart) * [Market Research](https://docs.bankr.bot/features/portfolio#market-research) * [Token Analysis](https://docs.bankr.bot/features/portfolio#token-analysis) * [Trending](https://docs.bankr.bot/features/portfolio#trending) * [Technical Analysis](https://docs.bankr.bot/features/portfolio#technical-analysis) * [Position Tracking](https://docs.bankr.bot/features/portfolio#position-tracking) * [Trading Positions](https://docs.bankr.bot/features/portfolio#trading-positions) * [Polymarket Positions](https://docs.bankr.bot/features/portfolio#polymarket-positions) * [Staking](https://docs.bankr.bot/features/portfolio#staking) * [Automations](https://docs.bankr.bot/features/portfolio#automations) * [View Active](https://docs.bankr.bot/features/portfolio#view-active) * [Cancel](https://docs.bankr.bot/features/portfolio#cancel) * [NFT Holdings](https://docs.bankr.bot/features/portfolio#nft-holdings) * [P&L Tracking](https://docs.bankr.bot/features/portfolio#pl-tracking) * [Recent Activity](https://docs.bankr.bot/features/portfolio#recent-activity) * [Performance](https://docs.bankr.bot/features/portfolio#performance) * [Export](https://docs.bankr.bot/features/portfolio#export) * [Tips](https://docs.bankr.bot/features/portfolio#tips) * [Regular Check-ins](https://docs.bankr.bot/features/portfolio#regular-check-ins) * [Watch Specific Tokens](https://docs.bankr.bot/features/portfolio#watch-specific-tokens) * [Cross-Chain Overview](https://docs.bankr.bot/features/portfolio#cross-chain-overview) --- # Zero to Earning Fees | Bankr Documentation [Skip to main content](https://docs.bankr.bot/guides/zero-to-earning#__docusaurus_skipToContent_fallback) On this page A complete walkthrough from no setup to earning trading fees from your deployed token. Overview[​](https://docs.bankr.bot/guides/zero-to-earning#overview "Direct link to Overview") ---------------------------------------------------------------------------------------------- This guide will take you through: 1. Setting up your agent 2. Launching a token 3. Earning trading fees 4. Funding your compute with those fees **Time required:** ~15 minutes Step 1: Connect Your Agent[​](https://docs.bankr.bot/guides/zero-to-earning#step-1-connect-your-agent "Direct link to Step 1: Connect Your Agent") --------------------------------------------------------------------------------------------------------------------------------------------------- Choose your integration method: ### Option A: OpenClaw Skill (Recommended)[​](https://docs.bankr.bot/guides/zero-to-earning#option-a-openclaw-skill-recommended "Direct link to Option A: OpenClaw Skill (Recommended)") Install in OpenClaw Tell your OpenClaw agent: > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) That's it — your agent can now trade, launch tokens, and claim fees. ### Option B: Agent API[​](https://docs.bankr.bot/guides/zero-to-earning#option-b-agent-api "Direct link to Option B: Agent API") Get an API key at [bankr.bot/api](https://bankr.bot/api) and use the REST API: const API_KEY = process.env.BANKR_API_KEY;// Submit a promptconst response = await fetch('https://api.bankr.bot/agent/prompt', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, }, body: JSON.stringify({ prompt: 'deploy a token called MyAgent on base' }),}); Step 2: Check Your Wallet[​](https://docs.bankr.bot/guides/zero-to-earning#step-2-check-your-wallet "Direct link to Step 2: Check Your Wallet") ------------------------------------------------------------------------------------------------------------------------------------------------ Bankr covers gas fees for agent wallets on supported chains, so you can get started without any ETH. Check your balances: "what are my balances on base?" tip Gas is sponsored for most operations. You can start trading and launching tokens immediately. Step 3: Launch Your Token[​](https://docs.bankr.bot/guides/zero-to-earning#step-3-launch-your-token "Direct link to Step 3: Launch Your Token") ------------------------------------------------------------------------------------------------------------------------------------------------ Deploy a token for your agent: "deploy a token called MyAgent with symbol AGENT on base" Bankr will: 1. Create the token contract 2. Set up a liquidity pool 3. Configure fee routing to your wallet You'll receive: * Contract address * Pool URL on DEX * Fee claiming instructions ### Optional: Add Vesting[​](https://docs.bankr.bot/guides/zero-to-earning#optional-add-vesting "Direct link to Optional: Add Vesting") For more credibility, vault some tokens: "deploy a token called MyAgent with 20% vaulted for 30 days on base" Step 4: Promote Your Token[​](https://docs.bankr.bot/guides/zero-to-earning#step-4-promote-your-token "Direct link to Step 4: Promote Your Token") --------------------------------------------------------------------------------------------------------------------------------------------------- ### Social Deployment[​](https://docs.bankr.bot/guides/zero-to-earning#social-deployment "Direct link to Social Deployment") For built-in virality, deploy from X: @bankrbot deploy a token called MyViralAgent on base This creates social proof and discoverability. ### Share the Link[​](https://docs.bankr.bot/guides/zero-to-earning#share-the-link "Direct link to Share the Link") After deployment, share your token: * DEX link for trading * Contract address for verification * Your agent's capabilities Step 5: Earn Trading Fees[​](https://docs.bankr.bot/guides/zero-to-earning#step-5-earn-trading-fees "Direct link to Step 5: Earn Trading Fees") ------------------------------------------------------------------------------------------------------------------------------------------------ As people trade your token, fees accumulate automatically. ### Check Your Fees[​](https://docs.bankr.bot/guides/zero-to-earning#check-your-fees "Direct link to Check Your Fees") "how much fees have I earned?""check fees for MyAgent" ### Claim Your Fees[​](https://docs.bankr.bot/guides/zero-to-earning#claim-your-fees "Direct link to Claim Your Fees") "claim my fees for MyAgent" This transfers: * Your token (from swaps) * WETH (from trading fees) Step 6: Use Your Earnings[​](https://docs.bankr.bot/guides/zero-to-earning#step-6-use-your-earnings "Direct link to Step 6: Use Your Earnings") ------------------------------------------------------------------------------------------------------------------------------------------------ Now you have: * Trading fee revenue in ETH/WETH * Ongoing income as trading continues Your earnings can fund: * Gas for more transactions * Infrastructure costs * Further development **The loop is complete:** Trading fees → ETH → Gas → Your agent runs Example: Complete Flow with Agent API[​](https://docs.bankr.bot/guides/zero-to-earning#example-complete-flow-with-agent-api "Direct link to Example: Complete Flow with Agent API") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ const API_KEY = process.env.BANKR_API_KEY!;const BASE_URL = 'https://api.bankr.bot/agent';async function bankrPrompt(prompt: string): Promise { // Submit prompt const submitRes = await fetch(`${BASE_URL}/prompt`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, }, body: JSON.stringify({ prompt }), }); const { jobId } = await submitRes.json(); // Poll for completion for (let i = 0; i < 60; i++) { const statusRes = await fetch(`${BASE_URL}/job/${jobId}`, { headers: { 'X-API-Key': API_KEY }, }); const job = await statusRes.json(); if (job.status === 'completed') return job.response; if (job.status === 'failed') throw new Error(job.error); await new Promise((r) => setTimeout(r, 2000)); } throw new Error('Timeout');}// 1. Deploy tokenconst launch = await bankrPrompt( 'deploy a token called TradingBot with symbol TBOT on base');console.log(launch);// 2. Check fees periodicallyconst fees = await bankrPrompt('check my fees for TradingBot');console.log(fees);// 3. Claim when readyconst claim = await bankrPrompt('claim my fees for TradingBot');console.log(claim); Tips for Success[​](https://docs.bankr.bot/guides/zero-to-earning#tips-for-success "Direct link to Tips for Success") ---------------------------------------------------------------------------------------------------------------------- ### Build a Useful Agent[​](https://docs.bankr.bot/guides/zero-to-earning#build-a-useful-agent "Direct link to Build a Useful Agent") Tokens need utility. Your agent should: * Solve a real problem * Have consistent functionality * Build a community ### Engage Your Community[​](https://docs.bankr.bot/guides/zero-to-earning#engage-your-community "Direct link to Engage Your Community") * Share updates on social * Respond to users * Improve based on feedback ### Monitor Your Fees[​](https://docs.bankr.bot/guides/zero-to-earning#monitor-your-fees "Direct link to Monitor Your Fees") "show my deployed tokens with fees" Claim regularly to keep your wallet funded for gas. What's Next?[​](https://docs.bankr.bot/guides/zero-to-earning#whats-next "Direct link to What's Next?") -------------------------------------------------------------------------------------------------------- * [Fee Splitting](https://docs.bankr.bot/token-launching/fee-splitting) — Route fees to collaborators * [Vaulting and Vesting](https://docs.bankr.bot/token-launching/vaulting-vesting) — Lock tokens for credibility * [Features Table](https://docs.bankr.bot/features/features-table) — All agent capabilities * [Overview](https://docs.bankr.bot/guides/zero-to-earning#overview) * [Step 1: Connect Your Agent](https://docs.bankr.bot/guides/zero-to-earning#step-1-connect-your-agent) * [Option A: OpenClaw Skill (Recommended)](https://docs.bankr.bot/guides/zero-to-earning#option-a-openclaw-skill-recommended) * [Option B: Agent API](https://docs.bankr.bot/guides/zero-to-earning#option-b-agent-api) * [Step 2: Check Your Wallet](https://docs.bankr.bot/guides/zero-to-earning#step-2-check-your-wallet) * [Step 3: Launch Your Token](https://docs.bankr.bot/guides/zero-to-earning#step-3-launch-your-token) * [Optional: Add Vesting](https://docs.bankr.bot/guides/zero-to-earning#optional-add-vesting) * [Step 4: Promote Your Token](https://docs.bankr.bot/guides/zero-to-earning#step-4-promote-your-token) * [Social Deployment](https://docs.bankr.bot/guides/zero-to-earning#social-deployment) * [Share the Link](https://docs.bankr.bot/guides/zero-to-earning#share-the-link) * [Step 5: Earn Trading Fees](https://docs.bankr.bot/guides/zero-to-earning#step-5-earn-trading-fees) * [Check Your Fees](https://docs.bankr.bot/guides/zero-to-earning#check-your-fees) * [Claim Your Fees](https://docs.bankr.bot/guides/zero-to-earning#claim-your-fees) * [Step 6: Use Your Earnings](https://docs.bankr.bot/guides/zero-to-earning#step-6-use-your-earnings) * [Example: Complete Flow with Agent API](https://docs.bankr.bot/guides/zero-to-earning#example-complete-flow-with-agent-api) * [Tips for Success](https://docs.bankr.bot/guides/zero-to-earning#tips-for-success) * [Build a Useful Agent](https://docs.bankr.bot/guides/zero-to-earning#build-a-useful-agent) * [Engage Your Community](https://docs.bankr.bot/guides/zero-to-earning#engage-your-community) * [Monitor Your Fees](https://docs.bankr.bot/guides/zero-to-earning#monitor-your-fees) * [What's Next?](https://docs.bankr.bot/guides/zero-to-earning#whats-next) --- # Social Deployment | Bankr Documentation [Skip to main content](https://docs.bankr.bot/guides/social-deployment#__docusaurus_skipToContent_fallback) On this page Deploy tokens directly from X (Twitter) for built-in virality. Overview[​](https://docs.bankr.bot/guides/social-deployment#overview "Direct link to Overview") ------------------------------------------------------------------------------------------------ Launching tokens from X creates: * Instant social proof * Discoverability in feeds * Engagement from your followers * Link between your social identity and token How It Works[​](https://docs.bankr.bot/guides/social-deployment#how-it-works "Direct link to How It Works") ------------------------------------------------------------------------------------------------------------ ### 1\. Tag @bankrbot[​](https://docs.bankr.bot/guides/social-deployment#1-tag-bankrbot "Direct link to 1. Tag @bankrbot") Post on X: @bankrbot deploy a token called MyViralToken on base ### 2\. Bankr Responds[​](https://docs.bankr.bot/guides/social-deployment#2-bankr-responds "Direct link to 2. Bankr Responds") Bankr replies with: * Token contract address * Trading link * Confirmation of your ownership ### 3\. Community Engages[​](https://docs.bankr.bot/guides/social-deployment#3-community-engages "Direct link to 3. Community Engages") Your followers can: * See the deployment in their feed * Trade immediately * Share and amplify Command Formats[​](https://docs.bankr.bot/guides/social-deployment#command-formats "Direct link to Command Formats") --------------------------------------------------------------------------------------------------------------------- ### Basic Deploy[​](https://docs.bankr.bot/guides/social-deployment#basic-deploy "Direct link to Basic Deploy") @bankrbot deploy a token called CoolToken on solana ### With Symbol[​](https://docs.bankr.bot/guides/social-deployment#with-symbol "Direct link to With Symbol") @bankrbot deploy MyToken with symbol MTK on base ### With Vesting[​](https://docs.bankr.bot/guides/social-deployment#with-vesting "Direct link to With Vesting") @bankrbot deploy TeamToken with 30% vaulted for 30 days on base Benefits[​](https://docs.bankr.bot/guides/social-deployment#benefits "Direct link to Benefits") ------------------------------------------------------------------------------------------------ ### Social Proof[​](https://docs.bankr.bot/guides/social-deployment#social-proof "Direct link to Social Proof") Your token launch is: * Public and verifiable * Linked to your X identity * Timestamped on chain ### Discoverability[​](https://docs.bankr.bot/guides/social-deployment#discoverability "Direct link to Discoverability") When you deploy: * Followers see the tweet * Engagement boosts visibility * Organic reach increases ### Trust[​](https://docs.bankr.bot/guides/social-deployment#trust "Direct link to Trust") Your followers know: * You created the token * The deployment is legitimate * They can trace to your account Best Practices[​](https://docs.bankr.bot/guides/social-deployment#best-practices "Direct link to Best Practices") ------------------------------------------------------------------------------------------------------------------ ### Announce First[​](https://docs.bankr.bot/guides/social-deployment#announce-first "Direct link to Announce First") Build anticipation: 🚀 Launching my AI agent's token in 1 hour!The bot does [cool thing] and trading fees fund its compute.Who's ready? 👀 Then: @bankrbot deploy MyAgent with symbol AGENT on base ### Engage After[​](https://docs.bankr.bot/guides/social-deployment#engage-after "Direct link to Engage After") After deployment: * Pin the tweet * Reply with trading link * Share updates on progress ### Build in Public[​](https://docs.bankr.bot/guides/social-deployment#build-in-public "Direct link to Build in Public") Share your journey: * Development updates * Fee earnings * Agent improvements Example Launch Sequence[​](https://docs.bankr.bot/guides/social-deployment#example-launch-sequence "Direct link to Example Launch Sequence") --------------------------------------------------------------------------------------------------------------------------------------------- ### Day Before[​](https://docs.bankr.bot/guides/social-deployment#day-before "Direct link to Day Before") Tomorrow I'm launching $MYBOT 🤖My trading analysis bot has been crushing it, now you can own a piece.Trading fees fund compute costs = self-sustaining AISet your alarms ⏰ ### Launch[​](https://docs.bankr.bot/guides/social-deployment#launch "Direct link to Launch") @bankrbot deploy TradingBot with symbol MYBOT on baseLet's go! 🚀 ### After Launch[​](https://docs.bankr.bot/guides/social-deployment#after-launch "Direct link to After Launch") $MYBOT is LIVE 🎉Contract: 0x1234...Trade here: [dex link]First hour: 500 tradesAlready earning fees for compute!RT to spread the word 🔄 Combining with Private Launch[​](https://docs.bankr.bot/guides/social-deployment#combining-with-private-launch "Direct link to Combining with Private Launch") --------------------------------------------------------------------------------------------------------------------------------------------------------------- You can also: 1. Deploy privately first via API 2. Announce publicly on X 3. Share the contract address This gives you time to verify everything works before public announcement. Analytics[​](https://docs.bankr.bot/guides/social-deployment#analytics "Direct link to Analytics") --------------------------------------------------------------------------------------------------- Track your social deployment: * Tweet engagement (likes, RTs, replies) * Click-through to DEX * Trading volume correlation Tips[​](https://docs.bankr.bot/guides/social-deployment#tips "Direct link to Tips") ------------------------------------------------------------------------------------ ### Timing[​](https://docs.bankr.bot/guides/social-deployment#timing "Direct link to Timing") * Deploy when your audience is active * Avoid deploying during major market events * Consider time zones of your followers ### Visuals[​](https://docs.bankr.bot/guides/social-deployment#visuals "Direct link to Visuals") * Include your token logo * Use eye-catching formatting * Add relevant emojis ### Call to Action[​](https://docs.bankr.bot/guides/social-deployment#call-to-action "Direct link to Call to Action") * Tell people what to do * Provide clear trading link * Make it easy to participate Limitations[​](https://docs.bankr.bot/guides/social-deployment#limitations "Direct link to Limitations") --------------------------------------------------------------------------------------------------------- * One token per day (standard) or 10/day (Bankr Club) * Same gas sponsorship rules apply * Must have connected Bankr wallet * [Overview](https://docs.bankr.bot/guides/social-deployment#overview) * [How It Works](https://docs.bankr.bot/guides/social-deployment#how-it-works) * [1\. Tag @bankrbot](https://docs.bankr.bot/guides/social-deployment#1-tag-bankrbot) * [2\. Bankr Responds](https://docs.bankr.bot/guides/social-deployment#2-bankr-responds) * [3\. Community Engages](https://docs.bankr.bot/guides/social-deployment#3-community-engages) * [Command Formats](https://docs.bankr.bot/guides/social-deployment#command-formats) * [Basic Deploy](https://docs.bankr.bot/guides/social-deployment#basic-deploy) * [With Symbol](https://docs.bankr.bot/guides/social-deployment#with-symbol) * [With Vesting](https://docs.bankr.bot/guides/social-deployment#with-vesting) * [Benefits](https://docs.bankr.bot/guides/social-deployment#benefits) * [Social Proof](https://docs.bankr.bot/guides/social-deployment#social-proof) * [Discoverability](https://docs.bankr.bot/guides/social-deployment#discoverability) * [Trust](https://docs.bankr.bot/guides/social-deployment#trust) * [Best Practices](https://docs.bankr.bot/guides/social-deployment#best-practices) * [Announce First](https://docs.bankr.bot/guides/social-deployment#announce-first) * [Engage After](https://docs.bankr.bot/guides/social-deployment#engage-after) * [Build in Public](https://docs.bankr.bot/guides/social-deployment#build-in-public) * [Example Launch Sequence](https://docs.bankr.bot/guides/social-deployment#example-launch-sequence) * [Day Before](https://docs.bankr.bot/guides/social-deployment#day-before) * [Launch](https://docs.bankr.bot/guides/social-deployment#launch) * [After Launch](https://docs.bankr.bot/guides/social-deployment#after-launch) * [Combining with Private Launch](https://docs.bankr.bot/guides/social-deployment#combining-with-private-launch) * [Analytics](https://docs.bankr.bot/guides/social-deployment#analytics) * [Tips](https://docs.bankr.bot/guides/social-deployment#tips) * [Timing](https://docs.bankr.bot/guides/social-deployment#timing) * [Visuals](https://docs.bankr.bot/guides/social-deployment#visuals) * [Call to Action](https://docs.bankr.bot/guides/social-deployment#call-to-action) * [Limitations](https://docs.bankr.bot/guides/social-deployment#limitations) --- # Building a Self-Sustaining Agent | Bankr Documentation [Skip to main content](https://docs.bankr.bot/guides/self-sustaining-agent#__docusaurus_skipToContent_fallback) On this page Design an agent that funds its own compute costs through trading fees. The Self-Sustaining Model[​](https://docs.bankr.bot/guides/self-sustaining-agent#the-self-sustaining-model "Direct link to The Self-Sustaining Model") ------------------------------------------------------------------------------------------------------------------------------------------------------- ┌─────────────────┐│ Your Agent ││ (provides ││ value) │└────────┬────────┘ │ Users interact ▼┌─────────────────┐│ Token Trading ││ (generates ││ fees) │└────────┬────────┘ │ Fees accumulate ▼┌─────────────────┐│ Fee Claims ││ (ETH/WETH) │└────────┬────────┘ │ Revenue ▼┌─────────────────┐│ Your Agent │◀──┐│ (continues │ ││ running) │───┘└─────────────────┘ Gas Sponsorship Bankr covers gas fees for agent wallets on supported chains. Your agent can execute transactions without needing ETH for gas. Choose Your Integration[​](https://docs.bankr.bot/guides/self-sustaining-agent#choose-your-integration "Direct link to Choose Your Integration") ------------------------------------------------------------------------------------------------------------------------------------------------- ### Option 1: OpenClaw Skill (Recommended)[​](https://docs.bankr.bot/guides/self-sustaining-agent#option-1-openclaw-skill-recommended "Direct link to Option 1: OpenClaw Skill (Recommended)") The simplest path to a self-sustaining agent. Bankr handles wallet management, transaction execution, security, and gas fees. Install in OpenClaw Tell your agent: > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) Your agent can then: * Deploy tokens and earn fees * Execute trades automatically * Claim fees with natural language * No wallet management code needed ### Option 2: Agent API[​](https://docs.bankr.bot/guides/self-sustaining-agent#option-2-agent-api "Direct link to Option 2: Agent API") For custom integrations with full wallet control via API key authentication. const API_KEY = process.env.BANKR_API_KEY;const BASE_URL = 'https://api.bankr.bot/agent';async function executePrompt(prompt: string) { // Submit prompt const submitRes = await fetch(`${BASE_URL}/prompt`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, }, body: JSON.stringify({ prompt }), }); const { jobId } = await submitRes.json(); // Poll for completion while (true) { const statusRes = await fetch(`${BASE_URL}/job/${jobId}`, { headers: { 'X-API-Key': API_KEY }, }); const job = await statusRes.json(); if (job.status === 'completed') return job.response; if (job.status === 'failed') throw new Error(job.error); await new Promise(r => setTimeout(r, 2000)); }}// Use itconst fees = await executePrompt('check fees for MyToken');await executePrompt('claim my fees for MyToken'); Benefits: * Bankr manages wallet security * No private keys in your code * **Gas fees covered** on supported chains * Simple REST API Calculating Sustainability[​](https://docs.bankr.bot/guides/self-sustaining-agent#calculating-sustainability "Direct link to Calculating Sustainability") ---------------------------------------------------------------------------------------------------------------------------------------------------------- ### Fee Revenue (Base)[​](https://docs.bankr.bot/guides/self-sustaining-agent#fee-revenue-base "Direct link to Fee Revenue (Base)") Your 60% share of trading fees: * High volume token: $10-100+/day possible * Moderate volume: $1-10/day * Low volume: Less than $1/day ### Fee Revenue (Solana)[​](https://docs.bankr.bot/guides/self-sustaining-agent#fee-revenue-solana "Direct link to Fee Revenue (Solana)") During bonding curve: 0.5% creator fee on each trade After migration: LP trading fees from your 50% position ### Break-Even[​](https://docs.bankr.bot/guides/self-sustaining-agent#break-even "Direct link to Break-Even") With the Agent API: * No per-request fees * Gas fees are covered by Bankr on supported chains * Your trading fees go directly to growing your treasury Strategies for Sustainability[​](https://docs.bankr.bot/guides/self-sustaining-agent#strategies-for-sustainability "Direct link to Strategies for Sustainability") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. Build Genuine Utility[​](https://docs.bankr.bot/guides/self-sustaining-agent#1-build-genuine-utility "Direct link to 1. Build Genuine Utility") Agents with real utility get more usage: // Examples of useful agents:- Trading signal bot- Portfolio rebalancer- News aggregator- Social engagement bot- Data analysis tool ### 2\. Smart Fee Collection[​](https://docs.bankr.bot/guides/self-sustaining-agent#2-smart-fee-collection "Direct link to 2. Smart Fee Collection") Automate fee collection with the Agent API: async function collectFees() { // Check fees const fees = await executePrompt('check fees for MyToken'); console.log('Current fees:', fees); // Claim if worthwhile await executePrompt('claim my fees for MyToken'); console.log('Fees claimed');}// Run dailysetInterval(collectFees, 24 * 60 * 60 * 1000); ### 3\. Batch Operations[​](https://docs.bankr.bot/guides/self-sustaining-agent#3-batch-operations "Direct link to 3. Batch Operations") Combine related queries: // Instead of:"price of ETH""price of BTC""price of SOL"// Use:"prices of ETH, BTC, and SOL" ### 4\. Community Growth[​](https://docs.bankr.bot/guides/self-sustaining-agent#4-community-growth "Direct link to 4. Community Growth") More users = more trading = more fees: * Share your agent publicly * Engage on social media * Provide good documentation * Respond to feedback Example: Self-Sustaining Bot with Agent API[​](https://docs.bankr.bot/guides/self-sustaining-agent#example-self-sustaining-bot-with-agent-api "Direct link to Example: Self-Sustaining Bot with Agent API") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ const API_KEY = process.env.BANKR_API_KEY!;const BASE_URL = 'https://api.bankr.bot/agent';class SelfSustainingBot { private tokenName: string; constructor(tokenName: string) { this.tokenName = tokenName; } private async prompt(text: string): Promise { const submitRes = await fetch(`${BASE_URL}/prompt`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, }, body: JSON.stringify({ prompt: text }), }); const { jobId } = await submitRes.json(); // Poll for completion for (let i = 0; i < 60; i++) { const statusRes = await fetch(`${BASE_URL}/job/${jobId}`, { headers: { 'X-API-Key': API_KEY }, }); const job = await statusRes.json(); if (job.status === 'completed') return job.response; if (job.status === 'failed') throw new Error(job.error); await new Promise((r) => setTimeout(r, 2000)); } throw new Error('Timeout'); } // Core bot functionality (generates value for users) async analyzeTrade(token: string): Promise { return this.prompt( `analyze ${token} price action and give trading recommendation` ); } // Revenue collection (funds the bot) async collectRevenue(): Promise { const fees = await this.prompt(`check fees for ${this.tokenName}`); console.log('Current fees:', fees); await this.prompt(`claim my fees for ${this.tokenName}`); console.log('Revenue collected'); } // Health check async checkBalance(): Promise { return this.prompt('what are my balances on base?'); }}// Usageconst bot = new SelfSustainingBot('MyAgentToken');await bot.collectRevenue(); Monitoring Sustainability[​](https://docs.bankr.bot/guides/self-sustaining-agent#monitoring-sustainability "Direct link to Monitoring Sustainability") ------------------------------------------------------------------------------------------------------------------------------------------------------- Track these metrics: | Metric | Goal | | --- | --- | | Daily fee revenue | Know your income | | Token trading volume | Leading indicator | | ETH/WETH balance | Available for gas | | Claim frequency | Optimize collection | Scaling Up[​](https://docs.bankr.bot/guides/self-sustaining-agent#scaling-up "Direct link to Scaling Up") ---------------------------------------------------------------------------------------------------------- As your agent grows: 1. **More features** → More value → More users 2. **More users** → More trading → More fees 3. **More fees** → More compute → Better features The flywheel effect makes successful agents increasingly sustainable. Fallback Strategies[​](https://docs.bankr.bot/guides/self-sustaining-agent#fallback-strategies "Direct link to Fallback Strategies") ------------------------------------------------------------------------------------------------------------------------------------- If fees aren't covering costs: 1. **Reduce operations** — Batch more, cache results 2. **Add premium features** — Charge for advanced capabilities 3. **Manual top-up** — Add ETH while building volume 4. **Partnerships** — Collaborate with other projects * [The Self-Sustaining Model](https://docs.bankr.bot/guides/self-sustaining-agent#the-self-sustaining-model) * [Choose Your Integration](https://docs.bankr.bot/guides/self-sustaining-agent#choose-your-integration) * [Option 1: OpenClaw Skill (Recommended)](https://docs.bankr.bot/guides/self-sustaining-agent#option-1-openclaw-skill-recommended) * [Option 2: Agent API](https://docs.bankr.bot/guides/self-sustaining-agent#option-2-agent-api) * [Calculating Sustainability](https://docs.bankr.bot/guides/self-sustaining-agent#calculating-sustainability) * [Fee Revenue (Base)](https://docs.bankr.bot/guides/self-sustaining-agent#fee-revenue-base) * [Fee Revenue (Solana)](https://docs.bankr.bot/guides/self-sustaining-agent#fee-revenue-solana) * [Break-Even](https://docs.bankr.bot/guides/self-sustaining-agent#break-even) * [Strategies for Sustainability](https://docs.bankr.bot/guides/self-sustaining-agent#strategies-for-sustainability) * [1\. Build Genuine Utility](https://docs.bankr.bot/guides/self-sustaining-agent#1-build-genuine-utility) * [2\. Smart Fee Collection](https://docs.bankr.bot/guides/self-sustaining-agent#2-smart-fee-collection) * [3\. Batch Operations](https://docs.bankr.bot/guides/self-sustaining-agent#3-batch-operations) * [4\. Community Growth](https://docs.bankr.bot/guides/self-sustaining-agent#4-community-growth) * [Example: Self-Sustaining Bot with Agent API](https://docs.bankr.bot/guides/self-sustaining-agent#example-self-sustaining-bot-with-agent-api) * [Monitoring Sustainability](https://docs.bankr.bot/guides/self-sustaining-agent#monitoring-sustainability) * [Scaling Up](https://docs.bankr.bot/guides/self-sustaining-agent#scaling-up) * [Fallback Strategies](https://docs.bankr.bot/guides/self-sustaining-agent#fallback-strategies) --- # bankr-agent Plugin | Bankr Documentation [Skip to main content](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#__docusaurus_skipToContent_fallback) On this page Enable crypto trading and market predictions in Claude Code. Installation[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#installation "Direct link to Installation") --------------------------------------------------------------------------------------------------------------------- claude plugin install bankr-agent Capabilities[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#capabilities "Direct link to Capabilities") --------------------------------------------------------------------------------------------------------------------- ### Token Trading[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#token-trading "Direct link to Token Trading") Buy and sell tokens across supported chains: "buy $50 of ETH on base""swap 100 USDC to BNKR""sell all my DEGEN for ETH" ### Price Queries[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#price-queries "Direct link to Price Queries") Get real-time prices and market data: "what is the price of ETH?""show me BTC price chart""compare prices of ETH, SOL, and MATIC" ### Market Analysis[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#market-analysis "Direct link to Market Analysis") Technical analysis and trending tokens: "analyze BNKR price action""what tokens are trending on base?""show me the top gainers today" ### Polymarket[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#polymarket "Direct link to Polymarket") Prediction market integration: "what are the odds the eagles win?""bet $5 on eagles to win tonight""show me election markets" ### Portfolio Management[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#portfolio-management "Direct link to Portfolio Management") Check balances and positions: "what are my balances?""show my portfolio value""what positions do I have on Avantis?" Example Session[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#example-session "Direct link to Example Session") ------------------------------------------------------------------------------------------------------------------------------ You: What's the price of ETH?Claude: ETH is currently trading at $3,245.67, up 2.3% in the last 24 hours.You: Buy $20 of it on baseClaude: I'll execute a swap of $20 USDC to ETH on Base.[Transaction executed]Swapped $20 USDC for 0.00616 ETH on Base.Transaction: 0x1234...You: Now show my balancesClaude: Your Base wallet balances:- ETH: 0.0562 ($182.45)- USDC: 430.00 ($430.00)- BNKR: 15,000 ($45.00) Configuration[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#configuration "Direct link to Configuration") ------------------------------------------------------------------------------------------------------------------------ The plugin uses your configured wallet. Ensure you have: 1. USDC on Base (the SDK uses x402 micropayments) 2. Gas tokens on chains you want to trade Limitations[​](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#limitations "Direct link to Limitations") ------------------------------------------------------------------------------------------------------------------ * Solana and Polymarket operations are not available through the SDK version * Some operations require sufficient gas balance * Rate limits apply per wallet * [Installation](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#installation) * [Capabilities](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#capabilities) * [Token Trading](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#token-trading) * [Price Queries](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#price-queries) * [Market Analysis](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#market-analysis) * [Polymarket](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#polymarket) * [Portfolio Management](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#portfolio-management) * [Example Session](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#example-session) * [Configuration](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#configuration) * [Limitations](https://docs.bankr.bot/claude-plugins/bankr-agent-plugin#limitations) --- # bankr-agent-dev Plugin | Bankr Documentation [Skip to main content](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#__docusaurus_skipToContent_fallback) On this page Developer toolkit for building on the Bankr Agent API. Installation[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#installation "Direct link to Installation") ------------------------------------------------------------------------------------------------------------------ claude plugin install bankr-agent-dev Capabilities[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#capabilities "Direct link to Capabilities") ------------------------------------------------------------------------------------------------------------------ ### Project Scaffolding[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#project-scaffolding "Direct link to Project Scaffolding") Generate starter projects: "create a trading bot using the Bankr API""scaffold a web dashboard for portfolio tracking""generate a CLI tool for DCA management" ### API Documentation[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#api-documentation "Direct link to API Documentation") Access API docs and patterns: "show me the Bankr API endpoints""how do I poll for job completion?""what transaction types are supported?" ### TypeScript Interfaces[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#typescript-interfaces "Direct link to TypeScript Interfaces") Get type definitions: "show me the JobStatus interface""what types does the SDK export?""generate types for transaction handling" ### Code Generation[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#code-generation "Direct link to Code Generation") Generate implementation code: "write a function to submit a swap""create a polling utility for jobs""implement error handling for the API" Example Session[​](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#example-session "Direct link to Example Session") --------------------------------------------------------------------------------------------------------------------------- You: I want to build a trading bot that buys ETH every hourClaude: I'll help you create a DCA bot using the Bankr Agent API.Here's the structure:```typescriptimport { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: process.env.PRIVATE_KEY as `0x${string}`,});async function executeDCA() { const result = await client.promptAndWait({ prompt: 'buy $10 of ETH on base', }); console.log(`DCA executed: ${result.response}`);}// Run every hoursetInterval(executeDCA, 60 * 60 * 1000); Want me to add error handling and logging? ## Use Cases- Building trading bots- Creating portfolio dashboards- Developing CLI tools- Integrating Bankr into existing apps## Project TemplatesThe plugin can generate templates for:| Type | Description ||------|-------------|| Bot | Automated trading bot || Web Service | Express/Fastify API || Dashboard | React portfolio UI || CLI | Command-line tool |## Best PracticesThe plugin provides guidance on:- Error handling patterns- Polling strategies- Transaction management- Security considerations * [Installation](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#installation) * [Capabilities](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#capabilities) * [Project Scaffolding](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#project-scaffolding) * [API Documentation](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#api-documentation) * [TypeScript Interfaces](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#typescript-interfaces) * [Code Generation](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#code-generation) * [Example Session](https://docs.bankr.bot/claude-plugins/bankr-agent-dev#example-session) --- # Client Setup | Bankr Documentation [Skip to main content](https://docs.bankr.bot/sdk/client-setup#__docusaurus_skipToContent_fallback) On this page Configure the BankrClient for your application. Basic Setup[​](https://docs.bankr.bot/sdk/client-setup#basic-setup "Direct link to Basic Setup") ------------------------------------------------------------------------------------------------- import { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: '0xYourPrivateKey',}); Configuration Options[​](https://docs.bankr.bot/sdk/client-setup#configuration-options "Direct link to Configuration Options") ------------------------------------------------------------------------------------------------------------------------------- ### `privateKey` (required)[​](https://docs.bankr.bot/sdk/client-setup#privatekey-required "Direct link to privatekey-required") Your wallet's private key, used for: * Signing x402 payment transactions * Authenticating job status requests const client = new BankrClient({ privateKey: '0x1234567890abcdef...',}); The wallet address is automatically derived from the private key. ### `baseUrl` (optional)[​](https://docs.bankr.bot/sdk/client-setup#baseurl-optional "Direct link to baseurl-optional") API endpoint. We recommend explicitly setting the production URL. const client = new BankrClient({ privateKey: '0x...', baseUrl: 'https://api.bankr.bot', // Production (recommended)}); ### `timeout` (optional)[​](https://docs.bankr.bot/sdk/client-setup#timeout-optional "Direct link to timeout-optional") Request timeout in milliseconds. Default: 10 minutes. const client = new BankrClient({ privateKey: '0x...', timeout: 300000, // 5 minutes}); ### `walletAddress` (optional)[​](https://docs.bankr.bot/sdk/client-setup#walletaddress-optional "Direct link to walletaddress-optional") Override the context wallet for operations. By default, uses the address derived from your private key. const client = new BankrClient({ privateKey: '0x...', // Payment wallet walletAddress: '0xDifferentWallet', // Context wallet}); This is useful when: * Your payment wallet differs from your trading wallet * You're building a service that operates on behalf of users Getting the Wallet Address[​](https://docs.bankr.bot/sdk/client-setup#getting-the-wallet-address "Direct link to Getting the Wallet Address") ---------------------------------------------------------------------------------------------------------------------------------------------- Retrieve the derived wallet address: const client = new BankrClient({ privateKey: '0x...',});const address = client.getWalletAddress();console.log(address); // "0xYourDerivedAddress" Multiple Clients[​](https://docs.bankr.bot/sdk/client-setup#multiple-clients "Direct link to Multiple Clients") ---------------------------------------------------------------------------------------------------------------- You can create multiple clients for different wallets: const personalClient = new BankrClient({ privateKey: process.env.PERSONAL_KEY as `0x${string}`,});const agentClient = new BankrClient({ privateKey: process.env.AGENT_KEY as `0x${string}`,}); Error Handling[​](https://docs.bankr.bot/sdk/client-setup#error-handling "Direct link to Error Handling") ---------------------------------------------------------------------------------------------------------- The client throws errors for invalid configuration: try { const client = new BankrClient({ privateKey: 'invalid', // Must be 0x-prefixed hex });} catch (error) { console.error('Invalid private key format');} Security Best Practices[​](https://docs.bankr.bot/sdk/client-setup#security-best-practices "Direct link to Security Best Practices") ------------------------------------------------------------------------------------------------------------------------------------- 1. **Never hardcode private keys** — Use environment variables 2. **Use separate wallets** — Don't use your main wallet for API operations 3. **Limit wallet funds** — Only keep necessary USDC for payments 4. **Rotate keys periodically** — Create new wallets when needed // Goodconst client = new BankrClient({ privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,});// Bad - never do thisconst client = new BankrClient({ privateKey: '0xActualPrivateKeyHardcoded',}); * [Basic Setup](https://docs.bankr.bot/sdk/client-setup#basic-setup) * [Configuration Options](https://docs.bankr.bot/sdk/client-setup#configuration-options) * [`privateKey` (required)](https://docs.bankr.bot/sdk/client-setup#privatekey-required) * [`baseUrl` (optional)](https://docs.bankr.bot/sdk/client-setup#baseurl-optional) * [`timeout` (optional)](https://docs.bankr.bot/sdk/client-setup#timeout-optional) * [`walletAddress` (optional)](https://docs.bankr.bot/sdk/client-setup#walletaddress-optional) * [Getting the Wallet Address](https://docs.bankr.bot/sdk/client-setup#getting-the-wallet-address) * [Multiple Clients](https://docs.bankr.bot/sdk/client-setup#multiple-clients) * [Error Handling](https://docs.bankr.bot/sdk/client-setup#error-handling) * [Security Best Practices](https://docs.bankr.bot/sdk/client-setup#security-best-practices) --- # DCA Orders | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/trading/dca-orders#__docusaurus_skipToContent_fallback) On this page Dollar-cost average into tokens with automated recurring buys. Overview[​](https://docs.bankr.bot/features/trading/dca-orders#overview "Direct link to Overview") --------------------------------------------------------------------------------------------------- DCA (Dollar-Cost Averaging) spreads your purchases over time: * Reduces impact of volatility * Removes emotional decision-making * Builds positions gradually Supported Chains[​](https://docs.bankr.bot/features/trading/dca-orders#supported-chains "Direct link to Supported Chains") --------------------------------------------------------------------------------------------------------------------------- DCA orders are available on **EVM chains only**: * Base * Ethereum * Polygon * Unichain Not available on Solana. Basic DCA[​](https://docs.bankr.bot/features/trading/dca-orders#basic-dca "Direct link to Basic DCA") ------------------------------------------------------------------------------------------------------ Set up recurring purchases: "DCA $100 USDC into BNKR every day at 9am""DCA $50 ETH into BNKR every 6 hours""buy $25 of DEGEN daily" Schedule Options[​](https://docs.bankr.bot/features/trading/dca-orders#schedule-options "Direct link to Schedule Options") --------------------------------------------------------------------------------------------------------------------------- ### Daily[​](https://docs.bankr.bot/features/trading/dca-orders#daily "Direct link to Daily") "DCA $100 into BNKR every day""DCA $50 into ETH daily at 2pm" ### Hourly[​](https://docs.bankr.bot/features/trading/dca-orders#hourly "Direct link to Hourly") "DCA $25 into BNKR every hour""DCA $50 into ETH every 6 hours""DCA $100 into BNKR every 12 hours" Duration Limits[​](https://docs.bankr.bot/features/trading/dca-orders#duration-limits "Direct link to Duration Limits") ------------------------------------------------------------------------------------------------------------------------ Specify how long the DCA runs: "DCA $50 ETH into BNKR every 12 hours for 15 days""DCA $25 USDC into BNKR daily for 30 days" Without a limit, DCA continues until: * You cancel it * Balance runs out * Maximum executions reached (30 by default) Minimum Trade Size[​](https://docs.bankr.bot/features/trading/dca-orders#minimum-trade-size "Direct link to Minimum Trade Size") --------------------------------------------------------------------------------------------------------------------------------- Minimum trade value: **$20 per execution** This ensures gas costs don't eat into your DCA: # Works"DCA $25 USDC into BNKR daily"# Rejected (too small)"DCA $10 USDC into BNKR daily" Managing DCAs[​](https://docs.bankr.bot/features/trading/dca-orders#managing-dcas "Direct link to Managing DCAs") ------------------------------------------------------------------------------------------------------------------ ### View Active DCAs[​](https://docs.bankr.bot/features/trading/dca-orders#view-active-dcas "Direct link to View Active DCAs") "show my DCA orders""what automations do I have?" ### Cancel DCA[​](https://docs.bankr.bot/features/trading/dca-orders#cancel-dca "Direct link to Cancel DCA") "cancel my DCA for BNKR""cancel all my automations" Examples[​](https://docs.bankr.bot/features/trading/dca-orders#examples "Direct link to Examples") --------------------------------------------------------------------------------------------------- ### Weekly ETH Accumulation[​](https://docs.bankr.bot/features/trading/dca-orders#weekly-eth-accumulation "Direct link to Weekly ETH Accumulation") "DCA $100 USDC into ETH every day for 7 days" Total: $700 into ETH over one week ### Aggressive Accumulation[​](https://docs.bankr.bot/features/trading/dca-orders#aggressive-accumulation "Direct link to Aggressive Accumulation") "DCA $200 USDC into BNKR every 6 hours for 3 days" Total: 12 buys × $200 = $2,400 over 3 days ### Long-term DCA[​](https://docs.bankr.bot/features/trading/dca-orders#long-term-dca "Direct link to Long-term DCA") "DCA $50 into ETH daily for 30 days" Total: $1,500 into ETH over one month Requirements[​](https://docs.bankr.bot/features/trading/dca-orders#requirements "Direct link to Requirements") --------------------------------------------------------------------------------------------------------------- * Sufficient balance of the sell token (USDC, ETH, etc.) * Balance must cover all scheduled executions * Gas for each execution (or gas sponsorship) Tips[​](https://docs.bankr.bot/features/trading/dca-orders#tips "Direct link to Tips") --------------------------------------------------------------------------------------- ### Start Small[​](https://docs.bankr.bot/features/trading/dca-orders#start-small "Direct link to Start Small") Test with a shorter duration first: "DCA $50 into BNKR every day for 3 days" ### Use Stablecoins[​](https://docs.bankr.bot/features/trading/dca-orders#use-stablecoins "Direct link to Use Stablecoins") DCA from USDC for predictable amounts: "DCA $100 USDC into ETH daily" # Always $100 per buy vs. "DCA $100 worth of ETH into BNKR daily" # ETH amount varies Limitations[​](https://docs.bankr.bot/features/trading/dca-orders#limitations "Direct link to Limitations") ------------------------------------------------------------------------------------------------------------ * Not available on Solana * Not available via XMTP * Minimum $20 per trade * Maximum 30 executions per DCA * Requires continuous balance availability * [Overview](https://docs.bankr.bot/features/trading/dca-orders#overview) * [Supported Chains](https://docs.bankr.bot/features/trading/dca-orders#supported-chains) * [Basic DCA](https://docs.bankr.bot/features/trading/dca-orders#basic-dca) * [Schedule Options](https://docs.bankr.bot/features/trading/dca-orders#schedule-options) * [Daily](https://docs.bankr.bot/features/trading/dca-orders#daily) * [Hourly](https://docs.bankr.bot/features/trading/dca-orders#hourly) * [Duration Limits](https://docs.bankr.bot/features/trading/dca-orders#duration-limits) * [Minimum Trade Size](https://docs.bankr.bot/features/trading/dca-orders#minimum-trade-size) * [Managing DCAs](https://docs.bankr.bot/features/trading/dca-orders#managing-dcas) * [View Active DCAs](https://docs.bankr.bot/features/trading/dca-orders#view-active-dcas) * [Cancel DCA](https://docs.bankr.bot/features/trading/dca-orders#cancel-dca) * [Examples](https://docs.bankr.bot/features/trading/dca-orders#examples) * [Weekly ETH Accumulation](https://docs.bankr.bot/features/trading/dca-orders#weekly-eth-accumulation) * [Aggressive Accumulation](https://docs.bankr.bot/features/trading/dca-orders#aggressive-accumulation) * [Long-term DCA](https://docs.bankr.bot/features/trading/dca-orders#long-term-dca) * [Requirements](https://docs.bankr.bot/features/trading/dca-orders#requirements) * [Tips](https://docs.bankr.bot/features/trading/dca-orders#tips) * [Start Small](https://docs.bankr.bot/features/trading/dca-orders#start-small) * [Use Stablecoins](https://docs.bankr.bot/features/trading/dca-orders#use-stablecoins) * [Limitations](https://docs.bankr.bot/features/trading/dca-orders#limitations) --- # Stop Orders | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/trading/stop-orders#__docusaurus_skipToContent_fallback) On this page Automatically sell tokens when price drops below a threshold. Overview[​](https://docs.bankr.bot/features/trading/stop-orders#overview "Direct link to Overview") ---------------------------------------------------------------------------------------------------- Stop orders protect your positions by selling when price falls. They're essential for: * Limiting losses * Protecting profits * Managing risk automatically Supported Chains[​](https://docs.bankr.bot/features/trading/stop-orders#supported-chains "Direct link to Supported Chains") ---------------------------------------------------------------------------------------------------------------------------- Stop orders are available on **EVM chains only**: * Base * Ethereum * Polygon * Unichain Not available on Solana. Basic Stop Orders[​](https://docs.bankr.bot/features/trading/stop-orders#basic-stop-orders "Direct link to Basic Stop Orders") ------------------------------------------------------------------------------------------------------------------------------- Sell when price drops: "sell all my DEGEN if it drops 20%""sell my BNKR if it falls 15%""stop loss on ETH at -10%" With Specific Amounts[​](https://docs.bankr.bot/features/trading/stop-orders#with-specific-amounts "Direct link to With Specific Amounts") ------------------------------------------------------------------------------------------------------------------------------------------- "sell 50% of my DEGEN if it drops 20%""sell 1000 BNKR if price drops 25%" How Stop Orders Work[​](https://docs.bankr.bot/features/trading/stop-orders#how-stop-orders-work "Direct link to How Stop Orders Work") ---------------------------------------------------------------------------------------------------------------------------------------- 1. **You set the stop** — Specify token, amount, and trigger percentage 2. **Price is monitored** — Bankr watches continuously 3. **Price drops below threshold** — Stop triggers 4. **Tokens are sold** — Swap executes automatically Managing Stop Orders[​](https://docs.bankr.bot/features/trading/stop-orders#managing-stop-orders "Direct link to Managing Stop Orders") ---------------------------------------------------------------------------------------------------------------------------------------- ### View Active Stops[​](https://docs.bankr.bot/features/trading/stop-orders#view-active-stops "Direct link to View Active Stops") "show my stop orders""what automations do I have?" ### Cancel Stops[​](https://docs.bankr.bot/features/trading/stop-orders#cancel-stops "Direct link to Cancel Stops") "cancel my stop order for DEGEN""cancel all my stop orders" Use Cases[​](https://docs.bankr.bot/features/trading/stop-orders#use-cases "Direct link to Use Cases") ------------------------------------------------------------------------------------------------------- ### Protect Against Losses[​](https://docs.bankr.bot/features/trading/stop-orders#protect-against-losses "Direct link to Protect Against Losses") Set stops on new positions: "buy $100 of NEWTOKEN""set a stop loss at -20% for NEWTOKEN" ### Lock In Profits[​](https://docs.bankr.bot/features/trading/stop-orders#lock-in-profits "Direct link to Lock In Profits") After a token pumps, protect your gains: "set stop loss on BNKR at -10%" If BNKR is up 50% and drops 10% from current, you still exit with 35% profit. ### Risk Management[​](https://docs.bankr.bot/features/trading/stop-orders#risk-management "Direct link to Risk Management") Standard risk management approach: "buy $500 of ETH""stop loss at -5%" # Max loss: $25 Tips[​](https://docs.bankr.bot/features/trading/stop-orders#tips "Direct link to Tips") ---------------------------------------------------------------------------------------- ### Don't Set Stops Too Tight[​](https://docs.bankr.bot/features/trading/stop-orders#dont-set-stops-too-tight "Direct link to Don't Set Stops Too Tight") Volatile tokens can trigger stops from normal price swings. Consider: * 5-10% for stablecoins * 15-25% for large caps * 25-40% for small caps/memecoins ### Combine with Take Profits[​](https://docs.bankr.bot/features/trading/stop-orders#combine-with-take-profits "Direct link to Combine with Take Profits") Use both stop orders and limit sells: "set stop loss on BNKR at -15%""sell half my BNKR when it rises 50%" Limitations[​](https://docs.bankr.bot/features/trading/stop-orders#limitations "Direct link to Limitations") ------------------------------------------------------------------------------------------------------------- * Not available on Solana * Not available via XMTP * Execution price may differ from trigger (slippage) * Requires sufficient gas balance * [Overview](https://docs.bankr.bot/features/trading/stop-orders#overview) * [Supported Chains](https://docs.bankr.bot/features/trading/stop-orders#supported-chains) * [Basic Stop Orders](https://docs.bankr.bot/features/trading/stop-orders#basic-stop-orders) * [With Specific Amounts](https://docs.bankr.bot/features/trading/stop-orders#with-specific-amounts) * [How Stop Orders Work](https://docs.bankr.bot/features/trading/stop-orders#how-stop-orders-work) * [Managing Stop Orders](https://docs.bankr.bot/features/trading/stop-orders#managing-stop-orders) * [View Active Stops](https://docs.bankr.bot/features/trading/stop-orders#view-active-stops) * [Cancel Stops](https://docs.bankr.bot/features/trading/stop-orders#cancel-stops) * [Use Cases](https://docs.bankr.bot/features/trading/stop-orders#use-cases) * [Protect Against Losses](https://docs.bankr.bot/features/trading/stop-orders#protect-against-losses) * [Lock In Profits](https://docs.bankr.bot/features/trading/stop-orders#lock-in-profits) * [Risk Management](https://docs.bankr.bot/features/trading/stop-orders#risk-management) * [Tips](https://docs.bankr.bot/features/trading/stop-orders#tips) * [Don't Set Stops Too Tight](https://docs.bankr.bot/features/trading/stop-orders#dont-set-stops-too-tight) * [Combine with Take Profits](https://docs.bankr.bot/features/trading/stop-orders#combine-with-take-profits) * [Limitations](https://docs.bankr.bot/features/trading/stop-orders#limitations) --- # bankr-x402-sdk-dev Plugin | Bankr Documentation [Skip to main content](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#__docusaurus_skipToContent_fallback) On this page Web3 development integration with the @bankr/sdk for advanced use cases. note The SDK returns transaction data for you to submit using your own wallet infrastructure. If you want Bankr to handle transactions, use the Agent API or bankr-agent plugin instead. Installation[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#installation "Direct link to Installation") --------------------------------------------------------------------------------------------------------------------- claude plugin install bankr-x402-sdk-dev Capabilities[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#capabilities "Direct link to Capabilities") --------------------------------------------------------------------------------------------------------------------- ### Market Analysis[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#market-analysis "Direct link to Market Analysis") Build features using market data: "get token prices for my dashboard""implement trending tokens display""add technical analysis charts" ### Portfolio Tracking[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#portfolio-tracking "Direct link to Portfolio Tracking") Track user portfolios: "fetch user balances across chains""calculate portfolio value in USD""track position P&L" ### Token Swaps[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#token-swaps "Direct link to Token Swaps") Implement swap functionality: "add swap feature with 0x routing""implement cross-chain bridging""handle approval transactions" ### Leveraged Trading[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#leveraged-trading "Direct link to Leveraged Trading") Integrate Avantis trading: "implement leveraged positions""add stop-loss and take-profit""track open positions" SDK Features[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#sdk-features "Direct link to SDK Features") --------------------------------------------------------------------------------------------------------------------- The plugin helps you implement: | Feature | Supported Chains | | --- | --- | | Prices & Charts | All | | Token Swaps | EVM chains | | Cross-chain Bridges | EVM chains | | Leveraged Trading | Base (Avantis) | | Portfolio Tracking | All | | NFT Operations | EVM chains | x402 Micropayments[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#x402-micropayments "Direct link to x402 Micropayments") --------------------------------------------------------------------------------------------------------------------------------------- The SDK uses x402 micropayments ($0.01 USDC per request on Base): "how do x402 payments work?""implement payment handling""handle 402 responses" Your wallet signs payment transactions automatically — USDC is deducted from your wallet on Base. Example: Portfolio Dashboard[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#example-portfolio-dashboard "Direct link to Example: Portfolio Dashboard") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- import { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: process.env.PRIVATE_KEY as `0x${string}`,});async function getPortfolio() { const result = await client.promptAndWait({ prompt: 'what are my token balances on all chains?', }); return result.response;}async function getTokenPrice(token: string) { const result = await client.promptAndWait({ prompt: `what is the price of ${token}?`, }); return result.response;}async function executeSwap(amount: number, from: string, to: string) { const result = await client.promptAndWait({ prompt: `swap $${amount} of ${from} to ${to}`, }); // SDK returns transaction data - you must submit it yourself if (result.transactions?.length) { for (const tx of result.transactions) { // Submit using your wallet (e.g., viem walletClient) // const hash = await walletClient.sendTransaction(tx.metadata.transaction); } } return { response: result.response, transactions: result.transactions, };} Limitations[​](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#limitations "Direct link to Limitations") ------------------------------------------------------------------------------------------------------------------ Through the SDK, these are **not** supported: * Solana operations (use API directly) * Polymarket betting (use API directly) For full feature access, use the Agent API directly or the bankr-agent plugin. * [Installation](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#installation) * [Capabilities](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#capabilities) * [Market Analysis](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#market-analysis) * [Portfolio Tracking](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#portfolio-tracking) * [Token Swaps](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#token-swaps) * [Leveraged Trading](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#leveraged-trading) * [SDK Features](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#sdk-features) * [x402 Micropayments](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#x402-micropayments) * [Example: Portfolio Dashboard](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#example-portfolio-dashboard) * [Limitations](https://docs.bankr.bot/claude-plugins/bankr-x402-sdk-dev#limitations) --- # TWAP Orders | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/trading/twap-orders#__docusaurus_skipToContent_fallback) On this page Time-Weighted Average Price orders for large trades. Overview[​](https://docs.bankr.bot/features/trading/twap-orders#overview "Direct link to Overview") ---------------------------------------------------------------------------------------------------- TWAP (Time-Weighted Average Price) splits large orders into smaller chunks executed over time. This: * Reduces price impact * Gets better average execution * Minimizes slippage on big trades Supported Chains[​](https://docs.bankr.bot/features/trading/twap-orders#supported-chains "Direct link to Supported Chains") ---------------------------------------------------------------------------------------------------------------------------- TWAP orders are available on **EVM chains only**: * Base * Ethereum * Polygon * Unichain Not available on Solana. Basic TWAP[​](https://docs.bankr.bot/features/trading/twap-orders#basic-twap "Direct link to Basic TWAP") ---------------------------------------------------------------------------------------------------------- Split a large sell over time: "sell 1000 BNKR over the next 4 hours""TWAP sell 5000 DEGEN over 2 hours" When to Use TWAP[​](https://docs.bankr.bot/features/trading/twap-orders#when-to-use-twap "Direct link to When to Use TWAP") ---------------------------------------------------------------------------------------------------------------------------- TWAP is best for: * Large positions relative to liquidity * Tokens with thin order books * Minimizing market impact ### Example Scenario[​](https://docs.bankr.bot/features/trading/twap-orders#example-scenario "Direct link to Example Scenario") You hold 10,000 BNKR and want to sell. A single swap might: * Move the price significantly * Get poor execution due to slippage With TWAP: "sell 10000 BNKR over 6 hours" This executes smaller chunks every few minutes, getting better average price. Configuration[​](https://docs.bankr.bot/features/trading/twap-orders#configuration "Direct link to Configuration") ------------------------------------------------------------------------------------------------------------------- ### Duration[​](https://docs.bankr.bot/features/trading/twap-orders#duration "Direct link to Duration") How long to spread the execution: "TWAP sell 5000 DEGEN over 1 hour""TWAP sell 10000 BNKR over 4 hours""TWAP sell 50000 tokens over 24 hours" ### Chunk Size[​](https://docs.bankr.bot/features/trading/twap-orders#chunk-size "Direct link to Chunk Size") Bankr automatically calculates optimal chunk sizes based on: * Total amount * Duration * Typical gas costs Managing TWAP Orders[​](https://docs.bankr.bot/features/trading/twap-orders#managing-twap-orders "Direct link to Managing TWAP Orders") ---------------------------------------------------------------------------------------------------------------------------------------- ### View Active TWAPs[​](https://docs.bankr.bot/features/trading/twap-orders#view-active-twaps "Direct link to View Active TWAPs") "show my TWAP orders""what automations do I have?" ### Cancel TWAP[​](https://docs.bankr.bot/features/trading/twap-orders#cancel-twap "Direct link to Cancel TWAP") "cancel my TWAP order""cancel TWAP for BNKR" Canceling stops future executions but doesn't reverse completed chunks. Tips[​](https://docs.bankr.bot/features/trading/twap-orders#tips "Direct link to Tips") ---------------------------------------------------------------------------------------- ### Choose Appropriate Duration[​](https://docs.bankr.bot/features/trading/twap-orders#choose-appropriate-duration "Direct link to Choose Appropriate Duration") * **1-2 hours**: Medium positions, moderate liquidity * **4-6 hours**: Large positions * **12-24 hours**: Very large positions, patient execution ### Monitor Progress[​](https://docs.bankr.bot/features/trading/twap-orders#monitor-progress "Direct link to Monitor Progress") Check in periodically: "how's my TWAP order doing?" Limitations[​](https://docs.bankr.bot/features/trading/twap-orders#limitations "Direct link to Limitations") ------------------------------------------------------------------------------------------------------------- * Not available on Solana * Not available via XMTP * Requires balance for entire duration * Gas needed for each chunk execution * Cannot modify after creation (cancel and recreate) * [Overview](https://docs.bankr.bot/features/trading/twap-orders#overview) * [Supported Chains](https://docs.bankr.bot/features/trading/twap-orders#supported-chains) * [Basic TWAP](https://docs.bankr.bot/features/trading/twap-orders#basic-twap) * [When to Use TWAP](https://docs.bankr.bot/features/trading/twap-orders#when-to-use-twap) * [Example Scenario](https://docs.bankr.bot/features/trading/twap-orders#example-scenario) * [Configuration](https://docs.bankr.bot/features/trading/twap-orders#configuration) * [Duration](https://docs.bankr.bot/features/trading/twap-orders#duration) * [Chunk Size](https://docs.bankr.bot/features/trading/twap-orders#chunk-size) * [Managing TWAP Orders](https://docs.bankr.bot/features/trading/twap-orders#managing-twap-orders) * [View Active TWAPs](https://docs.bankr.bot/features/trading/twap-orders#view-active-twaps) * [Cancel TWAP](https://docs.bankr.bot/features/trading/twap-orders#cancel-twap) * [Tips](https://docs.bankr.bot/features/trading/twap-orders#tips) * [Choose Appropriate Duration](https://docs.bankr.bot/features/trading/twap-orders#choose-appropriate-duration) * [Monitor Progress](https://docs.bankr.bot/features/trading/twap-orders#monitor-progress) * [Limitations](https://docs.bankr.bot/features/trading/twap-orders#limitations) --- # Limit Orders | Bankr Documentation [Skip to main content](https://docs.bankr.bot/features/trading/limit-orders#__docusaurus_skipToContent_fallback) On this page Buy or sell tokens when they reach a specific price. Overview[​](https://docs.bankr.bot/features/trading/limit-orders#overview "Direct link to Overview") ----------------------------------------------------------------------------------------------------- Limit orders execute automatically when your price target is hit. They're useful for: * Buying dips ("buy when it drops 10%") * Taking profits ("sell when it rises 20%") * Entering positions at better prices Supported Chains[​](https://docs.bankr.bot/features/trading/limit-orders#supported-chains "Direct link to Supported Chains") ----------------------------------------------------------------------------------------------------------------------------- Limit orders are available on **EVM chains only**: * Base * Ethereum * Polygon * Unichain Not available on Solana. Limit Buy Orders[​](https://docs.bankr.bot/features/trading/limit-orders#limit-buy-orders "Direct link to Limit Buy Orders") ----------------------------------------------------------------------------------------------------------------------------- Buy tokens when the price drops: "buy 100 BNKR if it drops 10%""buy $50 of ETH when price drops 15%""buy DEGEN if it drops to $0.001" Limit Sell Orders[​](https://docs.bankr.bot/features/trading/limit-orders#limit-sell-orders "Direct link to Limit Sell Orders") -------------------------------------------------------------------------------------------------------------------------------- Sell tokens when the price rises: "sell my BNKR when it rises 20%""sell 50% of my DEGEN when it goes up 30%""sell DEGEN when BTC reaches $50,000" Price Targets[​](https://docs.bankr.bot/features/trading/limit-orders#price-targets "Direct link to Price Targets") -------------------------------------------------------------------------------------------------------------------- ### Percentage Change[​](https://docs.bankr.bot/features/trading/limit-orders#percentage-change "Direct link to Percentage Change") Most common—trigger based on price movement: "buy BNKR if it drops 10%" # -10% from current"sell BNKR when it rises 20%" # +20% from current ### Absolute Price[​](https://docs.bankr.bot/features/trading/limit-orders#absolute-price "Direct link to Absolute Price") Trigger at a specific USD price: "sell ETH when it reaches $4000""buy BTC if it drops to $60000" ### Relative to Another Asset[​](https://docs.bankr.bot/features/trading/limit-orders#relative-to-another-asset "Direct link to Relative to Another Asset") Trigger based on another token's price: "sell my DEGEN when BTC reaches $50,000" Managing Limit Orders[​](https://docs.bankr.bot/features/trading/limit-orders#managing-limit-orders "Direct link to Managing Limit Orders") -------------------------------------------------------------------------------------------------------------------------------------------- ### View Active Orders[​](https://docs.bankr.bot/features/trading/limit-orders#view-active-orders "Direct link to View Active Orders") "show my limit orders""what automations do I have?" ### Cancel Orders[​](https://docs.bankr.bot/features/trading/limit-orders#cancel-orders "Direct link to Cancel Orders") "cancel my limit order for BNKR""cancel all my limit orders" How It Works[​](https://docs.bankr.bot/features/trading/limit-orders#how-it-works "Direct link to How It Works") ----------------------------------------------------------------------------------------------------------------- 1. **You set the order** — Specify token, amount, and trigger 2. **Bankr monitors price** — Checks continuously 3. **Trigger hits** — Price reaches your target 4. **Order executes** — Swap happens automatically Example Strategies[​](https://docs.bankr.bot/features/trading/limit-orders#example-strategies "Direct link to Example Strategies") ----------------------------------------------------------------------------------------------------------------------------------- ### Buy the Dip[​](https://docs.bankr.bot/features/trading/limit-orders#buy-the-dip "Direct link to Buy the Dip") "buy $100 of ETH if it drops 5%" ### Take Profits[​](https://docs.bankr.bot/features/trading/limit-orders#take-profits "Direct link to Take Profits") "sell half my BNKR when it rises 50%" ### Scale In[​](https://docs.bankr.bot/features/trading/limit-orders#scale-in "Direct link to Scale In") Set multiple orders at different levels: "buy $50 of BNKR if it drops 10%""buy $50 of BNKR if it drops 20%""buy $100 of BNKR if it drops 30%" Requirements[​](https://docs.bankr.bot/features/trading/limit-orders#requirements "Direct link to Requirements") ----------------------------------------------------------------------------------------------------------------- * Sufficient balance of the sell token * Sufficient gas for execution (or gas sponsorship) * Token must have adequate liquidity Limitations[​](https://docs.bankr.bot/features/trading/limit-orders#limitations "Direct link to Limitations") -------------------------------------------------------------------------------------------------------------- * Not available on Solana * Not available via XMTP * Price targets are approximate (execution depends on DEX liquidity) * Orders expire if balance becomes insufficient * [Overview](https://docs.bankr.bot/features/trading/limit-orders#overview) * [Supported Chains](https://docs.bankr.bot/features/trading/limit-orders#supported-chains) * [Limit Buy Orders](https://docs.bankr.bot/features/trading/limit-orders#limit-buy-orders) * [Limit Sell Orders](https://docs.bankr.bot/features/trading/limit-orders#limit-sell-orders) * [Price Targets](https://docs.bankr.bot/features/trading/limit-orders#price-targets) * [Percentage Change](https://docs.bankr.bot/features/trading/limit-orders#percentage-change) * [Absolute Price](https://docs.bankr.bot/features/trading/limit-orders#absolute-price) * [Relative to Another Asset](https://docs.bankr.bot/features/trading/limit-orders#relative-to-another-asset) * [Managing Limit Orders](https://docs.bankr.bot/features/trading/limit-orders#managing-limit-orders) * [View Active Orders](https://docs.bankr.bot/features/trading/limit-orders#view-active-orders) * [Cancel Orders](https://docs.bankr.bot/features/trading/limit-orders#cancel-orders) * [How It Works](https://docs.bankr.bot/features/trading/limit-orders#how-it-works) * [Example Strategies](https://docs.bankr.bot/features/trading/limit-orders#example-strategies) * [Buy the Dip](https://docs.bankr.bot/features/trading/limit-orders#buy-the-dip) * [Take Profits](https://docs.bankr.bot/features/trading/limit-orders#take-profits) * [Scale In](https://docs.bankr.bot/features/trading/limit-orders#scale-in) * [Requirements](https://docs.bankr.bot/features/trading/limit-orders#requirements) * [Limitations](https://docs.bankr.bot/features/trading/limit-orders#limitations) --- # Prompt and Poll | Bankr Documentation [Skip to main content](https://docs.bankr.bot/sdk/prompt-and-poll#__docusaurus_skipToContent_fallback) On this page Core patterns for sending prompts and receiving results. Quick Method: `promptAndWait`[​](https://docs.bankr.bot/sdk/prompt-and-poll#quick-method-promptandwait "Direct link to quick-method-promptandwait") ---------------------------------------------------------------------------------------------------------------------------------------------------- The simplest way to use the SDK. Sends a prompt and waits for completion: const result = await client.promptAndWait({ prompt: 'what is the price of ETH?',});console.log(result.response); ### Options[​](https://docs.bankr.bot/sdk/prompt-and-poll#options "Direct link to Options") const result = await client.promptAndWait({ prompt: 'swap $10 of ETH to USDC', walletAddress: '0x...', // Optional: override context wallet interval: 2000, // Optional: polling interval (ms) maxAttempts: 150, // Optional: max poll attempts timeout: 300000, // Optional: total timeout (ms)}); Manual: Prompt Then Poll[​](https://docs.bankr.bot/sdk/prompt-and-poll#manual-prompt-then-poll "Direct link to Manual: Prompt Then Poll") ------------------------------------------------------------------------------------------------------------------------------------------ For more control, separate the prompt and polling: ### Step 1: Submit Prompt[​](https://docs.bankr.bot/sdk/prompt-and-poll#step-1-submit-prompt "Direct link to Step 1: Submit Prompt") const promptResponse = await client.prompt({ prompt: 'buy $5 of BNKR on base',});console.log(promptResponse.jobId); // "abc123"console.log(promptResponse.status); // "pending" ### Step 2: Poll for Results[​](https://docs.bankr.bot/sdk/prompt-and-poll#step-2-poll-for-results "Direct link to Step 2: Poll for Results") const result = await client.pollJob({ jobId: promptResponse.jobId, interval: 2000, // Check every 2 seconds maxAttempts: 150, // Max 150 attempts timeout: 300000, // 5 minute timeout});if (result.status === 'completed') { console.log(result.response);} else if (result.status === 'failed') { console.error(result.error);} Check Job Status (Single)[​](https://docs.bankr.bot/sdk/prompt-and-poll#check-job-status-single "Direct link to Check Job Status (Single)") -------------------------------------------------------------------------------------------------------------------------------------------- Get status without polling: const status = await client.getJobStatus('abc123');console.log(status.status); // "processing"console.log(status.cancellable); // true Cancel a Job[​](https://docs.bankr.bot/sdk/prompt-and-poll#cancel-a-job "Direct link to Cancel a Job") ------------------------------------------------------------------------------------------------------- Cancel a running job: const result = await client.cancelJob('abc123');console.log(result.status); // "cancelled" Response Types[​](https://docs.bankr.bot/sdk/prompt-and-poll#response-types "Direct link to Response Types") ------------------------------------------------------------------------------------------------------------- ### JobStatus[​](https://docs.bankr.bot/sdk/prompt-and-poll#jobstatus "Direct link to JobStatus") interface JobStatus { success: boolean; jobId: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; prompt: string; createdAt: string; processingTime?: number; response?: string; error?: string; transactions?: Transaction[]; richData?: RichData[]; cancellable?: boolean;} ### Handling Transactions[​](https://docs.bankr.bot/sdk/prompt-and-poll#handling-transactions "Direct link to Handling Transactions") The SDK returns transaction data that **you must submit to the blockchain yourself**. This is different from the Agent API, which executes transactions for you. When a job returns transactions: const result = await client.promptAndWait({ prompt: 'swap $50 USDC to ETH on base',});if (result.transactions?.length) { for (const tx of result.transactions) { console.log(`Type: ${tx.type}`); console.log(`Chain: ${tx.metadata.chainId}`); console.log(`To: ${tx.metadata.transaction.to}`); // You must submit this transaction using your own wallet // Example with viem: // const hash = await walletClient.sendTransaction(tx.metadata.transaction); }} tip If you don't want to manage transaction submission yourself, use the [Agent API](https://docs.bankr.bot/agent-api/overview) instead — it executes transactions automatically. ### Handling Rich Data[​](https://docs.bankr.bot/sdk/prompt-and-poll#handling-rich-data "Direct link to Handling Rich Data") if (result.richData?.length) { for (const data of result.richData) { if (data.type === 'chart') { console.log(`Chart URL: ${data.url}`); } else if (data.type === 'social-card') { console.log(`Card: ${data.text}`); } }} Error Handling[​](https://docs.bankr.bot/sdk/prompt-and-poll#error-handling "Direct link to Error Handling") ------------------------------------------------------------------------------------------------------------- try { const result = await client.promptAndWait({ prompt: 'invalid operation', });} catch (error) { if (error.message.includes('Payment required')) { console.error('Insufficient USDC balance'); } else if (error.message.includes('timeout')) { console.error('Operation timed out'); } else { console.error('Unknown error:', error.message); }} XMTP Integration[​](https://docs.bankr.bot/sdk/prompt-and-poll#xmtp-integration "Direct link to XMTP Integration") ------------------------------------------------------------------------------------------------------------------- Format responses for XMTP messaging: const result = await client.promptAndWait({ prompt: 'swap $10 ETH to USDC', xmtp: true, // Formats transaction data for XMTP}); * [Quick Method: `promptAndWait`](https://docs.bankr.bot/sdk/prompt-and-poll#quick-method-promptandwait) * [Options](https://docs.bankr.bot/sdk/prompt-and-poll#options) * [Manual: Prompt Then Poll](https://docs.bankr.bot/sdk/prompt-and-poll#manual-prompt-then-poll) * [Step 1: Submit Prompt](https://docs.bankr.bot/sdk/prompt-and-poll#step-1-submit-prompt) * [Step 2: Poll for Results](https://docs.bankr.bot/sdk/prompt-and-poll#step-2-poll-for-results) * [Check Job Status (Single)](https://docs.bankr.bot/sdk/prompt-and-poll#check-job-status-single) * [Cancel a Job](https://docs.bankr.bot/sdk/prompt-and-poll#cancel-a-job) * [Response Types](https://docs.bankr.bot/sdk/prompt-and-poll#response-types) * [JobStatus](https://docs.bankr.bot/sdk/prompt-and-poll#jobstatus) * [Handling Transactions](https://docs.bankr.bot/sdk/prompt-and-poll#handling-transactions) * [Handling Rich Data](https://docs.bankr.bot/sdk/prompt-and-poll#handling-rich-data) * [Error Handling](https://docs.bankr.bot/sdk/prompt-and-poll#error-handling) * [XMTP Integration](https://docs.bankr.bot/sdk/prompt-and-poll#xmtp-integration) --- # Examples | Bankr Documentation [Skip to main content](https://docs.bankr.bot/sdk/examples#__docusaurus_skipToContent_fallback) On this page Common SDK use cases and patterns. note The SDK returns transaction data for operations that require blockchain transactions. You must submit these transactions using your own wallet. For read-only operations (prices, balances), you receive responses directly. If you want Bankr to execute transactions for you, use the [Agent API](https://docs.bankr.bot/agent-api/overview) instead. Price Queries[​](https://docs.bankr.bot/sdk/examples#price-queries "Direct link to Price Queries") --------------------------------------------------------------------------------------------------- import { BankrClient } from '@bankr/sdk';const client = new BankrClient({ privateKey: process.env.PRIVATE_KEY as `0x${string}`, baseUrl: 'https://api.bankr.bot',});// Get token price (read-only, no transaction needed)const result = await client.promptAndWait({ prompt: 'what is the price of ETH?',});console.log(result.response);// Get multiple pricesconst prices = await client.promptAndWait({ prompt: 'prices of ETH, BTC, and SOL',});console.log(prices.response); Token Swaps[​](https://docs.bankr.bot/sdk/examples#token-swaps "Direct link to Token Swaps") --------------------------------------------------------------------------------------------- // Swap request - returns transaction dataconst swap = await client.promptAndWait({ prompt: 'swap $50 of ETH to USDC on base',});// You must submit the transaction yourselfif (swap.transactions?.length) { for (const tx of swap.transactions) { // Submit using your wallet (e.g., viem) // const hash = await walletClient.sendTransaction(tx.metadata.transaction); console.log('Transaction to submit:', tx.metadata.transaction); }}// Other swap examplesconst swap2 = await client.promptAndWait({ prompt: 'swap 0.1 ETH to USDC' });const swap3 = await client.promptAndWait({ prompt: 'swap 50% of my USDC to ETH' });const swap4 = await client.promptAndWait({ prompt: 'sell all my BNKR for ETH' }); Balance Checks[​](https://docs.bankr.bot/sdk/examples#balance-checks "Direct link to Balance Checks") ------------------------------------------------------------------------------------------------------ // All balancesconst balances = await client.promptAndWait({ prompt: 'what are my token balances?',});// Specific chainconst baseBalances = await client.promptAndWait({ prompt: 'my balances on base',});// Specific tokenconst usdcBalance = await client.promptAndWait({ prompt: 'how much USDC do I have?',}); Token Launching[​](https://docs.bankr.bot/sdk/examples#token-launching "Direct link to Token Launching") --------------------------------------------------------------------------------------------------------- // Simple launchconst launch = await client.promptAndWait({ prompt: 'deploy a token called MyAgent with symbol AGENT on base', timeout: 600000, // 10 minute timeout for launches});// Launch with vestingconst vestedLaunch = await client.promptAndWait({ prompt: 'launch a token called TeamCoin on solana', timeout: 600000,});console.log(launch.response);// Includes contract address, pool URL, etc. Limit Orders[​](https://docs.bankr.bot/sdk/examples#limit-orders "Direct link to Limit Orders") ------------------------------------------------------------------------------------------------ // Buy on dipconst limitBuy = await client.promptAndWait({ prompt: 'buy 100 BNKR if it drops 10%',});// Sell on pumpconst limitSell = await client.promptAndWait({ prompt: 'sell my BNKR when it rises 20%',}); DCA Orders[​](https://docs.bankr.bot/sdk/examples#dca-orders "Direct link to DCA Orders") ------------------------------------------------------------------------------------------ // Daily DCAconst dca = await client.promptAndWait({ prompt: 'DCA $100 USDC into BNKR every day at 9am',});// Hourly DCA with limitconst dcaLimited = await client.promptAndWait({ prompt: 'DCA $50 ETH into BNKR every 6 hours for 7 days',}); Polymarket Betting[​](https://docs.bankr.bot/sdk/examples#polymarket-betting "Direct link to Polymarket Betting") ------------------------------------------------------------------------------------------------------------------ // Search marketsconst markets = await client.promptAndWait({ prompt: 'what are the odds the eagles win this weekend?',});// Place betconst bet = await client.promptAndWait({ prompt: 'bet $5 on eagles to win tonight',}); Leveraged Trading[​](https://docs.bankr.bot/sdk/examples#leveraged-trading "Direct link to Leveraged Trading") --------------------------------------------------------------------------------------------------------------- // Simple longconst long = await client.promptAndWait({ prompt: 'buy $10 of GOLD',});// Long with leverage and stopsconst leveragedLong = await client.promptAndWait({ prompt: 'buy $50 of BTC/USD with 10x leverage, 5% stop loss, and 200% take profit',});// Short positionconst short = await client.promptAndWait({ prompt: 'short $25 of ETH/USD with 5x leverage',}); Transfers[​](https://docs.bankr.bot/sdk/examples#transfers "Direct link to Transfers") --------------------------------------------------------------------------------------- // Send ETHconst sendEth = await client.promptAndWait({ prompt: 'send 0.1 ETH to 0x1234...',});// Send tokensconst sendTokens = await client.promptAndWait({ prompt: 'send 100 USDC to @username on twitter',}); Fee Management[​](https://docs.bankr.bot/sdk/examples#fee-management "Direct link to Fee Management") ------------------------------------------------------------------------------------------------------ // Check feesconst fees = await client.promptAndWait({ prompt: 'how much fees have I earned from my tokens?',});// Claim feesconst claim = await client.promptAndWait({ prompt: 'claim my fees for MyToken',}); Building an Agent[​](https://docs.bankr.bot/sdk/examples#building-an-agent "Direct link to Building an Agent") --------------------------------------------------------------------------------------------------------------- tip For most agent use cases, the [Agent API](https://docs.bankr.bot/agent-api/overview) is simpler because it handles transaction execution for you. Use the SDK only if you need to manage your own wallet and transaction submission. Complete example using the SDK: import { BankrClient } from '@bankr/sdk';class TradingAgent { private client: BankrClient; constructor(privateKey: `0x${string}`) { this.client = new BankrClient({ privateKey, baseUrl: 'https://api.bankr.bot', }); } async getPrice(token: string): Promise { const result = await this.client.promptAndWait({ prompt: `what is the price of ${token}?`, }); return result.response || 'Unable to get price'; } // Returns transaction data - you must submit it yourself async prepareSwap(amount: number, from: string, to: string, chain: string) { const result = await this.client.promptAndWait({ prompt: `swap $${amount} of ${from} to ${to} on ${chain}`, }); return { response: result.response, transactions: result.transactions, // Submit these with your wallet }; } async checkBalances(): Promise { const result = await this.client.promptAndWait({ prompt: 'what are my token balances?', }); return result.response || 'Unable to get balances'; }}// Usageconst agent = new TradingAgent(process.env.PRIVATE_KEY as `0x${string}`);const price = await agent.getPrice('ETH');const balances = await agent.checkBalances();const swapData = await agent.prepareSwap(50, 'USDC', 'ETH', 'base');// Submit transactions using your wallet infrastructureif (swapData.transactions?.length) { // walletClient.sendTransaction(swapData.transactions[0].metadata.transaction);} * [Price Queries](https://docs.bankr.bot/sdk/examples#price-queries) * [Token Swaps](https://docs.bankr.bot/sdk/examples#token-swaps) * [Balance Checks](https://docs.bankr.bot/sdk/examples#balance-checks) * [Token Launching](https://docs.bankr.bot/sdk/examples#token-launching) * [Limit Orders](https://docs.bankr.bot/sdk/examples#limit-orders) * [DCA Orders](https://docs.bankr.bot/sdk/examples#dca-orders) * [Polymarket Betting](https://docs.bankr.bot/sdk/examples#polymarket-betting) * [Leveraged Trading](https://docs.bankr.bot/sdk/examples#leveraged-trading) * [Transfers](https://docs.bankr.bot/sdk/examples#transfers) * [Fee Management](https://docs.bankr.bot/sdk/examples#fee-management) * [Building an Agent](https://docs.bankr.bot/sdk/examples#building-an-agent) --- # AI Coding Tools | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/coding-tools/overview#__docusaurus_skipToContent_fallback) On this page Use the Bankr LLM Gateway with popular AI coding assistants. Get Your API Key **[Get your LLM Gateway API key →](https://bankr.bot/api) ** Automated Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#automated-setup-with-bankr-cli "Direct link to Automated Setup with Bankr CLI") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The [Bankr CLI](https://docs.bankr.bot/agent-api/cli) can configure most tools automatically: bankr llm setup openclaw --install # OpenClawbankr llm setup opencode --install # OpenCodebankr llm setup claude # Claude Code (prints env vars)bankr llm setup cursor # Cursor (guided instructions) You can also launch Claude Code directly through the gateway: bankr llm claude Install the CLI: bun install -g @bankr/clibankr login Supported Tools[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#supported-tools "Direct link to Supported Tools") ------------------------------------------------------------------------------------------------------------------------------ | Tool | Type | Configuration | | --- | --- | --- | | [Claude Code](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code) | CLI | Native Anthropic API | | [Codex](https://docs.bankr.bot/llm-gateway/coding-tools/codex) | CLI | OpenAI-compatible | | [Cursor](https://docs.bankr.bot/llm-gateway/coding-tools/cursor) | IDE | OpenAI-compatible | | [OpenCode](https://docs.bankr.bot/llm-gateway/coding-tools/opencode) | CLI | OpenAI-compatible | Quick Reference[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#quick-reference "Direct link to Quick Reference") ------------------------------------------------------------------------------------------------------------------------------ | Setting | Value | | --- | --- | | **Base URL** | `https://llm.bankr.bot` | | **API Key** | Your Bankr API key (`bk_...`) | | **Model** | Any supported model ID | Flexible URL Paths The gateway accepts both `https://llm.bankr.bot` and `https://llm.bankr.bot/v1` as the base URL. Both formats work with all SDKs — the server normalizes paths automatically. ### Available Models[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models "Direct link to Available Models") | Model | Best For | | --- | --- | | `claude-opus-4.6` | Most capable, advanced reasoning | | `claude-opus-4.5` | Complex reasoning, architecture | | `claude-sonnet-4.5` | Balanced speed and quality | | `claude-haiku-4.5` | Fast completions, simple tasks | | `gemini-3-pro` | Long context (2M tokens) | | `gemini-3-flash` | High throughput | | `gemini-2.5-pro` | Long context, multimodal | | `gemini-2.5-flash` | Speed, high throughput | | `gpt-5.2` | Advanced reasoning | | `gpt-5.2-codex` | Code generation | | `gpt-5-mini` | Fast, economical | | `gpt-5-nano` | Ultra-fast, lowest cost | | `kimi-k2.5` | Long-context reasoning | | `qwen3-coder` | Code generation, debugging | Environment Setup[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#environment-setup "Direct link to Environment Setup") ------------------------------------------------------------------------------------------------------------------------------------ Use environment variables or the Bankr CLI config to manage your keys: # Add to ~/.bashrc, ~/.zshrc, or ~/.profileexport BANKR_API_KEY=bk_your_api_key_here# Optional: use a separate key for LLM gateway (falls back to BANKR_API_KEY)export BANKR_LLM_KEY=your_llm_key_here Or configure via the CLI: bankr login # set API key (interactive)bankr config set llmKey YOUR_LLM_KEY # set separate LLM key Bankr Skill for OpenClaw Agents[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#bankr-skill-for-openclaw-agents "Direct link to Bankr Skill for OpenClaw Agents") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ If you're using OpenClaw, install the **Bankr skill** to give your agent crypto trading and DeFi capabilities: Install in OpenClaw > install the bankr skill from [https://github.com/BankrBot/openclaw-skills](https://github.com/BankrBot/openclaw-skills) The Bankr skill can also help your agent configure the LLM gateway — it knows the available models and can guide setup. See [Installing the Bankr Skill](https://docs.bankr.bot/openclaw/installation) for details. Common Troubleshooting[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#common-troubleshooting "Direct link to Common Troubleshooting") --------------------------------------------------------------------------------------------------------------------------------------------------- ### 401 Unauthorized[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#401-unauthorized "Direct link to 401 Unauthorized") * Verify your key is set: `bankr config get llmKey` or `echo $BANKR_LLM_KEY` * Check for leading/trailing spaces in the key * Ensure the key hasn't expired ### Model not found[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#model-not-found "Direct link to Model not found") * Use exact model IDs (e.g., `claude-sonnet-4.5`, not `claude-3-sonnet`) ### Slow responses[​](https://docs.bankr.bot/llm-gateway/coding-tools/overview#slow-responses "Direct link to Slow responses") * Try `claude-haiku-4.5` or `gemini-3-flash` for faster responses * [Automated Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/coding-tools/overview#automated-setup-with-bankr-cli) * [Supported Tools](https://docs.bankr.bot/llm-gateway/coding-tools/overview#supported-tools) * [Quick Reference](https://docs.bankr.bot/llm-gateway/coding-tools/overview#quick-reference) * [Available Models](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models) * [Environment Setup](https://docs.bankr.bot/llm-gateway/coding-tools/overview#environment-setup) * [Bankr Skill for OpenClaw Agents](https://docs.bankr.bot/llm-gateway/coding-tools/overview#bankr-skill-for-openclaw-agents) * [Common Troubleshooting](https://docs.bankr.bot/llm-gateway/coding-tools/overview#common-troubleshooting) * [401 Unauthorized](https://docs.bankr.bot/llm-gateway/coding-tools/overview#401-unauthorized) * [Model not found](https://docs.bankr.bot/llm-gateway/coding-tools/overview#model-not-found) * [Slow responses](https://docs.bankr.bot/llm-gateway/coding-tools/overview#slow-responses) --- # OpenCode | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#__docusaurus_skipToContent_fallback) On this page [OpenCode](https://github.com/opencode-ai/opencode) is an open-source AI coding assistant. Quick Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#quick-setup-with-bankr-cli "Direct link to Quick Setup with Bankr CLI") --------------------------------------------------------------------------------------------------------------------------------------------------------------- The fastest way to configure OpenCode is with the [Bankr CLI](https://docs.bankr.bot/agent-api/cli) : # Auto-install Bankr provider into ~/.config/opencode/opencode.jsonbankr llm setup opencode --install To preview the config without writing it: bankr llm setup opencode Manual Configuration[​](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#manual-configuration "Direct link to Manual Configuration") --------------------------------------------------------------------------------------------------------------------------------------------- Create or edit `~/.opencode/config.json`: { "provider": { "name": "custom", "baseUrl": "https://llm.bankr.bot/v1", "apiKey": "${BANKR_LLM_KEY}", "model": "claude-sonnet-4.5" }} ### Environment Variables Alternative[​](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#environment-variables-alternative "Direct link to Environment Variables Alternative") export OPENCODE_API_BASE=https://llm.bankr.bot/v1export OPENCODE_API_KEY=$BANKR_LLM_KEYexport OPENCODE_MODEL=claude-sonnet-4.5 See [Available Models](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models) for all supported models. * [Quick Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#quick-setup-with-bankr-cli) * [Manual Configuration](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#manual-configuration) * [Environment Variables Alternative](https://docs.bankr.bot/llm-gateway/coding-tools/opencode#environment-variables-alternative) --- # Claude Code | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#__docusaurus_skipToContent_fallback) On this page [Claude Code](https://docs.anthropic.com/en/docs/claude-code) is Anthropic's official CLI for AI-assisted coding. Quick Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#quick-setup-with-bankr-cli "Direct link to Quick Setup with Bankr CLI") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ The fastest way to get started is with the [Bankr CLI](https://docs.bankr.bot/agent-api/cli) : # Print the env vars to add to your shell profilebankr llm setup claude Or launch Claude Code directly through the gateway — no manual config needed: bankr llm claude This sets `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` automatically and spawns Claude Code. You can pass any Claude Code flags after it: bankr llm claude --model claude-opus-4.6 tip If you haven't logged in yet, run `bankr login` first. The CLI uses your stored API key. Manual Configuration[​](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#manual-configuration "Direct link to Manual Configuration") ------------------------------------------------------------------------------------------------------------------------------------------------ Create or edit `~/.claude/settings.json`: { "apiKeyHelper": "echo $BANKR_LLM_KEY", "apiBaseUrl": "https://llm.bankr.bot"} Base URL Use `https://llm.bankr.bot` (without `/v1`) for Claude Code. ### Specifying a Model[​](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#specifying-a-model "Direct link to Specifying a Model") { "apiKeyHelper": "echo $BANKR_LLM_KEY", "apiBaseUrl": "https://llm.bankr.bot", "model": "claude-sonnet-4.5"} ### Environment Variables Alternative[​](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#environment-variables-alternative "Direct link to Environment Variables Alternative") You can also set environment variables in your shell profile (`~/.zshrc`, `~/.bashrc`): export ANTHROPIC_BASE_URL="https://llm.bankr.bot"export ANTHROPIC_AUTH_TOKEN="bk_your_api_key_here" See [Available Models](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models) for all supported models. * [Quick Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#quick-setup-with-bankr-cli) * [Manual Configuration](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#manual-configuration) * [Specifying a Model](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#specifying-a-model) * [Environment Variables Alternative](https://docs.bankr.bot/llm-gateway/coding-tools/claude-code#environment-variables-alternative) --- # Codex | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/coding-tools/codex#__docusaurus_skipToContent_fallback) On this page [Codex](https://github.com/openai/codex) is OpenAI's CLI for AI-assisted coding. Configuration[​](https://docs.bankr.bot/llm-gateway/coding-tools/codex#configuration "Direct link to Configuration") --------------------------------------------------------------------------------------------------------------------- Set environment variables: export OPENAI_API_KEY=$BANKR_LLM_KEYexport OPENAI_BASE_URL=https://llm.bankr.bot/v1 Then run: codex Specifying a Model[​](https://docs.bankr.bot/llm-gateway/coding-tools/codex#specifying-a-model "Direct link to Specifying a Model") ------------------------------------------------------------------------------------------------------------------------------------ codex --model claude-sonnet-4.5 Or set it as default: export OPENAI_MODEL=claude-sonnet-4.5 See [Available Models](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models) for all supported models. * [Configuration](https://docs.bankr.bot/llm-gateway/coding-tools/codex#configuration) * [Specifying a Model](https://docs.bankr.bot/llm-gateway/coding-tools/codex#specifying-a-model) --- # Cursor | Bankr Documentation [Skip to main content](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#__docusaurus_skipToContent_fallback) On this page [Cursor](https://cursor.sh/) is an AI-powered code editor built on VS Code. Quick Setup with Bankr CLI[​](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#quick-setup-with-bankr-cli "Direct link to Quick Setup with Bankr CLI") ------------------------------------------------------------------------------------------------------------------------------------------------------------- The [Bankr CLI](https://docs.bankr.bot/agent-api/cli) provides step-by-step instructions tailored to your account: bankr llm setup cursor This prints the exact API key, base URL, and recommended models to enter in Cursor's settings UI. Manual Configuration[​](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#manual-configuration "Direct link to Manual Configuration") ------------------------------------------------------------------------------------------------------------------------------------------- 1. Open **Cursor Settings** → **Models** 2. Click **Add Model** 3. Configure: | Setting | Value | | --- | --- | | **API Base** | `https://llm.bankr.bot/v1` | | **API Key** | Your Bankr API key (`bk_...`) | | **Model** | `claude-sonnet-4.5` | See [Available Models](https://docs.bankr.bot/llm-gateway/coding-tools/overview#available-models) for all supported models. ### Model Not Appearing[​](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#model-not-appearing "Direct link to Model Not Appearing") Restart Cursor after adding or modifying the model configuration. * [Quick Setup with Bankr CLI](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#quick-setup-with-bankr-cli) * [Manual Configuration](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#manual-configuration) * [Model Not Appearing](https://docs.bankr.bot/llm-gateway/coding-tools/cursor#model-not-appearing) ---