Skip to content

Commit

Permalink
Merge pull request knowm#2865 from EricAnderson1000/CoinbasePro-updat…
Browse files Browse the repository at this point in the history
…eUSDC

Adding USDC to exchange metatdata file
  • Loading branch information
timmolter authored Nov 19, 2018
2 parents f9ff9e5 + 0b717e6 commit 95f018a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions xchange-coinbasepro/src/main/resources/coinbasepro.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@
"min_amount": 0.01,
"max_amount": 10000.00,
"price_scale": 2
},
"BTC/USDC": {
"min_amount": 0.001,
"max_amount": 70,
"price_scale": 0.01
},
"ETH/USDC": {
"min_amount": 0.001,
"max_amount": 700,
"price_scale": 0.01
},
"BAT/USDC": {
"min_amount": 1,
"max_amount": 300000,
"price_scale": 0.000001
}
},
"currencies": {
Expand Down Expand Up @@ -89,6 +104,10 @@
"GBP": {
"scale": 2,
"withdrawal_fee": 0.0
},
"USDC": {
"scale": 2,
"withdrawal_fee": 0.0
}
},
"public_rate_limits": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import org.knowm.xchange.ExchangeFactory;
import org.knowm.xchange.coinbasepro.dto.CoinbaseProTrades;
import org.knowm.xchange.coinbasepro.service.CoinbaseProMarketDataServiceRaw;
import org.knowm.xchange.currency.Currency;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.dto.marketdata.Trades;
import org.knowm.xchange.dto.meta.ExchangeMetaData;
import org.knowm.xchange.service.marketdata.MarketDataService;

public class CoinbaseProExchangeIntegration {
Expand Down Expand Up @@ -61,4 +63,15 @@ public void testExtendedGetTrades() throws IOException {
Trades trades3 = marketDataService.getTrades(currencyPair, new Long(0), new Long(1005));
assertEquals("Unexpected trades list length (100)", 1004, trades3.getTrades().size());
}

@Test
public void testExchangeMetaData() {
final Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CoinbaseProExchange.class.getName());

ExchangeMetaData exchangeMetaData = exchange.getExchangeMetaData();

Assert.assertNotNull(exchangeMetaData);
Assert.assertNotNull(exchangeMetaData.getCurrencies());
Assert.assertNotNull("USDC is not defined", exchangeMetaData.getCurrencies().get(new Currency("USDC")));
}
}

0 comments on commit 95f018a

Please sign in to comment.