module Binance::Spot::Staking

def staking_history(product:, txnType:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :size (Integer) --
  • :current (Integer) --
  • :endTime (Integer) --
  • :startTime (Integer) --
  • :asset (String) --

Parameters:
  • kwargs (Hash) --
  • txnType (String) -- "SUBSCRIPTION", "REDEMPTION", "INTEREST"
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_personal_quota_remain(product:, productId:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000

Parameters:
  • kwargs (Hash) --
  • productId (String) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_position(product:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :size (Integer) --
  • :current (Integer) --
  • :asset (String) --
  • :productId (String) --

Parameters:
  • kwargs (Hash) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_product_list(product:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :size (Integer) --
  • :current (Integer) --
  • :asset (String) --

Parameters:
  • kwargs (Hash) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_purchase(product:, productId:, amount:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :renewable (String) --

Parameters:
  • kwargs (Hash) --
  • amount (Float) --
  • productId (String) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_redeem(product:, productId:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :positionId (String) --
  • :amount (Float) --

Parameters:
  • kwargs (Hash) --
  • productId (String) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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

def staking_set_auto(product:, positionId:, renewable:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000

Parameters:
  • kwargs (Hash) --
  • renewable (String) -- true or false
  • positionId (String) --
  • product (String) -- "STAKING" for Locked Staking, "F_DEFI" for flexible DeFi Staking, "L_DEFI" for locked DeFi Staking
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