[SOLVED] Error with /nft/transfers endpoint

I think this is a tech issue.
I’m trying to use the /nft/transfers endpoint but always get

  "message": "Invalid hex number"

e.g.

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=13680916&to_block=13680926&format=hex' \
  -H 'accept: application/json' \
  -H 'X-API-Key: xxx'
1 Like

we will investigate, thanks for reporting

1 Like

it should work fine now

Thank you, yes it is working.

now,Error with /nft/getnfttrades endpoint

it is still a problem now? on what chain it is? can you give an exact example that doesn’t work?

getnfttrades return invalid hex number, not transfers

can you provide an exact example that gives that error?

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/nft/{0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b}​/trades?chain=eth&format=decimal
-H ‘accept: application/json’
-H ‘X-API-Key: mykey’\

return invalid hex number

It looks like there are {} instead of the hex number directly

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/nft/0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b​/lowestprice?chain=eth&days=10&marketplace=opensea
-H ‘accept: application/json’
-H ‘X-API-Key: my key’\

return invalid hex number trade ok

@improvesf, meanwhile I found out that there is a problem with that url that you pasted, it look like it has some hidden characters next to that string: 0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b

if you copy this exact string than it should work fine

return invalid hex number in lowestprice func

I got that error only when I didn’t use the right parameter, also it can happen if you don’t refresh the page and you copied some invalid characters in that input box there before

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/nft/0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b​/lowestprice?chain=eth&days=10&marketplace=opensea
-H ‘accept: application/json’
-H ‘X-API-Key: my-key’\

return invalid hex number why you ok?

where do you run that?

if you paste that url in a command line you will see this: /0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b<200b>/ instead of the expected address

run in vscode
return invalid hex number

try delete all and make the query again

now nft-api GetAllTokenIds
To get the data
Metadata actually has data on OpenSea
But the result is returned by the API as null

temporary
use other api