Class: Bitflyer::HTTP::Private::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/bitflyer/http/private.rb

Instance Method Summary collapse

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

#balanceObject



13
14
15
# File 'lib/bitflyer/http/private.rb', line 13

def balance
  @connection.get('/v1/me/getbalance').body
end

#collateralObject



17
18
19
# File 'lib/bitflyer/http/private.rb', line 17

def collateral
  @connection.get('/v1/me/getcollateral').body
end

#permissionsObject



9
10
11
# File 'lib/bitflyer/http/private.rb', line 9

def permissions
  @connection.get('/v1/me/getpermissions').body
end

#positionsObject



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