Skip to content

Commit ef614fe

Browse files
committed
feat: method aliases
1 parent 2f23111 commit ef614fe

File tree

6 files changed

+378
-0
lines changed

6 files changed

+378
-0
lines changed

src/main/java/com/cryptomarket/sdk/rest/CryptomarketRestClient.java

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ public Map<String, Currency> getCurrencies(
149149
*/
150150
public Ticker getTicker(String symbol) throws CryptomarketSDKException;
151151

152+
/**
153+
* alias of {@link #getTicker(String)}
154+
*/
155+
public Ticker getTickerBySymbol(String symbol) throws CryptomarketSDKException;
156+
157+
/**
158+
* alias of {@link #getTicker(String)}
159+
*/
160+
public Ticker getTickerOfSymbol(String symbol) throws CryptomarketSDKException;
161+
152162
/**
153163
* Get a map of quotation prices of currencies
154164
* <p>
@@ -238,6 +248,26 @@ public Map<String, TickerPrice> getTickerLastPrices(@Nullable List<String> symbo
238248
public TickerPrice getTickerLastPriceBySymbol(String symbol)
239249
throws CryptomarketSDKException;
240250

251+
/**
252+
* alias of {@link #getTickerLastPrice(String)}
253+
*
254+
* @param symbol
255+
* @return
256+
* @throws CryptomarketSDKException
257+
*/
258+
public TickerPrice getTickerLastPriceOfSymbol(String symbol)
259+
throws CryptomarketSDKException;
260+
261+
/**
262+
* alias of {@link #getTickerLastPrice(String)}
263+
*
264+
* @param symbol
265+
* @return
266+
* @throws CryptomarketSDKException
267+
*/
268+
public TickerPrice getTickerLastPrice(String symbol)
269+
throws CryptomarketSDKException;
270+
241271
/**
242272
* Get a map of trades for all symbols or for specified symbols
243273
* <p>
@@ -318,6 +348,16 @@ public List<PublicTrade> getTradesBySymbol(
318348
public List<PublicTrade> getTradesBySymbol(ParamsBuilder paramsBuilder)
319349
throws CryptomarketSDKException;
320350

351+
/**
352+
* alias of {@link #getTradesOfSymbol(ParamsBuilder)}
353+
*
354+
* @param paramsBuilder
355+
* @return
356+
* @throws CryptomarketSDKException
357+
*/
358+
public List<PublicTrade> getTradesOfSymbol(ParamsBuilder paramsBuilder)
359+
throws CryptomarketSDKException;
360+
321361
/**
322362
* Get a map of orderbooks for all symbols or for the specified symbols
323363
* <p>
@@ -373,6 +413,24 @@ public Map<String, OrderBook> getOrderBooks(ParamsBuilder paramsBuilder)
373413
*/
374414
public OrderBook getOrderBookBySymbol(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
375415

416+
/**
417+
* alias of {@link #getOrderBookBySymbol(ParamsBuilder)}
418+
*
419+
* @param paramsBuilder
420+
* @return
421+
* @throws CryptomarketSDKException
422+
*/
423+
public OrderBook getOrderBookOfSymbol(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
424+
425+
/**
426+
* alias of {@link #getOrderBookBySymbol(ParamsBuilder)}
427+
*
428+
* @param paramsBuilder
429+
* @return
430+
* @throws CryptomarketSDKException
431+
*/
432+
public OrderBook getOrderBook(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
433+
376434
/**
377435
* Get order book of a symbol with the desired volume for market depth search
378436
* <p>
@@ -397,6 +455,24 @@ public Map<String, OrderBook> getOrderBooks(ParamsBuilder paramsBuilder)
397455
*/
398456
public OrderBook getOrderBookVolumeBySymbol(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
399457

458+
/**
459+
* alias of {@link #getOrderBookVolumeBySymbol(ParamsBuilder)}
460+
*
461+
* @param paramsBuilder
462+
* @return
463+
* @throws CryptomarketSDKException
464+
*/
465+
public OrderBook getOrderBookVolumeOfSymbol(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
466+
467+
/**
468+
* alias of {@link #getOrderBookVolumeBySymbol(ParamsBuilder)}
469+
*
470+
* @param paramsBuilder
471+
* @return
472+
* @throws CryptomarketSDKException
473+
*/
474+
public OrderBook getOrderBookVolume(ParamsBuilder paramsBuilder) throws CryptomarketSDKException;
475+
400476
/**
401477
* Get a map of candles for all symbols or for specified symbols
402478
* <p>
@@ -487,6 +563,16 @@ public List<Candle> getCandlesBySymbol(
487563
public List<Candle> getCandlesBySymbol(ParamsBuilder paramsBuilder)
488564
throws CryptomarketSDKException;
489565

566+
/**
567+
* alias of {@link #getCandlesBySymbol(ParamsBuilder)}
568+
*
569+
* @param paramsBuilder
570+
* @return
571+
* @throws CryptomarketSDKException
572+
*/
573+
public List<Candle> getCandlesOfSymbol(ParamsBuilder paramsBuilder)
574+
throws CryptomarketSDKException;
575+
490576
/**
491577
* Gets data with a map of candles regarding the last price converted to the
492578
* target currency for all symbols or for the specified symbols. indexed by
@@ -603,6 +689,16 @@ public ConvertedCandlesBySymbol getConvertedCandlesBySymbol(
603689
public ConvertedCandlesBySymbol getConvertedCandlesBySymbol(ParamsBuilder paramsBuilder)
604690
throws CryptomarketSDKException;
605691

692+
/**
693+
* alias of {@link #getConvertedCandlesBySymbol(ParamsBuilder)}
694+
*
695+
* @param paramsBuilder
696+
* @return
697+
* @throws CryptomarketSDKException
698+
*/
699+
public ConvertedCandlesBySymbol getConvertedCandlesOfSymbol(ParamsBuilder paramsBuilder)
700+
throws CryptomarketSDKException;
701+
606702
/// AUTHENTICATED CALLS ///
607703

608704
// SPOT TRADING
@@ -632,6 +728,24 @@ public ConvertedCandlesBySymbol getConvertedCandlesBySymbol(ParamsBuilder params
632728
*/
633729
public Balance getSpotTradingBalanceByCurrency(String currency) throws CryptomarketSDKException;
634730

731+
/**
732+
* alias {@link #getSpotTradingBalanceByCurrency(String)}
733+
*
734+
* @param currency
735+
* @return
736+
* @throws CryptomarketSDKException
737+
*/
738+
public Balance getSpotTradingBalanceOfCurrency(String currency) throws CryptomarketSDKException;
739+
740+
/**
741+
* alias {@link #getSpotTradingBalanceByCurrency(String)}
742+
*
743+
* @param currency
744+
* @return
745+
* @throws CryptomarketSDKException
746+
*/
747+
public Balance getSpotTradingBalance(String currency) throws CryptomarketSDKException;
748+
635749
/**
636750
* Get the user's active spot orders
637751
* <p>
@@ -873,6 +987,14 @@ public Order replaceSpotOrder(ParamsBuilder paramsBuilder)
873987
*/
874988
public List<Commission> getAllTradingCommissions() throws CryptomarketSDKException;
875989

990+
/**
991+
* alias of {@link #getAllTradingCommissions()}
992+
*
993+
* @return
994+
* @throws CryptomarketSDKException
995+
*/
996+
public List<Commission> getTradingCommissions() throws CryptomarketSDKException;
997+
876998
/**
877999
* Get the personal trading commission rate of a symbol
8781000
* <p>
@@ -886,6 +1008,24 @@ public Order replaceSpotOrder(ParamsBuilder paramsBuilder)
8861008
*/
8871009
public Commission getTradingCommission(String symbol) throws CryptomarketSDKException;
8881010

1011+
/**
1012+
* alias {@link #getTradingCommission(String)}
1013+
*
1014+
* @param symbol
1015+
* @return
1016+
* @throws CryptomarketSDKException
1017+
*/
1018+
public Commission getTradingCommissionOfCurrency(String symbol) throws CryptomarketSDKException;
1019+
1020+
/**
1021+
* alias {@link #getTradingCommission(String)}
1022+
*
1023+
* @param symbol
1024+
* @return
1025+
* @throws CryptomarketSDKException
1026+
*/
1027+
public Commission getTradingCommissionByCurrency(String symbol) throws CryptomarketSDKException;
1028+
8891029
// TRADING HISTORY
8901030

8911031
/**
@@ -1003,6 +1143,24 @@ public List<Trade> getSpotTradesHistory(ParamsBuilder paramsBuilder)
10031143
*/
10041144
public Balance getWalletBalanceByCurrency(String currency) throws CryptomarketSDKException;
10051145

1146+
/**
1147+
* alias of {@link #getWalletBalanceByCurrency(String)}
1148+
*
1149+
* @param currency
1150+
* @return
1151+
* @throws CryptomarketSDKException
1152+
*/
1153+
public Balance getWalletBalanceOfCurrency(String currency) throws CryptomarketSDKException;
1154+
1155+
/**
1156+
* alias of {@link #getWalletBalanceByCurrency(String)}
1157+
*
1158+
* @param currency
1159+
* @return
1160+
* @throws CryptomarketSDKException
1161+
*/
1162+
public Balance getWalletBalance(String currency) throws CryptomarketSDKException;
1163+
10061164
/**
10071165
* Get the current addresses of the user
10081166
* <p>
@@ -1037,6 +1195,28 @@ public List<Address> getDepositCryptoAddresses(
10371195
public Address createDepositCryptoAddress(String currency, @Nullable String networkCode)
10381196
throws CryptomarketSDKException;
10391197

1198+
/**
1199+
* alias of {@link #createDepositCryptoAddress(String, String)}
1200+
*
1201+
* @param currency
1202+
* @param networkCode
1203+
* @return
1204+
* @throws CryptomarketSDKException
1205+
*/
1206+
public Address createDepositCryptoAddressOfCurrency(String currency, @Nullable String networkCode)
1207+
throws CryptomarketSDKException;
1208+
1209+
/**
1210+
* alias of {@link #createDepositCryptoAddress(String, String)}
1211+
*
1212+
* @param currency
1213+
* @param networkCode
1214+
* @return
1215+
* @throws CryptomarketSDKException
1216+
*/
1217+
public Address createDepositCryptoAddressByCurrency(String currency, @Nullable String networkCode)
1218+
throws CryptomarketSDKException;
1219+
10401220
/**
10411221
* Get the last 10 unique addresses used for deposit, by currency
10421222
* <p>

0 commit comments

Comments
 (0)