binance_client 0.2.0 → 1.0.0
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/.github/workflows/ruby.yml +31 -0
- data/CHANGELOG.md +17 -13
- data/Gemfile +1 -0
- data/Gemfile.lock +9 -5
- data/README.md +2 -2
- data/binance_client.gemspec +4 -5
- data/lib/binance_client/requests/base_request.rb +2 -1
- data/lib/binance_client/requests/get_all_request.rb +11 -6
- data/lib/binance_client/version.rb +1 -1
- metadata +11 -25
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f3905cb869b611e99b318cb5066477236ed55a9fc206681b7991c91c6bdaad3
|
|
4
|
+
data.tar.gz: a0f67542cf08ebaa538c4a740cf6ca4186ab619bc92a6b842ae3f3a5e1e039ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e57ec0318a7ed587a32154bd2c8de4c7ec5499137a33c46bb4cf166f1c89846c83cb8872037b87723a74c94c5c6ebef9aea0c72983b6a18cd4e4dae486400b18
|
|
7
|
+
data.tar.gz: e9a67ecd796b0a7baa21c8fc48e3b2e49ede84b3271f816a014bf007c0950d5255937242c8910af7d42c98659944cf1484ed59cc49977f4786f9fccd37cbc647
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [ master ]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [ master ]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v2
|
|
23
|
+
- uses: actions/setup-ruby@v1
|
|
24
|
+
with:
|
|
25
|
+
ruby-version: '2.7'
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: bundle install
|
|
28
|
+
- name: Setup config
|
|
29
|
+
run: cp spec/config.yml{.sample,}
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## [1.0.0]
|
|
8
|
+
### Fixed
|
|
9
|
+
- Avoid "Signature for this request is not valid" errors by using the same timestamp
|
|
10
|
+
- Remove pry as a development dependency
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* added get_all endpoint ([b22fa3f](/../../commit/b22fa3f))
|
|
10
|
-
* add account_snapshot endpoint ([e64826a](/../../commit/e64826a))
|
|
11
|
-
* add system_status endpoint ([fbc3c36](/../../commit/fbc3c36))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#### Bug Fixes
|
|
15
|
-
|
|
16
|
-
* ignore non deterministic part of the url ([647a822](/../../commit/647a822))
|
|
12
|
+
## [0.2.0] - 2020-09-14
|
|
13
|
+
### Added
|
|
17
14
|
|
|
15
|
+
- [enable vcr for other tests](/../../commit/aaf2fbb))
|
|
16
|
+
- [add book_ticker endpoint](/../../commit/bc7c896))
|
|
17
|
+
- [added get_all endpoint](/../../commit/b22fa3f))
|
|
18
|
+
- [add account_snapshot endpoint](/../../commit/e64826a))
|
|
19
|
+
- [add system_status endpoint](/../../commit/fbc3c36))
|
|
18
20
|
|
|
21
|
+
### Fixed
|
|
22
|
+
- [ignore non deterministic part of the url](/../../commit/647a822))
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
binance_client (
|
|
4
|
+
binance_client (1.0.0)
|
|
5
5
|
activesupport
|
|
6
6
|
api_client_base
|
|
7
7
|
typhoeus
|
|
@@ -9,7 +9,7 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (6.0.3.
|
|
12
|
+
activesupport (6.0.3.4)
|
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
14
14
|
i18n (>= 0.7, < 2)
|
|
15
15
|
minitest (~> 5.1)
|
|
@@ -25,6 +25,7 @@ GEM
|
|
|
25
25
|
descendants_tracker (~> 0.0.4)
|
|
26
26
|
ice_nine (~> 0.11.0)
|
|
27
27
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
28
|
+
byebug (11.1.3)
|
|
28
29
|
coderay (1.1.3)
|
|
29
30
|
coercible (1.0.0)
|
|
30
31
|
descendants_tracker (~> 0.0.1)
|
|
@@ -48,6 +49,9 @@ GEM
|
|
|
48
49
|
pry (0.13.1)
|
|
49
50
|
coderay (~> 1.1)
|
|
50
51
|
method_source (~> 1.0)
|
|
52
|
+
pry-byebug (3.9.0)
|
|
53
|
+
byebug (~> 11.0)
|
|
54
|
+
pry (~> 0.13.0)
|
|
51
55
|
public_suffix (4.0.6)
|
|
52
56
|
rake (12.3.3)
|
|
53
57
|
rspec (3.9.0)
|
|
@@ -67,7 +71,7 @@ GEM
|
|
|
67
71
|
thread_safe (0.3.6)
|
|
68
72
|
typhoeus (1.4.0)
|
|
69
73
|
ethon (>= 0.9.0)
|
|
70
|
-
tzinfo (1.2.
|
|
74
|
+
tzinfo (1.2.8)
|
|
71
75
|
thread_safe (~> 0.1)
|
|
72
76
|
vcr (6.0.0)
|
|
73
77
|
virtus (1.0.5)
|
|
@@ -79,14 +83,14 @@ GEM
|
|
|
79
83
|
addressable (>= 2.3.6)
|
|
80
84
|
crack (>= 0.3.2)
|
|
81
85
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
82
|
-
zeitwerk (2.4.
|
|
86
|
+
zeitwerk (2.4.2)
|
|
83
87
|
|
|
84
88
|
PLATFORMS
|
|
85
89
|
ruby
|
|
86
90
|
|
|
87
91
|
DEPENDENCIES
|
|
88
92
|
binance_client!
|
|
89
|
-
pry
|
|
93
|
+
pry-byebug
|
|
90
94
|
rake (~> 12.0)
|
|
91
95
|
rspec (~> 3.0)
|
|
92
96
|
vcr
|
data/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Edit the `config.yml.sample` with your own credentials for testing
|
|
|
47
47
|
|
|
48
48
|
## Contributing
|
|
49
49
|
|
|
50
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
50
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bloom-solutions/binance_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/bloom-solutions/binance_client/blob/master/CODE_OF_CONDUCT.md).
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
## License
|
|
@@ -56,4 +56,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
56
56
|
|
|
57
57
|
## Code of Conduct
|
|
58
58
|
|
|
59
|
-
Everyone interacting in the BinanceClient project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
59
|
+
Everyone interacting in the BinanceClient project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/bloom-solutions/binance_client/blob/master/CODE_OF_CONDUCT.md).
|
data/binance_client.gemspec
CHANGED
|
@@ -8,13 +8,13 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
|
|
9
9
|
spec.summary = "Ruby wrapper for Binance API"
|
|
10
10
|
spec.description = "Ruby wrapper for Binance API"
|
|
11
|
-
spec.homepage = "https://github.com/
|
|
11
|
+
spec.homepage = "https://github.com/bloom-solutions/binance_client-ruby"
|
|
12
12
|
spec.license = "MIT"
|
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
|
14
14
|
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
|
17
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
|
16
|
+
spec.metadata["source_code_uri"] = "https://github.com/bloom-solutions/binance_client-ruby"
|
|
17
|
+
spec.metadata["changelog_uri"] = "https://github.com/bloom-solutions/binance_client-ruby/CHANGELOG.md"
|
|
18
18
|
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -28,8 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.add_dependency "api_client_base"
|
|
29
29
|
spec.add_dependency "activesupport"
|
|
30
30
|
spec.add_dependency "typhoeus"
|
|
31
|
-
|
|
32
|
-
spec.add_development_dependency "pry"
|
|
31
|
+
|
|
33
32
|
spec.add_development_dependency "vcr"
|
|
34
33
|
spec.add_development_dependency "webmock"
|
|
35
34
|
end
|
|
@@ -4,6 +4,7 @@ module BinanceClient
|
|
|
4
4
|
|
|
5
5
|
attribute :api_key, String
|
|
6
6
|
attribute :api_secret, String
|
|
7
|
+
attribute :timestamp, Integer, lazy: true, default: :default_timestamp
|
|
7
8
|
|
|
8
9
|
def headers
|
|
9
10
|
{
|
|
@@ -20,7 +21,7 @@ module BinanceClient
|
|
|
20
21
|
)
|
|
21
22
|
end
|
|
22
23
|
|
|
23
|
-
def
|
|
24
|
+
def default_timestamp
|
|
24
25
|
DateTime.now.strftime("%Q")
|
|
25
26
|
end
|
|
26
27
|
end
|
|
@@ -7,14 +7,19 @@ module BinanceClient
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def query
|
|
10
|
-
|
|
10
|
+
uri = Addressable::URI.new(query_values: {
|
|
11
|
+
timestamp: timestamp,
|
|
12
|
+
})
|
|
13
|
+
uri.normalized_query
|
|
11
14
|
end
|
|
12
15
|
|
|
13
16
|
def params
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
uri = Addressable::URI.new(query: query)
|
|
18
|
+
uri.query_values = [
|
|
19
|
+
uri.query,
|
|
20
|
+
["signature", signature(query)],
|
|
21
|
+
]
|
|
22
|
+
uri.normalized_query
|
|
18
23
|
end
|
|
19
24
|
end
|
|
20
|
-
end
|
|
25
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: binance_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AJ Villalobos
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: api_client_base
|
|
@@ -52,20 +52,6 @@ dependencies:
|
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: pry
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: vcr
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -101,9 +87,9 @@ executables: []
|
|
|
101
87
|
extensions: []
|
|
102
88
|
extra_rdoc_files: []
|
|
103
89
|
files:
|
|
90
|
+
- ".github/workflows/ruby.yml"
|
|
104
91
|
- ".gitignore"
|
|
105
92
|
- ".rspec"
|
|
106
|
-
- ".travis.yml"
|
|
107
93
|
- CHANGELOG.md
|
|
108
94
|
- CODE_OF_CONDUCT.md
|
|
109
95
|
- Gemfile
|
|
@@ -127,14 +113,14 @@ files:
|
|
|
127
113
|
- lib/binance_client/responses/get_all_response.rb
|
|
128
114
|
- lib/binance_client/responses/system_status_response.rb
|
|
129
115
|
- lib/binance_client/version.rb
|
|
130
|
-
homepage: https://github.com/
|
|
116
|
+
homepage: https://github.com/bloom-solutions/binance_client-ruby
|
|
131
117
|
licenses:
|
|
132
118
|
- MIT
|
|
133
119
|
metadata:
|
|
134
|
-
homepage_uri: https://github.com/
|
|
135
|
-
source_code_uri: https://github.com/
|
|
136
|
-
changelog_uri: https://github.com/
|
|
137
|
-
post_install_message:
|
|
120
|
+
homepage_uri: https://github.com/bloom-solutions/binance_client-ruby
|
|
121
|
+
source_code_uri: https://github.com/bloom-solutions/binance_client-ruby
|
|
122
|
+
changelog_uri: https://github.com/bloom-solutions/binance_client-ruby/CHANGELOG.md
|
|
123
|
+
post_install_message:
|
|
138
124
|
rdoc_options: []
|
|
139
125
|
require_paths:
|
|
140
126
|
- lib
|
|
@@ -149,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
135
|
- !ruby/object:Gem::Version
|
|
150
136
|
version: '0'
|
|
151
137
|
requirements: []
|
|
152
|
-
rubygems_version: 3.
|
|
153
|
-
signing_key:
|
|
138
|
+
rubygems_version: 3.0.8
|
|
139
|
+
signing_key:
|
|
154
140
|
specification_version: 4
|
|
155
141
|
summary: Ruby wrapper for Binance API
|
|
156
142
|
test_files: []
|