Script en Python - Análisis de Transferencias en la Blockchain de Hive: Obtén Información Detallada sobre Transacciones entre Usuarios 🇪🇸 🇺🇸

avatar



Español


Este script está creado principalmente para aquellos proyectos enfocados en fomentar la adopción de la criptomoneda $HBD, como @hivesucre y futuros proyectos que puedan sumarse a esta iniciativa, también para aquellas cuentas o usuarios que llevan control de su economía en Hive y desean obtener información detallada de sus finanzas. Además, es un buen ejemplo para aquellos usuarios (como yo) que se inician en el desarrollo de aplicaciones que interactúan con la blockchain Hive a través de sus APIs y bibliotecas.

Este es un paso más en el compromiso que tengo con todos ustedes y con el testigo @hispapro, para impulsar la innovación y el desarrollo tecnológico en Hive.

Este script desarrollado en el lenguaje de programación Python, realiza un análisis del historial de las transferencias en la blockchain de Hive para un usuario o un conjunto de usuarios específicos. A partir de la fecha de donde queremos extraer las transferencias, se calculan los días transcurridos, se lee la lista de usuarios desde un archivo de texto para extraer todas las transacciones de transferencias recibidas y realizadas de la criptomoneda $HIVE y el $HBD, luego se generan las tablas en formato markdown y las gráficas, mostrando un resumen de cada usuario y también la suma mensual de todo el conjunto.

De manera práctica y como ejemplo, he usado 3 cuentas de casas de cambios muy populares, extrayendo la data de todo lo que va de año 2023. Tablas y gráficos a continuación:

UsernameHIVE SentHIVE ReceivedHBD SentHBD Received
cuenta153614830108728622.3118592
cuenta255250.2105301258.9716665.4
cuenta34083225353.535.1215607.62
Total63223133697129916.4140865

MonthHIVE SentHIVE ReceivedHBD SentHBD Received
2023-0110063455799.96049.2420424.1
2023-0280636.845383.57804.5923920.8
2023-0310505951844.83197.9924338.5
2023-0410506256889.41378.1422172.8
2023-0510816951380.66884.3127792.2
2023-0611287462168.74578.9319937.7
2023-0719795.413503.823.2442278.54
Total63223133697129916.4140865



Es posible filtrar los datos y también entregar la información de muchas maneras distintas, adaptándose a cada necesidad o proyecto, por ejemplo, $Hive enviado o recibido hacia o desde una cuenta en específico, $HBD enviado o recibido a partir de un memo o o cadena de caracteres de un memo, etc...

Para este script es necesaria la instalación de la biblioteca beem con la cual hacemos la conexión con la blockchain de Hive y extraemos los datos. Matplotlib, es una biblioteca de código abierto para generar gráficas de manera sencilla. Además es necesaria una lista de dependencias que encontrarán en el archivo requirements.txt en el repositorio del código.

El código está alojado en los repositorios de GitLab de forma pública para que pueda ser utilizado, modificado y distribuido. Ver código fuente aquí.

En el repositorio del código se encuentra la documentación para clonar el código, creación del entorno virtual, instalación de bibliotecas de Python y la puesta en marcha del script.

Espero les sea de utilidad y que pueda ser difundido para que llegue a todos los nuevos usuarios que se adentran en el desarrollo de aplicaciones para Hive. Si necesitan ayuda para la implementación o desean obtener información sobre sus proyectos, abajo dejo la información de contacto. No se olviden dejar su comentario. Un abrazo.


English


This script is created mainly for those projects focused on promoting the adoption of the $HBD cryptocurrency, such as @hivesucre and future projects that may join this initiative, also for those accounts or users who keep track of their economy in Hive and wish to obtain detailed information on their finances. In addition, it is a good example for those users (like me) who are starting in the development of applications that interact with the Hive blockchain through its APIs and libraries.

This is one more step in the commitment I have with all of you and with the @hispapro token, to drive innovation and technological development in Hive.

This script developed in the Python programming language, performs an analysis of the history of transfers on the Hive blockchain for a specific user or set of users. Starting from the date from where we want to extract the transfers, the elapsed days are calculated, the list of users is read from a text file to extract all the transactions of transfers received and made of the $HIVE cryptocurrency and the $HBD, then tables in markdown format and graphs are generated, showing a summary of each user and also the monthly sum of the whole set.

In a practical way and as an example, I have used 3 very popular exchange house accounts, extracting the data for the whole of 2023 so far. Tables and graphs below:

UsernameHIVE SentHIVE ReceivedHBD SentHBD Received
cuenta153614830108728622.3118592
cuenta255250.2105301258.9716665.4
cuenta34083225353.535.1215607.62
Total63223133697129916.4140865

MonthHIVE SentHIVE ReceivedHBD SentHBD Received
2023-0110063455799.96049.2420424.1
2023-0280636.845383.57804.5923920.8
2023-0310505951844.83197.9924338.5
2023-0410506256889.41378.1422172.8
2023-0510816951380.66884.3127792.2
2023-0611287462168.74578.9319937.7
2023-0719795.413503.823.2442278.54
Total63223133697129916.4140865



It is possible to filter the data and also deliver the information in many different ways, adapting to each need or project, for example, $Hive sent or received to or from a specific account, $HBD sent or received from a memo or string of characters from a memo, etc ....

For this script it is necessary to install the beem library with which we make the connection to the Hive blockchain and extract the data. Matplotlib, is an open source library to generate graphs in a simple way. In addition a list of dependencies is required which you will find in the requirements.txt file in the code repository.

The code is publicly hosted in the GitLab repositories so that it can be used, modified and distributed. See source code here.

In the code repository you will find documentation for cloning the code, creating the virtual environment, installing Python libraries and getting the script up and running.

I hope you find it useful and that it can be disseminated to reach all new users who are new to Hive application development. If you need help for the implementation or want to get information about your projects, below I leave the contact information. Don't forget to leave a comment. Best regards.

Translated with www.DeepL.com/Translator (free version)


Mi intención con esta publicación es dar mi aporte al software libre y al código abierto, difundiendo al público en general todos los beneficios, ventajas y facilidades de obtener versiones seguras, optimas y de vanguardia.


DigitalOcean Referral Badge


Si necesitas una VPS donde alojar tus servicios en la nube, entra con mi enlace de referido a DigitalOcean y consigue créditos para tus pruebas




Vota por nuestro Testigo aliado - @hispapro


Las imágenes son mías o capturas de pantalla tomadas por mí, a menos que se indiquen fuentes externas. La portada fue creada con canva e imágenes libres de derechos de autor.


Discord: alberto0607
Sígueme en Twitter: alberto_0607



0
0
0.000
15 comments
avatar

!ALIVE
!VSC
!PGM

0
0
0.000
avatar

@oscarps has sent VSC to @alberto0607

This post was rewarded with 0.1 VSC to support your work.
Join our photography communityVisual Shots
Check here to view or trade VSC Tokens
Be part of our Curation Trail


@oscarps ha enviado VSC a @alberto0607

Éste post fue recompensado con 0.1 VSC para apoyar tu trabajo.
Únete a nuestra comunidad de fotografía Visual Shots
Consulte aquí para ver o intercambiar VSC Tokens
Se parte de nuestro Trail de Curación


Uses: 1/10

0
0
0.000
avatar

@alberto0607! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @oscarps. (1/10)

The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.

0
0
0.000
avatar

Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.05 DEC - 1 SBT - 0.1 THG - 0.000001 SQM - 0.1 BUDS - 0.01 WOO tokens

remaining commands 4

BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!

The tokens that the command sends are: 0.1 PGM-0.1 LVL-0.1 THGAMING-0.05 DEC-15 SBT-1 STARBITS-[0.00000001 BTC (SWAP.BTC) only if you have 2500 PGM in stake or more ]

5000 PGM IN STAKE = 2x rewards!

image.png
Discord image.png

Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Get potential votes from @ pgm-curator by paying in PGM, here is a guide

I'm a bot, if you want a hand ask @ zottone444


0
0
0.000
avatar

It's a bit difficult for me :)
!PIZZA

0
0
0.000
avatar

I could help you if you have any questions. Thanks for the support

0
0
0.000
avatar

This is a really useful script. I'm sure a lot of people on Hive would like to try it out, so I'm going to try to run the script to see for myself.

0
0
0.000
avatar

Go ahead buddy, feel free to use it. I will be attentive to any comment or suggestion.

0
0
0.000