timotheus / ebaysdk-python

eBay API SDK for Python
https://developer.ebay.com/tools/sdks
Other
805 stars 326 forks source link

I need only sold items. #249

Open manasgrg opened 6 years ago

manasgrg commented 6 years ago

I won't be able to get only sold items list via search using ebaysdk. Can you please help me how to get the solditems only in 'findItemsAdvanced"?

timotheus commented 6 years ago

You'll want to use GetOrder in the Trading API.

http://developer.ebay.com/devzone/xml/docs/reference/ebay/getorders.html

smwitkowski commented 5 years ago

If you're looking to get all sold items, and not just the ones you were a buyer or seller, you can use findCompletedItems (https://developer.ebay.com/devzone/finding/callref/findCompletedItems.html).

matecsaj commented 4 years ago
import datetime
from ebaysdk.exception import ConnectionError
from ebaysdk.finding import Connection

try:
    api = Connection(siteid='EBAY-ENCA')
    response = api.execute('findCompletedItems', {'keywords': 'legos'})

    assert(response.reply.ack == 'Success')
    assert(type(response.reply.timestamp) == datetime.datetime)
    assert(type(response.reply.searchResult.item) == list)

    item = response.reply.searchResult.item[0]
    assert(type(item.listingInfo.endTime) == datetime.datetime)
    assert(type(response.dict()) == dict)

except ConnectionError as e:
    print(e)
    print(e.response.dict())
luzer commented 4 years ago

this works i am looking for not just completed price USD, but also shipping paid

is that possible

matecsaj commented 3 years ago

My experience was that some items had a shipping paid value, and some didn't. If there was a pattern to it, I didn't spot it.

I say it was because, on Oct. 15, 2020, eBay deprecated findCompletedItems, and my app stopped working. They recommend switching to the Marketplace Insights API.