Options Calculator API
Hello everyone! This is the Moscow Exchange Urgent Market. Let's explore together the fascinating world at the intersection of finance and technology. Regardless of whether you are a finance professional, a technology enthusiast or want to be in the “fashionable” investment topic, getting to know the new Moscow Exchange service will be useful.
An option is an instrument that gives the buyer the right to buy or sell an underlying asset at a predetermined price in the future. How it works and what it is for – read in our article.
Option calculator helps you calculate profit/loss, commission from options trading and even simulate your own trading strategies.
What can a calculator do?
Display a brief summary of the option with the ability to simulate the option value, which depends on the market situation.
Show options board and volatility curve.
Simulate a portfolio of instruments at the current moment in time, the moment of option execution, and at an arbitrary date.
![](https://habrastorage.org/getpro/habr/upload_files/5e4/291/ec0/5e4291ec04bc8373511908bbbd0d2027.png)
The calculator's functionality allows you to calculate indicators on the site, but direct data acquisition for building an automated trading system was unavailable; human control was constantly required.
We were faced with the task of expanding the functionality of the options calculator and giving clients the opportunity to automatically and directly receive calculated indicators to create their own strategies. Now this has become possible with our new service – free Option Calculator API.
What can the API do?
Provide a list of all available options and their underlying assets. Traders no longer need to spend hours studying the site in search of the necessary instrument.
Provide a brief summary of the option, including theoretical, final and settlement prices, commission information, and option sensitivity factors known as “Greeks” (Delta, Gamma, Vega, Theta, Rho) and Implied Volatility.
Transfer the options board and data on option series: trading volume and open interest on the option series, theoretical price (in rubles and points), last price, internal and time value of options, sensitivity coefficients (the same “Greeks”).
Provide a set of points for plotting volatility for a series of options and portfolio performance indicators, allowing you to track possible changes in performance indicators.
Calculate the total collateral for any set of instruments, taking into account netting.
And finally, assemble a portfolio of options and their underlying assets, calculating profits, losses and commissions.
Can you give an example?
Of course! We show what it looks like request To get started and get a list of underlying assets:
import requests
BASE_URL = https://iss.moex.com/iss/apps/option-calc/v1
# возвращает массив объектов Asset
def get_assets(asset_type: str = None, asset_subtype: str = None):
url = f"{BASE_URL}/assets"
if asset_type and asset_subtype:
url = f"{url}?asset_type={asset_type}&asset_subtype={asset_subtype}"
elif asset_type:
url = f"{url}?asset_subtype={asset_type}"
elif asset_subtype:
url = f"{url}?asset_subtype={asset_subtype}"
assets = res.json()
return assets
Who will benefit from the Options Calculator API?
Traders will be able to use the tool to make trading decisions based on detailed information about parameters and testing different scenarios.
Programmers can integrate data and calculations for developing trading systems and other financial applications.
Newcomers to the Futures Market can become familiar with the definitions of all the indicators and terms necessary to understand options.
Useful links:
Answers on questions
Leave your questions in the comments, we will answer them all. webinardedicated to the new API, based at the Moscow Exchange School. The video conference will be held on July 5 on the MTS Link platform (former Webinar.ru), and the recording will be available on YouTube.
More useful articles in our Telegramfor example, we tell, how futures came about and what does rice have to do with it?