Class to handle share data.
More...
|
| def | get (id=None, isin=None, symbol=None, wkn=None, index=None) |
| | Query Share objects. More...
|
| |
| def | getCount (fonds=False, index=False, other=False, share=False, total=False) |
| | Returns the number of shares, fonds and others. More...
|
| |
◆ __str__()
| def smm.objects.Share.__str__ |
( |
|
self | ) |
|
Returns the content of this instance as string.
References smm.objects.SMMBaseObject.id, smm.objects.Exchange.id, smm.objects.Currency.id, smm.objects.Share.id, smm.objects.DailyQuote.id, smm.objects.Transaction.id, smm.objects.Watch.id, smm.objects.Position.id, smm.objects.Share.isin, smm.objects.Share.name, smm.quote.base.FetchPluginBase.name, smm.quote.onvista.OnvistaFetchPlugin.name, smm.quote.raiffeisen.RaiffeisenFetchPlugin.name, smm.quote.vwd.VwdFetchPlugin.name, smm.quote.yahoo.YahooCSVFetchPlugin.name, smm.quote.yahoo.YahooWebFetchPlugin.name, smm.quote.yahoo.YahooQueryFetchPlugin.name, smm.objects.Exchange.symbol, smm.objects.Share.symbol, and smm.objects.Share.wkn.
Referenced by smm.objects.SMMBaseObject.__repr__().
◆ createWatch()
| def smm.objects.Share.createWatch |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
◆ get()
| def smm.objects.Share.get |
( |
|
id = None, |
|
|
|
isin = None, |
|
|
|
symbol = None, |
|
|
|
wkn = None, |
|
|
|
index = None |
|
) |
| |
|
static |
Query Share objects.
There are three ways for querying objects:
- Querying by
id, isin, symbol or wkn returns a Share object or None
- Querying by
kind returns all Share objects with the given kind
- Querying without parameters to get all Share objects
The last way returns always a storm.store.ResultSet.
- Parameters
-
| id | Returns a Share specified by id. |
| isin | Returns a Share specified by isin. |
| symbol | Returns a Share specified by symbol. |
| wkn | Returns a Share specified by wkn. |
| index | Returns an Indices |
- Sorting:
- The result are unsorted
- Test:
- tests.test_objects.TestObjects.test_Share_get()
◆ getCount()
| def smm.objects.Share.getCount |
( |
|
fonds = False, |
|
|
|
index = False, |
|
|
|
other = False, |
|
|
|
share = False, |
|
|
|
total = False |
|
) |
| |
|
static |
Returns the number of shares, fonds and others.
- Parameters
-
| fonds | Returns the number of known fonds |
| index | Returns the number of known indexes |
| other | Returns the number of not categorised instruments |
| share | Returns the number of known shares |
| total | Returns the number of instruments without indexes |
◆ getPrefCurrency()
| def smm.objects.Share.getPrefCurrency |
( |
|
self | ) |
|
◆ is_watched()
| def smm.objects.Share.is_watched |
( |
|
self | ) |
|
Returns True if a related watch list entry exists.
Use this function only if you need an explicit True or False.
You can check the watch attribute directly as an alternative.
Or you can convert the watch attribute to a boolean value:
References gui.panel.PanelWatchList.watch, and smm.objects.Share.watch.
◆ __storm_table__
| string smm.objects.Share.__storm_table__ = "t_share" |
|
staticprivate |
Use given table to store all of this class inside.
◆ arguments
| dictionary smm.objects.Share.arguments |
|
static |
Initial value:= {
"symbol",
"isin",
"wkn",
"name",
"currency",
"currency_id",
"exchange",
"exchange_id",
"kind",
"watch",
"watch_id",
"source",
"notes",
}
Referenced by smm.objects.SMMBaseObject._setAttrs().
◆ currency
◆ currency_id
| smm.objects.Share.currency_id = Int() |
|
static |
◆ exchange
◆ exchange_id
| smm.objects.Share.exchange_id = Int() |
|
static |
◆ id
| smm.objects.Share.id = Int(default=AutoReload, primary=True) |
|
static |
◆ isin
| smm.objects.Share.isin = Unicode() |
|
static |
◆ kind
Initial value:= Enum(
map={
"share": 1,
"index": 2,
"fond": 3,
"etf": 4,
"warrant": 5,
"certificate": 6,
"bond": 7,
}
)
Type of share.
Adapt functions below after adding a new kind:
Referenced by smm.objects.Transaction.__str__(), smm.objects.Transaction._getDetails(), smm.objects.Transaction._setDetails(), and smm.objects.Transaction.getVolume().
◆ name
| smm.objects.Share.name = Unicode() |
|
static |
◆ notes
| smm.objects.Share.notes = Unicode() |
|
static |
Additional notes to this share.
◆ psTopic
| string smm.objects.Share.psTopic = "smm.share" |
|
static |
◆ source
| smm.objects.Share.source = Int() |
|
static |
◆ symbol
| smm.objects.Share.symbol = Unicode() |
|
static |
◆ watch
| smm.objects.Share.watch = Reference(watch_id, "Watch.id") |
|
static |
◆ watch_id
| smm.objects.Share.watch_id = Int() |
|
static |
ID of the reffered watch list entry.
◆ wkn
| smm.objects.Share.wkn = Unicode() |
|
static |
The documentation for this class was generated from the following file: