Soheil Router

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.

已驗證Streamable HTTP可網頁執行金融開發者工具

概覽

AI 產生的概覽

Soheil Router MCP 伺服器讓助理在 EVM 網路上取得最佳代幣兌換與跨鏈橋報價、待簽署交易以及交易狀態。

可以做什麼
  • 列出可用的 EVM 網路、路由合約、費用及交易可呼叫的合約
  • 讀取 API 資訊:版本、路由費用、整合方費用上限、文件與 OpenAPI 位置
  • 取得兌換或跨鏈橋報價,包含最低到帳量、費用、授權地址與待簽署交易
  • 查詢已送出交易的状态:待處理、完成、已退款、失敗、找不到或非本服務交易
適用情境
當助理需要在支援的 EVM 網路上為代幣兌換或跨鏈橋估價、為使用者準備由其本人錢包簽署的交易,或追蹤已送出的交易時使用。
執行需求
遠端 Streamable HTTP 端點,無需本機安裝。取得報價與交易狀態需以 Authorization Bearer 標頭傳入 API 金鑰(可於服務商開發者後台免費取得);列出網路與 API 資訊不需金鑰。需要能連線至服務商的 API。
安裝前請注意
Authorization 標頭攜帶 API 金鑰,應保存在伺服器端並避免寫入共用日誌。報價會導向由使用者親自簽署的真實鏈上交易,包含 0.1% 路由費及可能外加的整合方費用。授權時只核准報價中的 fromAmount 給 approvalAddress,切勿無限額授權。金額為代幣最小單位的整數字串。未成交的跨鏈轉帳會在來源網路退款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Soheil Router,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/fi.soheil%2Frouter/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "soheil-router": {
      "type": "http",
      "url": "https://api.soheil.fi/v1/mcp"
    }
  }
}

README

Soheil Router

[mcptry]

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.

Fees

0.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.

Install

bash
npm install github:soheil-fi/soheil-router

Quick start

ts
import { 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_OURS

A whole swap with viem is in examples/swap-viem.ts.

MethodKeyReturns
getNetworks()noLive networks, our contract and the contracts a trade may call
getInfo()noFee, limits, docs
getQuote(request)yesPrice, minimum received, fees, approval address, transaction
getStatus(chainId, txHash)yesPENDING, DONE, REFUNDED, FAILED, NOT_OURS or NOT_FOUND
waitForTrade(chainId, txHash)yesgetStatus until the trade is final

Errors are thrown as SoheilRouterError with code (NO_ROUTE, RATE_LIMITED, UNAUTHORIZED…), the HTTP status and a message safe to show your users.

Bridge to another network

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.

ts
const 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 REFUNDED

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/

Use it from an AI assistant (MCP)

The API is also an MCP server (Streamable HTTP) with the tools get_networks, get_api_info, get_quote and get_trade_status.

bash
claude mcp add --transport http soheil-router https://api.soheil.fi/v1/mcp \  --header "Authorization: Bearer $SOHEIL_ROUTER_KEY"
json
{ "mcpServers": { "soheil-router": { "url": "https://api.soheil.fi/v1/mcp", "headers": { "Authorization": "Bearer sk_your_key" } } } }

Good to know

  • Amounts are integer strings in the token's smallest unit; use bigint, never JavaScript numbers.
  • Approve exactly fromAmount, never an unlimited amount.
  • The user always signs in their own wallet: the API never holds keys or funds.

Built by Soheil.fi. Questions: [email protected]

License

MIT

來源:README.md,提交 0874a32

工具

4

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.

無需輸入參數。

get_api_info

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_quote

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必填slippageBpsintegratorBps

get_trade_status

Trade 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必填

版本歷史

1
  1. v1.0.1最新Nov 7, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分