I'm new to the eBay API, but I'm trying to use it to look at completed auctions. I found the Python package ebaysdk
and have the most recent version installed and working. However, if I run the query and get back the results, and then run it immediately again, same parameters and everything, I get back completely different results. Also, the first time I run it, I do get back some auctions where the item has sold, but on repeated attempts, I am only getting items that did not sell.
My implementation follows the author's examples that I've seen on GitHub. The only difference that I made was to automatically iterate through the page numbers to get additional results before the first page.
I'm not sure what the issue is, but hopefully someone here does. Small changes between results are understandable, but I can't see to understand why I'm getting COMPLETELY different results running the exact same query multiple times.
from ebaysdk.finding import Connection as Finding
from ebaysdk.exception import ConnectionError
# define eBay API credentials
sandbox_id = '123456789'
prod_id = '123456789'
# test API in sandbox
api = Finding(domain='svcs.sandbox.ebay.com', appid=sandbox_id, config_file=None)
response = api.execute('findCompletedItems', {'categoryId': '6161'})
pprint(response.dict())
# query the API and store results
results = []
page_num = 1
while True:
try:
api = Finding(appid=prod_id, config_file=None)
response = api.execute('findCompletedItems', {'categoryId': '6161', 'paginationInput': {'pageNumber': page_num}})
r = response.dict()
if r['ack'] == "Success":
results.append(r)
else:
print(r)
break
except ConnectionError as e:
print(e)
print(e.r)
break
page_num += 1
This is an eBay platform bug with the findCompletedItems API call. It should now be fixed. We've been discussing this on the eBay Dev forum in this thread: https://forums.developer.ebay.com/questions/18851/is-anyone-else-having-problems-with-their-findcomp.html?sort=newest