binance-ruby 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '09da2af633b777b955b6b749d939ef72ff949f19'
4
- data.tar.gz: c163e41503d5b39f5982c7c1ce682be3492182af
3
+ metadata.gz: 2fa97c211796ec21d0913bd6abdda560746f12ee
4
+ data.tar.gz: 5baaab69416897b39b2cf4a7f8fbb81a77aa243b
5
5
  SHA512:
6
- metadata.gz: efd66a72e714f4ace685b0eda2441c013349f269ec7a1a0dd943114a3d7ddf87f22e9b30e43519d9bd4f24f0e50b569f609e6ec140faaa29ba10ec479a834822
7
- data.tar.gz: f5eb0e09625cf404c8c6e73b53a4d2c71929f2c0050db4ffa0809a424e142ebb0d9b5acbf8b19bb32bfc6eef0ac6072fad557005f87fc990848743f0b7286b8b
6
+ metadata.gz: 27441435714dc55c72d1e5038721e7724a0fbda2bf1daf2bd866d8326ec0695cbc8ff11e5bab9774e34101e54fb9916d74202a5566ef7ddc6c6dd2045998b1eb
7
+ data.tar.gz: f0a0634dd09c3588b7ae52eac618a25bddf1be3b6d0506991a3d6e62f5ddeda259a16d17e0a503155e6dc3f68cb014bed4236e1f3426c00b8c795c7ddf0eb0eb
@@ -2,21 +2,21 @@ module Binance
2
2
  module Api
3
3
  class << self
4
4
  # Valid limits:[5, 10, 20, 50, 100, 500, 1000]
5
- def candlesticks!(end_time: nil, interval: nil, limit: 500, start_time: nil, symbol: nil)
5
+ def candlesticks!(end_time: nil, interval: nil, limit: 500, start_time: nil, symbol: nil)
6
6
  raise Error.new(message: 'interval is required') unless interval
7
7
  raise Error.new(message: 'symbol is required') unless symbol
8
8
  params = { endTime: end_time, interval: interval, limit: limit, startTime: start_time, symbol: symbol }
9
9
  Request.send!(api_key_type: :read_info, path: '/api/v1/klines', params: params)
10
10
  end
11
11
 
12
- def compressed_aggregate_trades!(end_time: nil, from_id: nil, limit: 500, start_time: nil, symbol: nil)
12
+ def compressed_aggregate_trades!(end_time: nil, from_id: nil, limit: 500, start_time: nil, symbol: nil)
13
13
  raise Error.new(message: "symbol is required") unless symbol
14
14
  params = {
15
15
  endTime: end_time, fromId: from_id, limit: limit, startTime: start_time, symbol: symbol
16
16
  }.delete_if { |key, value| value.nil? }
17
17
  Request.send!(api_key_type: :read_info, path: '/api/v1/aggTrades', params: params)
18
18
  end
19
-
19
+
20
20
  def depth!(symbol: nil, limit: 100)
21
21
  raise Error.new(message: "symbol is required") unless symbol
22
22
  params = { limit: limit, symbol: symbol }
@@ -47,8 +47,9 @@ module Binance
47
47
  ticker_type = type&.to_sym
48
48
  error_message = "type must be one of: #{ticker_types.join(', ')}. #{type} was provided."
49
49
  raise Error.new(message: error_message) unless ticker_types.include? ticker_type
50
+ path = ticker_path(type: ticker_type)
50
51
  params = symbol ? { symbol: symbol } : {}
51
- Request.send!(api_key_type: :read_info, path: ticker_path(type: type), params: params)
52
+ Request.send!(api_key_type: :read_info, path: path, params: params)
52
53
  end
53
54
 
54
55
  def time!
@@ -1,5 +1,5 @@
1
1
  module Binance
2
2
  module Api
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binance-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Peterson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-31 00:00:00.000000000 Z
11
+ date: 2018-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -176,5 +176,5 @@ rubyforge_project:
176
176
  rubygems_version: 2.5.2
177
177
  signing_key:
178
178
  specification_version: 4
179
- summary: binance-ruby-0.1.8
179
+ summary: binance-ruby-0.1.9
180
180
  test_files: []