binance-ruby 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f18e787ac97c75b40133c007e5e984c0406311b2194517ce069efe2a847f65cb
4
- data.tar.gz: c18b5a8826485459a1039fd4b6ee3298ce93cae8afc274f146bb0cb656554401
3
+ metadata.gz: 3d65034451ca51ae18a078816fb6720092510d51a20e02f5ea7c3f38d80b9ee0
4
+ data.tar.gz: ce2259686745d4a183360480a99ede60956f4f3c96ca087a6ea80d51732093b4
5
5
  SHA512:
6
- metadata.gz: 5d47d23c9002fb4a8bc5621ca5d4d0928403c5eac520c180958c28039a9aec6eafc4b819a69293ab33b268c4564ff215a966f37bc400061bc52bff4b7a43fc3a
7
- data.tar.gz: b97db7627730811f224f3363ee6fda51ed8fccfd840010f0c591e9553bfab940b2cb8dd7935cbacbed43a732b0b5924d34eee6750866aceaec0b7aa296c79171
6
+ metadata.gz: 8cbcd3f1dff2cc730c2215c0f8086188d59e4c44bfd4156d6d6367326f6705bb4d7a5790b3c783b0f615cc458f8f5f7ee240d056779ca706072b577d758cb09a
7
+ data.tar.gz: 3ad8f062b8e1a153cbc3e2cd4b9a37fff8feea1f356e395acd3c1c3f3a37bef08d1b660e2e483ab8b71cd749b88c627161f7a349b1b73dc53dc164d0f618a0d2
@@ -27,6 +27,23 @@ module Binance
27
27
  params: params.delete_if { |key, value| value.nil? },
28
28
  security_type: :user_data, api_key: api_key, api_secret_key: api_secret_key)
29
29
  end
30
+
31
+ # @note have not tested this for binance.us yet.
32
+ def withdraw!(coin: nil, withdrawOrderId: nil, network: nil, address: nil, addressTag: nil, amount: nil,
33
+ transactionFeeFlag: false, name: nil, recvWindow: nil, api_key: nil, api_secret_key: nil)
34
+ raise Error.new(message: "amount is required") if amount.nil?
35
+ raise Error.new(message: "coin is required") if coin.nil?
36
+ raise Error.new(message: "address is required") if address.nil?
37
+ timestamp = Configuration.timestamp
38
+ params = {
39
+ coin: coin, withdrawOrderId: withdrawOrderId, network: network, address: address, timestamp: timestamp,
40
+ addressTag: addressTag, amount: amount, transactionFeeFlag: transactionFeeFlag,
41
+ name: name, recvWindow: recvWindow,
42
+ }
43
+ Request.send!(api_key_type: :read_info, path: "/sapi/v1/capital/withdraw/apply",
44
+ params: params.delete_if { |key, value| value.nil? }, method: :post,
45
+ security_type: :user_data, api_key: api_key, api_secret_key: api_secret_key)
46
+ end
30
47
  end
31
48
  end
32
49
  end
@@ -1,5 +1,5 @@
1
1
  module Binance
2
2
  module Api
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
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: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Peterson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-09 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -182,9 +182,6 @@ dependencies:
182
182
  name: activesupport
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '5.1'
188
185
  - - ">="
189
186
  - !ruby/object:Gem::Version
190
187
  version: 5.1.0
@@ -192,9 +189,6 @@ dependencies:
192
189
  prerelease: false
193
190
  version_requirements: !ruby/object:Gem::Requirement
194
191
  requirements:
195
- - - "~>"
196
- - !ruby/object:Gem::Version
197
- version: '5.1'
198
192
  - - ">="
199
193
  - !ruby/object:Gem::Version
200
194
  version: 5.1.0
@@ -242,5 +236,5 @@ requirements: []
242
236
  rubygems_version: 3.1.6
243
237
  signing_key:
244
238
  specification_version: 4
245
- summary: binance-ruby-1.2.2
239
+ summary: binance-ruby-1.2.3
246
240
  test_files: []