mcpField
O
openfin-onramp

openfin-onramp

github.com/openfinance-techOther456 installsUpdated 8w ago
Repository

About openfin-onramp

A fiat on-ramp reference in the OpenFinance skill bundle for agents that need to generate cryptocurrency purchase links. A smart router selects Moonpay or Onramp.money based on fiat currency; users complete KYC and payment on the provider’s site.

Key features

  1. 01Selects an on-ramp provider by fiat currency
  2. 02Supports Moonpay and Onramp.money
  3. 03Returns a link for user payment
  4. 04Documents supported chain, coin, and network pairs

Use cases

  1. 01Create a link to buy USDC on Base with USD
  2. 02Create a link to buy USDC on Polygon with INR
  3. 03Choose a supported route for a coin and network pair

MCP support

A single MCP tool, `get_onramp_url`, invokes the smart router and returns the provider and link. Provider-specific routes are REST-only and are not exposed as MCP tools.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/openfinance-tech/skills --skill openfin-onramp

After installing, type/openfin-onrampin Claude Code to confirm it loaded.

Details

From the project README

Fiat Onramp (Moonpay + Onramp.money)

Publisher. Part of the OpenFinance skill bundle (openfin-setup, openfin-troubleshooting, openfin-hyperliquid, openfin-relay, openfin-onramp, openfin-polymarket, openfin-onchain) — all maintained by OpenFinance (https://openfinance.tech). Install as a set, not individually.

Two providers, one smart-router endpoint:

ProviderRailsBest forbaseCurrency
MoonpayCards, Apple Pay, Google Pay, SEPA, bankGlobal / non-INRusd, eur, gbp, …
Onramp.moneyUPI, IMPS, bankIndia / INRinr (only)

The agent never signs on-chain — the user opens the returned URL to finish KYC + payment.

Prerequisite

  1. openfin-setup complete.
  2. The destination chain's wallet is provisioned for the user (EVM default; Solana must be enabled if chain=solana / currencyCode=*_sol).

Endpoints

POST /agent/onramp — smart router (default)

baseCurrency: "inr" → Onramp.money. Anything else (or omitted → defaults usd) → Moonpay. Body is the union of fields; the router forwards only the relevant ones.

FieldNotes
baseCurrencyRouting key, lowercased. Default "usd".
chainethereum / polygon / base / arbitrum / optimism / bsc / tron / solana. (Onramp.money supports a subset — see matrix.)
currencyCrypto symbol (usdc, usdt, eth, sol, btc, …).
amountFiat amount the user will spend.
walletAddressOptional; defaults to caller's wallet for the chain.
redirectURLProvider redirects here on success.

Response: { provider: "moonpay" | "onrampmoney", url: "https://…" }.

Common Moonpay currencyCode derivations (when the smart router picks Moonpay from chain + currency): eth/usdc on Ethereum → eth/usdc; usdc on Polygon/Base/Arbitrum/Optimism → usdc_polygon / usdc_base / usdc_arbitrum / usdc_optimism; Solana sol → sol, Solana usdc → usdc_sol. If unsure, the smart router accepts currencyCode directly and forwards it.

The Moonpay-only / Onramp.money-only REST routes (POST /agent/onramp/moonpay, POST /agent/onramp/onrampmoney) still exist for dashboards and direct API consumers, but they are not exposed as MCP actions — agents should always use the smart router so baseCurrency: "inr" lands on Onramp.money correctly. Force-provider fields below are documented for completeness (REST callers only).

POST /agent/onramp/onrampmoney — REST-only (dashboards)
FieldNotes
chainethereum / polygon / bsc / tron / solana. Mapped to legacy network code.
networkLegacy code (erc20 / matic20 / bep20 / trc20 / spl); overrides chain mapping.
currency / coinCodeCoin (usdc, usdt, busd, matic, bnb, eth, sol).
amountINR (e.g. 1000 = ₹1000).
coinAmountCrypto-side target — wins over amount if both sent.
paymentMethod1 = UPI/Instant (default in India), 2 = IMPS/Bank. Skip to let user choose.
walletAddress, redirectURL, addressTagOptional.

Chain → Onramp network: ethereum→erc20, polygon→matic20, bsc→bep20, tron→trc20, solana→spl.

Onramp.money supported (coin × network) matrix

Calls outside this matrix throw. Propose a supported pair or switch to Moonpay.

CoinNetworks
usdtbep20, matic20, erc20, trc20
usdcbep20, matic20 (NOT erc20 / solana)
busdbep20
maticmatic20
bnbbep20
etherc20, matic20
solspl

Near-misses to remap on the fly:

  • "USDC with INR on Ethereum" → propose Polygon (or Moonpay).
  • "USDC with INR on Solana" → propose Polygon / BSC (or Moonpay).
  • "ETH with INR on Arbitrum / Base / Optimism" → onramp on Eth/Polygon and bridge via openfin-relay, or use Moonpay.

Wallet defaults

If walletAddress is omitted: EVM chain → caller's EVM address; chain=solana or currencyCode=*_sol → caller's Solana address. Missing wallet → request fails; send the user to openfinance.tech.

Pair with other skills

  • Onramp lands on chain X, user wants to trade on chain Y → bridge via openfin-relay.
  • USDC on Arbitrum → Hyperliquid → use GET /agent/trading/deposit-address. Hyperliquid takes only USDC (not USDT, not USDC.e).
  • INR → Hyperliquid: Onramp.money INR → USDC on Polygon or BSC → openfin-relay to Arbitrum → Hyperliquid deposit address.
  • USDC on Polygon → Polymarket → swap to pUSD and route to the deposit wallet (GET /agent/polymarket/deposit-wallet).

Examples

USD → USDC on Base (Moonpay):

POST /agent/onramp
{ "chain": "base", "currency": "usdc", "amount": 100, "baseCurrency": "usd" }
→ { "provider": "moonpay", "url": "https://buy.moonpay.com/?…" }

INR → USDC on Polygon via UPI (Onramp.money):

POST /agent/onramp
{ "baseCurrency": "inr", "chain": "polygon", "currency": "usdc",
  "amount": 5000, "paymentMethod": 1 }
→ { "provider": "onrampmoney", "url": "https://onramp.money/app/?…" }

Don't

  • Don't use Onramp.money for non-INR fiats — INR-only.
  • Don't ignore the (coin × network) matrix — propose a supported pair instead of retrying.
  • Don't ask for card / UPI details — the provider collects them in their own KYC UI.
  • Don't poll for onramp status — the provider emits funds directly to the wallet. Verify on-chain via openfin-onchain (/balances).

MCP

Single tool: get_onramp_url (smart router). Same body as POST /agent/onramp; returns { provider, url, … }. The force-provider routes are REST-only — there is no get_moonpay_onramp_url or get_onrampmoney_onramp_url MCP action, so every onramp call goes through the smart router. INR triggers ("buy USDT with INR", "deposit ₹1000", "get USDC with UPI") route to Onramp.money automatically.

Comments

Markdown supported