Here is how you can programmatically retrieve a Steemit account's last transaction


This simple tutorial teaches you how to programmatically retrieve a Steemit account's last transactions simply pasting a script in any browser window.

NOTES:

  • This script does not requires a pre-existing Steemit account or any private key so it's very safe to use.

STEP 1

Open your favorite browser on any site (I strongly recommend using Brave browser
for its speed and security)nd open the DevTools (Ctrl + Shift + J on Linux/Windows and Cmd + Opt + J on Mac)

STEP 2

Open https://cdn.jsdelivr.net/npm/steem/dist/steem.min.js (SteemJs) and copy & paste (Ctrl + A and Ctrl + C) the javascript code displayed on the page into the Browser Console (DevTools) that you opened in the first tab.

STEP 3

Copy & paste my script below in the Console and press enter.

Before doing so, if you want, you can change the target account name and the amount of transactions that you want to retrieve (eg. Instead of 'transisto' and 6 you can use 'marcocasario' and 3). Or leave it as it is to first give it a try..

ar getLastNTransactions = (user, N) => new Promise((resolve) => { steem.api.getAccountHistory(user, -1, 5000, (err, result = []) => { if (err) return console.error('>>> ', err); const res = []; for (let id = 0; id < result.length; id++) { if (result[id][1].op[0] 'transfer') { // console.log(JSON.stringify(result[id])) res.push(result[id]); } } const last500Transactions resolve(last500Transactions.slice(0, N)); }); }); getLastNTransactions('transisto', 6) .then(res => console.log('OK >> ', JSON.stringify(res))) .catch(err => console.error('Oops, something went wrong:', err)));

If you ten want to execute the script again for a differenent user, you onl need to paste it again, change what you need and press enter again.

Enjoy!! =]


Comments 10


According to the Bible, Charity Means Love (4 of 5)

(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)


Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.

Check our Discord Chat
Join our Official Community: https://beta.steemit.com/trending/hive-182074

18.02.2020 06:32
0

!DERANGED
!COFFEEA
!shop
$trdo
!BEER
for you

@tipu curate

18.02.2020 08:53
0

View or trade BEER.


Hey @gaottantacinque, here is a little bit of BEER from @eii for you. Enjoy it!

Learn how to earn FREE BEER each day by staking.

18.02.2020 08:53
0


Questo post è stato condiviso e votato all'interno del discord del team curatori di discovery-it.
This post was shared and voted inside the discord by the curators team of discovery-it


18.02.2020 11:04
0

Grazie =}

18.02.2020 14:52
0

@gaottantacinque, mi aiuti per favore! con chi posso parlare per risolvere il mio problema? io scrivo i miei articoli originali su steemit. ogni giorno e' uno articolo. Ho visto che mack-bot mi fa dislake. Chi potrebbe controlare il mio articolo che io non faccio niente di male. Mi aiuti per piacere. Grazie.

18.02.2020 18:21
0

Vai sul profilo @steemflagrewards, apri il link discord e spiega la situazione lì.
Devi postare solo contenuti originali, no tradotti da altri articoli, no riassunti, no foto non tue senza fonte.
Spero tu risolva presto

19.02.2020 04:18
0

@marcocasario, grazie per il tuo consiglio

21.02.2020 21:01
0

Awesome post! So awesome we resteemed it and gave it a 100% upvote, including our Steemauto fanbase. Follow @theresteemer5000 for a higher chance to be resteemed and upvoted more often.

18.02.2020 20:05
0

Thanks

19.02.2020 04:16
0