Module: HuobiApi
- Defined in:
- lib/huobi_api.rb,
lib/huobi_api/client.rb,
lib/huobi_api/orders.rb,
lib/huobi_api/network.rb,
lib/huobi_api/version.rb,
lib/huobi_api/accounts.rb
Defined Under Namespace
Modules: Accounts, Network, Orders
Classes: Client
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.account_id ⇒ Object
29
30
31
|
# File 'lib/huobi_api.rb', line 29
def self.account_id
@account_id
end
|
.account_id=(account_id) ⇒ Object
25
26
27
|
# File 'lib/huobi_api.rb', line 25
def self.account_id=(account_id)
@account_id = account_id
end
|
.client ⇒ Object
42
43
44
|
# File 'lib/huobi_api.rb', line 42
def self.client
@client ||= Client.new
end
|
configure like HuobiApi.configure do |config|
config.key = 'my key'
// also secret and account_id
end
38
39
40
|
# File 'lib/huobi_api.rb', line 38
def self.configure
yield self
end
|
.key ⇒ Object
13
14
15
|
# File 'lib/huobi_api.rb', line 13
def self.key
@key
end
|
.key=(key) ⇒ Object
9
10
11
|
# File 'lib/huobi_api.rb', line 9
def self.key=(key)
@key = key
end
|
.method_missing(method, *args, &block) ⇒ Object
46
47
48
49
|
# File 'lib/huobi_api.rb', line 46
def self.method_missing(method, *args, &block)
return super unless client.respond_to?(method)
client.send method, *args, &block
end
|
.respond_to?(method, include_private = false) ⇒ Boolean
51
52
53
|
# File 'lib/huobi_api.rb', line 51
def self.respond_to?(method, include_private = false)
client.respond_to?(method, include_private) || super(method, include_private)
end
|
.secret ⇒ Object
21
22
23
|
# File 'lib/huobi_api.rb', line 21
def self.secret
@secret
end
|
.secret=(secret) ⇒ Object
17
18
19
|
# File 'lib/huobi_api.rb', line 17
def self.secret=(secret)
@secret = secret
end
|