Class: Bitfinex::RESTv2
- Inherits:
-
Object
- Object
- Bitfinex::RESTv2
- Includes:
- RESTClient, RESTv2Funding, RESTv2Margin, RESTv2Orders, RESTv2Personal, RESTv2Positions, RESTv2Stats, RESTv2Ticker, RESTv2Trading, RESTv2Utils, RESTv2Wallet
- Defined in:
- lib/rest/v2.rb
Instance Attribute Summary collapse
-
#aff_code ⇒ Object
Returns the value of attribute aff_code.
-
#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 = {}) ⇒ RESTv2
constructor
A new instance of RESTv2.
Methods included from RESTv2Positions
Methods included from RESTv2Funding
#cancel_funding_offer, #close_funding, #submit_funding_auto, #submit_funding_offer
Methods included from RESTv2Wallet
#create_deposit_address, #deposit_address, #transfer, #wallets, #withdraw
Methods included from RESTv2Orders
#cancel_multi, #cancel_order, #order_multi, #order_trades, #orders, #submit_order, #update_order
Methods included from RESTv2Utils
Methods included from RESTv2Trading
#active_positions, #books, #candles, #trades
Methods included from RESTv2Ticker
Methods included from RESTv2Stats
Methods included from RESTv2Personal
#alert, #alerts, #available_balance, #delete_alert, #performance
Methods included from RESTv2Margin
#funding_info, #margin_info, #offers
Methods included from RESTClient
Constructor Details
#initialize(args = {}) ⇒ RESTv2
Returns a new instance of RESTv2.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rest/v2.rb', line 31 def initialize(args = {}) self.api_endpoint = args[:url] ? "#{args[:url]}/v2/" : "https://api.bitfinex.com/v2/" self.proxy = args[:proxy] || nil self.debug_connection = false self.api_version = 2 self.rest_timeout = 30 self.rest_open_timeout = 30 self.api_key = args[:api_key] self.api_secret = args[:api_secret] self.aff_code = args[:aff_code] end |
Instance Attribute Details
#aff_code ⇒ Object
Returns the value of attribute aff_code.
17 18 19 |
# File 'lib/rest/v2.rb', line 17 def aff_code @aff_code end |
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
15 16 17 |
# File 'lib/rest/v2.rb', line 15 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
17 18 19 |
# File 'lib/rest/v2.rb', line 17 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
17 18 19 |
# File 'lib/rest/v2.rb', line 17 def api_secret @api_secret end |
#api_version ⇒ Object
Returns the value of attribute api_version.
15 16 17 |
# File 'lib/rest/v2.rb', line 15 def api_version @api_version end |
#debug ⇒ Object
Returns the value of attribute debug.
15 16 17 |
# File 'lib/rest/v2.rb', line 15 def debug @debug end |
#debug_connection ⇒ Object
Returns the value of attribute debug_connection.
15 16 17 |
# File 'lib/rest/v2.rb', line 15 def debug_connection @debug_connection end |
#proxy ⇒ Object
Returns the value of attribute proxy.
16 17 18 |
# File 'lib/rest/v2.rb', line 16 def proxy @proxy end |
#rest_open_timeout ⇒ Object
Returns the value of attribute rest_open_timeout.
16 17 18 |
# File 'lib/rest/v2.rb', line 16 def rest_open_timeout @rest_open_timeout end |
#rest_timeout ⇒ Object
Returns the value of attribute rest_timeout.
16 17 18 |
# File 'lib/rest/v2.rb', line 16 def rest_timeout @rest_timeout end |
Instance Method Details
#config ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rest/v2.rb', line 43 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, :aff_code => self.aff_code } end |