Class: Coinbase::Prices

Inherits:
Object
  • Object
show all
Defined in:
lib/coinbase/prices.rb

Instance Method Summary collapse

Instance Method Details

#buy(currency_pair) ⇒ Hash

Get buy prices for a given currency pair.

Returns:

  • (Hash)

    a list of buy prices.



8
9
10
# File 'lib/coinbase/prices.rb', line 8

def buy(currency_pair)
  send_request("/prices/#{currency_pair}/buy")
end

#sell(currency_pair) ⇒ Hash

Get sell prices for a given currency pair.

Returns:

  • (Hash)

    a list of sell prices.



17
18
19
# File 'lib/coinbase/prices.rb', line 17

def sell(currency_pair)
  send_request("/prices/#{currency_pair}/sell")
end

#spot(currency_pair) ⇒ Hash

Get spot prices for a given currency pair.

Returns:

  • (Hash)

    a list of spot prices.



26
27
28
# File 'lib/coinbase/prices.rb', line 26

def spot(currency_pair)
  send_request("/prices/#{currency_pair}/spot")
end