Banking for Autonomous AI Agents

Decentralized Banking Platform for Autonomous AI Agents

Complete guide to register, manage wallets, execute transactions, and operate your AI agent's finances autonomously

📋 Quick Navigation:
→ Getting Started → Agent Registration → Create Wallets → Send Transactions → Complete API Docs → Code Examples → Security → FAQ
Base URL:
https://api.agentsbank.online

🚀 What is AgentsBank?

AgentsBank is a complete banking platform built specifically for autonomous AI agents. Unlike traditional banking APIs, AgentsBank enables:

🎯 Getting Started (5 Minutes)

Follow these steps to get your AI agent banking:

Step 1: Install the SDK

Add AgentsBank to your agent's dependencies:

npm install @agentsbank/sdk

Step 2: Initialize the SDK

import { AgentsBankSDK } from '@agentsbank/sdk'; const bank = new AgentsBankSDK({ apiUrl: 'https://api.agentsbank.online', });

Step 3: Register Your Agent

Your agent registers itself and its human owner:

const result = await bank.registerSelf({ humanUsername: 'alice', humanEmail: 'alice@example.com', firstName: 'ChatBot', lastName: 'Pro', agentPassword: 'SecurePass123!' }); console.log('Agent registered:', result.agentUsername); console.log('DID:', result.did);

Step 4: Create Wallets

// Create Ethereum wallet const ethWallet = await bank.createWallet('ethereum'); console.log('ETH address:', ethWallet.address); // Create Solana wallet const solWallet = await bank.createWallet('solana'); console.log('SOL address:', solWallet.address);

Step 5: Send Your First Transaction

const tx = await bank.sendTransaction( ethWallet.wallet_id, '0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1', '0.1', 'ETH' ); console.log('Transaction:', tx.tx_hash); console.log('Status:', tx.status);

📝 Agent Registration Details

Agents can register in two ways:

Interactive Registration

Your agent prompts for information interactively:

const result = await bank.registerSelf(); // Agent will ask: // Human username: alice // Human email: alice@example.com // Agent first name: ChatBot // Agent last name: Pro // Agent password: SecurePass123!

Programmatic Registration

Pre-configure all values:

const result = await bank.registerSelf({ humanUsername: 'alice', humanEmail: 'alice@example.com', firstName: 'ChatBot', lastName: 'Pro', agentPassword: 'SecurePass123!' });

What You Get

After registration, your agent receives:

✅ Password Requirements:
• Minimum 8 characters
• At least 1 uppercase letter
• At least 1 number
• At least 1 special character (!@#$%^&*)

💳 Create & Manage Wallets

After registration, create wallets on any supported blockchain:

Supported Blockchains

Chain ID Network Primary Asset
ethereum Ethereum Mainnet ETH
bsc Binance Smart Chain BNB
solana Solana Mainnet SOL
bitcoin Bitcoin Mainnet BTC

Create a Wallet

// Create Ethereum wallet const ethWallet = await bank.createWallet('ethereum'); console.log('Address:', ethWallet.address); console.log('Wallet ID:', ethWallet.wallet_id); // Create Solana wallet const solWallet = await bank.createWallet('solana'); // Create Bitcoin wallet const btcWallet = await bank.createWallet('bitcoin');

Get Wallet Balance

const balance = await bank.getBalance(walletId); console.log(balance); // Returns: // { // ETH: '1.5', // USDC: '100.50', // DAI: '50.00', // USD_VALUE: '3250.75' // }

List All Wallets

const wallets = await bank.listWallets(); wallets.forEach(wallet => { console.log(`${wallet.chain}: ${wallet.address}`); });

💸 Send Transactions

Send a Simple Transaction

const tx = await bank.sendTransaction( walletId, // Your wallet ID '0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1', // Recipient '0.5', // Amount 'ETH' // Asset ); console.log('Transaction Hash:', tx.tx_hash); console.log('Status:', tx.status); // pending, confirmed, or failed

Send with Advanced Options

const tx = await bank.sendTransaction( walletId, '0x742d35...', '100', 'USDC', { gasPrice: 'auto', // or specific gwei gasLimit: 100000, // custom limit memo: 'Payment for API', // optional note priority: 'standard' // low, standard, or high } );

Check Transaction Status

const status = await bank.getTransactionStatus(txHash); console.log('Status:', status.status); // pending, confirmed, failed console.log('Confirmations:', status.confirmations); console.log('Block:', status.block_number);

Get Transaction History

// Get recent transactions const history = await bank.getTransactionHistory(walletId); // With filters const recent = await bank.getTransactionHistory(walletId, { limit: 50, offset: 0, status: 'confirmed', asset: 'ETH' });
⏱️ Transaction Times:
Ethereum: 12-30 sec • BSC: 3-6 sec • Solana: 2-4 sec • Bitcoin: 10-60 min

🔌 REST API Reference

If you prefer direct REST API calls instead of the SDK, use these endpoints:

Agent Registration (Self-Register)

POST /api/auth/agent/register-self

Register agent and human owner autonomously

No Auth Required
curl -X POST https://api.agentsbank.online/api/auth/agent/register-self \ -H "Content-Type: application/json" \ -d '{ "human_username": "alice", "human_email": "alice@example.com", "first_name": "ChatBot", "last_name": "Pro", "agent_password": "SecurePass123!" }'

Response:

{ "agent_id": "uuid", "agent_username": "agent_1706...", "token": "eyJhbGciOiJIUzI1NiIs...", "did": "did:agentsbank:uuid", "api_key": "sk_agent_xyz123...", "message": "Agent self-registered successfully" }

Agent Login

POST /api/auth/agent/login

Login with agent credentials

No Auth Required
curl -X POST https://api.agentsbank.online/api/auth/agent/login \ -H "Content-Type: application/json" \ -d '{ "agent_username": "agent_1706...", "agent_password": "SecurePass123!" }'

Create Wallet (Agent)

POST /api/wallets

Create new wallet on specified chain

Auth Required (Agent Token)
curl -X POST https://api.agentsbank.online/api/wallets \ -H "Authorization: Bearer <agent-token>" \ -H "Content-Type: application/json" \ -d '{ "chain": "ethereum" }'

Response:

{ "wallet_id": "uuid", "agent_id": "uuid", "chain": "ethereum", "address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "type": "custodial", "created_at": "2026-02-07T..." }

List Wallets (Agent)

GET /api/wallets

Get all wallets for agent

Auth Required (Agent Token)
curl -X GET https://api.agentsbank.online/api/wallets \ -H "Authorization: Bearer <agent-token>"

Get Wallet Balance (Agent)

GET /api/wallets/:walletId/balance

Get current balance of wallet

Auth Required (Agent Token)
curl -X GET https://api.agentsbank.online/api/wallets/uuid/balance \ -H "Authorization: Bearer <agent-token>"

Response:

{ "ETH": "1.5", "USDC": "100.50", "DAI": "50.00", "USD_VALUE": "3250.75" }

Send Transaction (Agent)

POST /api/transactions/send

Execute transaction from wallet

Auth Required (Agent Token)
curl -X POST https://api.agentsbank.online/api/transactions/send \ -H "Authorization: Bearer <agent-token>" \ -H "Content-Type: application/json" \ -d '{ "wallet_id": "uuid", "to_address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "amount": "0.5", "asset": "ETH", "gas_price": "auto" }'

Response:

{ "tx_hash": "0x1234567890abcdef...", "wallet_id": "uuid", "chain": "ethereum", "from_address": "0x742d35...", "to_address": "0x999...", "amount": "0.5", "asset": "ETH", "status": "pending", "fee": "0.000945", "created_at": "2026-02-07T10:35:00Z" }

Get Transaction History (Agent)

GET /api/wallets/:walletId/transactions

Get transaction history for wallet

Auth Required (Agent Token)
curl -X GET "https://api.agentsbank.online/api/wallets/uuid/transactions?limit=50&status=confirmed" \ -H "Authorization: Bearer <agent-token>"

Public: Get Supported Chains

GET /api/catalogue/chains

List all supported blockchains (no auth needed)

No Auth Required
curl -X GET https://api.agentsbank.online/api/catalogue/chains

Public: Get Token Prices

GET /api/catalogue/prices

Get real-time token prices (no auth needed)

No Auth Required
curl -X GET https://api.agentsbank.online/api/catalogue/prices

💻 Complete Code Examples

Full Agent Workflow (Start to Finish)

import { AgentsBankSDK } from '@agentsbank/sdk'; // Step 1: Initialize const bank = new AgentsBankSDK({ apiUrl: 'https://api.agentsbank.online' }); // Step 2: Register agent and owner const registration = await bank.registerSelf({ humanUsername: 'alice', humanEmail: 'alice@example.com', firstName: 'Trading', lastName: 'Bot', agentPassword: 'SecurePass123!' }); console.log('✅ Registered:', registration.agentUsername); console.log('🆔 DID:', registration.did); // Step 3: Create wallets on different chains const ethWallet = await bank.createWallet('ethereum'); const solWallet = await bank.createWallet('solana'); const bscWallet = await bank.createWallet('bsc'); console.log('💳 Wallets:'); console.log('ETH:', ethWallet.address); console.log('SOL:', solWallet.address); console.log('BSC:', bscWallet.address); // Step 4: Check balances const ethBalance = await bank.getBalance(ethWallet.wallet_id); console.log('💰 ETH Balance:', ethBalance); // Step 5: Send transaction const tx = await bank.sendTransaction( ethWallet.wallet_id, '0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1', '0.1', 'ETH' ); console.log('📤 TX Hash:', tx.tx_hash); console.log('Status:', tx.status);

Monitor Pending Transactions

async function monitorTransactions() { const wallets = await bank.listWallets(); for (const wallet of wallets) { const txs = await bank.getTransactionHistory( wallet.wallet_id, { status: 'pending', limit: 100 } ); console.log(`${wallet.chain}: ${txs.length} pending`); for (const tx of txs) { const status = await bank.getTransactionStatus(tx.tx_hash); console.log(` ${tx.amount} ${tx.asset}`); console.log(` Confirmations: ${status.confirmations}`); } } } // Run every 30 seconds setInterval(monitorTransactions, 30000);

Multi-Chain Payment Distribution

async function distributePayment(recipients, amount) { const wallets = await bank.listWallets(); for (const wallet of wallets) { console.log(`Distributing on ${wallet.chain}...`); for (const recipient of recipients) { const tx = await bank.sendTransaction( wallet.wallet_id, recipient, amount, 'USDC' // Use stablecoin ); console.log(`✓ Sent to ${recipient}: ${tx.tx_hash}`); } } } // Usage await distributePayment([ '0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1', '0x999d35Cc6634C0532925a3b844Bc4e7595f42bE1' ], '100');

Balance Monitoring with Alerts

async function monitorBalances() { const wallets = await bank.listWallets(); const thresholds = { 'ETH': 0.1, 'SOL': 1, 'USDC': 100 }; for (const wallet of wallets) { const balance = await bank.getBalance(wallet.wallet_id); for (const [asset, amount] of Object.entries(balance)) { const threshold = thresholds[asset] || 0; if (parseFloat(amount) < threshold) { console.warn(`⚠️ LOW: ${amount} ${asset} on ${wallet.chain}`); console.warn(`Wallet: ${wallet.address}`); // Send alert notification } } } } setInterval(monitorBalances, 60000);

📚 Complete Agent API Reference

Comprehensive API documentation for autonomous agent operations across all chains.

Authentication Endpoints

POST /api/auth/agent/register-self

Self-register agent with human owner (agent creates its own account)

Public Request Body:
{ "human_username": "alice", // Human owner username "human_email": "alice@example.com", // Human owner email "first_name": "Trading", // Agent display name "last_name": "Bot", // Agent display surname "agent_password": "SecurePass123!" // Secret password for agent }
Response (201 Created):
{ "agent_id": "uuid", "agent_username": "agent_1706...", // Unique agent identifier "token": "eyJhbGciOiJIUzI1NiIs...", // JWT for API calls "did": "did:agentsbank:uuid", // Decentralized Identifier "api_key": "sk_agent_xyz123...", // Long-lived API key "message": "Agent self-registered successfully" }
Notes:
POST /api/auth/agent/login

Login with agent credentials to get fresh token

Public Request Body:
{ "agent_username": "agent_1706...", "agent_password": "SecurePass123!" }
Response (200 OK):
{ "token": "eyJhbGciOiJIUzI1NiIs...", "api_key": "sk_agent_xyz123...", "agent_id": "uuid", "did": "did:agentsbank:uuid" }

Wallet Management Endpoints

POST /api/wallets

Create new custodial wallet on specified blockchain

Agent Token Required Request Body:
{ "chain": "ethereum" // ethereum | bsc | solana | bitcoin }
Response (201 Created):
{ "wallet_id": "uuid", "agent_id": "uuid", "chain": "ethereum", "address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "type": "custodial", "created_at": "2026-02-07T10:35:00Z", "recovery_phrase_required": true }
GET /api/wallets

List all wallets for agent with pagination

Agent Token Required Query Parameters:
?limit=100&offset=0
Response (200 OK):
[ { "wallet_id": "uuid", "chain": "ethereum", "address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "type": "custodial", "created_at": "2026-02-07T10:35:00Z" }, { "wallet_id": "uuid", "chain": "solana", "address": "7z9b4vQ...", "type": "custodial", "created_at": "2026-02-07T10:36:00Z" } ]
GET /api/wallets/:wallet_id

Get wallet details and metadata

Agent Token Required Response (200 OK):
{ "wallet_id": "uuid", "chain": "ethereum", "address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "type": "custodial", "created_at": "2026-02-07T10:35:00Z", "updated_at": "2026-02-07T10:35:00Z" }
GET /api/wallets/:wallet_id/balance

Get current balance of wallet across all assets

Agent Token Required Response (200 OK):
{ "ETH": "1.5", "USDC": "100.50", "DAI": "50.00", "USD_VALUE": "3250.75", "updated_at": "2026-02-07T10:35:00Z" }

Transaction Endpoints

POST /api/transactions/send

Send transaction from agent's wallet

Agent Token Required Request Body:
{ "wallet_id": "uuid", "to_address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "amount": "0.5", "asset": "ETH", "gas_price": "auto", // auto | custom gwei value "memo": "Payment", // optional note "priority": "standard" // low | standard | high }
Response (200 OK):
{ "tx_hash": "0x1234567890abcdef...", "wallet_id": "uuid", "chain": "ethereum", "from_address": "0x742d35...", "to_address": "0x999...", "amount": "0.5", "asset": "ETH", "status": "pending", "fee": "0.000945", "confirmation_time": null, "created_at": "2026-02-07T10:35:00Z" }
GET /api/transactions/:tx_hash

Get transaction status and details

Agent Token Required Response (200 OK):
{ "tx_hash": "0x1234567890abcdef...", "status": "confirmed", "confirmations": 12, "block_number": 19205485, "block_timestamp": "2026-02-07T10:37:00Z", "gas_used": 21000, "gas_price": "25.5", "transaction_fee": "0.000945" }
GET /api/wallets/:wallet_id/transactions

Get transaction history with filtering

Agent Token Required Query Parameters:
?limit=50&offset=0&status=confirmed&asset=ETH
Response (200 OK):
[ { "tx_hash": "0x1234567890abcdef...", "amount": "0.5", "asset": "ETH", "status": "confirmed", "direction": "sent", "to_address": "0x999...", "created_at": "2026-02-07T10:35:00Z" }, { "tx_hash": "0x9876543210fedcba...", "amount": "2.0", "asset": "ETH", "status": "confirmed", "direction": "received", "from_address": "0x111...", "created_at": "2026-02-06T15:20:00Z" } ]

Gas Estimation Endpoints

POST /api/transactions/estimate-gas

Estimate gas cost for transaction (EVM chains only)

Agent Token Required Request Body:
{ "wallet_id": "uuid", "to_address": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1", "amount": "0.5", "asset": "ETH" }
Response (200 OK):
{ "estimated_gas": 21000, "gas_price_gwei": "25.5", "total_fee_eth": "0.000945", "total_fee_usd": "1.89", "is_available": true }

Message Signing Endpoints

POST /api/wallets/:wallet_id/sign-message

Sign message with wallet (no transaction)

Agent Token Required Request Body:
{ "message": "Verify agent identity" }
Response (200 OK):
{ "signature": "0x1234567890abcdef...", "message": "Verify agent identity", "signer": "0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1" }

Catalog/Public Endpoints

GET /api/catalogue/chains

Get list of supported chains (no auth needed)

Public Response (200 OK):
[ { "id": "ethereum", "name": "Ethereum", "network": "mainnet", "rpc": "https://...", "primary_asset": "ETH", "supports": ["native", "tokens"], "testnet_id": "ethereum-sepolia" }, { "id": "solana", "name": "Solana", "network": "mainnet", "rpc": "https://...", "primary_asset": "SOL", "supports": ["native", "spl-tokens"] } ]
GET /api/catalogue/prices

Get real-time token prices (no auth needed)

Public Response (200 OK):
{ "ETH": { "usd": 2450.50, "updated_at": "2026-02-07T10:35:00Z" }, "BNB": { "usd": 612.30, "updated_at": "2026-02-07T10:35:00Z" }, "SOL": { "usd": 185.45, "updated_at": "2026-02-07T10:35:00Z" }, "BTC": { "usd": 45230.00, "updated_at": "2026-02-07T10:35:00Z" }, "USDC": { "usd": 1.00, "updated_at": "2026-02-07T10:35:00Z" } }

Authentication Methods

Bearer Token (Primary):
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ https://api.agentsbank.online/api/wallets
API Key (Server-to-Server):
curl -H "X-API-Key: sk_agent_xyz123..." \ https://api.agentsbank.online/api/wallets

🔐 Security & Best Practices

Credential Management

// ✅ Good: Use environment variables const bank = new AgentsBankSDK({ apiUrl: process.env.AGENTSBANK_API_URL, token: process.env.AGENT_TOKEN }); // ❌ Bad: Never do this! const bank = new AgentsBankSDK({ apiUrl: 'https://api.agentsbank.online', token: 'eyJhbGciOiJIUzI1NiIs...' // DON'T HARDCODE! });

Guardrails: Human Safety Controls

Your human owner can set spending limits to prevent unauthorized high-value transactions:

// Set by human owner with human JWT token const guardrails = { max_daily_spend: '1000', max_transaction_amount: '100', whitelist_addresses: [ '0x742d35Cc6634C0532925a3b844Bc4e7595f42bE1', '0x999d35Cc6634C0532925a3b844Bc4e7595f42bE1' ], allowed_chains: ['ethereum', 'solana'], allowed_assets: ['ETH', 'USDC', 'SOL'] };

Password Requirements

Authentication Headers

// Always include JWT token in Authorization header const headers = { 'Authorization': `Bearer ${agentToken}`, 'Content-Type': 'application/json' }; fetch('https://api.agentsbank.online/api/wallets', { method: 'GET', headers: headers });

Security Checklist

☑️ Before Going Live:
☑ Use environment variables for all secrets
☑ Enable HTTPS only
☑ Set up guardrails for spending limits
☑ Monitor transaction logs regularly
☑ Implement rate limiting on your agent
☑ Use address whitelisting if available
☑ Rotate credentials periodically
☑ Log security events
☑ Test error handling for edge cases
☑ Review transaction history weekly

❓ Frequently Asked Questions

General Questions

What is AgentsBank?

AgentsBank is a banking platform built for autonomous AI agents. It lets your agent independently manage wallets, track balances, send transactions, and handle finances across multiple blockchains.

Can my agent operate without human approval for each transaction?

Yes! Your agent is fully autonomous and can send transactions without human approval. However, your human owner can set guardrails (spending limits, whitelists) to ensure safety.

Is AgentsBank production-ready?

Yes, it's built for production with enterprise-grade security, encryption, database-level security (ROW-LEVEL SECURITY), and multi-chain support.

Registration & Setup

How do I register my agent?

Call `bank.registerSelf()` in the SDK or POST to `/api/auth/agent/register-self`. You'll need your human owner's username and email.

Can I restore an agent account if I lose the password?

Store your recovery words in a secure location during registration. You can use them to recover your account.

How many agents can one human own?

Unlimited! Create as many agents as you need for different tasks.

Wallets & Transactions

How many wallets can my agent have?

Unlimited wallets per chain. We recommend one wallet per chain for organization.

What are the supported blockchains?

Ethereum, Binance Smart Chain (BSC), Solana, and Bitcoin (both mainnet and testnet).

How long do transactions take?

Ethereum: 12-30s • BSC: 3-6s • Solana: 2-4s • Bitcoin: 10-60 minutes

Can I reverse a confirmed transaction?

No, confirmed transactions on the blockchain cannot be reversed. Plan carefully before sending!

What happens if my transaction fails?

Failed transactions typically return your funds minus gas fees. Check the transaction status with `getTransactionStatus()`.

Security & Guardrails

Who can set guardrails?

Only the human owner can set guardrails using their human JWT token.

What happens if my agent tries to exceed guardrails?

The transaction is rejected with a clear error message explaining which guardrail was violated.

How are my private keys stored?

For custodial wallets, keys are encrypted at rest and never transmitted. AgentsBank handles key management securely.

Troubleshooting

Registration failed. What should I do?

Check the error message. Common issues:
• Invalid password (doesn't meet requirements)
• Duplicate username (try a different one)
• Invalid email format
• Network connectivity issue

Transactions keep failing

Check:
• Do you have enough balance + gas fees?
• Is the recipient address correct?
• Are you within guardrails?
• Is the network congested?
• Is your wallet funded?

How do I get test funds?

Use faucets:
• Ethereum Sepolia: https://sepolia-faucet.pk910.de/
• BSC Testnet: https://testnet.binance.org/faucet-smart
• Solana Devnet: `solana airdrop 1`

How do I monitor my agent's activity?

Use `getTransactionHistory()` to view all transactions, and `getBalance()` to check balances. Set up periodic monitoring tasks.

Where can I get help?

Check GitHub discussions, the documentation, or contact support through docs.agentsbank.online

📚 Resources & Support

TypeScript SDK

For a complete, type-safe client experience, use the official AgentsBank SDK:

npm install @agentsbankai/sdk

Quick Start Example:

import { AgentsBank } from '@agentsbankai/sdk'; // Human registration const client = new AgentsBank(); const humanToken = await client.auth.registerHuman( 'alice', 'alice@example.com', 'password' ); // Create agent const { token, recoveryWords } = await client.auth.registerAgent( 'Alice', 'Agent', 'agent_password', humanToken ); // Agent operations const agentClient = new AgentsBank(token); const wallets = await agentClient.wallet.getWallet('all'); const tx = await agentClient.transaction.send( walletId, recipientAddress, '1.0', 'ETH' );

Full SDK documentation:

https://www.npmjs.com/package/@agentsbankai/sdk

HTTP Status Codes & Error Responses

All errors include a JSON response with an error field. Example:

{ "error": "Unauthorized: Invalid API key", "code": "INVALID_API_KEY", "details": { "hint": "Check X-API-Key header" } }

Common Error Codes

Status Error Code Meaning Action
400 BAD_REQUEST Malformed request, missing/invalid fields Check request body and parameters
401 UNAUTHORIZED Invalid/missing/expired token or API key Re-authenticate or check credentials
403 FORBIDDEN Not authorized (e.g., not wallet owner) Verify ownership or permissions
404 NOT_FOUND Resource doesn't exist (wallet, tx, agent) Check IDs and try again
409 CONFLICT Operation cannot be completed (no funds, pending tx) Wait or add funds and retry
429 RATE_LIMIT_EXCEEDED Too many requests in time window Wait (see Retry-After header) and retry
500 SERVER_ERROR Unexpected server error Retry with exponential backoff
503 SERVICE_UNAVAILABLE API temporarily down for maintenance Retry after status check

Troubleshooting & FAQ

❓ "wallet_id undefined" when creating wallet

Problem: Response is missing wallet_id field.

Solution: Upgrade SDK to v1.0.4+. Ensure you're using the latest version:

npm install @agentsbankai/sdk@latest

❓ 429 "Rate limit exceeded" errors

Problem: Getting too many 429 responses.

Solution: Implement exponential backoff and respect X-RateLimit-Remaining header:

// Check before making requests if (remainingRequests < 10) { console.log('Approaching rate limit, waiting...'); await sleep(60000); } // On 429, exponentially backoff async function retryWithBackoff(fn, attempt = 0) { try { return await fn(); } catch (e) { if (e.status === 429 && attempt < 3) { const delay = Math.pow(2, attempt) * 1000; // 1s, 2s, 4s await sleep(delay); return retryWithBackoff(fn, attempt + 1); } throw e; } }

❓ Transaction stuck in "pending" status

Problem: TX created but never confirms.

Solution: This can happen during network congestion. Possible actions:

❓ "Insufficient funds" but balance shows available

Problem: Balance exists but can't send transaction.

Solution: Likely not accounting for gas fees. Use estimateGas first:

const estimate = await client.estimateGas(walletId, recipient, amount); console.log('Total cost:', parseFloat(estimate.estimated_gas) + parseFloat(amount)); // Ensure balance covers both amount + gas const balance = await client.getBalance(walletId); if (parseFloat(balance.ETH) < totalCost) { console.error('Insufficient balance for amount + gas'); }

❓ API Key vs Token - which to use?

Answer:

❓ How much gas do I need?

Answer: Depends on chain and transaction type:

Always call estimateGas before sending important transactions.

❓ Testing on testnet first?

Recommended Flow:

// 1. Use testnet API endpoint (if available) const testClient = createClient({ apiUrl: 'https://testnet.api.agentsbank.online' }); // 2. Get testnet funds from faucet // Sepolia: https://faucet.sepolia.dev // Solana Devnet: Auto-funded // 3. Test all operations await testClient.register({...}); const wallet = await testClient.createWallet('sepolia'); await testClient.send(wallet.wallet_id, {...}); // 4. Once working, switch to production const prodClient = createClient({ apiUrl: 'https://api.agentsbank.online' });

Best Practices & Security

Rate Limiting & Quotas

⚡ Rate Limits (per API key/token):
• 100 requests per minute (public endpoints)
• 5 requests per minute (authentication endpoints)
• 1000 requests per hour (bulk operations)

Response Headers:
X-RateLimit-Limit: Maximum requests per window
X-RateLimit-Remaining: Requests left in current window
X-RateLimit-Reset: Unix timestamp when window resets
Retry-After: Seconds to wait (on 429 response)

API Status & Version

✓ Production Ready
API v1.0.4 • Multi-chain support (Ethereum, BSC, Solana, Bitcoin)
Custodial wallet management • Server-side signing • BIP39 recovery
Status: Fully operational • Last updated: February 10, 2026

Uptime SLA: 99.5% • Support: support@agentsbank.online