Class: Bitfinex::RESTv1
- Inherits:
-
Object
- Object
- Bitfinex::RESTv1
- Includes:
- RESTClient, RESTv1AccountInfo, RESTv1Deposit, RESTv1FundingBook, RESTv1HistoricalData, RESTv1Lends, RESTv1MarginFunding, RESTv1OrderBook, RESTv1Orders, RESTv1Positions, RESTv1Stats, RESTv1Symbols, RESTv1Ticker, RESTv1Trades, RESTv1Wallet
- Defined in:
- lib/rest/v1.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#debug_connection ⇒ Object
Returns the value of attribute debug_connection.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#rest_open_timeout ⇒ Object
Returns the value of attribute rest_open_timeout.
-
#rest_timeout ⇒ Object
Returns the value of attribute rest_timeout.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(args = {}) ⇒ RESTv1
constructor
A new instance of RESTv1.
Methods included from RESTv1Wallet
#balances, #key_info, #margin_infos, #summary, #transfer, #withdraw
Methods included from RESTv1Trades
Methods included from RESTv1Ticker
Methods included from RESTv1Symbols
Methods included from RESTv1Stats
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
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
Methods included from RESTv1HistoricalData
#history, #movements, #mytrades
Methods included from RESTv1FundingBook
Methods included from RESTv1Deposit
Methods included from RESTv1AccountInfo
Methods included from RESTClient
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_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
19 20 21 |
# File 'lib/rest/v1.rb', line 19 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
21 22 23 |
# File 'lib/rest/v1.rb', line 21 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
21 22 23 |
# File 'lib/rest/v1.rb', line 21 def api_secret @api_secret end |
#api_version ⇒ Object
Returns the value of attribute api_version.
19 20 21 |
# File 'lib/rest/v1.rb', line 19 def api_version @api_version end |
#debug ⇒ Object
Returns the value of attribute debug.
19 20 21 |
# File 'lib/rest/v1.rb', line 19 def debug @debug end |
#debug_connection ⇒ Object
Returns the value of attribute debug_connection.
19 20 21 |
# File 'lib/rest/v1.rb', line 19 def debug_connection @debug_connection end |
#proxy ⇒ Object
Returns the value of attribute proxy.
20 21 22 |
# File 'lib/rest/v1.rb', line 20 def proxy @proxy end |
#rest_open_timeout ⇒ Object
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_timeout ⇒ Object
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
#config ⇒ Object
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 |