python - Ebay ebaysdk-python - 获取错误代码:18000,请求太多
问题描述
我收到了这个错误
'GetOrders:类:RequestError,严重性:错误,代码:18000,请求太多。超过短期阈值。您已超过每秒呼叫阈值。请限制此呼叫的流量,然后重试。
我使用 ebaysdk-python 库,我填写所有参数和我的代码
api = Trading(debug=True,token=token, appid="", certid="", devid="",config_file="/e_bay/ebay.yaml", warnings=True)
api.execute('GetOrders', {})
我做错了什么?谢谢帮助。
编辑
当我在此 url https://developer.ebay.com/DevZone/build-test/test-tool/?index=0&api=developer-analytics&call=rate_limit__GET&variation=json中请求时,我得到了我拥有的信息,但我无处看到 Trading ,
{ "rateLimits": [ { "apiContext": "api context test", "apiName": "api name", "apiVersion": "v1", "resources": [ { "name": "DELETE1", "rates ": [ { "limit": 100, "remaining": 100, "reset": "2020-04-27T13:17:45.000Z", "timeWindow": 15 } ] }, { "name": "GET1" , "rates": [ { "limit": 100, "remaining": 100, "reset": "2020-04-27T13:17:45.000Z","timeWindow": 15 } ] }, { "name": "POST1", "rates": [ { "limit": 100, "remaining": 100, "reset": "2020-04-27T13:17:45.000 Z", "timeWindow": 15 } ] }, { "name": "PUT1", "rates": [ { "limit": 100, "remaining": 100, "reset": "2020-04-27T13: 17:45.000Z", "timeWindow": 15 } ] } ] }, { "apiContext": "commerce”, “apiName”: “translation”, “apiVersion”: “v1_beta”, “resources”: [ { “name”: “commerce.translation.translate” } ] }, { “apiContext”: “sell”, “ apiName”:“listingapi”,“apiVersion”:“v1_beta”,“resources”:[{“name”:“createListingDraft”,“rates”:[{“limit”:5000,“remaining”:5000,“reset” : "2020-04-28T00:05:55.000Z", "timeWindow": 89999 } ] } ] },{“apiContext”:“sell”,“apiName”:“logistics”,“apiVersion”:“v1”,“resources”:[{“name”:“sell.logistics”,“rates”:[{“limit” :2500000,“剩余”:2500000,“重置”:“2020-04-27T07:00:00.000Z”,“timeWindow”:86400 } ] } ] },{“apiContext”:“sell”,“apiName”: “推荐”,“apiVersion”:“v1”,“资源”:[{“名称”:“POST”},{ "name": "GET" }, { "name": "DELETE" }, { "name": "PUT" } ] } ] }
也许这是一个问题?
编辑
这个问题是关于沙盒的,因为我写了适用于其他端点的限制 ws,而不是 getorders
解决方案
以下来自文档的信息。
您需要稍微修改您的代码(每 15 秒 1000 次查询),因此可能在每 1000 次后休眠 15 秒:time.sleep(15)
每个(卖家)用户 ID,在任何 15 秒间隔内执行的 GetSellerEvents 调用不超过 1000 个。如果在任何时候超过此调用速率限制,则发出调用的应用程序将被阻止。每次应用程序被阻塞时,用户/应用程序必须等到 15 秒后阻塞被重置。此短期通话费率限制适用于所有卖家账户,卖家/开发者不能上诉或要求更高的限制。
推荐阅读
- databricks - 如何删除非托管三角洲湖表
- python-3.x - 如何在 Python 中将字节转换为 str?
- sql - 合并具有重复键的增量
- inheritance - Flutter:类型 <> 不是 <> 的子类型...但它是
- mysql - MySQL:如何提取表的最新记录?(较小的连接复杂性)
- python - slurm + matplotlib 占用大量内存
- javascript - 错误未捕获的 ReferenceError:未定义 Morris
- spring - 无法将依赖项添加到 pom.xml 文件
- python - Sklearn+Gensim:如何使用 Gensim 的 Word2Vec 嵌入进行 Sklearn 文本分类
- python - 从不同大小的原始数组构建数组的快速方法