金融与交易
查询 Binance 法币支付能力、支付方式、限额…
通过 Binance 公共 API 查询指定国家/法币/加密货币支持的买卖、存取款方式、限额和参考价格,并在需要时用 API key 查询订单与支付历史。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 38/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 60/100 ×0.15
适用场景
查询 Binance 法币支付能力、支付特定
解决思路
- 使用公共基础 URL:`https://www.binance.com/bapi/fiat/v1/public/fiatpayment/agent`;无需认证即可查询法币支付能力、支付方式、价格和法币/加密货币支持情况;认证订单/支付历史见 `references/sapi-endpoints.md`,需要 Binance API key 和 secret。
- 调用 `get_capabilities`:`curl 'https://www.binance.com/bapi/fiat/v1/public/fiatpayment/agent/get-capabilities?country={COUNTRY_CODE}'`;可选加 `businessType`(BUY、SELL、DEPOSIT、WITHDRAW)过滤;读取 `data.supportedBusinessTypes`、`data.fiatCurrencies[]`(含 `code`、`name`、`supportedBusinessTypes`)、`data.cryptoCurrencies[]`。
- 调用 `get_buy_and_sell_payment_methods`:`curl 'https://www.binance.com/bapi/fiat/v1/public/fiatpayment/agent/get-buy-and-sell-payment-methods?businessType={BUY|SELL}&fiatCurrency={FIAT}&cryptoCurrency={CRYPTO}&country={COUNTRY_CODE}'`;4 个参数都必填;读取 `data.paymentMethods[]` 和 `data.p2pPaymentMethods[]`,每项含 `code`、`paymentMethodName`、`fiatMinLimit`、`fiatMaxLimit`、`cryptoMinLimit`、`cryptoMaxLimit`、`quotation`、`suspended`。
- 调用 `get_deposit_and_withdraw_payment_methods`:`curl 'https://www.binance.com/bapi/fiat/v1/public/fiatpayment/agent/get-deposit-and-withdraw-payment-methods?businessType={DEPOSIT|WITHDRAW}&fiatCurrency={FIAT}&country={COUNTRY_CODE}'`;3 个参数都必填;没有 `cryptoCurrency`、没有 `quotation`、没有 P2P 方法;读取 `data.paymentMethods[]`,含 `code`、`paymentMethodName`、`fiatMinLimit`、`fiatMaxLimit`、`suspended`。
- 调用 `get_price`:`curl 'https://www.binance.com/bapi/fiat/v1/public/fiatpayment/agent/get-price?fiatCurrency={FIAT}&cryptoCurrency={CRYPTO}&country={COUNTRY_CODE}'`;可选 `businessType`(BUY 或 SELL,默认 BUY);读取 `data.bestPrice`,说明它是指示性参考价,可能与实际成交价不同。
- 推荐流程:先用 `get_capabilities` 确认支持情况,再调用支付方式 API;BUY/SELL 用 `get_buy_and_sell_payment_methods`,DEPOSIT/WITHDRAW 用 `get_deposit_and_withdraw_payment_methods`;如果用户要汇率信息再加 `get_price`。简单价格查询(如 `What's BTC in USD?`)可跳过第一步。
- 调用方式用 `WebFetch` 或 `Bash`(curl);所有响应遵循 `{ code, message, data, success }` 格式;`code: 000000` 表示成功,否则检查 `message`。
- 展示 API 结果后,总是附上相关操作链接;根据对话中的 fiat currency、crypto currency 和 business type 动态构建 URL。
- BUY 链接模板:`https://www.binance.com/en/crypto/buy/{FIAT}/{CRYPTO}`;例:Buy BTC with USD -> `https://www.binance.com/en/crypto/buy/USD/BTC`。
- SELL 链接模板:`https://www.binance.com/en/crypto/sell/{FIAT}/{CRYPTO}`;例:Sell BTC for USD -> `https://www.binance.com/en/crypto/sell/USD/BTC`。
- DEPOSIT 链接模板:`https://www.binance.com/en/fiat/deposit/{FIAT}`;例:Deposit USD -> `https://www.binance.com/en/fiat/deposit/USD`。
- WITHDRAW 链接模板:`https://www.binance.com/en/fiat/withdraw/{FIAT}`;例:Withdraw USD -> `https://www.binance.com/en/fiat/withdraw/USD`。
- 语言感知 URL:把 `/en/` locale 段替换为用户语言对应的 locale。支持:`en, zh-CN, zh-TC, ru, es, es-LA, fr, vi, en-TR, it, pl, id, uk-UA, ar, en-AU, pt-BR, en-IN, en-NG, ro, bg, cs, lv, sv, pt, es-MX, el, sk, sl, es-AR, fr-AF, en-KZ, en-ZA, en-NZ, en-BH, ar-BH, ru-UA, de, kk-KZ, ru-KZ, ja, da-DK, en-AE, en-JP, hu, lo-LA, si-LK, az-AZ, uz-UZ, pt-AO`。
- 常见 locale 映射:English -> `en` -> `https://www.binance.com/en/crypto/buy/USD/BTC`;简体中文 -> `zh-CN` -> `https://www.binance.com/zh-CN/crypto/buy/CNY/BTC`;Português (BR) -> `pt-BR` -> `https://www.binance.com/pt-BR/crypto/buy/BRL/BTC`;Türkçe -> `en-TR` -> `https://www.binance.com/en-TR/crypto/buy/TRY/BTC`。
- 对区域英语变体(`en-AU`、`en-IN`、`en-NG`、`en-AE`、`en-NZ` 等),使用具体区域 locale 而不是普通 `en`,确保用户看到区域合适内容。
- 如果用户语言不明确,默认使用 `en`。
- 当对话涉及具体 fiat/crypto 对或 business type 时,至少包含一个操作链接;对于一般性问题,从 `get_capabilities` 结果中包含所有相关链接;格式为号召性用语,例如:`Ready to buy? [Buy BTC with USD on Binance](https://www.binance.com/en/crypto/buy/USD/BTC)`。
- 展示结果时,支付方式用表格格式(名称、限额、定价),标记 `suspended` 的方法。
- 展示结果时注明价格是指示性/参考价格。
- 用用户的语言回复。
- 始终以相关操作链接结尾。
- 价格排序和最优值逻辑:BUY 时更低价格更好(同样法币买到更多 crypto),SELL 时更高价格更好(卖出每单位 crypto 得到更多法币)。
- 汇总时,BUY 突出最低 `quotation`;SELL 突出最高 `quotation`;例:BUY USD/BTC 时 $70,236 优于 $74,291,因为每美元得到更多 BTC。
- Wallet 支付方式(BUY):如果 BUY 响应中有 `code` 包含 `WALLET`(大小写不敏感)的支付方式,说明这是用用户 Binance 法币钱包余额购买 crypto。
- 遇到 Wallet 支付方式时,主动告诉用户:『One of the available payment methods is your Binance fiat wallet balance. If your wallet doesn't have sufficient funds, you'll need to deposit fiat first. Would you like me to look up the available deposit methods for you?』
- 如果用户确认,用相同 `fiatCurrency` 和 `country` 调用 `get_deposit_and_withdraw_payment_methods`,`businessType=DEPOSIT`,展示结果并附上 Deposit 操作链接。
- 订单和支付历史(认证):查看 `references/sapi-endpoints.md` 中的认证端点(订单/支付历史、存款/取款记录);需要 Binance API key 和 secret。
- 国家代码使用 ISO 3166-1 alpha-2,如 BR、GB、DE、FR、JP、KR、AU 等;`country` 参数绝不能使用 `US`——Binance 法币支付 API 不支持美国用户。
- 国家推断规则优先级 1:显式上下文——如果对话已知国家(用户说明或前一轮推断),直接复用,不要重新推断。
- 国家推断规则优先级 2:法币 -> 国家映射,直接从币种映射。示例:`SGD` -> `SG`,`BRL` -> `BR`,`JPY` -> `JP`,`KRW` -> `KR`,`AUD` -> `AU`,`GBP` -> `GB`,`CAD` -> `CA`,`INR` -> `IN`,`TRY` -> `TR`,`MXN` -> `MX`,`NGN` -> `NG`;`EUR` -> `FR`(用户未指定国家时,EUR 默认用 `FR`);`USD` -> `SG`(用户未指定国家时,USD 默认用 `SG`);强制要求:任何情况下 `US` 都绝不能作为 `country` 参数。
- 国家推断规则优先级 3:空结果——如果 API 返回没有支付方式或不支持的组合,询问:『No results found for your current settings. Would you like to try a different country? If so, please tell me which country.』然后使用用户提供的国家。
适用边界 · 注意事项
- 不适用于美国用户;`country` 参数绝不能使用 `US`。
- 不适用于需要保证成交价或直接完成下单/支付执行的场景;`get_price` 只是指示性参考价。
- 订单/支付历史等认证端点不适用于没有 Binance API key 和 secret 的场景。