Trading API

The Trading API consists of a series of actions that enable players to buy, sell and exchange game assets such as NFTs. The detailed API methods are listed below:

POST /rpc/game/purchaseNft
  • Function: Purchase the specified NFT.

  • Parameters: NFT ID, transaction amount, player ID.

POST /rpc/game/sellNft
  • Function: Sell a player's NFT.

  • Parameters: NFT ID, request price, player ID.

POST /rpc/game/tradeNft
  • Function: Trade an NFT between two players.

  • Parameters: NFT ID of initiator, NFT ID of target, ID of initiator, ID of target.

Through these APIs, gaming platforms are able to securely process transactions between players and ensure that all transaction records are properly logged and verified.

Last updated