From 2f8624d7d6c8fb92395c281e248a2d4392ae55b9 Mon Sep 17 00:00:00 2001 From: charvam Date: Fri, 5 Feb 2021 16:53:29 +0100 Subject: [PATCH] ET-796 Added new crypto-currencies. --- .../io/everytrade/server/model/Currency.java | 21 +++++++++- .../rateprovider/CoinPaprikaRateProvider.java | 38 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java index 20b6134a..23e04cdd 100644 --- a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java +++ b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java @@ -37,7 +37,26 @@ public enum Currency { ADA(false, Instant.parse("2017-09-29T00:00:00Z"), "Cardano"), EOS(false, Instant.parse("2017-05-06T00:00:00Z"), "EOS"), DOT(false, Instant.parse("2020-08-22T00:00:00Z"), "Polkadot"), - ETC(false, Instant.parse("2016-07-20T00:00:00Z"), "Ethereum Classic"); + ETC(false, Instant.parse("2016-07-20T00:00:00Z"), "Ethereum Classic"), + UNI(false,Instant.parse("2020-09-01T00:00:00Z"), "Uniswap"), // token; can't find exact date + DOGE(false, Instant.parse("2013-12-06T00:00:00Z"), "Dogecoin"), + STORJ(false, Instant.parse("2015-11-01T00:00:00Z"), "Storj"), // token; can't find exact date + ZEC(false, Instant.parse("2016-10-28T00:00:00Z"), "Zcash"), + KAVA(false, Instant.parse("2019-10-01T00:00:00Z"), "Kava"), // can't find exact date + YFI(false, Instant.parse("2020-07-01T00:00:00Z"), "yearn.finance"), // token; can't find exact date + AAVE(false, Instant.parse("2020-10-13T00:00:00Z"), "Aave"), // token + LSK(false, Instant.parse("2016-02-01T00:00:00Z"), "Lisk"), + OMG(false, Instant.parse("2017-06-23T00:00:00Z"), "OMG Network"), // token + BAND(false, Instant.parse("2019-09-01T00:00:00Z"), "Band Protocol"), // token; can't find exact date + MATIC(false, Instant.parse("2019-04-01T00:00:00Z"), "Matic Network"), // token; can't find exact date + DNT(false, Instant.parse("2017-08-01T00:00:00Z"), "district0x"), // token; can't find exact date + SC(false, Instant.parse("2015-03-17T00:00:00Z"), "Siacoin"), + KMD(false, Instant.parse("2016-09-14T00:00:00Z"), "Komodo"), + DGB(false, Instant.parse("2014-01-10T00:00:00Z"), "DigiByte"), + NEO(false, Instant.parse("2016-09-09T00:00:00Z"), "NEO"), + DAT(false, Instant.parse("2017-08-11T00:00:00Z"), "Datum"), + FUN(false, Instant.parse("2017-02-01T00:00:00Z"), "FunFair"), // token + BAT(false, Instant.parse("2017-06-01T00:00:00Z"), "Basic Attention Token"); // token private final int decimalDigits; private final boolean fiat; diff --git a/plugin-base/src/main/java/io/everytrade/server/plugin/impl/everytrade/rateprovider/CoinPaprikaRateProvider.java b/plugin-base/src/main/java/io/everytrade/server/plugin/impl/everytrade/rateprovider/CoinPaprikaRateProvider.java index e6b20e3c..737cc391 100644 --- a/plugin-base/src/main/java/io/everytrade/server/plugin/impl/everytrade/rateprovider/CoinPaprikaRateProvider.java +++ b/plugin-base/src/main/java/io/everytrade/server/plugin/impl/everytrade/rateprovider/CoinPaprikaRateProvider.java @@ -72,6 +72,25 @@ public final class CoinPaprikaRateProvider implements IRateProvider { COIN_IDS_BY_CURRENCY.put(Currency.EOS, "eos-eos"); COIN_IDS_BY_CURRENCY.put(Currency.DOT, "dot-polkadot"); COIN_IDS_BY_CURRENCY.put(Currency.ETC, "etc-ethereum-classic"); + COIN_IDS_BY_CURRENCY.put(Currency.UNI, "uni-uniswap"); + COIN_IDS_BY_CURRENCY.put(Currency.DOGE, "doge-dogecoin"); + COIN_IDS_BY_CURRENCY.put(Currency.STORJ, "storj-storj"); + COIN_IDS_BY_CURRENCY.put(Currency.ZEC, "zec-zcash"); + COIN_IDS_BY_CURRENCY.put(Currency.KAVA, "kava-kava"); + COIN_IDS_BY_CURRENCY.put(Currency.YFI, "yfi-yearnfinance"); + COIN_IDS_BY_CURRENCY.put(Currency.AAVE, "aave-new"); + COIN_IDS_BY_CURRENCY.put(Currency.LSK, "lsk-lisk"); + COIN_IDS_BY_CURRENCY.put(Currency.OMG, "omg-omg-network"); + COIN_IDS_BY_CURRENCY.put(Currency.BAND, "band-band-protocol"); + COIN_IDS_BY_CURRENCY.put(Currency.MATIC, "matic-matic-network"); + COIN_IDS_BY_CURRENCY.put(Currency.DNT, "dnt-district0x"); + COIN_IDS_BY_CURRENCY.put(Currency.SC, "sc-siacoin"); + COIN_IDS_BY_CURRENCY.put(Currency.KMD, "kmd-komodo"); + COIN_IDS_BY_CURRENCY.put(Currency.DGB, "dgb-digibyte"); + COIN_IDS_BY_CURRENCY.put(Currency.NEO, "neo-neo"); + COIN_IDS_BY_CURRENCY.put(Currency.DAT, "dat-datum"); + COIN_IDS_BY_CURRENCY.put(Currency.FUN, "fun-funfair"); + COIN_IDS_BY_CURRENCY.put(Currency.BAT, "bat-basic-attention-token"); LISTING_START_BY_CURRENCY.put(Currency.BTC, Instant.parse("2013-04-28T18:45:00Z")); LISTING_START_BY_CURRENCY.put(Currency.ETH, Instant.parse("2015-08-07T14:45:00Z")); @@ -93,6 +112,25 @@ public final class CoinPaprikaRateProvider implements IRateProvider { LISTING_START_BY_CURRENCY.put(Currency.EOS, Instant.parse("2017-07-02T00:00:00Z")); LISTING_START_BY_CURRENCY.put(Currency.DOT, Instant.parse("2020-08-22T00:00:00Z")); LISTING_START_BY_CURRENCY.put(Currency.ETC, Instant.parse("2016-07-25T00:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.UNI, Instant.parse("2020-09-17T11:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.DOGE, Instant.parse("2013-12-15T15:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.STORJ, Instant.parse("2017-07-02T01:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.ZEC, Instant.parse("2016-10-29T15:30:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.KAVA, Instant.parse("2019-10-31T14:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.YFI, Instant.parse("2020-07-18T00:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.AAVE, Instant.parse("2020-10-13T12:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.LSK, Instant.parse("2016-04-06T20:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.OMG, Instant.parse("2017-07-14T04:30:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.BAND, Instant.parse("2019-09-18T21:35:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.MATIC, Instant.parse("2019-04-29T05:30:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.DNT, Instant.parse("2017-08-03T22:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.SC, Instant.parse("2015-08-26T18:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.KMD, Instant.parse("2017-02-05T23:45:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.DGB, Instant.parse("2014-02-06T13:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.NEO, Instant.parse("2016-09-09T04:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.DAT, Instant.parse("2017-12-15T20:15:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.FUN, Instant.parse("2017-06-27T05:00:00Z")); + LISTING_START_BY_CURRENCY.put(Currency.BAT, Instant.parse("2017-06-01T05:15:00Z")); SUPPORTED_QUOTES.add(Currency.USD); SUPPORTED_QUOTES.add(Currency.BTC);