sorare / api

Sorare API documentation
152 stars 47 forks source link

I would like to know how to have all the cards put up in sale for a player? #489

Open benshotx opened 10 months ago

benshotx commented 10 months ago

hello I would like to know which schema gives me all the cards put up in sale for a player on the market, i know how to have the last put up in sale on the market but not for a player? please help me!

for the market :
query marketsales { transferMarket{ singleSaleOffers(last:10){ nodes{
priceInFiat{ eur } } } } }

FlowerPot26 commented 9 months ago

Hello, to get the listings of a specific player you have to use a structure like this:

query findFOOTBALLPlayerListings($slug: String!, $rarity: [Rarity!], $after: String) { football{ player(slug: $slug) { cards(rarities: $rarity, after: $after) { nodes { token { name liveSingleSaleOffer { priceWei } } } } } } }