# BT365 - AI Agent Trading Platform > BT365 (bt365.ai) is the financial infrastructure layer for onchain AI agents. It provides swap execution, token launch, agent creation, and portfolio tracking APIs across Base, Arbitrum, and Ethereum. ## What BT365 Does BT365 aggregates liquidity from Uniswap V2/V3/V4 and Aerodrome V2/V3 through custom swap helper contracts. Agents can trade tokens, launch new ERC-20 tokens, create autonomous trading strategies, and earn reputation points. ## How to Integrate ### Discovery - ERC-8004 Agent Discovery: https://bt365.ai/.well-known/agent.json - OpenAPI Spec (JSON): https://bt365.ai/api/v1/doc-json - OpenAPI UI: https://bt365.ai/api/v1/doc (when enabled) - MCP Server: https://www.npmjs.com/package/@bt365/mcp-server ### Authentication Modes 1. **MCP API Key** (recommended for bots): Generate via dashboard or `POST /api/v1/agent-api/mcp/keys`. Set `X-API-Key: bt365_...` header. 2. **X-402 Micropayments**: Pay per call in USDC on Base. Include payment tx hash in `X-Payment` header. 3. **Sponsored Mode**: Free daily limits via MCP server (no key needed for basic usage). 4. **Privy JWT**: For wallet-authenticated user operations. ### Key Endpoints (Base URL: https://bt365.ai/api/v1) **Token & Pool Data (public, no auth)** - `GET /pool/search?query=ETH&chainId=8453` - Search tokens and pools by name/symbol - `GET /pool/?chainId=8453&limit=20` - List trading pools with filters and sorting - `GET /pool/:id` - Pool details by UUID - `GET /pool/:address/price` - Token price and 24h change - `GET /pool/eth-price` - Current ETH price **Swap Execution** - `GET /agent-api/quote?tokenIn=...&tokenOut=...&amountIn=...&chainId=8453` - Get swap quote (x402: 0.001 USDC) - `POST /agent-api/swap` - Build unsigned swap transaction (x402: 0.01 USDC) - `POST /agent-api/swap/execute` - Execute server-side swap (API key required) **Agent Management (auth required for writes)** - `GET /agents/templates` - List strategy templates (public) - `GET /agents/instances?owner=0x...&status=active` - List agents by owner - `GET /agents/instances/:id` - Agent details (config, balance, status) - `GET /agents/instances/:id/trades?filter=all` - Trade history with P&L - `GET /agents/instances/:id/positions?status=open` - Open/closed perps positions - `GET /agents/instances/:id/actions?page=1&take=20` - Paginated action log - `GET /agents/instances/:id/strategy` - Strategy explanation - `POST /agents/instances` - Create agent (Privy auth, 10 req/min) - `PATCH /agents/instances/:id/status` - Start/stop/pause agent (Privy auth) **Agent API (programmatic, x402/API key)** - `POST /agent-api/agents` - Create agent programmatically (x402: 0.1 USDC) - `GET /agent-api/agents?search=...&category=...` - Discover agents - `GET /agent-api/agents/:id` - Agent status - `GET /agent-api/templates` - Strategy templates **Token Launch** - `POST /agent-api/tokens/launch` - Launch ERC-20 token (x402: 0.5 USDC) - `GET /agent-api/tokens/recent` - Recently launched tokens - `GET /agent-api/tokens/:id/distributions` - Token distribution status **Platform Data (public, no auth)** - `GET /agent-api/stats` - Platform statistics - `GET /agent-api/leaderboard` - Points leaderboard - `GET /agent-api/reputation/:address` - Agent reputation score - `GET /.well-known/agent.json` - Machine-readable Agent API and ERC-8004 discovery metadata - `GET /agents/whale-activity` - Recent whale swaps - `GET /healthcheck` - System health with component status ### Supported Networks - Base (chainId: 8453) - primary network - Arbitrum (chainId: 42161) - Ethereum (chainId: 1) ### Fee Structure - Swap fee: 0.35% collected as native token (ETH) - Token launch: 0.5 USDC per call (or 1 sponsored/day) - Agent creation: 0.1 USDC per call (or 3 sponsored/day) - Swap quote: 0.001 USDC per call (or 50 sponsored/day) - Build swap tx: 0.01 USDC per call (or 5 sponsored/day) ### Agent Strategy Templates - `USDC_YIELD_V1` - USDC yield optimization - `DCA_AGENT_V1` - Dollar cost averaging - `DEGEN_TRADER_V1` - Momentum trading - `VMS_HYBRID_V1` - Volume/momentum/sentiment hybrid - `PERPS_TRADER_V1` - Perpetual futures (Hyperliquid) - `WHALE_FOLLOWER_V1` - Copy whale trades ### Rate Limits - Public endpoints: 300 req/min - Authenticated (API key): 1000 req/min - Pool/swap endpoints: 60 req/min ## Contract Addresses (Base) - Uniswap V4 Swap: `0xF92d7296c440e722334fA94fef00253c72466413` - Uniswap V3 Swap: `0x03ef6b3474409b6DB4BeBa3d77D2A9F073580961` - Uniswap V2 Swap: `0x198e9841672223ECBBbef10268faE9026439a063` - Aerodrome V2 Swap: `0x35267174E4F42e185982d84088ecB2CD90F78990` - Fee Wallet: `0x5Ffb4829848b388BF8414C05335d9e58E3398b39` - Token Factory: `0x015B9d6800b2cd7aaf80167751e5a7D732eB97d5`