Class: Bitfinex::RESTv1

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RESTv1Wallet

#balances, #key_info, #margin_infos, #summary, #transfer, #withdraw

Methods included from RESTv1Trades

#trades

Methods included from RESTv1Ticker

#ticker

Methods included from RESTv1Symbols

#symbols, #symbols_details

Methods included from RESTv1Stats

#stats

Methods included from RESTv1Positions

#claim_position, #close_position, #positions

Methods included from RESTv1Orders

#cancel_orders, #multiple_orders, #new_order, #order_status, #orders, #replace_order

Methods included from RESTv1OrderBook

#orderbook

Methods included from RESTv1MarginFunding

#cancel_offer, #close_funding, #credits, #new_offer, #offer_status, #offers, #taken_funds, #total_taken_funds, #unused_taken_funds

Methods included from RESTv1Lends

#lends

Methods included from RESTv1HistoricalData

#history, #movements, #mytrades

Methods included from RESTv1FundingBook

#funding_book

Methods included from RESTv1Deposit

#deposit

Methods included from RESTv1AccountInfo

#account_info, #fees

Methods included from RESTClient

#check_params

Constructor Details

#initialize(args = {}) ⇒ RESTv1

Returns a new instance of RESTv1.



39
40
41
42
43
44
45
46
47
48
# File 'lib/rest/v1.rb', line 39

def initialize(args = {})
  self.api_endpoint = args[:url] ? "#{args[:url]}/v1/" : "https://api.bitfinex.com/v1/"
  self.proxy = args[:proxy] || nil
  self.debug_connection = false
  self.api_version = 1
  self.rest_timeout = 30
  self.rest_open_timeout = 30
  self.api_key = args[:api_key]
  self.api_secret = args[:api_secret]
end

Instance Attribute Details

#api_endpointObject

Returns the value of attribute api_endpoint.



19
20
21
# File 'lib/rest/v1.rb', line 19

def api_endpoint
  @api_endpoint
end

#api_keyObject

Returns the value of attribute api_key.



21
22
23
# File 'lib/rest/v1.rb', line 21

def api_key
  @api_key
end

#api_secretObject

Returns the value of attribute api_secret.



21
22
23
# File 'lib/rest/v1.rb', line 21

def api_secret
  @api_secret
end

#api_versionObject

Returns the value of attribute api_version.



19
20
21
# File 'lib/rest/v1.rb', line 19

def api_version
  @api_version
end

#debugObject

Returns the value of attribute debug.



19
20
21
# File 'lib/rest/v1.rb', line 19

def debug
  @debug
end

#debug_connectionObject

Returns the value of attribute debug_connection.



19
20
21
# File 'lib/rest/v1.rb', line 19

def debug_connection
  @debug_connection
end

#proxyObject

Returns the value of attribute proxy.



20
21
22
# File 'lib/rest/v1.rb', line 20

def proxy
  @proxy
end

#rest_open_timeoutObject

Returns the value of attribute rest_open_timeout.



20
21
22
# File 'lib/rest/v1.rb', line 20

def rest_open_timeout
  @rest_open_timeout
end

#rest_timeoutObject

Returns the value of attribute rest_timeout.



20
21
22
# File 'lib/rest/v1.rb', line 20

def rest_timeout
  @rest_timeout
end

Instance Method Details

#configObject



50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rest/v1.rb', line 50

def config
  {
    :api_endpoint => self.api_endpoint,
    :debug_connection => self.debug_connection,
    :api_version => self.api_version,
    :rest_timeout => self.rest_timeout,
    :rest_open_timeout => self.rest_open_timeout,
    :proxy => self.proxy,
    :api_key => self.api_key,
    :api_secret => self.api_secret
  }
end