Class: Bybit::RestApi::AffiliateService

Inherits:
BaseService show all
Defined in:
lib/bybit/rest_api/affiliate_service.rb

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Bybit::RestApi::BaseService

Instance Method Details

#get_sub_list(**kwargs) ⇒ Hash

Get affiliate sub-affiliate list

GET /v5/affiliate/affiliate-sub-list

Parameters:

  • kwargs (Hash)

    a customizable set of options

Options Hash (**kwargs):

  • :cursor (String)

    Cursor for pagination

  • :size (Integer)

    Page size

  • :start_date (String)

    Start date filter

  • :end_date (String)

    End date filter

  • :sub_aff_id (Integer)

    Sub-affiliate ID

Returns:

  • (Hash)

    Bybit V5 ApiResponse envelope (retCode / retMsg / result / retExtInfo / time).

See Also:



17
18
19
20
21
# File 'lib/bybit/rest_api/affiliate_service.rb', line 17

def get_sub_list(**kwargs)
  params = kwargs.dup
  params = Bybit::Utils::WireKeys.camelize(params)
  @session.sign_request(method: :get, path: '/v5/affiliate/affiliate-sub-list', params: params)
end

#get_user_list(**kwargs) ⇒ Hash

Get affiliate user list

GET /v5/affiliate/aff-user-list

Parameters:

  • kwargs (Hash)

    a customizable set of options

Options Hash (**kwargs):

  • :cursor (String)

    Cursor for pagination

  • :size (Integer)

    Page size

  • :need_deposit (Boolean)

    Whether to include deposit information

  • :need30 (Boolean)

    Whether to include 30-day statistics

  • :need365 (Boolean)

    Whether to include 365-day statistics

  • :start_date (String)

    Start date filter

  • :end_date (String)

    End date filter

Returns:

  • (Hash)

    Bybit V5 ApiResponse envelope (retCode / retMsg / result / retExtInfo / time).



35
36
37
38
39
# File 'lib/bybit/rest_api/affiliate_service.rb', line 35

def get_user_list(**kwargs)
  params = kwargs.dup
  params = Bybit::Utils::WireKeys.camelize(params)
  @session.sign_request(method: :get, path: '/v5/affiliate/aff-user-list', params: params)
end