new model and endpoints..
This commit is contained in:
@@ -5,6 +5,36 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Dividend struct {
|
||||
Symbol string
|
||||
CurrencyCode string
|
||||
Product TradeProduct
|
||||
Value float64
|
||||
PaymentDate time.Time
|
||||
TaxAmount float64
|
||||
TaxRate float64
|
||||
NetValue float64
|
||||
}
|
||||
|
||||
type CloseEntry struct {
|
||||
Shares int
|
||||
InPrice float64
|
||||
OutPrice float64
|
||||
GainPrice float64
|
||||
CloseTime time.Time
|
||||
}
|
||||
|
||||
type ClosedPosition struct {
|
||||
Symbol string
|
||||
CurrencyCode string
|
||||
Product TradeProduct
|
||||
Closes []CloseEntry // each close carries its own prices + share count
|
||||
OpenTime time.Time
|
||||
RealizedGain float64
|
||||
TaxAmount float64
|
||||
HoldingDays int
|
||||
}
|
||||
|
||||
type Position struct {
|
||||
CompanyID int
|
||||
Symbol string
|
||||
@@ -81,4 +111,6 @@ func (r *AddTradeRequest) Validate() error {
|
||||
type Portifolio struct {
|
||||
Positions []Position
|
||||
Trades []Trade
|
||||
closed []ClosedPosition
|
||||
Dividends []Dividend
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user