Package com.seansoper.batil.brokers.etrade.api

Classes that map nearly 1-to-1 against the E*TRADE API.

Types

Account
Link copied to clipboard
data class Account(accountId: String, accountIdKey: String, accountType: AccountType, institutionType: String?, closedDateRaw: Int, mode: AccountMode?, description: String?, name: String?, status: AccountStatus?)
AccountBalance
Link copied to clipboard
data class AccountBalance(accountId: String?, asOfDate: Int?, dayTraderStatus: String?, accountMode: AccountMode?, accountType: AccountType?, institutionType: InstitutionType?, optionLevel: OptionLevel, quoteModeRaw: Int, description: String?, cash: AccountCash, balances: ComputedBalance)
AccountCash
Link copied to clipboard
data class AccountCash(fundsForOpenOrdersCash: Float?, moneyMktBalance: Float?)
AccountList
Link copied to clipboard
data class AccountList(accounts: List<Account>)
AccountListResponse
Link copied to clipboard
data class AccountListResponse(response: AccountRoot)
AccountMode
Link copied to clipboard
enum AccountMode : Enum<AccountMode>
AccountPortfolio
Link copied to clipboard
data class AccountPortfolio(accountId: String, next: String?, totalPages: Int?, nextPageNo: String?, positions: List<PortfolioPosition>)
AccountRoot
Link copied to clipboard
data class AccountRoot(accountRoot: AccountList)
AccountsApi
Link copied to clipboard
interface AccountsApi
AccountStatus
Link copied to clipboard
enum AccountStatus : Enum<AccountStatus>
AccountType
Link copied to clipboard
enum AccountType : Enum<AccountType>
Alert
Link copied to clipboard
data class Alert(id: Int, createTime: Instant?, subject: String, status: AlertStatus)
AlertDetails
Link copied to clipboard
data class AlertDetails(id: Int, createTime: Instant, subject: String, msgText: String?, readTime: Instant?, deleteTime: Instant?, symbol: String?, next: String?, prev: String?)
AlertDetailsResponse
Link copied to clipboard
data class AlertDetailsResponse(response: AlertDetails)
AlertsApi
Link copied to clipboard
interface AlertsApi
AlertsResponse
Link copied to clipboard
data class AlertsResponse(totalAlerts: Int, alerts: List<Alert>)
AlertsResponseEnvelope
Link copied to clipboard
data class AlertsResponseEnvelope(response: AlertsResponse)
BalanceResponse
Link copied to clipboard
data class BalanceResponse(response: AccountBalance)
CancelOrderRequest
Link copied to clipboard
data class CancelOrderRequest(orderId: Long)
CancelOrderRequestEnvelope
Link copied to clipboard
data class CancelOrderRequestEnvelope(request: CancelOrderRequest)
CancelOrderResponse
Link copied to clipboard
data class CancelOrderResponse(accountId: String, orderId: Long, cancelTime: Instant, messages: MessagesResponse?)
CancelOrderResponseEnvelope
Link copied to clipboard
data class CancelOrderResponseEnvelope(response: CancelOrderResponse)
CompleteView
Link copied to clipboard
data class CompleteView(priceAdjustedFlag: Boolean?, price: Float?, adjPrice: Float?, change: Float?, changePct: Float?, prevClose: Float?, adjPrevClose: Float?, volume: Float?, lastTrade: Float?, lastTradeTime: Int?, adjLastTrade: Float?, symbolDescription: String?, perform1Month: Float?, perform3Month: Float?, perform6Month: Float?, perform12Month: Float?, prevDayVolume: Int?, tenDayVolume: Int?, beta: Float?, sv10DaysAvg: Float?, sv20DaysAvg: Float?, sv1MonAvg: Float?, sv2MonAvg: Float?, sv3MonAvg: Float?, sv4MonAvg: Float?, sv6MonAvg: Float?, week52High: Float?, week52Low: Float?, week52Range: String?, marketCap: Float?, daysRange: String?, delta52WkHigh: Float?, delta52WkLow: Float?, currency: String?, exchange: String?, marginable: Boolean?, bid: Float?, ask: Float?, bidAskSpread: Float?, bidSize: Int?, askSize: Int?, open: Float?, delta: Float?, gamma: Float?, ivPct: Float?, rho: Float?, theta: Float?, vega: Float?, premium: Float?, daysToExpiration: Int?, intrinsicValue: Float?, openInterest: Float?, optionsAdjustedFlag: Boolean?, deliverablesStr: String?, optionMultiplier: Float?, baseSymbolAndPrice: String?, estEarnings: Float?, eps: Float?, peRatio: Float?, annualDividend: Float?, dividend: Float?, divYield: Float?, divPayDate: Int?, exDividendDate: Int?, cusip: String?, quoteStatus: QuoteMode?)
ComputedBalance
Link copied to clipboard
data class ComputedBalance(cashAvailableForInvestment: Float?, cashAvailableForWithdrawal: Float?, totalAvailableForWithdrawal: Float?, netCash: Float?, cashBalance: Float?, settledCashForInvestment: Float?, unSettledCashForInvestment: Float?, fundsWithheldFromPurchasePower: Float?, fundsWithheldFromWithdrawal: Float?, marginBuyingPower: Float?, cashBuyingPower: Float?, dtMarginBuyingPower: Float?, dtCashBuyingPower: Float?, marginBalance: Float?, shortAdjustBalance: Float?, regtEquity: Float?, regtEquityPercent: Float?, accountBalance: Float?, openCalls: OpenCalls, realTimeValues: RealTimeValues)
ConditionFollowPrice
Link copied to clipboard
enum ConditionFollowPrice : Enum<ConditionFollowPrice>
ConditionType
Link copied to clipboard
enum ConditionType : Enum<ConditionType>
DeleteAlertsEnvelope
Link copied to clipboard
data class DeleteAlertsEnvelope(response: DeleteAlertsResponse)
DeleteAlertsResponse
Link copied to clipboard
data class DeleteAlertsResponse(result: String, alerts: FailedAlerts?)
Event
Link copied to clipboard
data class Event(name: OrderEventType?, dateTime: Int?, orderNumber: Int?, instrument: Instrument)
Event
EventsResponse
Link copied to clipboard
data class EventsResponse(event: List<Event>)
ExecutionGuaranteeType
Link copied to clipboard
enum ExecutionGuaranteeType : Enum<ExecutionGuaranteeType>
FailedAlerts
Link copied to clipboard
data class FailedAlerts(alertId: List<Int>)
FundamentalView
Link copied to clipboard
data class FundamentalView(lastTrade: Float?, lastTradeTime: Instant?, change: Float?, changePct: Float?, peRatio: Float?, eps: Float?, dividend: Float?, divYield: Float?, marketCap: Float?, week52Range: String?, quoteStatus: QuoteMode?)
InstitutionType
Link copied to clipboard
enum InstitutionType : Enum<InstitutionType>
Instrument
Link copied to clipboard
data class Instrument(product: Product?, symbolDescription: String?, orderAction: OrderActionType?, quantityType: QuantityType?, quantity: Float?, cancelQuantity: Float?, orderedQuantity: Float?, filledQuantity: Float?, averageExecutionPrice: Float?, estimatedCommission: Float?, estimatedFees: Float?, bid: Float?, ask: Float?, lastprice: Float?, currency: String?, lots: LotsResponse?, mfQuantity: MutualFundQuantity?, osiKey: String?, mfTransaction: String?, reserveOrder: Boolean?, reserveQuantity: Float?)
Instrument
LookupData
Link copied to clipboard
data class LookupData(data: List<LookupResult>)
LookupDataResponse
Link copied to clipboard
data class LookupDataResponse(response: LookupData)
LookupResult
Link copied to clipboard
data class LookupResult(symbol: String?, description: String?, type: String?)
Lot
Link copied to clipboard
data class Lot(id: Int, size: Float?)
Lot
LotsResponse
Link copied to clipboard
data class LotsResponse(lot: List<Lot>)
Margin
Link copied to clipboard
data class Margin(nonMarginable: MarginBalances?, marginable: MarginBalances?)
MarginBalances
Link copied to clipboard
data class MarginBalances(currentBuyingPower: Float, currentOpenOrderReserve: Float?, currentNetBuyingPower: Float?, currentOrderImpact: Float?, netBuyingPower: Float?)
MarginLevel
Link copied to clipboard
enum MarginLevel : Enum<MarginLevel>
MarketApi
Link copied to clipboard
interface MarketApi
Message
Link copied to clipboard
data class Message(description: String, code: Int, type: MessageType)
MessagesResponse
Link copied to clipboard
data class MessagesResponse(messages: List<Message>)
MessageType
Link copied to clipboard
enum MessageType : Enum<MessageType>
MutualFundQuantity
Link copied to clipboard
data class MutualFundQuantity(cash: Float?, margin: Float?, cusip: String?)
Mutual Fund Quantity
OpenCalls
Link copied to clipboard
data class OpenCalls(minEquityCall: Float?, fedCall: Float?, cashCall: Float?, houseCall: Float?)
OptionCategory
Link copied to clipboard
enum OptionCategory : Enum<OptionCategory>
OptionChainResponse
Link copied to clipboard
data class OptionChainResponse(timeStamp: Instant, quoteType: QuoteStatus, nearPrice: Float, pairs: List<OptionPair>)
OptionChainRoot
Link copied to clipboard
data class OptionChainRoot(response: OptionChainResponse)
OptionDetails
Link copied to clipboard
data class OptionDetails(optionCategory: OptionCategory?, optionRootSymbol: String?, timeStamp: Instant?, adjustedFlag: Boolean?, displaySymbol: String?, optionType: OptionType?, strikePrice: Float?, symbol: String?, bid: Float?, ask: Float?, bidSize: Int?, askSize: Int?, inTheMoney: Boolean?, volume: Int?, openInterest: Int?, netChange: Float?, lastPrice: Float?, quoteDetail: String?, osiKey: String?, greeks: OptionGreeks)
OptionExpirationDate
Link copied to clipboard
data class OptionExpirationDate(year: Int, month: Int, day: Int, expiryType: OptionExpirationType)
OptionExpirationType
Link copied to clipboard
enum OptionExpirationType : Enum<OptionExpirationType>
OptionExpireDateResponse
Link copied to clipboard
data class OptionExpireDateResponse(dates: List<OptionExpirationDate>)
OptionExpireDateResponseEnvelope
Link copied to clipboard
data class OptionExpireDateResponseEnvelope(response: OptionExpireDateResponse)
OptionGreeks
Link copied to clipboard
data class OptionGreeks(rho: Float?, vega: Float?, theta: Float?, delta: Float?, gamma: Float?, iv: Float?, currentValue: Boolean)
OptionLevel
Link copied to clipboard
enum OptionLevel : Enum<OptionLevel>
OptionPair
Link copied to clipboard
data class OptionPair(call: OptionDetails, put: OptionDetails)
OptionsWatchView
Link copied to clipboard
data class OptionsWatchView(baseSymbolAndPrice: String?, premium: Float?, lastTrade: Float?, bid: Float?, ask: Float?, quoteStatus: QuoteMode?, lastTradeTime: Instant?)
OptionType
Link copied to clipboard
enum OptionType : Enum<OptionType>
Order
Link copied to clipboard
data class Order(orderId: Int, details: String?, orderType: OrderType?, totalOrderValue: Float?, totalCommission: Float?, orderDetail: List<OrderDetail>?, events: EventsResponse?)
Order
OrderActionType
Link copied to clipboard
enum OrderActionType : Enum<OrderActionType>
OrderDetail
Link copied to clipboard
data class OrderDetail(orderNumber: Int?, accountId: String?, previewTime: Instant?, placedTime: Instant?, executedTime: Instant?, orderValue: Float?, status: OrderStatus?, orderType: OrderType?, orderTerm: OrderTerm?, priceType: OrderPriceType?, priceValue: String?, limitPrice: Float?, stopPrice: Float?, stopLimitPrice: Float?, offsetType: OrderOffsetType?, offsetValue: Float?, marketSession: MarketSession?, routingDestination: RoutingDestination?, bracketedLimitPrice: Float?, initialStopPrice: Float?, trailPrice: Float?, triggerPrice: Float?, conditionPrice: Float?, conditionSymbol: String?, conditionType: ConditionType?, conditionFollowPrice: ConditionFollowPrice?, conditionSecurityType: String?, replacedByOrderId: Int?, replacesOrderId: Int?, allOrNone: Boolean?, previewId: Int?, instruments: List<Instrument>?, messages: MessagesResponse?, preClearanceCode: String?, overrideRestrictedCd: Int?, investmentAmount: Float?, positionQuantity: PositionQuantityType?, aipFlag: Boolean?, egQual: ExecutionGuaranteeType?, reInvestOption: ReinvestOptionType?, estimatedCommission: Float?, estimatedFees: Float?, estimatedTotalAmount: Float?, netPrice: Float?, netBid: Float?, netAsk: Float?, gcd: Int?, ratio: String?, mfpriceType: String?)
Order Details
OrderEventType
Link copied to clipboard
enum OrderEventType : Enum<OrderEventType>
OrderId
Link copied to clipboard
data class OrderId(orderId: Long, cashMargin: String?)
OrderOffsetType
Link copied to clipboard
enum OrderOffsetType : Enum<OrderOffsetType>
OrderPriceType
Link copied to clipboard
enum OrderPriceType : Enum<OrderPriceType>
OrdersApi
Link copied to clipboard
interface OrdersApi
OrdersResponse
Link copied to clipboard
data class OrdersResponse(marker: String?, next: String?, orders: List<Order>?, messages: MessagesResponse?)
Wraps response for an Order
OrdersResponseEnvelope
Link copied to clipboard
data class OrdersResponseEnvelope(response: OrdersResponse)
OrderTerm
Link copied to clipboard
enum OrderTerm : Enum<OrderTerm>
OrderType
Link copied to clipboard
enum OrderType : Enum<OrderType>
Order types available
PerformanceView
Link copied to clipboard
data class PerformanceView(change: Float?, changePct: Float?, lastTrade: Float?, daysGain: Float?, totalGain: Float?, totalGainPct: Float?, marketValue: Float?, quoteStatus: QuoteMode?, lastTradeTime: Instant?)
PlaceOrderRequest
Link copied to clipboard
data class PlaceOrderRequest(orderType: OrderType, clientOrderId: String, orders: List<PreviewOrder>, previewIds: List<PreviewId>)
PlaceOrderRequestEnvelope
Link copied to clipboard
data class PlaceOrderRequestEnvelope(request: PlaceOrderRequest)
PlaceOrderResponse
Link copied to clipboard
data class PlaceOrderResponse(orderType: OrderType, orderIds: List<OrderId>, orders: List<OrderDetail>, dstFlag: Boolean, placedTime: Instant, accountId: String, marginLevel: MarginLevel?, optionLevel: OptionLevel?)
PlaceOrderResponseEnvelope
Link copied to clipboard
data class PlaceOrderResponseEnvelope(response: PlaceOrderResponse)
Portfolio
Link copied to clipboard
data class Portfolio(totals: PortfolioTotals?, accountPortfolio: List<AccountPortfolio>)
PortfolioMargin
Link copied to clipboard
data class PortfolioMargin(houseExcessEquityNew: Float?, pmEligible: Boolean?, houseExcessEquityCurr: Float?, houseExcessEquityChange: Float?)
PortfolioPosition
Link copied to clipboard
data class PortfolioPosition(positionId: Long, accountId: String?, product: Product?, osiKey: String?, symbolDescription: String?, dateAcquired: Instant?, pricePaid: Float?, price: Float?, commissions: Float?, otherFees: Float?, quantity: Float?, positionIndicator: PositionIndicatorType?, positionType: String?, change: Float?, changePct: Float?, daysGain: Float?, daysGainPct: Float?, marketValue: Float?, totalCost: Float?, totalGain: Float?, totalGainPct: Float?, pctOfPortfolio: Float?, costPerShare: Float?, todayCommissions: Float?, todayFees: Float?, todayPricePaid: Float?, todayQuantity: Float?, quotestatus: String?, dateTimeUTC: Int?, adjPrevClose: Float?, performance: PerformanceView?, fundamental: FundamentalView?, optionsWatch: OptionsWatchView?, quick: QuickView?, complete: CompleteView?, lotsDetails: String?, quoteDetails: String?, positionLot: List<PositionLot>?)
PortfolioResponse
Link copied to clipboard
data class PortfolioResponse(response: Portfolio)
PortfolioTotals
Link copied to clipboard
data class PortfolioTotals(todaysGainLoss: Float?, todaysGainLossPct: Float?, totalMarketValue: Float?, totalGainLoss: Float?, totalGainLossPct: Float?, totalPricePaid: Float?)
PositionIndicatorType
Link copied to clipboard
enum PositionIndicatorType : Enum<PositionIndicatorType>
PositionLot
Link copied to clipboard
data class PositionLot(positionId: Int?, positionLotId: Int?, price: Float?, termCode: Int?, daysGain: Float?, daysGainPct: Float?, marketValue: Float?, totalCost: Float?, totalCostForGainPct: Float?, totalGain: Float?, lotSourceCode: Int?, originalQty: Float?, remainingQty: Float?, availableQty: Float?, orderNo: Int?, legNo: Int?, acquiredDate: Int?, locationCode: Int?, exchangeRate: Float?, settlementCurrency: String?, paymentCurrency: String?, adjPrice: Float?, commPerShare: Float?, feesPerShare: Float?, premiumAdj: Float?, shortType: Int?)
PositionQuantityType
Link copied to clipboard
enum PositionQuantityType : Enum<PositionQuantityType>
PreviewId
Link copied to clipboard
data class PreviewId(previewId: String)
PreviewOrderResponse
Link copied to clipboard
data class PreviewOrderResponse(orderType: OrderType, totalOrderValue: Float?, totalCommission: Float?, orders: List<OrderDetail>, previewIds: List<PreviewId>, marginLevel: MarginLevel?, optionLevel: OptionLevel?, margin: Margin?)
PreviewOrderResponseEnvelope
Link copied to clipboard
data class PreviewOrderResponseEnvelope(response: PreviewOrderResponse)
PreviewRequestEnvelope
Link copied to clipboard
data class PreviewRequestEnvelope(request: PreviewRequest)
Product
Link copied to clipboard
data class Product(symbol: String?, expiryYear: Int?, expiryMonth: Int?, expiryDay: Int?, expiryType: String?, callPut: OptionType?, securityType: SecurityType?, securitySubType: String?, strikePrice: Float?, productId: ProductId?)
ProductId
Link copied to clipboard
data class ProductId(symbol: String, type: ProductType)
ProductType
Link copied to clipboard
enum ProductType : Enum<ProductType>
QuantityType
Link copied to clipboard
enum QuantityType : Enum<QuantityType>
QuickView
Link copied to clipboard
data class QuickView(lastTrade: Float?, lastTradeTime: Instant?, change: Float?, changePct: Float?, volume: Int?, quoteStatus: QuoteMode?, sevenDayCurrentYield: Float?, annualTotalReturn: Float?, weightedAverageMaturity: Float?)
QuoteData
Link copied to clipboard
data class QuoteData(dateTime: GregorianCalendar, quoteStatus: QuoteStatus, ahFlag: Boolean, product: Product, tickerData: TickerData)
QuoteMode
Link copied to clipboard
enum QuoteMode : Enum<QuoteMode>
QuoteResponse
Link copied to clipboard
data class QuoteResponse(data: List<QuoteData>)
QuoteStatus
Link copied to clipboard
enum QuoteStatus : Enum<QuoteStatus>
RealTimeValues
Link copied to clipboard
data class RealTimeValues(totalAccountValue: Float?, netMv: Float?, netMvLong: Float?, netMvShort: Float?, totalLongValue: Float?)
ReinvestOptionType
Link copied to clipboard
enum ReinvestOptionType : Enum<ReinvestOptionType>
RoutingDestination
Link copied to clipboard
enum RoutingDestination : Enum<RoutingDestination>
SecurityType
Link copied to clipboard
enum SecurityType : Enum<SecurityType>
TickerData
Link copied to clipboard
data class TickerData(adjustedFlag: Boolean?, annualDividend: Float?, ask: Float?, askExchange: String?, askSize: Int?, askTime: String?, bid: Float?, bidExchange: String?, bidSize: Int?, bidTime: String?, changeClose: Float?, changeClosePercentage: Float?, companyName: String?, daysToExpiration: Int?, dirLast: String?, dividend: Float?, eps: Float?, estEarnings: Float?, exDividendDate: Int?, exchgLastTrade: String?, fsi: String?, high: Float?, high52: Float?, highAsk: Float?, highBid: Float?, lastTrade: Float?, low: Float?, low52: Float?, lowAsk: Float?, lowBid: Float?, numberOfTrades: Int?, open: Float?, openInterest: Int?, optionStyle: String?, optionUnderlier: String?, optionUnderlierExchange: String?, previousClose: Float?, previousDayVolume: Int?, primaryExchange: String?, symbolDescription: String?, todayClose: Float?, totalVolume: Int?, upc: Int?, volume10Day: Int?, cashDeliverable: Float?, marketCap: Float?, sharesOutstanding: Float?, nextEarningDate: String?, beta: Float?, yield: Float?, declaredDividend: Float?, dividendPayableDate: Int?, pe: Float?, marketCloseBidSize: Int?, marketCloseAskSize: Int?, marketCloseVolume: Int?, week52LowDate: Int?, week52HiDate: Int?, intrinsicValue: Float?, timePremium: Float?, optionMultiplier: Float?, contractSize: Float?, expirationDate: Int?, optionPreviousBidPrice: Float?, optionPreviousAskPrice: Float?, osiKey: String?, timeOfLastTrade: Int?, averageVolume: Int?)
TickerDataResponse
Link copied to clipboard
data class TickerDataResponse(response: QuoteResponse)
Transaction
Link copied to clipboard
data class Transaction(transactionId: TransactionId, accountId: String?, transactionDate: Instant?, postDate: Instant?, amount: Float?, description: String?, transactionType: String?, trade: TransactionTrade)
TransactionDetailsResponse
Link copied to clipboard
data class TransactionDetailsResponse(response: Transaction)
TransactionId
Link copied to clipboard
typealias TransactionId = Long
TransactionListResponse
Link copied to clipboard
data class TransactionListResponse(response: TransactionResponse)
TransactionResponse
Link copied to clipboard
data class TransactionResponse(marker: String?, moreTransactions: Boolean, transactionCount: Int, totalCount: Int, transactions: List<Transaction>)
TransactionTrade
Link copied to clipboard
data class TransactionTrade(quantity: Float?, price: Float?, settlementCurrency: String?, paymentCurrency: String?, fee: Float?, displaySymbol: String?, settlementDate: Instant?, product: Product)