Documentation
¶
Index ¶
- type Agg
- type AssetClass
- type BaseResponse
- type Branding
- type CompanyAddress
- type Comparator
- type Condition
- type CryptoTrade
- type DataType
- type Date
- type DayOptionContractSnapshot
- type DaySnapshot
- type Direction
- type Dividend
- type DividendType
- type ErrorResponse
- type Exchange
- type Financial
- type ForexQuote
- type Frequency
- type GetAggsParams
- type GetAggsResponse
- type GetAllTickersSnapshotParams
- type GetAllTickersSnapshotResponse
- type GetCryptoFullBookSnapshotParams
- type GetCryptoFullBookSnapshotResponse
- type GetDailyOpenCloseAggParams
- type GetDailyOpenCloseAggResponse
- type GetExchangesParams
- type GetExchangesResponse
- type GetGainersLosersSnapshotParams
- type GetGainersLosersSnapshotResponse
- type GetGroupedDailyAggsParams
- type GetGroupedDailyAggsResponse
- type GetLastCryptoTradeParams
- type GetLastCryptoTradeResponse
- type GetLastForexQuoteParams
- type GetLastForexQuoteResponse
- type GetLastQuoteParams
- type GetLastQuoteResponse
- type GetLastTradeParams
- type GetLastTradeResponse
- type GetMarketHolidaysResponse
- type GetMarketStatusResponse
- type GetOptionContractDetailsParams
- type GetOptionContractDetailsResponse
- type GetOptionContractSnapshotParams
- type GetOptionContractSnapshotResponse
- type GetPreviousCloseAggParams
- type GetPreviousCloseAggResponse
- type GetRealTimeCurrencyConversionParams
- type GetRealTimeCurrencyConversionResponse
- type GetTickerDetailsParams
- type GetTickerDetailsResponse
- type GetTickerSnapshotParams
- type GetTickerSnapshotResponse
- type GetTickerTypesParams
- type GetTickerTypesResponse
- type Greeks
- type LastQuote
- type LastQuoteOptionContractSnapshot
- type LastQuoteSnapshot
- type LastTrade
- type LastTradeSnapshot
- type ListConditionsParams
- func (p ListConditionsParams) WithAssetClass(q AssetClass) *ListConditionsParams
- func (p ListConditionsParams) WithDataType(q DataType) *ListConditionsParams
- func (p ListConditionsParams) WithID(q int64) *ListConditionsParams
- func (p ListConditionsParams) WithLimit(q int) *ListConditionsParams
- func (p ListConditionsParams) WithOrder(q Order) *ListConditionsParams
- func (p ListConditionsParams) WithSIP(q SIP) *ListConditionsParams
- func (p ListConditionsParams) WithSort(q Sort) *ListConditionsParams
- type ListConditionsResponse
- type ListDividendsParams
- func (p ListDividendsParams) WithCashAmount(c Comparator, q float64) *ListDividendsParams
- func (p ListDividendsParams) WithDeclarationDate(c Comparator, q Date) *ListDividendsParams
- func (p ListDividendsParams) WithDividendType(q DividendType) *ListDividendsParams
- func (p ListDividendsParams) WithExDividendDate(c Comparator, q Date) *ListDividendsParams
- func (p ListDividendsParams) WithFrequency(q Frequency) *ListDividendsParams
- func (p ListDividendsParams) WithLimit(q int) *ListDividendsParams
- func (p ListDividendsParams) WithOrder(q Order) *ListDividendsParams
- func (p ListDividendsParams) WithSort(q Sort) *ListDividendsParams
- func (p ListDividendsParams) WithTicker(c Comparator, q string) *ListDividendsParams
- type ListDividendsResponse
- type ListOptionContractsParams
- func (p ListOptionContractsParams) WithAsOf(q Date) *ListOptionContractsParams
- func (p ListOptionContractsParams) WithContractType(q string) *ListOptionContractsParams
- func (p ListOptionContractsParams) WithExpirationDate(c Comparator, q Date) *ListOptionContractsParams
- func (p ListOptionContractsParams) WithExpired(q bool) *ListOptionContractsParams
- func (p ListOptionContractsParams) WithStrikePrice(c Comparator, q float64) *ListOptionContractsParams
- func (p ListOptionContractsParams) WithUnderlyingTicker(c Comparator, q string) *ListOptionContractsParams
- type ListOptionContractsResponse
- type ListQuotesParams
- type ListQuotesResponse
- type ListSplitsParams
- func (p ListSplitsParams) WithExecutionDate(c Comparator, q Date) *ListSplitsParams
- func (p ListSplitsParams) WithLimit(q int) *ListSplitsParams
- func (p ListSplitsParams) WithOrder(q Order) *ListSplitsParams
- func (p ListSplitsParams) WithReverseSplit(q bool) *ListSplitsParams
- func (p ListSplitsParams) WithSort(q Sort) *ListSplitsParams
- func (p ListSplitsParams) WithTicker(c Comparator, q string) *ListSplitsParams
- type ListSplitsResponse
- type ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithCIK(q string) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithCompanyName(c NameComparator, q string) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithFilingDate(c Comparator, q Date) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithIncludeSources(q bool) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithLimit(q int) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithOrder(q Order) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithPeriodOfReportDate(c Comparator, q Date) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithSIC(q string) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithSort(q Sort) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithTicker(q string) *ListStockFinancialsParams
- func (p ListStockFinancialsParams) WithTimeframe(q Timeframe) *ListStockFinancialsParams
- type ListStockFinancialsResponse
- type ListTickerNewsParams
- func (p ListTickerNewsParams) WithLimit(q int) *ListTickerNewsParams
- func (p ListTickerNewsParams) WithOrder(q Order) *ListTickerNewsParams
- func (p ListTickerNewsParams) WithPublishedUTC(c Comparator, q Millis) *ListTickerNewsParams
- func (p ListTickerNewsParams) WithSort(q Sort) *ListTickerNewsParams
- func (p ListTickerNewsParams) WithTicker(c Comparator, q string) *ListTickerNewsParams
- type ListTickerNewsResponse
- type ListTickersParams
- func (p ListTickersParams) WithActive(q bool) *ListTickersParams
- func (p ListTickersParams) WithCIK(q int) *ListTickersParams
- func (p ListTickersParams) WithCUSIP(q int) *ListTickersParams
- func (p ListTickersParams) WithDate(q Date) *ListTickersParams
- func (p ListTickersParams) WithExchange(q int) *ListTickersParams
- func (p ListTickersParams) WithLimit(q int) *ListTickersParams
- func (p ListTickersParams) WithMarket(q AssetClass) *ListTickersParams
- func (p ListTickersParams) WithOrder(q Order) *ListTickersParams
- func (p ListTickersParams) WithSearch(q string) *ListTickersParams
- func (p ListTickersParams) WithSort(q Sort) *ListTickersParams
- func (p ListTickersParams) WithTicker(c Comparator, q string) *ListTickersParams
- func (p ListTickersParams) WithType(q string) *ListTickersParams
- type ListTickersResponse
- type ListTradesParams
- type ListTradesResponse
- type MarketHoliday
- type MarketLocale
- type MarketType
- type Millis
- type MinuteSnapshot
- type NameComparator
- type Nanos
- type OptionContract
- type OptionContractAdditionalUnderlying
- type OptionContractSnapshot
- type OptionDetails
- type Order
- type OrderBookQuote
- type PaginationHooks
- type Publisher
- type Quote
- type RequestOption
- type RequestOptions
- type Resolution
- type SIP
- type SnapshotTickerFullBook
- type Sort
- type Split
- type StockFinancial
- type Ticker
- type TickerNews
- type TickerSnapshot
- type TickerType
- type Time
- type Timeframe
- type Trade
- type UnderlyingAsset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agg ¶
type Agg struct { Ticker string `json:"T,omitempty"` Volume float64 `json:"v,omitempty"` VWAP float64 `json:"vw,omitempty"` AggregateVWAP float64 `json:"a,omitempty"` Open float64 `json:"o,omitempty"` Close float64 `json:"c,omitempty"` High float64 `json:"h,omitempty"` Low float64 `json:"l,omitempty"` Timestamp Millis `json:"t,omitempty"` Transactions int64 `json:"n,omitempty"` Market string `json:"m,omitempty"` Exchange int32 `json:"x,omitempty"` Locale string `json:"g,omitempty"` OfficialOpenPrice float64 `json:"op,omitempty"` AverageSize float64 `json:"z,omitempty"` AccumulatedVolume float64 `json:"av,omitempty"` StartTimestamp Millis `json:"s,omitempty"` EndTimestamp Millis `json:"e,omitempty"` }
Agg is an aggregation of all the activity on a specified ticker between the start and end timestamps.
type AssetClass ¶
type AssetClass string
AssetClass is an identifier for a group of similar financial instruments.
const ( AssetStocks AssetClass = "stocks" AssetOptions AssetClass = "options" AssetCrypto AssetClass = "crypto" AssetFx AssetClass = "fx" )
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"` // An error message for unsuccessful requests. ErrorMessage string `json:"error,omitempty"` }
BaseResponse has all possible attributes that any response can use. It's intended to be embedded in a domain specific response struct.
type Branding ¶
type Branding struct { LogoURL string `json:"logo_url,omitempty"` IconURL string `json:"icon_url,omitempty"` }
Branding contains information related to a company's brand.
type CompanyAddress ¶
type CompanyAddress struct { Address1 string `json:"address1,omitempty"` Address2 string `json:"address2,omitempty"` // todo: add this to the spec City string `json:"city,omitempty"` PostalCode string `json:"postal_code,omitempty"` State string `json:"state,omitempty"` }
CompanyAddress contains information on the physical address of a company.
type Comparator ¶
type Comparator string
Comparator is the type of comparison to make for a specific query parameter.
const ( EQ Comparator = "eq" LT Comparator = "lt" LTE Comparator = "lte" GT Comparator = "gt" GTE Comparator = "gte" )
type Condition ¶
type Condition struct { Abbreviation string `json:"abbreviation,omitempty"` AssetClass string `json:"asset_class,omitempty"` DataTypes []string `json:"data_types,omitempty"` Description string `json:"description,omitempty"` Exchange int64 `json:"exchange,omitempty"` ID int64 `json:"id,omitempty"` Legacy bool `json:"legacy"` Name string `json:"name,omitempty"` SIPMapping map[string]string `json:"sip_mapping,omitempty"` Type string `json:"type,omitempty"` UpdateRules map[string]map[string]bool `json:"update_rules,omitempty"` }
Condition contains detailed information on a specified condition.
type CryptoTrade ¶
type CryptoTrade struct { Price float64 `json:"price,omitempty"` Size float64 `json:"size,omitempty"` Exchange int `json:"exchange,omitempty"` Conditions []int `json:"conditions,omitempty"` Timestamp Nanos `json:"timestamp,omitempty"` }
CryptoTrade is a trade for a crypto pair.
type Date ¶
Date represents a short date string of the following format: "2006-01-02".
func (*Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type DayOptionContractSnapshot ¶
type DayOptionContractSnapshot struct { Change float64 `json:"change,omitempty"` ChangePercent float64 `json:"change_percent,omitempty"` Close float64 `json:"close,omitempty"` High float64 `json:"high,omitempty"` LastUpdated Nanos `json:"last_updated,omitempty"` Low float64 `json:"low,omitempty"` Open float64 `json:"open,omitempty"` PreviousClose float64 `json:"previous_close,omitempty"` Volume float64 `json:"volume,omitempty"` VWAP float64 `json:"vwap,omitempty"` }
type DaySnapshot ¶
type Direction ¶
type Direction string
Direction is the direction of the snapshot results to return.
type Dividend ¶
type Dividend struct { CashAmount float64 `json:"cash_amount,omitempty"` DeclarationDate string `json:"declaration_date,omitempty"` DividendType string `json:"dividend_type,omitempty"` ExDividendDate string `json:"ex_dividend_date,omitempty"` Frequency int64 `json:"frequency,omitempty"` PayDate string `json:"pay_date,omitempty"` RecordDate string `json:"record_date,omitempty"` Ticker string `json:"ticker,omitempty"` }
Dividend contains detailed information on a specified stock dividend.
type DividendType ¶
type DividendType string
DividendType is the type of dividend.
const ( DividendCD DividendType = "CD" DividendLT DividendType = "LT" DividendSC DividendType = "SC" DividendST DividendType = "ST" )
type ErrorResponse ¶
type ErrorResponse struct { BaseResponse // An HTTP status code for unsuccessful requests. StatusCode int }
ErrorResponse represents an API response with an error status code.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
Error returns the details of an error response.
type Exchange ¶
type Exchange struct { Acronym string `json:"acronym,omitempty"` AssetClass string `json:"asset_class,omitempty"` ID int64 `json:"id,omitempty"` Locale string `json:"locale,omitempty"` MIC string `json:"mic,omitempty"` Name string `json:"name,omitempty"` OperatingMIC string `json:"operating_mic,omitempty"` ParticipantID string `json:"participant_id,omitempty"` Type string `json:"type,omitempty"` URL string `json:"url,omitempty"` }
Exchange contains detailed information on a specified stock Exchange.
type Financial ¶
type Financial map[string]struct { Formula string `json:"formula,omitempty"` Label string `json:"label,omitempty"` Order int32 `json:"order,omitempty"` Unit string `json:"unit,omitempty"` Value float64 `json:"value,omitempty"` Xpath string `json:"xpath,omitempty"` }
Financial aliases nested data points of information for a stock financial.
type ForexQuote ¶
type ForexQuote struct { Ask float64 `json:"ask,omitempty"` Bid float64 `json:"bid,omitempty"` Exchange int `json:"exchange,omitempty"` Timestamp Nanos `json:"timestamp,omitempty"` }
ForexQuote is a BBO for a forex currency pair.
type Frequency ¶
type Frequency int64
Frequency is the number of times a dividend is paid out over the course of one year.
type GetAggsParams ¶
type GetAggsParams struct { Ticker string `validate:"required" path:"ticker"` Multiplier int `validate:"required" path:"multiplier"` Resolution Resolution `validate:"required" path:"resolution"` From Millis `validate:"required" path:"from"` To Millis `validate:"required" path:"to"` Order *Order `query:"sort"` Limit *int `query:"limit"` Adjusted *bool `query:"adjusted"` Explain *bool `query:"explain"` }
GetAggsParams is the set of parameters for the GetAggs method.
func (GetAggsParams) WithAdjusted ¶
func (p GetAggsParams) WithAdjusted(q bool) *GetAggsParams
func (GetAggsParams) WithExplain ¶
func (p GetAggsParams) WithExplain(q bool) *GetAggsParams
func (GetAggsParams) WithLimit ¶
func (p GetAggsParams) WithLimit(q int) *GetAggsParams
func (GetAggsParams) WithOrder ¶
func (p GetAggsParams) WithOrder(q Order) *GetAggsParams
type GetAggsResponse ¶
type GetAggsResponse struct { BaseResponse Ticker string `json:"ticker,omitempty"` QueryCount int `json:"queryCount,omitempty"` ResultsCount int `json:"resultsCount,omitempty"` Adjusted bool `json:"adjusted"` Results []Agg `json:"results,omitempty"` }
GetAggsResponse is the response returned by the GetAggs method.
type GetAllTickersSnapshotParams ¶
type GetAllTickersSnapshotParams struct { Locale MarketLocale `validate:"required" path:"locale"` MarketType MarketType `validate:"required" path:"marketType"` Tickers *string `query:"tickers"` }
GetAllTickersSnapshotParams is the set of parameters for the GetAllTickersSnapshot method.
func (GetAllTickersSnapshotParams) WithTickers ¶
func (p GetAllTickersSnapshotParams) WithTickers(q string) *GetAllTickersSnapshotParams
type GetAllTickersSnapshotResponse ¶
type GetAllTickersSnapshotResponse struct { BaseResponse Tickers []TickerSnapshot `json:"tickers,omitempty"` }
GetAllTickersSnapshotResponse is the response returned by the GetAllTickersSnapshot method.
type GetCryptoFullBookSnapshotParams ¶
type GetCryptoFullBookSnapshotParams struct {
Ticker string `validate:"required" path:"ticker"`
}
GetCryptoFullBookSnapshotParams is the set of parameters for the GetCryptoFullBookSnapshot method.
type GetCryptoFullBookSnapshotResponse ¶
type GetCryptoFullBookSnapshotResponse struct { BaseResponse Data SnapshotTickerFullBook `json:"data,omitempty"` }
GetCryptoFullBookSnapshotResponse is the response returned by the GetCryptoFullBookSnapshot method.
type GetDailyOpenCloseAggParams ¶
type GetDailyOpenCloseAggParams struct { Ticker string `validate:"required" path:"ticker"` Date Date `validate:"required" path:"date"` Adjusted *bool `query:"adjusted"` }
GetDailyOpenCloseAggParams is the set of parameters for the GetDailyOpenCloseAgg method.
func (GetDailyOpenCloseAggParams) WithAdjusted ¶
func (p GetDailyOpenCloseAggParams) WithAdjusted(q bool) *GetDailyOpenCloseAggParams
type GetDailyOpenCloseAggResponse ¶
type GetDailyOpenCloseAggResponse struct { BaseResponse Symbol string `json:"symbol,omitempty"` From string `json:"from,omitempty"` Open float64 `json:"open,omitempty"` High float64 `json:"high,omitempty"` Low float64 `json:"low,omitempty"` Close float64 `json:"close,omitempty"` Volume float64 `json:"volume,omitempty"` AfterHours float64 `json:"afterHours,omitempty"` PreMarket float64 `json:"preMarket,omitempty"` }
GetDailyOpenCloseAggResponse is the response for the GetDailyOpenCloseAgg method.
type GetExchangesParams ¶
type GetExchangesParams struct { AssetClass *AssetClass `query:"asset_class,omitempty"` Locale *MarketLocale `query:"locale,omitempty"` }
GetExchangesParams is the set of parameters for the GetExchanges method.
func (GetExchangesParams) WithAssetClass ¶
func (p GetExchangesParams) WithAssetClass(q AssetClass) *GetExchangesParams
func (GetExchangesParams) WithLocale ¶
func (p GetExchangesParams) WithLocale(q MarketLocale) *GetExchangesParams
type GetExchangesResponse ¶
type GetExchangesResponse struct { BaseResponse Results []Exchange `json:"results,omitempty"` }
GetExchangesResponse is the response returned by the GetExchanges method.
type GetGainersLosersSnapshotParams ¶
type GetGainersLosersSnapshotParams struct { Locale MarketLocale `validate:"required" path:"locale"` MarketType MarketType `validate:"required" path:"marketType"` Direction Direction `validate:"required" path:"direction"` }
GetGainersLosersSnapshotParams is the set of parameters for the GetGainersLosersSnapshot method.
type GetGainersLosersSnapshotResponse ¶
type GetGainersLosersSnapshotResponse struct { BaseResponse Tickers []TickerSnapshot `json:"tickers,omitempty"` }
GetGainersLosersSnapshotResponse is the response returned by the GetGainersLosersSnapshot method.
type GetGroupedDailyAggsParams ¶
type GetGroupedDailyAggsParams struct { Locale MarketLocale `validate:"required" path:"locale"` MarketType MarketType `validate:"required" path:"marketType"` Date Date `validate:"required" path:"date"` Adjusted *bool `query:"adjusted"` }
GetGroupedDailyAggsParams is the set of parameters for the GetGroupedDailyAggs method.
func (GetGroupedDailyAggsParams) WithAdjusted ¶
func (p GetGroupedDailyAggsParams) WithAdjusted(q bool) *GetGroupedDailyAggsParams
type GetGroupedDailyAggsResponse ¶
type GetGroupedDailyAggsResponse struct { BaseResponse Ticker string `json:"ticker,omitempty"` QueryCount int `json:"queryCount,omitempty"` ResultsCount int `json:"resultsCount,omitempty"` Adjusted bool `json:"adjusted"` Results []Agg `json:"results,omitempty"` }
GetGroupedDailyAggsResponse is the response returned by the GetGroupedDailyAggs method.
type GetLastCryptoTradeParams ¶
type GetLastCryptoTradeParams struct { From string `validate:"required" path:"from"` To string `validate:"required" path:"to"` }
GetLastCryptoTradeParams is the set of parameters for the GetLastCryptoTrade method.
type GetLastCryptoTradeResponse ¶
type GetLastCryptoTradeResponse struct { BaseResponse Symbol string `json:"symbol,omitempty"` Last CryptoTrade `json:"last,omitempty"` }
GetLastCryptoTradeResponse is the response returned by the GetLastCryptoTrade method.
type GetLastForexQuoteParams ¶
type GetLastForexQuoteParams struct { From string `validate:"required" path:"from"` To string `validate:"required" path:"to"` }
GetLastForexQuoteParams is the set of parameters for the GetLastForexQuote method.
type GetLastForexQuoteResponse ¶
type GetLastForexQuoteResponse struct { BaseResponse Symbol string `json:"symbol,omitempty"` Last ForexQuote `json:"last,omitempty"` }
GetLastForexQuoteResponse is the response returned by the GetLastForexQuote method.
type GetLastQuoteParams ¶
type GetLastQuoteParams struct {
Ticker string `validate:"required" path:"ticker"`
}
GetLastQuoteParams is the set of parameters for the GetLastQuote method.
type GetLastQuoteResponse ¶
type GetLastQuoteResponse struct { BaseResponse Results LastQuote `json:"results,omitempty"` }
GetLastQuoteResponse is the response returned by the GetLastQuote method.
type GetLastTradeParams ¶
type GetLastTradeParams struct {
Ticker string `validate:"required" path:"ticker"`
}
GetLastTradeParams is the set of parameters for GetLastTrade method.
type GetLastTradeResponse ¶
type GetLastTradeResponse struct { BaseResponse Results LastTrade `json:"results,omitempty"` }
GetLastTradeResponse is the response returned by the GetLastTradeResponse method.
type GetMarketHolidaysResponse ¶
type GetMarketHolidaysResponse []MarketHoliday
GetMarketHolidaysResponse is the response returned by the GetMarketHolidays method.
type GetMarketStatusResponse ¶
type GetMarketStatusResponse struct { AfterHours bool `json:"afterHours"` Currencies map[string]string `json:"currencies,omitempty"` EarlyHours bool `json:"earlyHours"` Exchanges map[string]string `json:"exchanges,omitempty"` Market string `json:"market,omitempty"` ServerTime Time `json:"serverTime,omitempty"` }
GetMarketStatusResponse is the response returned by the GetMarketStatus method.
type GetOptionContractDetailsParams ¶
type GetOptionContractDetailsParams struct { // The OptionTicker symbol of the asset. OptionTicker string `validate:"required" path:"options_ticker"` // Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date. AsOf *Date `query:"as_of"` }
GetOptionContractDetailsParams is the set of parameters for the GetOptionContractDetails method.
func (GetOptionContractDetailsParams) WithAsOf ¶
func (p GetOptionContractDetailsParams) WithAsOf(q Date) *GetOptionContractDetailsParams
WithAsOf sets the as_of parameter to the request
type GetOptionContractDetailsResponse ¶
type GetOptionContractDetailsResponse struct { BaseResponse Results OptionContract `json:"results,omitempty"` }
GetOptionContractDetailsResponse contains the result of the GetOptionContractDetails API call
type GetOptionContractSnapshotParams ¶
type GetOptionContractSnapshotParams struct { UnderlyingAsset string `validate:"required" path:"underlyingAsset"` OptionContract string `validate:"required" path:"optionContract"` }
GetOptionContractSnapshotParams is the set of parameters for the GetOptionContractSnapshot method.
type GetOptionContractSnapshotResponse ¶
type GetOptionContractSnapshotResponse struct { BaseResponse Results OptionContractSnapshot `json:"results,omitempty"` }
GetOptionContractSnapshotResponse is the response returned by the GetOptionContractSnapshot method.
type GetPreviousCloseAggParams ¶
type GetPreviousCloseAggParams struct { Ticker string `validate:"required" path:"ticker"` Adjusted *bool `query:"adjusted"` }
GetPreviousCloseAggParams is the set of parameters for the GetPreviousCloseAgg method.
func (GetPreviousCloseAggParams) WithAdjusted ¶
func (p GetPreviousCloseAggParams) WithAdjusted(q bool) *GetPreviousCloseAggParams
type GetPreviousCloseAggResponse ¶
type GetPreviousCloseAggResponse struct { BaseResponse Ticker string `json:"ticker,omitempty"` QueryCount int `json:"queryCount,omitempty"` ResultsCount int `json:"resultsCount,omitempty"` Adjusted bool `json:"adjusted"` Results []Agg `json:"results,omitempty"` }
GetPreviousCloseAggResponse is the response returned by the GetPreviousCloseAgg method.
type GetRealTimeCurrencyConversionParams ¶
type GetRealTimeCurrencyConversionParams struct { From string `validate:"required" path:"from"` To string `validate:"required" path:"to"` }
GetRealTimeCurrencyConversionParams is the set of parameters for the GetRealTimeCurrencyConversion method.
type GetRealTimeCurrencyConversionResponse ¶
type GetRealTimeCurrencyConversionResponse struct { BaseResponse InitialAmount float64 `json:"initialAmount,omitempty"` Converted float64 `json:"converted,omitempty"` From string `json:"from,omitempty"` To string `json:"to,omitempty"` LastQuote ForexQuote `json:"last,omitempty"` }
GetRealTimeCurrencyConversionResponse is the response returned by the GetRealTimeCurrencyConversion method.
type GetTickerDetailsParams ¶
type GetTickerDetailsParams struct { // The ticker symbol of the asset. Ticker string `validate:"required" path:"ticker"` // Specify a point in time to get information about the ticker available on that date. When retrieving information // from SEC filings, we compare this date with the period of report date on the SEC filing. // // For example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on // 2019-06-29. That means that the filing was submitted on 2019-07-31, but the filing was created based on // information from 2019-06-29. If you were to query for AAPL details on 2019-06-29, the ticker details would // include information from the SEC filing. // // Defaults to the most recent available date. Date *Date `query:"date"` }
GetTickerDetailsParams is the set of parameters for the GetTickerDetails method.
func (GetTickerDetailsParams) WithDate ¶
func (p GetTickerDetailsParams) WithDate(q Date) *GetTickerDetailsParams
type GetTickerDetailsResponse ¶
type GetTickerDetailsResponse struct { BaseResponse // Ticker with details. Results Ticker `json:"results,omitempty"` }
GetTickerDetailsResponse is the response returned by the GetTickerDetails method.
type GetTickerSnapshotParams ¶
type GetTickerSnapshotParams struct { Locale MarketLocale `validate:"required" path:"locale"` MarketType MarketType `validate:"required" path:"marketType"` Ticker string `validate:"required" path:"ticker"` }
GetTickerSnapshotParams is the set of parameters for the GetTickerSnapshot method.
type GetTickerSnapshotResponse ¶
type GetTickerSnapshotResponse struct { BaseResponse Snapshot TickerSnapshot `json:"ticker,omitempty"` }
GetTickerSnapshotResponse is the response returned by the GetTickerSnapshot method.
type GetTickerTypesParams ¶
type GetTickerTypesParams struct { // Filter by asset class. AssetClass *AssetClass `query:"asset_class"` // Filter by locale. Locale *MarketLocale `query:"locale"` }
GetTickerTypesParams is the set of parameters for the GetTickerTypes method.
func (GetTickerTypesParams) WithAssetClass ¶
func (p GetTickerTypesParams) WithAssetClass(q AssetClass) *GetTickerTypesParams
func (GetTickerTypesParams) WithLocale ¶
func (p GetTickerTypesParams) WithLocale(q MarketLocale) *GetTickerTypesParams
type GetTickerTypesResponse ¶
type GetTickerTypesResponse struct { BaseResponse // Ticker type results. Results []TickerType `json:"results,omitempty"` }
GetTickerTypesResponse is the response returned by the GetTickerTypes method.
type LastQuote ¶
type LastQuote struct { Ticker string `json:"T,omitempty"` AskExchange int `json:"X,omitempty"` AskPrice float64 `json:"P,omitempty"` AskSize float64 `json:"S,omitempty"` BidExchange int `json:"x,omitempty"` BidPrice float64 `json:"p,omitempty"` BidSize float64 `json:"s,omitempty"` Conditions []int32 `json:"c,omitempty"` Indicators []int32 `json:"i,omitempty"` ParticipantTimestamp Nanos `json:"y,omitempty"` SequenceNumber Nanos `json:"q,omitempty"` SipTimestamp Nanos `json:"t,omitempty"` Tape int32 `json:"z,omitempty"` TrfTimestamp Nanos `json:"f,omitempty"` }
LastQuote is the most recent NBBO for a ticker symbol.
type LastQuoteOptionContractSnapshot ¶
type LastQuoteOptionContractSnapshot struct { Ask float64 `json:"ask,omitempty"` AskSize float64 `json:"ask_size,omitempty"` Bid float64 `json:"bid,omitempty"` BidSize float64 `json:"bid_size,omitempty"` LastUpdated Nanos `json:"last_updated,omitempty"` Midpoint float64 `json:"midpoint,omitempty"` Timeframe string `json:"timeframe,omitempty"` }
type LastQuoteSnapshot ¶
type LastTrade ¶
type LastTrade struct { Ticker string `json:"T,omitempty"` TRFTimestamp Nanos `json:"f,omitempty"` SequenceNumber int64 `json:"q,omitempty"` Timestamp Nanos `json:"t,omitempty"` ParticipantTimestamp Nanos `json:"y,omitempty"` Conditions []int32 `json:"c,omitempty"` Correction uint32 `json:"e,omitempty"` ID string `json:"i,omitempty"` Price float64 `json:"p,omitempty"` TRF int32 `json:"r,omitempty"` Size uint32 `json:"s,omitempty"` Exchange int32 `json:"x,omitempty"` Tape int32 `json:"z,omitempty"` }
LastTrade is the most recent trade for a specified ticker.
type LastTradeSnapshot ¶
type ListConditionsParams ¶
type ListConditionsParams struct { AssetClass *AssetClass `query:"asset_class,omitempty"` DataType *DataType `query:"data_type,omitempty"` ID *int64 `query:"id,omitempty"` SIP *SIP `query:"sip,omitempty"` Sort *Sort `query:"sort"` Order *Order `query:"order"` Limit *int `query:"limit"` }
ListConditionsParams is the set of parameters for the ListConditions method.
func (ListConditionsParams) WithAssetClass ¶
func (p ListConditionsParams) WithAssetClass(q AssetClass) *ListConditionsParams
func (ListConditionsParams) WithDataType ¶
func (p ListConditionsParams) WithDataType(q DataType) *ListConditionsParams
func (ListConditionsParams) WithID ¶
func (p ListConditionsParams) WithID(q int64) *ListConditionsParams
func (ListConditionsParams) WithLimit ¶
func (p ListConditionsParams) WithLimit(q int) *ListConditionsParams
func (ListConditionsParams) WithOrder ¶
func (p ListConditionsParams) WithOrder(q Order) *ListConditionsParams
func (ListConditionsParams) WithSIP ¶
func (p ListConditionsParams) WithSIP(q SIP) *ListConditionsParams
func (ListConditionsParams) WithSort ¶
func (p ListConditionsParams) WithSort(q Sort) *ListConditionsParams
type ListConditionsResponse ¶
type ListConditionsResponse struct { BaseResponse Results []Condition `json:"results,omitempty"` }
ListConditionsResponse is the response returned by the ListConditions method.
type ListDividendsParams ¶
type ListDividendsParams struct { TickerEQ *string `query:"ticker"` TickerLT *string `query:"ticker.lt"` TickerLTE *string `query:"ticker.lte"` TickerGT *string `query:"ticker.gt"` TickerGTE *string `query:"ticker.gte"` ExDividendDateEQ *Date `query:"ex_dividend_date"` ExDividendDateLT *Date `query:"ex_dividend_date.lt"` ExDividendDateLTE *Date `query:"ex_dividend_date.lte"` ExDividendDateGT *Date `query:"ex_dividend_date.gt"` ExDividendDateGTE *Date `query:"ex_dividend_date.gte"` RecordDateEQ *Date `query:"record_date"` RecordDateLT *Date `query:"record_date.lt"` RecordDateLTE *Date `query:"record_date.lte"` RecordDateGT *Date `query:"record_date.gt"` RecordDateGTE *Date `query:"record_date.gte"` DeclarationDateEQ *Date `query:"declaration_date"` DeclarationDateLT *Date `query:"declaration_date.lt"` DeclarationDateLTE *Date `query:"declaration_date.lte"` DeclarationDateGT *Date `query:"declaration_date.gt"` DeclarationDateGTE *Date `query:"declaration_date.gte"` PayDateEQ *Date `query:"pay_date"` PayDateLT *Date `query:"pay_date.lt"` PayDateLTE *Date `query:"pay_date.lte"` PayDateGT *Date `query:"pay_date.gt"` PayDateGTE *Date `query:"pay_date.gte"` Frequency *Frequency `query:"frequency"` CashAmountEQ *float64 `query:"cash_amount"` CashAmountLT *float64 `query:"cash_amount.lt"` CashAmountLTE *float64 `query:"cash_amount.lte"` CashAmountGT *float64 `query:"cash_amount.gt"` CashAmountGTE *float64 `query:"cash_amount.gte"` DividendType *DividendType `query:"dividend_type"` Sort *Sort `query:"sort"` Order *Order `query:"order"` Limit *int `query:"limit"` }
ListDividendsParams is the set of parameters for the ListDividends method.
func (ListDividendsParams) WithCashAmount ¶
func (p ListDividendsParams) WithCashAmount(c Comparator, q float64) *ListDividendsParams
func (ListDividendsParams) WithDeclarationDate ¶
func (p ListDividendsParams) WithDeclarationDate(c Comparator, q Date) *ListDividendsParams
func (ListDividendsParams) WithDividendType ¶
func (p ListDividendsParams) WithDividendType(q DividendType) *ListDividendsParams
func (ListDividendsParams) WithExDividendDate ¶
func (p ListDividendsParams) WithExDividendDate(c Comparator, q Date) *ListDividendsParams
func (ListDividendsParams) WithFrequency ¶
func (p ListDividendsParams) WithFrequency(q Frequency) *ListDividendsParams
func (ListDividendsParams) WithLimit ¶
func (p ListDividendsParams) WithLimit(q int) *ListDividendsParams
func (ListDividendsParams) WithOrder ¶
func (p ListDividendsParams) WithOrder(q Order) *ListDividendsParams
func (ListDividendsParams) WithSort ¶
func (p ListDividendsParams) WithSort(q Sort) *ListDividendsParams
func (ListDividendsParams) WithTicker ¶
func (p ListDividendsParams) WithTicker(c Comparator, q string) *ListDividendsParams
type ListDividendsResponse ¶
type ListDividendsResponse struct { BaseResponse Results []Dividend `json:"results,omitempty"` }
ListDividendsResponse is the response returned by the ListDividends method.
type ListOptionContractsParams ¶
type ListOptionContractsParams struct { TickerEQ *string `query:"underlying_ticker"` TickerLT *string `query:"underlying_ticker.lt"` TickerLTE *string `query:"underlying_ticker.lte"` TickerGT *string `query:"underlying_ticker.gt"` TickerGTE *string `query:"underlying_ticker.gte"` ContractType *string `query:"contract_type"` ExpirationDateEQ *Date `query:"expiration_date"` ExpirationDateLT *Date `query:"expiration_date.lt"` ExpirationDateLTE *Date `query:"expiration_date.lte"` ExpirationDateGT *Date `query:"expiration_date.gt"` ExpirationDateGTE *Date `query:"expiration_date.gte"` StrikePriceEQ *float64 `query:"strike_price"` StrikePriceLT *float64 `query:"strike_price.lt"` StrikePriceLTE *float64 `query:"strike_price.lte"` StrikePriceGT *float64 `query:"strike_price.gt"` StrikePriceGTE *float64 `query:"strike_price.gte"` AsOf *Date `query:"as_of"` Expired *bool `query:"expired"` }
ListOptionContractsParams is the set of parameters for the ListContracts method.
func (ListOptionContractsParams) WithAsOf ¶
func (p ListOptionContractsParams) WithAsOf(q Date) *ListOptionContractsParams
WithAsOf add as of filter
func (ListOptionContractsParams) WithContractType ¶
func (p ListOptionContractsParams) WithContractType(q string) *ListOptionContractsParams
WithContractType add contract type filter
func (ListOptionContractsParams) WithExpirationDate ¶
func (p ListOptionContractsParams) WithExpirationDate(c Comparator, q Date) *ListOptionContractsParams
WithExpirationDate add expiration date filter
func (ListOptionContractsParams) WithExpired ¶
func (p ListOptionContractsParams) WithExpired(q bool) *ListOptionContractsParams
WithExpired add expiration filter
func (ListOptionContractsParams) WithStrikePrice ¶
func (p ListOptionContractsParams) WithStrikePrice(c Comparator, q float64) *ListOptionContractsParams
WithStrikePrice add a strike price filter
func (ListOptionContractsParams) WithUnderlyingTicker ¶
func (p ListOptionContractsParams) WithUnderlyingTicker(c Comparator, q string) *ListOptionContractsParams
WithUnderlyingTicker add underlying ticker filter
type ListOptionContractsResponse ¶
type ListOptionContractsResponse struct { BaseResponse Results []OptionContract `json:"results,omitempty"` }
ListOptionContractsResponse contains the result of the ListOptionsContracts API call
type ListQuotesParams ¶
type ListQuotesParams struct { Ticker string `validate:"required" path:"ticker"` TimestampEQ *Nanos `query:"timestamp"` TimestampLT *Nanos `query:"timestamp.lt"` TimestampLTE *Nanos `query:"timestamp.lte"` TimestampGT *Nanos `query:"timestamp.gt"` TimestampGTE *Nanos `query:"timestamp.gte"` Order *Order `query:"order"` Limit *int `query:"limit"` Sort *Sort `query:"sort"` }
ListQuotesParams is the set of parameters for the ListQuotes method.
func (ListQuotesParams) WithLimit ¶
func (p ListQuotesParams) WithLimit(q int) *ListQuotesParams
func (ListQuotesParams) WithOrder ¶
func (p ListQuotesParams) WithOrder(q Order) *ListQuotesParams
func (ListQuotesParams) WithSort ¶
func (p ListQuotesParams) WithSort(q Sort) *ListQuotesParams
func (ListQuotesParams) WithTimestamp ¶
func (p ListQuotesParams) WithTimestamp(c Comparator, q Nanos) *ListQuotesParams
type ListQuotesResponse ¶
type ListQuotesResponse struct { BaseResponse Results []Quote `json:"results,omitempty"` }
ListQuotesResponse is the response returned by the ListQuotes method.
type ListSplitsParams ¶
type ListSplitsParams struct { TickerEQ *string `query:"ticker"` TickerLT *string `query:"ticker.lt"` TickerLTE *string `query:"ticker.lte"` TickerGT *string `query:"ticker.gt"` TickerGTE *string `query:"ticker.gte"` ExecutionDateEQ *Date `query:"execution_date"` ExecutionDateLT *Date `query:"execution_date.lt"` ExecutionDateLTE *Date `query:"execution_date.lte"` ExecutionDateGT *Date `query:"execution_date.gt"` ExecutionDateGTE *Date `query:"execution_date.gte"` ReverseSplit *bool `query:"reverse_split"` Sort *Sort `query:"sort"` Order *Order `query:"order"` Limit *int `query:"limit"` }
ListSplitsParams is the set of parameters for the ListSplits method.
func (ListSplitsParams) WithExecutionDate ¶
func (p ListSplitsParams) WithExecutionDate(c Comparator, q Date) *ListSplitsParams
func (ListSplitsParams) WithLimit ¶
func (p ListSplitsParams) WithLimit(q int) *ListSplitsParams
func (ListSplitsParams) WithOrder ¶
func (p ListSplitsParams) WithOrder(q Order) *ListSplitsParams
func (ListSplitsParams) WithReverseSplit ¶
func (p ListSplitsParams) WithReverseSplit(q bool) *ListSplitsParams
func (ListSplitsParams) WithSort ¶
func (p ListSplitsParams) WithSort(q Sort) *ListSplitsParams
func (ListSplitsParams) WithTicker ¶
func (p ListSplitsParams) WithTicker(c Comparator, q string) *ListSplitsParams
type ListSplitsResponse ¶
type ListSplitsResponse struct { BaseResponse Results []Split `json:"results,omitempty"` }
ListSplitsResponse is the response returned by the ListSplits method.
type ListStockFinancialsParams ¶
type ListStockFinancialsParams struct { Ticker *string `query:"ticker"` CIK *string `query:"cik"` CompanyNameFull *string `query:"company_name"` CompanyNameSearch *string `query:"company_name.search"` SIC *string `query:"sic"` FilingDateEQ *Date `query:"filing_dividend_date"` FilingDateLT *Date `query:"filing_dividend_date.lt"` FilingDateLTE *Date `query:"filing_dividend_date.lte"` FilingDateGT *Date `query:"filing_dividend_date.gt"` FilingDateGTE *Date `query:"filing_dividend_date.gte"` PeriodOfReportDateEQ *Date `query:"period_of_report_date"` PeriodOfReportDateLT *Date `query:"period_of_report_date.lt"` PeriodOfReportDateLTE *Date `query:"period_of_report_date.lte"` PeriodOfReportDateGT *Date `query:"period_of_report_date.gt"` PeriodOfReportDateGTE *Date `query:"period_of_report_date.gte"` Timeframe *Timeframe `query:"timeframe"` IncludeSources *bool `query:"include_sources"` Sort *Sort `query:"sort"` Order *Order `query:"order"` Limit *int `query:"limit"` }
ListStockFinancialsParams is the set of parameters for the ListFinancials method.
func (ListStockFinancialsParams) WithCIK ¶
func (p ListStockFinancialsParams) WithCIK(q string) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithCompanyName ¶
func (p ListStockFinancialsParams) WithCompanyName(c NameComparator, q string) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithFilingDate ¶
func (p ListStockFinancialsParams) WithFilingDate(c Comparator, q Date) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithIncludeSources ¶
func (p ListStockFinancialsParams) WithIncludeSources(q bool) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithLimit ¶
func (p ListStockFinancialsParams) WithLimit(q int) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithOrder ¶
func (p ListStockFinancialsParams) WithOrder(q Order) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithPeriodOfReportDate ¶
func (p ListStockFinancialsParams) WithPeriodOfReportDate(c Comparator, q Date) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithSIC ¶
func (p ListStockFinancialsParams) WithSIC(q string) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithSort ¶
func (p ListStockFinancialsParams) WithSort(q Sort) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithTicker ¶
func (p ListStockFinancialsParams) WithTicker(q string) *ListStockFinancialsParams
func (ListStockFinancialsParams) WithTimeframe ¶
func (p ListStockFinancialsParams) WithTimeframe(q Timeframe) *ListStockFinancialsParams
type ListStockFinancialsResponse ¶
type ListStockFinancialsResponse struct { BaseResponse Results []StockFinancial `json:"results,omitempty"` }
ListStockFinancialsResponse is the response returned by the ListFinancials method.
type ListTickerNewsParams ¶
type ListTickerNewsParams struct { // Return results that contain this ticker. TickerEQ *string `query:"ticker"` TickerLT *string `query:"ticker.lt"` TickerLTE *string `query:"ticker.lte"` TickerGT *string `query:"ticker.gt"` TickerGTE *string `query:"ticker.gte"` // Return results published on, before, or after this date. PublishedUtcEQ *Millis `query:"published_utc"` PublishedUtcLT *Millis `query:"published_utc.lt"` PublishedUtcLTE *Millis `query:"published_utc.lte"` PublishedUtcGT *Millis `query:"published_utc.gt"` PublishedUtcGTE *Millis `query:"published_utc.gte"` // Sort field used for ordering. Sort *Sort `query:"sort"` // Order results based on the sort field. Order *Order `query:"order"` // Limit the number of results returned, default is 10 and max is 1000. Limit *int `query:"limit"` }
ListTickerNewsParams is the set of parameters for the ListTickerNews method.
func (ListTickerNewsParams) WithLimit ¶
func (p ListTickerNewsParams) WithLimit(q int) *ListTickerNewsParams
func (ListTickerNewsParams) WithOrder ¶
func (p ListTickerNewsParams) WithOrder(q Order) *ListTickerNewsParams
func (ListTickerNewsParams) WithPublishedUTC ¶
func (p ListTickerNewsParams) WithPublishedUTC(c Comparator, q Millis) *ListTickerNewsParams
func (ListTickerNewsParams) WithSort ¶
func (p ListTickerNewsParams) WithSort(q Sort) *ListTickerNewsParams
func (ListTickerNewsParams) WithTicker ¶
func (p ListTickerNewsParams) WithTicker(c Comparator, q string) *ListTickerNewsParams
type ListTickerNewsResponse ¶
type ListTickerNewsResponse struct { BaseResponse // Ticker news results. Results []TickerNews `json:"results,omitempty"` }
ListTickerNewsResponse is the response returned by the ListTickerNews method.
type ListTickersParams ¶
type ListTickersParams struct { // Specify a ticker symbol. Defaults to empty string which queries all tickers. TickerEQ *string `query:"ticker"` TickerLT *string `query:"ticker.lt"` TickerLTE *string `query:"ticker.lte"` TickerGT *string `query:"ticker.gt"` TickerGTE *string `query:"ticker.gte"` // Specify the type of the tickers. Find the types that we support via our Ticker Types API. Defaults to empty // string which queries all types. Type *string `query:"type"` // Filter by market type. By default all markets are included. Market *AssetClass `query:"market"` // Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes at // the ISO org website. Defaults to empty string which queries all exchanges. Exchange *int `query:"exchange"` // Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes at their // website. Defaults to empty string which queries all CUSIPs. // // Note: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response. CUSIP *int `query:"cusip"` // Specify the CIK of the asset you want to search for. Find more information about CIK codes at their website. // Defaults to empty string which queries all CIKs. CIK *int `query:"cik"` // Specify a point in time to retrieve tickers available on that date. Defaults to the most recent available date. Date *Date `query:"date"` // Specify if the tickers returned should be actively traded on the queried date. Default is true. Active *bool `query:"active"` // Search for terms within the ticker and/or company name. Search *string `query:"search"` // The field to sort the results on. Default is ticker. If the search query parameter is present, sort is ignored // and results are ordered by relevance. Sort *Sort `query:"sort"` // The order to sort the results on. Default is asc (ascending). Order *Order `query:"order"` // Limit the size of the response, default is 100 and max is 1000. Limit *int `query:"limit"` }
ListTickersParams is the set of parameters for the ListTickers method.
func (ListTickersParams) WithActive ¶
func (p ListTickersParams) WithActive(q bool) *ListTickersParams
func (ListTickersParams) WithCIK ¶
func (p ListTickersParams) WithCIK(q int) *ListTickersParams
func (ListTickersParams) WithCUSIP ¶
func (p ListTickersParams) WithCUSIP(q int) *ListTickersParams
func (ListTickersParams) WithDate ¶
func (p ListTickersParams) WithDate(q Date) *ListTickersParams
func (ListTickersParams) WithExchange ¶
func (p ListTickersParams) WithExchange(q int) *ListTickersParams
func (ListTickersParams) WithLimit ¶
func (p ListTickersParams) WithLimit(q int) *ListTickersParams
func (ListTickersParams) WithMarket ¶
func (p ListTickersParams) WithMarket(q AssetClass) *ListTickersParams
func (ListTickersParams) WithOrder ¶
func (p ListTickersParams) WithOrder(q Order) *ListTickersParams
func (ListTickersParams) WithSearch ¶
func (p ListTickersParams) WithSearch(q string) *ListTickersParams
func (ListTickersParams) WithSort ¶
func (p ListTickersParams) WithSort(q Sort) *ListTickersParams
func (ListTickersParams) WithTicker ¶
func (p ListTickersParams) WithTicker(c Comparator, q string) *ListTickersParams
func (ListTickersParams) WithType ¶
func (p ListTickersParams) WithType(q string) *ListTickersParams
type ListTickersResponse ¶
type ListTickersResponse struct { BaseResponse // An array of tickers that match your query. Note: Although you can query by CUSIP, due to legal reasons we do not // return the CUSIP in the response. Results []Ticker `json:"results,omitempty"` }
ListTickersResponse is the response returned by the ListTickers method.
type ListTradesParams ¶
type ListTradesParams struct { Ticker string `validate:"required" path:"ticker"` TimestampEQ *Nanos `query:"timestamp"` TimestampLT *Nanos `query:"timestamp.lt"` TimestampLTE *Nanos `query:"timestamp.lte"` TimestampGT *Nanos `query:"timestamp.gt"` TimestampGTE *Nanos `query:"timestamp.gte"` Sort *Sort `query:"sort"` Order *Order `query:"order"` Limit *int `query:"limit"` }
ListTradesParams is the set of parameters for the ListTrades method.
func (ListTradesParams) WithLimit ¶
func (p ListTradesParams) WithLimit(q int) *ListTradesParams
func (ListTradesParams) WithOrder ¶
func (p ListTradesParams) WithOrder(q Order) *ListTradesParams
func (ListTradesParams) WithSort ¶
func (p ListTradesParams) WithSort(q Sort) *ListTradesParams
func (ListTradesParams) WithTimestamp ¶
func (p ListTradesParams) WithTimestamp(c Comparator, q Nanos) *ListTradesParams
type ListTradesResponse ¶
type ListTradesResponse struct { BaseResponse Results []Trade `json:"results,omitempty"` }
ListTradesResponse is the response returned by the ListTrades method.
type MarketHoliday ¶
type MarketHoliday struct { Exchange string `json:"exchange,omitempty"` Name string `json:"name,omitempty"` Date Date `json:"date,omitempty"` Status string `json:"status,omitempty"` Open Time `json:"open,omitempty"` Close Time `json:"close,omitempty"` }
MarketHoliday represents a market holiday for a specific exchange.
type MarketLocale ¶
type MarketLocale string
Locale is the market location.
const ( US MarketLocale = "us" Global MarketLocale = "global" )
type MarketType ¶
type MarketType string
MarketType is the type of market.
const ( Stocks MarketType = "stocks" Forex MarketType = "forex" Crypto MarketType = "crypto" )
type Millis ¶
Millis represents a Unix time in milliseconds since January 1, 1970 UTC.
func (*Millis) MarshalJSON ¶
func (*Millis) UnmarshalJSON ¶
type MinuteSnapshot ¶
type NameComparator ¶
type NameComparator string
NameComparator is the type of comparison to make for the company_name query parameter in Stock Financials.
const ( Full NameComparator = "full" Search NameComparator = "search" )
type Nanos ¶
Nanos represents a Unix time in nanoseconds since January 1, 1970 UTC.
func (*Nanos) MarshalJSON ¶
func (*Nanos) UnmarshalJSON ¶
type OptionContract ¶
type OptionContract struct { CFI string `json:"cfi,omitempty"` ContractType string `json:"contract_type,omitempty"` ExerciseStyle string `json:"exercise_style,omitempty"` ExpirationDate Date `json:"expiration_date,omitempty"` PrimaryExchange string `json:"primary_exchange,omitempty"` StrikePrice float64 `json:"strike_price,omitempty"` Ticker string `json:"ticker,omitempty"` UnderLyingTicker string `json:"underlying_ticker,omitempty"` AdditionalUnderlyings []OptionContractAdditionalUnderlying `json:"additional_underlyings,omitempty"` }
OptionContract contains an options contract details
type OptionContractSnapshot ¶
type OptionContractSnapshot struct { BreakEvenPrice float64 `json:"break_even_price,omitempty"` Day DayOptionContractSnapshot `json:"day,omitempty"` Details OptionDetails `json:"details,omitempty"` Greeks Greeks `json:"greeks,omitempty"` ImpliedVolatility float64 `json:"implied_volatility,omitempty"` LastQuote LastQuoteOptionContractSnapshot `json:"last_quote,omitempty"` OpenInterest float64 `json:"open_interest,omitempty"` UnderlyingAsset UnderlyingAsset `json:"underlying_asset,omitempty"` }
type OptionDetails ¶
type Order ¶
type Order string
Order the results. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).
type OrderBookQuote ¶
type OrderBookQuote struct { Price float64 `json:"p,omitempty"` }
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 Publisher ¶
type Publisher struct { FaviconURL string `json:"favicon_url,omitempty"` HomepageURL string `json:"homepage_url,omitempty"` LogoURL string `json:"logo_url,omitempty"` Name string `json:"name,omitempty"` }
Publisher contains information on a new article publisher.
type Quote ¶
type Quote struct { AskExchange int `json:"ask_exchange,omitempty"` AskPrice float64 `json:"ask_price,omitempty"` AskSize float64 `json:"ask_size,omitempty"` BidExchange int `json:"bid_exchange,omitempty"` BidPrice float64 `json:"bid_price,omitempty"` BidSize float64 `json:"bid_size,omitempty"` Conditions []int32 `json:"conditions,omitempty"` Indicators []int32 `json:"indicators,omitempty"` ParticipantTimestamp Nanos `json:"participant_timestamp,omitempty"` SequenceNumber Nanos `json:"sequence_number,omitempty"` SipTimestamp Nanos `json:"sip_timestamp,omitempty"` Tape int32 `json:"tape,omitempty"` TrfTimestamp Nanos `json:"trf_timestamp,omitempty"` }
Quote is an NBBO for a ticker symbol in a given time range.
type RequestOption ¶
type RequestOption func(o *RequestOptions)
RequestOption changes the configuration of RequestOptions.
func QueryParam ¶
func QueryParam(key, value string) RequestOption
QueryParam sets a query param as an option.
type RequestOptions ¶
type RequestOptions struct { // APIKey to pass with the request APIKey *string // Headers to apply to the request Headers http.Header // Query params to apply to the request QueryParams url.Values }
RequestOptions are used to configure client calls.
type Resolution ¶
type Resolution string
Resolution is the size of the time window.
const ( Minute Resolution = "minute" Hour Resolution = "hour" Day Resolution = "day" Week Resolution = "week" Month Resolution = "month" Quarter Resolution = "quarter" Year Resolution = "year" )
type SnapshotTickerFullBook ¶
type SnapshotTickerFullBook struct { AskCount float64 `json:"askCount,omitempty"` Asks []OrderBookQuote `json:"asks,omitempty"` BidCount float64 `json:"bidCount,omitempty"` Bids []OrderBookQuote `json:"bids,omitempty"` Spread float64 `json:"spread,omitempty"` Ticker string `json:"ticker,omitempty"` Updated Nanos `json:"updated,omitempty"` }
type Sort ¶
type Sort string
Sort is a query param type that specifies how the results should be sorted.
const ( TickerSymbol Sort = "ticker" Name Sort = "name" Market Sort = "market" Locale Sort = "locale" PrimaryExchange Sort = "primary_exchange" Type Sort = "type" CurrencySymbol Sort = "currency_symbol" CurrencyName Sort = "currency_name" BaseCurrencySymbol Sort = "base_currency_symbol" BaseCurrencyName Sort = "base_currency_name" CIK Sort = "cik" CompositeFIGI Sort = "composite_figi" PublishedUTC Sort = "published_utc" LastUpdatedUTC Sort = "last_updated_utc" DelistedUTC Sort = "delisted_utc" Timestamp Sort = "timestamp" )
type Split ¶
type Split struct { ExecutionDate string `json:"execution_date,omitempty"` SplitFrom int64 `json:"split_from,omitempty"` SplitTo int64 `json:"split_to,omitempty"` Ticker string `json:"ticker,omitempty"` }
Split contains detailed information on a specified stock split.
type StockFinancial ¶
type StockFinancial struct { CIK string `json:"cik,omitempty"` CompanyName string `json:"company_name,omitempty"` EndDate string `json:"end_date,omitempty"` FilingDate string `json:"filing_date,omitempty"` Financials map[string]Financial `json:"financials,omitempty"` FiscalPeriod string `json:"fiscal_period,omitempty"` FiscalYear string `json:"fiscal_year,omitempty"` SourceFilingFileUrl string `json:"source_filing_file_url,omitempty"` SourceFilingUrl string `json:"source_filing_url,omitempty"` StartDate string `json:"start_date,omitempty"` }
StockFinancial contains detailed information on a specified stock financial.
type Ticker ¶
type Ticker struct { Active bool `json:"active"` Address CompanyAddress `json:"address,omitempty"` Branding Branding `json:"branding,omitempty"` CIK string `json:"cik,omitempty"` CompositeFIGI string `json:"composite_figi,omitempty"` CurrencyName string `json:"currency_name,omitempty"` DelistedUTC Time `json:"delisted_utc,omitempty"` Description string `json:"description,omitempty"` HomepageURL string `json:"homepage_url,omitempty"` LastUpdatedUTC Time `json:"last_updated_utc,omitempty"` ListDate Date `json:"list_date,omitempty"` Locale string `json:"locale,omitempty"` Market string `json:"market,omitempty"` MarketCap float64 `json:"market_cap,omitempty"` Name string `json:"name,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` PrimaryExchange string `json:"primary_exchange,omitempty"` SICCode string `json:"sic_code,omitempty"` SICDescription string `json:"sic_description,omitempty"` Ticker string `json:"ticker,omitempty"` TickerRoot string `json:"ticker_root,omitempty"` TickerSuffix string `json:"ticker_suffix,omitempty"` TotalEmployees int32 `json:"total_employees,omitempty"` Type string `json:"type,omitempty"` }
Ticker contains detailed information on a specified ticker symbol.
type TickerNews ¶
type TickerNews struct { AMPURL string `json:"amp_url,omitempty"` ArticleURL string `json:"article_url,omitempty"` Author string `json:"author,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id,omitempty"` ImageURL string `json:"image_url,omitempty"` Keywords []string `json:"keywords,omitempty"` PublishedUTC Time `json:"published_utc,omitempty"` Publisher Publisher `json:"publisher,omitempty"` Tickers []string `json:"tickers,omitempty"` Title string `json:"title,omitempty"` }
TickerNews contains information on a ticker news article.
type TickerSnapshot ¶
type TickerSnapshot struct { Day DaySnapshot `json:"day,omitempty"` LastQuote LastQuoteSnapshot `json:"lastQuote,omitempty"` LastTrade LastTradeSnapshot `json:"lastTrade,omitempty"` Minute MinuteSnapshot `json:"min,omitempty"` PrevDay DaySnapshot `json:"prevDay,omitempty"` Ticker string `json:"ticker,omitempty"` TodaysChange float64 `json:"todaysChange,omitempty"` TodaysChangePerc float64 `json:"todaysChangePerc,omitempty"` Updated Nanos `json:"updated,omitempty"` }
TickerSnapshot is a collection of data for a ticker including the current minute, day, and previous day's aggregate, as well as the last trade and quote.
type TickerType ¶
type TickerType struct { AssetClass string `json:"asset_class,omitempty"` Code string `json:"code,omitempty"` Description string `json:"description,omitempty"` Locale string `json:"locale,omitempty"` }
TickerType represents a type of ticker with a code that the API understands.
type Time ¶
Time represents a long date string of the following format: "2006-01-02T15:04:05.000Z".
func (*Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type Timeframe ¶
type Timeframe string
TimeFrame is the type of time frame query parameter for stock financials.
type Trade ¶
type Trade struct { Conditions []int32 `json:"conditions,omitempty"` Correction int `json:"correction,omitempty"` Exchange int `json:"exchange,omitempty"` ID string `json:"id,omitempty"` ParticipantTimestamp Nanos `json:"participant_timestamp,omitempty"` Price float64 `json:"price,omitempty"` SequenceNumber int64 `json:"sequence_number,omitempty"` SipTimestamp Nanos `json:"sip_timestamp,omitempty"` Size float64 `json:"size,omitempty"` Tape int32 `json:"tape,omitempty"` TrfID int `json:"trf_id,omitempty"` TrfTimestamp Nanos `json:"trf_timestamp,omitempty"` }
Trade contains trade data for a specified ticker symbol.