Transaction History

What is this request?

With this service, you can see all your wallet activities. You can instantly see what your desired wallet has done on each network.

What can I do with this service?

With this service, you can see the past transactions in your wallet network-specific, and you can create a user-specific historical transactions section in your application.

Tutorial

var axios = require('axios');

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

After synchronized wallet you want to use you can test it like this.

Options

  • address (required): A user address (i.e. 0x1a2b3x...). If specified, the user attached to the query is ignored and the address will be used instead.

  • 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.

Request Example

GET https://api.getdefy.co/v1/o/wallet/transactions

Query Parameters

NameTypeDescription

key*

String

API Key

address*

String

Wallet Address

language

String

Can be: "en", "tr"

chain*

String

Network Info

{
    "result": {
        "message": "OK",
        "code": 0
    },
    "data": [
    {
            "from": "0x1d0d2d8c85441050abc9eb654399fa198fbd5722",
            "to": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
            "value": 0,
            "block_number": "36774538",
            "hash": "0x1f51cb13dd5451f98330152579a2600d2f9bbed794b7abcb87664f0abb9c0680",
            "timestamp": 1670921803000,
            "formattedValue": 0,
            "logs": [
                {
                    "from": "0x1d0d2d8c85441050abc9eb654399fa198fbd5722",
                    "to": "0x4f797d5e551b5dc25b68298c97d68aa24ddc49d4",
                    "value": 100000,
                    "hash": "0x1f51cb13dd5451f98330152579a2600d2f9bbed794b7abcb87664f0abb9c0680",
                    "timestamp": 1670921803000,
                    "formattedValue": 0.1,
                    "chainId": 137,
                    "decimals": 6,
                    "symbol": "USDC",
                    "name": "USD Coin",
                    "logoURI": "https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389"
                }
            ],
            "gas_price": 30508108774,
            "gas_limit": 59164,
            "gas_fee": 1804981747504936,
            "formatted_gas_fee": 0.001804981747504936,
            "chainId": 137,
            "decimals": 18,
            "symbol": "MATIC",
            "name": "Polygon",
            "logoURI": "https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png?1624446912"
        }    
    }
}

Last updated