binance_client 5.1.0 → 5.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d5c9aa23792c3ce05d700f255a811031aadc407e54184a415fe08d6810a2e04
4
- data.tar.gz: 65356315dfc2e010d17ceb6d3e48a1c9f7b420c96acfa1a28beae1f944a68872
3
+ metadata.gz: 2da825e960057759234b17aae2722429df0a91a6e87343aa63b5177d2f0dea0f
4
+ data.tar.gz: ce99de0cdae0c663a384559d780f79933985cbc8cf6f06793dde6091d185b7a0
5
5
  SHA512:
6
- metadata.gz: 79ad182390c4a8046fb1e72cf438c6bcd6732270180d6432e3c27cecc4169d3bbc193b7d0ca6d7f75bb5034fe8ed1c815158cde4c725e8f4796757252b98494f
7
- data.tar.gz: 39a88c90b97074c6af9a7e66e4a5f77e3054e8342f7bfc8f8a46f82c008835fbd9b00cedb5fadf9827561ae65c818f87b28a8f240ba6efebcfb5b0fcc7aad92e
6
+ metadata.gz: f600ea14ca7dff15ac8b9626f812eccbf0843b9cc09455d04569ae98c25894455c15ba61cc6e1dfab0b7fa50854f520d7c9fa0dad558e3436a5acfe208d56073
7
+ data.tar.gz: 2014a2de0f2d412aace73888cd1ad817f4943d64c6f264df15faebae9de970bc6ae0acc045237f52a610026ba46d849f561a344faa7bb033ce2232cb5fcf7862
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
+ ## [5.2.0] - 2022-05-20
8
+ ### Added
9
+ - `#all_orders`
10
+
7
11
  ## [5.1.0] - 2022-04-22
8
12
  ### Added
9
13
  - `#ping`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- binance_client (5.1.0)
4
+ binance_client (5.2.0)
5
5
  activesupport
6
6
  api_client_base (~> 1.11)
7
7
  typhoeus
@@ -23,6 +23,7 @@ module BinanceClient
23
23
  api_action :create_order
24
24
  api_action :withdraw
25
25
  api_action :ping
26
+ api_action :all_orders, args: [:symbol, :start_time]
26
27
 
27
28
  attribute :host
28
29
  attribute :api_key
@@ -0,0 +1,23 @@
1
+ module BinanceClient
2
+ class Order
3
+ attr_reader :symbol
4
+ attr_reader :executed_quantity
5
+ attr_reader :cummulative_quote_quantity
6
+ attr_reader :order_id
7
+ attr_reader :side
8
+
9
+ def initialize(
10
+ symbol:,
11
+ executed_quantity:,
12
+ cummulative_quote_quantity:,
13
+ order_id:,
14
+ side:
15
+ )
16
+ @symbol = symbol
17
+ @executed_quantity = executed_quantity
18
+ @cummulative_quote_quantity = cummulative_quote_quantity
19
+ @order_id = order_id
20
+ @side = side
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ module BinanceClient
2
+ class AllOrdersRequest < AuthenticatedBaseRequest
3
+ attribute :symbol, String
4
+ attribute :start_time, Integer
5
+
6
+ def path
7
+ "/api/v3/allOrders"
8
+ end
9
+
10
+ def params_without_signature
11
+ {
12
+ symbol: symbol,
13
+ startTime: start_time
14
+ }
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ module BinanceClient
2
+ class AllOrdersResponse < BaseResponse
3
+ def orders
4
+ body.map do |hash|
5
+ Order.new({
6
+ symbol: hash["symbol"],
7
+ executed_quantity: hash["executedQty"],
8
+ cummulative_quote_quantity: hash["cummulativeQuoteQty"],
9
+ order_id: hash["orderId"],
10
+ side: hash["side"],
11
+ })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module BinanceClient
2
- VERSION = "5.1.0"
2
+ VERSION = "5.2.0"
3
3
  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: 5.1.0
4
+ version: 5.2.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: 2022-04-22 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_client_base
@@ -141,12 +141,14 @@ files:
141
141
  - lib/binance_client/models/market.rb
142
142
  - lib/binance_client/models/market_filter.rb
143
143
  - lib/binance_client/models/network.rb
144
+ - lib/binance_client/models/order.rb
144
145
  - lib/binance_client/models/order_book.rb
145
146
  - lib/binance_client/models/order_book_entry.rb
146
147
  - lib/binance_client/models/order_fill.rb
147
148
  - lib/binance_client/models/rate_limit.rb
148
149
  - lib/binance_client/requests/account_request.rb
149
150
  - lib/binance_client/requests/account_snapshot_request.rb
151
+ - lib/binance_client/requests/all_orders_request.rb
150
152
  - lib/binance_client/requests/authenticated_base_request.rb
151
153
  - lib/binance_client/requests/base_create_order_request.rb
152
154
  - lib/binance_client/requests/base_request.rb
@@ -169,6 +171,7 @@ files:
169
171
  - lib/binance_client/requests/withdraw_request.rb
170
172
  - lib/binance_client/responses/account_response.rb
171
173
  - lib/binance_client/responses/account_snapshot_response.rb
174
+ - lib/binance_client/responses/all_orders_response.rb
172
175
  - lib/binance_client/responses/base_create_order_response.rb
173
176
  - lib/binance_client/responses/base_response.rb
174
177
  - lib/binance_client/responses/book_ticker_response.rb
@@ -196,7 +199,7 @@ metadata:
196
199
  homepage_uri: https://github.com/bloom-solutions/binance_client-ruby
197
200
  source_code_uri: https://github.com/bloom-solutions/binance_client-ruby
198
201
  changelog_uri: https://github.com/bloom-solutions/binance_client-ruby/CHANGELOG.md
199
- post_install_message:
202
+ post_install_message:
200
203
  rdoc_options: []
201
204
  require_paths:
202
205
  - lib
@@ -212,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
215
  version: '0'
213
216
  requirements: []
214
217
  rubygems_version: 3.1.6
215
- signing_key:
218
+ signing_key:
216
219
  specification_version: 4
217
220
  summary: Ruby wrapper for Binance API
218
221
  test_files: []