# Get Option Exercise Probability

get_option_exercise_probability(code)

  • Description

    Get historical exercise probability data for a specified option contract, sorted by date in descending order

  • Parameters

    Parameter Type Description
    code str Option code
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    data pd.DataFrame When ret == RET_OK, returns exercise probability data
    str When ret != RET_OK, returns error description
    • DataFrame fields:

      Field Type Description
      timestamp int Timestamp
      timestamp_str str Date string
      security_price float Underlying price
      strike_probability float Exercise probability
  • Example

from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, df = quote_ctx.get_option_exercise_probability("US.AAPL281215C320000")
if ret == RET_OK:
    print(df)
else:
    print('error:', df)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
  • Output
timestamp timestamp_str  security_price  strike_probability
0   1778469319    2026-05-10          293.32              41.869
1   1778212800    2026-05-08          293.05              41.887
2   1778126400    2026-05-07          287.17              40.011
3   1778040000    2026-05-06          287.24              40.122
4   1777953600    2026-05-05          283.91              38.956
5   1777867200    2026-05-04          276.56              36.861
6   1777608000    2026-05-01          279.87              37.939
7   1777521600    2026-04-30          271.08              35.189
8   1777435200    2026-04-29          269.90              34.851
9   1777348800    2026-04-28          270.44              35.040
10  1777262400    2026-04-27          267.34              34.094
11  1777003200    2026-04-24          270.79              35.170
12  1776916800    2026-04-23          273.16              35.885
13  1776830400    2026-04-22          272.90              35.805
14  1776744000    2026-04-21          265.90              33.691
15  1776657600    2026-04-20          272.78              35.799
16  1776398400    2026-04-17          269.96              34.964
17  1776312000    2026-04-16          263.13              32.901
18  1776225600    2026-04-15          266.16              33.834
19  1776139200    2026-04-14          258.56              31.536
20  1776052800    2026-04-13          258.93              31.663
21  1775793600    2026-04-10          260.21              32.069
22  1775707200    2026-04-09          260.22              32.086
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

API Restrictions

  • Maximum 30 requests per 30 seconds.
  • Only option contract codes are supported; underlying stock codes are not supported.