API ReferenceNFT APIGet NFT TradesGet NFT trades by walletVersion: 2.2Get NFT trades by walletGEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/nfts/tradesGet trades of NFTs for a given wallet.PATH PARAMSaddressstringrequiredThe owner wallet addressQUERY PARAMSchainstringThe chain to queryeth0x1polygon0x89bsc0x38avalanche0xa86aarbitrum0xa4b1base0x2105optimism0xafrom_blocknumberThe minimum block number from which to get the transfersProvide the param 'from_block' or 'from_date'If 'from_date' and 'from_block' are provided, 'from_block' will be used.to_blockstringThe block number to get the trades fromfrom_datestringThe start date from which to get the transfers (format in seconds or datestring accepted by momentjs)Provide the param 'from_block' or 'from_date'If 'from_date' and 'from_block' are provided, 'from_block' will be used.to_datestringThe end date from which to get the transfers (format in seconds or datestring accepted by momentjs)Provide the param 'to_block' or 'to_date'If 'to_date' and 'to_block' are provided, 'to_block' will be used.cursorstringThe cursor returned in the previous response (used for getting the next page).limitnumberThe desired page size of the result.Responses200 Returns a paginated collection of NFT transactionsobjectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = await Moralis.EvmApi.nft.getNFTTradesByWallet({ "chain": "0x1", "address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import evm_apiapi_key = "YOUR_API_KEY"params = { "chain": "eth", "address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB"}result = evm_api.nft.get_nft_trades_by_wallet( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/wallets/0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB/nfts/trades?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://deep-index.moralis.io/api/v2.2/wallets/0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB/nfts/trades?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, _ := ioutil.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/wallets/0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB/nfts/trades?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns a paginated collection of NFT transactions{ "page": 2, "page_size": 100, "cursor": "string", "result": [ { "transaction_hash": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", "transaction_index": "string", "token_ids": [ "15" ], "seller_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", "buyer_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", "token_address": "0x4ad3785ec7eed7589fa86538244a4530f962434f", "marketplace_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", "price_token_address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6", "price": "1000000000000000", "block_timestamp": "2021-06-04T16:00:15", "block_number": "13680123", "block_hash": "0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96" } ]}