Write a Script in Python to pull data of my Sorare Cards using their GraphQL API and output it to a CSV file

Job ID: 33062160

Budget: $10 – $50 USD

The title pretty much explains it. I need a script that will pull full data about the cards I hold on Sorare using the GraphQL API they provide

The API details are at https://github.com/sorare/api and you can test in the playground at https://api.sorare.com/graphql/playground

You will need a sorare account to test, its free to signup and you get some common cards which I believe show up in via the API https://sorare.com/r/simonwakefield

At the very least I need the following records returned

Card ID
First Name
Last Name
Scarcity
Position
Age
U23 Eligibility
Purchase price
Stub
Last 5 games played %
Last 5 Games Average Score
Last 15 games played %
Last 15 Games Average score
Last 40 games played %
Last 40 games Average Score
Current Team
Division of Current team
Current level
Current Bonus
Current XP
Current Floor Price of the players (only for the same scarcity as the held card)
Average Sale price (Should be calculated based on the criteria in the attached image)

This data should then be saved to a CSV. The CSV should refresh every time the script is run. And the script only needs to run at command line so doesn't need any user interface
Related categories: Python Software Architecture GraphQL