Class: Bitflyer::HTTP::Private::Client
- Inherits:
-
Object
- Object
- Bitflyer::HTTP::Private::Client
- Defined in:
- lib/bitflyer/http/private.rb
Instance Method Summary collapse
- #balance ⇒ Object
- #collateral ⇒ Object
-
#initialize(key, secret) ⇒ Client
constructor
A new instance of Client.
- #permissions ⇒ Object
- #positions ⇒ Object
Constructor Details
#initialize(key, secret) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/bitflyer/http/private.rb', line 5 def initialize(key, secret) @connection = Connection.new(key, secret) end |
Instance Method Details
#balance ⇒ Object
13 14 15 |
# File 'lib/bitflyer/http/private.rb', line 13 def balance @connection.get('/v1/me/getbalance').body end |
#collateral ⇒ Object
17 18 19 |
# File 'lib/bitflyer/http/private.rb', line 17 def collateral @connection.get('/v1/me/getcollateral').body end |
#permissions ⇒ Object
9 10 11 |
# File 'lib/bitflyer/http/private.rb', line 9 def @connection.get('/v1/me/getpermissions').body end |
#positions ⇒ Object
21 22 23 |
# File 'lib/bitflyer/http/private.rb', line 21 def positions @connection.get('/v1/me/getpositions', { product_code: 'FX_BTC_JPY' }).body end |