Skip to content

Commit

Permalink
Merge branch 'Philipinho:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rvullriede authored Feb 12, 2024
2 parents 3d83d46 + 0d08f9f commit d5e86fa
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Map<String, Map<String, Double>> getTokenPrice(String id, String contractAddress

List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage);

List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String category, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage);

CoinFullData getCoinById(String id);

CoinFullData getCoinById(String id, boolean localization, boolean tickers, boolean marketData, boolean communityData, boolean developerData, boolean sparkline);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Call<Map<String,Map<String, Double>>> getTokenPrice(@Path("id") String id, @Quer

@GET("coins/markets")
Call<List<CoinMarkets>> getCoinMarkets(@Query("vs_currency") String vsCurrency, @Query("ids") String ids,
@Query("category") String category,
@Query("order") String order, @Query("per_page") Integer perPage,
@Query("page") Integer page, @Query("sparkline") boolean sparkline,
@Query("price_change_percentage") String priceChangePercentage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ public class CoinMarkets {
private BigDecimal circulatingSupply;
@JsonProperty("total_supply")
private BigDecimal totalSupply;
@JsonProperty("max_supply")
private BigDecimal maxSupply;
@JsonProperty("ath")
private BigDecimal ath;
@JsonProperty("ath_change_percentage")
private BigDecimal athChangePercentage;
@JsonProperty("ath_date")
private String athDate;
@JsonProperty("atl")
private BigDecimal atl;
@JsonProperty("atl_change_percentage")
private BigDecimal atlChangePercentage;
@JsonProperty("atl_date")
private String atlDate;
@JsonProperty("roi")
private Roi roi;
@JsonProperty("last_updated")
Expand All @@ -58,6 +66,17 @@ public class CoinMarkets {
private SparklineIn7d sparklineIn7d;
@JsonProperty("price_change_percentage_1h_in_currency")
private BigDecimal priceChangePercentage1hInCurrency;

@JsonProperty("price_change_percentage_24h_in_currency")
private BigDecimal priceChangePercentage24hInCurrency;
@JsonProperty("price_change_percentage_7d_in_currency")
private BigDecimal priceChangePercentage7dInCurrency;
@JsonProperty("price_change_percentage_14d_in_currency")
private BigDecimal priceChangePercentage14dInCurrency;
@JsonProperty("price_change_percentage_30d_in_currency")
private BigDecimal priceChangePercentage30dInCurrency;
@JsonProperty("price_change_percentage_200d_in_currency")
private BigDecimal priceChangePercentage200dInCurrency;
@JsonProperty("price_change_percentage_1y_in_currency")
private BigDecimal priceChangePercentage1yInCurrency;
}

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ public List<CoinMarkets> getCoinMarkets(String vsCurrency) {

@Override
public List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage) {
return coinGeckoApi.executeSync(coinGeckoApiService.getCoinMarkets(vsCurrency,ids,order,perPage,page,sparkline,priceChangePercentage));
return getCoinMarkets(vsCurrency,ids,null,order,perPage,page,sparkline,priceChangePercentage);
}

@Override
public List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String category, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage) {
return coinGeckoApi.executeSync(coinGeckoApiService.getCoinMarkets(vsCurrency,ids,category,order,perPage,page,sparkline,priceChangePercentage));
}

@Override
Expand Down

0 comments on commit d5e86fa

Please sign in to comment.