get_networks
Networks
The EVM networks where Soheil Router is live: chain id, name, our contract, its fee and fee wallet, and the contracts a trade may call. No API key needed.
无需输入参数。
fi.soheil由 soheil.fi 发布官方发布者v1.0.1更新于 Nov 7, 2026
Best-price token swaps on EVM networks through a non-custodial contract: quotes and trade status.
Soheil Router MCP 服务器让助手在 EVM 网络上获取最优代币兑换与跨链桥报价、待签名交易以及交易状态。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/fi.soheil%2Frouter/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"soheil-router": {
"type": "http",
"url": "https://api.soheil.fi/v1/mcp"
}
}
}One API call for the best token swap price, and one transaction that makes it. Soheil Router compares prices across DEXes and aggregators on each network and executes the trade through its own contract: non-upgradeable, source verified on the explorers, and it holds no funds between trades.
https://api.soheil.fi/v1/mcp0.1% (10 bps) to the router on each swap. You can add your own fee (up to 0.9%), paid to your wallet inside the same transaction: nothing to claim.
A whole swap with viem is in examples/swap-viem.ts.
Errors are thrown as SoheilRouterError with code (NO_ROUTE, RATE_LIMITED, UNAUTHORIZED…), the HTTP status
and a message safe to show your users.
Set toChainId to another of the router's networks. The answer has type: "bridge", and the user still signs one
transaction on the source network; the recipient is paid on the destination within seconds.
fromToken and toToken can be any token: what the bridge does not carry is swapped first on the source network, or
bought on arrival on the destination (then toAmountMin is that swap's least; if the price moves past it, the recipient
gets the bridged token, like USDC, instead). Still one transaction, fees taken once. Docs: https://soheil.fi/developers/docs/bridging/
The API is also an MCP server (Streamable HTTP) with the tools get_networks, get_api_info, get_quote and
get_trade_status.
bigint, never JavaScript numbers.fromAmount, never an unlimited amount.Built by Soheil.fi. Questions: [email protected]
MIT
来源:README.md,提交 0874a32
Networks
The EVM networks where Soheil Router is live: chain id, name, our contract, its fee and fee wallet, and the contracts a trade may call. No API key needed.
无需输入参数。
API info
What the Soheil Router API is: version, router fee, the most an integrator may add, how keys are given, and where the docs and OpenAPI spec are. No API key needed.
无需输入参数。
Get a quote
The best price for a token swap on one network, or a transfer to another network (bridge), and the transaction that makes it, through our contract. Returns toAmount, toAmountMin (enforced on-chain), the fees, approvalAddress (approve it for exactly fromAmount first unless fromToken is the coin) and transactionRequest for the user to sign. Needs an API key.
toToken必填fromToken必填toAddresstoChainIdfromAmount必填fromAddress必填fromChainId必填slippageBpsintegratorBpsTrade status
Where a sent trade stands, from its transaction on chain: PENDING, DONE (with what was paid and received; for a bridge, once paid on the destination), REFUNDED (a bridge transfer paid back on the source network), FAILED, NOT_FOUND or NOT_OURS. Needs an API key.
txHash必填chainId必填已满足适用检查项的 100%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
npm install github:soheil-fi/soheil-routerimport { COIN, SoheilRouter } from "@soheil-fi/router";
const router = new SoheilRouter({ apiKey: process.env.SOHEIL_ROUTER_KEY }); // keep the key on your server
const quote = await router.getQuote({ fromChainId: 8453, // Base fromToken: COIN, // ETH toToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC fromAmount: 10n ** 15n, // 0.001 ETH, in wei fromAddress: "0xUserWallet", integratorBps: 30, // your fee: 0.3%});
// quote.approvalAddress → approve exactly quote.fromAmount first (null when selling the coin)// quote.transactionRequest → have the user's wallet send it unchangedconst status = await router.waitForTrade(8453, txHash); // DONE, REFUNDED, FAILED or NOT_OURSconst quote = await router.getQuote({ fromChainId: 8453, // from Base toChainId: 42161, // to Arbitrum fromToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base toToken: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on Arbitrum fromAmount: 100_000_000n, // 100 USDC fromAddress: "0xUserWallet",});// quote.toAmount is what arrives; a transfer nobody fills is refunded to fromAddress on Base (status REFUND_PENDING until then)const status = await router.waitForTrade(8453, txHash); // DONE (status.receiving = the payout) or REFUNDEDclaude mcp add --transport http soheil-router https://api.soheil.fi/v1/mcp \ --header "Authorization: Bearer $SOHEIL_ROUTER_KEY"{ "mcpServers": { "soheil-router": { "url": "https://api.soheil.fi/v1/mcp", "headers": { "Authorization": "Bearer sk_your_key" } } } }