Docsapi reference
REST API Reference
Official developer HTTP endpoints to manage swaps, claim streams, verify webhooks, and provision agent wallets.
GET
/api/swapEstimate swap rates, fees, and routing paths between stablecoins across supported chains (Arc Testnet, Base Sepolia, Sepolia L1).
Query Parameters
chain stringe.g.
Arc_Testnet (Required)tokenIn stringe.g.
USDC (Required)tokenOut stringe.g.
EURC (Required)amountIn stringe.g.
10.00 (Required)curl -X GET "https://api.botpay.org/api/swap?chain=Arc_Testnet&tokenIn=USDC&tokenOut=EURC&amountIn=10" \ -H "Authorization: Bearer bp_tok_382d9f"
Response 200 OK
{
"success": true,
"chain": "Arc_Testnet",
"tokenIn": "USDC",
"tokenOut": "EURC",
"amountIn": "10.00",
"estimatedOutput": "9.43",
"route": "DEX Aggregator (Sponsored Dev Fee)"
}POST
/api/swapExecute a stablecoin swap transaction using Circle Swap SDK adapters.
Request JSON Body
slippageBps stringe.g.
100 (1.0%, default 100)customFeePercent stringe.g.
1.0 (1.0%, default 1.0)curl -X POST "https://api.botpay.org/api/swap" \
-H "Authorization: Bearer bp_tok_382d9f" \
-H "Content-Type: application/json" \
-d '{
"chain": "Arc_Testnet",
"tokenIn": "USDC",
"tokenOut": "EURC",
"amountIn": "10.0",
"slippageBps": "100",
"customFeePercent": "1.0"
}'Response 200 OK
{
"success": true,
"txHash": "0xfa782b3a987d6e80bca12ef...",
"explorerUrl": "https://testnet.arcscan.io/tx/0xfa782b3a987d6e80bca12ef...",
"amountIn": "10.0",
"amountOut": "9.43"
}