Documentation
¶
Index ¶
- Variables
- func FetchAllPages[T any](ctx context.Context, ...) ([]T, error)
- func IsRetryable(statusCode int) bool
- func TranslateAllAssetAllocations(allocs []AssetAllocation, useEnglish bool)
- func TranslateAllFactsheetFees(fees []FactsheetFee, useEnglish bool)
- func TranslateAllFees(fees []MutualFundFee, useEnglish bool)
- func TranslateAllMonthlyPortfolioAssetTypes(items []MonthlyPortfolioAssetType, useEnglish bool)
- func TranslateAllQuarterlyPortfolios(items []QuarterlyPortfolio, useEnglish bool)
- func TranslateAllTop5Holdings(holdings []Top5Holding, useEnglish bool)
- func TranslateAssetAllocation(alloc *AssetAllocation, useEnglish bool)
- func TranslateFactsheetFee(fee *FactsheetFee, useEnglish bool)
- func TranslateFee(fee *MutualFundFee, useEnglish bool)
- func TranslateMonthlyPortfolioAssetType(item *MonthlyPortfolioAssetType, useEnglish bool)
- func TranslateQuarterlyPortfolio(item *QuarterlyPortfolio, useEnglish bool)
- func TranslateTop5Holding(holding *Top5Holding, useEnglish bool)
- type AMC
- type APIError
- type AssetAllocation
- type BatchFundProfileResult
- type BatchNAVOptions
- type BatchNAVResult
- type BatchProfileOptions
- type Client
- func (c *Client) FindAMC(ctx context.Context, query string) (*AMC, error)
- func (c *Client) Get(ctx context.Context, path string) ([]byte, error)
- func (c *Client) GetAssetAllocation(ctx context.Context, opts FactsheetOptions) ([]AssetAllocation, string, error)
- func (c *Client) GetDailyNAV(ctx context.Context, opts NAVOptions) ([]DailyNAV, string, error)
- func (c *Client) GetDividendHistory(ctx context.Context, opts DividendHistoryOptions) ([]DividendHistory, string, error)
- func (c *Client) GetFactsheetBenchmarks(ctx context.Context, opts FactsheetOptions) ([]FactsheetBenchmark, string, error)
- func (c *Client) GetFactsheetDividendPolicy(ctx context.Context, opts FactsheetOptions) ([]FundDividendPolicy, string, error)
- func (c *Client) GetFactsheetFees(ctx context.Context, opts FactsheetOptions) ([]FactsheetFee, string, error)
- func (c *Client) GetFactsheetPerformance(ctx context.Context, opts FactsheetOptions) ([]FactsheetPerformance, string, error)
- func (c *Client) GetFactsheetStatistics(ctx context.Context, opts FactsheetOptions) ([]FactsheetStatistics, string, error)
- func (c *Client) GetFactsheetSubscriptionRedemptionMinimums(ctx context.Context, opts FactsheetOptions) ([]FactsheetSubscriptionRedemptionMinimum, string, error)
- func (c *Client) GetFactsheetSubscriptionRedemptionPeriods(ctx context.Context, opts FactsheetOptions) ([]FactsheetSubscriptionRedemptionPeriod, string, error)
- func (c *Client) GetFundAssetAllocation(ctx context.Context, projID string) ([]AssetAllocation, error)
- func (c *Client) GetFundFactsheetFees(ctx context.Context, projID string) ([]FactsheetFee, error)
- func (c *Client) GetFundFactsheetURLs(ctx context.Context, opts FeeOptions) ([]FundFactsheetURL, string, error)
- func (c *Client) GetFundIPOs(ctx context.Context, opts FactsheetOptions) ([]FundIPO, string, error)
- func (c *Client) GetFundInvolveParties(ctx context.Context, opts InvolvePartyOptions) ([]FundInvolveParty, string, error)
- func (c *Client) GetFundLatestNAV(ctx context.Context, projID string) (*DailyNAV, error)
- func (c *Client) GetFundPortfolio(ctx context.Context, projID string) (*FundPortfolioView, error)
- func (c *Client) GetFundProfile(ctx context.Context, projID string) (*FundProfile, error)
- func (c *Client) GetFundProfiles(ctx context.Context, opts ProfileOptions) ([]FundProfile, string, error)
- func (c *Client) GetFundRiskSpectrum(ctx context.Context, projID string) (*RiskSpectrum, error)
- func (c *Client) GetFundSpecifications(ctx context.Context, opts FeeOptions) ([]FundSpecification, string, error)
- func (c *Client) GetFundTop5Holdings(ctx context.Context, projID string) ([]Top5Holding, error)
- func (c *Client) GetFundsByCompany(ctx context.Context, companyName string) ([]FundProfile, error)
- func (c *Client) GetMonthlyPortfolioAssetType(ctx context.Context, opts OutstandingOptions) ([]MonthlyPortfolioAssetType, string, error)
- func (c *Client) GetMutualFundFees(ctx context.Context, opts FeeOptions) ([]MutualFundFee, string, error)
- func (c *Client) GetQuarterlyPortfolio(ctx context.Context, opts OutstandingOptions) ([]QuarterlyPortfolio, string, error)
- func (c *Client) GetRiskSpectrum(ctx context.Context, opts FactsheetOptions) ([]RiskSpectrum, string, error)
- func (c *Client) GetTop5Holdings(ctx context.Context, opts FactsheetOptions) ([]Top5Holding, string, error)
- func (c *Client) Language() Language
- func (c *Client) ListAMCs(ctx context.Context, pageSize int, cursor string) ([]AMC, string, error)
- func (c *Client) Post(ctx context.Context, path string, payload []byte) ([]byte, error)
- func (c *Client) SearchFunds(ctx context.Context, query string) ([]FundProfile, error)
- func (c *Client) UsePrimaryKey()
- func (c *Client) UseSecondaryKey()
- type DailyNAV
- type DateTime
- type DividendHistory
- type DividendHistoryOptions
- type FactsheetBenchmark
- type FactsheetFee
- type FactsheetOptions
- type FactsheetPerformance
- type FactsheetStatistics
- type FactsheetSubscriptionRedemptionMinimum
- type FactsheetSubscriptionRedemptionPeriod
- type FeeOptions
- type FundDividendPolicy
- type FundFactsheetURL
- type FundIPO
- type FundInvolveParty
- type FundPortfolioView
- type FundProfile
- type FundSpecification
- type InvolvePartyOptions
- type Language
- type MonthlyPortfolioAssetType
- type MutualFundFee
- type NAVOptions
- type Option
- func WithBaseURL(url string) Option
- func WithCache(cache cacheClient, ttl time.Duration) Option
- func WithHTTPClient(httpClient *http.Client) Option
- func WithLanguage(lang Language) Option
- func WithLogger(l logger) Option
- func WithMaxRetries(n int) Option
- func WithRateLimiter(rl RateLimiter) Option
- func WithRequestHook(hook RequestHook) Option
- func WithResponseHook(hook ResponseHook) Option
- func WithRetryDelay(d time.Duration) Option
- func WithSecondaryKey(key string) Option
- func WithTimeout(d time.Duration) Option
- type OutstandingOptions
- type PaginatedResponse
- type ProfileOptions
- type QuarterlyPortfolio
- type RateLimiter
- type RequestHook
- type ResponseHook
- type RiskSpectrum
- type Top5Holding
Constants ¶
This section is empty.
Variables ¶
var ( ErrRateLimited = errors.New("rate limited") ErrNotFound = errors.New("data not found") )
var AssetLiabilityTranslation = map[string]string{
"ตั๋วเงินคลัง (Treasury Bill)": "Treasury Bill",
"ตั๋วเงินคลัง": "Treasury Bill",
"พันธบัตรรัฐบาล": "Government Bond",
"เงินฝากธนาคาร": "Bank Deposit",
"หุ้นสามัญ": "Common Stock",
}
AssetLiabilityTranslation maps common Thai asset/liability category descriptions to English.
var AssetNameTranslation = map[string]string{
"หน่วยลงทุน": "Investment Units",
"เงินฝากธนาคาร และอื่นๆ": "Bank Deposits and Others",
"ตราสารหนี้": "Debt Instruments",
"หุ้นสามัญ": "Common Stocks",
"ทรัพย์สินอื่นๆ": "Other Assets",
"เงินสด": "Cash",
}
AssetNameTranslation maps common Thai asset type names to English.
var FeeTypeTranslation = map[string]string{
"ค่าธรรมเนียมการจัดการ": "Management Fee",
"ค่าธรรมเนียมผู้ดูแลผลประโยชน์": "Trustee Fee",
"ค่าธรรมเนียมนายทะเบียนหน่วย": "Registrar Fee",
"ค่าธรรมเนียมการขายหน่วยลงทุน (Front-end Fee)": "Front-end Fee",
"ค่าธรรมเนียมการรับซื้อคืนหน่วยลงทุน (Back-end Fee)": "Back-end Fee",
"ค่าธรรมเนียมการสับเปลี่ยนหน่วยลงทุนเข้า (SWITCHING IN)": "Switch-in Fee",
"ค่าธรรมเนียมการสับเปลี่ยนหน่วยลงทุนออก (SWITCHING OUT)": "Switch-out Fee",
"ค่าธรรมเนียมการโอนหน่วยลงทุน": "Transfer Fee",
"ค่าใช้จ่ายอื่นๆ": "Other Fee",
"ค่าธรรมเนียมและค่าใช้จ่ายรวมทั้งหมด": "Total Expense Ratio",
}
FeeTypeTranslation maps Thai fee type descriptions to English. Extend this map for additional fee descriptions returned by the SEC API.
var FeeUnitTranslation = map[string]string{
"ต่อปี ของมูลค่าทรัพย์สินสุทธิของกองทุน": "per year of NAV",
"% ต่อปี": "% per year",
"บาท": "baht",
}
FeeUnitTranslation maps Thai fee unit descriptions to English.
Functions ¶
func FetchAllPages ¶
func IsRetryable ¶
func TranslateAllAssetAllocations ¶
func TranslateAllAssetAllocations(allocs []AssetAllocation, useEnglish bool)
TranslateAllAssetAllocations translates every allocation in the slice when useEnglish is true.
func TranslateAllFactsheetFees ¶
func TranslateAllFactsheetFees(fees []FactsheetFee, useEnglish bool)
TranslateAllFactsheetFees translates every factsheet fee in the slice when useEnglish is true.
func TranslateAllFees ¶
func TranslateAllFees(fees []MutualFundFee, useEnglish bool)
TranslateAllFees translates every fee in the slice when useEnglish is true.
func TranslateAllMonthlyPortfolioAssetTypes ¶
func TranslateAllMonthlyPortfolioAssetTypes(items []MonthlyPortfolioAssetType, useEnglish bool)
TranslateAllMonthlyPortfolioAssetTypes translates every portfolio item in the slice when useEnglish is true.
func TranslateAllQuarterlyPortfolios ¶
func TranslateAllQuarterlyPortfolios(items []QuarterlyPortfolio, useEnglish bool)
TranslateAllQuarterlyPortfolios translates every portfolio item in the slice when useEnglish is true.
func TranslateAllTop5Holdings ¶
func TranslateAllTop5Holdings(holdings []Top5Holding, useEnglish bool)
TranslateAllTop5Holdings translates every holding in the slice when useEnglish is true.
func TranslateAssetAllocation ¶
func TranslateAssetAllocation(alloc *AssetAllocation, useEnglish bool)
TranslateAssetAllocation translates the Thai asset name on an AssetAllocation to English when useEnglish is true. It mutates the provided allocation in place.
func TranslateFactsheetFee ¶
func TranslateFactsheetFee(fee *FactsheetFee, useEnglish bool)
TranslateFactsheetFee translates Thai fee descriptions on a FactsheetFee to English when useEnglish is true. It mutates the provided fee in place.
func TranslateFee ¶
func TranslateFee(fee *MutualFundFee, useEnglish bool)
TranslateFee translates Thai fee descriptions on a MutualFundFee to English when useEnglish is true. It mutates the provided fee in place.
func TranslateMonthlyPortfolioAssetType ¶
func TranslateMonthlyPortfolioAssetType(item *MonthlyPortfolioAssetType, useEnglish bool)
TranslateMonthlyPortfolioAssetType translates Thai asset/liability descriptions on a MonthlyPortfolioAssetType to English when useEnglish is true.
func TranslateQuarterlyPortfolio ¶
func TranslateQuarterlyPortfolio(item *QuarterlyPortfolio, useEnglish bool)
TranslateQuarterlyPortfolio translates Thai asset/liability descriptions on a QuarterlyPortfolio to English when useEnglish is true.
func TranslateTop5Holding ¶
func TranslateTop5Holding(holding *Top5Holding, useEnglish bool)
TranslateTop5Holding translates the Thai asset name on a Top5Holding to English when useEnglish is true. It mutates the provided holding in place.
Types ¶
type AMC ¶
type AssetAllocation ¶
type AssetAllocation struct {
ProjID string `json:"proj_id"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
AssetSeq int `json:"asset_seq"`
AssetName string `json:"asset_name"`
AssetRatio float64 `json:"asset_ratio"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type BatchFundProfileResult ¶
type BatchFundProfileResult struct {
ProjID string
Profile *FundProfile
Err error
}
func BatchGetFundProfiles ¶
func BatchGetFundProfiles(ctx context.Context, c *Client, projIDs []string, opts BatchProfileOptions) []BatchFundProfileResult
type BatchNAVOptions ¶
type BatchNAVResult ¶
func BatchGetNAVs ¶
func BatchGetNAVs(ctx context.Context, c *Client, projIDs []string, startDate, endDate time.Time, opts BatchNAVOptions) []BatchNAVResult
type BatchProfileOptions ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func ClientFromEnv ¶
func (*Client) GetAssetAllocation ¶
func (c *Client) GetAssetAllocation(ctx context.Context, opts FactsheetOptions) ([]AssetAllocation, string, error)
func (*Client) GetDailyNAV ¶
func (*Client) GetDividendHistory ¶
func (c *Client) GetDividendHistory(ctx context.Context, opts DividendHistoryOptions) ([]DividendHistory, string, error)
func (*Client) GetFactsheetBenchmarks ¶
func (c *Client) GetFactsheetBenchmarks(ctx context.Context, opts FactsheetOptions) ([]FactsheetBenchmark, string, error)
func (*Client) GetFactsheetDividendPolicy ¶
func (c *Client) GetFactsheetDividendPolicy(ctx context.Context, opts FactsheetOptions) ([]FundDividendPolicy, string, error)
func (*Client) GetFactsheetFees ¶
func (c *Client) GetFactsheetFees(ctx context.Context, opts FactsheetOptions) ([]FactsheetFee, string, error)
func (*Client) GetFactsheetPerformance ¶
func (c *Client) GetFactsheetPerformance(ctx context.Context, opts FactsheetOptions) ([]FactsheetPerformance, string, error)
func (*Client) GetFactsheetStatistics ¶
func (c *Client) GetFactsheetStatistics(ctx context.Context, opts FactsheetOptions) ([]FactsheetStatistics, string, error)
func (*Client) GetFactsheetSubscriptionRedemptionMinimums ¶
func (c *Client) GetFactsheetSubscriptionRedemptionMinimums(ctx context.Context, opts FactsheetOptions) ([]FactsheetSubscriptionRedemptionMinimum, string, error)
func (*Client) GetFactsheetSubscriptionRedemptionPeriods ¶
func (c *Client) GetFactsheetSubscriptionRedemptionPeriods(ctx context.Context, opts FactsheetOptions) ([]FactsheetSubscriptionRedemptionPeriod, string, error)
func (*Client) GetFundAssetAllocation ¶
func (c *Client) GetFundAssetAllocation(ctx context.Context, projID string) ([]AssetAllocation, error)
GetFundAssetAllocation returns the latest asset allocation for a single fund.
func (*Client) GetFundFactsheetFees ¶
GetFundFactsheetFees returns the latest factsheet fees for a single fund.
func (*Client) GetFundFactsheetURLs ¶
func (c *Client) GetFundFactsheetURLs(ctx context.Context, opts FeeOptions) ([]FundFactsheetURL, string, error)
func (*Client) GetFundIPOs ¶
func (*Client) GetFundInvolveParties ¶
func (c *Client) GetFundInvolveParties(ctx context.Context, opts InvolvePartyOptions) ([]FundInvolveParty, string, error)
func (*Client) GetFundLatestNAV ¶
GetFundLatestNAV returns the most recent NAV for a single fund.
func (*Client) GetFundPortfolio ¶
GetFundPortfolio fetches asset allocation, top 5 holdings, quarterly portfolio, and monthly asset breakdown concurrently for a single fund.
func (*Client) GetFundProfile ¶
GetFundProfile returns the latest profile for a single fund.
func (*Client) GetFundProfiles ¶
func (c *Client) GetFundProfiles(ctx context.Context, opts ProfileOptions) ([]FundProfile, string, error)
func (*Client) GetFundRiskSpectrum ¶
GetFundRiskSpectrum returns the latest risk spectrum for a single fund.
func (*Client) GetFundSpecifications ¶
func (c *Client) GetFundSpecifications(ctx context.Context, opts FeeOptions) ([]FundSpecification, string, error)
func (*Client) GetFundTop5Holdings ¶
GetFundTop5Holdings returns the latest top 5 holdings for a single fund.
func (*Client) GetFundsByCompany ¶
GetFundsByCompany returns all fund profiles for a given AMC name or unique_id.
func (*Client) GetMonthlyPortfolioAssetType ¶
func (c *Client) GetMonthlyPortfolioAssetType(ctx context.Context, opts OutstandingOptions) ([]MonthlyPortfolioAssetType, string, error)
func (*Client) GetMutualFundFees ¶
func (c *Client) GetMutualFundFees(ctx context.Context, opts FeeOptions) ([]MutualFundFee, string, error)
func (*Client) GetQuarterlyPortfolio ¶
func (c *Client) GetQuarterlyPortfolio(ctx context.Context, opts OutstandingOptions) ([]QuarterlyPortfolio, string, error)
func (*Client) GetRiskSpectrum ¶
func (c *Client) GetRiskSpectrum(ctx context.Context, opts FactsheetOptions) ([]RiskSpectrum, string, error)
func (*Client) GetTop5Holdings ¶
func (c *Client) GetTop5Holdings(ctx context.Context, opts FactsheetOptions) ([]Top5Holding, string, error)
func (*Client) SearchFunds ¶
SearchFunds searches across proj_id, proj_name_th, proj_name_en, and proj_abbr_name.
func (*Client) UsePrimaryKey ¶
func (c *Client) UsePrimaryKey()
func (*Client) UseSecondaryKey ¶
func (c *Client) UseSecondaryKey()
type DailyNAV ¶
type DailyNAV struct {
ProjID string `json:"proj_id"`
UniqueID string `json:"unique_id"`
FundClassName string `json:"fund_class_name"`
NetAsset float64 `json:"net_asset"`
LastVal float64 `json:"last_val"`
SellPrice float64 `json:"sell_price"`
BuyPrice float64 `json:"buy_price"`
SellSwapPrice float64 `json:"sell_swap_price"`
BuySwapPrice float64 `json:"buy_swap_price"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type DateTime ¶
DateTime is a flexible time.Time that parses multiple SEC datetime formats.
func (DateTime) MarshalJSON ¶
func (*DateTime) UnmarshalJSON ¶
type DividendHistory ¶
type DividendHistory struct {
ProjID string `json:"proj_id"`
UniqueID string `json:"unique_id"`
ClassAbbrName string `json:"class_abbr_name"`
BookCloseDate string `json:"book_close_date"`
DividendDate string `json:"dividend_date"`
DividendValue float64 `json:"dividend_value"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type DividendHistoryOptions ¶
type FactsheetBenchmark ¶
type FactsheetBenchmark struct {
ProjID string `json:"proj_id"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
GroupSeq int `json:"group_seq"`
Benchmark string `json:"benchmark"`
Remark string `json:"benchmark_remark"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FactsheetFee ¶
type FactsheetFee struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
FeeTypeDesc string `json:"fee_type_desc"`
Rate float64 `json:"rate"`
ActualValue float64 `json:"actual_value"`
FeeOtherDesc string `json:"fee_other_desc"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FactsheetOptions ¶
type FactsheetPerformance ¶
type FactsheetPerformance struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
PerformanceTypeDesc string `json:"performance_type_desc"`
ReferencePeriod string `json:"reference_period"`
PerformanceValue float64 `json:"performance_value"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FactsheetStatistics ¶
type FactsheetStatistics struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
PortfolioTurnoverRatio string `json:"portfolio_turnover_ratio"`
RecoveringPeriod string `json:"recovering_period"`
PortfolioDurationPeriod string `json:"portfolio_duration_period"`
MaximumDrawdown string `json:"maximum_drawdown"`
SharpeRatio string `json:"sharpe_ratio"`
Beta string `json:"beta"`
Alpha string `json:"alpha"`
FXHedging string `json:"fx_hedging"`
TrackingError string `json:"tracking_error"`
YieldToMaturity string `json:"yield_to_maturity"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FactsheetSubscriptionRedemptionMinimum ¶
type FactsheetSubscriptionRedemptionMinimum struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
MinimumSubIPO float64 `json:"minimum_sub_ipo"`
MinimumSubIPOCur string `json:"minimum_sub_ipo_cur"`
MinimumSub float64 `json:"minimum_sub"`
MinimumSubCur string `json:"minimum_sub_cur"`
MinimumSubUnit string `json:"minimum_sub_unit"`
MinimumRedempt float64 `json:"minimum_redempt"`
MinimumRedemptCur string `json:"minimum_redempt_cur"`
MinimumRedemptUnit string `json:"minimum_redempt_unit"`
LowbalVal float64 `json:"lowbal_val"`
LowbalValCur string `json:"lowbal_val_cur"`
LowbalUnit string `json:"lowbal_unit"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FactsheetSubscriptionRedemptionPeriod ¶
type FactsheetSubscriptionRedemptionPeriod struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
Type string `json:"type"`
Period string `json:"period"`
RedempPeriodOth string `json:"redemp_period_oth"`
SettlementPeriod string `json:"settlement_period"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FeeOptions ¶
type FundDividendPolicy ¶
type FundDividendPolicy struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
DividendPolicy string `json:"dividend_policy"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FundFactsheetURL ¶
type FundFactsheetURL struct {
ProjID string `json:"proj_id"`
FundClassName string `json:"fund_class_name"`
ProspectusType string `json:"prospectus_type"`
AMCURLFactsheet string `json:"amc_url_factsheet"`
PDFFactsheet string `json:"pdf_factsheet"`
AsOfDate string `json:"as_of_date"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FundIPO ¶
type FundIPO struct {
ProjID string `json:"proj_id"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
FirstSellStartDate string `json:"first_sell_start_date"`
FirstSellEndDate string `json:"first_sell_end_date"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type FundInvolveParty ¶
type FundInvolveParty struct {
ProjID string `json:"proj_id"`
EntityType string `json:"entity_type"`
EntityNameTH string `json:"entity_name_th"`
EntityNameEN string `json:"entity_name_en"`
Address string `json:"address"`
LastUpdDate DateTime `json:"last_upd_date"`
}
func (FundInvolveParty) EntityName ¶
func (f FundInvolveParty) EntityName(lang Language) string
EntityName returns the entity name in the client's preferred language.
type FundPortfolioView ¶
type FundPortfolioView struct {
ProjID string
AssetAllocation []AssetAllocation
Top5Holdings []Top5Holding
QuarterlyPortfolio []QuarterlyPortfolio
MonthlyAssetBreakdown []MonthlyPortfolioAssetType
}
FundPortfolioView aggregates the latest portfolio-related data for a single fund.
type FundProfile ¶
type FundProfile struct {
UniqueID string `json:"unique_id"`
CompNameTH string `json:"comp_name_th"`
CompNameEN string `json:"comp_name_en"`
ProjID string `json:"proj_id"`
RegisID string `json:"regis_id"`
InitDate string `json:"init_date"`
RegisDate string `json:"regis_date"`
CancelDate string `json:"cancel_date"`
ProjNameTH string `json:"proj_name_th"`
ProjNameEN string `json:"proj_name_en"`
ProjAbbrName string `json:"proj_abbr_name"`
FundStatus string `json:"fund_status"`
InvestCountryFlag string `json:"invest_country_flag"`
ProjRetailType string `json:"proj_retail_type"`
ProjTermFlag string `json:"proj_term_flag"`
ProjTermDay string `json:"proj_term_day"`
ProjTermMonth string `json:"proj_term_month"`
ProjTermYear string `json:"proj_term_year"`
PolicyDesc string `json:"policy_desc"`
InvestmentPolicyDesc string `json:"investment_policy_desc"`
ManagementStyle string `json:"management_style"`
FeederFundMasterFund string `json:"feederfund_master_fund"`
FeederFundCountry string `json:"feederfund_country"`
ExchangeRateProtectionPolicy string `json:"exchange_rate_protection_policy"`
FundClassName string `json:"fund_class_name"`
FundClassDetail string `json:"fund_class_detail"`
FundClassDescription string `json:"fund_class_description"`
FundClassTaxIncentiveType string `json:"fund_class_tax_incentive_type"`
FundClassISINCode string `json:"fund_class_isin_code"`
LastUpdDate DateTime `json:"last_upd_date"`
}
func (FundProfile) CompanyName ¶
func (p FundProfile) CompanyName(lang Language) string
CompanyName returns the AMC name in the client's preferred language.
func (FundProfile) Name ¶
func (p FundProfile) Name(lang Language) string
Name returns the fund name in the client's preferred language. Falls back to the other language if the preferred one is empty.
type FundSpecification ¶
type InvolvePartyOptions ¶
type Language ¶
type Language string
Language represents the preferred display language for bilingual fields.
type MutualFundFee ¶
type NAVOptions ¶
type Option ¶
type Option func(*Client)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithLanguage ¶
func WithLogger ¶
func WithLogger(l logger) Option
func WithMaxRetries ¶
func WithRateLimiter ¶
func WithRateLimiter(rl RateLimiter) Option
func WithRequestHook ¶
func WithRequestHook(hook RequestHook) Option
func WithResponseHook ¶
func WithResponseHook(hook ResponseHook) Option
func WithRetryDelay ¶
func WithSecondaryKey ¶
func WithTimeout ¶
type OutstandingOptions ¶
type PaginatedResponse ¶
type ProfileOptions ¶
type QuarterlyPortfolio ¶
type QuarterlyPortfolio struct {
ProjID string `json:"proj_id"`
Period int `json:"period"`
AsOfDate string `json:"as_of_date"`
AssetliabID string `json:"assetliab_id"`
AssetliabDesc string `json:"assetliab_desc"`
IssueCode string `json:"issue_code"`
ISINCode string `json:"isin_code"`
Issuer string `json:"issuer"`
AssetliabValue float64 `json:"assetliab_value"`
PercentNAV float64 `json:"percent_nav"`
LastUpdDate string `json:"last_upd_date"`
}
type RateLimiter ¶
func NewRateLimiter ¶
func NewRateLimiter() RateLimiter
type RequestHook ¶
type RiskSpectrum ¶
type RiskSpectrum struct {
ProjID string `json:"proj_id"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
RiskSpectrum string `json:"risk_spectrum"`
RiskSpectrumDesc string `json:"risk_spectrum_desc"`
LastUpdDate DateTime `json:"last_upd_date"`
}
type Top5Holding ¶
type Top5Holding struct {
ProjID string `json:"proj_id"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
ProspectusType string `json:"prospectus_type"`
AssetSeq int `json:"asset_seq"`
AssetName string `json:"asset_name"`
AssetRatio float64 `json:"asset_ratio"`
LastUpdDate DateTime `json:"last_upd_date"`
}