Search content
Sort by

Showing 5 of 5 results by Latinoz71
Post
Topic
Board Italiano (Italian)
Topic OP
Recuperare i miei dati su blockchain.info usando Excel VBA
by
Latinoz71
on 08/05/2015, 23:58:39 UTC
Salve a tutti. Ho un web wallet su blockchain.info. Questo a sua volta ha svariati indirizzi, alcuni con transazioni, altri non ancora.
Come posso recuperare le transazioni (inviate e ricevute), e per ogni transazione alcuni dati (data ed ora, importo, hash, indirizzo di ricezione o di invio...) usando le loro API e VBA di Excel?
Leggendo in giro ormai da un bel pò ho capito che necessito effettuare una richiesta di tipo JSON e leggere la risposta del sito.
Risposta che son riuscito a ricevere per un indirizzo X e l'ho messo in una stringa. Ecco il codice che dopo 15gg son riuscito a mettere in piedi:

Code:
Option Explicit

Sub ReadJsonAndParse()
    Dim strURL As String
    Dim xmlHttp As Object
    Dim strReturn As String
    ' Nella stringa è contenuto l'indirizzo web da cui ricevere i dati.
    strURL = "https://blockchain.info/it/address/15YMyRVQ1wyLsfwGP9Le97D3BRVG3nMjVW?format=json"

    'Apro l'url e ricevo i dati JSON.
     Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
     xmlHttp.Open "GET", strURL
     xmlHttp.setRequestHeader "Content-Type", "text/xml"
     xmlHttp.send

     'La risposta è inserita nella stringa
     strReturn = xmlHttp.responseText
End Sub

Nella "strReturn" c'è l'intera stringa recuperata; ho notato, grazie al sito http://jsonviewer.stack.hu/ (visualizzatore online dove inserendo un'intera stringa Json mostra un albero contenente tutti i dati) che già nella ROOT vi sono alcuni dati che necessito recuperare: (indirizzo in esame, totale ricevuto, totale inviato, bilancio finale e numero delle operazioni affettuate per quell'indirizzo [tutte, sia in uscita che in entrata], nel mio caso dell'indirizzo in questione N° 3 transazioni in totale per questo indirizzo ["n_tx": 3] numerate 0,1 e 2). Ognuna di queste operazioni ha un "hash", e anche quello voglio recuperarlo, ma è in tutti questi ultimi passaggi che mi perdo, ovvero non so come muovermi attraverso i nodi e i sottonodi via VBA-code per Excel.
Grazie per l'attenzione mostratami e attendo fiducioso che mi illuminiate.
Ciao
Post
Topic
Board Service Discussion
Re: Retrieve my bitcoin data on blockchain.info using Excel VBA
by
Latinoz71
on 08/05/2015, 23:15:42 UTC
Many thanks for the rapid answer. The problem is i don't know how navigate into a json response string using VBA and Excel.
Post
Topic
Board Service Discussion
Topic OP
Retrieve my bitcoin data on blockchain.info using Excel VBA
by
Latinoz71
on 08/05/2015, 22:37:00 UTC
I got a web wallet on blockchain.info. It has several addres.
How can i retrieve my transactions (sent and received), and for every movement some data (date and time, amount, hash, MY NOTE, address RECEIVED...) using their api and my excel VBA sheet?
I imagine reading on internet that i must use some JSON request and read the site's answer, but i don't know how to start. The API for all are described here: https://blockchain.info/it/api/blockchain_api
Can anyone here help me please?
After 2day i'm able to put json string in a Excel-VBA variable. Here's the code:
Code:
Option Explicit

Sub ReadJsonAndParse()
    Dim strURL As String
    Dim xmlHttp As Object
    Dim strReturn As String

    strURL = "https://blockchain.info/it/address/15YMyRVQ1wyLsfwGP9Le97D3BRVG3nMjVW?format=json"

    'Open URL and get JSON data
     Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
     xmlHttp.Open "GET", strURL
     xmlHttp.setRequestHeader "Content-Type", "text/xml"
     xmlHttp.send

     'Save the response to a string
     strReturn = xmlHttp.responseText
End Sub
In the "strReturn" there is the whole retrieved string; i noticed i got in the part called ROOT some data i need: (address, total_received, total_sent and final_balance) and the number of transaction for the address, 3 transaction in total for this address ("n_tx": 3,) numbered 0,1 and 2. Each of this got a "hash" that i want retrieve, but it seems very hard to do. The amount of each transaction is in the array but i don't know how extract.
In the retrieved string i can't find my "NOTE" as i wrote in the page "My Wallet --> Transactions (recent)" near the yellow icon with a green plus (+) into. Where are them?
Tnx in advance at all.
Post
Topic
Board Investor-based games
Re: BTC-PROFIT.COM - 150 % PROFIT IN 4 DAYS - 10 % INSTANT REFERRAL BONUS
by
Latinoz71
on 10/03/2015, 20:16:33 UTC
Can your mother die in less then 3days son of a bitch.
I lose 0.07BTC.
I think they're few to buy alle the drugs and medicine to cure the cancer i hope bring you!
shit
Post
Topic
Board Service Announcements
Re: ➫ [NEW SERVICE] Bitcoin Newsletter | Get PAID 5,000 Satoshi Each Email! ★
by
Latinoz71
on 21/02/2015, 00:31:51 UTC
Here's my 5000  Grin tnx a lot

http://postimg.org/image/d9ie90o63/


My wallet:

1F37GjSQFnnATGWqZvyAjs3WjLhs4g17zd