API ReferencePrice APINFT PricesGet NFT Sale Prices by CollectionGet NFT Sale Prices by CollectionGEThttps://deep-index.moralis.io/api/v2.2/nft/:address/priceFetch sale prices for NFTs in a contract over a specified number of days. Returns the last sale, lowest sale, highest sale, average sale and total trades within the specified period.PATH PARAMSaddressstringrequiredThe address of the NFT collectionQUERY PARAMSchainstringThe chain to queryeth0x1polygon0x89bsc0x38avalanche0xa86aarbitrum0xa4b1base0x2105optimism0xaronin0x7e4sei0x531daysnumberThe number of days to look back to find the lowest price If not provided 7 days will be the default and 365 is the maximumResponses200Returns the sold price details400Bad Request404Not Found429Too Many Requests500Internal Server ErrorAPI KEYTest Live APIcURLNode.jsPythonGoPHPcurl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/price?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' // Node.js v18+ has native fetch support// No additional dependencies requiredconst options = { method: 'GET', headers: { accept: 'application/json', 'X-API-Key': 'YOUR_API_KEY' },};fetch('https://deep-index.moralis.io/api/v2.2/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/price?chain=eth', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://deep-index.moralis.io/api/v2.2/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/price?chain=eth"headers = { "Accept": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("GET", url, headers=headers)print(response.text)package mainimport ( "fmt" "net/http" "io")func main() { url := "https://deep-index.moralis.io/api/v2.2/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/price?chain=eth" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2.2/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/price?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns the sold price details{ "last_sale": { "transaction_hash": "", "block_timestamp": "", "buyer_address": "", "seller_address": "", "price": "", "price_formatted": "", "usd_price_at_sale": "", "current_usd_value": "", "token_id": "" }, "lowest_sale": { "transaction_hash": "", "block_timestamp": "", "buyer_address": "", "seller_address": "", "price": "", "price_formatted": "", "usd_price_at_sale": "", "current_usd_value": "", "token_id": "" }, "highest_sale": { "transaction_hash": "", "block_timestamp": "", "buyer_address": "", "seller_address": "", "price": "", "price_formatted": "", "usd_price_at_sale": "", "current_usd_value": "", "token_id": "" }, "average_sale": { "price": "", "price_formatted": "", "current_usd_value": "" }, "total_trades": "", "message": ""}