yobit 0.1.0 → 0.1.1
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 +40 -11
- data/lib/yobit.rb +3 -2
- data/lib/yobit/version.rb +1 -1
- 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: 4cb3e3139e805aba227f668cdac448d0aedefbd8
|
4
|
+
data.tar.gz: 17f504ca0c14d65ad2d94a1951a6fe74ea0b143b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9dff2b750de42945a76ed3c11e3c66e04d4b0b2f51fc070b209c8dbbcf9b59263a4dafd7994b631d1ca88e17d1d7ceac86e698481c0fd01cf3cb6ed2bfef603
|
7
|
+
data.tar.gz: 2ac0c8b8502dcf54e0e62cb6e50d16d07be870bd622a62f116490829b75312dc93c98618c87cd245a5595ef32f911bf65b2278ed59dc55f54201b522e9b90118
|
data/README.md
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
# Yobit
|
2
2
|
|
3
|
-
|
3
|
+
I currently do not have a yobit.net account or api key (registration is currently disabled, so I cannot test any of the authenticated calls...
|
4
4
|
|
5
|
-
|
5
|
+
[](https://badge.fury.io/rb/yobit.png)
|
6
6
|
|
7
|
+
This gem provides a wrapper for the yobit.net api: [yobit.net](https://yobit.net/en/api)
|
7
8
|
## Installation
|
8
9
|
|
9
10
|
Add this line to your application's Gemfile:
|
10
11
|
|
11
|
-
|
12
|
-
gem 'yobit'
|
13
|
-
```
|
12
|
+
gem 'yobit'
|
14
13
|
|
15
14
|
And then execute:
|
16
15
|
|
@@ -22,15 +21,45 @@ Or install it yourself as:
|
|
22
21
|
|
23
22
|
## Usage
|
24
23
|
|
25
|
-
|
24
|
+
Setup your api key:
|
26
25
|
|
27
|
-
|
26
|
+
```
|
27
|
+
Yobit.setup do | config |
|
28
|
+
config.key = 'my api key'
|
29
|
+
config.secret = 'my api secret'
|
30
|
+
end
|
31
|
+
```
|
28
32
|
|
29
|
-
|
33
|
+
There is a class method for each api call, use underscores instead of camelcase.
|
30
34
|
|
31
|
-
|
35
|
+
```
|
36
|
+
Yobit.ticker
|
37
|
+
Yobit.get_info
|
38
|
+
```
|
32
39
|
|
33
|
-
|
40
|
+
Full list of supported methods, see [yobit](https://yobit.net/en/api) for usage.
|
34
41
|
|
35
|
-
|
42
|
+
```
|
43
|
+
info
|
44
|
+
ticker
|
45
|
+
depth
|
46
|
+
trades
|
47
|
+
get_info
|
48
|
+
trade
|
49
|
+
active_orders
|
50
|
+
order_info
|
51
|
+
cancel_order
|
52
|
+
trad_history
|
53
|
+
get_deposit_address
|
54
|
+
withdraw_coins_to_address
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
## Contributing
|
36
60
|
|
61
|
+
1. Fork it
|
62
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
63
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
64
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
65
|
+
5. Create new Pull Request
|
data/lib/yobit.rb
CHANGED
@@ -11,7 +11,8 @@ module Yobit
|
|
11
11
|
attr_accessor :key
|
12
12
|
|
13
13
|
def initialize
|
14
|
-
@key
|
14
|
+
@key = ''
|
15
|
+
@secret = ''
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
@@ -111,7 +112,7 @@ module Yobit
|
|
111
112
|
|
112
113
|
def self.create_sign(data)
|
113
114
|
encoded_data = Addressable::URI.form_encode(data)
|
114
|
-
OpenSSL::HMAC.hexdigest('sha512', config.
|
115
|
+
OpenSSL::HMAC.hexdigest('sha512', config.secret, encoded_data)
|
115
116
|
end
|
116
117
|
|
117
118
|
end
|
data/lib/yobit/version.rb
CHANGED