Documentation ¶
Index ¶
- func InsertTrade(trade Trade) (int, error)
- func RemoveTrade(tradeID int) error
- func UpdateTrade(trade Trade) error
- type MinMaxTradeDates
- type Trade
- func GetTrade(tradeID int) (*Trade, error)
- func GetTradeByFromAccountStartAndEndDates(fromAccountID *int, startDate, endDate time.Time) ([]Trade, error)
- func GetTradeByStartAndEndDates(startDate, endDate time.Time) ([]Trade, error)
- func GetTradeByToAccountStartAndEndDates(toAccountID *int, startDate, endDate time.Time) ([]Trade, error)
- func GetTradeByTradeID(tradeID int) (*Trade, error)
- func GetTradeByTransactionIDFromSource(transactionIDFromSource string, fromAccountID *int, toAccountID *int) (*Trade, error)
- func GetTradeList() ([]Trade, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertTrade ¶
func RemoveTrade ¶
func UpdateTrade ¶
Types ¶
type MinMaxTradeDates ¶
func GetMinAndMaxTradeDates ¶
func GetMinAndMaxTradeDates() (*MinMaxTradeDates, error)
type Trade ¶
type Trade struct { ID *int `json:"id"` ParentTradeID *int `json:"parentTradeId"` FromAccountID *int `json:"fromAccountId"` ToAccountID *int `json:"toAccountId"` AssetID *int `json:"assetId"` SourceID *int `json:"sourceId"` UUID string `json:"uuid"` TransactionIDFromSource string `json:"transactionIdFromSource"` OrderIDFromSource string `json:"orderIdFromSource"` TradeIDFromSource string `json:"tradeIdFromSource"` Name string `json:"name"` AlternateName string `json:"alternateName"` TradeTypeID *int `json:"tradeTypeId"` TradeDate time.Time `json:"tradeDate"` SettleDate time.Time `json:"settleDate"` TransferDate time.Time `json:"transferDate"` FromQuantity *float64 `json:"fromQuantity"` ToQuantity *float64 `json:"toQuantity"` Price *float64 `json:"price"` TotalAmount *float64 `json:"totalAmount"` FeesAmount *float64 `json:"feesAmount"` FeesAssetID *int `json:"feesAssetId"` RealizedReturnAmount *float64 `json:"realizedReturnAmount"` RealizedReturnAssetID *int `json:"realizedReturnAssetId"` CostBasisAmount *float64 `json:"costBasisAmount"` CostBasisTradeID *int `json:"costBasisTradeId"` Description string `json:"description"` SourceData types.JSONText `json:"sourceData"` IsActive bool `json:"isActive"` CreatedBy string `json:"createdBy"` CreatedAt time.Time `json:"createdAt"` UpdatedBy string `json:"updatedBy"` UpdatedAt time.Time `json:"updatedAt"` }
Asset
func GetTradeByTradeID ¶
func GetTradeList ¶
Click to show internal directories.
Click to hide internal directories.