get https://api.web3shards.io/v1/txns/trades/pool
Returns a list of parsed DEX trades for all transactions on a pool.
"use strict";
const Shards = require("web3-shards");
const shards = Shards.API.Ethereum.V1;
shards.configure({
apiKey: "YOUR_API_KEY", // Join the discord to get your api key. https://discord.com/invite/kJd8W7Nh7e
maxRequestsPerSecond:5, // client-side limiter to prevent accidental burning
logger: 1 // 0=none,1=errors,2=verbose
});
const getTradesOnPool = async function() {
const pool = "0xa43fe16908251ee70ef74718545e4fe6c5ccec9f";
const page = 1;
const origin = "0xba01a8f92d0226beb53adf9fbea4088dd8c89a31";
const startTime = 1690610183;
const endTime = 1692647843;
const resp = await shards.transactions.getTradesOnPool(pool, page, origin, startTime, endTime);
console.log(resp)
}
getTradesOnPool();