Skip to content
Skillv1.0.0

moonpay-buy-crypto

Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase in a browser.

by Drock91(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from Drock91/ows-hackathon (.agents/skills/moonpay-buy-crypto/SKILL.md). Install upstream with npx skills add Drock91/ows-hackathon --skill moonpay-buy-crypto. Copyright stays with the author.

Buy crypto with fiat

Goal

Generate a MoonPay checkout URL for buying crypto with a credit card or bank transfer. The user completes the purchase in their browser.

Command

mp buy \
  --token <currency-code> \
  --amount <usd-amount> \
  --wallet <destination-address> \
  --email <buyer-email>

Supported tokens

btc, sol, eth, trx, pol_polygon, usdc, usdc_sol, usdc_base, usdc_arbitrum, usdc_optimism, usdc_polygon, usdt_trx, eth_polygon, eth_optimism, eth_base, eth_arbitrum

Example flow

  1. User: "I want to buy $50 of SOL with my credit card."
  2. Run: mp buy --token sol --amount 50 --wallet <address> --email user@example.com
  3. Open the returned checkout URL in the user's browser so they can complete the purchase.

Notes

  • This is fiat-to-crypto (credit card / bank), not a token swap.
  • For token-to-token swaps, use the moonpay-swap-tokens skill instead.
  • The --amount flag is in USD (e.g. --amount 50 = $50 worth of the token).
  • The --token flag uses MoonPay currency codes, not mint addresses.
  • The checkout URL handles KYC and payment processing.

Related skills

  • moonpay-swap-tokens — Swap between tokens (no fiat).
  • moonpay-discover-tokens — Search for tokens.
  • moonpay-auth — Ensure user is logged in.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/drock91-ows-hackathon-moonpay-buy-crypto/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

drock91-ows-hackathon-moonpay-buy-crypto.ocm.jsonjson
{
  "ocm": "1",
  "id": "drock91-ows-hackathon-moonpay-buy-crypto",
  "kind": "skill",
  "name": "moonpay-buy-crypto",
  "description": "Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase in a browser.",
  "publisher": "Drock91",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "trading",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase in a browser."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/Drock91/ows-hackathon",
      "path": ".agents/skills/moonpay-buy-crypto/SKILL.md",
      "ref": "bc6c83138766c615f8927d70f28cb3e1b265eecb",
      "url": "https://github.com/Drock91/ows-hackathon/blob/bc6c83138766c615f8927d70f28cb3e1b265eecb/.agents/skills/moonpay-buy-crypto/SKILL.md",
      "key": "Drock91/ows-hackathon/.agents/skills/moonpay-buy-crypto/SKILL.md"
    }
  },
  "instructions": "# Buy crypto with fiat\n\n## Goal\n\nGenerate a MoonPay checkout URL for buying crypto with a credit card or bank transfer. The user completes the purchase in their browser.\n\n## Command\n\n```bash\nmp buy \\\n  --token <currency-code> \\\n  --amount <usd-amount> \\\n  --wallet <destination-address> \\\n  --email <buyer-email>\n```\n\n## Supported tokens\n\n`btc`, `sol`, `eth`, `trx`, `pol_polygon`, `usdc`, `usdc_sol`, `usdc_base`, `usdc_arbitrum`, `usdc_optimism`, `usdc_polygon`, `usdt_trx`, `eth_polygon`, `eth_optimism`, `eth_base`, `eth_arbitrum`\n\n## Example flow\n\n1. User: \"I want to buy $50 of SOL with my cred",
  "cost": {
    "context_tokens": 329
  }
}

Fetch it by URL: GET /api/v1/registry/drock91-ows-hackathon-moonpay-buy-crypto/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.