@@ -39,36 +39,13 @@ def delete(endpoint, params = nil)
3939 @http_manager . make_request ( method : 'delete' , endpoint : endpoint , params : params )
4040 end
4141
42- ###########
43- # aliases #
44- ###########
45-
46- # market data
42+ def change_credentials ( api_key :, api_secret :)
43+ @credential_factory . change_credentials ( api_key , api_secret )
44+ end
4745
48- # alias of get ticker
49- alias get_ticker_by_symbol get_ticker
50- alias get_ticker_of_symbol get_ticker
51- alias get_ticker_price_by_symbol get_ticker_price
52- alias get_ticker_price_of_symbol get_ticker_price
53- alias get_trades_of_symbol get_trades_by_symbol
54- alias get_orderbook_by_symbol get_orderbook
55- alias get_orderbook_of_symbol get_orderbook
56- alias get_orderbook_volume_by_symbol get_orderbook_volume
57- alias get_orderbook_volume_of_symbol get_orderbook_volume
58- alias get_candles_of_symbol get_candles_by_symbol
59- alias get_converted_candles_of_symbol get_converted_candles_by_symbol
60- # spot trading
61- alias get_spot_trading_balance_of_currency get_spot_trading_balance
62- alias get_spot_trading_balance_by_currency get_spot_trading_balance
63- alias get_all_trading_commissions get_all_trading_commission
64- alias get_trading_commission get_all_trading_commission
65- alias get_trading_commission_of_symbol get_trading_commission
66- alias get_trading_commission_by_symbol get_trading_commission
67- # wallet management
68- alias get_wallet_balance_of_currency get_wallet_balance
69- alias get_wallet_balance_by_currency get_wallet_balance
70- alias get_deposit_crypto_address_of_cyrrency get_deposit_crypto_address
71- alias get_deposit_crypto_address_by_cyrrency get_deposit_crypto_address
46+ def change_window ( window :)
47+ @credential_factory . change_window ( window )
48+ end
7249
7350 ################
7451 # public calls #
@@ -863,11 +840,25 @@ def withdraw_crypto_rollback(id:)
863840 # ==== Params
864841 # +Array[]+ +fee_requests+:: the list of fee requests, each request is a Hash in the form {currency:"string", amount:"string", network_code:"optional string"}
865842
866- def get_estimate_withdrawal_fees ( fee_requests )
843+ def get_estimate_withdrawal_fees ( fee_requests : )
867844 params = fee_requests
868845 post ( 'wallet/crypto/fees/estimate' , params )
869846 end
870847
848+ # Get an estimates for withdrawal fees of currencies
849+ #
850+ # Requires the "Payment information" API key Access Right
851+ #
852+ # https://api.exchange.cryptomkt.com/#bulk-estimate-withdrawal-fee
853+ #
854+ # ==== Params
855+ # +Array[]+ +fee_requests+:: the list of fee requests, each request is a Hash in the form {currency:"string", amount:"string", network_code:"optional string"}
856+
857+ def get_bulk_estimate_withdrawal_fees ( fee_requests :)
858+ params = fee_requests
859+ post ( 'wallet/crypto/fee/estimate/bulk' , params )
860+ end
861+
871862 # Get an estimate of the withdrawal fee
872863 #
873864 # Requires the "Payment information" API key Access Right
@@ -883,6 +874,34 @@ def get_estimate_withdrawal_fee(currency:, amount:, network_code: nil)
883874 get ( 'wallet/crypto/fee/estimate' , params ) [ 'fee' ]
884875 end
885876
877+ # Get an estimates for deposit fees of currencies
878+ #
879+ # Requires the "Payment information" API key Access Right
880+ #
881+ # https://api.exchange.cryptomkt.com/#bulk-estimate-deposit-fee
882+ #
883+ # ==== Params
884+ # +Array[]+ +fee_requests+:: the list of fee requests, each request is a Hash in the form {currency:"string", amount:"string", network_code:"optional string"}
885+ def get_bulk_estimate_deposit_fees ( fee_requests :)
886+ params = fee_requests
887+ post ( 'wallet/crypto/fee/deposit/estimate/bulk' , params )
888+ end
889+
890+ # Get an estimate of the deposit fee
891+ #
892+ # Requires the "Payment information" API key Access Right
893+ #
894+ # https://api.exchange.cryptomkt.com/#estimate-deposit-fee
895+ #
896+ # ==== Params
897+ # +String+ +currency+:: the currency code for deposit
898+ # +float+ +amount+:: the expected deposit amount
899+
900+ def get_estimate_deposit_fee ( currency :, amount :, network_code : nil )
901+ params = { amount : amount , currency : currency , network_code : network_code }
902+ get ( 'wallet/crypto/fee/deposit/estimate' , params ) [ 'fee' ]
903+ end
904+
886905 # Converts between currencies
887906 # Successful response to the request does not necessarily mean the resulting transaction got executed immediately. It has to be processed first and may eventually be rolled back
888907 # To see whether a transaction has been finalized, call #get_transaction
@@ -986,9 +1005,9 @@ def transfer_money_to_another_user(currency:, amount:, by:, identifier:)
9861005 # +Array[String]+ +statuses+:: Optional. List of statuses to query. valid subtypes are: 'CREATED', 'PENDING', 'FAILED', 'SUCCESS' and 'ROLLED_BACK'
9871006 # +Array[String]+ +currencies+:: Optional. Currency codes of the transactions to fetch
9881007 # +Array[String]+ +networks+:: Optional. Network codes of the transactions to fetch
989- # +String+ +order_by+:: Optional. sorting parameter.'created_at' or 'id'. Default is 'created_at'
990- # +String+ +from+:: Optional. Interval initial value when ordering by 'created_at'. As Datetime
991- # +String+ +till+:: Optional. Interval end value when ordering by 'created_at'. As Datetime
1008+ # +String+ +order_by+:: Optional. sorting parameter.'created_at', 'updated_at', 'last_activity_at' 'or 'id'.
1009+ # +String+ +from+:: Optional. Optional. Interval initial value (inclusive). The value type depends on order_by
1010+ # +String+ +till+:: Optional. Interval end value (inclusive). The value type depends on order_BY
9921011 # +String+ +id_from+:: Optional. Interval initial value when ordering by id. Min is 0
9931012 # +String+ +id_till+:: Optional. Interval end value when ordering by id. Min is 0
9941013 # +String+ +sort+:: Optional. Sort direction. 'ASC' or 'DESC'. Default is 'DESC'
@@ -1238,5 +1257,38 @@ def get_sub_account_crypto_address(
12381257 "sub-account/crypto/address/#{ sub_account_id } /#{ currency } "
12391258 ) [ 'result' ] [ 'address' ]
12401259 end
1260+
1261+ ###########
1262+ # aliases #
1263+ ###########
1264+
1265+ # market data
1266+ alias get_ticker_by_symbol get_ticker
1267+ alias get_ticker_of_symbol get_ticker
1268+ alias get_ticker_price_by_symbol get_ticker_price
1269+ alias get_ticker_price_of_symbol get_ticker_price
1270+ alias get_trades_of_symbol get_trades_by_symbol
1271+ alias get_orderbook_by_symbol get_orderbook
1272+ alias get_orderbook_of_symbol get_orderbook
1273+ alias get_orderbook_volume_by_symbol get_orderbook_volume
1274+ alias get_orderbook_volume_of_symbol get_orderbook_volume
1275+ alias get_candles_of_symbol get_candles_by_symbol
1276+ alias get_converted_candles_of_symbol get_converted_candles_by_symbol
1277+
1278+ # spot trading
1279+ alias get_spot_trading_balance_of_currency get_spot_trading_balance
1280+ alias get_spot_trading_balance_by_currency get_spot_trading_balance
1281+ alias get_all_trading_commissions get_all_trading_commission
1282+ alias get_trading_commissions get_all_trading_commission
1283+ alias get_trading_commission_of_symbol get_trading_commission
1284+ alias get_trading_commission_by_symbol get_trading_commission
1285+
1286+ # wallet management
1287+ alias get_wallet_balance_of_currency get_wallet_balance
1288+ alias get_wallet_balance_by_currency get_wallet_balance
1289+ alias get_deposit_crypto_address_of_cyrrency get_deposit_crypto_address
1290+ alias get_deposit_crypto_address_by_cyrrency get_deposit_crypto_address
12411291 end
12421292end
1293+
1294+ # rubocop:enable Layout/LineLength
0 commit comments