Documentation ¶
Index ¶
- Variables
- func Buy(ctx context.Context, securities *Securities) error
- func FundWithInitAccount(ctx context.Context, aliasName, userId string, openingCash decimal.Decimal) error
- func FundWithModifyAliasName(ctx context.Context, aliasName string, fundNo string) error
- func Sell(ctx context.Context, securities *Securities) error
- type Account
- type AccountStatus
- type Assets
- type Securities
- type SecuritiesType
- type Stock
- type TransactionRecordType
Constants ¶
This section is empty.
Variables ¶
View Source
var FundLimitPerUserId int64 = 3
Functions ¶
func FundWithInitAccount ¶
func FundWithModifyAliasName ¶
Types ¶
type Account ¶
type Account struct { AliasName string `json:"alias_name"` UserId string `json:"user_id"` FundNo string `json:"fund_no"` OpeningCash decimal.Decimal `json:"opening_cash"` EndCash decimal.Decimal `json:"end_cash"` YesterdayEndCash decimal.Decimal `json:"yesterday_end_cash"` Status int8 `json:"status"` InitDatetime time.Time `json:"init_datetime"` }
func FundWithListByUserId ¶
type Assets ¶
type Assets struct { UserId string `json:"user_id"` FundNo string `json:"fund_no"` Type int8 `json:"type"` CashPosition decimal.Decimal `json:"cash_position"` Code string `json:"code"` Name string `json:"name"` OpenInterest int64 `json:"open_interest"` OpenId string `json:"open_id"` FirstBuyDatetime time.Time `json:"first_buy_datetime"` }
type Securities ¶
type TransactionRecordType ¶
type TransactionRecordType int8
const ( OPENING TransactionRecordType = iota BUY SELL CLEAR )
Click to show internal directories.
Click to hide internal directories.