model

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceSheet added in v0.9.5

type BalanceSheet struct {
	Date                                    string          `json:"date"`
	Symbol                                  string          `json:"symbol"`
	ReportedCurrency                        string          `json:"reportedCurrency"`
	Cik                                     string          `json:"cik"`
	FilingDate                              types.Date      `json:"filingDate"`
	AcceptedDateTime                        types.DateTime  `json:"acceptedDate"`
	FiscalYear                              string          `json:"fiscalYear"`
	Period                                  FinancialPeriod `json:"period"`
	CashAndCashEquivalents                  decimal.Decimal `json:"cashAndCashEquivalents"`
	ShortTermInvestments                    decimal.Decimal `json:"shortTermInvestments"`
	CashAndShortTermInvestments             decimal.Decimal `json:"cashAndShortTermInvestments"`
	NetReceivables                          decimal.Decimal `json:"netReceivables"`
	AccountsReceivables                     decimal.Decimal `json:"accountsReceivables"`
	OtherReceivables                        decimal.Decimal `json:"otherReceivables"`
	Inventory                               decimal.Decimal `json:"inventory"`
	Prepaids                                decimal.Decimal `json:"prepaids"`
	OtherCurrentAssets                      decimal.Decimal `json:"otherCurrentAssets"`
	TotalCurrentAssets                      decimal.Decimal `json:"totalCurrentAssets"`
	PropertyPlantEquipmentNet               decimal.Decimal `json:"propertyPlantEquipmentNet"`
	Goodwill                                decimal.Decimal `json:"goodwill"`
	IntangibleAssets                        decimal.Decimal `json:"intangibleAssets"`
	GoodwillAndIntangibleAssets             decimal.Decimal `json:"goodwillAndIntangibleAssets"`
	LongTermInvestments                     decimal.Decimal `json:"longTermInvestments"`
	TaxAssets                               decimal.Decimal `json:"taxAssets"`
	OtherNonCurrentAssets                   decimal.Decimal `json:"otherNonCurrentAssets"`
	TotalNonCurrentAssets                   decimal.Decimal `json:"totalNonCurrentAssets"`
	OtherAssets                             decimal.Decimal `json:"otherAssets"`
	TotalAssets                             decimal.Decimal `json:"totalAssets"`
	TotalPayables                           decimal.Decimal `json:"totalPayables"`
	AccountPayables                         decimal.Decimal `json:"accountPayables"`
	OtherPayables                           decimal.Decimal `json:"otherPayables"`
	AccruedExpenses                         decimal.Decimal `json:"accruedExpenses"`
	ShortTermDebt                           decimal.Decimal `json:"shortTermDebt"`
	CapitalLeaseObligationsCurrent          decimal.Decimal `json:"capitalLeaseObligationsCurrent"`
	TaxPayables                             decimal.Decimal `json:"taxPayables"`
	DeferredRevenue                         decimal.Decimal `json:"deferredRevenue"`
	OtherCurrentLiabilities                 decimal.Decimal `json:"otherCurrentLiabilities"`
	TotalCurrentLiabilities                 decimal.Decimal `json:"totalCurrentLiabilities"`
	LongTermDebt                            decimal.Decimal `json:"longTermDebt"`
	DeferredRevenueNonCurrent               decimal.Decimal `json:"deferredRevenueNonCurrent"`
	DeferredTaxLiabilitiesNonCurrent        decimal.Decimal `json:"deferredTaxLiabilitiesNonCurrent"`
	OtherNonCurrentLiabilities              decimal.Decimal `json:"otherNonCurrentLiabilities"`
	TotalNonCurrentLiabilities              decimal.Decimal `json:"totalNonCurrentLiabilities"`
	OtherLiabilities                        decimal.Decimal `json:"otherLiabilities"`
	CapitalLeaseObligations                 decimal.Decimal `json:"capitalLeaseObligations"`
	TotalLiabilities                        decimal.Decimal `json:"totalLiabilities"`
	TreasuryStock                           decimal.Decimal `json:"treasuryStock"`
	PreferredStock                          decimal.Decimal `json:"preferredStock"`
	CommonStock                             decimal.Decimal `json:"commonStock"`
	RetainedEarnings                        decimal.Decimal `json:"retainedEarnings"`
	AdditionalPaidInCapital                 decimal.Decimal `json:"additionalPaidInCapital"`
	AccumulatedOtherComprehensiveIncomeLoss decimal.Decimal `json:"accumulatedOtherComprehensiveIncomeLoss"`
	OtherTotalStockholdersEquity            decimal.Decimal `json:"otherTotalStockholdersEquity"`
	TotalStockholdersEquity                 decimal.Decimal `json:"totalStockholdersEquity"`
	TotalEquity                             decimal.Decimal `json:"totalEquity"`
	MinorityInterest                        decimal.Decimal `json:"minorityInterest"`
	TotalLiabilitiesAndTotalEquity          decimal.Decimal `json:"totalLiabilitiesAndTotalEquity"`
	TotalInvestments                        decimal.Decimal `json:"totalInvestments"`
	TotalDebt                               decimal.Decimal `json:"totalDebt"`
	NetDebt                                 decimal.Decimal `json:"netDebt"`
}

type Bar added in v0.3.2

type Bar struct {
	Open     decimal.Decimal `json:"open"`
	High     decimal.Decimal `json:"high"`
	Low      decimal.Decimal `json:"low"`
	Close    decimal.Decimal `json:"close"`
	Volume   decimal.Decimal `json:"volume"`
	DateTime types.DateTime  `json:"date"`
}

type BaseResponse

type BaseResponse struct {
	PaginationHooks

	// The status of this request's response.
	Status string `json:"status,omitempty"`

	// A request id assigned by the server.
	RequestID string `json:"request_id,omitempty"`

	// The total number of results for this request.
	Count int `json:"count,omitempty"`

	// A response message for successful requests.
	Message string `json:"message,omitempty"`
}

BaseResponse has all possible attributes that any response can use. It's intended to be embedded in a domain specific response struct.

type BatchGetQuoteParams added in v0.8.0

type BatchGetQuoteParams struct {
	Symbols string `query:"symbols,required"`
}

type BatchGetQuoteResponse added in v0.8.0

type BatchGetQuoteResponse = []TickerPrice

type BatchGetQuotesByExchangeParams added in v0.8.0

type BatchGetQuotesByExchangeParams struct {
	Exchange string `query:"exchange,required"`
	Short    bool   `query:"short"` // DO NOT USE: we always expect full prices to be returned.
}

type BatchGetQuotesByExchangeResponse added in v0.8.0

type BatchGetQuotesByExchangeResponse = []TickerPrice

type BulkCompanyProfileResponse

type BulkCompanyProfileResponse struct {
	Symbol            string                                                                                 `json:"symbol"`
	Price             types.EmptyOr[decimal.Decimal]                                                         `json:"price,omitempty"`
	MktCap            types.EmptyOr[decimal.Decimal]                                                         `json:"marketCap,omitempty"`
	Beta              types.EmptyOr[decimal.Decimal]                                                         `json:"beta,omitempty"`
	LastDiv           types.EmptyOr[decimal.Decimal]                                                         `json:"lastDividend,omitempty"`
	Range             types.EmptyOr[types.Range52w]                                                          `json:"range,omitempty"`
	Change            types.EmptyOr[decimal.Decimal]                                                         `json:"change,omitempty"`
	ChangePercentage  types.EmptyOr[decimal.Decimal]                                                         `json:"changePercentage,omitempty"`
	Volume            types.EmptyOr[decimal.Decimal]                                                         `json:"volume,omitempty"`
	VolumeAverage     types.EmptyOr[decimal.Decimal]                                                         `json:"averageVolume,omitempty"`
	CompanyName       types.EmptyOr[string]                                                                  `json:"companyName,omitempty"`
	Currency          types.EmptyOr[string]                                                                  `json:"currency,omitempty"`
	Cik               types.EmptyOr[string]                                                                  `json:"cik,omitempty"`
	Isin              types.EmptyOr[string]                                                                  `json:"isin,omitempty"`
	Cusip             types.EmptyOr[string]                                                                  `json:"cusip,omitempty"`
	ExchangeFullName  string                                                                                 `json:"exchangeFullName,omitempty"`
	ExchangeShortName string                                                                                 `json:"exchange,omitempty"`
	Industry          types.EmptyOr[string]                                                                  `json:"industry,omitempty"`
	Website           types.EmptyOr[string]                                                                  `json:"website,omitempty"`
	Description       types.EmptyOr[string]                                                                  `json:"description,omitempty"`
	Ceo               types.EmptyOr[string]                                                                  `json:"ceo,omitempty"`
	Sector            types.EmptyOr[string]                                                                  `json:"sector,omitempty"`
	Country           types.EmptyOr[string]                                                                  `json:"country,omitempty"`
	FullTimeEmployees types.EmptyOr[IgnoreUnmarshalFailure[types.ThousandSeparatedNumeric[decimal.Decimal]]] `json:"fullTimeEmployees,omitempty"`
	Phone             types.EmptyOr[string]                                                                  `json:"phone,omitempty"`
	Address           types.EmptyOr[string]                                                                  `json:"address,omitempty"`
	City              types.EmptyOr[string]                                                                  `json:"city,omitempty"`
	State             types.EmptyOr[string]                                                                  `json:"state,omitempty"`
	Zip               types.EmptyOr[string]                                                                  `json:"zip,omitempty"`
	Image             types.EmptyOr[string]                                                                  `json:"image,omitempty"`
	IpoDate           types.EmptyOr[types.Date]                                                              `json:"ipoDate,omitempty"`
	DefaultImage      types.Bool                                                                             `json:"defaultImage"`
	IsEtf             types.Bool                                                                             `json:"isEtf"`
	IsActivelyTrading types.Bool                                                                             `json:"isActivelyTrading"`
	IsAdr             types.Bool                                                                             `json:"isAdr"`
	IsFund            types.Bool                                                                             `json:"isFund"`
}

func ParseCompanyProfileCSVRecord

func ParseCompanyProfileCSVRecord(header []string, record []string) (*BulkCompanyProfileResponse, error)

type BulkGetCompanyProfilesParams

type BulkGetCompanyProfilesParams struct {
	Part int `query:"part,required" validate:"gte=0"`
}

type BulkPriceEOD added in v0.9.2

type BulkPriceEOD struct {
	Symbol   string          `json:"symbol"`
	Date     types.Date      `json:"date"`
	Open     decimal.Decimal `json:"open"`
	Low      decimal.Decimal `json:"low"`
	High     decimal.Decimal `json:"high"`
	Close    decimal.Decimal `json:"close"`
	AdjClose decimal.Decimal `json:"adjClose"`
	Volume   decimal.Decimal `json:"volume"`
}

type CashFlowStatement added in v0.9.5

type CashFlowStatement struct {
	Date                                   types.Date      `json:"date"`
	Symbol                                 string          `json:"symbol"`
	ReportedCurrency                       string          `json:"reportedCurrency"`
	Cik                                    string          `json:"cik"`
	FilingDate                             types.Date      `json:"filingDate"`
	AcceptedDateTime                       types.DateTime  `json:"acceptedDate"`
	FiscalYear                             string          `json:"fiscalYear"`
	Period                                 FinancialPeriod `json:"period"`
	NetIncome                              decimal.Decimal `json:"netIncome"`
	DepreciationAndAmortization            decimal.Decimal `json:"depreciationAndAmortization"`
	DeferredIncomeTax                      decimal.Decimal `json:"deferredIncomeTax"`
	StockBasedCompensation                 decimal.Decimal `json:"stockBasedCompensation"`
	ChangeInWorkingCapital                 decimal.Decimal `json:"changeInWorkingCapital"`
	AccountsReceivables                    decimal.Decimal `json:"accountsReceivables"`
	Inventory                              decimal.Decimal `json:"inventory"`
	AccountsPayables                       decimal.Decimal `json:"accountsPayables"`
	OtherWorkingCapital                    decimal.Decimal `json:"otherWorkingCapital"`
	OtherNonCashItems                      decimal.Decimal `json:"otherNonCashItems"`
	NetCashProvidedByOperatingActivities   decimal.Decimal `json:"netCashProvidedByOperatingActivities"`
	InvestmentsInPropertyPlantAndEquipment decimal.Decimal `json:"investmentsInPropertyPlantAndEquipment"`
	AcquisitionsNet                        decimal.Decimal `json:"acquisitionsNet"`
	PurchasesOfInvestments                 decimal.Decimal `json:"purchasesOfInvestments"`
	SalesMaturitiesOfInvestments           decimal.Decimal `json:"salesMaturitiesOfInvestments"`
	OtherInvestingActivities               decimal.Decimal `json:"otherInvestingActivities"`
	NetCashProvidedByInvestingActivities   decimal.Decimal `json:"netCashProvidedByInvestingActivities"`
	NetDebtIssuance                        decimal.Decimal `json:"netDebtIssuance"`
	LongTermNetDebtIssuance                decimal.Decimal `json:"longTermNetDebtIssuance"`
	ShortTermNetDebtIssuance               decimal.Decimal `json:"shortTermNetDebtIssuance"`
	NetStockIssuance                       decimal.Decimal `json:"netStockIssuance"`
	NetCommonStockIssuance                 decimal.Decimal `json:"netCommonStockIssuance"`
	CommonStockIssuance                    decimal.Decimal `json:"commonStockIssuance"`
	CommonStockRepurchased                 decimal.Decimal `json:"commonStockRepurchased"`
	NetPreferredStockIssuance              decimal.Decimal `json:"netPreferredStockIssuance"`
	NetDividendsPaid                       decimal.Decimal `json:"netDividendsPaid"`
	CommonDividendsPaid                    decimal.Decimal `json:"commonDividendsPaid"`
	PreferredDividendsPaid                 decimal.Decimal `json:"preferredDividendsPaid"`
	OtherFinancingActivities               decimal.Decimal `json:"otherFinancingActivities"`
	NetCashProvidedByFinancingActivities   decimal.Decimal `json:"netCashProvidedByFinancingActivities"`
	EffectOfForexChangesOnCash             decimal.Decimal `json:"effectOfForexChangesOnCash"`
	NetChangeInCash                        decimal.Decimal `json:"netChangeInCash"`
	CashAtEndOfPeriod                      decimal.Decimal `json:"cashAtEndOfPeriod"`
	CashAtBeginningOfPeriod                decimal.Decimal `json:"cashAtBeginningOfPeriod"`
	OperatingCashFlow                      decimal.Decimal `json:"operatingCashFlow"`
	CapitalExpenditure                     decimal.Decimal `json:"capitalExpenditure"`
	FreeCashFlow                           decimal.Decimal `json:"freeCashFlow"`
	IncomeTaxesPaid                        decimal.Decimal `json:"incomeTaxesPaid"`
	InterestPaid                           decimal.Decimal `json:"interestPaid"`
}

type Exchange added in v0.8.3

type Exchange struct {
	Exchange     string  `json:"exchange" validate:"required"`
	Name         string  `json:"name" validate:"required"`
	SymbolSuffix string  `json:"symbolSuffix"`
	CountryName  *string `json:"countryName"`
	CountryCode  *string `json:"countryCode"`
	Delay        *string `json:"delay"`
}

func (*Exchange) UnmarshalJSON added in v0.8.3

func (e *Exchange) UnmarshalJSON(b []byte) error

type ExchangeTradingHours added in v0.7.1

type ExchangeTradingHours struct {
	Exchange     string         `json:"name"`
	OpeningHour  types.TimeHHMM `json:"open"`
	ClosingHour  types.TimeHHMM `json:"close"`
	TimeZone     string         `json:"timezone"`
	IsMarketOpen bool           `json:"isMarketOpen"`
}

func (*ExchangeTradingHours) UnmarshalJSON added in v0.7.1

func (e *ExchangeTradingHours) UnmarshalJSON(data []byte) error

type FMPArticle added in v0.10.0

type FMPArticle struct {
	Ticker  string         `json:"ticker"`
	Date    types.DateTime `json:"date"`
	Title   string         `json:"title"`
	Image   string         `json:"image"`
	Site    string         `json:"site"`
	Content string         `json:"content"`
	Author  string         `json:"author"`
	Link    string         `json:"link"`
}

type FinancialDisclosure added in v0.9.0

type FinancialDisclosure struct {
	Symbol           string                         `json:"symbol"`
	Type             FinancialDisclosureType        `json:"type"`
	DisclosureDate   types.Date                     `json:"disclosureDate"`
	TransactionDate  types.Date                     `json:"transactionDate"`
	FirstName        string                         `json:"firstName"`
	LastName         string                         `json:"lastName"`
	Office           types.EmptyOr[string]          `json:"office"`
	District         types.EmptyOr[string]          `json:"district"`
	Owner            types.EmptyOr[string]          `json:"owner"`
	AssetDescription string                         `json:"assetDescription"`
	AssetType        string                         `json:"assetType"`
	Amount           FinancialDisclosureRangeAmount `json:"amount"`
	Comment          types.EmptyOr[string]          `json:"comment"`
	Link             string                         `json:"link"`
}

type FinancialDisclosureRangeAmount added in v0.9.0

type FinancialDisclosureRangeAmount struct {
	Range string
	Min   decimal.Decimal
	Max   decimal.Decimal
}

func (FinancialDisclosureRangeAmount) MarshalJSON added in v0.9.0

func (r FinancialDisclosureRangeAmount) MarshalJSON() ([]byte, error)

func (FinancialDisclosureRangeAmount) String added in v0.9.0

func (*FinancialDisclosureRangeAmount) UnmarshalJSON added in v0.9.0

func (r *FinancialDisclosureRangeAmount) UnmarshalJSON(data []byte) error

type FinancialDisclosureType added in v0.9.0

type FinancialDisclosureType string
const (
	FinancialDisclosureTypePurchase    FinancialDisclosureType = "Purchase"
	FinancialDisclosureTypeSale        FinancialDisclosureType = "Sale"
	FinancialDisclosureTypeFullSale    FinancialDisclosureType = "Sale (Full)"
	FinancialDisclosureTypePartialSale FinancialDisclosureType = "Sale (Partial)"
)

func (FinancialDisclosureType) IsValid added in v0.9.3

func (fdt FinancialDisclosureType) IsValid() bool

type FinancialKeyMetrics added in v0.8.2

type FinancialKeyMetrics struct {
	Symbol                                 string          `json:"symbol"`
	MarketCap                              decimal.Decimal `json:"marketCap"`
	EnterpriseValue                        decimal.Decimal `json:"enterpriseValueTTM"`
	EvToSales                              decimal.Decimal `json:"evToSalesTTM"`
	EvToOperatingCashFlow                  decimal.Decimal `json:"evToOperatingCashFlowTTM"`
	EvToFreeCashFlow                       decimal.Decimal `json:"evToFreeCashFlowTTM"`
	EnterpriseValueOverEBITDA              decimal.Decimal `json:"evToEBITDATTM"`
	NetDebtToEBITDA                        decimal.Decimal `json:"netDebtToEBITDATTM"`
	CurrentRatio                           decimal.Decimal `json:"currentRatioTTM"`
	IncomeQuality                          decimal.Decimal `json:"incomeQualityTTM"`
	GrahamNumber                           decimal.Decimal `json:"grahamNumberTTM"`
	GrahamNetNet                           decimal.Decimal `json:"grahamNetNetTTM"`
	TaxBurden                              decimal.Decimal `json:"taxBurdenTTM"`
	InterestBurden                         decimal.Decimal `json:"interestBurdenTTM"`
	WorkingCapital                         decimal.Decimal `json:"workingCapitalTTM"`
	InvestedCapital                        decimal.Decimal `json:"investedCapitalTTM"`
	ReturnOnAssets                         decimal.Decimal `json:"returnOnAssetsTTM"`
	OperatingReturnOnAssets                decimal.Decimal `json:"operatingReturnOnAssetsTTM"`
	ReturnOnTangibleAssets                 decimal.Decimal `json:"returnOnTangibleAssetsTTM"`
	ReturnOnEquity                         decimal.Decimal `json:"returnOnEquityTTM"`
	ReturnOnInvestedCapital                decimal.Decimal `json:"returnOnInvestedCapitalTTM"`
	ReturnOnCapitalEmployed                decimal.Decimal `json:"returnOnCapitalEmployedTTM"`
	EarningsYield                          decimal.Decimal `json:"earningsYieldTTM"`
	FreeCashFlowYield                      decimal.Decimal `json:"freeCashFlowYieldTTM"`
	CapexToOperatingCashFlow               decimal.Decimal `json:"capexToOperatingCashFlowTTM"`
	CapexToDepreciation                    decimal.Decimal `json:"capexToDepreciationTTM"`
	CapexToRevenue                         decimal.Decimal `json:"capexToRevenueTTM"`
	SalesGeneralAndAdministrativeToRevenue decimal.Decimal `json:"salesGeneralAndAdministrativeToRevenueTTM"`
	ResearchAndDevelopmentToRevenue        decimal.Decimal `json:"researchAndDevelopementToRevenueTTM"`
	StockBasedCompensationToRevenue        decimal.Decimal `json:"stockBasedCompensationToRevenueTTM"`
	IntangiblesToTotalAssets               decimal.Decimal `json:"intangiblesToTotalAssetsTTM"`
	AverageReceivables                     decimal.Decimal `json:"averageReceivablesTTM"`
	AveragePayables                        decimal.Decimal `json:"averagePayablesTTM"`
	AverageInventory                       decimal.Decimal `json:"averageInventoryTTM"`
	DaysSalesOutstanding                   decimal.Decimal `json:"daysOfSalesOutstandingTTM"`
	DaysPayablesOutstanding                decimal.Decimal `json:"daysOfPayablesOutstandingTTM"`
	DaysOfInventoryOnHand                  decimal.Decimal `json:"daysOfInventoryOutstandingTTM"`
	OperatingCycle                         decimal.Decimal `json:"operatingCycleTTM"`
	CashConversionCycle                    decimal.Decimal `json:"cashConversionCycleTTM"`
	FreeCashFlowToEquity                   decimal.Decimal `json:"freeCashFlowToEquityTTM"`
	FreeCashFlowToFirm                     decimal.Decimal `json:"freeCashFlowToFirmTTM"`
	TangibleAssetValue                     decimal.Decimal `json:"tangibleAssetValueTTM"`
	NetCurrentAssetValue                   decimal.Decimal `json:"netCurrentAssetValueTTM"`
}

type FinancialKeyMetricsTTM added in v0.8.2

type FinancialKeyMetricsTTM = FinancialKeyMetrics

type FinancialPeriod added in v0.9.5

type FinancialPeriod string
const (
	FinancialPeriodQ1      FinancialPeriod = "Q1"
	FinancialPeriodQ2      FinancialPeriod = "Q2"
	FinancialPeriodQ3      FinancialPeriod = "Q3"
	FinancialPeriodQ4      FinancialPeriod = "Q4"
	FinancialPeriodFY      FinancialPeriod = "FY"
	FinancialPeriodAnnual  FinancialPeriod = "annual"
	FinancialPeriodQuarter FinancialPeriod = "quarter"
)

type FinancialRatiosTTM added in v0.8.2

type FinancialRatiosTTM struct {
	Symbol string `json:"symbol"`

	// Margin ratios
	GrossProfitMarginTTM                decimal.Decimal `json:"grossProfitMarginTTM"`
	EbitMarginTTM                       decimal.Decimal `json:"ebitMarginTTM"`
	EbitdaMarginTTM                     decimal.Decimal `json:"ebitdaMarginTTM"`
	OperatingProfitMarginTTM            decimal.Decimal `json:"operatingProfitMarginTTM"`
	PretaxProfitMarginTTM               decimal.Decimal `json:"pretaxProfitMarginTTM"`
	ContinuousOperationsProfitMarginTTM decimal.Decimal `json:"continuousOperationsProfitMarginTTM"`
	NetProfitMarginTTM                  decimal.Decimal `json:"netProfitMarginTTM"`
	BottomLineProfitMarginTTM           decimal.Decimal `json:"bottomLineProfitMarginTTM"`

	// Activity/Turnover ratios
	ReceivablesTurnoverTTM         decimal.Decimal `json:"receivablesTurnoverTTM"`
	PayablesTurnoverTTM            decimal.Decimal `json:"payablesTurnoverTTM"`
	InventoryTurnoverTTM           decimal.Decimal `json:"inventoryTurnoverTTM"`
	FixedAssetTurnoverTTM          decimal.Decimal `json:"fixedAssetTurnoverTTM"`
	AssetTurnoverTTM               decimal.Decimal `json:"assetTurnoverTTM"`
	WorkingCapitalTurnoverRatioTTM decimal.Decimal `json:"workingCapitalTurnoverRatioTTM"`

	// Liquidity ratios
	CurrentRatioTTM  decimal.Decimal `json:"currentRatioTTM"`
	QuickRatioTTM    decimal.Decimal `json:"quickRatioTTM"`
	SolvencyRatioTTM decimal.Decimal `json:"solvencyRatioTTM"`
	CashRatioTTM     decimal.Decimal `json:"cashRatioTTM"`

	// Valuation ratios
	PriceToEarningsRatioTTM              decimal.Decimal `json:"priceToEarningsRatioTTM"`
	PriceToEarningsGrowthRatioTTM        decimal.Decimal `json:"priceToEarningsGrowthRatioTTM"`
	ForwardPriceToEarningsGrowthRatioTTM decimal.Decimal `json:"forwardPriceToEarningsGrowthRatioTTM"`
	PriceToBookRatioTTM                  decimal.Decimal `json:"priceToBookRatioTTM"`
	PriceToSalesRatioTTM                 decimal.Decimal `json:"priceToSalesRatioTTM"`
	PriceToFreeCashFlowRatioTTM          decimal.Decimal `json:"priceToFreeCashFlowRatioTTM"`
	PriceToOperatingCashFlowRatioTTM     decimal.Decimal `json:"priceToOperatingCashFlowRatioTTM"`
	PriceToFairValueTTM                  decimal.Decimal `json:"priceToFairValueTTM"`

	// Debt ratios
	DebtToAssetsRatioTTM          decimal.Decimal `json:"debtToAssetsRatioTTM"`
	DebtToEquityRatioTTM          decimal.Decimal `json:"debtToEquityRatioTTM"`
	DebtToCapitalRatioTTM         decimal.Decimal `json:"debtToCapitalRatioTTM"`
	LongTermDebtToCapitalRatioTTM decimal.Decimal `json:"longTermDebtToCapitalRatioTTM"`
	FinancialLeverageRatioTTM     decimal.Decimal `json:"financialLeverageRatioTTM"`
	DebtToMarketCapTTM            decimal.Decimal `json:"debtToMarketCapTTM"`

	// Cash flow ratios
	OperatingCashFlowRatioTTM                  decimal.Decimal `json:"operatingCashFlowRatioTTM"`
	OperatingCashFlowSalesRatioTTM             decimal.Decimal `json:"operatingCashFlowSalesRatioTTM"`
	FreeCashFlowOperatingCashFlowRatioTTM      decimal.Decimal `json:"freeCashFlowOperatingCashFlowRatioTTM"`
	DebtServiceCoverageRatioTTM                decimal.Decimal `json:"debtServiceCoverageRatioTTM"`
	InterestCoverageRatioTTM                   decimal.Decimal `json:"interestCoverageRatioTTM"`
	ShortTermOperatingCashFlowCoverageRatioTTM decimal.Decimal `json:"shortTermOperatingCashFlowCoverageRatioTTM"`
	OperatingCashFlowCoverageRatioTTM          decimal.Decimal `json:"operatingCashFlowCoverageRatioTTM"`
	CapitalExpenditureCoverageRatioTTM         decimal.Decimal `json:"capitalExpenditureCoverageRatioTTM"`

	// Dividend ratios
	DividendPaidAndCapexCoverageRatioTTM decimal.Decimal `json:"dividendPaidAndCapexCoverageRatioTTM"`
	DividendPayoutRatioTTM               decimal.Decimal `json:"dividendPayoutRatioTTM"`
	DividendYieldTTM                     decimal.Decimal `json:"dividendYieldTTM"`

	// Enterprise Value and other metrics
	EnterpriseValueTTM         decimal.Decimal `json:"enterpriseValueTTM"`
	EnterpriseValueMultipleTTM decimal.Decimal `json:"enterpriseValueMultipleTTM"`

	// Per share metrics
	RevenuePerShareTTM            decimal.Decimal `json:"revenuePerShareTTM"`
	NetIncomePerShareTTM          decimal.Decimal `json:"netIncomePerShareTTM"`
	InterestDebtPerShareTTM       decimal.Decimal `json:"interestDebtPerShareTTM"`
	CashPerShareTTM               decimal.Decimal `json:"cashPerShareTTM"`
	BookValuePerShareTTM          decimal.Decimal `json:"bookValuePerShareTTM"`
	TangibleBookValuePerShareTTM  decimal.Decimal `json:"tangibleBookValuePerShareTTM"`
	ShareholdersEquityPerShareTTM decimal.Decimal `json:"shareholdersEquityPerShareTTM"`
	OperatingCashFlowPerShareTTM  decimal.Decimal `json:"operatingCashFlowPerShareTTM"`
	CapexPerShareTTM              decimal.Decimal `json:"capexPerShareTTM"`
	FreeCashFlowPerShareTTM       decimal.Decimal `json:"freeCashFlowPerShareTTM"`

	// Other ratios
	NetIncomePerEBTTTM  decimal.Decimal `json:"netIncomePerEBTTTM"`
	EbtPerEbitTTM       decimal.Decimal `json:"ebtPerEbitTTM"`
	EffectiveTaxRateTTM decimal.Decimal `json:"effectiveTaxRateTTM"`
}

type GetAdvancedDCFParams added in v0.12.0

type GetAdvancedDCFParams struct {
	Symbol string `query:"symbol,required"`

	// Financial Metrics
	RevenueGrowthPct               *decimal.Decimal `query:"revenueGrowthPct,omitempty"`
	EBITDAPct                      *decimal.Decimal `query:"ebitdaPct,omitempty"`
	EBITPct                        *decimal.Decimal `query:"ebitPct,omitempty"`
	DepreciationAndAmortizationPct *decimal.Decimal `query:"depreciationAndAmortizationPct,omitempty"`
	CashAndShortTermInvestmentsPct *decimal.Decimal `query:"cashAndShortTermInvestmentsPct,omitempty"`
	ReceivablesPct                 *decimal.Decimal `query:"receivablesPct,omitempty"`
	InventoriesPct                 *decimal.Decimal `query:"inventoriesPct,omitempty"`
	PayablePct                     *decimal.Decimal `query:"payablePct,omitempty"`
	CapitalExpenditurePct          *decimal.Decimal `query:"capitalExpenditurePct,omitempty"`
	OperatingCashFlowPct           *decimal.Decimal `query:"operatingCashFlowPct,omitempty"`

	// Valuation Assumptions
	SellingGeneralAndAdministrativeExpensesPct *decimal.Decimal `query:"sellingGeneralAndAdministrativeExpensesPct,omitempty"`
	TaxRate                                    *decimal.Decimal `query:"taxRate,omitempty"`
	LongTermGrowthRate                         *decimal.Decimal `query:"longTermGrowthRate,omitempty"`
	CostOfDebt                                 *decimal.Decimal `query:"costOfDebt,omitempty"`
	CostOfEquity                               *decimal.Decimal `query:"costOfEquity,omitempty"`
	MarketRiskPremium                          *decimal.Decimal `query:"marketRiskPremium,omitempty"`
	Beta                                       *decimal.Decimal `query:"beta,omitempty"`
	RiskFreeRate                               *decimal.Decimal `query:"riskFreeRate,omitempty"`
}

type GetAdvancedDCFResponse added in v0.12.0

type GetAdvancedDCFResponse struct {
	Year                         string          `json:"year"`
	Symbol                       string          `json:"symbol"`
	Revenue                      decimal.Decimal `json:"revenue"`
	RevenuePercentage            decimal.Decimal `json:"revenuePercentage"`
	EBITDA                       decimal.Decimal `json:"ebitda"`
	EBITDAPercentage             decimal.Decimal `json:"ebitdaPercentage"`
	EBIT                         decimal.Decimal `json:"ebit"`
	EBITPercentage               decimal.Decimal `json:"ebitPercentage"`
	Depreciation                 decimal.Decimal `json:"depreciation"`
	DepreciationPercentage       decimal.Decimal `json:"depreciationPercentage"`
	TotalCash                    decimal.Decimal `json:"totalCash"`
	TotalCashPercentage          decimal.Decimal `json:"totalCashPercentage"`
	Receivables                  decimal.Decimal `json:"receivables"`
	ReceivablesPercentage        decimal.Decimal `json:"receivablesPercentage"`
	Inventories                  decimal.Decimal `json:"inventories"`
	InventoriesPercentage        decimal.Decimal `json:"inventoriesPercentage"`
	Payable                      decimal.Decimal `json:"payable"`
	PayablePercentage            decimal.Decimal `json:"payablePercentage"`
	CapitalExpenditure           decimal.Decimal `json:"capitalExpenditure"`
	CapitalExpenditurePercentage decimal.Decimal `json:"capitalExpenditurePercentage"`
	Price                        decimal.Decimal `json:"price"`
	Beta                         decimal.Decimal `json:"beta"`
	DilutedSharesOutstanding     decimal.Decimal `json:"dilutedSharesOutstanding"`
	CostOfDebt                   decimal.Decimal `json:"costofDebt"`
	TaxRate                      decimal.Decimal `json:"taxRate"`
	AfterTaxCostOfDebt           decimal.Decimal `json:"afterTaxCostOfDebt"`
	RiskFreeRate                 decimal.Decimal `json:"riskFreeRate"`
	MarketRiskPremium            decimal.Decimal `json:"marketRiskPremium"`
	CostOfEquity                 decimal.Decimal `json:"costOfEquity"`
	TotalDebt                    decimal.Decimal `json:"totalDebt"`
	TotalEquity                  decimal.Decimal `json:"totalEquity"`
	TotalCapital                 decimal.Decimal `json:"totalCapital"`
	DebtWeighting                decimal.Decimal `json:"debtWeighting"`
	EquityWeighting              decimal.Decimal `json:"equityWeighting"`
	WACC                         decimal.Decimal `json:"wacc"`
	TaxRateCash                  decimal.Decimal `json:"taxRateCash"`
	EBIAT                        decimal.Decimal `json:"ebiat"`
	UFCF                         decimal.Decimal `json:"ufcf"`
	SumPvUFCF                    decimal.Decimal `json:"sumPvUfcf"`
	LongTermGrowthRate           decimal.Decimal `json:"longTermGrowthRate"`
	TerminalValue                decimal.Decimal `json:"terminalValue"`
	PresentTerminalValue         decimal.Decimal `json:"presentTerminalValue"`
	EnterpriseValue              decimal.Decimal `json:"enterpriseValue"`
	NetDebt                      decimal.Decimal `json:"netDebt"`
	EquityValue                  decimal.Decimal `json:"equityValue"`
	EquityValuePerShare          decimal.Decimal `json:"equityValuePerShare"`
	FreeCashFlowT1               decimal.Decimal `json:"freeCashFlowT1"`
}

type GetAllExchangesTradingHoursResponse added in v0.8.0

type GetAllExchangesTradingHoursResponse []ExchangeTradingHours

type GetAvailableExchangesResponse added in v0.8.3

type GetAvailableExchangesResponse = []Exchange

type GetBalanceSheetsParams added in v0.9.5

type GetBalanceSheetsParams struct {
	Symbol string          `query:"symbol,required"`
	Limit  int             `query:"limit,omitempty" validate:"gte=1,lte=120"`
	Period FinancialPeriod `query:"period,omitempty" validate:"oneof=Q1 Q2 Q3 Q4 FY annual quarter"`
}

type GetBalanceSheetsResponse added in v0.9.5

type GetBalanceSheetsResponse = []BalanceSheet

type GetBulkPriceEODParams added in v0.9.2

type GetBulkPriceEODParams struct {
	Date types.Date `query:"date,required"`
}

type GetBulkPriceEODResponse added in v0.9.2

type GetBulkPriceEODResponse = []BulkPriceEOD

type GetCashFlowStatementsParams added in v0.9.5

type GetCashFlowStatementsParams struct {
	Symbol string          `query:"symbol,required"`
	Limit  int             `query:"limit,omitempty" validate:"gte=1,lte=120"`
	Period FinancialPeriod `query:"period,omitempty" validate:"oneof=Q1 Q2 Q3 Q4 FY annual quarter"`
}

type GetCashFlowStatementsResponse added in v0.9.5

type GetCashFlowStatementsResponse = []CashFlowStatement

type GetCompanyProfileParams

type GetCompanyProfileParams struct {
	Symbol string `query:"symbol,required"`
}

type GetCompanyProfileResponse

type GetCompanyProfileResponse struct {
	Symbol            string           `json:"symbol"`
	Price             *decimal.Decimal `json:"price,omitempty"`
	Beta              *decimal.Decimal `json:"beta,omitempty"`
	MarketCap         *decimal.Decimal `json:"marketCap,omitempty"`
	LastDividend      *decimal.Decimal `json:"lastDividend,omitempty"`
	Range             *types.Range52w  `json:"range,omitempty"`
	Change            *decimal.Decimal `json:"change,omitempty"`
	ChangePercentage  *decimal.Decimal `json:"changePercentage,omitempty"`
	CompanyName       *string          `json:"companyName,omitempty"`
	Currency          *string          `json:"currency,omitempty"`
	Cik               *string          `json:"cik,omitempty"`
	Isin              *string          `json:"isin,omitempty"`
	Cusip             *string          `json:"cusip,omitempty"`
	ExchangeFullName  string           `json:"exchangeFullName"`
	ExchangeShortName string           `json:"exchangeShortName"`
	Industry          *string          `json:"industry,omitempty"`
	Website           *string          `json:"website,omitempty"`
	Description       *string          `json:"description,omitempty"`
	Ceo               *string          `json:"ceo,omitempty"`
	Sector            *string          `json:"sector,omitempty"`
	Country           *string          `json:"country,omitempty"`
	FullTimeEmployees *decimal.Decimal `json:"fullTimeEmployees,omitempty"`
	Phone             *string          `json:"phone,omitempty"`
	Address           *string          `json:"address,omitempty"`
	City              *string          `json:"city,omitempty"`
	State             *string          `json:"state,omitempty"`
	Zip               *string          `json:"zip,omitempty"`
	DcfDiff           *decimal.Decimal `json:"dcfDiff,omitempty"`
	Dcf               *decimal.Decimal `json:"dcf,omitempty"`
	Image             *string          `json:"image,omitempty"`
	IpoDate           *types.Date      `json:"ipoDate,omitempty"`
	DefaultImage      types.Bool       `json:"defaultImage"`
	IsEtf             types.Bool       `json:"isEtf"`
	IsActivelyTrading types.Bool       `json:"isActivelyTrading"`
	IsAdr             types.Bool       `json:"isAdr"`
	IsFund            types.Bool       `json:"isFund"`
	Volume            *decimal.Decimal `json:"volume,omitempty"`
	VolumeAverage     *decimal.Decimal `json:"averageVolume,omitempty"`
}

type GetCompanyProfilesParams added in v0.8.0

type GetCompanyProfilesParams struct {
	Symbols string `path:"symbols,required"`
}

type GetEarningsCalendarParams

type GetEarningsCalendarParams struct {
	Since *types.Date `query:"since"`
	Until *types.Date `query:"until"`
}

type GetEarningsCalendarResponse

type GetEarningsCalendarResponse struct {
	Date             types.Date       `json:"date"`
	Symbol           string           `json:"symbol"`
	EPS              *decimal.Decimal `json:"eps"`
	EPSEstimated     *decimal.Decimal `json:"epsEstimated"`
	MarketTime       string           `json:"time"`
	Revenue          *decimal.Decimal `json:"revenue"`
	RevenueEstimated *decimal.Decimal `json:"revenueEstimated"`
	FiscalDateEnding types.Date       `json:"fiscalDateEnding"`
	UpdatedFromDate  types.Date       `json:"updatedFromDate"`
}

type GetExchangeHolidaysParams added in v0.7.1

type GetExchangeHolidaysParams struct {
	Exchange string `query:"exchange"`
	Year     int
}

type GetExchangeHolidaysResponse added in v0.7.1

type GetExchangeHolidaysResponse []Holiday

type GetFMPArticlesParams added in v0.10.0

type GetFMPArticlesParams struct {
	Page  *uint `query:"page"`
	Limit *uint `query:"limit"`
}

type GetFMPArticlesResponse added in v0.10.0

type GetFMPArticlesResponse []FMPArticle

type GetFinancialKeyMetricsTTMParams added in v0.8.2

type GetFinancialKeyMetricsTTMParams struct {
	Symbol string `query:"symbol,required"`
}

type GetFinancialKeyMetricsTTMResponse added in v0.8.2

type GetFinancialKeyMetricsTTMResponse = *FinancialKeyMetricsTTM

type GetFinancialRatiosTTMParams added in v0.8.2

type GetFinancialRatiosTTMParams struct {
	Symbol string `query:"symbol,required"`
}

type GetFinancialRatiosTTMResponse added in v0.8.2

type GetFinancialRatiosTTMResponse = *FinancialRatiosTTM

type GetGainersResponse added in v0.8.0

type GetGainersResponse = []PartialTicker

type GetHistoricalBarsParams added in v0.8.0

type GetHistoricalBarsParams struct {
	Timeframe Timeframe  `path:"timeframe,required"`
	Symbol    string     `query:"symbol,required"`
	Since     types.Date `query:"from,omitempty"`
	Until     types.Date `query:"to,omitempty"`
}

type GetHistoricalBarsResponse added in v0.8.0

type GetHistoricalBarsResponse = []Bar

type GetHistoricalEarningsCalendarParams

type GetHistoricalEarningsCalendarParams struct {
	Symbol string      `path:"symbol"`
	Since  *types.Date `query:"since"`
	Until  *types.Date `query:"until"`
}

type GetHistoricalMarketCapParams added in v0.8.0

type GetHistoricalMarketCapParams struct {
	Symbol string     `query:"symbol,required"`
	Since  types.Date `query:"from,omitempty"`
	Until  types.Date `query:"to,omitempty"`
}

type GetHistoricalMarketCapResponse added in v0.8.0

type GetHistoricalMarketCapResponse []HistoricalMarketCap

type GetHistoricalPricesEODParams added in v0.8.0

type GetHistoricalPricesEODParams struct {
	Symbol string     `query:"symbol,required"`
	Since  types.Date `query:"from,omitempty"`
	Until  types.Date `query:"to,omitempty"`
}

type GetHistoricalPricesEODResponse added in v0.8.0

type GetHistoricalPricesEODResponse = []HistoricalPriceEOD

type GetHouseFinancialDisclosuresParams added in v0.9.0

type GetHouseFinancialDisclosuresParams struct {
	Limit *int  `query:"limit" validate:"omitempty,min=1,max=250"`
	Page  *uint `query:"page"  validate:"omitempty,min=0,max=100"`
}

type GetHouseFinancialDisclosuresResponse added in v0.9.0

type GetHouseFinancialDisclosuresResponse []FinancialDisclosure

type GetIncomeStatementsParams added in v0.9.5

type GetIncomeStatementsParams struct {
	Symbol string          `query:"symbol,required"`
	Limit  int             `query:"limit,omitempty" validate:"gte=1,lte=120"`
	Period FinancialPeriod `query:"period,omitempty" validate:"oneof=Q1 Q2 Q3 Q4 FY annual quarter"`
}

type GetIncomeStatementsResponse added in v0.9.5

type GetIncomeStatementsResponse = []IncomeStatement

type GetIndexConstituentsResponse added in v0.8.0

type GetIndexConstituentsResponse = []IndexConstituent

type GetInsiderTradesParams added in v0.8.0

type GetInsiderTradesParams struct {
	Date *types.Date `query:"date,omitempty"`
	Page *uint       `query:"page,omitempty"`
}

type GetInsiderTradesResponse added in v0.8.0

type GetInsiderTradesResponse []InsiderTrade

type GetLatestNewsParams added in v0.11.0

type GetLatestNewsParams struct {
	Since *types.Date `query:"from"`
	Until *types.Date `query:"to"`
	Page  *uint       `query:"page"`
	Limit *uint       `query:"limit"`
}

type GetLosersResponse added in v0.8.0

type GetLosersResponse = []PartialTicker

type GetMostActiveTickersResponse added in v0.8.0

type GetMostActiveTickersResponse = []PartialTicker

type GetNewsParams added in v0.10.0

type GetNewsParams struct {
	Symbols string      `query:"symbols"`
	Since   *types.Date `query:"from"`
	Until   *types.Date `query:"to"`
	Page    *uint       `query:"page"`
	Limit   *uint       `query:"limit"`
}

type GetNewsResponse added in v0.10.0

type GetNewsResponse []NewsArticle

type GetPriceChangeParams

type GetPriceChangeParams struct {
	Symbol string `query:"symbol,required"`
}

type GetPriceChangeResponse

type GetPriceChangeResponse struct {
	Symbol    string          `json:"symbol"`
	Change1D  decimal.Decimal `json:"1D"`
	Change5D  decimal.Decimal `json:"5D"`
	Change1M  decimal.Decimal `json:"1M"`
	Change3M  decimal.Decimal `json:"3M"`
	Change6M  decimal.Decimal `json:"6M"`
	Change1Y  decimal.Decimal `json:"1Y"`
	Change3Y  decimal.Decimal `json:"2Y"`
	Change5Y  decimal.Decimal `json:"5Y"`
	Change10Y decimal.Decimal `json:"10Y"`
	ChangeYTD decimal.Decimal `json:"ytd"`
	ChangeMax decimal.Decimal `json:"max"`
}

type GetQuoteParams added in v0.8.0

type GetQuoteParams struct {
	Symbol string `query:"symbol,required"`
}

type GetQuoteResponse added in v0.8.0

type GetQuoteResponse = TickerPrice

type GetSECFilingsRSSFeedParams added in v0.8.0

type GetSECFilingsRSSFeedParams struct {
	Type  SECFormType `query:"type" validate:"required"`
	Since *types.Date `query:"from,omitempty"`
	Until *types.Date `query:"to,omitempty"`
	Limit *uint       `query:"limit,omitempty"`
}

type GetSECFilingsRSSFeedResponse added in v0.8.0

type GetSECFilingsRSSFeedResponse []SECFiling

type GetSenateFinancialDisclosuresParams added in v0.9.0

type GetSenateFinancialDisclosuresParams struct {
	Limit *int  `query:"limit" validate:"omitempty,min=1,max=250"`
	Page  *uint `query:"page"  validate:"omitempty,min=0,max=100"`
}

type GetSenateFinancialDisclosuresResponse added in v0.9.0

type GetSenateFinancialDisclosuresResponse []FinancialDisclosure

type HistoricalMarketCap added in v0.7.3

type HistoricalMarketCap struct {
	Symbol string          `json:"symbol"`
	Date   types.Date      `json:"date"`
	Value  decimal.Decimal `json:"marketCap"`
}

type HistoricalPriceEOD added in v0.7.3

type HistoricalPriceEOD struct {
	Symbol        string          `json:"symbol"`
	Date          types.Date      `json:"date"`
	Open          decimal.Decimal `json:"open"`
	High          decimal.Decimal `json:"high"`
	Low           decimal.Decimal `json:"low"`
	Close         decimal.Decimal `json:"close"`
	Volume        decimal.Decimal `json:"volume"`
	Change        decimal.Decimal `json:"change"`
	ChangePercent decimal.Decimal `json:"changePercent"`
	VWAP          decimal.Decimal `json:"vwap"`
}

type Holiday added in v0.7.1

type Holiday struct {
	Date types.Date `json:"date"`
	Name string     `json:"name"`
}

type IgnoreUnmarshalFailure

type IgnoreUnmarshalFailure[T any] struct {
	// contains filtered or unexported fields
}

func (*IgnoreUnmarshalFailure[T]) UnmarshalJSON

func (i *IgnoreUnmarshalFailure[T]) UnmarshalJSON(b []byte) error

func (*IgnoreUnmarshalFailure[T]) Value

func (i *IgnoreUnmarshalFailure[T]) Value() *T

type IncomeStatement added in v0.9.5

type IncomeStatement struct {
	Date                                    types.Date      `json:"date"`
	Symbol                                  string          `json:"symbol"`
	ReportedCurrency                        string          `json:"reportedCurrency"`
	Cik                                     string          `json:"cik"`
	FilingDate                              types.Date      `json:"filingDate"`
	AcceptedDateTime                        types.DateTime  `json:"acceptedDate"`
	FiscalYear                              string          `json:"fiscalYear"`
	Period                                  FinancialPeriod `json:"period"`
	Revenue                                 decimal.Decimal `json:"revenue"`
	CostOfRevenue                           decimal.Decimal `json:"costOfRevenue"`
	GrossProfit                             decimal.Decimal `json:"grossProfit"`
	ResearchAndDevelopmentExpenses          decimal.Decimal `json:"researchAndDevelopmentExpenses"`
	GeneralAndAdministrativeExpenses        decimal.Decimal `json:"generalAndAdministrativeExpenses"`
	SellingAndMarketingExpenses             decimal.Decimal `json:"sellingAndMarketingExpenses"`
	SellingGeneralAndAdministrativeExpenses decimal.Decimal `json:"sellingGeneralAndAdministrativeExpenses"`
	OtherExpenses                           decimal.Decimal `json:"otherExpenses"`
	OperatingExpenses                       decimal.Decimal `json:"operatingExpenses"`
	CostAndExpenses                         decimal.Decimal `json:"costAndExpenses"`
	NetInterestIncome                       decimal.Decimal `json:"netInterestIncome"`
	InterestIncome                          decimal.Decimal `json:"interestIncome"`
	InterestExpense                         decimal.Decimal `json:"interestExpense"`
	DepreciationAndAmortization             decimal.Decimal `json:"depreciationAndAmortization"`
	Ebitda                                  decimal.Decimal `json:"ebitda"`
	Ebit                                    decimal.Decimal `json:"ebit"`
	NonOperatingIncomeExcludingInterest     decimal.Decimal `json:"nonOperatingIncomeExcludingInterest"`
	OperatingIncome                         decimal.Decimal `json:"operatingIncome"`
	TotalOtherIncomeExpensesNet             decimal.Decimal `json:"totalOtherIncomeExpensesNet"`
	IncomeBeforeTax                         decimal.Decimal `json:"incomeBeforeTax"`
	IncomeTaxExpense                        decimal.Decimal `json:"incomeTaxExpense"`
	NetIncomeFromContinuingOperations       decimal.Decimal `json:"netIncomeFromContinuingOperations"`
	NetIncomeFromDiscontinuedOperations     decimal.Decimal `json:"netIncomeFromDiscontinuedOperations"`
	OtherAdjustmentsToNetIncome             decimal.Decimal `json:"otherAdjustmentsToNetIncome"`
	NetIncome                               decimal.Decimal `json:"netIncome"`
	NetIncomeDeductions                     decimal.Decimal `json:"netIncomeDeductions"`
	BottomLineNetIncome                     decimal.Decimal `json:"bottomLineNetIncome"`
	Eps                                     decimal.Decimal `json:"eps"`
	EpsDiluted                              decimal.Decimal `json:"epsDiluted"`
	WeightedAverageShsOut                   decimal.Decimal `json:"weightedAverageShsOut"`
	WeightedAverageShsOutDil                decimal.Decimal `json:"weightedAverageShsOutDil"`
}

type IndexConstituent added in v0.7.4

type IndexConstituent struct {
	Symbol         string  `json:"symbol"`
	Name           string  `json:"name"`
	CIK            string  `json:"cik"`
	Sector         string  `json:"sector"`
	DateFirstAdded *string `json:"dateFirstAdded"`
}

type InsiderTrade added in v0.7.0

type InsiderTrade struct {
	Symbol                   string          `json:"symbol"`
	FormType                 SECFormType     `json:"formType"`
	CompanyCIK               string          `json:"companyCik"`
	ReportingCIK             string          `json:"reportingCik"`
	TransactionDate          types.Date      `json:"transactionDate"`
	TransactionType          string          `json:"transactionType"`
	SecuritiesOwned          decimal.Decimal `json:"securitiesOwned"`
	SecuritiesTransacted     decimal.Decimal `json:"securitiesTransacted"`
	OwnerName                string          `json:"reportingName"`
	OwnerType                string          `json:"typeOfOwner"`
	AcquisitionOrDisposition string          `json:"acquisitionOrDisposition"`
	Price                    decimal.Decimal `json:"price"`
	FilingDate               types.Date      `json:"filingDate"`
}

type NewsArticle added in v0.6.0

type NewsArticle struct {
	Symbol        string         `json:"symbol"`
	PublishedDate types.DateTime `json:"publishedDate"`
	Publisher     string         `json:"publisher"`
	Title         string         `json:"title"`
	Image         string         `json:"image"`
	Site          string         `json:"site"`
	Text          string         `json:"text"`
	URL           string         `json:"url"`
}

type OriginalGetExchangeHolidaysResponse added in v0.7.1

type OriginalGetExchangeHolidaysResponse struct {
	HolidaysByYear []mappedHolidays `json:"stockMarketHolidays"`
}

type PaginationHooks

type PaginationHooks struct {
	// If present, this value can be used to fetch the next page of data.
	NextURL string `json:"next_url,omitempty"`
}

PaginationHooks are links to next and/or previous pages. Embed this struct into an API response if the endpoint supports pagination.

func (PaginationHooks) NextPage

func (p PaginationHooks) NextPage() string

type PartialTicker

type PartialTicker struct {
	Symbol        string          `json:"symbol"`
	Name          string          `json:"name"`
	Price         decimal.Decimal `json:"price"`
	Change        decimal.Decimal `json:"change"`
	ChangePercent decimal.Decimal `json:"changePercent"`
}

type RequestOption

type RequestOption func(o *RequestOptions)

RequestOption changes the configuration of RequestOptions.

func Body

func Body(body any) RequestOption

Body sets a body as an option.

func Header(key, value string) RequestOption

Header sets a header as an option.

func QueryParam

func QueryParam(key, value string) RequestOption

QueryParam sets a query param as an option.

func WithContentType

func WithContentType(contentType string) RequestOption

func WithIgnoredErrorStatusCodes

func WithIgnoredErrorStatusCodes(codes ...int) RequestOption

func WithTrace

func WithTrace(trace bool) RequestOption

WithTrace enables or disables request tracing.

type RequestOptions

type RequestOptions struct {
	// Body to pass with the request.
	Body any

	// Headers to apply to the request.
	Headers http.Header

	// Query params to apply to the request.
	QueryParams url.Values

	// ContentType to use in the header.
	ContentType string

	// IgnoredErrorStatusCodes are the error status codes that should be ignored.
	IgnoredErrorStatusCodes []int

	// Trace enables request tracing.
	Trace bool
}

RequestOptions are used to configure client calls.

type ResponseError

type ResponseError struct {
	BaseResponse

	// An error message for unsuccessful requests.
	ErrorMessage string `json:"error,omitempty"`

	// An HTTP status code for unsuccessful requests.
	StatusCode         int
	OriginalStatusCode int
}

ResponseError represents an API response with an error status code.

func (*ResponseError) Error

func (e *ResponseError) Error() string

Error returns the details of an error response.

type SECFiling added in v0.7.0

type SECFiling struct {
	Symbol     string         `json:"symbol"`
	CIK        string         `json:"cik"`
	Type       SECFilingType  `json:"type"`
	Link       string         `json:"link"`
	FinalLink  string         `json:"finalLink"`
	FiledAt    types.DateTime `json:"filingDate"`
	AcceptedAt types.DateTime `json:"acceptedDate"`
}

type SECFilingSpecification added in v0.7.0

type SECFilingSpecification string
const (
	// Amendment is the first amendment to a filing.
	Amendment SECFilingSpecification = "Amendment"
	// Registration is the initial registration of securities.
	Registration SECFilingSpecification = "Registration"
	// Proxy is the definitive proxy statement for shareholder meetings.
	Proxy SECFilingSpecification = "Proxy"
	// Ownership is the statement of changes in beneficial ownership.
	Ownership SECFilingSpecification = "Ownership"
	// Prospectus is the definitive prospectus for securities offerings.
	Prospectus SECFilingSpecification = "Prospectus"
	// Schedule is the report filed by investors owning more than 5% of a company’s stock.
	Schedule SECFilingSpecification = "Schedule"
	// Earnings is the annual or quarterly report with financial data.
	Earnings SECFilingSpecification = "Earnings"
	// Other is a catch-all for other filing types.
	Other SECFilingSpecification = "Other"
)

type SECFilingType added in v0.7.0

type SECFilingType struct {
	Form          SECFormType            `json:"type"`
	Specification SECFilingSpecification `json:"specification"`
}

func (*SECFilingType) UnmarshalJSON added in v0.7.0

func (t *SECFilingType) UnmarshalJSON(data []byte) error

type SECFormType added in v0.7.0

type SECFormType string

SECFormType represents an SEC filing type.

const (
	// Form10K is the annual report with comprehensive financial data.
	Form10K SECFormType = "10-K"
	// Form10Q is the quarterly report with unaudited financial data.
	Form10Q SECFormType = "10-Q"
	// Form8K is the report of significant events or changes.
	Form8K SECFormType = "8-K"
	// Form6K is the report of foreign private issuers.
	Form6K SECFormType = "6-K"

	// FormS1 is the initial registration of securities (e.g., IPO).
	FormS1 SECFormType = "S-1"
	// FormS3 is the simplified securities registration for eligible companies.
	FormS3 SECFormType = "S-3"
	// FormS4 is the registration of securities for mergers or acquisitions.
	FormS4 SECFormType = "S-4"
	// FormS8 is the registration of securities for employee stock or benefit plans.
	FormS8 SECFormType = "S-8"

	// Schedule13D is the report filed by investors owning more than 5% of a company’s stock.
	Schedule13D SECFormType = "SCHEDULE 13D"
	// Schedule13G is the report for passive investors owning more than 5% of a company’s stock.
	Schedule13G SECFormType = "SCHEDULE 13G"
	// Form3 is the initial statement of beneficial ownership for corporate insiders.
	Form3 SECFormType = "3"
	// Form4 is the statement of changes in beneficial ownership for corporate insiders.
	Form4 SECFormType = "4"
	// Form5 is the annual statement of changes in beneficial ownership.
	Form5 SECFormType = "5"

	// FormDEF14A is the definitive proxy statement for shareholder meetings.
	FormDEF14A SECFormType = "DEF 14A"
	// FormDEF14C is the definitive information statement for shareholder meetings without proxies.
	FormDEF14C SECFormType = "DEF 14C"
	// FormPRE14A is the preliminary proxy statement for shareholder meetings.
	FormPRE14A SECFormType = "PRE 14A"
	// FormPRE14C is the preliminary information statement for shareholder meetings without proxies.
	FormPRE14C SECFormType = "PRE 14C"
	// Schedule14D9 is the recommendation statement in response to a tender offer.
	Schedule14D9 SECFormType = "SCHEDULE 14D-9"
	// Form10 is the registration of a class of securities under the Exchange Act.
	Form10 SECFormType = "10"

	// Form497 is the filing for definitive prospectus materials.
	Form497 SECFormType = "497"
	// Form497K is the key information summary of a mutual fund prospectus.
	Form497K SECFormType = "497K"
	// Form497J is the certification of compliance with SEC requirements.
	Form497J SECFormType = "497J"
	// Form424B1 is the preliminary prospectus with pricing information.
	Form424B1 SECFormType = "424"
)

func (SECFormType) IsAmendment added in v0.7.0

func (t SECFormType) IsAmendment() bool

func (SECFormType) IsEarnings added in v0.7.0

func (t SECFormType) IsEarnings() bool

func (SECFormType) IsOwnership added in v0.7.0

func (t SECFormType) IsOwnership() bool

func (SECFormType) IsProspectus added in v0.7.0

func (t SECFormType) IsProspectus() bool

func (SECFormType) IsProxy added in v0.7.0

func (t SECFormType) IsProxy() bool

func (SECFormType) IsRegistration added in v0.7.0

func (t SECFormType) IsRegistration() bool

func (SECFormType) IsSchedule added in v0.7.0

func (t SECFormType) IsSchedule() bool

func (SECFormType) Name added in v0.7.0

func (t SECFormType) Name() SECFormType

func (SECFormType) Specification added in v0.7.0

func (t SECFormType) Specification() SECFilingSpecification

func (SECFormType) String added in v0.7.0

func (t SECFormType) String() string

func (SECFormType) Validate added in v0.7.1

func (t SECFormType) Validate() error

type TickerPrice

type TickerPrice struct {
	Symbol           string          `json:"symbol"`
	Name             string          `json:"name"`
	Open             decimal.Decimal `json:"open"`
	Price            decimal.Decimal `json:"price"`
	PreviousClose    decimal.Decimal `json:"previousClose"`
	ChangePercentage decimal.Decimal `json:"changePercentage"`
	Change           decimal.Decimal `json:"change"`
	DayLow           decimal.Decimal `json:"dayLow"`
	DayHigh          decimal.Decimal `json:"dayHigh"`
	YearLow          decimal.Decimal `json:"yearLow"`
	YearHigh         decimal.Decimal `json:"yearHigh"`
	PriceAvg50       decimal.Decimal `json:"priceAvg50"`
	PriceAvg200      decimal.Decimal `json:"priceAvg200"`
	MarketCap        decimal.Decimal `json:"marketCap"`
	Exchange         string          `json:"exchange"`
	Volume           decimal.Decimal `json:"volume"`
	Timestamp        int64           `json:"timestamp"`
}

type Timeframe added in v0.3.2

type Timeframe string
const (
	Timeframe1Min  Timeframe = "1min"
	Timeframe5Min  Timeframe = "5min"
	Timeframe15Min Timeframe = "15min"
	Timeframe30Min Timeframe = "30min"
	Timeframe1Hour Timeframe = "1hour"
	Timeframe4Hour Timeframe = "4hour"
)

type WebsocketAuthenticationRequest

type WebsocketAuthenticationRequest struct {
	Event WebsocketEventName                 `json:"event"`
	Data  WebsocketAuthenticationRequestData `json:"data"`
}

type WebsocketAuthenticationRequestData

type WebsocketAuthenticationRequestData struct {
	APIKey string `json:"apiKey" validate:"required"`
}

type WebsocketEventName added in v0.2.0

type WebsocketEventName string
const (
	WebsocketEventNameHeartbeat   WebsocketEventName = "heartbeat"
	WebsocketEventNameLogin       WebsocketEventName = "login"
	WebsocketEventNameSubscribe   WebsocketEventName = "subscribe"
	WebsocketEventNameUnsubscribe WebsocketEventName = "unsubscribe"
)

type WebsocketMessageType added in v0.2.0

type WebsocketMessageType string
const (
	WebsocketMessageTypeQuote WebsocketMessageType = "Q"
)

type WebsocketMesssage added in v0.2.0

type WebsocketMesssage struct {
	Event     WebsocketEventName    `json:"event"`
	Type      *WebsocketMessageType `json:"type"`
	Message   *string               `json:"message"`
	Status    *int                  `json:"status"`
	Timestamp *int64                `json:"timestamp"`
}

func (WebsocketMesssage) LogValue added in v0.2.0

func (m WebsocketMesssage) LogValue() slog.Value

type WebsocketQuote

type WebsocketQuote struct {
	Symbol      string          `json:"s"`
	AskPrice    decimal.Decimal `json:"ap"`
	AskSize     decimal.Decimal `json:"as"`
	BidPrice    decimal.Decimal `json:"bp"`
	BidSize     decimal.Decimal `json:"bs"`
	LastPrice   decimal.Decimal `json:"lp"`
	LastUpdated int64           `json:"t"`
}

func (WebsocketQuote) MarshalBinary added in v0.3.2

func (q WebsocketQuote) MarshalBinary() ([]byte, error)

type WebsocketSubscriptionRequest

type WebsocketSubscriptionRequest struct {
	Event WebsocketEventName               `json:"event"`
	Data  WebsocketSubscriptionRequestData `json:"data"`
}

type WebsocketSubscriptionRequestData

type WebsocketSubscriptionRequestData struct {
	Symbols []string `json:"ticker" validate:"required"`
}

Jump to

Keyboard shortcuts

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