constants

package
v0.0.0-...-2ad8316 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const AlertsMaxCount = 300

AlertsMaxCount is the maximum count that can be included in a List Alerts request.

View Source
const GetQuotesMaxSymbols = 50

GetQuotesMaxSymbols is the maximum number of symbols that can be included in a GetQuotes request with the `overrideSymbolCount` flag set.

View Source
const GetQuotesMaxSymbolsBeforeOverride = 25

GetQuotesMaxSymbolsBeforeOverride is the maximum number of symbols that can be included in a GetQuotes request without specifying the `overrideSymbolCount` flag.

View Source
const ListOrdersMaxSymbols = 25

ListOrdersMaxSymbols is the maximum number of symbols that can be included in a List Orders request

View Source
const OrdersMaxCount = 100

OrdersMaxCount is the maximum count that can be included in a List Orders request.

View Source
const PortfolioMaxCount = 65535

PortfolioMaxCount is the maximum count that can be included in a View Portfolio request. Note that ETrade does not document this value, so I determined it empirically by increasing the count until I got a 500 Internal Server Error. I do not have a portfolio with this many positions in it, so I'm not sure if there's a practical lower limit.

View Source
const TransactionsMaxCount = 50

TransactionsMaxCount is the maximum count that can be included in a List Transactions request. Note that ETrade does not document this value, so I determined it empirically by increasing the count until I got a 500 Internal Server Error. The resulting value was 50, which is the documented default number of transactions returned if no count is specified.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertCategory

type AlertCategory int

AlertCategory specifies the category of an alert for alert queries. See the constants below for semantics.

const (
	// AlertCategoryNil indicates no alert status
	// (e.g. to make a query use the default value from ETrade)
	AlertCategoryNil AlertCategory = iota

	// AlertCategoryStock indicates an alert related to a stock
	AlertCategoryStock

	// AlertCategoryAccount indicates an alert related to an account
	AlertCategoryAccount
)

func (AlertCategory) String

func (e AlertCategory) String() string

String converts an AlertCategory to its string representation.

type AlertStatus

type AlertStatus int

AlertStatus specifies the status of an alert for alert queries. See the constants below for semantics.

const (
	// AlertStatusNil indicates no alert status
	// (e.g. to make a query use the default value from ETrade)
	AlertStatusNil AlertStatus = iota

	// AlertStatusRead indicates an alert that a customer has read
	AlertStatusRead

	// AlertStatusUnread indicates an alert that a customer has not yet read
	AlertStatusUnread

	// AlertStatusDeleted indicates an alert that a customer has deleted
	AlertStatusDeleted
)

func (AlertStatus) String

func (e AlertStatus) String() string

String converts an AlertStatus to its string representation.

type MarketSession

type MarketSession int

MarketSession specifies the market session for which to get results See the constants below for semantics.

const (
	// MarketSessionNil indicates no market session
	// (e.g. to make a query use the default value from ETrade)
	MarketSessionNil MarketSession = iota

	// MarketSessionRegular gets results for the regular market session
	MarketSessionRegular

	// MarketSessionExtended gets results for the extended market session
	MarketSessionExtended
)

func (*MarketSession) String

func (e *MarketSession) String() string

String converts a MarketSession to its string representation.

type OptionCategory

type OptionCategory int

OptionCategory specifies the category of options to retrieve. See the constants below for semantics.

const (
	// OptionCategoryNil indicates no option category
	// (e.g. to make a query use the default value from ETrade)
	OptionCategoryNil OptionCategory = iota

	// OptionCategoryStandard gets standard options
	OptionCategoryStandard

	// OptionCategoryAll gets all options
	OptionCategoryAll

	// OptionCategoryMini gets mini options
	OptionCategoryMini
)

func (OptionCategory) String

func (e OptionCategory) String() string

String converts an OptionCategory to its string representation.

type OptionChainType

type OptionChainType int

OptionChainType specifies the type of option chain to retrieve. See the constants below for semantics.

const (
	// OptionChainTypeNil indicates no chain type
	// (e.g. to make a query use the default value from ETrade)
	OptionChainTypeNil OptionChainType = iota

	// OptionChainTypeCall gets calls
	OptionChainTypeCall

	// OptionChainTypePut gets puts
	OptionChainTypePut

	// OptionChainTypeCallPut gets calls and puts
	OptionChainTypeCallPut
)

func (OptionChainType) String

func (e OptionChainType) String() string

String converts a OptionChainType to its string representation.

type OptionExpiryType

type OptionExpiryType int

OptionExpiryType specifies the expiration type to retrieve. See the constants below for semantics.

const (
	// OptionExpiryTypeNil indicates no expiry type
	// (e.g. to make a query use the default value from ETrade)
	OptionExpiryTypeNil OptionExpiryType = iota

	// OptionExpiryTypeUnspecified gets options with unspecified expiry type
	OptionExpiryTypeUnspecified

	// OptionExpiryTypeDaily gets options with daily expiry type
	OptionExpiryTypeDaily

	// OptionExpiryTypeWeekly gets options with weekly expiry type
	OptionExpiryTypeWeekly

	// OptionExpiryTypeMonthly gets options with monthly expiry type
	OptionExpiryTypeMonthly

	// OptionExpiryTypeQuarterly gets options with quarterly expiry type
	OptionExpiryTypeQuarterly

	// OptionExpiryTypeVix gets options with VIX expiry type
	OptionExpiryTypeVix

	// OptionExpiryTypeAll gets options with all expiry types
	OptionExpiryTypeAll

	// OptionExpiryTypeMonthEnd gets options with month end expiry type
	OptionExpiryTypeMonthEnd
)

func (OptionExpiryType) String

func (e OptionExpiryType) String() string

String converts a OptionExpiryType to its string representation.

type OptionPriceType

type OptionPriceType int

OptionPriceType specifies the option price type to retrieve. See the constants below for semantics.

const (
	// OptionPriceTypeNil indicates no price type
	// (e.g. to make a query use the default value from ETrade)
	OptionPriceTypeNil OptionPriceType = iota

	// OptionPriceTypeExtendedHours gets extended hours prices
	OptionPriceTypeExtendedHours

	// OptionPriceTypeAll gets all prices
	OptionPriceTypeAll
)

func (OptionPriceType) String

func (e OptionPriceType) String() string

String converts a OptionPriceType to its string representation.

type OrderSecurityType

type OrderSecurityType int

OrderSecurityType specifies the security type of orders to retrieve. See the constants below for semantics.

const (
	// OrderSecurityTypeNil indicates no order security type
	// (e.g. to make a query use the default value from ETrade)
	OrderSecurityTypeNil OrderSecurityType = iota

	// OrderSecurityTypeEquity gets equity orders
	OrderSecurityTypeEquity

	// OrderSecurityTypeOption gets option orders
	OrderSecurityTypeOption

	// OrderSecurityTypeMutualFund gets mutual fund orders
	OrderSecurityTypeMutualFund

	// OrderSecurityTypeMoneyMarketFund gets money market mutual fund orders
	OrderSecurityTypeMoneyMarketFund
)

func (OrderSecurityType) String

func (e OrderSecurityType) String() string

String converts an OrderSecurityType to its string representation.

type OrderStatus

type OrderStatus int

OrderStatus specifies the status of orders to retrieve. See the constants below for semantics.

const (
	// OrderStatusNil indicates no order status
	// (e.g. to make a query use the default value from ETrade)
	OrderStatusNil OrderStatus = iota

	// OrderStatusOpen gets orders that are open
	OrderStatusOpen

	// OrderStatusExecuted gets orders that have been executed
	OrderStatusExecuted

	// OrderStatusCanceled gets orders that have been canceled
	OrderStatusCanceled

	// OrderStatusIndividualFills gets orders with individual fills
	OrderStatusIndividualFills

	// OrderStatusCancelRequested gets orders with pending cancel requests
	OrderStatusCancelRequested

	// OrderStatusExpired gets orders that have expired
	OrderStatusExpired

	// OrderStatusRejected gets orders that have been rejected
	OrderStatusRejected
)

func (OrderStatus) String

func (e OrderStatus) String() string

String converts an OrderStatus to its string representation.

type OrderTransactionType

type OrderTransactionType int

OrderTransactionType specifies the transaction type of orders to retrieve. See the constants below for semantics.

const (
	// OrderTransactionTypeNil indicates no order transaction type
	// (e.g. to make a query use the default value from ETrade)
	OrderTransactionTypeNil OrderTransactionType = iota

	// OrderTransactionTypeExtendedHours gets extended hours orders
	OrderTransactionTypeExtendedHours

	// OrderTransactionTypeBuy gets buy orders
	OrderTransactionTypeBuy

	// OrderTransactionTypeSell gets sell orders
	OrderTransactionTypeSell

	// OrderTransactionTypeShort gets short orders
	OrderTransactionTypeShort

	// OrderTransactionTypeBuyToCover gets buy to cover orders
	OrderTransactionTypeBuyToCover

	// OrderTransactionTypeMutualFundExchange gets mutual fund exchange orders
	OrderTransactionTypeMutualFundExchange
)

func (OrderTransactionType) String

func (e OrderTransactionType) String() string

String converts an OrderTransactionType to its string representation.

type PortfolioSortBy

type PortfolioSortBy int

PortfolioSortBy specifies the column by which the portfolio results will be sorted. See the constants below for semantics.

const (
	// PortfolioSortByNil indicates no sorting
	// (e.g. to make a query use the default value from ETrade)
	PortfolioSortByNil PortfolioSortBy = iota

	// PortfolioSortBySymbol sorts results by the symbol
	PortfolioSortBySymbol

	// PortfolioSortByTypeName sorts results by the type name
	PortfolioSortByTypeName

	// PortfolioSortByExchangeName sorts results by the exchange name
	PortfolioSortByExchangeName

	// PortfolioSortByCurrency sorts results by the currency
	PortfolioSortByCurrency

	// PortfolioSortByQuantity sorts results by the quantity
	PortfolioSortByQuantity

	// PortfolioSortByLongOrShort sorts results by the position type (long or short)
	PortfolioSortByLongOrShort

	// PortfolioSortByDateAcquired sorts results by the date acquired
	PortfolioSortByDateAcquired

	// PortfolioSortByPricePaid sorts results by the price paid
	PortfolioSortByPricePaid

	// PortfolioSortByTotalGain sorts results by the total gain
	PortfolioSortByTotalGain

	// PortfolioSortByTotalGainPct sorts results by the total gain percent
	PortfolioSortByTotalGainPct

	// PortfolioSortByMarketValue sorts results by the market value
	PortfolioSortByMarketValue

	// PortfolioSortByBid sorts results by the bid
	PortfolioSortByBid

	// PortfolioSortByAsk sorts results by the ask
	PortfolioSortByAsk

	// PortfolioSortByPriceChange sorts results by the price change
	PortfolioSortByPriceChange

	// PortfolioSortByPriceChangePct sorts results by the price change percent
	PortfolioSortByPriceChangePct

	// PortfolioSortByVolume sorts results by the volume
	PortfolioSortByVolume

	// PortfolioSortByWeek52High sorts results by the 52-week high
	PortfolioSortByWeek52High

	// PortfolioSortByWeek52Low sorts results by the 52-week low
	PortfolioSortByWeek52Low

	// PortfolioSortByEps sorts results by the earnings per share
	PortfolioSortByEps

	// PortfolioSortByPeRatio sorts results by the price to earnings (P/E) ratio
	PortfolioSortByPeRatio

	// PortfolioSortByOptionType sorts results by the option type
	PortfolioSortByOptionType

	// PortfolioSortByStrikePrice sorts results by the strike price
	PortfolioSortByStrikePrice

	// PortfolioSortByPremium sorts results by the premium
	PortfolioSortByPremium

	// PortfolioSortByExpiration sorts results by the expiration
	PortfolioSortByExpiration

	// PortfolioSortByDaysGain sorts results by the day's gain
	PortfolioSortByDaysGain

	// PortfolioSortByCommission sorts results by the commission
	PortfolioSortByCommission

	// PortfolioSortByMarketCap sorts results by the market cap
	PortfolioSortByMarketCap

	// PortfolioSortByPrevClose sorts results by the previous close
	PortfolioSortByPrevClose

	// PortfolioSortByOpen sorts results by the open
	PortfolioSortByOpen

	// PortfolioSortByDaysRange sorts results by the day's range
	PortfolioSortByDaysRange

	// PortfolioSortByTotalCost sorts results by the total cost
	PortfolioSortByTotalCost

	// PortfolioSortByDaysGainPct sorts results by the day's gain percentage
	PortfolioSortByDaysGainPct

	// PortfolioSortByPctOfPortfolio sorts results by the percent of portfolio
	PortfolioSortByPctOfPortfolio

	// PortfolioSortByLastTradeTime sorts results by the last trade time
	PortfolioSortByLastTradeTime

	// PortfolioSortByBaseSymbolPrice sorts results by the base symbol price
	PortfolioSortByBaseSymbolPrice

	// PortfolioSortByWeek52Range sorts results by the 52-week range
	PortfolioSortByWeek52Range

	// PortfolioSortByLastTrade sorts results by the last trade
	PortfolioSortByLastTrade

	// PortfolioSortBySymbolDesc sorts results by the symbol description
	PortfolioSortBySymbolDesc

	// PortfolioSortByBidSize sorts results by the bid size
	PortfolioSortByBidSize

	// PortfolioSortByAskSize sorts results by the ask size
	PortfolioSortByAskSize

	// PortfolioSortByOtherFees sorts results by other fees
	PortfolioSortByOtherFees

	// PortfolioSortByHeldAs sorts results by held as
	PortfolioSortByHeldAs

	// PortfolioSortByOptionMultiplier sorts results by the option multiplier
	PortfolioSortByOptionMultiplier

	// PortfolioSortByDeliverables sorts results by the deliverables
	PortfolioSortByDeliverables

	// PortfolioSortByCostPerShare sorts results by the cost per share
	PortfolioSortByCostPerShare

	// PortfolioSortByDividend sorts results by the dividend
	PortfolioSortByDividend

	// PortfolioSortByDivYield sorts results by the dividend yield
	PortfolioSortByDivYield

	// PortfolioSortByDivPayDate sorts results by the dividend pay date
	PortfolioSortByDivPayDate

	// PortfolioSortByEstEarn sorts results by the estimated earnings
	PortfolioSortByEstEarn

	// PortfolioSortByExDivDate sorts results by the extended dividend date
	PortfolioSortByExDivDate

	// PortfolioSortByTenDayAvgVol sorts results by the 10-day average volume
	PortfolioSortByTenDayAvgVol

	// PortfolioSortByBeta sorts results by the beta
	PortfolioSortByBeta

	// PortfolioSortByBidAskSpread sorts results by the bid ask spread
	PortfolioSortByBidAskSpread

	// PortfolioSortByMarginable sorts results by the sum available for margin
	PortfolioSortByMarginable

	// PortfolioSortByDelta52wkHi sorts results by the high for the 52-week high/low delta calculation
	PortfolioSortByDelta52wkHi

	// PortfolioSortByDelta52WkLow sorts results by the low for the 52-week high/low delta calculation
	PortfolioSortByDelta52WkLow

	// PortfolioSortByPerf1Mon sorts results by the 1-month performance
	PortfolioSortByPerf1Mon

	// PortfolioSortByAnnualDiv sorts results by the annual dividend
	PortfolioSortByAnnualDiv

	// PortfolioSortByPerf12Mon sorts results by the 12-month performance
	PortfolioSortByPerf12Mon

	// PortfolioSortByPerf3Mon sorts results by the 3-month performance
	PortfolioSortByPerf3Mon

	// PortfolioSortByPerf6Mon sorts results by the 6-month performance
	PortfolioSortByPerf6Mon

	// PortfolioSortByPreDayVol sorts results by the previous day's volume
	PortfolioSortByPreDayVol

	// PortfolioSortBySv1MonAvg sorts results by the 1-month average stochastic volatility
	PortfolioSortBySv1MonAvg

	// PortfolioSortBySv10DayAvg sorts results by the 10-day average stochastic volatility
	PortfolioSortBySv10DayAvg

	// PortfolioSortBySv20DayAvg sorts results by the 20-day average stochastic volatility
	PortfolioSortBySv20DayAvg

	// PortfolioSortBySv2MonAvg sorts results by the 2-month average stochastic volatility
	PortfolioSortBySv2MonAvg

	// PortfolioSortBySv3MonAvg sorts results by the 3-month average stochastic volatility
	PortfolioSortBySv3MonAvg

	// PortfolioSortBySv4MonAvg sorts results by the 4-month average stochastic volatility
	PortfolioSortBySv4MonAvg

	// PortfolioSortBySv6MonAvg sorts results by the 6-month average stochastic volatility
	PortfolioSortBySv6MonAvg

	// PortfolioSortByDelta sorts results by the delta
	PortfolioSortByDelta

	// PortfolioSortByGamma sorts results by the gamma
	PortfolioSortByGamma

	// PortfolioSortByIvPct sorts results by the implied volatility (IV) percentage
	PortfolioSortByIvPct

	// PortfolioSortByTheta sorts results by the theta
	PortfolioSortByTheta

	// PortfolioSortByVega sorts results by the vega
	PortfolioSortByVega

	// PortfolioSortByAdjNonadjFlag sorts results by the adjusted/non-adjusted flag
	PortfolioSortByAdjNonadjFlag

	// PortfolioSortByDaysExpiration sorts results by the days remaining until expiration
	PortfolioSortByDaysExpiration

	// PortfolioSortByOpenInterest sorts results by the open interest
	PortfolioSortByOpenInterest

	// PortfolioSortByIntrinsicValue sorts results by the intrinsic value
	PortfolioSortByIntrinsicValue

	// PortfolioSortByRho sorts results by the rho
	PortfolioSortByRho

	// PortfolioSortByTypeCode sorts results by the type code
	PortfolioSortByTypeCode

	// PortfolioSortByDisplaySymbol sorts results by the display symbol
	PortfolioSortByDisplaySymbol

	// PortfolioSortByAfterHoursPctChange sorts results by the after-hours percentage change
	PortfolioSortByAfterHoursPctChange

	// PortfolioSortByPreMarketPctChange sorts results by the pre-market percentage change
	PortfolioSortByPreMarketPctChange

	// PortfolioSortByExpandCollapseFlag sorts results by the expand/collapse flag
	PortfolioSortByExpandCollapseFlag
)

func (*PortfolioSortBy) String

func (e *PortfolioSortBy) String() string

String converts a PortfolioSortBy to its string representation.

type PortfolioView

type PortfolioView int

PortfolioView specifies the type of portfolio view to retrieve See the constants below for semantics.

const (
	// PortfolioViewNil indicates no portfolio view
	// (e.g. to make a query use the default value from ETrade)
	PortfolioViewNil PortfolioView = iota

	// PortfolioViewPerformance gets the performance view
	// See https://apisb.etrade.com/docs/api/account/api-portfolio-v1.html#/definitions/PerformanceView
	PortfolioViewPerformance

	// PortfolioViewFundamental gets the fundamental view
	// See https://apisb.etrade.com/docs/api/account/api-portfolio-v1.html#/definitions/FundamentalView
	PortfolioViewFundamental

	// PortfolioViewOptionsWatch gets the options watch view
	// See https://apisb.etrade.com/docs/api/account/api-portfolio-v1.html#/definitions/OptionsWatchView
	PortfolioViewOptionsWatch

	// PortfolioViewQuick gets the quick view
	// See https://apisb.etrade.com/docs/api/account/api-portfolio-v1.html#/definitions/QuickView
	PortfolioViewQuick

	// PortfolioViewComplete gets the complete view
	// See https://apisb.etrade.com/docs/api/account/api-portfolio-v1.html#/definitions/CompleteView
	PortfolioViewComplete
)

func (*PortfolioView) String

func (e *PortfolioView) String() string

String converts a PortfolioView to its string representation.

type QuoteDetailFlag

type QuoteDetailFlag int

QuoteDetailFlag specifies the quote detail to retrieve for quote queries. See the constants below for semantics.

const (
	// QuoteDetailFlagNil indicates no quote detail
	// (e.g. to make a query use the default value from ETrade)
	QuoteDetailFlagNil QuoteDetailFlag = iota

	// QuoteDetailFlagAll gets all available quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/AllQuoteDetails
	QuoteDetailFlagAll

	// QuoteDetailFlagFundamental gets fundamental quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/FundamentalQuoteDetails
	QuoteDetailFlagFundamental

	// QuoteDetailFlagIntraday gets intraday quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/IntradayQuoteDetails
	QuoteDetailFlagIntraday

	// QuoteDetailFlagOptions gets options quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/OptionQuoteDetails
	QuoteDetailFlagOptions

	// QuoteDetailFlagWeek52 gets 52-week quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/Week52QuoteDetails
	QuoteDetailFlagWeek52

	// QuoteDetailFlagMutualFund gets mutual fund quote detail
	// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html#/definitions/MutualFund
	QuoteDetailFlagMutualFund
)

func (QuoteDetailFlag) String

func (e QuoteDetailFlag) String() string

String converts a QuoteDetailFlag to its string representation.

type SortOrder

type SortOrder int
const (
	// SortOrderNil indicates no sort order
	// (e.g. to make a query use the default value from ETrade)
	SortOrderNil SortOrder = iota
	SortOrderAsc
	SortOrderDesc
)

func (SortOrder) String

func (e SortOrder) String() string

String converts a SortOrder to its string representation.

Jump to

Keyboard shortcuts

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