Module: Binance::Spot::Staking
- Included in:
- Binance::Spot
- Defined in:
- lib/binance/spot/staking.rb
Overview
all savings endpoints
Instance Method Summary collapse
-
#staking_history(product:, txnType:, **kwargs) ⇒ Object
Get Staking History(USER_DATA).
-
#staking_personal_quota_remain(product:, productId:, **kwargs) ⇒ Object
Get Personal Left Quota of Staking Product(USER_DATA).
-
#staking_position(product:, **kwargs) ⇒ Object
Get Staking Product Position(USER_DATA).
-
#staking_product_list(product:, **kwargs) ⇒ Object
Get Staking Product List(USER_DATA).
-
#staking_purchase(product:, productId:, amount:, **kwargs) ⇒ Object
Purchase Staking Product(USER_DATA).
-
#staking_redeem(product:, productId:, **kwargs) ⇒ Object
Redeem Staking Product(USER_DATA).
-
#staking_set_auto(product:, positionId:, renewable:, **kwargs) ⇒ Object
Set Auto Staking(USER_DATA).
Instance Method Details
#staking_history(product:, txnType:, **kwargs) ⇒ Object
Get Staking History(USER_DATA)
GET /sapi/v1/staking/stakingRecord
94 95 96 97 98 99 |
# File 'lib/binance/spot/staking.rb', line 94 def staking_history(product:, txnType:, **kwargs) Binance::Utils::Validation.require_param('product', product) Binance::Utils::Validation.require_param('txnType', txnType) @session.sign_request(:get, '/sapi/v1/staking/stakingRecord', params: kwargs.merge(product: product, txnType: txnType)) end |
#staking_personal_quota_remain(product:, productId:, **kwargs) ⇒ Object
Get Personal Left Quota of Staking Product(USER_DATA)
GET /sapi/v1/staking/personalLeftQuota
128 129 130 131 132 133 |
# File 'lib/binance/spot/staking.rb', line 128 def staking_personal_quota_remain(product:, productId:, **kwargs) Binance::Utils::Validation.require_param('product', product) Binance::Utils::Validation.require_param('productId', productId) @session.sign_request(:get, '/sapi/v1/staking/personalLeftQuota', params: kwargs.merge(product: product, productId: productId)) end |
#staking_position(product:, **kwargs) ⇒ Object
Get Staking Product Position(USER_DATA)
GET /sapi/v1/staking/position
74 75 76 77 78 |
# File 'lib/binance/spot/staking.rb', line 74 def staking_position(product:, **kwargs) Binance::Utils::Validation.require_param('product', product) @session.sign_request(:get, '/sapi/v1/staking/position', params: kwargs.merge(product: product)) end |
#staking_product_list(product:, **kwargs) ⇒ Object
Get Staking Product List(USER_DATA)
GET /sapi/v1/staking/productList
19 20 21 22 23 |
# File 'lib/binance/spot/staking.rb', line 19 def staking_product_list(product:, **kwargs) Binance::Utils::Validation.require_param('product', product) @session.sign_request(:get, '/sapi/v1/staking/productList', params: kwargs.merge(product: product)) end |
#staking_purchase(product:, productId:, amount:, **kwargs) ⇒ Object
Purchase Staking Product(USER_DATA)
POST /sapi/v1/staking/purchase
36 37 38 39 40 41 42 |
# File 'lib/binance/spot/staking.rb', line 36 def staking_purchase(product:, productId:, amount:, **kwargs) Binance::Utils::Validation.require_param('product', product) Binance::Utils::Validation.require_param('productId', productId) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/staking/purchase', params: kwargs.merge(product: product, productId: productId, amount: amount)) end |
#staking_redeem(product:, productId:, **kwargs) ⇒ Object
Redeem Staking Product(USER_DATA)
POST /sapi/v1/staking/redeem
55 56 57 58 59 60 |
# File 'lib/binance/spot/staking.rb', line 55 def staking_redeem(product:, productId:, **kwargs) Binance::Utils::Validation.require_param('product', product) Binance::Utils::Validation.require_param('productId', productId) @session.sign_request(:post, '/sapi/v1/staking/redeem', params: kwargs.merge(product: product, productId: productId)) end |
#staking_set_auto(product:, positionId:, renewable:, **kwargs) ⇒ Object
Set Auto Staking(USER_DATA)
POST /sapi/v1/staking/setAutoStaking
111 112 113 114 115 116 117 |
# File 'lib/binance/spot/staking.rb', line 111 def staking_set_auto(product:, positionId:, renewable:, **kwargs) Binance::Utils::Validation.require_param('product', product) Binance::Utils::Validation.require_param('positionId', positionId) Binance::Utils::Validation.require_param('renewable', renewable) @session.sign_request(:post, '/sapi/v1/staking/setAutoStaking', params: kwargs.merge(product: product, positionId: positionId, renewable: renewable)) end |