Skip to content

Instantly share code, notes, and snippets.

@KardanovIR
Created October 21, 2021 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KardanovIR/b95760b517adc2588c8aa21caf232695 to your computer and use it in GitHub Desktop.
Save KardanovIR/b95760b517adc2588c8aa21caf232695 to your computer and use it in GitHub Desktop.
let allTransactions: Array<any> = [];
let response: any;
let after: null | string = null;
do {
let url = `https://api.wavesplatform.com/v0/transactions/invoke-script?timeStart=2021-10-20T12%3A00%3A00.000Z&dapp=3PAETTtuW7aSiyKtn9GuML3RgtV1xdq1mQW&function=buyPerch&sort=desc&limit=100`;
if (after) {
url += `&after=${after}`
}
response = (await axios.get(url)).data;
if (response.isLastPage === false) {
after = response.lastCursor;
}
allTransactions = allTransactions.concat(response.data);
} while (response.isLastPage === false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment