Open christroutner opened 3 years ago
he Electrumx.transactions method will get you all the transactions for an address: https://bchjs.fullstack.cash/#api-ElectrumX-ElectrumX_Transactions
And then there is a sort method for ensuring all the transactions are sorted with time: https://bchjs.fullstack.cash/#api-ElectrumX-ElectrumX_sortConfTxs
A program could walk the transaction history and report a net balance at each transaction.
A few options for what could be returned:
Wishlist item:
0 idea how this would play with the limits but this would definitely be an expensive query.
Someone had a good idea for an API endpoint. It would require some heavy lifting, so it would be a good candidate for the internal rate limits.
The scope of this endpoint would be a way to create a historical balance. It would walk the transaction history of an address, and calculate the balance after each transaction. It would return the balance of the address over time.
This algorithm would start with Electrumx.transactions, then could get the transactions details directly from the full node.