tedchou12 / webull

Unofficial APIs for Webull.
MIT License
596 stars 181 forks source link

Exercising Options? #392

Open tek08 opened 1 year ago

tek08 commented 1 year ago

Did some digging this evening to try to find an endpoint that would let an account-holder early-exercise / assign option contracts. Any chance anyone's found said endpoint?

ICANTFINDAUSERNAMEATALL commented 1 year ago

Why would you excersize an option? If you sell it, you'll get all the intrinsic value plus the theta. I never saw any button on webull allowing for an option exercise so that may be why.

tek08 commented 1 year ago

Screenshot_20230514-021041.png

Screenshot_20230514-020949.png

ICANTFINDAUSERNAMEATALL commented 1 year ago

This isn't the web interface. This API connects to webull web and then places the orders from there. Webull web probally doesn't allow for exercising options.

tek08 commented 1 year ago

Here are the endpoints related to exercising options I found, all with https://ustrade.webullfinance.com/api as their root:

trading/v1/webull/option/checkOptionExercise

trading/v1/webull/option/exerciseResultDetail

trading/v1/webull/option/listExerciseResult

trading/v1/webull/option/checkOptionExercise

trading/v1/webull/option/saveOptionExercise

trading/v1/webull/position/updateOptionExercise

More information on parameters etc, with which existing developers on this project may be more familiar than I am, can be found in the attached decompiled file from which I sourced the endpoints.

The actual extension of the file is .smali, from android decompiler, but Github does not support, so I changed it to txt:

USTradeApiInterface.txt