Class: Btce::PublicAPI

Inherits:
API
  • Object
show all
Defined in:
lib/btce.rb

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

get_https, get_json

Class Method Details

.get_pair_operation_json(pair, operation) ⇒ Object

Raises:

  • (ArgumentError)


113
114
115
116
117
# File 'lib/btce.rb', line 113

def get_pair_operation_json(pair, operation)
  raise ArgumentError if not API::CURRENCY_PAIRS.include? pair
  raise ArgumentError if not OPERATIONS.include? operation
  get_json({ :url => "https://#{API::BTCE_DOMAIN}/api/2/#{pair}/#{operation}" })
end