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.
21 22 23 24 |
# File 'lib/cns/kraken.rb', line 21 def initialize(dad, pop) @bqd = dad @ops = pop.transform_keys(&:to_sym) end |
Instance Attribute Details
#bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
14 15 16 |
# File 'lib/cns/kraken.rb', line 14 def bqd @bqd end |
#ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
14 15 16 |
# File 'lib/cns/kraken.rb', line 14 def ops @ops end |
Instance Method Details
#mresumo ⇒ Object
mosta resumo saldos & transacoes & ajuste dias
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cns/kraken.rb', line 27 def mresumo puts("\nKRAKEN\ntipo kraken bigquery") exd[:sl].transform_keys { |k| k.downcase.to_sym }.sort_by { |_, v| v }.each { |k, v| puts(fos(k, v)) } 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.
40 41 42 |
# File 'lib/cns/kraken.rb', line 40 def uskl exd[:kl] end |