Class: Cns::Kraken
Overview
classe para processar transacoes trades/ledger do kraken
Instance Attribute Summary collapse
- #bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
- #ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
Instance Method Summary collapse
-
#initialize(dad, pop) ⇒ Kraken
constructor
A new instance of Kraken.
-
#mresumo ⇒ Object
mosta resumo saldos & transacoes & ajuste dias.
-
#uskl ⇒ Hash
Ledgers exchange kraken.
Constructor Details
#initialize(dad, pop) ⇒ Kraken
Returns a new instance of Kraken.
20 21 22 23 |
# File 'lib/cns/kraken.rb', line 20 def initialize(dad, pop) @bqd = dad @ops = pop.transform_keys(&:to_sym) end |
Instance Attribute Details
#bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/kraken.rb', line 13 def bqd @bqd end |
#ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/kraken.rb', line 13 def ops @ops end |
Instance Method Details
#mresumo ⇒ Object
mosta resumo saldos & transacoes & ajuste dias
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cns/kraken.rb', line 26 def mresumo puts("\nKRAKEN\ntipo kraken bigquery") exd[:sl].sort.each { |key, val| puts(fos(key, val)) } mtotais mtrades mledger return if novxt.empty? puts("\nstring ajuste dias dos trades\n-h=#{novxt.sort_by { |i| -i[:srx] }.map { |o| "#{o[:txid]}:0" }.join(' ')}") end |
#uskl ⇒ Hash
Returns ledgers exchange kraken.
39 40 41 |
# File 'lib/cns/kraken.rb', line 39 def uskl exd[:kl] end |