Class: Bybit::RestApi::MiscService

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

Overview

Endpoints that don't cleanly belong under a per-domain service: announcement feed and system status.

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

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

Instance Method Details

#get_announcements(locale:, **kwargs) ⇒ Hash

Get Announcements

GET /v5/announcements/index

Parameters:

  • locale (String)

    Language code, e.g. en-US, zh-TW.

  • kwargs (Hash)

    a customizable set of options

Options Hash (**kwargs):

  • :type (String)

    Announcement type filter

  • :tag (String)

    Tag filter

  • :page (Integer)

    Page number

  • :limit (Integer)

    Records per page (max 100)

Returns:

  • (Hash)

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

See Also:



19
20
21
22
23
# File 'lib/bybit/rest_api/misc_service.rb', line 19

def get_announcements(locale:, **kwargs)
  params = kwargs.merge(locale: locale)
  params = Bybit::Utils::WireKeys.camelize(params)
  @session.public_request(path: '/v5/announcements/index', params: params)
end

#get_system_statusHash

Get System Status

GET /v5/system/status

Returns:

  • (Hash)

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

See Also:



31
32
33
# File 'lib/bybit/rest_api/misc_service.rb', line 31

def get_system_status
  @session.public_request(path: '/v5/system/status')
end