finnomena

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL = "https://www.finnomena.com/fn3/api/fund/v2/public"

	// Default retry configuration
	DefaultMaxRetries      = 3
	DefaultRetryDelay      = 1 * time.Second
	RetryBackoffMultiplier = 2
)

Variables

View Source
var FeeDescriptionTranslation = map[string]string{
	"ค่าใช้จ่ายอื่นๆ":                                        "other fee",
	"ค่าธรรมเนียมการขายหน่วยลงทุน (Front-end Fee)":           "purchase fee",
	"ค่าธรรมเนียมการจัดการ":                                  "management fee",
	"ค่าธรรมเนียมการรับซื้อคืนหน่วยลงทุน (Back-end Fee)":     "redemption fee",
	"ค่าธรรมเนียมการสับเปลี่ยนหน่วยลงทุนเข้า (SWITCHING IN)": "switch in fee",
	"ค่าธรรมเนียมการสับเปลี่ยนหน่วยลงทุนออก (SWITCHING OUT)": "switch out fee",
	"ค่าธรรมเนียมและค่าใช้จ่ายรวมทั้งหมด":                    "total expense ratio",
	"ค่าธรรมเนียมการโอนหน่วยลงทุน":                           "unit transfer fee",
	"ค่าธรรมเนียมนายทะเบียนหน่วย":                            "registrar fee",
	"ค่าธรรมเนียมผู้ดูแลผลประโยชน์":                          "trustee fee",
}
View Source
var FeeOtherDescTranslation = map[string]string{
	"บริษัทจัดการอาจเรียกเก็บค่าธรรมเนียมการขายและค่าธรรมเนียมการรับซื้อคืนกับผู้ลงทุนแต่ละกลุ่มไม่เท่ากัน ทั้งนี้ ผู้ลงทุนสามารถดูรายละเอียดเพิ่มเติมได้ที่หนังสือชี้ชวนส่วนข้อมูลกองทุนรวม":                              "The fund management company may charge different sales fees and redemption fees to different investor groups. Investors can find more details in the fund information section of the prospectus.",
	"บริษัทจัดการอาจพิจารณาเปลี่ยนแปลงค่าธรรมเนียมที่เรียกเก็บจริงเพื่อให้สอดคล้องกับกลยุทธ์หรือค่าใช้จ่ายในการบริหารจัดการ และรวมค่าใช้จ่ายเป็นข้อมูลของรอบปีบัญชีล่าสุดหรือประมาณการเบื้องต้น (กรณียังไม่ครบรอบปีบัญชี)": "The management company may consider adjusting the actual fees charged to align with its strategy or management expenses, and include these expenses in the data for the latest accounting year or a preliminary estimate (if the accounting year has not yet ended).",
}
View Source
var FeeUnitTranslation = map[string]string{
	"ต่อปี ของมูลค่าทรัพย์สินสุทธิของกองทุน": "per year of NAV",
	"% ต่อปี": "% per year",
	"บาท":     "baht",
}

Functions

func TranslateFee

func TranslateFee(fee *models.Fee, useEnglish bool)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents the Finnomena API client

func NewClient

func NewClient() *Client

NewClient creates a new Finnomena API client

func NewClientWithRetry

func NewClientWithRetry(maxRetries int, retryDelay time.Duration) *Client

NewClientWithRetry creates a new Finnomena API client with custom retry configuration

func NewClientWithTimeout

func NewClientWithTimeout(timeout time.Duration) *Client

NewClientWithTimeout creates a new Finnomena API client with custom timeout

func (*Client) GetFundFee

func (c *Client) GetFundFee(fundID string) (*models.FundFee, error)

GetFundFee retrieves fee information for a specific fund

func (*Client) GetFundLatest

func (c *Client) GetFundLatest(fundID string) (*models.FundLatest, error)

GetFundLatest retrieves the latest data for a specific fund

func (*Client) GetFundOverview

func (c *Client) GetFundOverview(fundID string) (*models.FundOverview, error)

GetFundOverview retrieves overview data for a specific fund

func (*Client) GetFundPerformance

func (c *Client) GetFundPerformance(fundID string) (*models.FundPerformance, error)

GetFundPerformance retrieves performance data for a specific fund

func (*Client) GetFundPortfolio

func (c *Client) GetFundPortfolio(fundID string) (*models.FundPortfolio, error)

func (*Client) GetFundVerify

func (c *Client) GetFundVerify(fundID string) (*models.FundVerify, error)

GetFundVerify retrieves verification data including available periods for a fund

func (*Client) GetFundsList

func (c *Client) GetFundsList() ([]models.Fund, error)

GetFundsList retrieves the list of all available funds

func (*Client) GetHistoricalPrices

func (c *Client) GetHistoricalPrices(symbol, resolution string, from, to time.Time) (*models.BarsResponse, error)

GetHistoricalPrices retrieves historical OHLCV bars for a fund

func (*Client) GetServerTime

func (c *Client) GetServerTime() (int64, error)

GetServerTime retrieves the server time from the API

func (*Client) GetSymbolInfo

func (c *Client) GetSymbolInfo(symbol string) (*models.SymbolInfo, error)

GetSymbolInfo retrieves symbol information for a specific fund

func (*Client) SearchFund

func (c *Client) SearchFund(query string) (*models.Fund, error)

SearchFund searches for a fund by short code or name

func (*Client) SetRetryConfig

func (c *Client) SetRetryConfig(maxRetries int, retryDelay time.Duration)

SetRetryConfig configures the retry behavior for the client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL