Package io.meeds.dapp.service
Class ExchangeService
java.lang.Object
io.meeds.dapp.service.ExchangeService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidCompute and store MEED Token Exchange rates from first date when MEED Contract has been created until todayvoidprotected StringexecuteQuery(String url, String body) protected LocalDategetExchangeRate(Currency currency) getExchangeRates(Currency currency, LocalDate fromDate, LocalDate toDate) Retrieves list ofMeedPricefrom selected date until a dedicated dateprotected HttpsURLConnectionnewURLConnection(String url)
-
Constructor Details
-
ExchangeService
public ExchangeService()
-
-
Method Details
-
getExchangeRates
Retrieves list ofMeedPricefrom selected date until a dedicated date -
getExchangeRate
-
computeTodayCurrencyExchangeRate
public void computeTodayCurrencyExchangeRate() -
computeMeedExchangeRate
public void computeMeedExchangeRate()Compute and store MEED Token Exchange rates from first date when MEED Contract has been created until today -
getMeedUsdPrice
-
computeCurrencyExchangeRate
protected void computeCurrencyExchangeRate() -
executeQuery
-
newURLConnection
- Throws:
IOException
-
firstMeedTokenDate
-