binance-ruby 1.3.2 → 1.3.6
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/lib/binance/api/account.rb +15 -2
- data/lib/binance/api/version.rb +1 -1
- data/lib/binance/api.rb +8 -0
- data/lib/binance-ruby.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e27b5345af57e738af536dbc6693d1a6c73976eceed29c7e666307682707db5
|
4
|
+
data.tar.gz: 35ca497977bebbbb9cf535d528c5b58dccf1bc6a4e4e384d6e8efb8e440bf431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e332e31370f0d994bc8294fb4df9ec946c9f32e5aa61cfa9ab0316cdb5c59467e83f154f1a36bf48bdcf854a95d5e76c3992aa781b08797a5c6eed73a7c04e66
|
7
|
+
data.tar.gz: bc7f25f13b9621de4d389645336e62362e599d23383ed5e90a5148e6cdc519a74a3cd6f8e4f46e94c7a6bda26008a469940c02cbebbebbdab491bb8e3856dfb5
|
data/lib/binance/api/account.rb
CHANGED
@@ -2,7 +2,7 @@ module Binance
|
|
2
2
|
module Api
|
3
3
|
class Account
|
4
4
|
class << self
|
5
|
-
def fees!(recvWindow:
|
5
|
+
def fees!(recvWindow: nil, api_key: nil, api_secret_key: nil)
|
6
6
|
timestamp = Configuration.timestamp
|
7
7
|
params = { recvWindow: recvWindow, timestamp: timestamp }
|
8
8
|
Request.send!(api_key_type: :read_info, path: "/wapi/v3/assetDetail.html",
|
@@ -10,7 +10,7 @@ module Binance
|
|
10
10
|
security_type: :user_data, api_key: api_key, api_secret_key: api_secret_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
def info!(recvWindow:
|
13
|
+
def info!(recvWindow: nil, api_key: nil, api_secret_key: nil)
|
14
14
|
timestamp = Configuration.timestamp
|
15
15
|
params = { recvWindow: recvWindow, timestamp: timestamp }
|
16
16
|
Request.send!(api_key_type: :read_info, path: "/api/v3/account",
|
@@ -44,6 +44,19 @@ module Binance
|
|
44
44
|
params: params.delete_if { |key, value| value.nil? }, method: :post,
|
45
45
|
security_type: :user_data, api_key: api_key, api_secret_key: api_secret_key)
|
46
46
|
end
|
47
|
+
|
48
|
+
# If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.
|
49
|
+
def withdraw_history!(coin: nil, status: nil, offset: nil, limit: nil, startTime: nil, endTime: nil,
|
50
|
+
recvWindow: nil, api_key: nil, api_secret_key: nil)
|
51
|
+
timestamp = Configuration.timestamp
|
52
|
+
params = {
|
53
|
+
coin: coin, status: status, offset: offset, limit: limit, startTime: startTime,
|
54
|
+
endTime: endTime, recvWindow: recvWindow, timestamp: timestamp,
|
55
|
+
}
|
56
|
+
Request.send!(api_key_type: :withdrawals, path: "/sapi/v1/capital/withdraw/history",
|
57
|
+
params: params.delete_if { |key, value| value.nil? }, method: :get,
|
58
|
+
security_type: :user_data, api_key: api_key, api_secret_key: api_secret_key)
|
59
|
+
end
|
47
60
|
end
|
48
61
|
end
|
49
62
|
end
|
data/lib/binance/api/version.rb
CHANGED
data/lib/binance/api.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
module Binance
|
2
2
|
module Api
|
3
3
|
class << self
|
4
|
+
def all_coins_info!(recvWindow: nil, api_key: nil, api_secret_key: nil)
|
5
|
+
timestamp = Configuration.timestamp
|
6
|
+
params = { recvWindow: recvWindow, timestamp: timestamp }
|
7
|
+
Request.send!(api_key_type: :read_info, security_type: :user_data,
|
8
|
+
path: "/sapi/v1/capital/config/getall", params: params,
|
9
|
+
api_key: api_key, api_secret_key: api_secret_key)
|
10
|
+
end
|
11
|
+
|
4
12
|
# Valid limits:[5, 10, 20, 50, 100, 500, 1000]
|
5
13
|
def candlesticks!(endTime: nil, interval: nil, limit: 500, startTime: nil, symbol: nil, api_key: nil, api_secret_key: nil)
|
6
14
|
raise Error.new(message: "interval is required") unless interval
|
data/lib/binance-ruby.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binance-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Peterson
|
@@ -237,5 +237,5 @@ requirements: []
|
|
237
237
|
rubygems_version: 3.1.6
|
238
238
|
signing_key:
|
239
239
|
specification_version: 4
|
240
|
-
summary: binance-ruby-1.3.
|
240
|
+
summary: binance-ruby-1.3.6
|
241
241
|
test_files: []
|