Overview

  • Example 1: Recent transactions made by a wallet
  • Example 2: Latest DEX trades for multiple tokens
  • Example 3: All blocks between a time period

Example 1: Recent transactions made by a wallet

Request

https://api.syve.ai/v1/filter-api/transactions?eq:from_address=0x004baeac693aac11dcd1d7139338d32fbd87898a&size=5&sort=desc

The above request returns the 5 most recent transactions made by wallet 0x004baeac693aac11dcd1d7139338d32fbd87898a.

Response

[
  {
    "block_number": 14612952,
    "timestamp": 1650335777,
    "transaction_hash": "0x9865ae110429050c01af9f1b65036b6bc33020ac4f209724f341f4773b4c99bb",
    "transaction_index": 158,
    "from_address": "0x004baeac693aac11dcd1d7139338d32fbd87898a",
    "to_address": "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    "value_gwei": 0,
    "fee_gwei": 1728702.034676694,
    "gas_limit": 77440,
    "gas_price_gwei": 36.916779522,
    "gas_used": 46827,
    "is_error": false,
    "eip2718_type": "2",
    "base_fee_per_gas_gwei": 35.416779522,
    "max_fee_per_gas_gwei": 40.923336359,
    "max_priority_fee_per_gas_gwei": 1.5
  },
  {
    "block_number": 14612925,
    "timestamp": 1650335403,
    "transaction_hash": "0xfddb1c18efdae9e295f8394ff8ad1621561a8008543d69dd539bdbdb3b83c1bd",
    "transaction_index": 258,
    "from_address": "0x004baeac693aac11dcd1d7139338d32fbd87898a",
    "to_address": "0x881d40237659c251811cec9c364ef91dc08d300c",
    "value_gwei": 20000000,
    "fee_gwei": 4926428.564988762,
    "gas_limit": 261188,
    "gas_price_gwei": 26.451191247,
    "gas_used": 186246,
    "is_error": false,
    "eip2718_type": "2",
    "base_fee_per_gas_gwei": 24.451191247,
    "max_fee_per_gas_gwei": 37.372118365,
    "max_priority_fee_per_gas_gwei": 2
  },
  {
    "block_number": 13220164,
    "timestamp": 1631573287,
    "transaction_hash": "0x32f4651b3c9e6cc923aa78f57d01bc25700d0c7801685588cbdd601c1b4c03ff",
    "transaction_index": 152,
    "from_address": "0x004baeac693aac11dcd1d7139338d32fbd87898a",
    "to_address": "0xec6c55a4423dd088df40a5eed3cba85d7ce992c7",
    "value_gwei": 24000000,
    "fee_gwei": 3394856,
    "gas_limit": 95000,
    "gas_price_gwei": 58,
    "gas_used": 58532,
    "is_error": false,
    "eip2718_type": "0",
    "base_fee_per_gas_gwei": null,
    "max_fee_per_gas_gwei": null,
    "max_priority_fee_per_gas_gwei": null
  },
  {
    "block_number": 13220152,
    "timestamp": 1631573060,
    "transaction_hash": "0x2b69606e528cac44522dd93f0fabe104540cba99edece00ae44961ff23ae2882",
    "transaction_index": 185,
    "from_address": "0x004baeac693aac11dcd1d7139338d32fbd87898a",
    "to_address": "0xec6c55a4423dd088df40a5eed3cba85d7ce992c7",
    "value_gwei": 0,
    "fee_gwei": 4420021,
    "gas_limit": 103643,
    "gas_price_gwei": 47,
    "gas_used": 94043,
    "is_error": false,
    "eip2718_type": "0",
    "base_fee_per_gas_gwei": null,
    "max_fee_per_gas_gwei": null,
    "max_priority_fee_per_gas_gwei": null
  },
  {
    "block_number": 13220144,
    "timestamp": 1631572967,
    "transaction_hash": "0x10f6fedf64f69fcbda5dcf4f693bbf871bdc8ec0b3fa13e4ca16dd6d258e8907",
    "transaction_index": 151,
    "from_address": "0x004baeac693aac11dcd1d7139338d32fbd87898a",
    "to_address": "0x1cbb83ebcd552d5ebf8131ef8c9cd9d9bab342bc",
    "value_gwei": 0,
    "fee_gwei": 1344718,
    "gas_limit": 29233,
    "gas_price_gwei": 46,
    "gas_used": 29233,
    "is_error": false,
    "eip2718_type": "0",
    "base_fee_per_gas_gwei": null,
    "max_fee_per_gas_gwei": null,
    "max_priority_fee_per_gas_gwei": null
  }
]

Example 2: Latest DEX trades for multiple tokens

Request

https://api.syve.ai/v1/filter-api/prices_usd?eq:token_address=0x226f7b842e0f0120b7e194d05432b3fd14773a9d,0x37236cd05b34cc79d3715af2383e96dd7443dcf1&size=5&sort=desc

It is possible to filter according to multiple matches in a single request by providing a comma separated string. The above request retrieves the latest price information two tokens: 0x226f7b842e0f0120b7e194d05432b3fd14773a9d and 0x37236cd05b34cc79d3715af2383e96dd7443dcf1.

Response

[
  {
    "block_number": 17803620,
    "timestamp": 1690693151,
    "transaction_hash": "0x8129415510e1f1dc48112ea59a505e651e6e02413c550f1915a6db66960801a3",
    "token_address": "0x226f7b842e0f0120b7e194d05432b3fd14773a9d",
    "price_token_usd_tick_1": 0.0002557661306061598,
    "price_token_usd_tick_100": 0.0002557661306061598,
    "price_token_usd_wavg_1h": null,
    "price_token_usd_wavg_24h": null,
    "volume_1h_usd": 1292.8678027211458,
    "volume_24h_usd": 1292.8678027211458,
    "num_trades_1h": 2,
    "num_trades_24h": 2,
    "protocol_name": "uniswap_v2",
    "pool_address": "0x7f1da3697236d4a5e0efd2a99de5d9c076937856",
    "side": "buy",
    "amount_token": 719726.554171208,
    "amount_eth": 0.09795080081427661,
    "amount_usd": 184.08167585487448
  },
  {
    "block_number": 17803619,
    "timestamp": 1690693139,
    "transaction_hash": "0x8af885cad1563cde1b5ac0d7cd1915358ce0885e2c6b2558a51de7d6858645b6",
    "token_address": "0x226f7b842e0f0120b7e194d05432b3fd14773a9d",
    "price_token_usd_tick_1": 0.0002598774182162312,
    "price_token_usd_tick_100": 0.0002598774182162312,
    "price_token_usd_wavg_1h": null,
    "price_token_usd_wavg_24h": null,
    "volume_1h_usd": 1108.7835592829442,
    "volume_24h_usd": 1108.7835592829442,
    "num_trades_1h": 1,
    "num_trades_24h": 1,
    "protocol_name": "uniswap_v2",
    "pool_address": "0x7f1da3697236d4a5e0efd2a99de5d9c076937856",
    "side": "sell",
    "amount_token": 4266563.701046083,
    "amount_eth": 0.589990766619998,
    "amount_usd": 1108.7835592829442
  },
  {
    "block_number": 17787621,
    "timestamp": 1690499807,
    "transaction_hash": "0x3eac2601b00623a96b4babbe6a7cd38974c6e49ea6854fcbc6ee3658e2bf131a",
    "token_address": "0x226f7b842e0f0120b7e194d05432b3fd14773a9d",
    "price_token_usd_tick_1": 0.0002635073202162539,
    "price_token_usd_tick_100": 0.0002635073202162539,
    "price_token_usd_wavg_1h": null,
    "price_token_usd_wavg_24h": null,
    "volume_1h_usd": 2362.9502497272583,
    "volume_24h_usd": 2362.9502497272583,
    "num_trades_1h": 2,
    "num_trades_24h": 2,
    "protocol_name": "uniswap_v2",
    "pool_address": "0x7f1da3697236d4a5e0efd2a99de5d9c076937856",
    "side": "buy",
    "amount_token": 1102965.4037088084,
    "amount_eth": 0.15644213935236712,
    "amount_usd": 290.6394578225468
  },
  {
    "block_number": 17787621,
    "timestamp": 1690499807,
    "transaction_hash": "0xe6d43b08afb2a9a82abce0b1d29c0977404bda65d759758d7f31493e8dfcdc24",
    "token_address": "0x226f7b842e0f0120b7e194d05432b3fd14773a9d",
    "price_token_usd_tick_1": 0.0002730150600868833,
    "price_token_usd_tick_100": 0.0002730150600868833,
    "price_token_usd_wavg_1h": null,
    "price_token_usd_wavg_24h": null,
    "volume_1h_usd": 2362.9502497272583,
    "volume_24h_usd": 2362.9502497272583,
    "num_trades_1h": 2,
    "num_trades_24h": 2,
    "protocol_name": "uniswap_v2",
    "pool_address": "0x7f1da3697236d4a5e0efd2a99de5d9c076937856",
    "side": "sell",
    "amount_token": 7590463.292556926,
    "amount_eth": 1.1154601516168294,
    "amount_usd": 2072.3107919047116
  },
  {
    "block_number": 17780355,
    "timestamp": 1690411955,
    "transaction_hash": "0xa529900c2da259c35ba1b410ef73ccd26c59da4beaa39a30638a2d37e0543070",
    "token_address": "0x226f7b842e0f0120b7e194d05432b3fd14773a9d",
    "price_token_usd_tick_1": 0.0002899459618733211,
    "price_token_usd_tick_100": null,
    "price_token_usd_wavg_1h": null,
    "price_token_usd_wavg_24h": null,
    "volume_1h_usd": 37.4100258112716,
    "volume_24h_usd": 478.910210851682,
    "num_trades_1h": 1,
    "num_trades_24h": 4,
    "protocol_name": "uniswap_v2",
    "pool_address": "0x7f1da3697236d4a5e0efd2a99de5d9c076937856",
    "side": "buy",
    "amount_token": 129024.13115039762,
    "amount_eth": 0.02,
    "amount_usd": 37.41002581127157
  }
]

Example 3: All blocks between a time period

Request

https://api.syve.ai/v1/filter-api/blocks?gte:block_number=14000000&lte:block_number=14000100&size=5&sort=desc

Note: Here we use block_number to define the time period, but you could also use timestamp.

Response

[
  {
    "block_number": 14000100,
    "timestamp": 1642116323,
    "parent_hash": "0xceb9b6f9c1033082f88dd4b44ee7c6e489e243ad85cf279abc6081f0a1b265b6",
    "mix_hash": "0x281e48625c81dff4694b74e4eb5292a960fd7e1fb77ab2f9b503fd63e70081f7",
    "nonce": "0xa5a1a85d882c37e2",
    "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "difficulty": 12190828206303296,
    "total_difficulty": 38897356251947745000000,
    "size_bytes": 66856,
    "base_fee_per_gas_gwei": 182.152492238,
    "gas_limit": 30078167,
    "gas_used": 13123150,
    "transactions_count": 179,
    "miner_address": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
    "uncle_count": 0
  },
  {
    "block_number": 14000099,
    "timestamp": 1642116304,
    "parent_hash": "0x05c9ee34c78bf14347a62fd5eea72315c60886eae215d6e27dce80fab19b2b72",
    "mix_hash": "0x5fa5c9dd1de8853d2248ba6598ca8a3c7dcf8c8e191e63cc0bdfbbcb6567b6f5",
    "nonce": "0x006f7b61c59e2c55",
    "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "difficulty": 12196781518545500,
    "total_difficulty": 38897344061119534000000,
    "size_bytes": 82674,
    "base_fee_per_gas_gwei": 180.458274018,
    "gas_limit": 30107567,
    "gas_used": 16184433,
    "transactions_count": 243,
    "miner_address": "0x829bd824b016326a401d083b33d092293333a830",
    "uncle_count": 0
  },
  {
    "block_number": 14000098,
    "timestamp": 1642116296,
    "parent_hash": "0x6187a751ced21bb31062d49c51350ed8f3ec9dc26c49397cde859178e913fde8",
    "mix_hash": "0xaeca5416a2277907923de73b55d3a40f04d4b6650a427ef5bc04ad9d7dea6bef",
    "nonce": "0x9579751295b0798f",
    "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "difficulty": 12190826818904184,
    "total_difficulty": 38897331864338020000000,
    "size_bytes": 49922,
    "base_fee_per_gas_gwei": 190.877779901,
    "gas_limit": 30107567,
    "gas_used": 8479818,
    "transactions_count": 101,
    "miner_address": "0x829bd824b016326a401d083b33d092293333a830",
    "uncle_count": 0
  },
  {
    "block_number": 14000097,
    "timestamp": 1642116280,
    "parent_hash": "0x146330713b2e1b216be202d81e7a691feaf208acab667ec2f916ff2bc8b66a74",
    "mix_hash": "0xe86fab7f3ab264c6e65ccbfd31ab3934688a4e201ddc092d80fcb438c5525dd2",
    "nonce": "0x01ead1c82c42c8d1",
    "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "difficulty": 12190824671420536,
    "total_difficulty": 38897319673511200000000,
    "size_bytes": 51490,
    "base_fee_per_gas_gwei": 197.61221313,
    "gas_limit": 30107567,
    "gas_used": 10949636,
    "transactions_count": 141,
    "miner_address": "0x829bd824b016326a401d083b33d092293333a830",
    "uncle_count": 0
  },
  {
    "block_number": 14000096,
    "timestamp": 1642116256,
    "parent_hash": "0x7f4f82a043baea342bbe7148871cd02d39f54c33d7ac7c5d12778802a07f8047",
    "mix_hash": "0x5410de57383c2aa5ba2b35a6ae868ed168fa5626b1fd79e786b7e59cffaab7c1",
    "nonce": "0xf48a4ff3f66a12f9",
    "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "difficulty": 12196777981935880,
    "total_difficulty": 38897307482686530000000,
    "size_bytes": 86207,
    "base_fee_per_gas_gwei": 193.838586048,
    "gas_limit": 30107394,
    "gas_used": 17398206,
    "transactions_count": 275,
    "miner_address": "0x829bd824b016326a401d083b33d092293333a830",
    "uncle_count": 0
  }
]