Documentation
¶
Overview ¶
models/futures.go
Index ¶
- Constants
- type Agg
- type AssetClass
- type BaseResponse
- type Branding
- type CompanyAddress
- type Comparator
- type Condition
- type ContractType
- type CryptoTrade
- type DataType
- type Date
- type DayOptionContractSnapshot
- type DaySnapshot
- type Details
- type Direction
- type Dividend
- type DividendType
- type ErrorResponse
- type Exchange
- type Financial
- type ForexQuote
- type Frequency
- type FullBookSnapshot
- type FuturesAggregate
- type FuturesContract
- type FuturesMarketStatus
- type FuturesProduct
- type FuturesQuote
- type FuturesSchedule
- type FuturesTrade
- type GetAggsParams
- type GetAggsResponse
- type GetAllTickersSnapshotParams
- type GetAllTickersSnapshotResponse
- type GetCryptoFullBookSnapshotParams
- type GetCryptoFullBookSnapshotResponse
- type GetDailyOpenCloseAggParams
- type GetDailyOpenCloseAggResponse
- type GetEMAParams
- func (p GetEMAParams) WithAdjusted(q bool) *GetEMAParams
- func (p GetEMAParams) WithExpandUnderlying(q bool) *GetEMAParams
- func (p GetEMAParams) WithLimit(q int) *GetEMAParams
- func (p GetEMAParams) WithOrder(q Order) *GetEMAParams
- func (p GetEMAParams) WithSeriesType(q SeriesType) *GetEMAParams
- func (p GetEMAParams) WithTimespan(q Timespan) *GetEMAParams
- func (p GetEMAParams) WithTimestamp(c Comparator, q Millis) *GetEMAParams
- func (p GetEMAParams) WithWindow(q int) *GetEMAParams
- type GetEMAResponse
- type GetExchangesParams
- type GetExchangesResponse
- type GetFuturesContractParams
- type GetFuturesContractResponse
- type GetFuturesProductParams
- type GetFuturesProductResponse
- type GetGainersLosersSnapshotParams
- type GetGainersLosersSnapshotResponse
- type GetGroupedDailyAggsParams
- type GetGroupedDailyAggsResponse
- type GetIndicesSnapshotParams
- type GetIndicesSnapshotResponse
- type GetLastCryptoTradeParams
- type GetLastCryptoTradeResponse
- type GetLastForexQuoteParams
- type GetLastForexQuoteResponse
- type GetLastQuoteParams
- type GetLastQuoteResponse
- type GetLastTradeParams
- type GetLastTradeResponse
- type GetMACDParams
- func (p GetMACDParams) WithAdjusted(q bool) *GetMACDParams
- func (p GetMACDParams) WithExpandUnderlying(q bool) *GetMACDParams
- func (p GetMACDParams) WithLimit(q int) *GetMACDParams
- func (p GetMACDParams) WithLongWindow(q int) *GetMACDParams
- func (p GetMACDParams) WithOrder(q Order) *GetMACDParams
- func (p GetMACDParams) WithSeriesType(q SeriesType) *GetMACDParams
- func (p GetMACDParams) WithShortWindow(q int) *GetMACDParams
- func (p GetMACDParams) WithSignalWindow(q int) *GetMACDParams
- func (p GetMACDParams) WithTimespan(q Timespan) *GetMACDParams
- func (p GetMACDParams) WithTimestamp(c Comparator, q Millis) *GetMACDParams
- type GetMACDResponse
- type GetMarketHolidaysResponse
- type GetMarketStatusResponse
- type GetOptionContractSnapshotParams
- type GetOptionContractSnapshotResponse
- type GetOptionsContractParams
- type GetOptionsContractResponse
- type GetPreviousCloseAggParams
- type GetPreviousCloseAggResponse
- type GetRSIParams
- func (p GetRSIParams) WithAdjusted(q bool) *GetRSIParams
- func (p GetRSIParams) WithExpandUnderlying(q bool) *GetRSIParams
- func (p GetRSIParams) WithLimit(q int) *GetRSIParams
- func (p GetRSIParams) WithOrder(q Order) *GetRSIParams
- func (p GetRSIParams) WithSeriesType(q SeriesType) *GetRSIParams
- func (p GetRSIParams) WithTimespan(q Timespan) *GetRSIParams
- func (p GetRSIParams) WithTimestamp(c Comparator, q Millis) *GetRSIParams
- func (p GetRSIParams) WithWindow(q int) *GetRSIParams
- type GetRSIResponse
- type GetRealTimeCurrencyConversionParams
- type GetRealTimeCurrencyConversionResponse
- type GetSMAParams
- func (p GetSMAParams) WithAdjusted(q bool) *GetSMAParams
- func (p GetSMAParams) WithExpandUnderlying(q bool) *GetSMAParams
- func (p GetSMAParams) WithLimit(q int) *GetSMAParams
- func (p GetSMAParams) WithOrder(q Order) *GetSMAParams
- func (p GetSMAParams) WithSeriesType(q SeriesType) *GetSMAParams
- func (p GetSMAParams) WithTimespan(q Timespan) *GetSMAParams
- func (p GetSMAParams) WithTimestamp(c Comparator, q Millis) *GetSMAParams
- func (p GetSMAParams) WithWindow(q int) *GetSMAParams
- type GetSMAResponse
- type GetSummaryParams
- type GetSummaryResponse
- type GetTickerDetailsParams
- type GetTickerDetailsResponse
- type GetTickerEventsParams
- type GetTickerEventsResponse
- type GetTickerRelatedCompaniesParams
- type GetTickerRelatedCompaniesResponse
- type GetTickerSnapshotParams
- type GetTickerSnapshotResponse
- type GetTickerTypesParams
- type GetTickerTypesResponse
- type Greeks
- type IPOResult
- type IndexSession
- type IndexSnapshot
- type Insights
- type LastQuote
- type LastQuoteOptionContractSnapshot
- type LastQuoteSnapshot
- type LastTrade
- type LastTradeOptionContractSnapshot
- type LastTradeSnapshot
- type ListAggsParams
- type ListAggsResponse
- type ListAssetSnapshotsParamsdeprecated
- func (p ListAssetSnapshotsParams) WithTicker(q string) *ListAssetSnapshotsParams
- func (p ListAssetSnapshotsParams) WithTickerAnyOf(q string) *ListAssetSnapshotsParams
- func (p ListAssetSnapshotsParams) WithTickersByComparison(c Comparator, q string) *ListAssetSnapshotsParams
- func (p ListAssetSnapshotsParams) WithType(q string) *ListAssetSnapshotsParams
- type ListAssetSnapshotsResponsedeprecated
- 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) WithPayDate(c Comparator, q Date) *ListDividendsParams
- func (p ListDividendsParams) WithSort(q Sort) *ListDividendsParams
- func (p ListDividendsParams) WithTicker(c Comparator, q string) *ListDividendsParams
- type ListDividendsResponse
- type ListFuturesAggsParams
- type ListFuturesAggsResponse
- type ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithActive(q string) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithAsOf(q Date) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithFirstTradeDate(q Date) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithLastTradeDate(q Date) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithLimit(q int) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithProductCode(q string) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithSort(q string) *ListFuturesContractsParams
- func (p ListFuturesContractsParams) WithType(q string) *ListFuturesContractsParams
- type ListFuturesContractsResponse
- type ListFuturesMarketStatusesParams
- func (p ListFuturesMarketStatusesParams) WithLimit(q int) *ListFuturesMarketStatusesParams
- func (p ListFuturesMarketStatusesParams) WithProductCode(q string) *ListFuturesMarketStatusesParams
- func (p ListFuturesMarketStatusesParams) WithProductCodeAnyOf(q string) *ListFuturesMarketStatusesParams
- func (p ListFuturesMarketStatusesParams) WithSort(q string) *ListFuturesMarketStatusesParams
- type ListFuturesMarketStatusesResponse
- type ListFuturesProductSchedulesParams
- func (p ListFuturesProductSchedulesParams) WithLimit(q int) *ListFuturesProductSchedulesParams
- func (p ListFuturesProductSchedulesParams) WithSessionEndDate(c Comparator, q Date) *ListFuturesProductSchedulesParams
- func (p ListFuturesProductSchedulesParams) WithSort(q string) *ListFuturesProductSchedulesParams
- type ListFuturesProductSchedulesResponse
- type ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithAsOf(q Date) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithAssetClass(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithAssetSubClass(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithLimit(q int) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithName(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithNameSearch(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithSector(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithSort(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithSubSector(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithTradingVenue(q string) *ListFuturesProductsParams
- func (p ListFuturesProductsParams) WithType(q string) *ListFuturesProductsParams
- type ListFuturesProductsResponse
- type ListFuturesQuotesParams
- func (p ListFuturesQuotesParams) WithLimit(q int) *ListFuturesQuotesParams
- func (p ListFuturesQuotesParams) WithSessionEndDate(c Comparator, q string) *ListFuturesQuotesParams
- func (p ListFuturesQuotesParams) WithSort(q string) *ListFuturesQuotesParams
- func (p ListFuturesQuotesParams) WithTimestamp(c Comparator, q Nanos) *ListFuturesQuotesParams
- type ListFuturesQuotesResponse
- type ListFuturesSchedulesParams
- func (p ListFuturesSchedulesParams) WithLimit(q int) *ListFuturesSchedulesParams
- func (p ListFuturesSchedulesParams) WithSessionEndDate(q Date) *ListFuturesSchedulesParams
- func (p ListFuturesSchedulesParams) WithSort(q string) *ListFuturesSchedulesParams
- func (p ListFuturesSchedulesParams) WithTradingVenue(q string) *ListFuturesSchedulesParams
- type ListFuturesSchedulesResponse
- type ListFuturesTradesParams
- func (p ListFuturesTradesParams) WithLimit(q int) *ListFuturesTradesParams
- func (p ListFuturesTradesParams) WithSessionEndDate(c Comparator, q string) *ListFuturesTradesParams
- func (p ListFuturesTradesParams) WithSort(q string) *ListFuturesTradesParams
- func (p ListFuturesTradesParams) WithTimestamp(c Comparator, q Nanos) *ListFuturesTradesParams
- type ListFuturesTradesResponse
- type ListIPOsParams
- func (p ListIPOsParams) WithIPOStatus(q string) *ListIPOsParams
- func (p ListIPOsParams) WithISIN(q string) *ListIPOsParams
- func (p ListIPOsParams) WithLimit(q int) *ListIPOsParams
- func (p ListIPOsParams) WithListingDate(c Comparator, q string) *ListIPOsParams
- func (p ListIPOsParams) WithOrder(q Order) *ListIPOsParams
- func (p ListIPOsParams) WithSort(q Sort) *ListIPOsParams
- func (p ListIPOsParams) WithTicker(q string) *ListIPOsParams
- func (p ListIPOsParams) WithUSCode(q string) *ListIPOsParams
- type ListIPOsResponse
- type ListOptionsChainParams
- func (o ListOptionsChainParams) WithContractType(contractType ContractType) *ListOptionsChainParams
- func (o ListOptionsChainParams) WithExpirationDate(comparator Comparator, expirationDate Date) *ListOptionsChainParams
- func (o ListOptionsChainParams) WithLimit(limit int) *ListOptionsChainParams
- func (o ListOptionsChainParams) WithOrder(order Order) *ListOptionsChainParams
- func (o ListOptionsChainParams) WithSort(sort Sort) *ListOptionsChainParams
- func (o ListOptionsChainParams) WithStrikePrice(comparator Comparator, strikePrice float64) *ListOptionsChainParams
- type ListOptionsChainSnapshotResponse
- type ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithAsOf(q Date) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithContractType(q string) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithExpirationDate(c Comparator, q Date) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithExpired(q bool) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithLimit(q int) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithOrder(q Order) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithSort(q Sort) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithStrikePrice(c Comparator, q float64) *ListOptionsContractsParams
- func (p ListOptionsContractsParams) WithUnderlyingTicker(c Comparator, q string) *ListOptionsContractsParams
- type ListOptionsContractsResponse
- type ListQuotesParams
- func (p ListQuotesParams) WithDay(year int, month time.Month, day int) *ListQuotesParams
- func (p ListQuotesParams) WithLimit(q int) *ListQuotesParams
- func (p ListQuotesParams) WithOrder(q Order) *ListQuotesParams
- func (p ListQuotesParams) WithSort(q Sort) *ListQuotesParams
- func (p ListQuotesParams) WithTimestamp(c Comparator, q Nanos) *ListQuotesParams
- type ListQuotesResponse
- type ListShortInterestParams
- func (p ListShortInterestParams) WithAvgDailyVolume(c Comparator, q string) *ListShortInterestParams
- func (p ListShortInterestParams) WithDaysToCover(c Comparator, q string) *ListShortInterestParams
- func (p ListShortInterestParams) WithLimit(q int) *ListShortInterestParams
- func (p ListShortInterestParams) WithOrder(q Order) *ListShortInterestParams
- func (p ListShortInterestParams) WithSettlementDate(c Comparator, q string) *ListShortInterestParams
- func (p ListShortInterestParams) WithSort(q Sort) *ListShortInterestParams
- func (p ListShortInterestParams) WithTicker(c Comparator, q string) *ListShortInterestParams
- type ListShortInterestResponse
- type ListShortVolumeParams
- func (p ListShortVolumeParams) WithDate(c Comparator, q string) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithLimit(q int) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithOrder(q Order) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithShortVolumeRatio(c Comparator, q string) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithSort(q Sort) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithTicker(c Comparator, q string) *ListShortVolumeParams
- func (p ListShortVolumeParams) WithTotalVolume(c Comparator, q string) *ListShortVolumeParams
- type ListShortVolumeResponse
- 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 string) *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
- func (p ListTradesParams) WithDay(year int, month time.Month, day int) *ListTradesParams
- func (p ListTradesParams) WithLimit(q int) *ListTradesParams
- func (p ListTradesParams) WithOrder(q Order) *ListTradesParams
- func (p ListTradesParams) WithSort(q Sort) *ListTradesParams
- func (p ListTradesParams) WithTimestamp(c Comparator, q Nanos) *ListTradesParams
- type ListTradesResponse
- type ListTreasuryYieldsParams
- func (p ListTreasuryYieldsParams) WithDate(c Comparator, q string) *ListTreasuryYieldsParams
- func (p ListTreasuryYieldsParams) WithLimit(q int) *ListTreasuryYieldsParams
- func (p ListTreasuryYieldsParams) WithOrder(q Order) *ListTreasuryYieldsParams
- func (p ListTreasuryYieldsParams) WithSort(q Sort) *ListTreasuryYieldsParams
- type ListTreasuryYieldsResponse
- type ListUniversalSnapshotsParams
- func (p ListUniversalSnapshotsParams) WithTicker(q string) *ListUniversalSnapshotsParams
- func (p ListUniversalSnapshotsParams) WithTickerAnyOf(q string) *ListUniversalSnapshotsParams
- func (p ListUniversalSnapshotsParams) WithTickersByComparison(c Comparator, q string) *ListUniversalSnapshotsParams
- func (p ListUniversalSnapshotsParams) WithType(q string) *ListUniversalSnapshotsParams
- type ListUniversalSnapshotsResponse
- type MACDIndicatorResults
- type MACDIndicatorValue
- type MACDIndicatorValues
- type MarketHoliday
- type MarketLocale
- type MarketType
- type Millis
- type MinuteSnapshot
- type NameComparator
- type Nanos
- type OptionContractSnapshot
- type OptionDetails
- type Options
- type OptionsContract
- type Order
- type OrderBookQuote
- type PaginationHooks
- type Publisher
- type Quote
- type RelatedCompany
- type RequestOption
- type RequestOptions
- type SIP
- type SIPMapping
- type ScheduleEvent
- type SeriesType
- type Session
- type ShortInterest
- type ShortVolume
- type SingleIndicatorResults
- type SingleIndicatorValue
- type SingleIndicatorValues
- type SnapshotLastMinute
- type SnapshotLastQuote
- type SnapshotLastTrade
- type SnapshotResponseModel
- type Sort
- type Split
- type StockFinancial
- type SummaryResult
- type Ticker
- type TickerChangeEvent
- type TickerEvent
- type TickerEventResult
- type TickerNews
- type TickerSnapshot
- type TickerType
- type Time
- type Timeframe
- type Timespan
- type Trade
- type TreasuryYield
- type Underlying
- type UnderlyingAsset
- type UnderlyingResults
- type UpdateRules
Constants ¶
const ( // HeaderEdgeID is a required Launchpad header. It identifies the Edge User requesting data. HeaderEdgeID = "X-Massive-Edge-ID" // HeaderEdgeIPAddress is a required Launchpad header. It denotes the originating IP Address of the Edge User requesting data. HeaderEdgeIPAddress = "X-Massive-Edge-IP-Address" // HeaderEdgeUserAgent is an optional Launchpad header. It denotes the originating UserAgent of the Edge User requesting data. HeaderEdgeUserAgent = "X-Massive-Edge-User-Agent" )
Headers required to use the Launchpad product.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agg ¶
type Agg struct {
Ticker string `json:"T,omitempty"`
Close float64 `json:"c,omitempty"`
High float64 `json:"h,omitempty"`
Low float64 `json:"l,omitempty"`
Transactions int64 `json:"n,omitempty"`
Open float64 `json:"o,omitempty"`
Timestamp Millis `json:"t,omitempty"`
Volume float64 `json:"v,omitempty"`
VWAP float64 `json:"vw,omitempty"`
OTC bool `json:"otc,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" AssetOTC AssetClass = "otc" AssetIndices AssetClass = "indices" )
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 SIPMapping `json:"sip_mapping,omitempty"`
Type string `json:"type,omitempty"`
UpdateRules UpdateRules `json:"update_rules,omitempty"`
}
Condition contains detailed information on a specified condition.
type ContractType ¶
type ContractType string
ContractType is the type of contract.
const ( ContractCall ContractType = "call" ContractPut ContractType = "put" ContractOther ContractType = "other" )
type CryptoTrade ¶
type CryptoTrade struct {
Conditions []int `json:"conditions,omitempty"`
Exchange int `json:"exchange,omitempty"`
Price float64 `json:"price,omitempty"`
Size float64 `json:"size,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"`
}
DayOptionContractSnapshot contains the most recent day agg for an option contract.
type DaySnapshot ¶
type DaySnapshot struct {
Close float64 `json:"c,omitempty"`
High float64 `json:"h,omitempty"`
Low float64 `json:"l,omitempty"`
Open float64 `json:"o,omitempty"`
Volume float64 `json:"v,omitempty"`
VolumeWeightedAverage float64 `json:"vw,omitempty"`
OTC bool `json:"otc,omitempty"`
}
DaySnapshot is the most recent day agg for a ticker.
type Details ¶
type Details struct {
ContractType string `json:"contract_type,omitempty"`
ExerciseStyle string `json:"exercise_style,omitempty"`
ExpirationDate string `json:"expiration_date,omitempty"`
StrikePrice float64 `json:"strike_price,omitempty"`
}
Details contains all the information that might come back in the details attribute of a SnapshotResponse.
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 Date `json:"declaration_date,omitempty"`
DividendType string `json:"dividend_type,omitempty"`
ExDividendDate string `json:"ex_dividend_date,omitempty"`
Frequency int64 `json:"frequency,omitempty"`
PayDate Date `json:"pay_date,omitempty"`
RecordDate Date `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 FullBookSnapshot ¶
type FullBookSnapshot 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"`
}
FullBookSnapshot is the level 2 book of a single crypto ticker.
type FuturesAggregate ¶
type FuturesAggregate struct {
Close float64 `json:"close,omitempty"`
DollarVolume float64 `json:"dollar_volume,omitempty"`
High float64 `json:"high,omitempty"`
Low float64 `json:"low,omitempty"`
Open float64 `json:"open,omitempty"`
SessionEndDate string `json:"session_end_date,omitempty"`
SettlementPrice float64 `json:"settlement_price,omitempty"`
Ticker string `json:"ticker,omitempty"`
Transactions int64 `json:"transaction_count,omitempty"`
Volume int64 `json:"volume,omitempty"`
WindowStart Nanos `json:"window_start,omitempty"`
}
FuturesAggregate represents an aggregate for a futures contract.
type FuturesContract ¶
type FuturesContract struct {
Active bool `json:"active,omitempty"`
AsOf Date `json:"as_of,omitempty"`
Maturity string `json:"maturity,omitempty"`
DaysToMaturity int `json:"days_to_maturity,omitempty"`
FirstTradeDate Date `json:"first_trade_date,omitempty"`
LastTradeDate Date `json:"last_trade_date,omitempty"`
MaxOrderQuantity int `json:"max_order_quantity,omitempty"`
MinOrderQuantity int `json:"min_order_quantity,omitempty"`
Name string `json:"name,omitempty"`
ProductCode string `json:"product_code,omitempty"`
SettlementDate Date `json:"settlement_date,omitempty"`
SettlementTickSize float64 `json:"settlement_tick_size,omitempty"`
SpreadTickSize float64 `json:"spread_tick_size,omitempty"`
Ticker string `json:"ticker,omitempty"`
TradeTickSize float64 `json:"trade_tick_size,omitempty"`
TradingVenue string `json:"trading_venue,omitempty"`
Type string `json:"type,omitempty"`
}
FuturesContract represents a futures contract.
type FuturesMarketStatus ¶
type FuturesMarketStatus struct {
MarketStatus string `json:"market_status,omitempty"`
ProductCode string `json:"product_code,omitempty"`
TradingVenue string `json:"trading_venue,omitempty"`
}
FuturesMarketStatus represents the market status for a futures product.
type FuturesProduct ¶
type FuturesProduct struct {
AsOf Date `json:"as_of,omitempty"`
AssetClass string `json:"asset_class,omitempty"`
AssetSubClass string `json:"asset_sub_class,omitempty"`
ClearingChannel string `json:"clearing_channel,omitempty"`
LastUpdated string `json:"last_updated,omitempty"`
Name string `json:"name,omitempty"`
PriceQuotation string `json:"price_quotation,omitempty"`
ProductCode string `json:"product_code,omitempty"`
Sector string `json:"sector,omitempty"`
SettlementCurrencyCode string `json:"settlement_currency_code,omitempty"`
SettlementMethod string `json:"settlement_method,omitempty"`
SettlementType string `json:"settlement_type,omitempty"`
SubSector string `json:"sub_sector,omitempty"`
TradeCurrencyCode string `json:"trade_currency_code,omitempty"`
TradingVenue string `json:"trading_venue,omitempty"`
Type string `json:"type,omitempty"`
UnitOfMeasure string `json:"unit_of_measure,omitempty"`
UnitOfMeasureQuantity float64 `json:"unit_of_measure_quantity,omitempty"`
}
FuturesProduct represents a futures product.
type FuturesQuote ¶
type FuturesQuote struct {
AskPrice float64 `json:"ask_price,omitempty"`
AskSize float64 `json:"ask_size,omitempty"`
AskTimestamp Nanos `json:"ask_timestamp,omitempty"`
BidPrice float64 `json:"bid_price,omitempty"`
BidSize float64 `json:"bid_size,omitempty"`
BidTimestamp Nanos `json:"bid_timestamp,omitempty"`
SessionEndDate string `json:"session_end_date,omitempty"`
Ticker string `json:"ticker,omitempty"`
Timestamp Nanos `json:"timestamp,omitempty"`
}
FuturesQuote represents a quote for a futures contract.
type FuturesSchedule ¶
type FuturesSchedule struct {
ProductCode string `json:"product_code,omitempty"`
ProductName string `json:"product_name,omitempty"`
Schedule []ScheduleEvent `json:"schedule,omitempty"`
SessionEndDate Date `json:"session_end_date,omitempty"`
TradingVenue string `json:"trading_venue,omitempty"`
}
FuturesSchedule represents a trading schedule for a futures product.
type FuturesTrade ¶
type FuturesTrade struct {
Price float64 `json:"price,omitempty"`
SessionEndDate string `json:"session_end_date,omitempty"`
Size float64 `json:"size,omitempty"`
Ticker string `json:"ticker,omitempty"`
Timestamp Nanos `json:"timestamp,omitempty"`
}
FuturesTrade represents a trade for a futures contract.
type GetAggsParams ¶
type GetAggsParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan multiplier.
Multiplier int `validate:"required" path:"multiplier"`
// The size of the time window.
Timespan Timespan `validate:"required" path:"timespan"`
// The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
From Millis `validate:"required" path:"from"`
// The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
To Millis `validate:"required" path:"to"`
// Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"sort"`
// Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read
// more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements:
// https://massive.com/blog/aggs-api-updates/.
Limit *int `query:"limit"`
}
GetAggsParams is the set of parameters for the GetAggs method.
func (GetAggsParams) WithAdjusted ¶
func (p GetAggsParams) WithAdjusted(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 {
// The locale of the market.
Locale MarketLocale `validate:"required" path:"locale"`
// The type of market to query.
MarketType MarketType `validate:"required" path:"marketType"`
// A comma separated list of tickers to get snapshots for.
Tickers *string `query:"tickers"`
// Include OTC securities in the response. Default is false (don't include OTC securities).
IncludeOTC *bool `query:"include_otc"`
}
GetAllTickersSnapshotParams is the set of parameters for the GetAllTickersSnapshot method.
func (GetAllTickersSnapshotParams) WithIncludeOTC ¶
func (p GetAllTickersSnapshotParams) WithIncludeOTC(q bool) *GetAllTickersSnapshotParams
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 FullBookSnapshot `json:"data,omitempty"`
}
GetCryptoFullBookSnapshotResponse is the response returned by the GetCryptoFullBookSnapshot method.
type GetDailyOpenCloseAggParams ¶
type GetDailyOpenCloseAggParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The date of the requested open/close in the format YYYY-MM-DD.
Date Date `validate:"required" path:"date"`
// Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
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"`
OTC bool `json:"otc,omitempty"`
}
GetDailyOpenCloseAggResponse is the response for the GetDailyOpenCloseAgg method.
type GetEMAParams ¶
type GetEMAParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan of the underlying aggregates.
Timespan *Timespan `query:"timespan"`
// Query indicators by timestamp.
TimestampEQ *Millis `query:"timestamp"`
TimestampLT *Millis `query:"timestamp.lt"`
TimestampLTE *Millis `query:"timestamp.lte"`
TimestampGT *Millis `query:"timestamp.gt"`
TimestampGTE *Millis `query:"timestamp.gte"`
// The attribute of the underlying aggregate which will be used to calculate the indicator.
SeriesType *SeriesType `query:"series_type"`
// Whether to also return the underlying aggregates used to calculate the indicator.
ExpandUnderlying *bool `query:"expand_underlying"`
// Whether or not the underlying aggregates used to calculate the indicator are adjusted for splits. By default, the aggregates are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 5000
Limit *int `query:"limit"`
// The size of the window over which the indicator will be calculated.
Window *int `query:"window"`
}
GetEMAParams is the set of parameters for the GetEMA method.
func (GetEMAParams) WithAdjusted ¶
func (p GetEMAParams) WithAdjusted(q bool) *GetEMAParams
func (GetEMAParams) WithExpandUnderlying ¶
func (p GetEMAParams) WithExpandUnderlying(q bool) *GetEMAParams
func (GetEMAParams) WithLimit ¶
func (p GetEMAParams) WithLimit(q int) *GetEMAParams
func (GetEMAParams) WithOrder ¶
func (p GetEMAParams) WithOrder(q Order) *GetEMAParams
func (GetEMAParams) WithSeriesType ¶
func (p GetEMAParams) WithSeriesType(q SeriesType) *GetEMAParams
func (GetEMAParams) WithTimespan ¶
func (p GetEMAParams) WithTimespan(q Timespan) *GetEMAParams
func (GetEMAParams) WithTimestamp ¶
func (p GetEMAParams) WithTimestamp(c Comparator, q Millis) *GetEMAParams
func (GetEMAParams) WithWindow ¶
func (p GetEMAParams) WithWindow(q int) *GetEMAParams
type GetEMAResponse ¶
type GetEMAResponse struct {
BaseResponse
Results SingleIndicatorResults `json:"results,omitempty"`
}
type GetExchangesParams ¶
type GetExchangesParams struct {
// Filter by asset class.
AssetClass *AssetClass `query:"asset_class,omitempty"`
// Filter by locale.
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 GetFuturesContractParams ¶
type GetFuturesContractParams struct {
Ticker string `validate:"required" path:"ticker"`
AsOf *Date `query:"as_of"`
}
GetFuturesContractParams defines parameters for the GetFuturesContract endpoint.
func (GetFuturesContractParams) WithAsOf ¶
func (p GetFuturesContractParams) WithAsOf(q Date) *GetFuturesContractParams
type GetFuturesContractResponse ¶
type GetFuturesContractResponse struct {
BaseResponse
Results FuturesContract `json:"results,omitempty"`
}
GetFuturesContractResponse defines the response for the GetFuturesContract endpoint.
type GetFuturesProductParams ¶
type GetFuturesProductParams struct {
ProductCode string `validate:"required" path:"product_code"`
Type *string `query:"type"`
AsOf *Date `query:"as_of"`
}
GetFuturesProductParams defines parameters for the GetFuturesProduct endpoint.
func (GetFuturesProductParams) WithAsOf ¶
func (p GetFuturesProductParams) WithAsOf(q Date) *GetFuturesProductParams
func (GetFuturesProductParams) WithType ¶
func (p GetFuturesProductParams) WithType(q string) *GetFuturesProductParams
type GetFuturesProductResponse ¶
type GetFuturesProductResponse struct {
BaseResponse
Results FuturesProduct `json:"results,omitempty"`
}
GetFuturesProductResponse defines the response for the GetFuturesProduct endpoint.
type GetGainersLosersSnapshotParams ¶
type GetGainersLosersSnapshotParams struct {
// The locale of the market.
Locale MarketLocale `validate:"required" path:"locale"`
// The type of market to query.
MarketType MarketType `validate:"required" path:"marketType"`
// The direction of the snapshot results to return.
Direction Direction `validate:"required" path:"direction"`
// Include OTC securities in the response. Default is false (don't include OTC securities).
IncludeOTC *bool `query:"include_otc"`
}
GetGainersLosersSnapshotParams is the set of parameters for the GetGainersLosersSnapshot method.
func (GetGainersLosersSnapshotParams) WithIncludeOTC ¶
func (p GetGainersLosersSnapshotParams) WithIncludeOTC(q bool) *GetGainersLosersSnapshotParams
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 {
// The locale of the market.
Locale MarketLocale `validate:"required" path:"locale"`
// The type of market to query.
MarketType MarketType `validate:"required" path:"marketType"`
// The beginning date for the aggregate window.
Date Date `validate:"required" path:"date"`
// Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Include OTC securities in the response. Default is false (don't include OTC securities).
IncludeOTC *bool `query:"include_otc"`
}
GetGroupedDailyAggsParams is the set of parameters for the GetGroupedDailyAggs method.
func (GetGroupedDailyAggsParams) WithAdjusted ¶
func (p GetGroupedDailyAggsParams) WithAdjusted(q bool) *GetGroupedDailyAggsParams
func (GetGroupedDailyAggsParams) WithIncludeOTC ¶
func (p GetGroupedDailyAggsParams) WithIncludeOTC(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 GetIndicesSnapshotParams ¶
type GetIndicesSnapshotParams struct {
// The ticker list to get summaries for
TickerAnyOf *string `query:"ticker.any_of"`
}
GetIndicesSnapshotParams is the set of parameters for the GetIndicesSnapshot method.
func (GetIndicesSnapshotParams) WithTickerAnyOf ¶
func (p GetIndicesSnapshotParams) WithTickerAnyOf(tickers ...string) *GetIndicesSnapshotParams
type GetIndicesSnapshotResponse ¶
type GetIndicesSnapshotResponse struct {
BaseResponse
Results []IndexSnapshot `json:"results,omitempty"`
}
GetIndicesSnapshotResponse is the response returned by the GetIndicesSnapshot method.
type GetLastCryptoTradeParams ¶
type GetLastCryptoTradeParams struct {
// The "from" symbol of the pair.
From string `validate:"required" path:"from"`
// The "to" symbol of the pair.
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 {
// The "from" symbol of the pair.
From string `validate:"required" path:"from"`
// The "to" symbol of the pair.
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 {
// The ticker symbol of the stock/equity.
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 {
// The ticker symbol of the stock/equity.
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 GetMACDParams ¶
type GetMACDParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan of the underlying aggregates.
Timespan *Timespan `query:"timespan"`
// Query indicators by timestamp.
TimestampEQ *Millis `query:"timestamp"`
TimestampLT *Millis `query:"timestamp.lt"`
TimestampLTE *Millis `query:"timestamp.lte"`
TimestampGT *Millis `query:"timestamp.gt"`
TimestampGTE *Millis `query:"timestamp.gte"`
// The attribute of the underlying aggregate which will be used to calculate the indicator.
SeriesType *SeriesType `query:"series_type"`
// Whether to also return the underlying aggregates used to calculate the indicator.
ExpandUnderlying *bool `query:"expand_underlying"`
// Whether or not the underlying aggregates used to calculate the indicator are adjusted for splits. By default, the aggregates are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 5000
Limit *int `query:"limit"`
// The size of the window over which the indicator will be calculated.
ShortWindow *int `query:"short_window"`
// The size of the window over which the indicator will be calculated.
LongWindow *int `query:"long_window"`
// The size of the window over which the indicator will be calculated.
SignalWindow *int `query:"signal_window"`
}
GetMACDParams is the set of parameters for the GetMACD method.
func (GetMACDParams) WithAdjusted ¶
func (p GetMACDParams) WithAdjusted(q bool) *GetMACDParams
func (GetMACDParams) WithExpandUnderlying ¶
func (p GetMACDParams) WithExpandUnderlying(q bool) *GetMACDParams
func (GetMACDParams) WithLimit ¶
func (p GetMACDParams) WithLimit(q int) *GetMACDParams
func (GetMACDParams) WithLongWindow ¶
func (p GetMACDParams) WithLongWindow(q int) *GetMACDParams
func (GetMACDParams) WithOrder ¶
func (p GetMACDParams) WithOrder(q Order) *GetMACDParams
func (GetMACDParams) WithSeriesType ¶
func (p GetMACDParams) WithSeriesType(q SeriesType) *GetMACDParams
func (GetMACDParams) WithShortWindow ¶
func (p GetMACDParams) WithShortWindow(q int) *GetMACDParams
func (GetMACDParams) WithSignalWindow ¶
func (p GetMACDParams) WithSignalWindow(q int) *GetMACDParams
func (GetMACDParams) WithTimespan ¶
func (p GetMACDParams) WithTimespan(q Timespan) *GetMACDParams
func (GetMACDParams) WithTimestamp ¶
func (p GetMACDParams) WithTimestamp(c Comparator, q Millis) *GetMACDParams
type GetMACDResponse ¶
type GetMACDResponse struct {
BaseResponse
Results MACDIndicatorResults `json:"results,omitempty"`
}
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"`
IndicesGroups map[string]string `json:"indicesGroups,omitempty"`
Market string `json:"market,omitempty"`
ServerTime Time `json:"serverTime,omitempty"`
}
GetMarketStatusResponse is the response returned by the GetMarketStatus method.
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 GetOptionsContractParams ¶
type GetOptionsContractParams struct {
// Return the contract that contains this options ticker.
Ticker string `validate:"required" path:"ticker"`
// Specify a point in time for the contract as of this date.
AsOf *Date `query:"as_of"`
}
GetOptionsContract is the set of parameters for the GetOptionsContract method.
func (GetOptionsContractParams) WithAsOf ¶
func (p GetOptionsContractParams) WithAsOf(q Date) *GetOptionsContractParams
type GetOptionsContractResponse ¶
type GetOptionsContractResponse struct {
BaseResponse
Results OptionsContract `json:"results,omitempty"`
}
GetOptionsContractResponse is the response returned by the GetOptionsContract method.
type GetPreviousCloseAggParams ¶
type GetPreviousCloseAggParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
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 GetRSIParams ¶
type GetRSIParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan of the underlying aggregates.
Timespan *Timespan `query:"timespan"`
// Query indicators by timestamp.
TimestampEQ *Millis `query:"timestamp"`
TimestampLT *Millis `query:"timestamp.lt"`
TimestampLTE *Millis `query:"timestamp.lte"`
TimestampGT *Millis `query:"timestamp.gt"`
TimestampGTE *Millis `query:"timestamp.gte"`
// The attribute of the underlying aggregate which will be used to calculate the indicator.
SeriesType *SeriesType `query:"series_type"`
// Whether to also return the underlying aggregates used to calculate the indicator.
ExpandUnderlying *bool `query:"expand_underlying"`
// Whether or not the underlying aggregates used to calculate the indicator are adjusted for splits. By default, the aggregates are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 5000
Limit *int `query:"limit"`
// The size of the window over which the indicator will be calculated.
Window *int `query:"window"`
}
GetRSIParams is the set of parameters for the GetRSI method.
func (GetRSIParams) WithAdjusted ¶
func (p GetRSIParams) WithAdjusted(q bool) *GetRSIParams
func (GetRSIParams) WithExpandUnderlying ¶
func (p GetRSIParams) WithExpandUnderlying(q bool) *GetRSIParams
func (GetRSIParams) WithLimit ¶
func (p GetRSIParams) WithLimit(q int) *GetRSIParams
func (GetRSIParams) WithOrder ¶
func (p GetRSIParams) WithOrder(q Order) *GetRSIParams
func (GetRSIParams) WithSeriesType ¶
func (p GetRSIParams) WithSeriesType(q SeriesType) *GetRSIParams
func (GetRSIParams) WithTimespan ¶
func (p GetRSIParams) WithTimespan(q Timespan) *GetRSIParams
func (GetRSIParams) WithTimestamp ¶
func (p GetRSIParams) WithTimestamp(c Comparator, q Millis) *GetRSIParams
func (GetRSIParams) WithWindow ¶
func (p GetRSIParams) WithWindow(q int) *GetRSIParams
type GetRSIResponse ¶
type GetRSIResponse struct {
BaseResponse
Results SingleIndicatorResults `json:"results,omitempty"`
}
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 GetSMAParams ¶
type GetSMAParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan of the underlying aggregates.
Timespan *Timespan `query:"timespan"`
// Query indicators by timestamp.
TimestampEQ *Millis `query:"timestamp"`
TimestampLT *Millis `query:"timestamp.lt"`
TimestampLTE *Millis `query:"timestamp.lte"`
TimestampGT *Millis `query:"timestamp.gt"`
TimestampGTE *Millis `query:"timestamp.gte"`
// The attribute of the underlying aggregate which will be used to calculate the indicator.
SeriesType *SeriesType `query:"series_type"`
// Whether to also return the underlying aggregates used to calculate the indicator.
ExpandUnderlying *bool `query:"expand_underlying"`
// Whether or not the underlying aggregates used to calculate the indicator are adjusted for splits. By default, the aggregates are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 5000
Limit *int `query:"limit"`
// The size of the window over which the indicator will be calculated.
Window *int `query:"window"`
}
GetSMAParams is the set of parameters for the GetSMA method.
func (GetSMAParams) WithAdjusted ¶
func (p GetSMAParams) WithAdjusted(q bool) *GetSMAParams
func (GetSMAParams) WithExpandUnderlying ¶
func (p GetSMAParams) WithExpandUnderlying(q bool) *GetSMAParams
func (GetSMAParams) WithLimit ¶
func (p GetSMAParams) WithLimit(q int) *GetSMAParams
func (GetSMAParams) WithOrder ¶
func (p GetSMAParams) WithOrder(q Order) *GetSMAParams
func (GetSMAParams) WithSeriesType ¶
func (p GetSMAParams) WithSeriesType(q SeriesType) *GetSMAParams
func (GetSMAParams) WithTimespan ¶
func (p GetSMAParams) WithTimespan(q Timespan) *GetSMAParams
func (GetSMAParams) WithTimestamp ¶
func (p GetSMAParams) WithTimestamp(c Comparator, q Millis) *GetSMAParams
func (GetSMAParams) WithWindow ¶
func (p GetSMAParams) WithWindow(q int) *GetSMAParams
type GetSMAResponse ¶
type GetSMAResponse struct {
BaseResponse
Results SingleIndicatorResults `json:"results,omitempty"`
}
GetAggsResponse is the response returned by the GetAggs method.
type GetSummaryParams ¶
type GetSummaryParams struct {
// The ticker list to get summaries for
TickerAnyOf *string `query:"ticker.any_of"`
}
func (GetSummaryParams) WithTickerAnyOf ¶
func (p GetSummaryParams) WithTickerAnyOf(tickers ...string) *GetSummaryParams
type GetSummaryResponse ¶
type GetSummaryResponse struct {
BaseResponse
Results []SummaryResult `json:"results,omitempty"`
}
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 GetTickerEventsParams ¶
type GetTickerEventsParams struct {
// ID Identifier of an asset. This can currently be a Ticker, CUSIP, or Composite FIGI.
// When given a ticker, we return events for the entity currently represented by that ticker.
// To find events for entities previously associated with a ticker, find the relevant identifier
// using the Ticker Details Endpoint (https://massive.com/docs/stocks/get_v3_reference_tickers__ticker).
ID string `validate:"required" path:"id"`
// A comma-separated list of the types of event to include. Currently, ticker_change is the only supported event_type. Leave blank to return all supported event_types.
Types *string `query:"types"`
}
GetTickerEventsParams is the set of parameters for the GetTickerEvents method.
func (GetTickerEventsParams) WithTypes ¶
func (p GetTickerEventsParams) WithTypes(types ...string) *GetTickerEventsParams
type GetTickerEventsResponse ¶
type GetTickerEventsResponse struct {
BaseResponse
Results []TickerEventResult `json:"results,omitempty"`
}
GetTickerEventsResponse is the response returned by the GetTickerEvents method.
type GetTickerRelatedCompaniesParams ¶
type GetTickerRelatedCompaniesParams struct {
// The ticker symbol of the asset.
Ticker string `validate:"required" path:"ticker"`
}
GetTickerRelatedCompaniesParams is the set of parameters for the GetTickerRelatedCompanies method.
type GetTickerRelatedCompaniesResponse ¶
type GetTickerRelatedCompaniesResponse struct {
BaseResponse
// List if related tickers.
Results []RelatedCompany `json:"results,omitempty"`
}
GetTickerDetailsResponse is the response returned by the GetTickerRelatedCompanies method.
type GetTickerSnapshotParams ¶
type GetTickerSnapshotParams struct {
// The locale of the market.
Locale MarketLocale `validate:"required" path:"locale"`
// The type of market to query.
MarketType MarketType `validate:"required" path:"marketType"`
// The ticker symbol of the stock/equity.
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 Greeks ¶
type Greeks struct {
Delta float64 `json:"delta,omitempty"`
Gamma float64 `json:"gamma,omitempty"`
Theta float64 `json:"theta,omitempty"`
Vega float64 `json:"vega,omitempty"`
}
Greeks contains the delta, gamma, vega, and theta of an option contract.
type IPOResult ¶
type IPOResult struct {
AnnouncedDate *string `json:"announced_date,omitempty"`
CurrencyCode *string `json:"currency_code,omitempty"`
FinalIssuePrice *float64 `json:"final_issue_price,omitempty"`
HighestOfferPrice *float64 `json:"highest_offer_price,omitempty"`
IPOStatus string `json:"ipo_status"`
ISIN *string `json:"isin,omitempty"`
IssueEndDate *string `json:"issue_end_date,omitempty"`
IssueStartDate *string `json:"issue_start_date,omitempty"`
IssuerName string `json:"issuer_name"`
LastUpdated string `json:"last_updated"`
ListingDate *string `json:"listing_date,omitempty"`
LotSize *float64 `json:"lot_size,omitempty"`
LowestOfferPrice *float64 `json:"lowest_offer_price,omitempty"`
PrimaryExchange *string `json:"primary_exchange,omitempty"`
SecurityDescription *string `json:"security_description,omitempty"`
SecurityType string `json:"security_type"`
Ticker string `json:"ticker"`
TotalOfferSize *float64 `json:"total_offer_size,omitempty"`
USCode *string `json:"us_code,omitempty"`
}
IPOResult contains detailed information about an Initial Public Offering (IPO).
type IndexSession ¶
type IndexSession struct {
Change float64 `json:"change,omitempty"`
ChangePercent float64 `json:"change_percent,omitempty"`
Close float64 `json:"close,omitempty"`
High float64 `json:"high,omitempty"`
Low float64 `json:"low,omitempty"`
Open float64 `json:"open,omitempty"`
PreviousClose float64 `json:"previous_close,omitempty"`
}
type IndexSnapshot ¶
type IndexSnapshot struct {
Value float64 `json:"value,omitempty"`
Ticker string `json:"ticker,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
MarketStatus string `json:"market_status,omitempty"`
Session IndexSession `json:"session,omitempty"`
}
IndexSnapshot is a collection of data for an index ticker including the current session information and the most recent value.
type Insights ¶
type Insights struct {
Ticker string `json:"ticker"`
Sentiment string `json:"sentiment"`
SentimentReasoning string `json:"sentiment_reasoning"`
}
Insights contains sentiment, reasoning, and the ticker symbol associated with the insight.
type LastQuote ¶
type LastQuote struct {
Ticker string `json:"T,omitempty"`
TrfTimestamp Nanos `json:"f,omitempty"`
SequenceNumber int64 `json:"q,omitempty"`
SipTimestamp Nanos `json:"t,omitempty"`
ParticipantTimestamp Nanos `json:"y,omitempty"`
AskPrice float64 `json:"P,omitempty"`
AskSize float64 `json:"S,omitempty"`
AskExchange int `json:"X,omitempty"`
Conditions []int32 `json:"c,omitempty"`
Indicators []int32 `json:"i,omitempty"`
BidPrice float64 `json:"p,omitempty"`
BidSize float64 `json:"s,omitempty"`
BidExchange int `json:"x,omitempty"`
Tape int32 `json:"z,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"`
}
LastQuoteOptionContractSnapshot contains the most recent quote of an option contract.
type LastQuoteSnapshot ¶
type LastQuoteSnapshot struct {
AskPrice float64 `json:"P,omitempty"`
BidPrice float64 `json:"p,omitempty"`
AskSize float64 `json:"S,omitempty"`
BidSize float64 `json:"s,omitempty"`
Timestamp Nanos `json:"t,omitempty"`
}
LastQuoteSnapshot is the most recent quote for a ticker.
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 float64 `json:"s,omitempty"`
Exchange int32 `json:"x,omitempty"`
Tape int32 `json:"z,omitempty"`
}
LastTrade is the most recent trade for a specified ticker.
type LastTradeOptionContractSnapshot ¶
type LastTradeOptionContractSnapshot struct {
Timestamp Nanos `json:"sip_timestamp,omitempty"`
Conditions []int32 `json:"conditions,omitempty"`
Price float64 `json:"price,omitempty"`
Size float64 `json:"size,omitempty"`
Exchange int32 `json:"exchange,omitempty"`
Timeframe string `json:"timeframe,omitempty"`
}
type LastTradeSnapshot ¶
type LastTradeSnapshot struct {
Conditions []int `json:"c,omitempty"`
TradeID string `json:"i,omitempty"`
Price float64 `json:"p,omitempty"`
Size float64 `json:"s,omitempty"`
Timestamp Nanos `json:"t,omitempty"`
ExchangeID int `json:"x,omitempty"`
}
LastTradeSnapshot is the most recent trade for a ticker.
type ListAggsParams ¶
type ListAggsParams struct {
// The ticker symbol of the stock/equity.
Ticker string `validate:"required" path:"ticker"`
// The size of the timespan multiplier.
Multiplier int `validate:"required" path:"multiplier"`
// The size of the time window.
Timespan Timespan `validate:"required" path:"timespan"`
// The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
From Millis `validate:"required" path:"from"`
// The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
To Millis `validate:"required" path:"to"`
// Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get
// results that are NOT adjusted for splits.
Adjusted *bool `query:"adjusted"`
// Order the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return
// results in descending order (newest at the top).
Order *Order `query:"sort"`
// Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read
// more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements:
// https://massive.com/blog/aggs-api-updates/.
Limit *int `query:"limit"`
}
ListAggsParams is the set of parameters for the ListAggs method.
func (ListAggsParams) WithAdjusted ¶
func (p ListAggsParams) WithAdjusted(q bool) *ListAggsParams
func (ListAggsParams) WithLimit ¶
func (p ListAggsParams) WithLimit(q int) *ListAggsParams
func (ListAggsParams) WithOrder ¶
func (p ListAggsParams) WithOrder(q Order) *ListAggsParams
type ListAggsResponse ¶
type ListAggsResponse 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"`
}
ListAggsResponse is the response returned by the ListAggs method.
type ListAssetSnapshotsParams
deprecated
type ListAssetSnapshotsParams ListUniversalSnapshotsParams
Deprecated: Please use UniversalSnapshot types instead of AssetSnapshot types.
func (ListAssetSnapshotsParams) WithTicker ¶
func (p ListAssetSnapshotsParams) WithTicker(q string) *ListAssetSnapshotsParams
func (ListAssetSnapshotsParams) WithTickerAnyOf ¶
func (p ListAssetSnapshotsParams) WithTickerAnyOf(q string) *ListAssetSnapshotsParams
func (ListAssetSnapshotsParams) WithTickersByComparison ¶
func (p ListAssetSnapshotsParams) WithTickersByComparison(c Comparator, q string) *ListAssetSnapshotsParams
func (ListAssetSnapshotsParams) WithType ¶
func (p ListAssetSnapshotsParams) WithType(q string) *ListAssetSnapshotsParams
type ListAssetSnapshotsResponse
deprecated
type ListAssetSnapshotsResponse ListUniversalSnapshotsResponse
Deprecated: Please use UniversalSnapshot types instead of AssetSnapshot types.
type ListConditionsParams ¶
type ListConditionsParams struct {
// Filter for conditions within a given asset class.
AssetClass *AssetClass `query:"asset_class,omitempty"`
// Filter by data type.
DataType *DataType `query:"data_type,omitempty"`
// Filter for conditions with a given ID.
ID *int64 `query:"id,omitempty"`
// Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.
SIP *SIP `query:"sip,omitempty"`
// 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"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
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 {
// Return the dividends 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"`
// Query by ex-dividend date with the format YYYY-MM-DD.
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"`
// Query by record date with the format YYYY-MM-DD.
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"`
// Query by declaration date with the format YYYY-MM-DD.
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"`
// Query by pay date with the format YYYY-MM-DD.
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"`
// Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2
// (bi-annually), 4 (quarterly), and 12 (monthly).
Frequency *Frequency `query:"frequency"`
// Query by the cash amount of the dividend.
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"`
// Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent
// schedules are denoted as CD. Special Cash dividends that have been paid that are infrequent or unusual, and/or
// can not be expected to occur in the future are denoted as SC.
DividendType *DividendType `query:"dividend_type"`
// 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"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
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) WithPayDate ¶
func (p ListDividendsParams) WithPayDate(c Comparator, q Date) *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 ListFuturesAggsParams ¶
type ListFuturesAggsParams struct {
Ticker string `validate:"required" path:"ticker"`
Resolution string `query:"resolution"`
WindowStart *Nanos `query:"window_start"`
WindowStartLT *Nanos `query:"window_start.lt"`
WindowStartLTE *Nanos `query:"window_start.lte"`
WindowStartGT *Nanos `query:"window_start.gt"`
WindowStartGTE *Nanos `query:"window_start.gte"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesAggsParams defines parameters for the ListFuturesAggs endpoint.
func (ListFuturesAggsParams) WithLimit ¶
func (p ListFuturesAggsParams) WithLimit(q int) *ListFuturesAggsParams
func (ListFuturesAggsParams) WithSort ¶
func (p ListFuturesAggsParams) WithSort(q string) *ListFuturesAggsParams
func (ListFuturesAggsParams) WithWindowStart ¶
func (p ListFuturesAggsParams) WithWindowStart(c Comparator, q Nanos) *ListFuturesAggsParams
type ListFuturesAggsResponse ¶
type ListFuturesAggsResponse struct {
BaseResponse
Results []FuturesAggregate `json:"results,omitempty"`
}
ListFuturesAggsResponse defines the response for the ListFuturesAggs endpoint.
type ListFuturesContractsParams ¶
type ListFuturesContractsParams struct {
ProductCode *string `query:"product_code"`
FirstTradeDate *Date `query:"first_trade_date"`
LastTradeDate *Date `query:"last_trade_date"`
AsOf *Date `query:"as_of"`
Active *string `query:"active"`
Type *string `query:"type"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesContractsParams defines parameters for the ListFuturesContracts endpoint.
func (ListFuturesContractsParams) WithActive ¶
func (p ListFuturesContractsParams) WithActive(q string) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithAsOf ¶
func (p ListFuturesContractsParams) WithAsOf(q Date) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithFirstTradeDate ¶
func (p ListFuturesContractsParams) WithFirstTradeDate(q Date) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithLastTradeDate ¶
func (p ListFuturesContractsParams) WithLastTradeDate(q Date) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithLimit ¶
func (p ListFuturesContractsParams) WithLimit(q int) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithProductCode ¶
func (p ListFuturesContractsParams) WithProductCode(q string) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithSort ¶
func (p ListFuturesContractsParams) WithSort(q string) *ListFuturesContractsParams
func (ListFuturesContractsParams) WithType ¶
func (p ListFuturesContractsParams) WithType(q string) *ListFuturesContractsParams
type ListFuturesContractsResponse ¶
type ListFuturesContractsResponse struct {
BaseResponse
Results []FuturesContract `json:"results,omitempty"`
}
ListFuturesContractsResponse defines the response for the ListFuturesContracts endpoint.
type ListFuturesMarketStatusesParams ¶
type ListFuturesMarketStatusesParams struct {
ProductCodeAnyOf *string `query:"product_code.any_of"`
ProductCode *string `query:"product_code"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesMarketStatusesParams defines parameters for the ListFuturesMarketStatuses endpoint.
func (ListFuturesMarketStatusesParams) WithLimit ¶
func (p ListFuturesMarketStatusesParams) WithLimit(q int) *ListFuturesMarketStatusesParams
func (ListFuturesMarketStatusesParams) WithProductCode ¶
func (p ListFuturesMarketStatusesParams) WithProductCode(q string) *ListFuturesMarketStatusesParams
func (ListFuturesMarketStatusesParams) WithProductCodeAnyOf ¶
func (p ListFuturesMarketStatusesParams) WithProductCodeAnyOf(q string) *ListFuturesMarketStatusesParams
func (ListFuturesMarketStatusesParams) WithSort ¶
func (p ListFuturesMarketStatusesParams) WithSort(q string) *ListFuturesMarketStatusesParams
type ListFuturesMarketStatusesResponse ¶
type ListFuturesMarketStatusesResponse struct {
BaseResponse
Results []FuturesMarketStatus `json:"results,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
}
ListFuturesMarketStatusesResponse defines the response for the ListFuturesMarketStatuses endpoint.
type ListFuturesProductSchedulesParams ¶
type ListFuturesProductSchedulesParams struct {
ProductCode string `validate:"required" path:"product_code"`
SessionEndDate *Date `query:"session_end_date"`
SessionEndDateLT *Date `query:"session_end_date.lt"`
SessionEndDateLTE *Date `query:"session_end_date.lte"`
SessionEndDateGT *Date `query:"session_end_date.gt"`
SessionEndDateGTE *Date `query:"session_end_date.gte"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesProductSchedulesParams defines parameters for the ListFuturesProductSchedules endpoint.
func (ListFuturesProductSchedulesParams) WithLimit ¶
func (p ListFuturesProductSchedulesParams) WithLimit(q int) *ListFuturesProductSchedulesParams
func (ListFuturesProductSchedulesParams) WithSessionEndDate ¶
func (p ListFuturesProductSchedulesParams) WithSessionEndDate(c Comparator, q Date) *ListFuturesProductSchedulesParams
func (ListFuturesProductSchedulesParams) WithSort ¶
func (p ListFuturesProductSchedulesParams) WithSort(q string) *ListFuturesProductSchedulesParams
type ListFuturesProductSchedulesResponse ¶
type ListFuturesProductSchedulesResponse struct {
BaseResponse
Results []FuturesSchedule `json:"results,omitempty"`
}
ListFuturesProductSchedulesResponse defines the response for the ListFuturesProductSchedules endpoint.
type ListFuturesProductsParams ¶
type ListFuturesProductsParams struct {
Name *string `query:"name"`
AsOf *Date `query:"as_of"`
TradingVenue *string `query:"trading_venue"`
Sector *string `query:"sector"`
SubSector *string `query:"sub_sector"`
AssetClass *string `query:"asset_class"`
AssetSubClass *string `query:"asset_sub_class"`
Type *string `query:"type"`
Limit *int `query:"limit"`
NameSearch *string `query:"name.search"`
Sort *string `query:"sort"`
}
ListFuturesProductsParams defines parameters for the ListFuturesProducts endpoint.
func (ListFuturesProductsParams) WithAsOf ¶
func (p ListFuturesProductsParams) WithAsOf(q Date) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithAssetClass ¶
func (p ListFuturesProductsParams) WithAssetClass(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithAssetSubClass ¶
func (p ListFuturesProductsParams) WithAssetSubClass(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithLimit ¶
func (p ListFuturesProductsParams) WithLimit(q int) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithName ¶
func (p ListFuturesProductsParams) WithName(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithNameSearch ¶
func (p ListFuturesProductsParams) WithNameSearch(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithSector ¶
func (p ListFuturesProductsParams) WithSector(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithSort ¶
func (p ListFuturesProductsParams) WithSort(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithSubSector ¶
func (p ListFuturesProductsParams) WithSubSector(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithTradingVenue ¶
func (p ListFuturesProductsParams) WithTradingVenue(q string) *ListFuturesProductsParams
func (ListFuturesProductsParams) WithType ¶
func (p ListFuturesProductsParams) WithType(q string) *ListFuturesProductsParams
type ListFuturesProductsResponse ¶
type ListFuturesProductsResponse struct {
BaseResponse
Results []FuturesProduct `json:"results,omitempty"`
}
ListFuturesProductsResponse defines the response for the ListFuturesProducts endpoint.
type ListFuturesQuotesParams ¶
type ListFuturesQuotesParams struct {
Ticker string `validate:"required" path:"ticker"`
Timestamp *Nanos `query:"timestamp"`
TimestampLT *Nanos `query:"timestamp.lt"`
TimestampLTE *Nanos `query:"timestamp.lte"`
TimestampGT *Nanos `query:"timestamp.gt"`
TimestampGTE *Nanos `query:"timestamp.gte"`
SessionEndDate *string `query:"session_end_date"`
SessionEndDateLT *string `query:"session_end_date.lt"`
SessionEndDateLTE *string `query:"session_end_date.lte"`
SessionEndDateGT *string `query:"session_end_date.gt"`
SessionEndDateGTE *string `query:"session_end_date.gte"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesQuotesParams defines parameters for the ListFuturesQuotes endpoint.
func (ListFuturesQuotesParams) WithLimit ¶
func (p ListFuturesQuotesParams) WithLimit(q int) *ListFuturesQuotesParams
func (ListFuturesQuotesParams) WithSessionEndDate ¶
func (p ListFuturesQuotesParams) WithSessionEndDate(c Comparator, q string) *ListFuturesQuotesParams
func (ListFuturesQuotesParams) WithSort ¶
func (p ListFuturesQuotesParams) WithSort(q string) *ListFuturesQuotesParams
func (ListFuturesQuotesParams) WithTimestamp ¶
func (p ListFuturesQuotesParams) WithTimestamp(c Comparator, q Nanos) *ListFuturesQuotesParams
type ListFuturesQuotesResponse ¶
type ListFuturesQuotesResponse struct {
BaseResponse
Results []FuturesQuote `json:"results,omitempty"`
}
ListFuturesQuotesResponse defines the response for the ListFuturesQuotes endpoint.
type ListFuturesSchedulesParams ¶
type ListFuturesSchedulesParams struct {
SessionEndDate *Date `query:"session_end_date"`
TradingVenue *string `query:"trading_venue"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesSchedulesParams defines parameters for the ListFuturesSchedules endpoint.
func (ListFuturesSchedulesParams) WithLimit ¶
func (p ListFuturesSchedulesParams) WithLimit(q int) *ListFuturesSchedulesParams
func (ListFuturesSchedulesParams) WithSessionEndDate ¶
func (p ListFuturesSchedulesParams) WithSessionEndDate(q Date) *ListFuturesSchedulesParams
func (ListFuturesSchedulesParams) WithSort ¶
func (p ListFuturesSchedulesParams) WithSort(q string) *ListFuturesSchedulesParams
func (ListFuturesSchedulesParams) WithTradingVenue ¶
func (p ListFuturesSchedulesParams) WithTradingVenue(q string) *ListFuturesSchedulesParams
type ListFuturesSchedulesResponse ¶
type ListFuturesSchedulesResponse struct {
BaseResponse
Results []FuturesSchedule `json:"results,omitempty"`
}
ListFuturesSchedulesResponse defines the response for the ListFuturesSchedules endpoint.
type ListFuturesTradesParams ¶
type ListFuturesTradesParams struct {
Ticker string `validate:"required" path:"ticker"`
Timestamp *Nanos `query:"timestamp"`
TimestampLT *Nanos `query:"timestamp.lt"`
TimestampLTE *Nanos `query:"timestamp.lte"`
TimestampGT *Nanos `query:"timestamp.gt"`
TimestampGTE *Nanos `query:"timestamp.gte"`
SessionEndDate *string `query:"session_end_date"`
SessionEndDateLT *string `query:"session_end_date.lt"`
SessionEndDateLTE *string `query:"session_end_date.lte"`
SessionEndDateGT *string `query:"session_end_date.gt"`
SessionEndDateGTE *string `query:"session_end_date.gte"`
Limit *int `query:"limit"`
Sort *string `query:"sort"`
}
ListFuturesTradesParams defines parameters for the ListFuturesTrades endpoint.
func (ListFuturesTradesParams) WithLimit ¶
func (p ListFuturesTradesParams) WithLimit(q int) *ListFuturesTradesParams
func (ListFuturesTradesParams) WithSessionEndDate ¶
func (p ListFuturesTradesParams) WithSessionEndDate(c Comparator, q string) *ListFuturesTradesParams
func (ListFuturesTradesParams) WithSort ¶
func (p ListFuturesTradesParams) WithSort(q string) *ListFuturesTradesParams
func (ListFuturesTradesParams) WithTimestamp ¶
func (p ListFuturesTradesParams) WithTimestamp(c Comparator, q Nanos) *ListFuturesTradesParams
type ListFuturesTradesResponse ¶
type ListFuturesTradesResponse struct {
BaseResponse
Results []FuturesTrade `json:"results,omitempty"`
}
ListFuturesTradesResponse defines the response for the ListFuturesTrades endpoint.
type ListIPOsParams ¶
type ListIPOsParams struct {
// Specify a case-sensitive ticker symbol.
Ticker *string `query:"ticker"`
// Specify a us_code (CUSIP).
USCode *string `query:"us_code"`
// Specify an International Securities Identification Number (ISIN).
ISIN *string `query:"isin"`
// Specify a listing date (YYYY-MM-DD).
ListingDateEQ *string `query:"listing_date"`
ListingDateLT *string `query:"listing_date.lt"`
ListingDateLTE *string `query:"listing_date.lte"`
ListingDateGT *string `query:"listing_date.gt"`
ListingDateGTE *string `query:"listing_date.gte"`
// Specify an IPO status.
IPOStatus *string `query:"ipo_status"`
// Sort field used for ordering. Default is listing_date.
Sort *Sort `query:"sort"`
// Order results based on the sort field. Default is desc.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 1000.
Limit *int `query:"limit"`
}
ListIPOsParams is the set of parameters for the ListIPOs method.
func (ListIPOsParams) WithIPOStatus ¶
func (p ListIPOsParams) WithIPOStatus(q string) *ListIPOsParams
func (ListIPOsParams) WithISIN ¶
func (p ListIPOsParams) WithISIN(q string) *ListIPOsParams
func (ListIPOsParams) WithLimit ¶
func (p ListIPOsParams) WithLimit(q int) *ListIPOsParams
func (ListIPOsParams) WithListingDate ¶
func (p ListIPOsParams) WithListingDate(c Comparator, q string) *ListIPOsParams
func (ListIPOsParams) WithOrder ¶
func (p ListIPOsParams) WithOrder(q Order) *ListIPOsParams
func (ListIPOsParams) WithSort ¶
func (p ListIPOsParams) WithSort(q Sort) *ListIPOsParams
func (ListIPOsParams) WithTicker ¶
func (p ListIPOsParams) WithTicker(q string) *ListIPOsParams
func (ListIPOsParams) WithUSCode ¶
func (p ListIPOsParams) WithUSCode(q string) *ListIPOsParams
type ListIPOsResponse ¶
type ListIPOsResponse struct {
BaseResponse
// An array of IPO events that match your query.
Results []IPOResult `json:"results,omitempty"`
}
ListIPOsResponse is the response returned by the ListIPOs method.
type ListOptionsChainParams ¶
type ListOptionsChainParams struct {
// The underlying ticker symbol of the option contract.
UnderlyingAsset string `validate:"required" path:"underlyingAsset"`
// The strike price of the option contract.
StrikePrice *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"`
// The type of contract. Can be ContractCall, ContractPut, or in some rare cases, ContractOther.
ContractType *ContractType `query:"contract_type"`
// The contract's expiration date in YYYY-MM-DD format.
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"`
// Limit the number of results returned, default is 10 and max is 1000.
Limit *int `query:"limit"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
// Order results based on the sort field.
Order *Order `query:"order"`
}
ListOptionsChainParams is a set of parameters for the ListOptionsChainSnapshot method.
func (ListOptionsChainParams) WithContractType ¶
func (o ListOptionsChainParams) WithContractType(contractType ContractType) *ListOptionsChainParams
WithContractType sets contract type to params. contractType options include ContractCall and ContractPut.
func (ListOptionsChainParams) WithExpirationDate ¶
func (o ListOptionsChainParams) WithExpirationDate(comparator Comparator, expirationDate Date) *ListOptionsChainParams
WithExpirationDate sets expiration_date query parameter. comparator options include EQ, LT, LTE, GT, and GTE. expirationDate should be in YYYY-MM-DD format
func (ListOptionsChainParams) WithLimit ¶
func (o ListOptionsChainParams) WithLimit(limit int) *ListOptionsChainParams
WithLimit sets number of results returned. Limit default is 10. Limit must fall in range of 0-1000.
func (ListOptionsChainParams) WithOrder ¶
func (o ListOptionsChainParams) WithOrder(order Order) *ListOptionsChainParams
WithOrder sets order of results based on the Sort field.
func (ListOptionsChainParams) WithSort ¶
func (o ListOptionsChainParams) WithSort(sort Sort) *ListOptionsChainParams
WithSort sets sort field. Sort expects to receive TickerSymbol, ExpirationDate, or StrikePrice as an argument.
func (ListOptionsChainParams) WithStrikePrice ¶
func (o ListOptionsChainParams) WithStrikePrice(comparator Comparator, strikePrice float64) *ListOptionsChainParams
WithStrikePrice sets strike price to params. Strike Price is the price at which a put or call option can be exercised. comparator options include EQ, LT, LTE, GT, and GTE. expirationDate should be in YYYY-MM-DD format
type ListOptionsChainSnapshotResponse ¶
type ListOptionsChainSnapshotResponse struct {
BaseResponse
Results []OptionContractSnapshot `json:"results,omitempty"`
}
type ListOptionsContractsParams ¶
type ListOptionsContractsParams struct {
// Return contracts relating to this underlying stock ticker.
UnderlyingTickerEQ *string `query:"underlying_ticker"`
UnderlyingTickerLT *string `query:"underlying_ticker.lt"`
UnderlyingTickerLTE *string `query:"underlying_ticker.lte"`
UnderlyingTickerGT *string `query:"underlying_ticker.gt"`
UnderlyingTickerGTE *string `query:"underlying_ticker.gte"`
// Specify the type of contract.
ContractType *string `query:"contract_type"`
// Specify the expiration date.
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"`
// Specify a point in time for contracts as of this date with format YYYY-MM-DD.
AsOf *Date `query:"as_of"`
// Specify the strike price.
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"`
// Specify whether to query for expired contracts.
Expired *bool `query:"expired"`
// 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"`
}
ListOptionsContracts is the set of parameters for the ListOptionsContracts method.
func (ListOptionsContractsParams) WithAsOf ¶
func (p ListOptionsContractsParams) WithAsOf(q Date) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithContractType ¶
func (p ListOptionsContractsParams) WithContractType(q string) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithExpirationDate ¶
func (p ListOptionsContractsParams) WithExpirationDate(c Comparator, q Date) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithExpired ¶
func (p ListOptionsContractsParams) WithExpired(q bool) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithLimit ¶
func (p ListOptionsContractsParams) WithLimit(q int) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithOrder ¶
func (p ListOptionsContractsParams) WithOrder(q Order) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithSort ¶
func (p ListOptionsContractsParams) WithSort(q Sort) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithStrikePrice ¶
func (p ListOptionsContractsParams) WithStrikePrice(c Comparator, q float64) *ListOptionsContractsParams
func (ListOptionsContractsParams) WithUnderlyingTicker ¶
func (p ListOptionsContractsParams) WithUnderlyingTicker(c Comparator, q string) *ListOptionsContractsParams
type ListOptionsContractsResponse ¶
type ListOptionsContractsResponse struct {
BaseResponse
Results []OptionsContract `json:"results,omitempty"`
}
type ListQuotesParams ¶
type ListQuotesParams struct {
// The ticker symbol to get quotes for.
Ticker string `validate:"required" path:"ticker"`
// Query by timestamp. To query for a specific day instead of a nanosecond timestamp,
// set it via this pattern: params.WithDay(2006, 1, 2) // January 2, 2006.
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 results based on the sort field.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 50000.
Limit *int `query:"limit"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
ListQuotesParams is the set of parameters for the ListQuotes method.
func (ListQuotesParams) WithDay ¶
func (p ListQuotesParams) WithDay(year int, month time.Month, day int) *ListQuotesParams
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 ListShortInterestParams ¶
type ListShortInterestParams struct {
// The primary ticker symbol for the stock.
TickerEQ *string `query:"ticker"`
TickerLT *string `query:"ticker.lt"`
TickerLTE *string `query:"ticker.lte"`
TickerGT *string `query:"ticker.gt"`
TickerGTE *string `query:"ticker.gte"`
// Days to cover (short_interest / avg_daily_volume).
DaysToCoverEQ *string `query:"days_to_cover"`
DaysToCoverLT *string `query:"days_to_cover.lt"`
DaysToCoverLTE *string `query:"days_to_cover.lte"`
DaysToCoverGT *string `query:"days_to_cover.gt"`
DaysToCoverGTE *string `query:"days_to_cover.gte"`
// Settlement date (YYYY-MM-DD).
SettlementDateEQ *string `query:"settlement_date"`
SettlementDateLT *string `query:"settlement_date.lt"`
SettlementDateLTE *string `query:"settlement_date.lte"`
SettlementDateGT *string `query:"settlement_date.gt"`
SettlementDateGTE *string `query:"settlement_date.gte"`
// Average daily trading volume.
AvgDailyVolumeEQ *string `query:"avg_daily_volume"`
AvgDailyVolumeLT *string `query:"avg_daily_volume.lt"`
AvgDailyVolumeLTE *string `query:"avg_daily_volume.lte"`
AvgDailyVolumeGT *string `query:"avg_daily_volume.gt"`
AvgDailyVolumeGTE *string `query:"avg_daily_volume.gte"`
// Sort field used for ordering. Default is ticker.
Sort *Sort `query:"sort"`
// Order results based on the sort field. Default is asc.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 50000.
Limit *int `query:"limit"`
}
ListShortInterestParams is the set of parameters for the ListShortInterest method.
func (ListShortInterestParams) WithAvgDailyVolume ¶
func (p ListShortInterestParams) WithAvgDailyVolume(c Comparator, q string) *ListShortInterestParams
func (ListShortInterestParams) WithDaysToCover ¶
func (p ListShortInterestParams) WithDaysToCover(c Comparator, q string) *ListShortInterestParams
func (ListShortInterestParams) WithLimit ¶
func (p ListShortInterestParams) WithLimit(q int) *ListShortInterestParams
func (ListShortInterestParams) WithOrder ¶
func (p ListShortInterestParams) WithOrder(q Order) *ListShortInterestParams
func (ListShortInterestParams) WithSettlementDate ¶
func (p ListShortInterestParams) WithSettlementDate(c Comparator, q string) *ListShortInterestParams
func (ListShortInterestParams) WithSort ¶
func (p ListShortInterestParams) WithSort(q Sort) *ListShortInterestParams
func (ListShortInterestParams) WithTicker ¶
func (p ListShortInterestParams) WithTicker(c Comparator, q string) *ListShortInterestParams
type ListShortInterestResponse ¶
type ListShortInterestResponse struct {
BaseResponse
// An array of short interest data that match your query.
Results []ShortInterest `json:"results,omitempty"`
}
ListShortInterestResponse is the response returned by the ListShortInterest method.
type ListShortVolumeParams ¶
type ListShortVolumeParams struct {
// The primary ticker symbol for the stock.
TickerEQ *string `query:"ticker"`
TickerLT *string `query:"ticker.lt"`
TickerLTE *string `query:"ticker.lte"`
TickerGT *string `query:"ticker.gt"`
TickerGTE *string `query:"ticker.gte"`
// Date of trade activity (YYYY-MM-DD).
DateEQ *string `query:"date"`
DateLT *string `query:"date.lt"`
DateLTE *string `query:"date.lte"`
DateGT *string `query:"date.gt"`
DateGTE *string `query:"date.gte"`
// Short volume ratio ((short_volume / total_volume) * 100).
ShortVolumeRatioEQ *string `query:"short_volume_ratio"`
ShortVolumeRatioLT *string `query:"short_volume_ratio.lt"`
ShortVolumeRatioLTE *string `query:"short_volume_ratio.lte"`
ShortVolumeRatioGT *string `query:"short_volume_ratio.gt"`
ShortVolumeRatioGTE *string `query:"short_volume_ratio.gte"`
// Total reported volume.
TotalVolumeEQ *string `query:"total_volume"`
TotalVolumeLT *string `query:"total_volume.lt"`
TotalVolumeLTE *string `query:"total_volume.lte"`
TotalVolumeGT *string `query:"total_volume.gt"`
TotalVolumeGTE *string `query:"total_volume.gte"`
// Sort field used for ordering. Default is ticker.
Sort *Sort `query:"sort"`
// Order results based on the sort field. Default is asc.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 50000.
Limit *int `query:"limit"`
}
ListShortVolumeParams is the set of parameters for the ListShortVolume method.
func (ListShortVolumeParams) WithDate ¶
func (p ListShortVolumeParams) WithDate(c Comparator, q string) *ListShortVolumeParams
func (ListShortVolumeParams) WithLimit ¶
func (p ListShortVolumeParams) WithLimit(q int) *ListShortVolumeParams
func (ListShortVolumeParams) WithOrder ¶
func (p ListShortVolumeParams) WithOrder(q Order) *ListShortVolumeParams
func (ListShortVolumeParams) WithShortVolumeRatio ¶
func (p ListShortVolumeParams) WithShortVolumeRatio(c Comparator, q string) *ListShortVolumeParams
func (ListShortVolumeParams) WithSort ¶
func (p ListShortVolumeParams) WithSort(q Sort) *ListShortVolumeParams
func (ListShortVolumeParams) WithTicker ¶
func (p ListShortVolumeParams) WithTicker(c Comparator, q string) *ListShortVolumeParams
func (ListShortVolumeParams) WithTotalVolume ¶
func (p ListShortVolumeParams) WithTotalVolume(c Comparator, q string) *ListShortVolumeParams
type ListShortVolumeResponse ¶
type ListShortVolumeResponse struct {
BaseResponse
// An array of short volume data that match your query.
Results []ShortVolume `json:"results,omitempty"`
}
ListShortVolumeResponse is the response returned by the ListShortVolume method.
type ListSplitsParams ¶
type ListSplitsParams struct {
// Return the stock splits 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"`
// Query by execution date with the format YYYY-MM-DD.
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"`
// Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse
// split. By default this filter is not used.
ReverseSplit *bool `query:"reverse_split"`
// 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"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
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 {
// Query by company ticker.
Ticker *string `query:"ticker"`
// Query by central index key Number (CIK: https://www.sec.gov/edgar/searchedgar/cik.htm).
CIK *string `query:"cik"`
// Query by company name.
CompanyNameFull *string `query:"company_name"`
CompanyNameSearch *string `query:"company_name.search"`
// Query by standard industrial classification (SIC:
// https://www.sec.gov/corpfin/division-of-corporation-finance-standard-industrial-classification-sic-code-list).
SIC *string `query:"sic"`
// Query by the date when the filing with financials data was filed in YYYY-MM-DD format.
//
// Best used when querying over date ranges to find financials based on filings that happen in a time period.
//
// Examples:
//
// To get financials based on filings that have happened after January 1, 2009 use the query param
// filing_date.gte=2009-01-01.
//
// To get financials based on filings that happened in the year 2009 use the query params
// filing_date.gte=2009-01-01&filing_date.lt=2010-01-01.
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"`
// The period of report for the filing with financials data in YYYY-MM-DD format.
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"`
// Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q
// filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their
// annual report, so some companies my not return quarterly financials for Q4.
Timeframe *Timeframe `query:"timeframe"`
// Whether or not to include the xpath and formula attributes for each financial data point. See the xpath and
// formula response attributes for more info. False by default.
IncludeSources *bool `query:"include_sources"`
// Order results based on the sort field.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 100.
Limit *int `query:"limit"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
ListStockFinancialsParams is the set of parameters for the ListStockFinancials 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 asset's primary exchange Market Identifier Code (MIC) according to ISO 10383. Defaults to empty
// string which queries all exchanges.
Exchange *string `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 string) *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 {
// The ticker symbol to get trades for.
Ticker string `validate:"required" path:"ticker"`
// Query by timestamp. To query for a specific day instead of a nanosecond timestamp,
// set it via this pattern: params.WithDay(2006, 1, 2) // January 2, 2006.
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 results based on the sort field.
Order *Order `query:"order"`
// Limit the number of results returned, default is 10 and max is 50000.
Limit *int `query:"limit"`
// Sort field used for ordering.
Sort *Sort `query:"sort"`
}
ListTradesParams is the set of parameters for the ListTrades method.
func (ListTradesParams) WithDay ¶
func (p ListTradesParams) WithDay(year int, month time.Month, day int) *ListTradesParams
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 ListTreasuryYieldsParams ¶
type ListTreasuryYieldsParams struct {
// Calendar date of the yield observation (YYYY-MM-DD).
DateEQ *string `query:"date"`
DateLT *string `query:"date.lt"`
DateLTE *string `query:"date.lte"`
DateGT *string `query:"date.gt"`
DateGTE *string `query:"date.gte"`
// Sort field used for ordering. Default is date.
Sort *Sort `query:"sort"`
// Order results based on the sort field. Default is asc.
Order *Order `query:"order"`
// Limit the number of results returned, default is 100 and max is 50000.
Limit *int `query:"limit"`
}
ListTreasuryYieldsParams is the set of parameters for the ListTreasuryYields method.
func (ListTreasuryYieldsParams) WithDate ¶
func (p ListTreasuryYieldsParams) WithDate(c Comparator, q string) *ListTreasuryYieldsParams
func (ListTreasuryYieldsParams) WithLimit ¶
func (p ListTreasuryYieldsParams) WithLimit(q int) *ListTreasuryYieldsParams
func (ListTreasuryYieldsParams) WithOrder ¶
func (p ListTreasuryYieldsParams) WithOrder(q Order) *ListTreasuryYieldsParams
func (ListTreasuryYieldsParams) WithSort ¶
func (p ListTreasuryYieldsParams) WithSort(q Sort) *ListTreasuryYieldsParams
type ListTreasuryYieldsResponse ¶
type ListTreasuryYieldsResponse struct {
BaseResponse
// An array of treasury yields that match your query.
Results []TreasuryYield `json:"results,omitempty"`
}
ListTreasuryYieldsResponse is the response returned by the ListTreasuryYields method.
type ListUniversalSnapshotsParams ¶
type ListUniversalSnapshotsParams struct {
TickerAnyOf *string `query:"ticker.any_of"`
Ticker *string `query:"ticker"`
TickerLT *string `query:"ticker.lt"`
TickerLTE *string `query:"ticker.lte"`
TickerGT *string `query:"ticker.gt"`
TickerGTE *string `query:"ticker.gte"`
Type *string `query:"type"`
}
ListUniversalSnapshotsParams is a set of parameters for the ListUniversalSnapshots method.
func (ListUniversalSnapshotsParams) WithTicker ¶
func (p ListUniversalSnapshotsParams) WithTicker(q string) *ListUniversalSnapshotsParams
WithTicker sets the ticker equality query param.
func (ListUniversalSnapshotsParams) WithTickerAnyOf ¶
func (p ListUniversalSnapshotsParams) WithTickerAnyOf(q string) *ListUniversalSnapshotsParams
WithTickerAnyOf sets the ticker.any_of query param.
func (ListUniversalSnapshotsParams) WithTickersByComparison ¶
func (p ListUniversalSnapshotsParams) WithTickersByComparison(c Comparator, q string) *ListUniversalSnapshotsParams
WithTickersByComparison sets the ticker inequality query params. Comparator options include EQ, LT, LTE, GT, and GTE.
func (ListUniversalSnapshotsParams) WithType ¶
func (p ListUniversalSnapshotsParams) WithType(q string) *ListUniversalSnapshotsParams
WithType sets the type query param.
type ListUniversalSnapshotsResponse ¶
type ListUniversalSnapshotsResponse struct {
BaseResponse
Results []SnapshotResponseModel `json:"results,omitempty"`
}
ListUniversalSnapshotsResponse is the response returned by the ListUniversalSnapshots method.
type MACDIndicatorResults ¶
type MACDIndicatorResults struct {
Underlying UnderlyingResults `json:"underlying,omitempty"`
Values MACDIndicatorValues `json:"values,omitempty"`
}
type MACDIndicatorValue ¶
type MACDIndicatorValues ¶
type MACDIndicatorValues []MACDIndicatorValue
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 MinuteSnapshot struct {
AccumulatedVolume float64 `json:"av,omitempty"`
Close float64 `json:"c,omitempty"`
High float64 `json:"h,omitempty"`
Low float64 `json:"l,omitempty"`
Open float64 `json:"o,omitempty"`
Volume float64 `json:"v,omitempty"`
VolumeWeightedAverage float64 `json:"vw,omitempty"`
NumberOfTransactions float64 `json:"n,omitempty"`
Timestamp Millis `json:"t,omitempty"`
OTC bool `json:"otc,omitempty"`
}
MinuteSnapshot is the most recent minute agg for a ticker.
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 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"`
LastTrade LastTradeOptionContractSnapshot `json:"last_trade,omitempty"`
OpenInterest float64 `json:"open_interest,omitempty"`
UnderlyingAsset UnderlyingAsset `json:"underlying_asset,omitempty"`
FairMarketValue float64 `json:"fmv,omitempty"`
FMVLastUpdated Nanos `json:"fmv_last_updated,omitempty"`
}
OptionContractSnapshot is a collection of data for an option contract ticker including the current day aggregate and the most recent quote.
type OptionDetails ¶
type OptionDetails struct {
ContractType string `json:"contract_type,omitempty"`
ExerciseStyle string `json:"exercise_style,omitempty"`
ExpirationDate Date `json:"expiration_date,omitempty"`
StrikePrice float64 `json:"strike_price,omitempty"`
Ticker string `json:"ticker,omitempty"`
}
OptionDetails contains more detailed information about an option contract.
type OptionsContract ¶
type OptionsContract struct {
AdditionalUnderlyings []Underlying `json:"additional_underlyings,omitempty"`
CFI string `json:"cfi,omitempty"`
ContractType string `json:"contract_type,omitempty"`
Correction int32 `json:"correction,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"`
}
OptionsContract contains detailed information on a specified options contract.
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"`
}
OrderBookQuote contains quote information for a crypto ticker.
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 int64 `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 RelatedCompany ¶
type RelatedCompany struct {
Ticker string `json:"ticker,omitempty"`
}
RelatedCompany represents a related ticker based on news or sec filings.
type RequestOption ¶
type RequestOption func(o *RequestOptions)
RequestOption changes the configuration of RequestOptions.
func EdgeUserAgent ¶
func EdgeUserAgent(userAgent string) RequestOption
EdgeUserAgent sets the Launchpad optional header denoting the Edge User's UserAgent.
func QueryParam ¶
func QueryParam(key, value string) RequestOption
QueryParam sets a query param as an option.
func RequiredEdgeHeaders ¶
func RequiredEdgeHeaders(edgeID, edgeIPAddress string) RequestOption
RequiredEdgeHeaders sets the required headers for the Launchpad product.
func WithTrace ¶
func WithTrace(trace bool) RequestOption
WithTrace enables or disables request tracing.
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
// Trace enables request tracing
Trace bool
}
RequestOptions are used to configure client calls.
type SIPMapping ¶
type SIPMapping struct {
CTA string `json:"CTA,omitempty"`
OPRA string `json:"OPRA,omitempty"`
UTP string `json:"UTP,omitempty"`
}
SIPMapping maps a condition to symbols for each SIP.
type ScheduleEvent ¶
type SeriesType ¶
type SeriesType string
const ( High SeriesType = "high" Open SeriesType = "open" Low SeriesType = "low" Close SeriesType = "close" )
type Session ¶
type Session struct {
Change float64 `json:"change,omitempty"`
ChangePercent float64 `json:"change_percent,omitempty"`
EarlyTradingChange float64 `json:"early_trading_change,omitempty"`
EarlyTradingChangePercent float64 `json:"early_trading_change_percent,omitempty"`
RegularTradingChange float64 `json:"regular_trading_change,omitempty"`
RegularTradingChangePercent float64 `json:"regular_trading_change_percent,omitempty"`
LateTradingChange float64 `json:"late_trading_change,omitempty"`
LateTradingChangePercent float64 `json:"late_trading_change_percent,omitempty"`
Close float64 `json:"close,omitempty"`
High float64 `json:"high,omitempty"`
Low float64 `json:"low,omitempty"`
Open float64 `json:"open,omitempty"`
PreviousClose float64 `json:"previous_close,omitempty"`
Volume float64 `json:"volume,omitempty"`
Price float64 `json:"price,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
VWAP float64 `json:"vwap,omitempty"`
}
Session contains all the information that might come back in the Session attribute of a SnapshotResponseModel or SummaryResult.
type ShortInterest ¶
type ShortInterest struct {
AvgDailyVolume *int64 `json:"avg_daily_volume,omitempty"`
DaysToCover *float64 `json:"days_to_cover,omitempty"`
SettlementDate *string `json:"settlement_date,omitempty"`
ShortInterest *int64 `json:"short_interest,omitempty"`
Ticker *string `json:"ticker,omitempty"`
}
ShortInterest contains short interest data for a specific stock on a settlement date.
type ShortVolume ¶
type ShortVolume struct {
ADFShortVolume *int64 `json:"adf_short_volume,omitempty"`
ADFShortVolumeExempt *int64 `json:"adf_short_volume_exempt,omitempty"`
Date *string `json:"date,omitempty"`
ExemptVolume *int64 `json:"exempt_volume,omitempty"`
NasdaqCarteretShortVolume *int64 `json:"nasdaq_carteret_short_volume,omitempty"`
NasdaqCarteretShortVolumeExempt *int64 `json:"nasdaq_carteret_short_volume_exempt,omitempty"`
NasdaqChicagoShortVolume *int64 `json:"nasdaq_chicago_short_volume,omitempty"`
NasdaqChicagoShortVolumeExempt *int64 `json:"nasdaq_chicago_short_volume_exempt,omitempty"`
NonExemptVolume *int64 `json:"non_exempt_volume,omitempty"`
NYSEShortVolume *int64 `json:"nyse_short_volume,omitempty"`
NYSEShortVolumeExempt *int64 `json:"nyse_short_volume_exempt,omitempty"`
ShortVolume *int64 `json:"short_volume,omitempty"`
ShortVolumeRatio *float64 `json:"short_volume_ratio,omitempty"`
Ticker *string `json:"ticker,omitempty"`
TotalVolume *int64 `json:"total_volume,omitempty"`
}
ShortVolume contains short volume data for a specific stock on a trade date.
type SingleIndicatorResults ¶
type SingleIndicatorResults struct {
Underlying UnderlyingResults `json:"underlying,omitempty"`
Values SingleIndicatorValues `json:"values,omitempty"`
}
type SingleIndicatorValue ¶
type SingleIndicatorValues ¶
type SingleIndicatorValues []SingleIndicatorValue
type SnapshotLastMinute ¶
type SnapshotLastMinute struct {
Close float64 `json:"close,omitempty"`
High float64 `json:"high,omitempty"`
Low float64 `json:"low,omitempty"`
Transactions int64 `json:"transactions,omitempty"`
Open float64 `json:"open,omitempty"`
Volume float64 `json:"volume,omitempty"`
VWAP float64 `json:"vwap,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
}
SnapshotLastMinute contains all the information that might come back in the last_minute attribute of a SnapshotResponseModel.
type SnapshotLastQuote ¶
type SnapshotLastQuote struct {
Ask float64 `json:"ask,omitempty"`
AskSize float64 `json:"ask_size,omitempty"`
Bid float64 `json:"bid,omitempty"`
BidSize float64 `json:"bid_size,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
Midpoint float64 `json:"midpoint,omitempty"`
Timeframe string `json:"timeframe,omitempty"`
Exchange int64 `json:"exchange,omitempty"`
}
SnapshotLastQuote contains all the information that might come back in the last_quote attribute of a SnapshotResponse.
type SnapshotLastTrade ¶
type SnapshotLastTrade struct {
Timestamp int64 `json:"sip_timestamp,omitempty"`
ParticipantTimestamp int64 `json:"participant_timestamp,omitempty"`
Conditions []int32 `json:"conditions,omitempty"`
Price float64 `json:"price,omitempty"`
Size uint32 `json:"size,omitempty"`
Exchange int32 `json:"exchange,omitempty"`
Timeframe string `json:"timeframe,omitempty"`
ID string `json:"id,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
}
SnapshotLastTrade contains all the information that might come back in the last_trade attribute of a SnapshotResponse.
type SnapshotResponseModel ¶
type SnapshotResponseModel struct {
Name string `json:"name,omitempty"`
MarketStatus string `json:"market_status,omitempty"`
Ticker string `json:"ticker,omitempty"`
Type string `json:"type,omitempty"`
LastMinute SnapshotLastMinute `json:"last_minute,omitempty"`
LastQuote SnapshotLastQuote `json:"last_quote,omitempty"`
LastTrade SnapshotLastTrade `json:"last_trade,omitempty"`
Session Session `json:"session,omitempty"`
BreakEvenPrice float64 `json:"break_even_price,omitempty"`
Details Details `json:"details,omitempty"`
Greeks Greeks `json:"greeks,omitempty"`
ImpliedVolatility float64 `json:"implied_volatility,omitempty"`
OpenInterest float64 `json:"open_interest,omitempty"`
UnderlyingAsset UnderlyingAsset `json:"underlying_asset,omitempty"`
Value float64 `json:"value,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
Timeframe string `json:"timeframe,omitempty"`
FairMarketValue float64 `json:"fmv,omitempty"`
FMVLastUpdated Nanos `json:"fmv_last_updated,omitempty"`
Error string `json:"error"`
Message string `json:"message"`
}
SnapshotResponseModel contains all the information that might come back in a SnapshotResponse.
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" StrikePrice Sort = "strike_price" ExpirationDate Sort = "expiration_date" FilingDate Sort = "filing_date" PeriodOfReportDate Sort = "period_of_report_date" )
type Split ¶
type Split struct {
ExecutionDate Date `json:"execution_date,omitempty"`
SplitFrom float64 `json:"split_from,omitempty"`
SplitTo float64 `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 SummaryResult ¶
type SummaryResult struct {
Price float64 `json:"price,omitempty"`
Name string `json:"name,omitempty"`
Ticker string `json:"ticker,omitempty"`
Branding Branding `json:"branding,omitempty"`
MarketStatus string `json:"market_status,omitempty"`
Type string `json:"type,omitempty"`
Session Session `json:"session,omitempty"`
Options Options `json:"options,omitempty"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
}
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"`
CurrencySymbol string `json:"currency_symbol,omitempty"`
BaseCurrencyName string `json:"base_currency_name,omitempty"`
BaseCurrencySymbol string `json:"base_currency_symbol,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"`
SourceFeed string `json:"source_feed,omitempty"`
}
Ticker contains detailed information on a specified ticker symbol.
type TickerChangeEvent ¶
type TickerChangeEvent struct {
Ticker string `json:"ticker"`
}
TickerChangeEvent represents the data relevant to a ticker_change typed event.
type TickerEvent ¶
type TickerEvent struct {
Date Date `json:"date"`
Type string `json:"type"`
TickerChange *TickerChangeEvent `json:"ticker_change,omitempty"`
}
TickerEvent contains the data for the different type of ticker events that could occur.
type TickerEventResult ¶
type TickerEventResult struct {
// Name is the company name.
Name string `json:"name"`
Events []TickerEvent `json:"events"`
}
TickerEventResult is the data for a ticker event.
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"`
Insights []Insights `json:"insights"`
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"`
FairMarketValue float64 `json:"fmv,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.
type TreasuryYield ¶
type TreasuryYield struct {
Date string `json:"date,omitempty"`
Yield1Month *float64 `json:"yield_1_month,omitempty"`
Yield3Month *float64 `json:"yield_3_month,omitempty"`
Yield6Month *float64 `json:"yield_6_month,omitempty"`
Yield1Year *float64 `json:"yield_1_year,omitempty"`
Yield2Year *float64 `json:"yield_2_year,omitempty"`
Yield3Year *float64 `json:"yield_3_year,omitempty"`
Yield5Year *float64 `json:"yield_5_year,omitempty"`
Yield7Year *float64 `json:"yield_7_year,omitempty"`
Yield10Year *float64 `json:"yield_10_year,omitempty"`
Yield20Year *float64 `json:"yield_20_year,omitempty"`
Yield30Year *float64 `json:"yield_30_year,omitempty"`
}
TreasuryYield contains treasury yield data for a specific date.
type Underlying ¶
type Underlying struct {
Amount float64 `json:"amount,omitempty"`
Type string `json:"type,omitempty"`
Underlying string `json:"underlying,omitempty"`
}
An underlying or deliverable associated with an option contract.
type UnderlyingAsset ¶
type UnderlyingAsset struct {
ChangeToBreakEven float64 `json:"change_to_break_even,omitempty"`
LastUpdated int64 `json:"last_updated,omitempty"`
Price float64 `json:"price,omitempty"`
Value float64 `json:"value,omitempty"`
Ticker string `json:"ticker,omitempty"`
Timeframe string `json:"timeframe,omitempty"`
}
UnderlyingAsset contains information on the underlying stock for this options contract.
type UnderlyingResults ¶
type UpdateRules ¶
type UpdateRules struct {
Consolidated struct {
UpdatesHighLow bool `json:"updates_high_low,omitempty"`
UpdatesOpenClose bool `json:"updates_open_close,omitempty"`
UpdatesVolume bool `json:"updates_volume,omitempty"`
} `json:"consolidated,omitempty"`
MarketCenter struct {
UpdatesHighLow bool `json:"updates_high_low,omitempty"`
UpdatesOpenClose bool `json:"updates_open_close,omitempty"`
UpdatesVolume bool `json:"updates_volume,omitempty"`
} `json:"market_center,omitempty"`
}
UpdateRules is a list of aggregation rules.