zaif_wrapper 0.1.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0019ca2233f698abf9d6aae817b695aa0279e3bbf29a531b1824953b2f528a10'
4
- data.tar.gz: 37cfae035bd90963a6c4299c83af1bbd31fd907875374edd6f6065d18674f15d
3
+ metadata.gz: 899ad442302474aadf58b6ea93dfbb6a52db27a8cab327ce1511b0bb4682a144
4
+ data.tar.gz: edad02e0e2f78256ec45f05d4c62329ab0bc6e7296e80b8badc531ca0e176572
5
5
  SHA512:
6
- metadata.gz: 2f82193b66d1cadfba03dd7d3287e752452ec4ffd363c214a8f21b7c8f793371a03dc973fdf9d6379dc38e21a6fa8fdcae0354a129a15bf8e2ad1d312d8a5be2
7
- data.tar.gz: 1b1f5112345b70d4b017aeeee28c7b145a61b0550b91e60352a57d5c3651b1b0cb31f47d05e8b6c236bc1a2199baecf2cf08a1fd33c9b317d5e377efd5aae989
6
+ metadata.gz: 26d2411465a72482e16fbb80abfc2e8c126c3dc5ad2c1ef1b49a39f8a864b06e1191ae3ded0b51f00d9d2f457269aef284ed8b070f4493994be3a5d2078102dc
7
+ data.tar.gz: efbd39d03a388d9bfd728bec0a92c5fff5ce838be51ba0b40ecf2132b322c87ef4679b19179d78f0d6a2c4827aec996679c1f95faef5e0a7448400e30e5cd812
data/README.md CHANGED
@@ -26,10 +26,10 @@ Require zaif_wrapper:
26
26
  require 'zaif_wrapper'
27
27
  ```
28
28
 
29
- #### Public Client
29
+ #### [Public Client](http://techbureau-api-document.readthedocs.io/ja/latest/public/index.html)
30
30
  ```ruby
31
31
  # If you only plan on touching public API endpoints.
32
- client = Zaif_wrapper::Client::ZaifPublicApi.new
32
+ client = ZaifWrapper::Client::ZaifPublicApi.new
33
33
  ```
34
34
 
35
35
  Create various requests:
@@ -38,50 +38,68 @@ Create various requests:
38
38
  client.currencies('btc') # => [{ "name": "btc", "is_token": false }]
39
39
  client.currency_pairs('btc_jpy')
40
40
  client.last_price('btc_jpy')
41
+ client.ticker('btc_jpy')
42
+ client.trades('btc_jpy')
41
43
  client.depth('btc_jpy')
42
44
  ```
43
45
 
44
- #### Private Client
46
+ #### [Private Client](http://techbureau-api-document.readthedocs.io/ja/latest/trade/index.html)
45
47
  ```ruby
46
48
  # If you only plan on touching Future API endpoints.
47
- client = Zaif_wrapper::Client::ZaifPrivateApi.new(api_key, api_secret)
49
+ client = ZaifWrapper::Client::ZaifPrivateApi.new(api_key, api_secret)
48
50
  ```
49
51
 
50
52
  ```ruby
51
- client.currencies('btc') # => [{ "name": "btc", "is_token": false }]
52
- client.currency_pairs('btc_jpy')
53
- client.last_price('btc_jpy')
54
- client.depth('btc_jpy')
55
- ```
56
-
57
- #### Future Client(No Test)
58
- ```ruby
59
- # If you only plan on touching Future API endpoints.
60
- client = Zaif_wrapper::Client::ZaifFutureApi.new
53
+ client.get_info
54
+ client.get_info2
55
+ client.get_personal_info
56
+ client.get_id_info
57
+ client.trade_history
58
+ client.active_orders
59
+ client.trade({
60
+ currency_pair: 'btc_jpy',
61
+ action: 'bid',
62
+ price: 1000000,
63
+ amount: 0.0001
64
+ })
65
+ client.cancel_order({
66
+ order_id: 1
67
+ })
68
+ client.withdraw({
69
+ currency: 'btc',
70
+ address: 'abcabcabcabc',
71
+ amount: 0.3
72
+ })
73
+ client.deposit_history({
74
+ currency: 'jpy'
75
+ })
76
+ client.withdraw_history({
77
+ currency: 'jpy'
78
+ })
61
79
  ```
62
80
 
63
- #### Future Client(No Test)
81
+ #### [Future Client](http://techbureau-api-document.readthedocs.io/ja/latest/public_futures/index.html)
64
82
  ```ruby
65
83
  # If you only plan on touching Future API endpoints.
66
- client = Zaif_wrapper::Client::ZaifFutureApi.new
84
+ client = ZaifWrapper::Client::ZaifFutureApi.new
67
85
  ```
68
86
 
69
- #### Leverage Client(No Test)
87
+ #### [Leverage Client](http://techbureau-api-document.readthedocs.io/ja/latest/trade_leverage/index.html)
70
88
  ```ruby
71
89
  # If you only plan on touching Leverage API endpoints.
72
- client = Zaif_wrapper::Client::ZaifLeverageApi.new
90
+ client = ZaifWrapper::Client::ZaifLeverageApi.new
73
91
  ```
74
92
 
75
- #### WebSocket Client(No Test)
93
+ #### [WebSocket Client](http://techbureau-api-document.readthedocs.io/ja/latest/public/3_streaming.html)
76
94
  ```ruby
77
95
  # If you only plan on connecting WebSocket API endpoints.
78
- client = Zaif_wrapper::Client::ZaifStreamApi.new
96
+ client = ZaifWrapper::Client::ZaifStreamApi.new
79
97
  client.stream('btc_jpy')
80
98
  ```
81
99
 
82
100
  ## Contributing
83
101
 
84
- Bug reports and pull requests are welcome on GitHub at https://github.com/cobafan/zaif_wrapper.
102
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cobafan/zaifWrapper.
85
103
  ## License
86
104
 
87
105
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -90,3 +108,4 @@ The gem is available as open source under the terms of the [MIT License](http://
90
108
 
91
109
  If This library is useful to you feel free to donate zaif with twitter chip.
92
110
  * screen_name: cobafan
111
+ * donate_me: https://zaif.jp/social/tw/sendtip
@@ -11,7 +11,6 @@ module ZaifWrapper
11
11
  PRIVATE_REQUEST_URL_BASE = 'https://api.zaif.jp/tapi'.freeze
12
12
  FUTURE_REQUEST_URL_BASE = 'https://api.zaif.jp/fapi/1/'.freeze
13
13
  LEVERAGE_REQUEST_URL_BASE = 'https://api.zaif.jp/tlapi'.freeze
14
- LEVERAGE_METHODS = ['get_positions', 'position_history', 'active_positions', 'create_position', 'change_position', 'cancel_position'].freeze
15
14
  PUBLIC_METHODS = {
16
15
  :currencies => 'currency_code',
17
16
  :currency_pairs => 'currency_pair',
@@ -22,6 +21,7 @@ module ZaifWrapper
22
21
  }.freeze
23
22
  PRIVATE_METHODS = ['get_info', 'get_info2', 'get_personal_info', 'get_id_info', 'trade_history', 'active_orders', 'trade', 'cancel_order', 'withdraw', 'deposit_history', 'withdraw_history'].freeze
24
23
  FUTURE_METHODS = ['groups', 'last_price', 'ticker', 'trades', 'depth'].freeze
24
+ LEVERAGE_METHODS = ['get_positions', 'position_history', 'active_positions', 'create_position', 'change_position', 'cancel_position'].freeze
25
25
 
26
26
  def get_request(host, path)
27
27
  response = RestClient.get "#{host}#{path}"
@@ -1,3 +1,3 @@
1
1
  module ZaifWrapper
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaif_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - cobafan