Class: Bitbot::Trader::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/bitbot/trader/account.rb

Overview

User account info

Instance Method Summary collapse

Instance Method Details

#wallet(currency) ⇒ Wallet?

Fetches account wallet with given currency

Examples:

.wallet("USD") #=> <Wallet>

Parameters:

  • currency (String)

Returns:



24
25
26
# File 'lib/bitbot/trader/account.rb', line 24

def wallet(currency)
  wallets.detect { |wallet| wallet.currency == currency }
end