.transactions
Check out these recipes to learn more about transactions and the SDK
π(SDK) Get staking rewards overview for a managed userOpen Recipeπ(SDK) Get staking rewards overview for an assetOpen Recipe
Get transactions - takes filters for start and end date and type/asset
const filters= {
startDate: '2024-01-01',
endDate: '2024-02-01',
type: 'stake',
asset: 'ETH',
page: 1,
limit: 100
};
const { body: transactionsResponse } = await api.transactions.getTransactions(filters);
console.log(`
Total Transactions: ${transactionsResponse.total}
Number of Pages: ${transactionsResponse.pages}
Current Page: ${transactionsResponse.currentPage}
Transactions: ${JSON.stringify(transactionsResponse.transactions)}
`)
for (const transaction of transactionsResponse.transactions) {
console.log(`
Transaction ID: ${transaction.eventId}
Transaction Type: ${transaction.eventType}
Transaction Asset: ${transaction.asset}
Transaction Amount: ${transaction.assetAmount}
Transaction Date: ${transaction.eventTime}
`);
}
Updated about 1 month ago