Class: MtGox::Client
- Inherits:
-
Object
- Object
- MtGox::Client
- Includes:
- Connection, Request
- Defined in:
- lib/mtgox/client.rb
Instance Method Summary collapse
-
#asks ⇒ Array<Numeric>
Fetch open asks.
-
#bids ⇒ Array<Numeric>
Fetch open bids.
-
#ticker ⇒ Hashie::Rash
Fetch the latest ticker data.
-
#trades ⇒ Array<Hashie::Rash>
Fetch recent trades.
Methods included from Request
Instance Method Details
#asks ⇒ Array<Numeric>
Fetch open asks
23 24 25 |
# File 'lib/mtgox/client.rb', line 23 def asks get('/code/data/getDepth.php')['asks'] end |
#bids ⇒ Array<Numeric>
Fetch open bids
32 33 34 |
# File 'lib/mtgox/client.rb', line 32 def bids get('/code/data/getDepth.php')['bids'] end |
#ticker ⇒ Hashie::Rash
Fetch the latest ticker data
14 15 16 |
# File 'lib/mtgox/client.rb', line 14 def ticker get('/code/data/ticker.php')['ticker'] end |
#trades ⇒ Array<Hashie::Rash>
Fetch recent trades
41 42 43 |
# File 'lib/mtgox/client.rb', line 41 def trades get('/code/data/getTrades.php').each{|t| t['date'] = Time.at(t['date'])} end |