This PR provides the capability to fetch data from backend services. closes #248
USAGE
The External Service is called from an instance of dcrlibwallet. For Example to get the best best block height from external service use: multiwallet.ExternalService.GetBestBlock()
Supported Function List
Function
Description
GetBestBlock()
Fetch the best block height (int32).
GetBestBlockTimeStamp()
Best block time, as unix timestamp.
GetCurrentAgendaStatus()
The current agenda and its status.
GetAgendas()
List of all agendas and their high level details
GetAgendaDetails(agendaId string)
The details for agenda whose ID is {agendaId}
GetTreasuryBalance()
Fetch the current treasury balance
GetTreasuryDetails()
Get extra details about the treasury.
E.g balance, spent amount, added amount,tx
GetExchangeRate()
Fetch exchange rate data summary
GetExchanges()
Fetch the current state data of all known exchanges
GetTicketFeeRateSummary()
The ticket fee rate summary
GetTicketFeeRate()
Top 25 ticket fees
GetNHighestTicketFeeRate(nHighest int)
Get the {nHighest} ticket fees
GetTicketDetails()
All ticket details
GetNHighestTicketDetails(nHighest int)
Get Top N {nHighest} ticket details
GetAddress(address string)
returns the balances and transactions of an address
GetXpub(xPub string)
Returns balances and transactions of an xpub
GetTicker(exch Exchange, market string)
Returns market ticker data for supported exchanges.
The market pair should be in the format: DCR-BTC or dcr-btc. e.g To fetch dcr-btc ticker information from Binance use ExternalService.Getticker(dcrlibwallet.ext.Binance, "dcr-btc")
This PR provides the capability to fetch data from backend services. closes #248
USAGE
The External Service is called from an instance of dcrlibwallet. For Example to get the best best block height from external service use:
multiwallet.ExternalService.GetBestBlock()
Supported Function List
Fetch the best block height (int32).
Best block time, as unix timestamp.
The current agenda and its status.
List of all agendas and their high level details
The details for agenda whose ID is {agendaId}
Fetch the current treasury balance
Get extra details about the treasury.
E.g balance, spent amount, added amount,tx
Fetch exchange rate data summary
Fetch the current state data of all known exchanges
The ticket fee rate summary
Top 25 ticket fees
Get the {nHighest} ticket fees
All ticket details
Get Top N {nHighest} ticket details
returns the balances and transactions of an address
Returns balances and transactions of an xpub
Returns market ticker data for supported exchanges.
The market pair should be in the format: DCR-BTC or dcr-btc. e.g To fetch dcr-btc ticker information from Binance use ExternalService.Getticker(dcrlibwallet.ext.Binance, "dcr-btc")