Module: Binance::Spot::Blvt

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

Overview

BLVT endpoints

Instance Method Summary collapse

Instance Method Details

#get_redeem_record(**kwargs) ⇒ Object

Query Redemption Record (USER_DATA)

GET /sapi/v1/blvt/redeem/record

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :tokenName (String)
  • :id (Integer)
  • :startTime (Integer)
  • :endTime (Integer)
  • :limit (Integer)
  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



87
88
89
# File 'lib/binance/spot/blvt.rb', line 87

def get_redeem_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/blvt/redeem/record', params: kwargs)
end

#get_subscribe_record(**kwargs) ⇒ Object

Query Subscription Record (USER_DATA)

GET /sapi/v1/blvt/subscribe/record

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :tokenName (String)
  • :id (Integer)
  • :startTime (Integer)
  • :endTime (Integer)
  • :limit (Integer)
  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



52
53
54
# File 'lib/binance/spot/blvt.rb', line 52

def get_subscribe_record(**kwargs)
  @session.sign_request(:get, '/sapi/v1/blvt/subscribe/record', params: kwargs)
end

#redeem(tokenName:, amount:, **kwargs) ⇒ Object

Redeem BLVT (USER_DATA)

POST /sapi/v1/blvt/redeem

Parameters:

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

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



65
66
67
68
69
70
71
72
73
# File 'lib/binance/spot/blvt.rb', line 65

def redeem(tokenName:, amount:, **kwargs)
  Binance::Utils::Validation.require_param('tokenName', tokenName)
  Binance::Utils::Validation.require_param('amount', amount)

  @session.sign_request(:post, '/sapi/v1/blvt/redeem', params: kwargs.merge(
    tokenName: tokenName,
    amount: amount
  ))
end

#subscribe(tokenName:, cost:, **kwargs) ⇒ Object

Subscribe BLVT (USER_DATA)

POST /sapi/v1/blvt/subscribe

Parameters:

  • tokenName (String)
  • cost (Float)
  • kwargs (Hash)

Options Hash (**kwargs):

  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



30
31
32
33
34
35
36
37
38
# File 'lib/binance/spot/blvt.rb', line 30

def subscribe(tokenName:, cost:, **kwargs)
  Binance::Utils::Validation.require_param('tokenName', tokenName)
  Binance::Utils::Validation.require_param('cost', cost)

  @session.sign_request(:post, '/sapi/v1/blvt/subscribe', params: kwargs.merge(
    tokenName: tokenName,
    cost: cost
  ))
end

#token_info(tokenName: nil) ⇒ Object

Get BLVT Info (MARKET_DATA)

GET /sapi/v1/blvt/tokenInfo

Parameters:

  • tokenName (String) (defaults to: nil)

See Also:



14
15
16
17
18
19
# File 'lib/binance/spot/blvt.rb', line 14

def token_info(tokenName: nil)
  @session.public_request(
    path: '/sapi/v1/blvt/tokenInfo',
    params: { tokenName: tokenName }
  )
end

#user_limit(**kwargs) ⇒ Object

Get BLVT User Limit Info (USER_DATA)

GET /sapi/v1/blvt/userLimit

Parameters:

  • kwargs (Hash)

Options Hash (**kwargs):

  • :tokenName (String)
  • :recvWindow (Integer)

    The value cannot be greater than 60000

See Also:



99
100
101
# File 'lib/binance/spot/blvt.rb', line 99

def user_limit(**kwargs)
  @session.sign_request(:get, '/sapi/v1/blvt/userLimit', params: kwargs)
end