```
API Documentation
```
***1. NFT Orderbook***
This service is for fetching individual NFT orderbook details from opensea. This will take nft address in a parameter.
* Request Format
curl --location --request POST 'http://127.0.0.1:8000/nft-orderbook' \
--header 'Content-Type: application/json' \
--data-raw '{
"nft_address":"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/4949"
}'
* **Response Body**
`{'NFT_price': '1,104.42', 'owner': {'name': '20E3EB', 'ETH_address': '0x20e3ebc137866dd3c1cb400242bc3b578bbfdba7', 'username': 'Unnamed'}, 'offers': [{'Bid_price': '1,104.42', 'Bid_expiry': 'in 5 days', 'buyer': {'name': 'Person_of_the_year_20...', 'ETH_address': '0x9211...6f22', 'username': 'Person_of_the_year_2021'}}], 'sales': [], 'transfer': [{'date_of_sale': '9 days ago ', 'sale_price_ETH': '', 'old_owner': {'name': 'A9D4CF', 'ETH_address': '0x5448...7730', 'username': 'A9D4CF'}}]}`
***2. Orderbooks for every NFT within a collection***
This service will take collection as a parameter and fetch orderbook for every NFT within a collection. Will take collection name in parameter.
* Request Format
curl --location --request POST 'http://127.0.0.1:8000/nft-collections' \
--header 'Content-Type: application/json' \
--data-raw '{
"collection":"boredapeyachtclub"
}'
* Notes:
Will we have to fetch all the nfts from each collection? Mostly collections have thousands of collections? (Answered)
We will send each nft response aysnc on the endpoint
* **Response Body**
`{'collection':'boredapeyachtclub', 'nft_address':'https://opensea.io/assets/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/3650',NFT_price': '1,104.42', 'owner': {'name': '20E3EB', 'ETH_address': '0x20e3ebc137866dd3c1cb400242bc3b578bbfdba7', 'username': 'Unnamed'}, 'offers': [{'Bid_price': '1,104.42', 'Bid_expiry': 'in 5 days', 'buyer': {'name': 'Person_of_the_year_20...', 'ETH_address': '0x9211...6f22', 'username': 'Person_of_the_year_2021'}}], 'sales': [], 'transfer': [{'date_of_sale': '9 days ago ', 'sale_price_ETH': '', 'old_owner': {'name': 'A9D4CF', 'ETH_address': '0x5448...7730', 'username': 'A9D4CF'}}]}
`
***3. orderbooks for every NFT within the top N collections***
This service will fetch orderbooks for every NFT within all the whitelisted collections. Will take list of whitelisted collections as a parameter.
* Questions:
Need to ask how ofently we have to track those collections, should we have to save these collections and track after specific time?
***4. Latest events on OpenSea***
* Notes:
* **Response Body**
`{'relayId': 'QXNzZXRUeXBlOjIxMTg4MjI3NA==', 'Type': 'SUCCESSFUL', 'Collection Slug': 'anatomyscienceapeclub', 'Token Id': 'QXNzZXRFdmVudFR5cGU6MzAwMjE4NDAxMA==', 'Price': '145000000000000000', 'From Account': None, 'Seller': {'address': '0x0442d47e187b87f77d877f107d5ec38aaf8aab40', 'config': None, 'isCompromised': False, 'user': {'publicUsername': 'DragoBarcelona', 'id': 'VXNlclR5cGU6MjUzOTI3Mw=='}, 'imageUrl': 'https://storage.googleapis.com/opensea-static/opensea-profile/14.png', 'id': 'QWNjb3VudFR5cGU6NzgzMzE2MzQ='}}
`