Class: Crypto::Exchanges::Cx

Inherits:
Base
  • Object
show all
Defined in:
lib/crypto/resources/exchanges/cx.rb

Class Method Summary collapse

Methods inherited from Base

binance?, coinex?, correct, error, load_fixture, test

Class Method Details

.access_id(access_id) ⇒ Object



9
10
11
12
13
# File 'lib/crypto/resources/exchanges/cx.rb', line 9

def access_id(access_id)
  return unless ping

  Coinex.access_id = access_id
end

.clean_keysObject



21
22
23
24
25
26
# File 'lib/crypto/resources/exchanges/cx.rb', line 21

def clean_keys
  return unless ping

  Coinex.access_id = nil
  Coinex.secret_key = nil
end

.pingObject



28
29
30
# File 'lib/crypto/resources/exchanges/cx.rb', line 28

def ping
  Coinex.ping == { status: 200 }
end

.secret_key(secret_key) ⇒ Object



15
16
17
18
19
# File 'lib/crypto/resources/exchanges/cx.rb', line 15

def secret_key(secret_key)
  return unless ping

  Coinex.secret_key = secret_key
end