binance-connector-ruby 1.5.2 → 1.6.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.
@@ -3,7 +3,7 @@
3
3
  module Binance
4
4
  class Spot
5
5
  # all wallet endpoints
6
- # @see https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints
6
+ # @see https://developers.binance.com/docs/wallet/introduction
7
7
  module Wallet
8
8
  # System Status (System)
9
9
  #
@@ -11,7 +11,7 @@ module Binance
11
11
  #
12
12
  # Fetch system status.
13
13
  #
14
- # @see https://binance-docs.github.io/apidocs/spot/en/#system-status-system
14
+ # @see https://developers.binance.com/docs/wallet/others/system-status
15
15
  def system_status
16
16
  @session.public_request(path: '/sapi/v1/system/status')
17
17
  end
@@ -24,7 +24,7 @@ module Binance
24
24
  #
25
25
  # @param kwargs [Hash]
26
26
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
27
- # @see https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data
27
+ # @see https://developers.binance.com/docs/wallet/capital/all-coins-info
28
28
  def coin_info(**kwargs)
29
29
  @session.sign_request(:get, '/sapi/v1/capital/config/getall', params: kwargs)
30
30
  end
@@ -39,7 +39,7 @@ module Binance
39
39
  # @option kwargs [Integer] :endTime
40
40
  # @option kwargs [Integer] :limit min 5, max 30, default 5
41
41
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
42
- # @see https://binance-docs.github.io/apidocs/spot/en/#daily-account-snapshot-user_data
42
+ # @see https://developers.binance.com/docs/wallet/account/daily-account-snapshoot
43
43
  def account_snapshot(type:, **kwargs)
44
44
  Binance::Utils::Validation.require_param('type', type)
45
45
 
@@ -54,7 +54,7 @@ module Binance
54
54
  #
55
55
  # @param kwargs [Hash]
56
56
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
57
- # @see https://binance-docs.github.io/apidocs/spot/en/#disable-fast-withdraw-switch-user_data
57
+ # @see https://developers.binance.com/docs/wallet/account/disable-fast-withdraw-switch
58
58
  def disable_fast_withdraw(**kwargs)
59
59
  @session.sign_request(:post, '/sapi/v1/account/disableFastWithdrawSwitch', params: kwargs)
60
60
  end
@@ -65,7 +65,7 @@ module Binance
65
65
  #
66
66
  # @param kwargs [Hash]
67
67
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
68
- # @see https://binance-docs.github.io/apidocs/spot/en/#enable-fast-withdraw-switch-user_data
68
+ # @see https://developers.binance.com/docs/wallet/account/enable-fast-withdraw-switch
69
69
  def enable_fast_withdraw(**kwargs)
70
70
  @session.sign_request(:post, '/sapi/v1/account/enableFastWithdrawSwitch', params: kwargs)
71
71
  end
@@ -84,7 +84,7 @@ module Binance
84
84
  # @option kwargs [Boolean] :transactionFeeFlag
85
85
  # @option kwargs [String] :name
86
86
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
87
- # @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
87
+ # @see https://developers.binance.com/docs/wallet/capital/withdraw
88
88
  def withdraw(coin:, address:, amount:, **kwargs)
89
89
  Binance::Utils::Validation.require_param('coin', coin)
90
90
  Binance::Utils::Validation.require_param('address', address)
@@ -109,7 +109,7 @@ module Binance
109
109
  # @option kwargs [Integer] :offest Default:0
110
110
  # @option kwargs [Integer] :limit Default:1000, Max:1000
111
111
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
112
- # @see https://binance-docs.github.io/apidocs/spot/en/#deposit-history-supporting-network-user_data
112
+ # @see https://developers.binance.com/docs/wallet/capital/deposite-history
113
113
  def deposit_history(**kwargs)
114
114
  @session.sign_request(:get, '/sapi/v1/capital/deposit/hisrec', params: kwargs)
115
115
  end
@@ -127,7 +127,7 @@ module Binance
127
127
  # @option kwargs [Integer] :offest
128
128
  # @option kwargs [Integer] :limit
129
129
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
130
- # @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
130
+ # @see https://developers.binance.com/docs/wallet/capital/withdraw-history
131
131
  def withdraw_history(**kwargs)
132
132
  @session.sign_request(:get, '/sapi/v1/capital/withdraw/history', params: kwargs)
133
133
  end
@@ -140,7 +140,7 @@ module Binance
140
140
  # @param kwargs [Hash]
141
141
  # @option kwargs [String] :network
142
142
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
143
- # @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
143
+ # @see https://developers.binance.com/docs/wallet/capital/withdraw-history
144
144
  def deposit_address(coin:, **kwargs)
145
145
  Binance::Utils::Validation.require_param('coin', coin)
146
146
 
@@ -157,7 +157,7 @@ module Binance
157
157
  #
158
158
  # @param kwargs [Hash]
159
159
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
160
- # @see https://binance-docs.github.io/apidocs/spot/en/#account-status-user_data
160
+ # @see https://developers.binance.com/docs/wallet/account/account-status
161
161
  def account_status(**kwargs)
162
162
  @session.sign_request(:get, '/sapi/v1/account/status', params: kwargs)
163
163
  end
@@ -170,7 +170,7 @@ module Binance
170
170
  #
171
171
  # @param kwargs [Hash]
172
172
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
173
- # @see https://binance-docs.github.io/apidocs/spot/en/#account-api-trading-status-user_data
173
+ # @see https://developers.binance.com/docs/wallet/account/account-api-trading-status
174
174
  def api_trading_status(**kwargs)
175
175
  @session.sign_request(:get, '/sapi/v1/account/apiTradingStatus', params: kwargs)
176
176
  end
@@ -183,7 +183,7 @@ module Binance
183
183
  # @option kwargs [Integer] :startTime
184
184
  # @option kwargs [Integer] :endTime
185
185
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
186
- # @see https://binance-docs.github.io/apidocs/spot/en/#dustlog-user_data
186
+ # @see https://developers.binance.com/docs/wallet/asset/dust-log
187
187
  def dust_log(**kwargs)
188
188
  @session.sign_request(:get, '/sapi/v1/asset/dribblet', params: kwargs)
189
189
  end
@@ -197,7 +197,7 @@ module Binance
197
197
  # @param asset [Array]
198
198
  # @param kwargs [Hash]
199
199
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
200
- # @see https://binance-docs.github.io/apidocs/spot/en/#dust-transfer-user_data
200
+ # @see https://developers.binance.com/docs/wallet/asset/dust-transfer
201
201
  def dust_transfer(asset:, **kwargs)
202
202
  Binance::Utils::Validation.require_param('asset', asset)
203
203
 
@@ -216,7 +216,7 @@ module Binance
216
216
  # @option kwargs [Integer] :endTime
217
217
  # @option kwargs [Integer] :limit Default 20, max 500
218
218
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
219
- # @see https://binance-docs.github.io/apidocs/spot/en/#asset-dividend-record-user_data
219
+ # @see https://developers.binance.com/docs/wallet/asset/assets-divided-record
220
220
  def asset_devidend_record(**kwargs)
221
221
  @session.sign_request(:get, '/sapi/v1/asset/assetDividend', params: kwargs)
222
222
  end
@@ -228,7 +228,7 @@ module Binance
228
228
  # @param kwargs [Hash]
229
229
  # @option kwargs [String] :asset
230
230
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
231
- # @see https://binance-docs.github.io/apidocs/spot/en/#asset-detail-user_data
231
+ # @see https://developers.binance.com/docs/wallet/asset/asset-detail
232
232
  def asset_detail(**kwargs)
233
233
  @session.sign_request(:get, '/sapi/v1/asset/assetDetail', params: kwargs)
234
234
  end
@@ -240,7 +240,7 @@ module Binance
240
240
  # @param kwargs [Hash]
241
241
  # @option kwargs [String] :symbol
242
242
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
243
- # @see https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
243
+ # @see https://developers.binance.com/docs/wallet/asset/trade-fee
244
244
  def trade_fee(**kwargs)
245
245
  @session.sign_request(:get, '/sapi/v1/asset/tradeFee', params: kwargs)
246
246
  end
@@ -256,7 +256,7 @@ module Binance
256
256
  # @option kwargs [String] :fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
257
257
  # @option kwargs [String] :toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
258
258
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
259
- # @see https://binance-docs.github.io/apidocs/spot/en/#user-universal-transfer-user_data
259
+ # @see https://developers.binance.com/docs/wallet/asset/user-universal-transfer
260
260
  def user_universal_transfer(type:, asset:, amount:, **kwargs)
261
261
  Binance::Utils::Validation.require_param('type', type)
262
262
  Binance::Utils::Validation.require_param('asset', asset)
@@ -282,7 +282,7 @@ module Binance
282
282
  # @option kwargs [String] :fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
283
283
  # @option kwargs [String] :toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
284
284
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
285
- # @see https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
285
+ # @see https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer
286
286
  def user_universal_transfer_history(type:, **kwargs)
287
287
  Binance::Utils::Validation.require_param('type', type)
288
288
  @session.sign_request(:get, '/sapi/v1/asset/transfer', params: kwargs.merge(type: type))
@@ -296,7 +296,7 @@ module Binance
296
296
  # @option kwargs [String] :asset
297
297
  # @option kwargs [String] :needBtcValuation true or false
298
298
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
299
- # @see https://binance-docs.github.io/apidocs/spot/en/#funding-wallet-user_data
299
+ # @see https://developers.binance.com/docs/wallet/asset/funding-wallet
300
300
  def funding_wallet(**kwargs)
301
301
  @session.sign_request(:post, '/sapi/v1/asset/get-funding-asset', params: kwargs)
302
302
  end
@@ -307,7 +307,7 @@ module Binance
307
307
  #
308
308
  # @param kwargs [Hash]
309
309
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
310
- # @see https://binance-docs.github.io/apidocs/spot/en/#get-api-key-permission-user_data
310
+ # @see https://developers.binance.com/docs/wallet/account/api-key-permission
311
311
  def api_key_permission(**kwargs)
312
312
  @session.sign_request(:get, '/sapi/v1/account/apiRestrictions', params: kwargs)
313
313
  end
@@ -320,7 +320,7 @@ module Binance
320
320
  # @option kwargs [String] :asset If asset is blank, then query all positive assets user have.
321
321
  # @option kwargs [Boolean] :needBtcValuation
322
322
  # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
323
- # @see https://binance-docs.github.io/apidocs/spot/en/#user-asset-user_data
323
+ # @see https://developers.binance.com/docs/wallet/asset/user-assets
324
324
  def get_user_asset(**kwargs)
325
325
  @session.sign_request(:post, '/sapi/v3/asset/getUserAsset', params: kwargs)
326
326
  end
@@ -20,7 +20,7 @@ module Binance
20
20
  # Update Speed: Real-time
21
21
  #
22
22
  # @param symbol [String]
23
- # @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
23
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#aggregate-trade-streams
24
24
  def agg_trade(symbol:, callbacks:)
25
25
  url = "#{@base_url}/ws/#{symbol.downcase}@aggTrade"
26
26
  create_connection(url, callbacks)
@@ -32,20 +32,20 @@ module Binance
32
32
  # Update Speed: Real-time
33
33
  #
34
34
  # @param symbol [String]
35
- # @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
35
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#trade-streams
36
36
  def trade(symbol:, callbacks:)
37
37
  url = "#{@base_url}/ws/#{symbol.downcase}@trade"
38
38
  create_connection(url, callbacks)
39
39
  end
40
40
 
41
- # Kline/Candlestick Streams
41
+ # Kline/Candlestick Streams for UTC
42
42
  # The Kline/Candlestick Stream push updates to the current klines/candlestick every second.
43
43
  # Stream Name: <symbol>@kline_<interval>
44
44
  # Update Speed: 2000ms
45
45
  #
46
46
  # @param symbol [String]
47
47
  # @param interval [String] 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
48
- # @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-streams
48
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#klinecandlestick-streams-for-utc
49
49
  def kline(symbol:, interval:, callbacks:)
50
50
  url = "#{@base_url}/ws/#{symbol.downcase}@kline_#{interval}"
51
51
  create_connection(url, callbacks)
@@ -57,7 +57,7 @@ module Binance
57
57
  # Update Speed: 1000ms
58
58
  #
59
59
  # @option symbol [String]
60
- # @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
60
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-mini-ticker-stream
61
61
  def mini_ticker(callbacks:, symbol: nil)
62
62
  url = if symbol.nil?
63
63
  "#{@base_url}/ws/!miniTicker@arr"
@@ -73,7 +73,7 @@ module Binance
73
73
  # Update Speed: 1000ms
74
74
  #
75
75
  # @option symbol [String]
76
- # @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
76
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-ticker-streams
77
77
  def symbol_ticker(callbacks:, symbol: nil)
78
78
  url = if symbol.nil?
79
79
  "#{@base_url}/ws/!ticker@arr"
@@ -89,7 +89,7 @@ module Binance
89
89
  # Update Speed: Real-time
90
90
  #
91
91
  # @option symbol [String]
92
- # @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams
92
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-book-ticker-streams
93
93
  def book_ticker(callbacks:, symbol: nil)
94
94
  url = if symbol.nil?
95
95
  "#{@base_url}/ws/!bookTicker"
@@ -107,7 +107,7 @@ module Binance
107
107
  # @param symbol [String]
108
108
  # @param levels [Integer] 5, 10, or 20.
109
109
  # @param speed [String] 1000ms or 100ms
110
- # @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
110
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#partial-book-depth-streams
111
111
  def partial_book_depth(symbol:, levels:, speed:, callbacks:)
112
112
  url = "#{@base_url}/ws/#{symbol.downcase}@depth#{levels}@#{speed}"
113
113
  create_connection(url, callbacks)
@@ -120,7 +120,7 @@ module Binance
120
120
  #
121
121
  # @param symbol [String]
122
122
  # @param speed [String] 1000ms or 100ms
123
- # @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
123
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream
124
124
  def diff_book_depth(symbol:, speed:, callbacks:)
125
125
  url = "#{@base_url}/ws/#{symbol.downcase}@depth@#{speed}"
126
126
  create_connection(url, callbacks)
@@ -132,7 +132,7 @@ module Binance
132
132
  # Window Sizes: 1h,4h
133
133
  # Update Speed: 1000ms
134
134
  #
135
- # @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-rolling-window-statistics-streams
135
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-rolling-window-statistics-streams
136
136
  def rolling_window_ticker(symbol:, windowSize:, callbacks:)
137
137
  url = "#{@base_url}/ws/#{symbol.downcase}@ticker_#{windowSize}"
138
138
  create_connection(url, callbacks)
@@ -144,7 +144,7 @@ module Binance
144
144
  # Window Sizes: 1h, 4h
145
145
  # Update Speed: 1000ms
146
146
  #
147
- # @see https://binance-docs.github.io/apidocs/spot/en/#all-market-rolling-window-statistics-streams
147
+ # @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-rolling-window-statistics-streams
148
148
  def rolling_window_ticker_all_symbols(windowSize:, callbacks:)
149
149
  url = "#{@base_url}/ws/!ticker_#{windowSize}@arr"
150
150
  create_connection(url, callbacks)
data/lib/binance/spot.rb CHANGED
@@ -5,11 +5,9 @@ require 'binance/authentication'
5
5
  require 'binance/utils/validation'
6
6
  require 'binance/utils/url'
7
7
  require 'binance/error'
8
- require 'binance/spot/blvt'
9
8
  require 'binance/spot/c2c'
10
9
  require 'binance/spot/convert'
11
10
  require 'binance/spot/fiat'
12
- require 'binance/spot/futures'
13
11
  require 'binance/spot/loan'
14
12
  require 'binance/spot/margin'
15
13
  require 'binance/spot/market'
@@ -37,13 +35,11 @@ module Binance
37
35
  # - Subaccount
38
36
  # - Trade
39
37
  # - Wallet
40
- # @see https://binance-docs.github.io/apidocs/spot/en/
38
+ # @see https://developers.binance.com/en
41
39
  class Spot
42
- include Binance::Spot::Blvt
43
40
  include Binance::Spot::C2C
44
41
  include Binance::Spot::Convert
45
42
  include Binance::Spot::Fiat
46
- include Binance::Spot::Futures
47
43
  include Binance::Spot::Loan
48
44
  include Binance::Spot::Margin
49
45
  include Binance::Spot::Market
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Binance
4
- VERSION = '1.5.2'
4
+ VERSION = '1.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binance-connector-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Binance
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-23 00:00:00.000000000 Z
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  description: ''
98
- email:
98
+ email:
99
99
  executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
@@ -108,11 +108,9 @@ files:
108
108
  - lib/binance/error.rb
109
109
  - lib/binance/session.rb
110
110
  - lib/binance/spot.rb
111
- - lib/binance/spot/blvt.rb
112
111
  - lib/binance/spot/c2c.rb
113
112
  - lib/binance/spot/convert.rb
114
113
  - lib/binance/spot/fiat.rb
115
- - lib/binance/spot/futures.rb
116
114
  - lib/binance/spot/loan.rb
117
115
  - lib/binance/spot/margin.rb
118
116
  - lib/binance/spot/market.rb
@@ -137,7 +135,7 @@ licenses:
137
135
  - MIT
138
136
  metadata:
139
137
  rubygems_mfa_required: 'true'
140
- post_install_message:
138
+ post_install_message:
141
139
  rdoc_options: []
142
140
  require_paths:
143
141
  - lib
@@ -153,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
151
  version: '0'
154
152
  requirements: []
155
153
  rubygems_version: 3.3.3
156
- signing_key:
154
+ signing_key:
157
155
  specification_version: 4
158
156
  summary: This is a lightweight library that works as a connector to the Binance public
159
157
  API.
@@ -1,104 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Binance
4
- class Spot
5
- # BLVT endpoints
6
- # @see https://binance-docs.github.io/apidocs/spot/en/#blvt-endpoints
7
- module Blvt
8
- # Get BLVT Info (MARKET_DATA)
9
- #
10
- # GET /sapi/v1/blvt/tokenInfo
11
- #
12
- # @param tokenName [String]
13
- # @see https://binance-docs.github.io/apidocs/spot/en/#get-blvt-info-market_data
14
- def token_info(tokenName: nil)
15
- @session.public_request(
16
- path: '/sapi/v1/blvt/tokenInfo',
17
- params: { tokenName: tokenName }
18
- )
19
- end
20
-
21
- # Subscribe BLVT (USER_DATA)
22
- #
23
- # POST /sapi/v1/blvt/subscribe
24
- #
25
- # @param tokenName [String]
26
- # @param cost [Float]
27
- # @param kwargs [Hash]
28
- # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
29
- # @see https://binance-docs.github.io/apidocs/spot/en/#subscribe-blvt-user_data
30
- def subscribe(tokenName:, cost:, **kwargs)
31
- Binance::Utils::Validation.require_param('tokenName', tokenName)
32
- Binance::Utils::Validation.require_param('cost', cost)
33
-
34
- @session.sign_request(:post, '/sapi/v1/blvt/subscribe', params: kwargs.merge(
35
- tokenName: tokenName,
36
- cost: cost
37
- ))
38
- end
39
-
40
- # Query Subscription Record (USER_DATA)
41
- #
42
- # GET /sapi/v1/blvt/subscribe/record
43
- #
44
- # @param kwargs [Hash]
45
- # @option kwargs [String] :tokenName
46
- # @option kwargs [Integer] :id
47
- # @option kwargs [Integer] :startTime
48
- # @option kwargs [Integer] :endTime
49
- # @option kwargs [Integer] :limit
50
- # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
51
- # @see https://binance-docs.github.io/apidocs/spot/en/#query-subscription-record-user_data
52
- def get_subscribe_record(**kwargs)
53
- @session.sign_request(:get, '/sapi/v1/blvt/subscribe/record', params: kwargs)
54
- end
55
-
56
- # Redeem BLVT (USER_DATA)
57
- #
58
- # POST /sapi/v1/blvt/redeem
59
- #
60
- # @param tokenName [String]
61
- # @param amount [Float]
62
- # @param kwargs [Hash]
63
- # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
64
- # @see https://binance-docs.github.io/apidocs/spot/en/#redeem-blvt-user_data
65
- def redeem(tokenName:, amount:, **kwargs)
66
- Binance::Utils::Validation.require_param('tokenName', tokenName)
67
- Binance::Utils::Validation.require_param('amount', amount)
68
-
69
- @session.sign_request(:post, '/sapi/v1/blvt/redeem', params: kwargs.merge(
70
- tokenName: tokenName,
71
- amount: amount
72
- ))
73
- end
74
-
75
- # Query Redemption Record (USER_DATA)
76
- #
77
- # GET /sapi/v1/blvt/redeem/record
78
- #
79
- # @param kwargs [Hash]
80
- # @option kwargs [String] :tokenName
81
- # @option kwargs [Integer] :id
82
- # @option kwargs [Integer] :startTime
83
- # @option kwargs [Integer] :endTime
84
- # @option kwargs [Integer] :limit
85
- # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
86
- # @see https://binance-docs.github.io/apidocs/spot/en/#query-redemption-record-user_data
87
- def get_redeem_record(**kwargs)
88
- @session.sign_request(:get, '/sapi/v1/blvt/redeem/record', params: kwargs)
89
- end
90
-
91
- # Get BLVT User Limit Info (USER_DATA)
92
- #
93
- # GET /sapi/v1/blvt/userLimit
94
- #
95
- # @param kwargs [Hash]
96
- # @option kwargs [String] :tokenName
97
- # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000
98
- # @see https://binance-docs.github.io/apidocs/spot/en/#get-blvt-user-limit-info-user_data
99
- def user_limit(**kwargs)
100
- @session.sign_request(:get, '/sapi/v1/blvt/userLimit', params: kwargs)
101
- end
102
- end
103
- end
104
- end