sorare / api

Sorare API documentation
158 stars 50 forks source link

Examples and deprecation of transferMarket #533

Open JoseFonseca123 opened 1 year ago

JoseFonseca123 commented 1 year ago

Hi guys,

After the deprecation of the transferMarket, most of the examples in the git do not work. Do you have plans to update the documentation?

Also, with the current implementation is there a simple way to get the next auctions ending for any/specific player? The only way I'm finding is to loop through all existing cards/tokens of a player and check which of them have an auction. I would to avoing making dozens of APIs requests for each player to get this information.

Cheers

jmallot21 commented 1 year ago

Hi Jose,

You can try this :

query liveAuction{
  tokens {
    liveAuctions(sport:NBA){
      nodes {
        nfts {
          card {
           ... on NBACard {
                player { slug }
            }
          }
        }
      }
    }
  }
}

You can replace NBA with your sport

There will be a lot fewer results to browse ;) This is the best solution I found.

HotspurHN commented 1 year ago

Thank you @jmallot21 For football, as you said will be same, but NBACard there just Card.

    tokens {
      liveAuctions(sport:FOOTBALL){
        nodes {
          nfts {
            card {
             ... on Card {
                  player { slug }
                }
            }
          }
        }
      }
    }
gisernia commented 4 months ago

how can I retrieve the price of the auctions? It was easy with transfermarket now i can't