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:



418
419
420
# File 'lib/binance/spot/simple_earn.rb', line 418

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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

#locked_redeem_option(positionId:, redeemTo:, **kwargs) ⇒ Object

Set Locked Product Redeem Option (USER_DATA)

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

Parameters:

  • positionId (String)
  • redeemTo (String)

    SPOT or FLEXIBLE

  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



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

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

  @session.sign_request(:post, '/sapi/v1/simple-earn/locked/setRedeemOption', params: kwargs.merge(
    positionId: positionId,
    redeemTo: redeemTo
  ))
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:



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

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:



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

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:



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

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

  • :redeemTo (String)

    SPOT,FLEXIBLE, default FLEXIBLE

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



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

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:



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

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:



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

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:



400
401
402
403
404
# File 'lib/binance/spot/simple_earn.rb', line 400

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:



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

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