tatumio / tatum-js

🚀 Tatum SDK: A 💪 powerful, 🌟 feature-rich TypeScript/JavaScript 📚 library that streamlines the 🛠️ development of 🌐 blockchain applications.
https://docs.tatum.io
MIT License
360 stars 110 forks source link

✨ [data-api.transactions] Unable to get transactions on chain polygon-amoy. ✨ #1104

Closed nhandq-dev closed 3 months ago

nhandq-dev commented 3 months ago

Describe the bug I am using the Tatum API v3 to fetch USDC transactions. Initially, I was using the Mumbai testnet and Polygon mainnet, but due to the deprecation of the Mumbai testnet, I have switched to the Amoy testnet. According to the Tatum documentation, polygon-amoy is supported in the chain list. However, when attempting to fetch transactions using the polygon-amoy chain, I consistently receive a 400 status code error with the following response:

{
  "statusCode": 400,
  "errorCode": "data-api.transactions",
  "message": "Unable to get transactions on chain polygon-amoy.",
  "dashboardLog": "https://dashboard.tatum.io/logs?id=665693ae9bed8bec2b63f898"
}

To Reproduce Steps to reproduce the behavior:

  1. Send a GET request to fetch transactions on the polygon-amoy chain using the following curl command:

    curl --request GET \
     --url 'https://api.tatum.io/v3/data/transactions?chain=polygon-amoy&tokenAddress=0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582' \
     --header 'accept: application/json' \
     --header 'x-api-key: t-my-api-key'
  2. Observe the response, which shows a 400 status code error: Showing an error with status code 400

    {
    "statusCode": 400,
    "errorCode": "data-api.transactions",
    "message": "Unable to get transactions on chain polygon-amoy.",
    "dashboardLog": "https://dashboard.tatum.io/logs?id=665693ae9bed8bec2b63f898"
    }

Expected behavior The API should return a list of transactions for the specified token on the polygon-amoy chain.

Screenshots Screenshot 2024-05-29 at 10 21 24

Desktop (please complete the following information):

Additional context I have tested other APIs, but none of them work for the polygon-amoy chain either.

rostislavjadavan commented 3 months ago

Hi Nhandq,

Thank you for reporting this issue. It has been fixed!

GET https://api.tatum.io/v3/data/transactions?chain=polygon-amoy&tokenAddress=0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582

{
  "result": [
    {
      "chain": "polygon-amoy",
      "hash": "0xdb951835abc7df5ff78b44d1cf42bbcc6daa026d68e040b52a0a5f96b955f158",
      "address": "0x48520ff9b32d8b5bf87abf789ea7b3c394c95ebe",
      "blockNumber": 7696775,
      "transactionIndex": 0,
      "transactionType": "fungible",
      "transactionSubtype": "outgoing",
      "amount": "-10",
      "timestamp": 1717144263000,
      "tokenAddress": "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",
      "counterAddress": "0xab1daa41120950f4a0c07f9191e7a68c6a1fbf8e"
    },
    {
      "chain": "polygon-amoy",
      "hash": "0xc5bbdfa52a3c9143131f88fd7545e2eac5373ea640cc3ad2e04b6a70d6c99bbf",
      "address": "0x4d0463a8b25463cbecf9f60463362dc9bdcf6e00",
      "blockNumber": 7696707,
      "transactionIndex": 1,
      "transactionType": "fungible",
      "transactionSubtype": "outgoing",
      "amount": "-5",
      "timestamp": 1717144079000,
      "tokenAddress": "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",
      "counterAddress": "0x4d2c523dcb824392dd2cf85d22cfd658a94d3954"
    },
    ....
}
nhandq-dev commented 3 months ago

thank you, I can see it works now!