Documentation ¶
Index ¶
- func InsertPosition(position Position) (int, error)
- func InsertPositions(positions []Position) error
- func RemoveAllPositionByAccount(accountID int) error
- func RemovePosition(positionID int) error
- func RemovePositionByDateRangeAndAccount(startDate, endDate time.Time, accountID int) error
- func UpdatePosition(position Position) error
- type Position
- func GetPosition(positionID int) (*Position, error)
- func GetPositionBetweenDatesAndAccountAllCurrentAssets(startDate, endDate time.Time, frequencyID int, quoteAssetID int, ...) ([]Position, error)
- func GetPositionByDates(startDate, endDate time.Time, frequencyID int, baseAssetID int, ...) (*Position, error)
- func GetPositionByDatesAccountsForAllTradeableAssets(startDate, endDate time.Time, frequencyID int, quoteAssetID int, ...) ([]Position, error)
- func GetPositionByDatesAndAccount(startDate, endDate time.Time, frequencyID int, baseAssetID int, ...) (*Position, error)
- func GetPositions(ids []int) ([]Position, error)
- func QueryPositions(positionQuery *PositionQuery) ([]Position, error)
- type PositionQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertPosition ¶
func InsertPositions ¶
func RemovePosition ¶
func UpdatePosition ¶
Types ¶
type Position ¶
type Position struct { ID *int `json:"id"` UUID string `json:"uuid"` Name string `json:"name"` AlternateName string `json:"alternateName"` AccountID *int `json:"accountId"` PortfolioID *int `json:"portfolioId"` FrequnecyID *int `json:"frequencyId"` StartDate time.Time `json:"startDate"` EndDate time.Time `json:"endDate"` BaseAssetID *int `json:"baseAssetId"` QuoteAssetID *int `json:"quoteAssetId"` Quantity *float64 `json:"quantity"` CostBasis *float64 `json:"costBasis"` Profit *float64 `json:"profit"` TotalAmount *float64 `json:"totalAmount"` Description string `json:"description"` CreatedBy string `json:"createdBy"` CreatedAt time.Time `json:"createdAt"` UpdatedBy string `json:"updatedBy"` UpdatedAt time.Time `json:"updatedAt"` }
Position
func GetPosition ¶
func GetPositionByDates ¶
func GetPositions ¶
func QueryPositions ¶
func QueryPositions(positionQuery *PositionQuery) ([]Position, error)
Click to show internal directories.
Click to hide internal directories.