Transaction Data

What is this request?

You can see more detailed transactions with this service.

What can I do with this service?

With this service, you have a more detailed transaction. You can see what was done in the transaction and with which contract this transaction was run.

Tutorial

var axios = require('axios');

axios.get('https://api.getdefy.co/v1/o/query/transaction', {
    params: {
      hash: '0xaef1b250f3c09dde83c5c040c4b0fa2363db5b35980e74cd72560d509b365299',
      chain: 'eth',
      language: 'en',
      key: 'API_KEY',
    },
  })
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });

Options

  • hash (required): A transaction hash (i.e. 0x1a2b3x...).

  • chain (required): Blockchain network name. Can be eth, bsc, avax and matic.

  • key (required): API key for requests.

  • language (optional): Service language. Default value is en. Can be en or tr.

Method and Tx Types

  • Methods: TRANSFER, APPROVAL, MINT, SWAP, CLAIM, STAKE, DEPOSIT, WITHDRAW, UNLOCK, NFT_SWAP, OPENSEA_NFT_SWAP or other contract methods.

  • Tx Types: NATIVE, ERC20, ERC721 and ERC1155

Request Example

GET https://api.getdefy.co/v1/o/query/transaction

Query Parameters

NameTypeDescription

key*

String

API Key

hash*

String

Transaction Hash

language

String

Can be: "en", "tr"

chain*

String

Network Info

{
    "result": {
        "message": "OK",
        "code": 0
    },
    "data": {
        "from": "0x3c3df7a2479c1a01033752726e98f68ea110fc5d",
        "to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
        "value": 50000000000000000,
        "gas_price": 46000000000,
        "gas_limit": 280553,
        "gas_fee": 12905438000000000,
        "formatted_gas_fee": 0.012905438,
        "formatted_value": 0.05,
        "block_number": 14637013,
        "status": 1,
        "hash": "0xaef1b250f3c09dde83c5c040c4b0fa2363db5b35980e74cd72560d509b365299",
        "tx_type": "ERC721",
        "method": "OPENSEA_NFT_SWAP"
    }
}

Last updated