@@ -20,9 +20,9 @@ public class Kucoin extends Market {
2020
2121 private final static String NAME = "Kucoin" ;
2222 private final static String TTS_NAME = NAME ;
23- private final static String URL = "https://api.kucoin.com/v1/open/tick ?symbol=%1$s" ;
23+ private final static String URL = "https://api.kucoin.com/api/ v1/market/stats ?symbol=%1$s" ;
2424
25- private final static String URL_COINS_PAIRS = "https://api.kucoin.com/v1/market/open /symbols" ;
25+ private final static String URL_COINS_PAIRS = "https://api.kucoin.com/api/v1 /symbols" ;
2626
2727 public Kucoin () {
2828 super (NAME , TTS_NAME , null );
@@ -41,8 +41,8 @@ protected void parseTickerFromJsonObject(int requestId, JSONObject jsonObject, T
4141 ticker .vol = tickerJsonObject .getDouble ("vol" );
4242 ticker .high = tickerJsonObject .getDouble ("high" );
4343 ticker .low = tickerJsonObject .getDouble ("low" );
44- ticker .last = tickerJsonObject .getDouble ("lastDealPrice " );
45- ticker .timestamp = tickerJsonObject .getLong ("datetime " );
44+ ticker .last = tickerJsonObject .getDouble ("last " );
45+ ticker .timestamp = tickerJsonObject .getLong ("time " );
4646 }
4747
4848 // ====================
@@ -60,8 +60,8 @@ protected void parseCurrencyPairsFromJsonObject(int requestId, JSONObject jsonOb
6060 for (int i =0 ; i < data .length (); ++i ) {
6161 final JSONObject pairJsonObject = data .getJSONObject (i );
6262 pairs .add (new CurrencyPairInfo (
63- pairJsonObject .getString ("coinType " ),
64- pairJsonObject .getString ("coinTypePair " ),
63+ pairJsonObject .getString ("baseCurrency " ),
64+ pairJsonObject .getString ("quoteCurrency " ),
6565 pairJsonObject .getString ("symbol" )
6666 ));
6767 }
0 commit comments