Exchange to trade pokémon as NFTs
VERB | Route | Description |
---|---|---|
[GET] | / | Landing Page |
[GET] | /pokemon | List All Pokemon |
[GET] | /pokemon/:id | Shows a Pokemon |
[GET] | /pokemon/:id/checkout | Proceed to buy a Pokemon |
[POST] | /pokemon/:id/buy | Validates and transact a valid purchase |
[POST] | /pokemon/:id/sell | Validates and transact a valid sale |
[GET] | /me | Displays the logged in user account |
[GET] | /me/add | Shows a screen to add money to wallet |
[PATCH] | /me/add | Adds money to the wallet |
[GET] | /me/transactions | Shows all user transactions |
- Check if user has enough USD_BTC to buy
- Decrement from user balance
- Change the pokemon owner
- Change the last_sell_price
- Register a transaction with a BUY operation
- Check if user really own that Pokemon
- Change the pokemon owner
- Change the last_sell_price
- Add to from user balance
- Register a transaction with a SELL operation