Module: Binance::Spot::SimpleEarn

Included in:
Binance::Spot
Defined in:
lib/binance/spot/simple_earn.rb

Overview

all wallet endpoints

Instance Method Summary collapse

Instance Method Details

#collateral_record(**kwargs) ⇒ Object

Get Collateral Record (USER_DATA)

GET /sapi/v1/simple-earn/flexible/history/collateralRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :productId (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



398
399
400
# File 'lib/binance/spot/simple_earn.rb', line 398

def collateral_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/history/collateralRecord', params: kwargs)
end

#flexible_auto_subscribe(productId:, autoSubscribe:, **kwargs) ⇒ Object

Set Flexible Auto Subscribe (USER_DATA)

POST /sapi/v1/simple-earn/flexible/setAutoSubscribe

Parameters:

  • productId (String)
  • autoSubscribe (Boolean)

    true or false

  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



272
273
274
275
276
277
278
279
280
# File 'lib/binance/spot/simple_earn.rb', line 272

def flexible_auto_subscribe(productId:, autoSubscribe:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)
  Binance::Utils::Validation.require_param('autoSubscribe', autoSubscribe)

  @session.sign_request(:post, '/sapi/v1/simple-earn/flexible/setAutoSubscribe', params: kwargs.merge(
    productId: productId,
    autoSubscribe: autoSubscribe
  ))
end

#flexible_personal_left_quota(productId:, **kwargs) ⇒ Object

Get Flexible Personal Left Quota (USER_DATA)

GET /sapi/v1/simple-earn/flexible/personalLeftQuota

Parameters:

  • productId (String)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



309
310
311
312
313
# File 'lib/binance/spot/simple_earn.rb', line 309

def flexible_personal_left_quota(productId:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)

  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/personalLeftQuota', params: kwargs.merge(productId: productId))
end

#flexible_product_list(**kwargs) ⇒ Object

Get Simple Earn Flexible Product List (USER_DATA)

GET /sapi/v1/simple-earn/flexible/list

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :asset (String)
  • :current (Integer)

    Currently querying page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



18
19
20
# File 'lib/binance/spot/simple_earn.rb', line 18

def flexible_product_list(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/list', params: kwargs)
end

#flexible_product_position(**kwargs) ⇒ Object

Get Flexible Product Position (USER_DATA)

GET /sapi/v1/simple-earn/flexible/position

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :asset (String)
  • :productId (String)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



124
125
126
# File 'lib/binance/spot/simple_earn.rb', line 124

def flexible_product_position(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/position', params: kwargs)
end

#flexible_redeem_product(productId:, **kwargs) ⇒ Object

Redeem Flexible Product (TRADE)

POST /sapi/v1/simple-earn/flexible/redeem

Parameters:

  • productId (String)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :redeemAll (Boolean)

    true or false, default true

  • :amount (Float)

    if redeemAll is false, amount is mandatory

  • :destAccount (String)

    SPOT,FUND,ALL, default SPOT

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



89
90
91
92
93
94
95
# File 'lib/binance/spot/simple_earn.rb', line 89

def flexible_redeem_product(productId:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)

  @session.sign_request(:post, '/sapi/v1/simple-earn/flexible/redeem', params: kwargs.merge(
    productId: productId
  ))
end

#flexible_redemption_record(**kwargs) ⇒ Object

Get Flexible Redemption Record (USER_DATA)

GET /sapi/v1/simple-earn/flexible/history/redemptionRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :productId (String)
  • :redeemId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



204
205
206
# File 'lib/binance/spot/simple_earn.rb', line 204

def flexible_redemption_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/history/redemptionRecord', params: kwargs)
end

#flexible_rewards_history(type:, **kwargs) ⇒ Object

Get Flexible Rewards History (USER_DATA)

GET /sapi/v1/simple-earn/flexible/history/rewardsRecord

Parameters:

  • type (String)

    BONUS - Bonus tiered APR, REALTIME Real-time APR, REWARDS Historical rewards

  • kwargs (Hash)

Options Hash (**kwargs):

  • :productId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



240
241
242
243
244
# File 'lib/binance/spot/simple_earn.rb', line 240

def flexible_rewards_history(type:, **kwargs)
  Binance::Utils::Validation.require_param('type', type)

  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/history/rewardsRecord', params: kwargs.merge(type: type))
end

#flexible_subscribe(productId:, amount:, **kwargs) ⇒ Object

Subscribe Flexible Product (TRADE)

POST /sapi/v1/simple-earn/flexible/subscribe

Parameters:

  • productId (String)
  • amount (Float)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :autoSubscribe (Boolean)

    true or false, default true

  • :sourceAccount (String)

    SPOT,FUND,ALL, default SPOT

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



47
48
49
50
51
52
53
54
55
# File 'lib/binance/spot/simple_earn.rb', line 47

def flexible_subscribe(productId:, amount:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)
  Binance::Utils::Validation.require_param('amount', amount)

  @session.sign_request(:post, '/sapi/v1/simple-earn/flexible/subscribe', params: kwargs.merge(
    productId: productId,
    amount: amount
  ))
end

#flexible_subscription_preview(productId:, amount:, **kwargs) ⇒ Object

Get Flexible Subscription Preview (USER_DATA)

GET /sapi/v1/simple-earn/flexible/subscriptionPreview

Parameters:

  • productId (String)
  • amount (Float)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



338
339
340
341
342
343
344
345
346
# File 'lib/binance/spot/simple_earn.rb', line 338

def flexible_subscription_preview(productId:, amount:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)
  Binance::Utils::Validation.require_param('amount', amount)

  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/subscriptionPreview', params: kwargs.merge(
    productId: productId,
    amount: amount
  ))
end

#flexible_subscription_record(**kwargs) ⇒ Object

Get Flexible Subscription Record (USER_DATA)

GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :productId (String)
  • :purchaseId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



169
170
171
# File 'lib/binance/spot/simple_earn.rb', line 169

def flexible_subscription_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/history/subscriptionRecord', params: kwargs)
end

#locked_auto_subscribe(positionId:, autoSubscribe:, **kwargs) ⇒ Object

Set Locked Auto Subscribe (USER_DATA)

POST /sapi/v1/simple-earn/locked/setAutoSubscribe

Parameters:

  • positionId (String)
  • autoSubscribe (Boolean)

    true or false

  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



291
292
293
294
295
296
297
298
299
# File 'lib/binance/spot/simple_earn.rb', line 291

def locked_auto_subscribe(positionId:, autoSubscribe:, **kwargs)
  Binance::Utils::Validation.require_param('positionId', positionId)
  Binance::Utils::Validation.require_param('autoSubscribe', autoSubscribe)

  @session.sign_request(:post, '/sapi/v1/simple-earn/locked/setAutoSubscribe', params: kwargs.merge(
    positionId: positionId,
    autoSubscribe: autoSubscribe
  ))
end

#locked_personal_left_quota(projectId:, **kwargs) ⇒ Object

Get Locked Personal Left Quota (USER_DATA)

GET /sapi/v1/simple-earn/locked/personalLeftQuota

Parameters:

  • projectId (String)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



323
324
325
326
327
# File 'lib/binance/spot/simple_earn.rb', line 323

def locked_personal_left_quota(projectId:, **kwargs)
  Binance::Utils::Validation.require_param('projectId', projectId)

  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/personalLeftQuota', params: kwargs.merge(projectId: projectId))
end

#locked_product_list(**kwargs) ⇒ Object

Get Simple Earn Locked Product List (USER_DATA)

GET /sapi/v1/simple-earn/locked/list

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :asset (String)
  • :current (Integer)

    Currently querying page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



32
33
34
# File 'lib/binance/spot/simple_earn.rb', line 32

def locked_product_list(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/list', params: kwargs)
end

#locked_product_position(**kwargs) ⇒ Object

Get Locked Product Position (USER_DATA)

GET /sapi/v1/simple-earn/locked/position

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :asset (String)
  • :positionId (String)
  • :projectId (String)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



140
141
142
# File 'lib/binance/spot/simple_earn.rb', line 140

def locked_product_position(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/position', params: kwargs)
end

#locked_redeem_product(positionId:, **kwargs) ⇒ Object

Redeem Locked Product (TRADE)

POST /sapi/v1/simple-earn/locked/redeem

Parameters:

  • positionId (String)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



105
106
107
108
109
110
111
# File 'lib/binance/spot/simple_earn.rb', line 105

def locked_redeem_product(positionId:, **kwargs)
  Binance::Utils::Validation.require_param('positionId', positionId)

  @session.sign_request(:post, '/sapi/v1/simple-earn/locked/redeem', params: kwargs.merge(
    positionId: positionId
  ))
end

#locked_redemption_record(**kwargs) ⇒ Object

Get Locked Redemption Record (USER_DATA)

GET /sapi/v1/simple-earn/locked/history/redemptionRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :positionId (String)
  • :redeemId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



222
223
224
# File 'lib/binance/spot/simple_earn.rb', line 222

def locked_redemption_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/history/redemptionRecord', params: kwargs)
end

#locked_rewards_history(**kwargs) ⇒ Object

Get Locked Rewards History (USER_DATA)

GET /sapi/v1/simple-earn/locked/history/rewardsRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :positionId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



259
260
261
# File 'lib/binance/spot/simple_earn.rb', line 259

def locked_rewards_history(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/history/rewardsRecord', params: kwargs)
end

#locked_subscribe(projectId:, amount:, **kwargs) ⇒ Object

Subscribe Locked Product (TRADE)

POST /sapi/v1/simple-earn/locked/subscribe

Parameters:

  • projectId (String)
  • amount (Float)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :autoSubscribe (Boolean)

    true or false, default true

  • :sourceAccount (String)

    SPOT,FUND,ALL, default SPOT

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



68
69
70
71
72
73
74
75
76
# File 'lib/binance/spot/simple_earn.rb', line 68

def locked_subscribe(projectId:, amount:, **kwargs)
  Binance::Utils::Validation.require_param('projectId', projectId)
  Binance::Utils::Validation.require_param('amount', amount)

  @session.sign_request(:post, '/sapi/v1/simple-earn/locked/subscribe', params: kwargs.merge(
    projectId: projectId,
    amount: amount
  ))
end

#locked_subscription_preview(projectId:, amount:, **kwargs) ⇒ Object

Get Locked Subscription Preview (USER_DATA)

GET /sapi/v1/simple-earn/locked/subscriptionPreview

Parameters:

  • projectId (String)
  • amount (Float)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :autoSubscribe (Boolean)

    true or false, default true

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



358
359
360
361
362
363
364
365
366
# File 'lib/binance/spot/simple_earn.rb', line 358

def locked_subscription_preview(projectId:, amount:, **kwargs)
  Binance::Utils::Validation.require_param('projectId', projectId)
  Binance::Utils::Validation.require_param('amount', amount)

  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/subscriptionPreview', params: kwargs.merge(
    projectId: projectId,
    amount: amount
  ))
end

#locked_subscription_record(**kwargs) ⇒ Object

Get Locked Subscription Record (USER_DATA)

GET /sapi/v1/simple-earn/locked/history/subscriptionRecord

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :purchaseId (String)
  • :asset (String)
  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



186
187
188
# File 'lib/binance/spot/simple_earn.rb', line 186

def locked_subscription_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/locked/history/subscriptionRecord', params: kwargs)
end

#rate_history(productId:, **kwargs) ⇒ Object

Get Rate History (USER_DATA)

GET /sapi/v1/simple-earn/flexible/history/rateHistory

Parameters:

  • productId (String)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :startTime (Integer)
  • :endTime (Integer)
  • :current (Integer)

    Currently querying the page. Start from 1. Default:1

  • :size (Integer)

    Default:10, Max:100

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



380
381
382
383
384
# File 'lib/binance/spot/simple_earn.rb', line 380

def rate_history(productId:, **kwargs)
  Binance::Utils::Validation.require_param('productId', productId)

  @session.sign_request(:get, '/sapi/v1/simple-earn/flexible/history/rateHistory', params: kwargs.merge(productId: productId))
end

#simple_earn_account(**kwargs) ⇒ Object

Simple Account(USER_DATA)

GET /sapi/v1/simple-earn/account’

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



151
152
153
# File 'lib/binance/spot/simple_earn.rb', line 151

def (**kwargs)
  @session.sign_request(:get, '/sapi/v1/simple-earn/account', params: kwargs)
end