Class: Luno::Client

Inherits:
Object
  • Object
show all
Includes:
Accounts, Beneficiaries, Constants, Lightning, Markets, Orders, OtherData, Quotes, Receiving, Sending, Streaming, Transactions, Withdrawals
Defined in:
lib/luno/client.rb

Constant Summary

Constants included from OtherData

OtherData::COUNTRY_ENDPOINT, OtherData::DOCUMENTATION_ENDPOINT

Constants included from Constants

Luno::Constants::API_BURST_RATE_LIMIT, Luno::Constants::API_RATE_LIMIT, Luno::Constants::CURRENCIES, Luno::Constants::CURRENCY_PAIRS, Luno::Constants::MARKET_API_BURST_RATE_LIMIT, Luno::Constants::MARKET_API_RATE_LIMIT, Luno::Constants::PERMISSIONS, Luno::Constants::WITHDRAWL_CURRENCIES, Luno::Constants::WITHDRAWL_CURRENCY_PAIR_METHODS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from OtherData

#changelog, #countries, #currencies, #permissions, #ping

Methods included from Orders

#cancel_order, #create_limit_order, #create_market_order, #get_fee_information, #list_orders, #list_trades

Methods included from Markets

#list_ticker_for_pair, #list_tickets_for_all_pairs, #market_top_100_bids

Methods included from Beneficiaries

#list_beneficiaries

Methods included from Accounts

#list_account_transactions, #list_accounts, #list_pending_account_transactions

Constructor Details

#initialize(key:, secret:, base_path: 'https://api.luno.com/api/1', port: 80) ⇒ Client

Returns a new instance of Client.



25
26
27
28
29
30
# File 'lib/luno/client.rb', line 25

def initialize(key:, secret:, base_path: 'https://api.luno.com/api/1', port: 80)
  @key = key
  @secret = secret
  @base_path = base_path
  @port = port
end

Instance Attribute Details

#base_pathObject (readonly)

Returns the value of attribute base_path.



23
24
25
# File 'lib/luno/client.rb', line 23

def base_path
  @base_path
end

#keyObject (readonly)

Returns the value of attribute key.



23
24
25
# File 'lib/luno/client.rb', line 23

def key
  @key
end

#portObject (readonly)

Returns the value of attribute port.



23
24
25
# File 'lib/luno/client.rb', line 23

def port
  @port
end

#secretObject (readonly)

Returns the value of attribute secret.



23
24
25
# File 'lib/luno/client.rb', line 23

def secret
  @secret
end

Class Method Details

.api_versionObject

This is the version of the API docs this client was built off-of



37
38
39
# File 'lib/luno/client.rb', line 37

def self.api_version
  'v1 2020-02-24'
end

.compatible_api_versionObject



32
33
34
# File 'lib/luno/client.rb', line 32

def self.compatible_api_version
  'v1'
end