Package com. seansoper. batil. brokers. etrade. services. orderPreview
Helper methods to support creating both simple and complex orders.
Functions
buyButterflyCalls
Link copied to clipboard
fun buyButterflyCalls(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyButterflyPuts
Link copied to clipboard
fun buyButterflyPuts(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyBuyWrite
Link copied to clipboard
fun buyBuyWrite(symbol: String, strike: Float, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyCallOptionLimit
Link copied to clipboard
fun buyCallOptionLimit(symbol: String, limitPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyCallOptionMarket
Link copied to clipboard
fun buyCallOptionMarket(symbol: String, limitPrice: Float, stopPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyCallSpread
Link copied to clipboard
fun buyCallSpread(symbol: String, limitPrice: Float, buyStrike: Float, sellStrike: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyCondorCalls
Link copied to clipboard
fun buyCondorCalls(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyCondorPuts
Link copied to clipboard
fun buyCondorPuts(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyEquityLimit
Link copied to clipboard
fun buyEquityLimit(symbol: String, limitPrice: Float, quantity: Int, clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyEquityMarket
Link copied to clipboard
fun buyEquityMarket(symbol: String, limitPrice: Float, stopPrice: Float, quantity: Int, clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyIronButterfly
Link copied to clipboard
fun buyIronButterfly(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyIronCondor
Link copied to clipboard
fun buyIronCondor(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyPutOptionLimit
Link copied to clipboard
fun buyPutOptionLimit(symbol: String, limitPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyPutOptionMarket
Link copied to clipboard
fun buyPutOptionMarket(symbol: String, limitPrice: Float, stopPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
buyPutSpread
Link copied to clipboard
fun buyPutSpread(symbol: String, limitPrice: Float, buyStrike: Float, sellStrike: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellButterflyCalls
Link copied to clipboard
fun sellButterflyCalls(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellButterflyPuts
Link copied to clipboard
fun sellButterflyPuts(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellCallOptionLimit
Link copied to clipboard
fun sellCallOptionLimit(symbol: String, limitPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellCallOptionMarket
Link copied to clipboard
fun sellCallOptionMarket(symbol: String, limitPrice: Float, stopPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellCallSpread
Link copied to clipboard
fun sellCallSpread(symbol: String, limitPrice: Float, buyStrike: Float, sellStrike: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellCondorCalls
Link copied to clipboard
fun sellCondorCalls(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellCondorPuts
Link copied to clipboard
fun sellCondorPuts(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellEquityLimit
Link copied to clipboard
fun sellEquityLimit(symbol: String, limitPrice: Float, quantity: Int, clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellEquityMarket
Link copied to clipboard
fun sellEquityMarket(symbol: String, limitPrice: Float, stopPrice: Float, quantity: Int, clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellIronButterfly
Link copied to clipboard
fun sellIronButterfly(symbol: String, strikes: Triple<Float, Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellIronCondor
Link copied to clipboard
fun sellIronCondor(symbol: String, lowerWing: Pair<Float, Float>, upperWing: Pair<Float, Float>, limitPrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellPutOptionLimit
Link copied to clipboard
fun sellPutOptionLimit(symbol: String, limitPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellPutOptionMarket
Link copied to clipboard
fun sellPutOptionMarket(symbol: String, limitPrice: Float, stopPrice: Float, strikePrice: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard
sellPutSpread
Link copied to clipboard
fun sellPutSpread(symbol: String, limitPrice: Float, buyStrike: Float, sellStrike: Float, quantity: Int, expiry: ZonedDateTime = OptionsCalendar.nextMonthly(), clientOrderId: String = randomString()): PreviewRequest
Content copied to clipboard