binance_client 1.2.0 → 1.3.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/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/lib/binance_client/client.rb +2 -1
- data/lib/binance_client/version.rb +1 -1
- data/lib/binance_client.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: 52c8b1596a4976bc9b6e2743fad40d6e33d050f6a614bcb550128ce29bb97d00
|
4
|
+
data.tar.gz: 2cb12b4ad491d438303a745e357793f4c2d9df97d66c05fd59226f2649e7b492
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd519eeaff647220d99d6abea75054cc1eae2fd2dea9f6733d44afb4c40977957aeb74e8720bda35f5d159fff28d4092a0bb1c6fcddc3995bdc8bb84d5a4ccda
|
7
|
+
data.tar.gz: 0d4570d268372084d100619469064d6ae5f364e63b99d6c0063f6bb4b68f1b6dad84a94bccd15d1308361a7bfe72371791e2a27f5f3a97465217f200f076a931
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.3.0] - 2021-11-29
|
8
|
+
### Added
|
9
|
+
- Add proxy support
|
10
|
+
|
7
11
|
## [1.2.0] - 2021-11-26
|
8
12
|
### Added
|
9
13
|
- Allow easy access to the `used_weight` header in a response by calling `#used_weight(interval)`
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -46,15 +46,15 @@ The default representation of response data is a JSON hash
|
|
46
46
|
You can set a hook to do application-specific things per request. This is useful when monitoring the rate limits:
|
47
47
|
|
48
48
|
```ruby
|
49
|
-
BinanceClient.
|
49
|
+
BinanceClient.configuration.after_response = DoSomethingAfterBinanceResponse
|
50
50
|
```
|
51
51
|
|
52
52
|
What you assign can be a proc -- it just needs to respond to `call` and accept the `BinanceClient` response object:
|
53
53
|
|
54
54
|
```ruby
|
55
|
-
class
|
55
|
+
class DoSomethingAfterBinanceResponse
|
56
56
|
|
57
|
-
def self.call(response)
|
57
|
+
def self.call(request, response)
|
58
58
|
one_minute_weight = response.used_weight("1m")
|
59
59
|
if one_minute_weight > 1200
|
60
60
|
Rails.logger.info "Looks like we've hit the request limit!"
|
@@ -12,11 +12,12 @@ module BinanceClient
|
|
12
12
|
attribute :host
|
13
13
|
attribute :api_key
|
14
14
|
attribute :api_secret
|
15
|
+
attribute :proxy
|
15
16
|
|
16
17
|
private
|
17
18
|
|
18
19
|
def default_opts
|
19
|
-
{host: host, api_key: api_key, api_secret: api_secret}
|
20
|
+
{host: host, api_key: api_key, api_secret: api_secret, proxy: proxy}
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
data/lib/binance_client.rb
CHANGED
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AJ Villalobos
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_client_base
|