Module: Shapeshift::Api

Defined in:
lib/shapeshift/api.rb,
lib/shapeshift/api/version.rb

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.coinsObject



7
8
9
# File 'lib/shapeshift/api.rb', line 7

def self.coins
  get 'getcoins'
end

.quote(amount_to, from_symbol, to_symbol = 'btc') ⇒ Object



20
21
22
# File 'lib/shapeshift/api.rb', line 20

def self.quote amount_to, from_symbol, to_symbol = 'btc'
  post 'sendamount', {amount: amount_to, pair: pair(from_symbol, to_symbol)}
end

.rate(from_symbol, to_symbol = 'btc') ⇒ Object

minimum, limit - measured in from_symbol rate = from_symbol / to_symbol minerFee - measured in to_symbol



16
17
18
# File 'lib/shapeshift/api.rb', line 16

def self.rate from_symbol, to_symbol = 'btc'
  get "marketinfo/#{pair(from_symbol, to_symbol)}"
end

.sendamount(amount_to, address_to, from_symbol, to_symbol = 'btc') ⇒ Object

“pair”=>“eth_gnt”, “withdrawal”=>“0xd7170547046adc91b5cdf39bc04ad70e95d0a825”, “withdrawalAmount”=>“30”, “deposit”=>“0x553beec262e0ab11dfe43f7d60dc1f51f03e4398”, “depositAmount”=>“0.02696698”, “expiration”=>1512726449980, “quotedRate”=>“1557.46037437”, “maxLimit”=>11.57075248, “apiPubKey”=>“shapeshift”, “minerFee”=>“12”}



30
31
32
# File 'lib/shapeshift/api.rb', line 30

def self.sendamount amount_to, address_to, from_symbol, to_symbol = 'btc'
  post 'sendamount', {amount: amount_to, withdrawal: address_to, pair: pair(from_symbol, to_symbol)}
end

.status(address) ⇒ Object

“address”=>“0x553beec262e0ab11dfe43f7d60dc1f51f03e4398”



35
36
37
# File 'lib/shapeshift/api.rb', line 35

def self.status address
  get "txStat/#{address}"
end