Sha256: 0ffeb23f00b1abe845518dd28065a2be78c6a2f4a016c87830960bab6c15a4ef

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

require('thor')
require('krkt/bigquery')
require('krkt/client')
require('krkt/kraken')
require('krkt/version')

module Krkt
  class Error < ::StandardError; end

  # classe para carregar/mostrar dados comuns bigquery & etherscan
  class CLI < Thor
    desc 'work', 'carrega transacoes novas no bigquery'
    option :h, type: :hash, default: {}, desc: 'configuracao ajuste reposicionamento temporal'
    # carrega transacoes novas no bigquery
    def work
      Bigquery.new(options).processa
    end

    desc 'show', 'mostra resumo saldos & transacoes'
    option :v, type: :boolean, default: false, desc: 'mostra transacoes'
    option :t, type: :boolean, default: false, desc: 'mostra transacoes todas ou somente novas'
    # mostra resumo saldos & transacoes
    def show
      Bigquery.new(options).transacoes.mostra_resumo
    end

    desc 'novo', 'mostra reumo carteiras & transacoes'
    # mostra reumo carteiras & transacoes
    def novo
      client = Client.new
      p(client.trades_history(start: 'TLADFV-QIUTN-QDNCBR')['trades'].keys)
      # p(client.ledgers(start: 'L4ZDDO-WUGC2-Z72VPW')['ledger'].keys)
      p(client.balance)
    end

    default_task :show
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
krkt-0.1.1 lib/krkt.rb