Skip to content
Option Strategies

Search Option Strategy Recommendations

Returns recommended option strategies with probability of profit, maximum profit, and maximum loss, based on the Client’s outlook for the underlying stock (scenario), target price or price range, expiration date, and position. Use it for the result list on the option chain Strategies page. After the Client selects a result, prefill a single-leg or multi-leg option order with each leg’s counter_id and order. This endpoint only calculates recommendations and does not place orders. The option chain strategy feature on the market data side uses this endpoint as well.

POSThttps://api.lbkrs.com/v1/calc/op/screener/search

Request body application/json

counter_idstringrequired

Underlying stock security ID (counter_id)

expire_datestringrequired

Expiration date in YYYYMMDD format. Use expire_date from List Expiration Dates for Option Strategies.

scenestringrequired

Scenario:

  • 1 - Expect the price to rise to the target
  • 2 - Expect the price to fall to the target
  • 3 - Expect a large move, at least to one boundary of the range
  • 4 - Expect the price to stay within the range
  • 5 - Holding the stock and hedging downside risk
  • 6 - Holding the stock and collecting premium to improve returns

Scenarios 1, 2, 5, and 6 require price; scenarios 3 and 4 require up_price and down_price.

Values
1
2
3
4
5
6
pricestring

Target price for single-target scenarios. Pass an empty string for other scenarios.

up_pricestring

Upper bound of the price range for range scenarios. Pass an empty string for other scenarios.

down_pricestring

Lower bound of the price range for range scenarios. Pass an empty string for other scenarios.

sideinteger

Stock position:

  • 0 - No position
  • 1 - Long
  • 2 - Short
Values
0
1
2
hold_pricestring

Average cost of the stock position. Pass it when side is 1 or 2; pass an empty string when there is no position.

filterinteger

Filter by opening direction:

  • 0 - All
  • 1 - Sell
  • 2 - Buy
Values
0
1
2
sort_keyinteger

Sort field:

  • 0 - Probability of profit
  • 1 - Maximum profit
  • 2 - Maximum loss
Values
0
1
2
orderinteger

Sort order:

  • 0 - Descending
  • 1 - Ascending
Values
0
1
pageintegerrequired

Page number, starting from 1

sizeintegerrequired

Number of items per page. Fewer items than size means there are no more results.

Responses

HTTP 200The request succeeded. The response body contains the result of the “Search Option Strategy Recommendations” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
listsarray<object>

Recommended strategies, sorted by sort_key and order

Child attributes
namestring

Strategy title

strategyinteger

Strategy type:

  • 1 - Long Call
  • 2 - Long Put
  • 3 - Short Call
  • 4 - Short Put
  • 5 - Covered Call
  • 6 - Covered Put
  • 7 - Protective Call
  • 8 - Protective Put
  • 9 - Long Straddle
  • 10 - Long Strangle
  • 15 - Bull Call spread
  • 16 - Bull Put spread
  • 17 - Bear Call spread
  • 18 - Bear Put spread
  • 19 - Short Straddle
  • 20 - Short Strangle
Values
1
2
3
4
5
6
7
8
9
10
15
16
17
18
19
20
stockobject

One leg of the strategy (stock or option contract)

Child attributes
counter_idstring

Security ID (counter_id) of the leg, for example ST/US/AAPL for a stock or OP/US/AAPL261120C230000 for an option

namestring

Security name

orderstring

Order direction of the leg:

  • 0 - Buy
  • 1 - Sell
Values
0
1
directionstring

Option type:

  • C - Call
  • P - Put

Not applicable to a stock leg

strike_pricestring

Strike price. Not applicable to a stock leg

expire_datestring

Expiration date in YYYYMMDD format. Not applicable to a stock leg

security_typestring

Security type:

  • ST - Stock
  • OP - Option
Values
ST
OP
pair_stocksarray<object>

Legs of a multi-leg strategy. May include both stock and option legs.

Child attributes
counter_idstring

Security ID (counter_id) of the leg, for example ST/US/AAPL for a stock or OP/US/AAPL261120C230000 for an option

namestring

Security name

orderstring

Order direction of the leg:

  • 0 - Buy
  • 1 - Sell
Values
0
1
directionstring

Option type:

  • C - Call
  • P - Put

Not applicable to a stock leg

strike_pricestring

Strike price. Not applicable to a stock leg

expire_datestring

Expiration date in YYYYMMDD format. Not applicable to a stock leg

security_typestring

Security type:

  • ST - Stock
  • OP - Option
Values
ST
OP
actionstring

Premium direction when opening the position:

  • debit - Net premium paid
  • credit - Net premium received
Values
debit
credit
last_donestring

Latest price of the strategy

probabilitystring

Probability of profit as a decimal, for example 0.396 for 39.6%

max_profitstring

Maximum profit. An empty value means the profit is theoretically unlimited.

max_lossstring

Maximum loss. An empty value means the loss is theoretically unlimited.

alert_typeinteger

Risk reminder type:

  • 0 - No reminder
  • 1 - Covered Call reminder: selling the stock position during the period leaves the call option naked, which may raise the margin requirement
  • 2 - Covered Put reminder: closing the short position during the period leaves the put option naked, which may raise the margin requirement
Values
0
1
2
Whale Docs