- Account\SecurityExchangeAccountType
interface Account \ SecurityExchangeAccountType
- All implemented interfaces:
- AccountType
Represents some type of third-party security exchange account, for example, on Havelock Investments.
Along with the #fetchBalances of an AccountType, this interface adds #fetchSecurities() for an account instance, that returns the securities "owned" by a particular account.
Method Summary
Name | Description |
---|---|
fetchSecurities($account, Logger $logger) | Get all securities balances for this account. May block. |
fetchSecurity($security, $account, Logger $logger) |
Helper function to get all securities value for the given security for this account, or null if there is no balance for this security. May block. |
fetchSecurityBalance($security, $account, Logger $logger) | Helper function to get the current, owned number of shares (units) of the given security for this account. May block. |
public function fetchSecurities($account, Logger $logger)
Get all securities balances for this account. May block.
Returned results may include: - owned: raw owned number of shares - available: available number of shares to trade - reserved: unavailable number of shares to trade
- Parameters:
$account
- fields that satisfy #getFields- Returns:
an array of ('security' => ('owned', 'available', 'reserved', ...))
public function fetchSecurity($security, $account, Logger $logger)
Helper function to get all securities value for the given security for this account, or
null
if there is no balance for this security. May block.
- Parameters:
$account
- fields that satisfy #getFields- Returns:
array('owned', 'available', 'reserved', ...) ornull
public function fetchSecurityBalance($security, $account, Logger $logger)
Helper function to get the current, owned number of shares (units) of the given security for this account. May block.
- Parameters:
$account
- fields that satisfy #getFields ornull