@@ -17,9 +17,9 @@ class TradingClient < AuthClient
1717 def initialize ( api_key :, api_secret :, window : nil )
1818 super (
1919 url : 'wss://api.exchange.cryptomkt.com/api/3/ws/trading' ,
20- api_key : api_key ,
21- api_secret : api_secret ,
22- window : window ,
20+ api_key :,
21+ api_secret :,
22+ window :,
2323 subscription_keys : build_subscription_hash )
2424 end
2525
@@ -76,7 +76,7 @@ def subscribe_to_spot_balance(callback:, mode: nil, result_callback: nil)
7676 interceptor = lambda { |notification , _type |
7777 callback . call ( notification )
7878 }
79- send_subscription ( 'spot_balance_subscribe' , interceptor , { mode : mode } , result_callback )
79+ send_subscription ( 'spot_balance_subscribe' , interceptor , { mode : } , result_callback )
8080 end
8181
8282 # stop recieving the feed of balances changes
@@ -129,9 +129,9 @@ def create_spot_order( # rubocop:disable Metrics/ParameterLists
129129 expire_time : nil , strict_validate : nil , post_only : nil , take_rate : nil , make_rate : nil , callback : nil
130130 )
131131 request ( 'spot_new_order' , callback ,
132- { client_order_id : client_order_id , symbol : symbol , side : side , quantity : quantity , type : type ,
133- time_in_force : time_in_force , price : price , stop_price : stop_price , expire_time : expire_time ,
134- strict_validate : strict_validate , post_only : post_only , take_rate : take_rate , make_rate : make_rate } )
132+ { client_order_id :, symbol :, side :, quantity :, type :,
133+ time_in_force :, price :, stop_price :, expire_time :,
134+ strict_validate :, post_only :, take_rate :, make_rate : } )
135135 end
136136
137137 # creates a list of spot orders
@@ -174,7 +174,7 @@ def create_spot_order_list(
174174 orders :, contingency_type :, order_list_id : nil , callback : nil
175175 )
176176 request ( 'spot_new_order_list' , callback , {
177- orders : orders , contingency_type : contingency_type , order_list_id : order_list_id
177+ orders :, contingency_type :, order_list_id :
178178 } ,
179179 orders . count )
180180 end
@@ -187,7 +187,7 @@ def create_spot_order_list(
187187 # +String+ +client_order_id+:: the client order id of the order to cancel
188188 # +Proc+ +callback+:: Optional. A +Proc+ of two arguments, An exception and a result, called either with the exception or with the result, a list of reports of the canceled orders
189189 def cancel_spot_order ( client_order_id :, callback : nil )
190- request ( 'spot_cancel_order' , callback , { client_order_id : client_order_id } )
190+ request ( 'spot_cancel_order' , callback , { client_order_id : } )
191191 end
192192
193193 # cancel all active spot orders and returns the ones that could not be canceled
@@ -222,7 +222,7 @@ def get_spot_trading_balances(callback:)
222222 # +String+ +currency+:: The currency code to query the balance
223223 # +Proc+ +callback+:: A +Proc+ of two arguments, An exception and a result, called either with the exception or with the result, a trading balance
224224 def get_spot_trading_balance ( currency :, callback :)
225- request ( 'spot_balance' , callback , { currency : currency } )
225+ request ( 'spot_balance' , callback , { currency : } )
226226 end
227227
228228 # changes the parameters of an existing order, quantity or price
@@ -238,11 +238,11 @@ def get_spot_trading_balance(currency:, callback:)
238238 # +Bool+ +strict_validate+:: price and quantity will be checked for the incrementation with tick size and quantity step. See symbol's tick_size and quantity_increment
239239 # +Proc+ +callback+:: Optional. A +Proc+ of two arguments, An exception and a result, called either with the exception or with the result, the new version of the order
240240 def replace_spot_order ( # rubocop:disable Metrics/ParameterLists
241- client_order_id :, new_client_order_id :, quantity :, price :, stop_price :nil , strict_validate : nil , callback : nil
241+ client_order_id :, new_client_order_id :, quantity :, price :, stop_price : nil , strict_validate : nil , callback : nil
242242 )
243243 request ( 'spot_replace_order' , callback , {
244- client_order_id : client_order_id , new_client_order_id : new_client_order_id , quantity : quantity ,
245- price : price , stop_price : stop_price , strict_validate : strict_validate
244+ client_order_id :, new_client_order_id :, quantity :,
245+ price :, stop_price :, strict_validate :
246246 } )
247247 end
248248
@@ -268,7 +268,7 @@ def get_spot_commissions(callback:)
268268 # +String+ +symbol+:: The symbol of the commission rate
269269 # +Proc+ +callback+:: A +Proc+ of two arguments, An exception and a result, called either with the exception or with the result, a commission for a symbol for the user
270270 def get_spot_commission ( symbol :, callback :)
271- request ( 'spot_fee' , callback , { symbol : symbol } )
271+ request ( 'spot_fee' , callback , { symbol : } )
272272 end
273273
274274 alias get_spot_trading_balance_of_currency get_spot_trading_balance
0 commit comments