onchain-pay-open-api
它能做什么
这个技能帮助开发者调用 Binance Onchain Pay API,它让用户可以用法币购买加密货币,或将其发送到外部钱包。适合构建加密支付功能的合作方。
适用场景
- ✓当你想让用户用银行卡购买加密货币并发送到其钱包的时候。
- ✓当你需要把加密货币从 Binance 账户发送到外部地址的时候。
- ✓当你正在构建跨区块链网络的桥接或转账流程的时候。
技能链接
https://github.com/ccxt/ccxt/blob/master/.agents/skills/onchain-pay-open-api/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我调用 Onchain Pay API,获取用银行卡购买 USDT 的报价?”
每周 5 个新技能,1 分钟读完。
工作原理
该技能使用 RSA SHA256 签名对每个 API 请求进行签名,以完成身份验证,并按顺序指导你完成各个接口的调用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Binance Onchain-Pay Open API Skill
Call Binance Onchain-Pay Open API endpoints with automatic RSA SHA256 request signing.
Use Cases & Scenarios
This skill is designed for the following scenarios:
1. 💳 Fiat-to-Crypto Purchase & Send
When to use: User wants to buy crypto with fiat currency and send directly to an external on-chain wallet address
- Buy USDT with USD/EUR/TWD using credit card → Send to MetaMask address on BSC
- Purchase BTC with Google Pay → Transfer to hardware wallet
- Buy USDC with P2P → Send to DeFi protocol contract address
Key APIs: trading-pairs → payment-method-list → estimated-quote → pre-order
2. 🔄 Direct Crypto Transfer (Send Primary)
When to use: User has crypto in Binance account and wants to send to external address
- Send existing USDT from Binance Spot to friend's wallet address
- Transfer ETH to Uniswap contract for trading
- Move crypto from Binance to self-custodial wallet (Trust Wallet, Ledger, etc.)
Key APIs: pre-order with SEND_PRIMARY customization
3. 🔗 Cross-Chain Bridge Operations
When to use: User needs to buy crypto on one chain and transfer to another network
- Buy USDC on Ethereum → Bridge to Polygon for lower fees
- Purchase tokens on BSC → Transfer to Base network
- Fiat to crypto on Solana → Send to Arbitrum for DeFi
Key APIs: crypto-network → pre-order with network selection
4. 🏪 Merchant Payment Integration
When to use: Integrate crypto payment gateway for e-commerce or services
- Accept fiat payments and auto-convert to crypto
- Enable "Pay with Crypto" checkout flow
- Process subscription payments with crypto
Key APIs: pre-order with externalOrderId tracking
5. 🤖 Smart Contract Interaction (Onchain-Pay Easy)
When to use: Buy crypto and execute smart contract in one transaction
- Buy USDT and deposit to lending protocol
- Purchase tokens and stake in DeFi pool
- Fiat on-ramp directly to GameFi or NFT marketplace
Key APIs: pre-order with ON_CHAIN_PROXY_MODE customization
6. 📊 Query & Monitoring
When to use: Check order status, available networks, or payment methods
- Monitor order processing status (pending, completed, failed)
- List supported fiat currencies and cryptocurrencies
- Check available payment methods for specific country/amount
- Verify network fees and limits
Key APIs: order, crypto-network, trading-pairs, payment-method-list
Quick Reference
| Endpoint | API Path | Required Params | Optional Params |
|---|---|---|---|
| Payment Method List (v1) | papi/v1/ramp/connect/buy/payment-method-list |
fiatCurrency, cryptoCurrency, totalAmount, amountType | network, contractAddress |
| Payment Method List (v2) | papi/v2/ramp/connect/buy/payment-method-list |
(none) | lang |
| Trading Pairs | papi/v1/ramp/connect/buy/trading-pairs |
(none) | (none) |
| Estimated Quote | papi/v1/ramp/connect/buy/estimated-quote |
fiatCurrency, requestedAmount, payMethodCode, amountType | cryptoCurrency, contractAddress, address, network |
| Pre-order | papi/v1/ramp/connect/buy/pre-order |
externalOrderId, merchantCode, merchantName, ts | fiatCurrency, fiatAmount, cryptoCurrency, requestedAmount, amountType, address, network, payMethodCode, payMethodSubCode, redirectUrl, failRedirectUrl, redirectDeepLink, failRedirectDeepLink, customization, destContractAddress, destContractABI, destContractParams, affiliateCode, gtrTemplateCode, contractAddress |
| Get Order | papi/v1/ramp/connect/order |
externalOrderId | (none) |
| Crypto Network | papi/v1/ramp/connect/crypto-network |
(none) | (none) |
| P2P Trading Pairs | papi/v1/ramp/connect/buy/p2p/trading-pairs |
(none) | fiatCurrency |
How to Execute a Request
Step 1: Gather credentials
Use the default account (prod) unless the user specifies otherwise. You need:
- BASE_URL: API base URL
- CLIENT_ID: Client identifier
- API_KEY: The sign access token
- PEM_PATH: Absolute path to the RSA private key PEM file
Use the account marked (default) in .local.md.
Step 2: Build the JSON body
Build a compact JSON body from user-specified parameters. Remove any parameters the user did not provide.
IMPORTANT: Address and Network Validation
address(destination wallet address) andnetwork(blockchain network) are REQUIRED for all pre-order requests- If the user has configured
Default Addressand `Default Net
常见问题
调用通常按什么顺序进行?
技能建议先查询交易对,然后是支付方式,再是预估报价,最后是预下单。
它会自动为请求签名吗?
会。技能说明,它会自动添加 RSA SHA256 请求签名。
它能处理跨网络转账吗?
可以。对于跨链流程,技能涵盖在预下单步骤中选择加密货币网络。
详情
作者的原始描述
Binance Onchain Pay enables users to buy cryptocurrency with fiat (e.g., EUR, USD) or send existing crypto from their Binance account directly to any external on-chain wallet address in a single flow—no manual withdrawal needed. Enables partners to integrate crypto buying services: - payment-method-list: Get available payment methods (Card, P2P, Google Pay, Apple Pay, etc.) with limits for a fiat/crypto pair - trading-pairs: List all supported fiat currencies and cryptocurrencies - estimated-quote: Get real-time price quote including exchange rate, fees, and estimated crypto amount - pre-order
repo: ccxt/ccxt
热度
- GitHub 星标
- 45k
- 排名
- #6371
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
binance-agentic-wallet
45k帮你的智能体通过 baw 命令行管理 Binance Web3 钱包,包括登录、查询余额、转账、代币兑换和限价订单。
binance-sports-ai-analyzer
45k帮你的智能体查询世界杯比赛的预测、AI 分析和新闻洞察,并在你调整信号后重新计算胜率。
binance-tokenized-securities-info
45k帮你的智能体在 Binance Web3 上查询 Ondo 代币化美股,包括代币列表、公司信息、交易状态和链上价格。
binance
45k帮你的智能体通过 binance-cli 工具使用 Binance 现货、USD-M 合约和 Convert 功能。使用前需先完成身份验证设置。