You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

身处加州调用Binance API Client遇服务受限错误求助

美国加州调用Binance API地域限制问题解决办法

问题详情

在加州运行以下Binance API代码:

from binance.client import Client

client = Client(api_key, secret_key)

触发错误:

binance.exceptions.BinanceAPIException: APIError(code=0): Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error.

解决方案

  • 切换到Binance US专属API:Binance主站对美国部分地区限制服务,需使用Binance US的API端点。修改客户端初始化代码,指定美国站的API地址,同时确保使用的是Binance US平台生成的API密钥(主站密钥无法通用):
    from binance.client import Client
    
    client = Client(api_key, secret_key, api_url='https://api.binance.us')
    
  • 完成美国站账户合规验证:若当前使用的是Binance主站账户,需注册Binance US账户并完成美国地区的KYC审核,确保账户符合当地服务条款。
  • 确认网络IP归属:检查公网IP是否被误判为受限区域,若使用VPN需切换到美国本土合规节点,避免IP被Binance系统标记为限制地区。

内容的提问来源于stack exchange,提问作者Evank

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 02:44:59