sorare / api

Sorare API documentation
154 stars 49 forks source link

get price hostory card sorare #483

Open 0d1n92 opened 1 year ago

0d1n92 commented 1 year ago

how can i get the history of the price of a card? I saw that this fetch is done on the site: curl "https://api.sorare.com/federation/graphql" ^ -H "authority: api.sorare.com" ^ -H "accept: application/json" ^ -H "accept-language: it-IT" ^ -H "content-type: application/json" ^ -H "origin: https://sorare.com" ^ -H "referer: https://sorare.com/football/cards/yukinari-sugawara-2022-rare-48" ^ ^\^"Chromium^\^";v=^\^"115^\^"" ^ -H "sec-ch-ua-mobile: ?0" ^ -H "sec-ch-ua-platform: ^\^"Windows^\^"" ^ -H "sec-fetch-dest: empty" ^ -H "sec-fetch-mode: cors" ^ -H "sec-fetch-site: same-site" ^ -H "seon-session;" ^ -H "sorare-build: 3319bcfe8963e5d819b76818832f8c2efbe62d2c" ^ -H "sorare-client: Web" ^ -H "sorare-tab-version: 091620230813124213" ^ -H "sorare-version: 20230811165316" ^ --data-raw "^{^\^"operationName^\^":^\^"PriceHistoryQuery^\^",^\^"variables^\^":^{^\^"rarity^\^":^\^"rare^\^",^\^"collection^\^":^\^"FOOTBALL^\^",^\^"playerSlug^\^":^\^"yukinari-sugawara^\^"^},^\^"extensions^\^":^{^\^"operationId^\^":^\^"React/8e7a15dd832d2226247c853aadb863d26b0424b75c83b8dc363cb1e1ef03cdea^\^"^}^}" ^ --compressed but I can't find it in schema. i try with ownershipHistory but return empty array. is it possibile take the the old price by subscription tokenAuctionWasUpdated?

diegomustafamarino commented 1 year ago

query GetCardAverage($playerSlug: String!, $rarity: Rarity!){ tokens { tokenPrices(collection: FOOTBALL, playerSlug: $playerSlug, rarity: $rarity) { deal { ... on TokenOffer { priceWei } } } } }

for last 5