Module: InstantOrderValidator
- Defined in:
- lib/quidax/validators/instant_order_validator.rb
Overview
validate instant orders
Class Method Summary collapse
Class Method Details
.validate_buy_from_crypto_body(body) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/quidax/validators/instant_order_validator.rb', line 3 def self.validate_buy_from_crypto_body(body) required_body_keys = %w[bid ask volume] Utils.check_missing_keys(required_keys: required_body_keys, keys: body.keys, field: "body") validate_bid_currency(body["bid"]) validate_ask_currency(body["ask"]) end |
.validate_sell_crypto_to_fiat(body) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/quidax/validators/instant_order_validator.rb', line 11 def self.validate_sell_crypto_to_fiat(body) required_body_keys = %w[bid ask total] Utils.check_missing_keys(required_keys: required_body_keys, keys: body.keys, field: "body") validate_bid_currency(body["bid"]) validate_ask_currency(body["ask"]) end |