Class: Btce::PublicAPI
Constant Summary collapse
- OPERATIONS =
%w(fee ticker trades depth)
Constants inherited from API
API::BTCE_DOMAIN, API::CURRENCIES, API::CURRENCY_PAIRS, API::MAX_DIGITS
Class Method Summary collapse
Methods inherited from API
Class Method Details
.get_pair_operation_json(pair, operation) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/btce/api/public_api.rb', line 40 def get_pair_operation_json(pair, operation) list = pair.split('-') i = 0 begin raise ArgumentError if not API::CURRENCY_PAIRS.include? list[i] i = i + 1 end while i < list.length raise ArgumentError if not OPERATIONS.include? operation get_json({ :url => "https://#{API::BTCE_DOMAIN}/api/3/#{operation}/#{pair}" }) end |