# Instrument Data ## Get All Instrument Events `client.V1.InstrumentData.GetAllInstrumentEvents(ctx, query) (*V1InstrumentDataGetAllInstrumentEventsResponse, error)` **get** `/v1/instruments/events` List instrument events across all securities. Retrieves all instrument events grouped by date. ### Parameters - `query V1InstrumentDataGetAllInstrumentEventsParams` - `EventTypes param.Field[[]AllEventsEventType]` Filter by event type(s). Comma-delimited list. Example: `event_types=EARNINGS,IPO`. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` - `FromDate param.Field[string]` The start date for the query range, inclusive (YYYY-MM-DD). - `InstrumentIDs param.Field[[]string]` Filter by OEMS instrument ID(s). Comma-delimited list of UUIDs. Example: `instrument_ids=550e8400-e29b-41d4-a716-446655440000`. - `ToDate param.Field[string]` The end date for the query range, inclusive (YYYY-MM-DD). ### Returns - `type V1InstrumentDataGetAllInstrumentEventsResponse struct{…}` - `Data InstrumentAllEventsData` All-events payload grouped by date. - `EventDates []InstrumentEventsByDate` Events grouped by date in descending order. - `Date Time` Event date. - `Events []InstrumentEventEnvelope` Flat event envelopes for this date. - `Symbol string` Symbol associated with the event. - `Type AllEventsEventType` Event type discriminator. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` - `DividendEventData InstrumentDividendEvent` Dividend payload when type is DIVIDEND. - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `EarningsEventData InstrumentEarnings` Earnings payload when type is EARNINGS. - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument identifier, when the instrument is found in the instrument cache. - `IpoEventData InstrumentEventIpoItem` IPO payload when type is IPO. - `Actions string` IPO action. - `AnnouncedAt Time` IPO announced timestamp. - `Company string` IPO company name. - `Exchange string` IPO exchange. - `MarketCap string` IPO market cap. - `PriceRange string` IPO price range. - `Shares string` IPO shares offered. - `Name string` Instrument name associated with the event, when available. - `ReportingCurrency string` The currency used for reporting financial data. - `StockSplitEventData InstrumentSplitEvent` Stock split payload when type is STOCK_SPLIT. - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetAllInstrumentEvents(context.TODO(), clearstreet.V1InstrumentDataGetAllInstrumentEventsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "event_dates": [ { "date": "2026-04-23", "events": [ { "dividend_event_data": { "adjusted_dividend_amount": "0.5236", "declaration_date": "2026-04-22", "dividend_amount": "0.5236", "dividend_yield": "43.82881469863321", "ex_date": "2026-04-23", "frequency": "Weekly", "payment_date": "2026-04-24", "record_date": "2026-04-23" }, "instrument_id": "2281b543-7136-4008-aa0a-a402bf9d9f90", "name": "YieldMax ABNB Option Income Strategy ETF", "reporting_currency": "USD", "symbol": "ABNY", "type": "DIVIDEND" }, { "dividend_event_data": { "adjusted_dividend_amount": "0.1432", "declaration_date": "2026-04-22", "dividend_amount": "0.1432", "dividend_yield": "181.7918287937743", "ex_date": "2026-04-23", "frequency": "Weekly", "payment_date": "2026-04-24", "record_date": "2026-04-23" }, "instrument_id": "4b33fa52-8ab6-43f5-a8df-042e0c63d20e", "name": "YieldMax AI Option Income Strategy ETF", "reporting_currency": "USD", "symbol": "AIYY", "type": "DIVIDEND" } ] } ] }, "metadata": { "request_id": "5efbf08a-9067-4491-9f29-cf0b233507ef" } } ``` ## Get Instrument Events `client.V1.InstrumentData.GetInstrumentEvents(ctx, instrumentID, query) (*V1InstrumentDataGetInstrumentEventsResponse, error)` **get** `/v1/instruments/{instrument_id}/events` Retrieves corporate events (dividends, splits, etc.) for an instrument, grouped by event type. Date range defaults: - `from_date`: today - 365 days - `to_date`: today + 60 days ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID - `query V1InstrumentDataGetInstrumentEventsParams` - `FromDate param.Field[string]` The start date for the query range, inclusive (YYYY-MM-DD). - `ToDate param.Field[string]` The end date for the query range, inclusive (YYYY-MM-DD). ### Returns - `type V1InstrumentDataGetInstrumentEventsResponse struct{…}` - `Data InstrumentEventsData` Grouped instrument events by type - `Dividends []InstrumentDividendEvent` Dividend distribution events - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `Earnings []InstrumentEarnings` Earnings announcement events - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument UUID from the request - `Splits []InstrumentSplitEvent` Stock split events - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") - `ReportingCurrency string` The currency used for reporting financial data ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentEvents( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", clearstreet.V1InstrumentDataGetInstrumentEventsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "dividends": [ { "adjusted_dividend_amount": "0.25", "declaration_date": "2024-10-31", "dividend_amount": "0.25", "dividend_yield": "0.44", "ex_date": "2024-11-08", "frequency": "Quarterly", "payment_date": "2024-11-14", "record_date": "2024-11-11" } ], "earnings": [ { "date": "2024-10-31", "eps_actual": "1.64", "eps_estimate": "1.60", "eps_surprise_percent": "2.5", "revenue_actual": "94930000000", "revenue_estimate": "94500000000", "revenue_surprise_percent": "0.45" } ], "instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8", "reporting_currency": "USD", "splits": [ { "date": "2020-08-31", "denominator": "1", "numerator": "4", "split_type": "stock-split" } ] }, "error": null, "metadata": { "request_id": "0f1a2b3c-4d5e-6789-8a7b-6c5d4e3f2a1b" } } ``` ## Get Instrument Fundamentals `client.V1.InstrumentData.GetInstrumentFundamentals(ctx, instrumentID) (*V1InstrumentDataGetInstrumentFundamentalsResponse, error)` **get** `/v1/instruments/{instrument_id}/fundamentals` Retrieves supplemental fundamentals and company profile data for an instrument. ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID ### Returns - `type V1InstrumentDataGetInstrumentFundamentalsResponse struct{…}` - `Data InstrumentFundamentals` Supplemental fundamentals and company profile data for an instrument. - `AverageVolume int64` The average daily trading volume over the past 30 days - `Beta string` The beta value, measuring the instrument's volatility relative to the overall market - `Description string` A detailed description of the instrument or company - `DividendYield string` The trailing twelve months (TTM) dividend yield - `EarningsPerShare string` The trailing twelve months (TTM) earnings per share - `FiftyTwoWeekHigh string` The highest price over the last 52 weeks - `FiftyTwoWeekLow string` The lowest price over the last 52 weeks - `Industry string` The specific industry of the instrument's issuer - `ListDate Time` The date the instrument was first listed - `LogoURL string` URL to a representative logo image for the instrument or issuer - `MarketCap string` The total market capitalization - `PreviousClose string` The closing price from the previous trading day - `PriceToEarnings string` The price-to-earnings (P/E) ratio for the trailing twelve months (TTM) - `ReportingCurrency string` The currency used for reporting financial data - `Sector string` The business sector of the instrument's issuer ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentFundamentals(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "average_volume": 76000000, "beta": "1.20", "description": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide.", "dividend_yield": "0.005", "earnings_per_share": "5.61", "fifty_two_week_high": "230.00", "fifty_two_week_low": "165.00", "industry": "Consumer Electronics", "list_date": "1980-12-12", "logo_url": "https://example.com/logos/aapl.png", "market_cap": "2800000000000", "previous_close": "210.87", "price_to_earnings": "30.5", "reporting_currency": "USD", "sector": "Technology" }, "error": null, "metadata": { "request_id": "5b6c7d8e-9f0a-1b2c-3d4e-5f6a7b8c9d0e" } } ``` ## Get Instrument Balance Sheet Statements `client.V1.InstrumentData.GetInstrumentBalanceSheetStatements(ctx, instrumentID, query) (*V1InstrumentDataGetInstrumentBalanceSheetStatementsResponse, error)` **get** `/v1/instruments/{instrument_id}/balance-sheets` Get balance sheet statements for an instrument. Retrieves quarterly balance sheet statements for a specific instrument, sorted by fiscal period (most recent first). Date range defaults: - `from_date`: None (no lower bound) - `to_date`: None (no upper bound) ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID - `query V1InstrumentDataGetInstrumentBalanceSheetStatementsParams` - `FromDate param.Field[string]` The start date for the query range, inclusive (YYYY-MM-DD). - `PageSize param.Field[int64]` The number of items to return per page. Only used when page_token is not provided. - `PageToken param.Field[string]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. - `ToDate param.Field[string]` The end date for the query range, inclusive (YYYY-MM-DD). ### Returns - `type V1InstrumentDataGetInstrumentBalanceSheetStatementsResponse struct{…}` - `Data InstrumentBalanceSheetStatementList` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountPayables string` Account payables - `AccountsReceivables string` Accounts receivables - `AccruedExpenses string` Accrued expenses - `AccumulatedOtherComprehensiveIncomeLoss string` Accumulated other comprehensive income/loss - `AdditionalPaidInCapital string` Additional paid-in capital - `CapitalLeaseObligations string` Capital lease obligations (total) - `CapitalLeaseObligationsCurrent string` Capital lease obligations (current portion) - `CashAndCashEquivalents string` Cash and cash equivalents - `CashAndShortTermInvestments string` Cash and short-term investments combined - `CommonStock string` Common stock - `DeferredRevenue string` Deferred revenue - `DeferredRevenueNonCurrent string` Deferred revenue (non-current) - `DeferredTaxLiabilitiesNonCurrent string` Deferred tax liabilities (non-current) - `Goodwill string` Goodwill - `GoodwillAndIntangibleAssets string` Goodwill and intangible assets combined - `IntangibleAssets string` Intangible assets - `Inventory string` Inventory - `LongTermDebt string` Long-term debt - `LongTermInvestments string` Long-term investments - `MinorityInterest string` Minority interest - `NetDebt string` Net debt (total debt minus cash) - `NetReceivables string` Net receivables - `OtherAssets string` Other assets - `OtherCurrentAssets string` Other current assets - `OtherCurrentLiabilities string` Other current liabilities - `OtherLiabilities string` Other liabilities - `OtherNonCurrentAssets string` Other non-current assets - `OtherNonCurrentLiabilities string` Other non-current liabilities - `OtherPayables string` Other payables - `OtherReceivables string` Other receivables - `OtherTotalStockholdersEquity string` Other total stockholders equity - `PreferredStock string` Preferred stock - `Prepaids string` Prepaids - `PropertyPlantAndEquipmentNet string` Property, plant and equipment net of depreciation - `RetainedEarnings string` Retained earnings - `ShortTermDebt string` Short-term debt - `ShortTermInvestments string` Short-term investments - `TaxAssets string` Tax assets - `TaxPayables string` Tax payables - `TotalAssets string` Total assets - `TotalCurrentAssets string` Total current assets - `TotalCurrentLiabilities string` Total current liabilities - `TotalDebt string` Total debt - `TotalEquity string` Total equity - `TotalInvestments string` Total investments - `TotalLiabilities string` Total liabilities - `TotalLiabilitiesAndTotalEquity string` Total liabilities and total equity - `TotalNonCurrentAssets string` Total non-current assets - `TotalNonCurrentLiabilities string` Total non-current liabilities - `TotalPayables string` Total payables - `TotalStockholdersEquity string` Total stockholders equity - `TreasuryStock string` Treasury stock ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentBalanceSheetStatements( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", clearstreet.V1InstrumentDataGetInstrumentBalanceSheetStatementsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "accepted_date": "2025-05-02T14:30:00Z", "cash_and_cash_equivalents": "29943000000", "filing_date": "2025-05-01", "net_debt": "76323000000", "period": "Q1", "period_type": "QUARTERLY", "reported_currency": "USD", "total_assets": "352583000000", "total_debt": "106266000000", "total_liabilities": "308258000000", "total_stockholders_equity": "56727000000", "year": 2025 } ], "error": null, "metadata": { "next_page_token": "AAAAAAAAAGQAAAAAAAAAZQ==", "page_number": 1, "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "total_items": 20, "total_pages": 2 } } ``` ## Get Instrument Income Statements `client.V1.InstrumentData.GetInstrumentIncomeStatements(ctx, instrumentID, query) (*V1InstrumentDataGetInstrumentIncomeStatementsResponse, error)` **get** `/v1/instruments/{instrument_id}/income-statements` Retrieves quarterly income statements for a specific instrument, sorted by fiscal period (most recent first). Date range defaults: - `from_date`: None (no lower bound) - `to_date`: None (no upper bound) ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID - `query V1InstrumentDataGetInstrumentIncomeStatementsParams` - `FromDate param.Field[string]` The start date for the query range, inclusive (YYYY-MM-DD). - `PageSize param.Field[int64]` The number of items to return per page. Only used when page_token is not provided. - `PageToken param.Field[string]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. - `ToDate param.Field[string]` The end date for the query range, inclusive (YYYY-MM-DD). ### Returns - `type V1InstrumentDataGetInstrumentIncomeStatementsResponse struct{…}` - `Data InstrumentIncomeStatementList` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `BottomLineNetIncome string` Bottom line net income after all adjustments - `CostAndExpenses string` Total costs and expenses - `CostOfRevenue string` Direct costs attributable to producing goods sold - `DepreciationAndAmortization string` Depreciation and amortization expenses - `Ebit string` Earnings before interest and taxes - `Ebitda string` Earnings before interest, taxes, depreciation, and amortization - `Eps string` Basic earnings per share - `EpsDiluted string` Diluted earnings per share - `GeneralAndAdministrativeExpenses string` General administrative overhead expenses - `GrossProfit string` Revenue minus cost of revenue - `IncomeBeforeTax string` Income before income tax expense - `IncomeTaxExpense string` Income tax expense for the period - `InterestExpense string` Interest paid on debt - `InterestIncome string` Interest earned on investments and cash - `NetIncome string` Total net income for the period - `NetIncomeDeductions string` Deductions from net income - `NetIncomeFromContinuingOperations string` Net income from continuing operations - `NetIncomeFromDiscontinuedOperations string` Net income from discontinued operations - `NetInterestIncome string` Net interest income (interest income minus interest expense) - `NonOperatingIncomeExcludingInterest string` Non-operating income excluding interest - `OperatingExpenses string` Total operating expenses - `OperatingIncome string` Income from core business operations - `OtherAdjustmentsToNetIncome string` Other adjustments to net income - `OtherExpenses string` Other miscellaneous expenses - `ResearchAndDevelopmentExpenses string` Expenditure on research and development activities - `Revenue string` Total revenue from sales of goods and services - `SellingAndMarketingExpenses string` Expenditure on marketing and sales activities - `SellingGeneralAndAdministrativeExpenses string` Combined selling, general, and administrative expenses - `TotalOtherIncomeExpensesNet string` Net of other income and expenses - `WeightedAverageShsOut string` Weighted average shares outstanding (basic) - `WeightedAverageShsOutDil string` Weighted average shares outstanding (diluted) ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentIncomeStatements( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", clearstreet.V1InstrumentDataGetInstrumentIncomeStatementsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "accepted_date": "2025-05-02T14:30:00Z", "cost_of_revenue": "52080000000", "eps": "1.40", "eps_diluted": "1.38", "filing_date": "2025-05-01", "gross_profit": "42850000000", "net_income": "22200000000", "operating_income": "26550000000", "period": "Q1", "period_type": "QUARTERLY", "reported_currency": "USD", "revenue": "94930000000", "year": 2025 } ], "error": null, "metadata": { "next_page_token": "AAAAAAAAAGQAAAAAAAAAZQ==", "page_number": 1, "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "total_items": 20, "total_pages": 2 } } ``` ## Get Instrument Analyst Consensus `client.V1.InstrumentData.GetInstrumentAnalystConsensus(ctx, instrumentID, query) (*V1InstrumentDataGetInstrumentAnalystConsensusResponse, error)` **get** `/v1/instruments/{instrument_id}/analyst-reporting` Retrieves analyst ratings and price targets for an instrument. ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID - `query V1InstrumentDataGetInstrumentAnalystConsensusParams` - `From param.Field[Time]` The start date for the query range, inclusive (YYYY-MM-DD) - `To param.Field[Time]` The end date for the query range, inclusive (YYYY-MM-DD) ### Returns - `type V1InstrumentDataGetInstrumentAnalystConsensusResponse struct{…}` - `Data InstrumentAnalystConsensus` Aggregated analyst consensus metrics - `Date Time` The date the consensus snapshot was generated - `Distribution AnalystDistribution` Count of individual analyst recommendations by category - `Buy int64` Number of buy recommendations - `Hold int64` Number of hold recommendations - `Sell int64` Number of sell recommendations - `StrongBuy int64` Number of strong buy recommendations - `StrongSell int64` Number of strong sell recommendations - `PriceTarget PriceTarget` Aggregated analyst price target statistics - `Average string` Average analyst price target - `Currency string` ISO 4217 currency code of the price targets - `High string` Highest analyst price target - `Low string` Lowest analyst price target - `Rating AnalystRating` Consensus analyst rating - `const AnalystRatingStrongBuy AnalystRating = "STRONG_BUY"` - `const AnalystRatingBuy AnalystRating = "BUY"` - `const AnalystRatingHold AnalystRating = "HOLD"` - `const AnalystRatingSell AnalystRating = "SELL"` - `const AnalystRatingStrongSell AnalystRating = "STRONG_SELL"` ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentAnalystConsensus( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", clearstreet.V1InstrumentDataGetInstrumentAnalystConsensusParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "date": "2025-10-01", "distribution": { "buy": 20, "hold": 3, "sell": 1, "strong_buy": 18, "strong_sell": 0 }, "price_target": { "average": "240.00", "currency": "USD", "high": "275.00", "low": "190.00" }, "rating": "BUY" }, "error": null, "metadata": { "request_id": "9e0f1a2b-3c4d-5e6f-7890-1a2b3c4d5e6f" } } ``` ## Get Instrument Cash Flow Statements `client.V1.InstrumentData.GetInstrumentCashFlowStatements(ctx, instrumentID, query) (*V1InstrumentDataGetInstrumentCashFlowStatementsResponse, error)` **get** `/v1/instruments/{instrument_id}/cash-flow-statements` Get cash flow statements for an instrument. Retrieves historical cash flow statements for the specified instrument. Cash flow statements show cash inflows and outflows from operating, investing, and financing activities. ### Parameters - `InstrumentID InstrumentIDOrSymbol` OEMS instrument UUID - `query V1InstrumentDataGetInstrumentCashFlowStatementsParams` - `FromDate param.Field[string]` The start date for the query range, inclusive (YYYY-MM-DD). - `PageSize param.Field[int64]` The number of items to return per page. Only used when page_token is not provided. - `PageToken param.Field[string]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. - `ToDate param.Field[string]` The end date for the query range, inclusive (YYYY-MM-DD). ### Returns - `type V1InstrumentDataGetInstrumentCashFlowStatementsResponse struct{…}` - `Data InstrumentCashFlowStatementList` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountsPayables string` Change in accounts payables - `AccountsReceivables string` Change in accounts receivables - `AcquisitionsNet string` Net acquisitions - `CapitalExpenditure string` Capital expenditure - `CashAtBeginningOfPeriod string` Cash and cash equivalents at beginning of period - `CashAtEndOfPeriod string` Cash and cash equivalents at end of period - `ChangeInWorkingCapital string` Change in working capital - `CommonDividendsPaid string` Common dividends paid - `CommonStockIssuance string` Common stock issuance - `CommonStockRepurchased string` Common stock repurchased (buybacks) - `DeferredIncomeTax string` Deferred income tax expense - `DepreciationAndAmortization string` Depreciation and amortization expense - `EffectOfForexChangesOnCash string` Effect of foreign exchange changes on cash - `FreeCashFlow string` Free cash flow (operating cash flow minus capital expenditure) - `IncomeTaxesPaid string` Income taxes paid - `InterestPaid string` Interest paid - `Inventory string` Change in inventory - `InvestmentsInPropertyPlantAndEquipment string` Investments in property, plant, and equipment - `LongTermNetDebtIssuance string` Long-term net debt issuance - `NetCashProvidedByFinancingActivities string` Net cash provided by financing activities - `NetCashProvidedByInvestingActivities string` Net cash provided by investing activities - `NetCashProvidedByOperatingActivities string` Net cash provided by operating activities - `NetChangeInCash string` Net change in cash during the period - `NetCommonStockIssuance string` Net common stock issuance - `NetDebtIssuance string` Net debt issuance (long-term + short-term) - `NetDividendsPaid string` Net dividends paid (common + preferred) - `NetIncome string` Net income for the period - `NetPreferredStockIssuance string` Net preferred stock issuance - `NetStockIssuance string` Net stock issuance (common + preferred) - `OperatingCashFlow string` Operating cash flow (alternative calculation) - `OtherFinancingActivities string` Other financing activities - `OtherInvestingActivities string` Other investing activities - `OtherNonCashItems string` Other non-cash items - `OtherWorkingCapital string` Change in other working capital - `PreferredDividendsPaid string` Preferred dividends paid - `PurchasesOfInvestments string` Purchases of investments - `SalesMaturitiesOfInvestments string` Sales and maturities of investments - `ShortTermNetDebtIssuance string` Short-term net debt issuance - `StockBasedCompensation string` Stock-based compensation expense ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.GetInstrumentCashFlowStatements( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", clearstreet.V1InstrumentDataGetInstrumentCashFlowStatementsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "accepted_date": "2025-05-02T14:30:00Z", "capital_expenditure": "-2600000000", "cash_at_beginning_of_period": "33743000000", "cash_at_end_of_period": "29943000000", "change_in_working_capital": "-3200000000", "common_stock_repurchased": "-23000000000", "depreciation_and_amortization": "2900000000", "filing_date": "2025-05-01", "free_cash_flow": "25800000000", "investments_in_property_plant_and_equipment": "-2600000000", "net_cash_provided_by_financing_activities": "-28300000000", "net_cash_provided_by_investing_activities": "-3900000000", "net_cash_provided_by_operating_activities": "28400000000", "net_change_in_cash": "-3800000000", "net_debt_issuance": "-1500000000", "net_dividends_paid": "-3800000000", "net_income": "22200000000", "operating_cash_flow": "28400000000", "period": "Q1", "period_type": "QUARTERLY", "purchases_of_investments": "-9500000000", "reported_currency": "USD", "sales_maturities_of_investments": "8200000000", "stock_based_compensation": "2500000000", "year": 2025 } ], "error": null, "metadata": { "next_page_token": "AAAAAAAAAGQAAAAAAAAAZQ==", "page_number": 1, "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "total_items": 20, "total_pages": 2 } } ``` ## Domain Types ### All Events Event Type - `type AllEventsEventType string` Event types supported by the all-events endpoint. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` ### Analyst Distribution - `type AnalystDistribution struct{…}` Analyst recommendation distribution - `Buy int64` Number of buy recommendations - `Hold int64` Number of hold recommendations - `Sell int64` Number of sell recommendations - `StrongBuy int64` Number of strong buy recommendations - `StrongSell int64` Number of strong sell recommendations ### Analyst Rating - `type AnalystRating string` Analyst rating category - `const AnalystRatingStrongBuy AnalystRating = "STRONG_BUY"` - `const AnalystRatingBuy AnalystRating = "BUY"` - `const AnalystRatingHold AnalystRating = "HOLD"` - `const AnalystRatingSell AnalystRating = "SELL"` - `const AnalystRatingStrongSell AnalystRating = "STRONG_SELL"` ### Fiscal Period Type - `type FiscalPeriodType string` Fiscal period type for earnings reports - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` ### Instrument All Events Data - `type InstrumentAllEventsData struct{…}` All-events payload grouped by date. - `EventDates []InstrumentEventsByDate` Events grouped by date in descending order. - `Date Time` Event date. - `Events []InstrumentEventEnvelope` Flat event envelopes for this date. - `Symbol string` Symbol associated with the event. - `Type AllEventsEventType` Event type discriminator. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` - `DividendEventData InstrumentDividendEvent` Dividend payload when type is DIVIDEND. - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `EarningsEventData InstrumentEarnings` Earnings payload when type is EARNINGS. - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument identifier, when the instrument is found in the instrument cache. - `IpoEventData InstrumentEventIpoItem` IPO payload when type is IPO. - `Actions string` IPO action. - `AnnouncedAt Time` IPO announced timestamp. - `Company string` IPO company name. - `Exchange string` IPO exchange. - `MarketCap string` IPO market cap. - `PriceRange string` IPO price range. - `Shares string` IPO shares offered. - `Name string` Instrument name associated with the event, when available. - `ReportingCurrency string` The currency used for reporting financial data. - `StockSplitEventData InstrumentSplitEvent` Stock split payload when type is STOCK_SPLIT. - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") ### Instrument Analyst Consensus - `type InstrumentAnalystConsensus struct{…}` Aggregated analyst consensus metrics - `Date Time` The date the consensus snapshot was generated - `Distribution AnalystDistribution` Count of individual analyst recommendations by category - `Buy int64` Number of buy recommendations - `Hold int64` Number of hold recommendations - `Sell int64` Number of sell recommendations - `StrongBuy int64` Number of strong buy recommendations - `StrongSell int64` Number of strong sell recommendations - `PriceTarget PriceTarget` Aggregated analyst price target statistics - `Average string` Average analyst price target - `Currency string` ISO 4217 currency code of the price targets - `High string` Highest analyst price target - `Low string` Lowest analyst price target - `Rating AnalystRating` Consensus analyst rating - `const AnalystRatingStrongBuy AnalystRating = "STRONG_BUY"` - `const AnalystRatingBuy AnalystRating = "BUY"` - `const AnalystRatingHold AnalystRating = "HOLD"` - `const AnalystRatingSell AnalystRating = "SELL"` - `const AnalystRatingStrongSell AnalystRating = "STRONG_SELL"` ### Instrument Balance Sheet Statement - `type InstrumentBalanceSheetStatement struct{…}` A quarterly balance sheet statement for an instrument. - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountPayables string` Account payables - `AccountsReceivables string` Accounts receivables - `AccruedExpenses string` Accrued expenses - `AccumulatedOtherComprehensiveIncomeLoss string` Accumulated other comprehensive income/loss - `AdditionalPaidInCapital string` Additional paid-in capital - `CapitalLeaseObligations string` Capital lease obligations (total) - `CapitalLeaseObligationsCurrent string` Capital lease obligations (current portion) - `CashAndCashEquivalents string` Cash and cash equivalents - `CashAndShortTermInvestments string` Cash and short-term investments combined - `CommonStock string` Common stock - `DeferredRevenue string` Deferred revenue - `DeferredRevenueNonCurrent string` Deferred revenue (non-current) - `DeferredTaxLiabilitiesNonCurrent string` Deferred tax liabilities (non-current) - `Goodwill string` Goodwill - `GoodwillAndIntangibleAssets string` Goodwill and intangible assets combined - `IntangibleAssets string` Intangible assets - `Inventory string` Inventory - `LongTermDebt string` Long-term debt - `LongTermInvestments string` Long-term investments - `MinorityInterest string` Minority interest - `NetDebt string` Net debt (total debt minus cash) - `NetReceivables string` Net receivables - `OtherAssets string` Other assets - `OtherCurrentAssets string` Other current assets - `OtherCurrentLiabilities string` Other current liabilities - `OtherLiabilities string` Other liabilities - `OtherNonCurrentAssets string` Other non-current assets - `OtherNonCurrentLiabilities string` Other non-current liabilities - `OtherPayables string` Other payables - `OtherReceivables string` Other receivables - `OtherTotalStockholdersEquity string` Other total stockholders equity - `PreferredStock string` Preferred stock - `Prepaids string` Prepaids - `PropertyPlantAndEquipmentNet string` Property, plant and equipment net of depreciation - `RetainedEarnings string` Retained earnings - `ShortTermDebt string` Short-term debt - `ShortTermInvestments string` Short-term investments - `TaxAssets string` Tax assets - `TaxPayables string` Tax payables - `TotalAssets string` Total assets - `TotalCurrentAssets string` Total current assets - `TotalCurrentLiabilities string` Total current liabilities - `TotalDebt string` Total debt - `TotalEquity string` Total equity - `TotalInvestments string` Total investments - `TotalLiabilities string` Total liabilities - `TotalLiabilitiesAndTotalEquity string` Total liabilities and total equity - `TotalNonCurrentAssets string` Total non-current assets - `TotalNonCurrentLiabilities string` Total non-current liabilities - `TotalPayables string` Total payables - `TotalStockholdersEquity string` Total stockholders equity - `TreasuryStock string` Treasury stock ### Instrument Balance Sheet Statement List - `type InstrumentBalanceSheetStatementList []InstrumentBalanceSheetStatement` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountPayables string` Account payables - `AccountsReceivables string` Accounts receivables - `AccruedExpenses string` Accrued expenses - `AccumulatedOtherComprehensiveIncomeLoss string` Accumulated other comprehensive income/loss - `AdditionalPaidInCapital string` Additional paid-in capital - `CapitalLeaseObligations string` Capital lease obligations (total) - `CapitalLeaseObligationsCurrent string` Capital lease obligations (current portion) - `CashAndCashEquivalents string` Cash and cash equivalents - `CashAndShortTermInvestments string` Cash and short-term investments combined - `CommonStock string` Common stock - `DeferredRevenue string` Deferred revenue - `DeferredRevenueNonCurrent string` Deferred revenue (non-current) - `DeferredTaxLiabilitiesNonCurrent string` Deferred tax liabilities (non-current) - `Goodwill string` Goodwill - `GoodwillAndIntangibleAssets string` Goodwill and intangible assets combined - `IntangibleAssets string` Intangible assets - `Inventory string` Inventory - `LongTermDebt string` Long-term debt - `LongTermInvestments string` Long-term investments - `MinorityInterest string` Minority interest - `NetDebt string` Net debt (total debt minus cash) - `NetReceivables string` Net receivables - `OtherAssets string` Other assets - `OtherCurrentAssets string` Other current assets - `OtherCurrentLiabilities string` Other current liabilities - `OtherLiabilities string` Other liabilities - `OtherNonCurrentAssets string` Other non-current assets - `OtherNonCurrentLiabilities string` Other non-current liabilities - `OtherPayables string` Other payables - `OtherReceivables string` Other receivables - `OtherTotalStockholdersEquity string` Other total stockholders equity - `PreferredStock string` Preferred stock - `Prepaids string` Prepaids - `PropertyPlantAndEquipmentNet string` Property, plant and equipment net of depreciation - `RetainedEarnings string` Retained earnings - `ShortTermDebt string` Short-term debt - `ShortTermInvestments string` Short-term investments - `TaxAssets string` Tax assets - `TaxPayables string` Tax payables - `TotalAssets string` Total assets - `TotalCurrentAssets string` Total current assets - `TotalCurrentLiabilities string` Total current liabilities - `TotalDebt string` Total debt - `TotalEquity string` Total equity - `TotalInvestments string` Total investments - `TotalLiabilities string` Total liabilities - `TotalLiabilitiesAndTotalEquity string` Total liabilities and total equity - `TotalNonCurrentAssets string` Total non-current assets - `TotalNonCurrentLiabilities string` Total non-current liabilities - `TotalPayables string` Total payables - `TotalStockholdersEquity string` Total stockholders equity - `TreasuryStock string` Treasury stock ### Instrument Cash Flow Statement - `type InstrumentCashFlowStatement struct{…}` A quarterly cash flow statement for an instrument. - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountsPayables string` Change in accounts payables - `AccountsReceivables string` Change in accounts receivables - `AcquisitionsNet string` Net acquisitions - `CapitalExpenditure string` Capital expenditure - `CashAtBeginningOfPeriod string` Cash and cash equivalents at beginning of period - `CashAtEndOfPeriod string` Cash and cash equivalents at end of period - `ChangeInWorkingCapital string` Change in working capital - `CommonDividendsPaid string` Common dividends paid - `CommonStockIssuance string` Common stock issuance - `CommonStockRepurchased string` Common stock repurchased (buybacks) - `DeferredIncomeTax string` Deferred income tax expense - `DepreciationAndAmortization string` Depreciation and amortization expense - `EffectOfForexChangesOnCash string` Effect of foreign exchange changes on cash - `FreeCashFlow string` Free cash flow (operating cash flow minus capital expenditure) - `IncomeTaxesPaid string` Income taxes paid - `InterestPaid string` Interest paid - `Inventory string` Change in inventory - `InvestmentsInPropertyPlantAndEquipment string` Investments in property, plant, and equipment - `LongTermNetDebtIssuance string` Long-term net debt issuance - `NetCashProvidedByFinancingActivities string` Net cash provided by financing activities - `NetCashProvidedByInvestingActivities string` Net cash provided by investing activities - `NetCashProvidedByOperatingActivities string` Net cash provided by operating activities - `NetChangeInCash string` Net change in cash during the period - `NetCommonStockIssuance string` Net common stock issuance - `NetDebtIssuance string` Net debt issuance (long-term + short-term) - `NetDividendsPaid string` Net dividends paid (common + preferred) - `NetIncome string` Net income for the period - `NetPreferredStockIssuance string` Net preferred stock issuance - `NetStockIssuance string` Net stock issuance (common + preferred) - `OperatingCashFlow string` Operating cash flow (alternative calculation) - `OtherFinancingActivities string` Other financing activities - `OtherInvestingActivities string` Other investing activities - `OtherNonCashItems string` Other non-cash items - `OtherWorkingCapital string` Change in other working capital - `PreferredDividendsPaid string` Preferred dividends paid - `PurchasesOfInvestments string` Purchases of investments - `SalesMaturitiesOfInvestments string` Sales and maturities of investments - `ShortTermNetDebtIssuance string` Short-term net debt issuance - `StockBasedCompensation string` Stock-based compensation expense ### Instrument Cash Flow Statement List - `type InstrumentCashFlowStatementList []InstrumentCashFlowStatement` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `AccountsPayables string` Change in accounts payables - `AccountsReceivables string` Change in accounts receivables - `AcquisitionsNet string` Net acquisitions - `CapitalExpenditure string` Capital expenditure - `CashAtBeginningOfPeriod string` Cash and cash equivalents at beginning of period - `CashAtEndOfPeriod string` Cash and cash equivalents at end of period - `ChangeInWorkingCapital string` Change in working capital - `CommonDividendsPaid string` Common dividends paid - `CommonStockIssuance string` Common stock issuance - `CommonStockRepurchased string` Common stock repurchased (buybacks) - `DeferredIncomeTax string` Deferred income tax expense - `DepreciationAndAmortization string` Depreciation and amortization expense - `EffectOfForexChangesOnCash string` Effect of foreign exchange changes on cash - `FreeCashFlow string` Free cash flow (operating cash flow minus capital expenditure) - `IncomeTaxesPaid string` Income taxes paid - `InterestPaid string` Interest paid - `Inventory string` Change in inventory - `InvestmentsInPropertyPlantAndEquipment string` Investments in property, plant, and equipment - `LongTermNetDebtIssuance string` Long-term net debt issuance - `NetCashProvidedByFinancingActivities string` Net cash provided by financing activities - `NetCashProvidedByInvestingActivities string` Net cash provided by investing activities - `NetCashProvidedByOperatingActivities string` Net cash provided by operating activities - `NetChangeInCash string` Net change in cash during the period - `NetCommonStockIssuance string` Net common stock issuance - `NetDebtIssuance string` Net debt issuance (long-term + short-term) - `NetDividendsPaid string` Net dividends paid (common + preferred) - `NetIncome string` Net income for the period - `NetPreferredStockIssuance string` Net preferred stock issuance - `NetStockIssuance string` Net stock issuance (common + preferred) - `OperatingCashFlow string` Operating cash flow (alternative calculation) - `OtherFinancingActivities string` Other financing activities - `OtherInvestingActivities string` Other investing activities - `OtherNonCashItems string` Other non-cash items - `OtherWorkingCapital string` Change in other working capital - `PreferredDividendsPaid string` Preferred dividends paid - `PurchasesOfInvestments string` Purchases of investments - `SalesMaturitiesOfInvestments string` Sales and maturities of investments - `ShortTermNetDebtIssuance string` Short-term net debt issuance - `StockBasedCompensation string` Stock-based compensation expense ### Instrument Dividend Event - `type InstrumentDividendEvent struct{…}` Represents a dividend event for an instrument - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. ### Instrument Earnings - `type InstrumentEarnings struct{…}` Represents instrument earnings data - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue ### Instrument Event Envelope - `type InstrumentEventEnvelope struct{…}` Unified envelope for the all-events response. - `Symbol string` Symbol associated with the event. - `Type AllEventsEventType` Event type discriminator. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` - `DividendEventData InstrumentDividendEvent` Dividend payload when type is DIVIDEND. - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `EarningsEventData InstrumentEarnings` Earnings payload when type is EARNINGS. - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument identifier, when the instrument is found in the instrument cache. - `IpoEventData InstrumentEventIpoItem` IPO payload when type is IPO. - `Actions string` IPO action. - `AnnouncedAt Time` IPO announced timestamp. - `Company string` IPO company name. - `Exchange string` IPO exchange. - `MarketCap string` IPO market cap. - `PriceRange string` IPO price range. - `Shares string` IPO shares offered. - `Name string` Instrument name associated with the event, when available. - `ReportingCurrency string` The currency used for reporting financial data. - `StockSplitEventData InstrumentSplitEvent` Stock split payload when type is STOCK_SPLIT. - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") ### Instrument Event Ipo Item - `type InstrumentEventIpoItem struct{…}` IPO event in the all-events date grouping response. - `Actions string` IPO action. - `AnnouncedAt Time` IPO announced timestamp. - `Company string` IPO company name. - `Exchange string` IPO exchange. - `MarketCap string` IPO market cap. - `PriceRange string` IPO price range. - `Shares string` IPO shares offered. ### Instrument Events By Date - `type InstrumentEventsByDate struct{…}` Instrument events for a single date. - `Date Time` Event date. - `Events []InstrumentEventEnvelope` Flat event envelopes for this date. - `Symbol string` Symbol associated with the event. - `Type AllEventsEventType` Event type discriminator. - `const AllEventsEventTypeEarnings AllEventsEventType = "EARNINGS"` - `const AllEventsEventTypeDividend AllEventsEventType = "DIVIDEND"` - `const AllEventsEventTypeStockSplit AllEventsEventType = "STOCK_SPLIT"` - `const AllEventsEventTypeIpo AllEventsEventType = "IPO"` - `DividendEventData InstrumentDividendEvent` Dividend payload when type is DIVIDEND. - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `EarningsEventData InstrumentEarnings` Earnings payload when type is EARNINGS. - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument identifier, when the instrument is found in the instrument cache. - `IpoEventData InstrumentEventIpoItem` IPO payload when type is IPO. - `Actions string` IPO action. - `AnnouncedAt Time` IPO announced timestamp. - `Company string` IPO company name. - `Exchange string` IPO exchange. - `MarketCap string` IPO market cap. - `PriceRange string` IPO price range. - `Shares string` IPO shares offered. - `Name string` Instrument name associated with the event, when available. - `ReportingCurrency string` The currency used for reporting financial data. - `StockSplitEventData InstrumentSplitEvent` Stock split payload when type is STOCK_SPLIT. - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") ### Instrument Events Data - `type InstrumentEventsData struct{…}` Grouped instrument events by type - `Dividends []InstrumentDividendEvent` Dividend distribution events - `AdjustedDividendAmount string` The adjusted dividend amount accounting for any splits. - `ExDate Time` The day the stock starts trading without the right to receive that dividend. - `DeclarationDate Time` The declaration date of the dividend - `DividendAmount string` The dividend amount per share. - `DividendYield string` The dividend yield as a percentage of the stock price. - `Frequency string` The frequency of the dividend payments (e.g., "Quarterly", "Annual"). - `PaymentDate Time` The payment date is the date on which a declared stock dividend is scheduled to be paid. - `RecordDate Time` The record date, set by a company's board of directors, is when a company compiles a list of shareholders of the stock for which it has declared a dividend. - `Earnings []InstrumentEarnings` Earnings announcement events - `Date Time` The date when the earnings report was published - `EpsActual string` The actual earnings per share (EPS) for the period - `EpsEstimate string` The estimated earnings per share (EPS) for the period - `EpsSurprisePercent string` The percentage difference between actual and estimated EPS - `RevenueActual string` The actual total revenue for the period - `RevenueEstimate string` The estimated total revenue for the period - `RevenueSurprisePercent string` The percentage difference between actual and estimated revenue - `InstrumentID string` OEMS instrument UUID from the request - `Splits []InstrumentSplitEvent` Stock split events - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") - `ReportingCurrency string` The currency used for reporting financial data ### Instrument Fundamentals - `type InstrumentFundamentals struct{…}` Supplemental fundamentals and company profile data for an instrument. - `AverageVolume int64` The average daily trading volume over the past 30 days - `Beta string` The beta value, measuring the instrument's volatility relative to the overall market - `Description string` A detailed description of the instrument or company - `DividendYield string` The trailing twelve months (TTM) dividend yield - `EarningsPerShare string` The trailing twelve months (TTM) earnings per share - `FiftyTwoWeekHigh string` The highest price over the last 52 weeks - `FiftyTwoWeekLow string` The lowest price over the last 52 weeks - `Industry string` The specific industry of the instrument's issuer - `ListDate Time` The date the instrument was first listed - `LogoURL string` URL to a representative logo image for the instrument or issuer - `MarketCap string` The total market capitalization - `PreviousClose string` The closing price from the previous trading day - `PriceToEarnings string` The price-to-earnings (P/E) ratio for the trailing twelve months (TTM) - `ReportingCurrency string` The currency used for reporting financial data - `Sector string` The business sector of the instrument's issuer ### Instrument Income Statement - `type InstrumentIncomeStatement struct{…}` A quarterly income statement for an instrument. - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `BottomLineNetIncome string` Bottom line net income after all adjustments - `CostAndExpenses string` Total costs and expenses - `CostOfRevenue string` Direct costs attributable to producing goods sold - `DepreciationAndAmortization string` Depreciation and amortization expenses - `Ebit string` Earnings before interest and taxes - `Ebitda string` Earnings before interest, taxes, depreciation, and amortization - `Eps string` Basic earnings per share - `EpsDiluted string` Diluted earnings per share - `GeneralAndAdministrativeExpenses string` General administrative overhead expenses - `GrossProfit string` Revenue minus cost of revenue - `IncomeBeforeTax string` Income before income tax expense - `IncomeTaxExpense string` Income tax expense for the period - `InterestExpense string` Interest paid on debt - `InterestIncome string` Interest earned on investments and cash - `NetIncome string` Total net income for the period - `NetIncomeDeductions string` Deductions from net income - `NetIncomeFromContinuingOperations string` Net income from continuing operations - `NetIncomeFromDiscontinuedOperations string` Net income from discontinued operations - `NetInterestIncome string` Net interest income (interest income minus interest expense) - `NonOperatingIncomeExcludingInterest string` Non-operating income excluding interest - `OperatingExpenses string` Total operating expenses - `OperatingIncome string` Income from core business operations - `OtherAdjustmentsToNetIncome string` Other adjustments to net income - `OtherExpenses string` Other miscellaneous expenses - `ResearchAndDevelopmentExpenses string` Expenditure on research and development activities - `Revenue string` Total revenue from sales of goods and services - `SellingAndMarketingExpenses string` Expenditure on marketing and sales activities - `SellingGeneralAndAdministrativeExpenses string` Combined selling, general, and administrative expenses - `TotalOtherIncomeExpensesNet string` Net of other income and expenses - `WeightedAverageShsOut string` Weighted average shares outstanding (basic) - `WeightedAverageShsOutDil string` Weighted average shares outstanding (diluted) ### Instrument Income Statement List - `type InstrumentIncomeStatementList []InstrumentIncomeStatement` - `AcceptedDate Time` The date and time when the filing was accepted by the SEC - `FilingDate Time` The date the financial statement was filed - `Period string` The fiscal period identifier (e.g., "Q1", "Q2", "Q3", "Q4") - `PeriodType FiscalPeriodType` The type of fiscal period - `const FiscalPeriodTypeQuarterly FiscalPeriodType = "QUARTERLY"` - `const FiscalPeriodTypeAnnual FiscalPeriodType = "ANNUAL"` - `const FiscalPeriodTypeTtm FiscalPeriodType = "TTM"` - `const FiscalPeriodTypeBiannual FiscalPeriodType = "BIANNUAL"` - `ReportedCurrency string` The currency in which the statement is reported (ISO 4217) - `Year int64` The fiscal year of the statement - `BottomLineNetIncome string` Bottom line net income after all adjustments - `CostAndExpenses string` Total costs and expenses - `CostOfRevenue string` Direct costs attributable to producing goods sold - `DepreciationAndAmortization string` Depreciation and amortization expenses - `Ebit string` Earnings before interest and taxes - `Ebitda string` Earnings before interest, taxes, depreciation, and amortization - `Eps string` Basic earnings per share - `EpsDiluted string` Diluted earnings per share - `GeneralAndAdministrativeExpenses string` General administrative overhead expenses - `GrossProfit string` Revenue minus cost of revenue - `IncomeBeforeTax string` Income before income tax expense - `IncomeTaxExpense string` Income tax expense for the period - `InterestExpense string` Interest paid on debt - `InterestIncome string` Interest earned on investments and cash - `NetIncome string` Total net income for the period - `NetIncomeDeductions string` Deductions from net income - `NetIncomeFromContinuingOperations string` Net income from continuing operations - `NetIncomeFromDiscontinuedOperations string` Net income from discontinued operations - `NetInterestIncome string` Net interest income (interest income minus interest expense) - `NonOperatingIncomeExcludingInterest string` Non-operating income excluding interest - `OperatingExpenses string` Total operating expenses - `OperatingIncome string` Income from core business operations - `OtherAdjustmentsToNetIncome string` Other adjustments to net income - `OtherExpenses string` Other miscellaneous expenses - `ResearchAndDevelopmentExpenses string` Expenditure on research and development activities - `Revenue string` Total revenue from sales of goods and services - `SellingAndMarketingExpenses string` Expenditure on marketing and sales activities - `SellingGeneralAndAdministrativeExpenses string` Combined selling, general, and administrative expenses - `TotalOtherIncomeExpensesNet string` Net of other income and expenses - `WeightedAverageShsOut string` Weighted average shares outstanding (basic) - `WeightedAverageShsOutDil string` Weighted average shares outstanding (diluted) ### Instrument Split Event - `type InstrumentSplitEvent struct{…}` Represents a stock split event for an instrument - `Date Time` The date of the stock split - `Denominator string` The denominator of the split ratio - `Numerator string` The numerator of the split ratio - `SplitType string` The type of stock split (e.g., "stock-split", "stock-dividend", "bonus-issue") ### Price Target - `type PriceTarget struct{…}` Analyst price target statistics - `Average string` Average analyst price target - `Currency string` ISO 4217 currency code of the price targets - `High string` Highest analyst price target - `Low string` Lowest analyst price target # Market Data ## Get Snapshots `client.V1.InstrumentData.MarketData.GetSnapshots(ctx, query) (*V1InstrumentDataMarketDataGetSnapshotsResponse, error)` **get** `/v1/market-data/snapshot` Get market data snapshots for one or more securities. ### Parameters - `query V1InstrumentDataMarketDataGetSnapshotsParams` - `InstrumentIDs param.Field[[]string]` Comma-separated OEMS instrument UUIDs. ### Returns - `type V1InstrumentDataMarketDataGetSnapshotsResponse struct{…}` - `Data MarketDataSnapshotList` - `InstrumentID string` OEMS instrument identifier. - `Symbol string` Display symbol for the security. - `CumulativeVolume int64` Cumulative traded volume reported on the most recent trade, in shares for equities or contracts for options. Absent when no trade is available. - `LastQuote SnapshotQuote` Most recent quote if available. - `Ask string` Current best ask. - `Bid string` Current best bid. - `Midpoint string` Midpoint of bid and ask. - `AskSize int64` Size at the best ask, in shares. - `BidSize int64` Size at the best bid, in shares. - `LastTrade SnapshotLastTrade` Most recent last-sale trade if available. - `Price string` Most recent last-sale eligible trade price. - `Name string` Security name if available. - `Session SnapshotSession` Session metrics computed from previous close and last trade, if available. - `Change string` Absolute change from previous close to last trade. - `ChangePercent string` Percent change from previous close to last trade. - `PreviousClose string` Previous session close price. ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.MarketData.GetSnapshots(context.TODO(), clearstreet.V1InstrumentDataMarketDataGetSnapshotsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "cumulative_volume": 12345678, "instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8", "last_quote": { "ask": "210.14", "ask_size": 120, "bid": "210.10", "bid_size": 100, "midpoint": "210.12" }, "last_trade": { "price": "210.12" }, "name": "Apple Inc.", "session": { "change": "1.82", "change_percent": "0.8737", "previous_close": "208.30" }, "symbol": "AAPL" } ], "error": null, "metadata": { "request_id": "2d0c9159-8f5d-49ca-a861-0d8346fd11da" } } ``` ## Get Daily Aggregate Summaries `client.V1.InstrumentData.MarketData.GetDailySummaries(ctx, query) (*V1InstrumentDataMarketDataGetDailySummariesResponse, error)` **get** `/v1/market-data/daily-summary` Returns the most recent OHLV and current price for the requested OEMS instruments. Backed by the in-memory Polygon snapshot cache. Response contract: every request returns one row per **unique** `instrument_id`, in first-seen request order. Unresolvable IDs come back with `symbol = null` and every market-data field `null`; resolvable IDs with no cache entry come back with `symbol` populated but market-data fields `null`. **Note (temporary):** ID resolution currently goes through the supplemental screener (OEMS instrument_id → FMP fmp_symbol → metadata_id → realtime cache). Removed when the market-data service serves daily aggregates directly, or when Polygon symbology is loaded into the instrument cache. ### Parameters - `query V1InstrumentDataMarketDataGetDailySummariesParams` - `InstrumentIDs param.Field[string]` Comma-separated OEMS instrument UUIDs (required, 1..=100) ### Returns - `type V1InstrumentDataMarketDataGetDailySummariesResponse struct{…}` - `Data DailySummaryList` - `InstrumentID string` OEMS instrument identifier. Always populated; echoes the request ID. - `High string` Session high. - `Low string` Session low. - `Open string` Opening price for the session. - `Symbol string` Display symbol for the security. `None` for unresolvable IDs. - `TradeDate Time` Session date the OHLV represents, US/Eastern. - `Volume int64` Session cumulative trading volume. ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.MarketData.GetDailySummaries(context.TODO(), clearstreet.V1InstrumentDataMarketDataGetDailySummariesParams{ InstrumentIDs: "instrument_ids", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "metadata": { "request_id": "request_id", "next_page_token": "U3RhaW5sZXNzIHJvY2tz", "page_number": 0, "previous_page_token": "U3RhaW5sZXNzIHJvY2tz", "total_items": 0, "total_pages": 0 }, "error": { "code": 400, "message": "Order quantity must be greater than zero", "details": [ { "foo": "bar" } ] }, "data": [ { "instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8", "high": "215.20", "low": "210.10", "open": "211.00", "symbol": "AAPL", "trade_date": "2026-04-23", "volume": 88000000 } ] } ``` ## Domain Types ### Daily Summary - `type DailySummary struct{…}` Daily aggregate (OHLV) summary for a single instrument. Returned by `GET /market-data/daily-summary`. Every field except `instrument_id` is `Option`: - Unresolvable `instrument_id` → all other fields `None` (including `symbol`). - Resolvable `instrument_id` with no realtime cache entry → `symbol` populated, OHLV/`trade_date` `None`. - `trade_date` reflects the session the OHLV represents (today during trading hours, the last trading date during weekends/holidays). - `InstrumentID string` OEMS instrument identifier. Always populated; echoes the request ID. - `High string` Session high. - `Low string` Session low. - `Open string` Opening price for the session. - `Symbol string` Display symbol for the security. `None` for unresolvable IDs. - `TradeDate Time` Session date the OHLV represents, US/Eastern. - `Volume int64` Session cumulative trading volume. ### Daily Summary List - `type DailySummaryList []DailySummary` - `InstrumentID string` OEMS instrument identifier. Always populated; echoes the request ID. - `High string` Session high. - `Low string` Session low. - `Open string` Opening price for the session. - `Symbol string` Display symbol for the security. `None` for unresolvable IDs. - `TradeDate Time` Session date the OHLV represents, US/Eastern. - `Volume int64` Session cumulative trading volume. ### Market Data Snapshot - `type MarketDataSnapshot struct{…}` Market data snapshot for a single security. - `InstrumentID string` OEMS instrument identifier. - `Symbol string` Display symbol for the security. - `CumulativeVolume int64` Cumulative traded volume reported on the most recent trade, in shares for equities or contracts for options. Absent when no trade is available. - `LastQuote SnapshotQuote` Most recent quote if available. - `Ask string` Current best ask. - `Bid string` Current best bid. - `Midpoint string` Midpoint of bid and ask. - `AskSize int64` Size at the best ask, in shares. - `BidSize int64` Size at the best bid, in shares. - `LastTrade SnapshotLastTrade` Most recent last-sale trade if available. - `Price string` Most recent last-sale eligible trade price. - `Name string` Security name if available. - `Session SnapshotSession` Session metrics computed from previous close and last trade, if available. - `Change string` Absolute change from previous close to last trade. - `ChangePercent string` Percent change from previous close to last trade. - `PreviousClose string` Previous session close price. ### Market Data Snapshot List - `type MarketDataSnapshotList []MarketDataSnapshot` - `InstrumentID string` OEMS instrument identifier. - `Symbol string` Display symbol for the security. - `CumulativeVolume int64` Cumulative traded volume reported on the most recent trade, in shares for equities or contracts for options. Absent when no trade is available. - `LastQuote SnapshotQuote` Most recent quote if available. - `Ask string` Current best ask. - `Bid string` Current best bid. - `Midpoint string` Midpoint of bid and ask. - `AskSize int64` Size at the best ask, in shares. - `BidSize int64` Size at the best bid, in shares. - `LastTrade SnapshotLastTrade` Most recent last-sale trade if available. - `Price string` Most recent last-sale eligible trade price. - `Name string` Security name if available. - `Session SnapshotSession` Session metrics computed from previous close and last trade, if available. - `Change string` Absolute change from previous close to last trade. - `ChangePercent string` Percent change from previous close to last trade. - `PreviousClose string` Previous session close price. ### Snapshot Last Trade - `type SnapshotLastTrade struct{…}` Last-trade fields for a market data snapshot. - `Price string` Most recent last-sale eligible trade price. ### Snapshot Quote - `type SnapshotQuote struct{…}` L1 quote fields for a market data snapshot. - `Ask string` Current best ask. - `Bid string` Current best bid. - `Midpoint string` Midpoint of bid and ask. - `AskSize int64` Size at the best ask, in shares. - `BidSize int64` Size at the best bid, in shares. ### Snapshot Session - `type SnapshotSession struct{…}` Session-level pricing metrics for a market data snapshot. - `Change string` Absolute change from previous close to last trade. - `ChangePercent string` Percent change from previous close to last trade. - `PreviousClose string` Previous session close price. # News ## Get News `client.V1.InstrumentData.News.GetNews(ctx, query) (*V1InstrumentDataNewsGetNewsResponse, error)` **get** `/v1/news` Retrieves news items with optional filtering by security IDs, time range, publisher, type, and text query. ### Parameters - `query V1InstrumentDataNewsGetNewsParams` - `ExcludePublishers param.Field[string]` Comma-separated list of publishers to exclude (mutually exclusive with include_publishers). - `From param.Field[string]` Inclusive start timestamp. Accepts `YYYY-MM-DD` or RFC3339 datetime. - `IncludePublishers param.Field[string]` Comma-separated list of publishers to include (mutually exclusive with exclude_publishers). - `InstrumentIDs param.Field[[]string]` Comma-delimited OEMS instrument UUIDs to filter by. - `NewsType param.Field[V1InstrumentDataNewsGetNewsParamsNewsType]` Filter by news type. - `const V1InstrumentDataNewsGetNewsParamsNewsTypeNews V1InstrumentDataNewsGetNewsParamsNewsType = "NEWS"` - `const V1InstrumentDataNewsGetNewsParamsNewsTypePressRelease V1InstrumentDataNewsGetNewsParamsNewsType = "PRESS_RELEASE"` - `PageSize param.Field[int64]` The number of items to return per page. Only used when page_token is not provided. - `PageToken param.Field[string]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. - `SearchQuery param.Field[string]` Free-text query matched against title/text and associated security IDs. - `Sectors param.Field[[]string]` Comma-separated sector values to filter by. - `const V1InstrumentDataNewsGetNewsParamsSectorBasicMaterials V1InstrumentDataNewsGetNewsParamsSector = "BASIC_MATERIALS"` - `const V1InstrumentDataNewsGetNewsParamsSectorCommunicationServices V1InstrumentDataNewsGetNewsParamsSector = "COMMUNICATION_SERVICES"` - `const V1InstrumentDataNewsGetNewsParamsSectorConsumerCyclical V1InstrumentDataNewsGetNewsParamsSector = "CONSUMER_CYCLICAL"` - `const V1InstrumentDataNewsGetNewsParamsSectorConsumerDefensive V1InstrumentDataNewsGetNewsParamsSector = "CONSUMER_DEFENSIVE"` - `const V1InstrumentDataNewsGetNewsParamsSectorEnergy V1InstrumentDataNewsGetNewsParamsSector = "ENERGY"` - `const V1InstrumentDataNewsGetNewsParamsSectorFinancialServices V1InstrumentDataNewsGetNewsParamsSector = "FINANCIAL_SERVICES"` - `const V1InstrumentDataNewsGetNewsParamsSectorHealthcare V1InstrumentDataNewsGetNewsParamsSector = "HEALTHCARE"` - `const V1InstrumentDataNewsGetNewsParamsSectorIndustrials V1InstrumentDataNewsGetNewsParamsSector = "INDUSTRIALS"` - `const V1InstrumentDataNewsGetNewsParamsSectorRealEstate V1InstrumentDataNewsGetNewsParamsSector = "REAL_ESTATE"` - `const V1InstrumentDataNewsGetNewsParamsSectorTechnology V1InstrumentDataNewsGetNewsParamsSector = "TECHNOLOGY"` - `const V1InstrumentDataNewsGetNewsParamsSectorUtilities V1InstrumentDataNewsGetNewsParamsSector = "UTILITIES"` - `To param.Field[string]` Inclusive end timestamp. Accepts `YYYY-MM-DD` or RFC3339 datetime. ### Returns - `type V1InstrumentDataNewsGetNewsResponse struct{…}` - `Data NewsItemList` - `Instruments []NewsInstrument` Instruments associated with this news item. - `InstrumentID string` OEMS instrument UUID. - `Name string` Instrument name/description, if available from instrument cache enrichment. - `Symbol string` Trading symbol, if available from instrument cache enrichment. - `NewsType NewsType` Classification of the item. - `const NewsTypeNews NewsType = "NEWS"` - `const NewsTypePressRelease NewsType = "PRESS_RELEASE"` - `PublishedAt Time` The published date/time of the article in UTC. - `Publisher string` The publisher or newswire source. - `Title string` The headline/title of the article. - `URL string` Canonical URL to the full article. - `ImageURL string` URL of an associated image if provided by the source. - `Site string` The primary domain/site of the publisher. - `Text string` The full or excerpted article body. ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.InstrumentData.News.GetNews(context.TODO(), clearstreet.V1InstrumentDataNewsGetNewsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "instruments": [ { "instrument_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "name": "Apple Inc.", "symbol": "AAPL" } ], "news_type": "NEWS", "published_at": "2025-10-31T14:30:00.000000000Z", "publisher": "Reuters", "site": "reuters.com", "title": "Apple announces new hardware lineup", "url": "https://example.com/news/1" } ], "error": null, "metadata": { "next_page_token": "cGFnZT0yJmxhc3Rfc3ltYm9sPVRTM0E", "page_number": 1, "request_id": "0f1a2b3c-4d5e-6f78-9012-3a4b5c6d7e8f", "total_items": 25, "total_pages": 3 } } ``` ## Domain Types ### News Instrument - `type NewsInstrument struct{…}` Instrument associated with a news item. - `InstrumentID string` OEMS instrument UUID. - `Name string` Instrument name/description, if available from instrument cache enrichment. - `Symbol string` Trading symbol, if available from instrument cache enrichment. ### News Item - `type NewsItem struct{…}` A single news item and its associated instruments. - `Instruments []NewsInstrument` Instruments associated with this news item. - `InstrumentID string` OEMS instrument UUID. - `Name string` Instrument name/description, if available from instrument cache enrichment. - `Symbol string` Trading symbol, if available from instrument cache enrichment. - `NewsType NewsType` Classification of the item. - `const NewsTypeNews NewsType = "NEWS"` - `const NewsTypePressRelease NewsType = "PRESS_RELEASE"` - `PublishedAt Time` The published date/time of the article in UTC. - `Publisher string` The publisher or newswire source. - `Title string` The headline/title of the article. - `URL string` Canonical URL to the full article. - `ImageURL string` URL of an associated image if provided by the source. - `Site string` The primary domain/site of the publisher. - `Text string` The full or excerpted article body. ### News Item List - `type NewsItemList []NewsItem` - `Instruments []NewsInstrument` Instruments associated with this news item. - `InstrumentID string` OEMS instrument UUID. - `Name string` Instrument name/description, if available from instrument cache enrichment. - `Symbol string` Trading symbol, if available from instrument cache enrichment. - `NewsType NewsType` Classification of the item. - `const NewsTypeNews NewsType = "NEWS"` - `const NewsTypePressRelease NewsType = "PRESS_RELEASE"` - `PublishedAt Time` The published date/time of the article in UTC. - `Publisher string` The publisher or newswire source. - `Title string` The headline/title of the article. - `URL string` Canonical URL to the full article. - `ImageURL string` URL of an associated image if provided by the source. - `Site string` The primary domain/site of the publisher. - `Text string` The full or excerpted article body. ### News Type - `type NewsType string` News item classification. - `const NewsTypeNews NewsType = "NEWS"` - `const NewsTypePressRelease NewsType = "PRESS_RELEASE"`