okcoin 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/okcoin/version.rb +1 -1
- data/lib/okcoin.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 953a20a61a4f32540729f3f0be29ebfbb660e681
|
|
4
|
+
data.tar.gz: ee210f2e9466669b9225972d8ef2f5f0411e51d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de1b9025d56064f8f7f5b1a52664584c81d890676b2087362ed83101f63055f2d1099db23728ffe43fb121263664b740a5df4060e5f718315fa42c549190053f
|
|
7
|
+
data.tar.gz: 601c0b4493885a17ce1b69013653023745358b509c9a712cf9fba70cdc27192bbabe098b81612ccd52fa5990429915561484fbb6058f86fc2053690082df6081
|
data/README.md
CHANGED
|
@@ -35,17 +35,21 @@ Okcoin::logger.level = Logger::DEBUG
|
|
|
35
35
|
# url可选,默认就是https://www.okcoin.cn/api/,后面两个必选
|
|
36
36
|
client = Okcoin::Client.new url: 'https://www.okcoin.cn/api/', api_key: 'YOUR_OKCOIN_APIKEY', secret_key: 'YOUR_OKCOIN_SECRET'
|
|
37
37
|
|
|
38
|
-
client.ticker(symbol: "btc_cny")
|
|
39
|
-
client.trades(symbol: 'btc_cny', since: nil)
|
|
38
|
+
result = client.ticker(symbol: "btc_cny")
|
|
39
|
+
result = client.trades(symbol: 'btc_cny', since: nil)
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
结果以ruby
|
|
42
|
+
结果以ruby数据格式返回。
|
|
43
43
|
|
|
44
44
|
更多接口详情,请查看[okcoin官方文档](https://www.okcoin.cn/rest_getStarted.html)。
|
|
45
45
|
|
|
46
46
|
## Contributing
|
|
47
47
|
|
|
48
|
-
如果有问题给我发邮件:wuminzhe@126.com
|
|
48
|
+
如果有问题给我发邮件:wuminzhe@126.com
|
|
49
|
+
|
|
50
|
+
如果觉得有用,支持点币😆:**19n1AiDnzbnuEJcnwVmuXSUP1dpodBMdHF**
|
|
51
|
+
|
|
52
|
+
|
|
49
53
|
|
|
50
54
|
Bug reports and pull requests are welcome on GitHub at https://github.com/wuminzhe/okcoin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
51
55
|
|
data/lib/okcoin/version.rb
CHANGED
data/lib/okcoin.rb
CHANGED
|
@@ -9,6 +9,12 @@ require "okcoin/api_define_tool"
|
|
|
9
9
|
require 'okcoin/base'
|
|
10
10
|
require "okcoin/client"
|
|
11
11
|
|
|
12
|
+
class Object
|
|
13
|
+
def blank?
|
|
14
|
+
respond_to?(:empty?) ? !!empty? : !self
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
12
18
|
module Okcoin
|
|
13
19
|
def self.logger
|
|
14
20
|
if $logger.nil?
|
|
@@ -17,10 +23,4 @@ module Okcoin
|
|
|
17
23
|
end
|
|
18
24
|
return $logger
|
|
19
25
|
end
|
|
20
|
-
|
|
21
|
-
class Object
|
|
22
|
-
def blank?
|
|
23
|
-
respond_to?(:empty?) ? !!empty? : !self
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
26
|
end
|