NAV
Excel VBA Web Request

Introduction

API Endpoint: https://api.orats.com/v2

The ORATS API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. You can use our API to access options data in our database.

We have code examples in Excel VBA and HTTP web request. You can view code examples in the dark area to the right, and you can switch the language of the examples with the tabs in the top right.

Getting Started

Example Code

'Declare an OratsAPIClient object
Dim oratsAPI As OratsAPIClient
'Use the Factory Module to call CreateOratsAPIClient to create and initialize the object.
'The OratsAPIClient object will be used for every data request.
Set oratsAPI = Factory.CreateOratsAPIClient()
The Endpoint of the http request is https://api.orats.com/v2

In order to get familiar with our API, download our client API in Excel HERE. When the download is finished, open the Excel sheet and you should see a tab called Sandbox.

To access the client code in Excel, Go to Developer -> Visual Basic in the menu and it will take you to VBA macro code. Also make sure you are on Sheet1 (Sandbox) and in the Run() function, you will see samples on how to get data from our REST API using our Excel Class Modules.

If you do not see the Developer Tab, follow these instructions HERE.

Authentication

Example Request

'Declare a collection
Dim gCoreCollection As Collection
'Use the OratsClientAPI object to call the GetGeneralCore method.  It passes in a user key and a ticker symbol.
Set gCoreCollection = oratsAPI.GetGeneralCore(userKey, "IBM")
- Replace secretkey with your given user key.

https://api.orats.com/v2/historical/dailies/ticker/AAPL?user_key=secretkey

You authenticate to the ORATS API by providing your secret API user key in the request. You can manage your API keys from your developer portal. Register by emailing us at support@orats.com.

ORATS expects an API key to be included in all API requests to the server in a URL parameter that looks like the following:

https://api.orats.com/v2/historical/dailies/ticker/AAPL?user_key=secretkey

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.

Pagination

Pagination Example

'Declare a collection
Dim gCoreCollection As Collection
'Use the OratsClientAPI object to call the GetGeneralCore method.  It passes in a user key and number of data rows to paginate.
Set gCoreCollection = oratsAPI.GetGeneralCore(userKey, 10)
Example Get Request: https://api.orats.com/v2/live/coredatas/general?user_key=secretkey&limit=3

Example Output:
{
  "data": 
    [
        {
          "ticker": "A",
          "tradeDate": "2015-08-14",
          "assetType": 2,
          "clsStkPx": 38.56,
          "atmIvStockPx": 38.4,
          "mktCap": 17886.44
        },
        {
          "ticker": "AA",
          "tradeDate": "2015-08-14",
          "assetType": 3,
          "clsStkPx": 9.31,
          "atmIvStockPx": 9.39,
          "mktCap": 7890.99
        },
        {
          "ticker": "AAC",
          "tradeDate": "2015-08-14",
          "assetType": 1,
          "clsStkPx": 22.38,
          "atmIvStockPx": 21.56,
          "mktCap": 86.22
        }
    ],
    "pagination": 
    {
        "totalCount": 4147,
        "totalPages": 1383,
        "currentPage": 1,
        "limit": "3",
        "link": "https://api.orats.com/v2/live/coredatas/general/?user_key=secretkey&format=json&page=2&limit=3"
    }
}

Top-level ORATS API resources have support for bulk fetches. For instance you can fetch all of the general core data. These list API methods share a common structure. ORATS utilizes url link based pagination, using the link data field. You can fetch the next page by using the link field which gives you the next page as a url.

GET https://api.orats.com/v2/live/coredatas/general?user_key=secretkey&limit=3

Query Parameters

Parameter Default Description
limit 5000 This is an optional parameter. If not set, it will fetch 5000 data objects/rows.

Output Format

Field Description
data The data rows.
pagination An array containing the actual response elements. It contains totalCount, totalPages, currentPage, limit, and link.
totalCount Number of objects/rows in the data set.
totalPages Total number of pages. (total count / limit).
currentPage The current page you have fetched.
link The link to the next page of results.

Output Formats

The JSON structure looks like this:

{
  "data": 
    [
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-03",
          "stkPx": 11.971,
          "vol": 45.321
        },
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-04",
          "stkPx": 12.237,
          "vol": 44.492
        },
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-05",
          "stkPx": 12.15,
          "vol": 45.79
        },
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-08",
          "stkPx": 12.21,
          "vol": 44.498
        },
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-09",
          "stkPx": 13.224,
          "vol": 39.857
        },
        {
          "ticker": "AAPL",
          "tradeDate": "2007-01-10",
          "stkPx": 13.857,
          "vol": 38.773
        }
    ]
}

The CSV structure looks like this:


ticker,tradeDate,stkPx,vol
AAPL,2007-01-03,11.971,45.321
AAPL,2007-01-04,12.237,44.492
AAPL,2007-01-05,12.15,45.79
AAPL,2007-01-08,12.21,44.498
AAPL,2007-01-09,13.224,39.857
AAPL,2007-01-10,13.857,38.773

ticker,tradeDate,stkPx,vol
AAPL,2007-01-03,11.971,45.321
AAPL,2007-01-04,12.237,44.492
AAPL,2007-01-05,12.15,45.79
AAPL,2007-01-08,12.21,44.498
AAPL,2007-01-09,13.224,39.857
AAPL,2007-01-10,13.857,38.773

JSON

GET https://api.orats.com/v2/historical/dailies/ticker/AAPL?user_key=your_user_key&format=json

CSV

GET https://api.orats.com/v2/historical/dailies/ticker/AAPL?user_key=your_user_key&format=csv

Query Parameters

Parameter Default Description
format json If set to csv, the result will be in csv format, or else it will be in json format.

Live Data (Delayed)

General Core

Example Code

'Declare a collection to set a list of GeneralCore data
Dim gCoreCollection As Collection
'Call GetGeneralCore API by passing in secret API user key and ticker or multiple tickers (You can pass in IBM,AAPL,MSFT).
Set gCoreCollection = oratsAPI.GetGeneralCore(userKey, "IBM")
Dim gCore As GeneralCore
'Go through the collection and print out ticker and tradeDate
If Not gCoreCollection Is Nothing Then
    For Each gCore In gCoreCollection
        Debug.Print gCore.ticker & "," & gCore.tradeDate
    Next gCore
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(gCoreCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "tradeDate": "2015-08-14",
      "assetType": 3,
      "clsStkPx": 115.15,
      "atmIvStockPx": 115.03,
      "mktCap": 81171.31,
      "cVolu": 226867,
      "cOi": 4260142,
      "pVolu": 131477,
      "pOi": 3251007,
      "or20dFcst": 23,
      "or20dFcstIv": 27.8,
      "orInfFcst": 23.54,
      "xErnOr20dIv": 26.85,
      "xErnOrInfIv": 25.62,
      "iv200dMa": 25.36,
      "m1AtmIv": 23.77,
      "m1AtmFitIv": 26.85,
      "m1AtmFcstIv": 23,
      "m1Dte": 8,
      "m2AtmIv": 26.73,
      "m2AtmFitIv": 26.71,
      "m2AtmFcstIv": 23.07,
      "m2Dte": 36,
      "m3AtmIv": 26.48,
      "m3AtmFitIv": 26.44,
      "m3AtmFcstIv": 23.19,
      "m3Dte": 64,
      "m4AtmIv": 28.15,
      "m4AtmFitIv": 27.96,
      "m4AtmFcstIv": 24.75,
      "m4Dte": 99,
      "iRate5wk": 0.32,
      "iRateLt": 0.48,
      "pxOf1000gam": 2279.03,
      "volOfVol": 0.06,
      "volOfIv": 0.024,
      "slp": 3.07,
      "infSlp": 2.76,
      "fcstSlp": 2.8,
      "infFcstSlp": 3.5,
      "drv": 0.09,
      "infDrv": 0.07,
      "fcstDrv": 0.06,
      "infFcstDrv": 0.06,
      "mktWidthVol": 0.23,
      "infMktWidthVol": 0.32,
      "cAddPrem": -0.01,
      "pAddPrem": 0.2,
      "rip": 1.56,
      "earnReturnIv": 1.728,
      "fcstR2": 0.13,
      "impFcstR2": 0.25,
      "hiHedge": 2,
      "loHedge": 0.25,
      "stkVolu": 62167198,
      "avg20dOptVolu": 999999.99,
      "sector": "XLK Electronic Computer Manufacturing42297",
      "or1dHv": 49.2,
      "or5dHv": 36.82,
      "or10dHv": 35.77,
      "or20dHv": 35.34,
      "or60dHv": 24.51,
      "or90dHv": 22.96,
      "or120dHv": 22.55,
      "or252dHv": 24.4,
      "or500dHv": 23.38,
      "or1000dHv": 26.25,
      "cls5dHv": 46.97,
      "cls10dHv": 39.32,
      "cls20dHv": 33.32,
      "cls60dHv": 23.9,
      "cls90dHv": 22.97,
      "cls120dHv": 22.66,
      "cls252dHv": 23.47,
      "cls500dHv": 23.02,
      "cls1000dHv": 26.63,
      "iv20d": 25.04,
      "iv30d": 26.78,
      "iv60d": 26.29,
      "iv90d": 28.38,
      "iv6m": 26.82,
      "cls1wkAgoStkPx": 115.52,
      "chng1wkStkPx": -0.42,
      "cls1mAgoStkPx": 128.51,
      "chng1mStkPx": -10.49,
      "cls6mAgoStkPx": 127.08,
      "chng6mStkPx": -9.48,
      "cls1yAgoStkPx": 96.7,
      "chng1yStkPx": 18.96,
      "divFreq": 4,
      "divYield": 1.9,
      "divGrwth": 0.06,
      "divDate": "0000-00-00",
      "divAmt": 0.52,
      "nextErn": "0000-00-00",
      "todNextErn": 1630,
      "lastErn": "0000-00-00",
      "todLastErn": 3,
      "absAvgErnMv": 4.41,
      "impErnEffct": 2.75,
      "daysToNextErn": -1,
      "tkOver": 0,
      "inclEtf": "NoETF",
      "bestEtf": "XLK",
      "sectorName": "Technology",
      "spy1mCorrel": 0.48,
      "spy1yCorrel": 0.47,
      "etf1mCorrel": 0.51,
      "etf1yCorrel": 0.46,
      "beta1m": 2.55,
      "beta1y": 1.73,
      "iv1mPctile": 83,
      "iv1yPctile": 87,
      "ivSpyPctile": 63,
      "ivEtfPctile": 51,
      "ivMeanStdev": 0.93,
      "iv1yStdev": 4.31,
      "ivSpyRatio": 2.48,
      "ivAvg1mSpyRatio": 2.73,
      "ivAvg1ySpyRatio": 2.48,
      "ivStdev1ySpyRatio": 1.17,
      "ivEtfRatio": 1.82,
      "ivAvg1mEtfRatio": 1.83,
      "ivAvg1yEtfRatio": 1.84,
      "ivStdev1yEtfRatio": 0.38,
      "ivXErnHvratio": 0.9,
      "ivAvg1mXErnHvRatio": 1,
      "ivAvg1yXErnHvRatio": 1.14,
      "ivStdev1yHvXErnRatio": 0.26,
      "etfIvXErnHvRatio": 0.86,
      "etfIvAvg1mHvXErnRatio": 1.19,
      "etfIvAvg1yHvXErnRatio": 1.17,
      "etfIvStdev1yXErnHvRatio": 0.31,
      "pctileSlp": 3.07,
      "avg1mSlp": 2.03,
      "avg1ySlp": 1.42,
      "stdev1ySlp": 0.55,
      "etfSlpRatio": 0.43,
      "etfAvg1mSlpRatio": 0.31,
      "etfAvg1ySlpRatio": 0.23,
      "etfAvgStdev1ySlpRatio": 0.08,
      "updatedAt": "2015-08-14 13:30:01"
    }
  ]
}

This endpoint retrieves general core data.

HTTP Request

GET https://api.orats.com/v2/live/coredatas/general

Get a Specific Ticker or Stocklist

HTTP Request

GET https://api.orats.com/v2/live/coredatas/general/stocklist/{stocklist}

URL Parameters

Parameter Default Description
stocklist None This must be set to a stocklist, for example AAPL,IBM,MSFT. You can also set it to a single ticker.

Output Fields

Parameter Description
ticker Ticker Symbol
tradeDate Trade Date
assetType 0 - ETB_NO_DIV  1 - HTB  2 - HTB_DIV_PAYING  3 - ETB_DIV_PAYING  4 - INDEX  5 - ETF  6 - VIX_STYLE_EX  7 - ETF_QDIV_ON_EX  8 - ETF_MDIV_ON_EX  9 - INDEX_AMER_EX
clsStkPx Closing price
atmIvStockPx Current stock Price.
mktCap Market capitalization (shares outstanding * stock price).
cVolu Today’s call option volume for all strikes.
cOi Total call open interest.
pVolu Today’s put option volume for all strikes.
pOi Total put open interest.
or20dFcst The ORATS forecast of stock volatility for the next 20 days based on data with earnings taken out.
or20dFcstIv The ORATS forecast of implied volatility in 20 days with earnings taken out.  Could be compared to ORATS 20d IV implied volatility.
orInfFcst The ORATS forecast of the infinite implied volatility.  Could be compared to actual implied volatility or actual infinite.
xErnOr20dIv The 20 day interpolated implied option volatility with earnings effect taken out.
xErnOrInfIv Infinite implied option volatility.
iv200dMa The 200 day moving average of the ORATS 20day implied volatility.
m1AtmIv Implied volatility for month1.
m1AtmFitIv The at the money monthly fit volatility for month 1.
m1AtmFcstIv Forecast of volatility for month 1.
m1Dte Days to expiration in month 1 (no weekly or quarterly expirations).
m2AtmIv Implied volatility for month 2.
m2AtmFitIv The at the money monthly fit volatility for month 2.
m2AtmFcstIv Forecast of volatility for month 2.
m2Dte Days to expiration in month 2.
m3AtmIv Implied volatility for month 3.
m3AtmFitIv The at the money montly fit volatility for month 3.
m3AtmFcstIv Forecast of volatility for month 3.
m3Dte Days to expiration in month 3.
m4AtmIv Implied volatility for month 4.
m4AtmFitIv The at the money monthly fit volatility for month 4
m4AtmFcstIv Forecast of volatility for month 4.
m4Dte Days to expiration in month 4.
iRate5wk Short term interest rate.
iRateLt Long term interest rate.
pxOf1000gam Cost of 1000 gamma per day.
volOfVol Annualized standard deviation of daily (1day tick vol) statistical volatility for one year.
volOfIv Annualized standard deviation of implied.
slp Best-fit regression line through the strike volatilities adjusted to the tangent slope at the 50 delta.
infSlp Implied infinite slope.
fcstSlp The ORATS forecast of the slope of implied volatility skew.  Could be compared to actual slope.
infFcstSlp Slope forecast infinite.
drv Derivative or curvature of the monthly strikes at 28 day interpolated.
infDrv Derivative infinite implied.
fcstDrv Forecast derivative at 28 day interpolated.
infFcstDrv Forecast infinite derivative.
mktWidthVol Market width in implied vol points 28 day.
infMktWidthVol Market width in implied vol points infinite.
cAddPrem Additional dollar amount to add to calls < 15 delta.
pAddPrem Additional dollar amount to add to puts < 15 delta.
rip Dollar amount of options to start ignoring in delta calculation.
earnReturnIv The average of the volatility day of and day after earnings / implied day before divided by implied day before / implied day after.
fcstR2 Goodness of fit of the 20 day forecast to the 20 day future statistical volatility.
impFcstR2 Goodness of fit of the implied forecast vs actual implied in 20 days.
hiHedge Most profitable hedging width over the average of 1, 5 and 20 days.
loHedge Least profitable hedging width over the average of 1, 5 and 20 days.
stkVolu Total volume for an underlyer.
avg20dOptVolu The average option volume over the last 20 days.
sector Sector as derived by cusip number.
or1dHv The 1 day historical tick volatility.
or5dHv The 5 day historical tick volatility.
or10dHv The 10 day historical tick volatility.
or20dHv The 20 day historical tick volatility (20 observations).
or60dHv The 60 day historical tick volatility.
or90dHv The 90 day historical tick volatility.
or120dHv The 120 day historical tick volatility.
or252dHv The 252 day historical tick volatility.
or500dHv The 500 day historical tick volatility.
or1000dHv The 1000 day historical tick volatility.
cls5dHv The 5 day historical close to close volatility.
cls10dHv The 10 day historical close to close volatility.
cls20dHv The 20 day historical close to close volatility.
cls60dHv The 60 day historical close to close volatility.
cls90dHv The 90 day historical close to close volatility.
cls120dHv The 120 day historical close to close volatility
cls252dHv The 252 day historical close to close volatility.
cls500dHv The 500 day historical close to close volatility.
cls1000dHv The 1000 day historical close to close volatility .
iv20d The 20 interpolated implied volatility (calendar day).
iv30d The 20 day interpolated implied volatility.
iv60d The 60 day interpolated implied volatility.
iv90d The 90 day interpolated implied volatility.
iv6m The 6 month interpolated implied volatility.
cls1wkAgoStkPx Stock price at the prior week (5 trading days ago).
chng1wkStkPx Stock price change over the prior week (5 trading days).
cls1mAgoStkPx Stock price at the prior month (21 trading days ago).
chng1mStkPx Stock price change over the prior month (21 trading days).
cls6mAgoStkPx Stock price at the prior 6 months (252/2) trading days ago.
chng6mStkPx Stock price change over the prior 6 months (252/2) trading days.
cls1yAgoStkPx Stock price at the prior year (252 trading days ago).
chng1yStkPx Stock price change over the prior year (252 trading days).
divFreq Number of dividends per year.
divYield Annualized dividends divided by stock price.
divGrwth The slope of the forecasted dividends annualized.
divDate Next dividend date.
divAmt Dividend amount.
nextErn Next earnings date.
todNextErn Time of day earnings released: Before, After, During, Unknown.
lastErn Last earnings date
todLastErn Time of day earnings released: Before, After, During, Unknown.
absAvgErnMv Average Earnings Move: average of the moves corresponding to the time of the next earnings announcement.
impErnEffct Market implied earnings effect.
daysToNextErn Days To Next Earnings.
tkOver 0 - Not a takeover. 1 - A takeover or rumored takeover stock.
inclEtf The ETFs where the symbol is a component pipe delimeted if multiple.
bestEtf The closest SPDR Sector ETF (default to SPY or RUT if none).
sectorName SPDR short name of the sector.
spy1mCorrel ORATS 30 day implied volatility ex earnings (ORiv) correlation with SPY one month.
spy1yCorrel ORATS 30 day implied volatility ex earnings (ORiv) correlation with SPY one year.
etf1mCorrel ORiv correlation with the Best ETF 30 day IV over the last month.
etf1yCorrel ORiv correlation with the SPDR Sector ETF 30 day IV over the last year.
beta1m Short term price beta, 30 calendar days.
beta1y Long term price beta, 365 calendar days.
iv1mPctile Percentile of the current ORiv vs month range. (ORiv - min) / (max-min) (compare to 50 and to SPY,ETF percentile).
iv1yPctile Percentile of the current ORiv vs year range. (compare to 50 and to SPY,ETF percentile).
ivSpyPctile Percentile of the current Oriv / SPY vs year range.
ivEtfPctile Percentile of the current ETF ORiv vs year range.
ivMeanStdev Number of stdevs the ORiv is away from mean for the year.
iv1yStdev standard deviation of the Oriv for the year.
ivSpyRatio Oriv divided by SPY 30day fit implied current (compare to averages below & consider standard deviation).
ivAvg1mSpyRatio Oriv divided by SPY 30day implied month average.
ivAvg1ySpyRatio Oriv divided by SPY 30day implied year average.
ivStdev1ySpyRatio Oriv divided by SPY 30day implied year standard deviation.
ivEtfRatio Oriv divided by ETF 30day implied current (compare to averages below & consider standard deviation).
ivAvg1mEtfRatio Oriv divided by ETF 30day implied month average.
ivAvg1yEtfRatio Oriv divided by ETF 30day implied year average.
ivStdev1yEtfRatio Oriv divided by ETF 30day implied year standard deviation.
ivXErnHvratio Oriv HV20xErn Ratio.
ivAvg1mXErnHvRatio Oriv HV20xErn Ratio vs monthly range.
ivAvg1yXErnHvRatio Oriv HV20xErn Ratio vs yearly range.
ivStdev1yHvXErnRatio Oriv HV20xErn Ratio vs yearly range standard deviation.
etfIvXErnHvRatio Oriv HV20xErn Ratio divided by ETF 30day implied HV20d ratio.
etfIvAvg1mHvXErnRatio Oriv HV20xErn Ratio divided by ETF 30day implied HV20d ratio month average.
etfIvAvg1yHvXErnRatio Oriv HV20xErn Ratio divided by ETF 30day implied HV20d ratio year average.
etfIvStdev1yXErnHvRatio Oriv HV20xErn Ratio divided by ETF 30day implied HV20d ratio year standard deviation.
pctileSlp Slope.
avg1mSlp Slope average for trailing month.
avg1ySlp Slope average for trailing year.
stdev1ySlp Standard deviation of the Slope.
etfSlpRatio Slope divided by ETF slope current (compare to averages below & consider standard deviation).
etfAvg1mSlpRatio Slope divided by ETF slope month average.
etfAvg1ySlpRatio Slope divided by ETF slope year average.
etfAvgStdev1ySlpRatio Slope divided by ETF slope year standard deviation.
updatedAt Updated at this date and time.

Earnings Core

Example Code

'Declare a collection to set a list of EarningsCore data
Dim eCoreCollection As Collection
'Call GetEarningsCore API by passing in secret API user key and ticker or multiple tickers (You can pass in IBM,AAPL,MSFT).
Set eCoreCollection = oratsAPI.GetEarningsCore(userKey, "IBM")
Dim eCore As EarningsCore

'Go through the collection and print out ticker and tradeDate
If Not eCoreCollection Is Nothing Then
    For Each eCore In eCoreCollection
        Debug.Print eCore.ticker & "," & eCore.tradeDate
    Next eCore
End If

''Add data to SandBox tab worksheet starting from row 6 and column 1
Call oratsAPI.AddCollectionToWorksheet(eCoreCollection, "SandBox", 6, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "tradeDate": "2015-08-14",
      "clsStkPx": 115.21,
      "wksNextErn": 10,
      "todNextErn": 1630,
      "ernMnth": 4,
      "avg20dOptVolu": 1000000,
      "oi": 7511149,
      "m1AtmIv": 23.51,
      "m1Dte": 8,
      "m2AtmIv": 26.59,
      "m2Dte": 36,
      "m3AtmIv": 26.3,
      "m3Dte": 64,
      "m4AtmIv": 28.11,
      "m4Dte": 99,
      "m1StraPx": 3.24,
      "m2StraPx": 7.77,
      "m1SmoothStraPx": 3.23,
      "m2SmoothStraPx": 7.74,
      "m1FcstStraPx": 3.12,
      "m2FcstStraPx": 6.68,
      "m1LoStrike": 115,
      "m1HiStrike": 115,
      "m2LoStrike": 115,
      "m2HiStrike": 115,
      "ernDate1": "2015-07-21",
      "ernDate2": "2015-08-14",
      "ernDate3": "2015-08-14",
      "ernDate4": "2015-08-14",
      "ernDate5": "2015-08-14",
      "ernDate6": "2015-08-14",
      "ernDate7": "2015-08-14",
      "ernDate8": "2015-08-14",
      "ernDate9": "2015-08-14",
      "ernDate10": "2015-08-14",
      "ernDate11": "2015-08-14",
      "ernDate12": "2015-08-14",
      "ernMv1": -4.32,
      "ernMv2": -1.59,
      "ernMv3": 5.5,
      "ernMv4": 2.68,
      "ernMv5": 0.83,
      "ernMv6": 7.88,
      "ernMv7": -8.33,
      "ernMv8": -2.52,
      "ernMv9": 5.01,
      "ernMv10": -0.17,
      "ernMv11": -13.19,
      "ernMv12": -0.91,
      "ernStraPct1": 6.64,
      "ernStraPct2": 6.72,
      "ernStraPct3": 8.04,
      "ernStraPct4": 6.93,
      "ernStraPct5": 6.22,
      "ernStraPct6": 5.1,
      "ernStraPct7": 7.42,
      "ernStraPct8": 7.58,
      "ernStraPct9": 6.28,
      "ernStraPct10": 9.25,
      "ernStraPct11": 9.17,
      "ernStraPct12": 7.8,
      "ernEffct1": 3.38,
      "ernEffct2": 1.64,
      "ernEffct3": 3.94,
      "ernEffct4": 2.26,
      "ernEffct5": 0.94,
      "ernEffct6": 5.38,
      "ernEffct7": 5.15,
      "ernEffct8": 1.49,
      "ernEffct9": 3.67,
      "ernEffct10": 1.49,
      "ernEffct11": 3.09,
      "ernEffct12": 1.38,
      "or5dHV": 36.82,
      "or10dHv": 35.77,
      "or20dHv": 35.34,
      "or60dHv": 24.51,
      "or90dHv": 22.96,
      "or120dHv": 22.55,
      "or252dHv": 24.4,
      "or500dHv": 23.38,
      "or1000dHv": 26.25,
      "xErnOr5dHv": 36.82,
      "xErnOr10dHv": 35.77,
      "xErnOr20dHv": 27.08,
      "xErnOr60dHv": 20.96,
      "xErnOr90dHv": 20.17,
      "xErnOr120dHv": 20.18,
      "xErnOr252dHv": 21.83,
      "xErnOr500dHv": 20.57,
      "xErnOr1000dHv": 23.83,
      "cls5dHv": 46.97,
      "cls10dHv": 39.32,
      "cls20dHv": 33.32,
      "cls60dHv": 23.9,
      "cls90dHv": 22.97,
      "cls120dHv": 22.66,
      "cls252dHv": 23.47,
      "cls500dHv": 23.02,
      "cls1000dHv": 26.63,
      "xErncls5dHv": 46.97,
      "xErncls10dHv": 39.32,
      "xErncls20dHv": 29.93,
      "xErncls60dHv": 22.48,
      "xErncls90dHv": 21.85,
      "xErncls120dHv": 21.85,
      "xErncls252dHv": 21.79,
      "xErncls500dHv": 20.93,
      "xErncls1000dHv": 24.42,
      "iv20d": 24.83,
      "iv30d": 26.65,
      "iv90d": 28.34,
      "iv6m": 26.86,
      "xErnOr20dIv": 26.65,
      "xErnOrInfIv": 25.7,
      "slp": 3.09,
      "fcstSlp": 2.8,
      "fcstErnEffct": 2.75,
      "absAvgErnMv": 4.41,
      "stdevErnMv": 3.86,
      "impErnEffct": 2.75,
      "impErnMv": 5.71,
      "impMth2ErnMv": 5.21,
      "fair90dIv": 29.38,
      "fair90dIvXImpErnEffct": 27.48,
      "fair90dIvMth2XImpErnEffct": 27.26,
      "imp90dErnMv": 5.41,
      "imp90dMth2ErnMv": 4.61,
      "conf": 0,
      "pctOfExpect": 0,
      "mrktValue": 0,
      "updatedAt": "2015-08-14 13:30:01"
    }
  ]
}

This endpoint retrieves earnings core data.

HTTP Request

GET https://api.orats.com/v2/live/coredatas/earn

Get a Specific Ticker or Stocklist

HTTP Request

GET https://api.orats.com/v2/live/coredatas/earn/stocklist/{stocklist}

URL Parameters

Parameter Default Description
stocklist None This must be set to a stocklist, for example AAPL,IBM,MSFT. You can also set it to a single ticker.

Output Fields

Parameter Description
ticker Underlying symbol
tradeDate Date of the skew reading for market prices.
clsStkPx Underlying price.
wksNextErn Weeks to the next earnings. 1 is this week.
todNextErn Time of day earnings released: Before=900, After=1630, During=1200, Unknown=2359.
ernMnth The next expiration month number directly after earnings date.
avg20dOptVolu The average option volume for all strikes over the last 20 days.
oi Total open interest.
m1AtmIv The at the money implied volatility for month 1.
m1Dte Days to expiration for month1.
m2AtmIv The at the money implied volatility for month 2.
m2Dte Days to expiration for month2.
m3AtmIv The at the money implied volatility for month 3.
m3Dte Days to expiration for month3.
m4AtmIv The at the money implied volatility for month 4.
m4Dte Days to expiration for month4.
m1StraPx The strangle or straddle price for month1.
m2StraPx The strangle or straddle price for month2.
m1SmoothStraPx The strangle or straddle ORATS smooth theo for month 1.
m2SmoothStraPx The strangle or straddle ORATS smooth theo for month 2.
m1FcstStraPx The strangle or straddle ORATS Forecast theo for month 1.
m2FcstStraPx The strangle or straddle ORATS Forecast theo for month 2.
m1LoStrike The low strike of the straddle or strangle for month 1.
m1HiStrike The high strike of the straddle or strangle for month 1.
m2LoStrike The low strike of the straddle or strangle for month 2.
m2HiStrike The high strike of the straddle or strangle for month 2.
ernDate1 Historical earnings date number back1.
ernDate2 Historical earnings date number back2.
ernDate3 Historical earnings date number back3.
ernDate4 Historical earnings date number back4.
ernDate5 Historical earnings date number back5.
ernDate6 Historical earnings date number back6.
ernDate7 Historical earnings date number back7.
ernDate8 Historical earnings date number back8.
ernDate9 Historical earnings date number back9.
ernDate10 Historical earnings date number back10.
ernDate11 Historical earnings date number back11.
ernDate12 Historical earnings date number back12.
ernMv1 The percentage move for earnings date number back1.
ernMv2 The percentage move for earnings date number back2.
ernMv3 The percentage move for earnings date number back3.
ernMv4 The percentage move for earnings date number back4.
ernMv5 The percentage move for earnings date number back5.
ernMv6 The percentage move for earnings date number back6.
ernMv7 The percentage move for earnings date number back7.
ernMv8 The percentage move for earnings date number back8.
ernMv9 The percentage move for earnings date number back9.
ernMv10 The percentage move for earnings date number back10.
ernMv11 The percentage move for earnings date number back11.
ernMv12 The percentage move for earnings date number back12.
ernStraPct1 The earn straddle or strangle price as a percent of stock price for earnings date number1.
ernStraPct2 The earn straddle or strangle price as a percent of stock price for earnings date number2.
ernStraPct3 The earn straddle or strangle price as a percent of stock price for earnings date number3.
ernStraPct4 The earn straddle or strangle price as a percent of stock price for earnings date number4.
ernStraPct5 The earn straddle or strangle price as a percent of stock price for earnings date number5.
ernStraPct6 The earn straddle or strangle price as a percent of stock price for earnings date number6.
ernStraPct7 The earn straddle or strangle price as a percent of stock price for earnings date number7.
ernStraPct8 The earn straddle or strangle price as a percent of stock price for earnings date number8.
ernStraPct9 The earn straddle or strangle price as a percent of stock price for earnings date number9.
ernStraPct10 The earn straddle or strangle price as a percent of stock price for earnings date number10.
ernStraPct11 The earn straddle or strangle price as a percent of stock price for earnings date number11.
ernStraPct12 The earn straddle or strangle price as a percent of stock price for earnings date number12.
ernEffct1 The earn effect for earnings date number1.
ernEffct2 The earn effect for earnings date number2.
ernEffct3 The earn effect for earnings date number3.
ernEffct4 The earn effect for earnings date number4.
ernEffct5 The earn effect for earnings date number5.
ernEffct6 The earn effect for earnings date number6.
ernEffct7 The earn effect for earnings date number7.
ernEffct8 The earn effect for earnings date number8.
ernEffct9 The earn effect for earnings date number9.
ernEffct10 The earn effect for earnings date number10.
ernEffct11 The earn effect for earnings date number11.
ernEffct12 The earn effect for earnings date number12.
or5dHV The 5 day historical tick volatility (20 observations).
or10dHv The 10 day historical tick volatility (20 observations).
or20dHv The 20 day historical tick volatility (20 observations).
or60dHv The 60 day historical tick volatility.
or90dHv The 90 day historical tick volatility.
or120dHv The 120 day historical tick volatility.
or252dHv The 252 day historical tick volatility.
or500dHv The 500 day historical tick volatility.
or1000dHv The 1000 day historical tick volatility.
xErnOr5dHv The 5 day historical tick volatility excluding day of and after earnings (5 observations).
xErnOr10dHv The 10 day historical tick volatility excluding day of and after earnings.
xErnOr20dHv The 20 day historical tick volatility excluding day of and after earnings.
xErnOr60dHv The 60 day historical tick volatility excluding day of and after earnings.
xErnOr90dHv The 90 day historical tick volatility day of and after earnings out.
xErnOr120dHv The 120 day historical tick volatility day of and after earnings out.
xErnOr252dHv The 252 day historical tick volatility day of and after earnings out.
xErnOr500dHv The 500 day historical tick volatility day of and after earnings out.
xErnOr1000dHv The 1000 day historical tick volatility day of and after earnings out.
cls5dHv The 5 day historical close to close volatility (20 observations).
cls10dHv The 10 day historical close to close volatility (20 observations).
cls20dHv The 20 day historical close to close volatility (20 observations).
cls60dHv The 60 day historical close to close volatility.
cls90dHv The 90 day historical close to close volatility.
cls120dHv The 120 day historical close to close volatility.
cls252dHv The 252 day historical close to close volatility.
cls500dHv The 500 day historical close to close volatility.
cls1000dHv The 1000 day historical close to close volatility.
xErncls5dHv The 5 day historical close to close volatility excluding day of and after earnings (5 observations).
xErncls10dHv The 10 day historical close to close volatility excluding day of and after earnings.
xErncls20dHv The 20 day historical close to close volatility excluding day of and after earnings.
xErncls60dHv The 60 day historical close to close volatility excluding day of and after earnings.
xErncls90dHv The 90 day historical close to close volatility excluding day of and after earnings.
xErncls120dHv The 120 day historical close to close volatility excluding day of and after earnings.
xErncls252dHv The 252 day historical close to close volatility excluding day of and after earnings.
xErncls500dHv The 500 day historical close to close volatility excluding day of and after earnings.
xErncls1000dHv The 1000 day historical close to close volatility excluding day of and after earnings.
iv20d The 20 interpolated implied volatility (20 calendar days).
iv30d The 30 day interpolated implied volatility.
iv90d The 90 day interpolated implied volatility.
iv6m The 6 month interpolated implied volatility.
xErnOr20dIv The 28 calendar day interpolated implied volatility with earnings out.
xErnOrInfIv The infinite implied volatility with earnings out.
slp The put call slope at the interpolated 28 calendar day.
fcstSlp ORATS forecasted 28 calendar day put/call slope.
fcstErnEffct ORATS forecasted earnings effect considers day of and day after earnings, seasonality, recency, median and average of move divided by expected move.
absAvgErnMv Absolute average percent earnings move 12 observations at time of the historic earnings announcement.
stdevErnMv The standard deviation of the 12 earnings move absolute values.
impErnEffct The implied earnings effect to make the best fit term structure of the month implied volatilities.
impErnMv Implied Earnings Move in the market over the fitXearnings implied volatility for the first earnings month.
impMth2ErnMv Implied Earnings Move in the market over the fit implied volatility for the second earnings month.
fair90dIv The 90 day IV plus the average earnings percent move applied to the first earnings month.
fair90dIvXImpErnEffct The 90 day IV minus the implied earnings effect plus the average earnings percent move applied to the first earnings month.
fair90dIvMth2XImpErnEffct The 90 day IV minus the implied earnings effect plus the average earnings percent move applied to the second earnings month.
imp90dErnMv The percent move on earnings needed to make the FairXieeVol90d equal to 1st earn month implied.
imp90dMth2ErnMv The percent move on earnings needed to make the FairXieeVol90d equal to 2nd earn month implied.
conf Is the earnings confirmed 1 yes 0 no.
pctOfExpect Time of day the calculations were performed.
mrktValue
updatedAt Updated at this date and time.

Volatility Info

Example Code

'Declare a collection to set a list of VolatilityInfo data
Dim volInfoCollection As Collection
'Call GetVolInfoCollection API by passing in secret API user key and ticker or multiple tickers (You can pass in IBM,AAPL,MSFT).
Set volInfoCollection = oratsAPI.GetVolatilityInfo(userKey, "IBM")
Dim volInfo As VolatilityInfo

'Go through the collection and print out ticker and tradeDate
If Not volInfoCollection Is Nothing Then
    For Each volInfo In volInfoCollection
        Debug.Print volInfo.ticker & "," & volInfo.tradeDate
    Next volInfo
End If

'Add data to SandBox tab worksheet starting from row 8 and column 1
Call oratsAPI.AddCollectionToWorksheet(volInfoCollection, "SandBox", 8, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "tradeDate": "2015-08-13",
      "clsStkPx": 115.84,
      "iv30d": 26.87,
      "iv60d": 26.09,
      "iv90d": 28.41,
      "m1AtmIv": 24.3,
      "m1Dte": 9,
      "m2AtmIv": 26.76,
      "m2Dte": 37,
      "m3AtmIv": 26.34,
      "m3Dte": 65,
      "m4AtmIv": 28.11,
      "m4Dte": 100,
      "slp": 3.216,
      "drv": 0.06757,
      "infSlp": 2.873,
      "infDrv": 0.06851,
      "cls10dHv": 39.32,
      "cls20dHv": 33.32,
      "cls60dHv": 23.9,
      "cls120dHv": 22.66,
      "cls252dHv": 23.47,
      "or10dHv": 35.77,
      "or20dHv": 35.34,
      "or60dHv": 24.51,
      "or120dHv": 22.55,
      "or252dHv": 24.4
    }
  ]
}

This endpoint retrieves volatility information.

HTTP Request

GET https://api.orats.com/v2/live/volatility

Get a Specific Ticker or Stocklist

HTTP Request

GET https://api.orats.com/v2/live/volatility/stocklist/{stocklist}

URL Parameters

Parameter Default Description
stocklist None This must be set to a stocklist, for example AAPL,IBM,MSFT. You can also set it to a single ticker.

Output Fields

Parameter Description
ticker Underlying symbol.
tradeDate Date of the skew reading for market prices.
clsStkPx Underlying price.
iv30d The 30 day interpolated implied volatility.
iv60d The 60 day interpolated implied volatility.
iv90d The 90 day interpolated implied volatility.
m1AtmIv Implied volatility for month 1.
m1Dte Days to expiration in month 1 (no weekly or quarterly expirations).
m2AtmIv Implied volatility for month 2.
m2Dte Days to expiration in month 2.
m3AtmIv Implied volatility for month 3.
m3Dte Days to expiration in month 3.
m4AtmIv Implied volatility for month 4.
m4Dte Days to expiration in month 4.
slp Best-fit regression line through the strike volatilities adjusted to the tangent slope at the 50 delta.
drv Derivative or curvature of the monthly strikes at 28 day interpolated.
infSlp Implied infinite slope.
infDrv Derivative infinite implied.
cls10dHv The 10 day historical close to close volatility.
cls20dHv The 20 day historical close to close volatility.
cls60dHv The 60 day historical close to close volatility.
cls120dHv The 120 day historical close to close volatility.
cls252dHv The 252 day historical close to close volatility.
or10dHv The 10 day historical tick volatility.
or20dHv The 20 day historical tick volatility.
or60dHv The 60 day historical tick volatility.
or120dHv The 120 day historical tick volatility.
or252dHv The 252 day historical tick volatility.

Implied Money

Example Code

'Declare a collection to set a list of ImpliedMoney data
Dim impliedMoneyCollection As Collection
'Call GetImpliedMoney API by passing in secret API user key and ticker or multiple tickers (You can pass in IBM,AAPL,MSFT)
Set impliedMoneyCollection = oratsAPI.GetImpliedMoney(userKey, "IBM")
Dim iMoney As ImpliedMoney

'Go through the collection and print out ticker and tradeDate
If Not impliedMoneyCollection Is Nothing Then
    For Each iMoney In impliedMoneyCollection
        Debug.Print iMoney.ticker & "," & iMoney.tradeDate
    Next iMoney
End If

'Add data to SandBox tab worksheet starting from row 10 and column 1
Call oratsAPI.AddCollectionToWorksheet(impliedMoneyCollection, "SandBox", 10, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "expirDate": "2015-08-14",
      "tradeDate": "2015-08-14",
      "smooth": 0.1,
      "width": 0.1,
      "alert": 1,
      "stkPx": 115.98,
      "riskFreeRate": 0.28,
      "yieldRate": 0,
      "residualYieldRate": -256.84242248535,
      "residualRateSlp": 1043.28,
      "residualR2": 0.590189,
      "confidence": 20.000000298023,
      "mwVol": 6.0926079750061,
      "vol100": 62.303006649017,
      "vol95": 61.169278621674,
      "vol90": 60.123479366302,
      "vol85": 59.165465831757,
      "vol80": 58.295059204102,
      "vol75": 57.512110471725,
      "vol70": 56.816446781158,
      "vol65": 56.207919120789,
      "vol60": 55.686354637146,
      "vol55": 55.251598358154,
      "vol50": 54.903483390808,
      "vol45": 54.641854763031,
      "vol40": 54.466545581818,
      "vol35": 54.377400875092,
      "vol30": 54.374247789383,
      "vol25": 54.45693731308,
      "vol20": 54.625296592712,
      "vol15": 54.879170656204,
      "vol10": 55.218398571014,
      "vol5": 55.642813444138,
      "vol0": 56.152254343033,
      "typeFlag": "0",
      "atmIv": 0.552979,
      "slp": 3.19931,
      "deriv": 0.0690547,
      "fit": 0,
      "updatedAt": "2015-08-14 19:57:43"
    }
  ]
}

This endpoint retrieves implied money information.

HTTP Request

GET https://api.orats.com/v2/live/monies/implied

Get a Specific Ticker or Stocklist

HTTP Request

GET https://api.orats.com/v2/live/monies/implied/stocklist/{stocklist}

URL Parameters

Parameter Default Description
stocklist None This must be set to a stocklist, for example AAPL,IBM,MSFT. You can also set it to a single ticker.

Output Fields

Parameter Description
ticker Underlying symbol.
expirDate Expiration Date.
tradeDate Date of the skew reading for market prices.
smooth The amount of smoothing to use in the regression (higher = more smooth)
width Maximum width of money data excluded by market data.
alert Alert flag for a smooth vol outside this percent of market width in volatility terms.
stkPx Stock price.
riskFreeRate Continuous interest (risk-free) rate.
yieldRate The continuous dividend yield of discrete dividend’s NPV.
residualYieldRate Adjustment amount for the dividend yield at the .50 call delta -0.055 Implied rate means -5.5%.
residualRateSlp Slope of the residual rate linear regression. A particular call delta total div yield = Div Yield + (cdelta- .5) * slope.
residualR2 R^2 of the residual rate linear regression.
confidence Portion of the delta range ‘covered’ by market data (dependent on the 'width’).
mwVol ATM weighted market width in implied volatility terms.
vol100 Seed volatility at the 100 call delta.
vol95 Seed volatility at the 95 call delta
vol90 Seed volatility at the 90 call delta
vol85 Seed volatility at the 85 call delta
vol80 Seed volatility at the 80 call delta
vol75 Seed volatility at the 75 call delta
vol70 Seed volatility at the 70 call delta
vol65 Seed volatility at the 65 call delta
vol60 Seed volatility at the 60 call delta
vol55 Seed volatility at the 55 call delta
vol50 Seed volatility at the 50 call delta
vol45 Seed volatility at the 45 call delta
vol40 Seed volatility at the 40 call delta
vol35 Seed volatility at the 35 call delta
vol30 Seed volatility at the 30 call delta
vol25 Seed volatility at the 25 call delta
vol20 Seed volatility at the 20 call delta
vol15 Seed volatility at the 15 call delta
vol10 Seed volatility at the 10 call delta
vol5 Seed volatility at the 5 call delta
vol0 Seed volatility at the 0 call delta
typeFlag
atmIv Implied volatility for month1.
slp Best-fit regression line through the strike. volatilities adjusted to the tangent slope at the 50 delta.
deriv Derivative or curvature of the monthly strikes at 28 day interpolated.
fit The at the money monthly fit volatility.
updatedAt Date and time of updated data.

Forecast Money

Example Code

'Declare a collection to set a list of ForecastMoney data
Dim forecastMoneyCollection As Collection
'Call GetForecastMoney API by passing in secret API user key and ticker or multiple tickers (You can pass in IBM,AAPL,MSFT).
Set forecastMoneyCollection = oratsAPI.GetForecastMoney(userKey, "IBM")
Dim fMoney As ForecastMoney

'Go through the collection and print out ticker and expirDate
If Not forecastMoneyCollection Is Nothing Then
    For Each fMoney In forecastMoneyCollection
        Debug.Print fMoney.ticker & "," & fMoney.expirDate
    Next fMoney
End If

'Add data to SandBox tab worksheet starting from row 10 and column 1
Call oratsAPI.AddCollectionToWorksheet(forecastMoneyCollection, "SandBox", 10, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "expirDate": "2015-08-14",
      "monthId": 1,
      "dte": 0,
      "stkPxAdj": null,
      "stkPx": 116.12,
      "interest": null,
      "dividend": null,
      "vol100": 0.276917,
      "vol95": 0.27091,
      "vol90": 0.265196,
      "vol85": 0.259775,
      "vol80": 0.254648,
      "vol75": 0.249814,
      "vol70": 0.245274,
      "vol65": 0.241027,
      "vol60": 0.237073,
      "vol55": 0.233412,
      "vol50": 0.230045,
      "vol45": 0.226971,
      "vol40": 0.22419,
      "vol35": 0.221703,
      "vol30": 0.219509,
      "vol25": 0.217608,
      "vol20": 0.216001,
      "vol15": 0.214687,
      "vol10": 0.213666,
      "vol5": 0.212938,
      "vol0": 0.212504,
      "updatedAt": "2015-08-14 15:30:21"
    }
  ]
}

This endpoint retrieves forecast money information.

HTTP Request

GET https://api.orats.com/v2/live/monies/forecast

Get a Specific Ticker or Stocklist

HTTP Request

GET https://api.orats.com/v2/live/monies/forecast/stocklist/{stocklist}

URL Parameters

Parameter Default Description
stocklist None This must be set to a stocklist, for example AAPL,IBM,MSFT. You can also set it to a single ticker.

Output Fields

Parameter Description
ticker Underlying symbol.
expirDate Expiration Date.
monthId Month Id.
dte Days to Expiration.
stkPxAdj Stock Price Adjustment.
stkPx Stock Price.
interest Interest.
dividend Dividend.
vol100 Seed volatility at the 100 call delta.
vol95 Seed volatility at the 95 call delta
vol90 Seed volatility at the 90 call delta
vol85 Seed volatility at the 85 call delta
vol80 Seed volatility at the 80 call delta
vol75 Seed volatility at the 75 call delta
vol70 Seed volatility at the 70 call delta
vol65 Seed volatility at the 65 call delta
vol60 Seed volatility at the 60 call delta
vol55 Seed volatility at the 55 call delta
vol50 Seed volatility at the 50 call delta
vol45 Seed volatility at the 45 call delta
vol40 Seed volatility at the 40 call delta
vol35 Seed volatility at the 35 call delta
vol30 Seed volatility at the 30 call delta
vol25 Seed volatility at the 25 call delta
vol20 Seed volatility at the 20 call delta
vol15 Seed volatility at the 15 call delta
vol10 Seed volatility at the 10 call delta
vol5 Seed volatility at the 5 call delta
vol0 Seed volatility at the 0 call delta
updatedAt Date and time of updated data.

Verbose Strikes

Example Code

'Declare a collection to set a list of VerboseStrike data
Dim vStrikeCollection As Collection
'Call GetVerboseStrike API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set vStrikeCollection = oratsAPI.GetVerboseStrike(userKey, "IBM")
Dim vStrike As VerboseStrike

'Go through the collection and print out ticker and expirDate
If Not vStrikeCollection Is Nothing Then
    For Each vStrike In vStrikeCollection
        Debug.Print vStrike.ticker & "," & vStrike.expirDate
    Next vStrike
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(vStrikeCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "stkPx": 115.98,
      "expirDate": "2015-08-14",
      "yte": "0.00000",
      "strike": 70,
      "cOpra": "",
      "cVolu": 22,
      "cOi": 7,
      "pOpra": "",
      "pVolu": null,
      "pOi": null,
      "cBidPx": 45.8,
      "cValue": 45.98,
      "cAskPx": 46.1,
      "pBidPx": 0,
      "pValue": null,
      "pAskPx": 0.01,
      "cBidIv": null,
      "cMidIv": null,
      "cAskIv": 3.75215,
      "smoothSmvVol": 0.620692,
      "pBidIv": null,
      "pMidIv": null,
      "pAskIv": 3.31395,
      "iRate": 0.0028,
      "divRate": 0,
      "residualRateData": 0.0188236,
      "smoothedResidualRate": "",
      "delta": 1,
      "gamma": 0,
      "theta": 0,
      "vega": 0,
      "rho": null,
      "phi": null,
      "driftlessTheta": 0,
      "extVol": null,
      "extCTheo": null,
      "extPTheo": null,
      "updatedAt": "2015-08-14 19:57:43"
    }
  ]
}

This endpoint retrieves verbose strikes information.

HTTP Request

GET https://api.orats.com/v2/live/strikes/verbose

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/live/strikes/verbose/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying symbol.
stkPx Stock Price.
expirDate Expiration Date.
yte Years to expiration.
strike Option strike.
cOpra Call Opra symbol.
cVolu Call volume today.
cOi Call open interest.
pOpra Put Opra.
pVolu Put volume.
pOi Put open interest.
cBidPx Call Bid Price.
cValue Call theoretical value based on smooth volatility.
cAskPx Call Ask Price.
pBidPx Put Bid Price.
pValue Put theoretical value based on smooth volatility.
pAskPx Put Ask Price.
cBidIv Call Bid Implied Volatility.
cMidIv Call Mid Market Implied Volatility.
cAskIv Call Ask Implied Volatility.
smoothSmvVol ORATS Final Implied Volatility.
pBidIv Put Bid Implied Volatility.
pMidIv Put Mid Implied Volatility.
pAskIv Put Ask Implied Volatility.
iRate Continuous interest (risk-free) rate.
divRate The continuous dividend yield of discrete dividend’s NPV.
residualRateData Implied Interest Rate Data.
smoothedResidualRate Smoothed Implied Rate Used in Calculations.
delta Delta
gamma Gamma
theta Theta
vega Vega
rho Rho
phi Phi
driftlessTheta Time decay without taking in drift in underlying.
extVol External volatility.
extCTheo External Call Theoretical Price.
extPTheo External Put Theoretical Price.
updatedAt Date and time of updated data.

Finalout Strikes

Example Code

'Declare a collection to set a list of FinalOutStrike data
Dim fStrikeCollection As Collection
'Call GetFinalOutStrike API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set fStrikeCollection = oratsAPI.GetFinalOutStrike(userKey, "IBM")
Dim fStrike As FinalOutStrike

'Go through the collection and print out ticker, dte, and strike
If Not fStrikeCollection Is Nothing Then
    For Each fStrike In fStrikeCollection
        Debug.Print fStrike.ticker & "," & fStrike.dte & "," & fStrike.strike
    Next fStrike
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(fStrikeCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "AAPL",
      "dte": 0,
      "strike": 70,
      "delta": 1,
      "bidAskWidth": null,
      "smoothSmvVol": 0.620692,
      "cBidIv": null,
      "cAskIv": 3.75215,
      "pBidIv": null,
      "pAskIv": 3.31395,
      "alert": null,
      "updatedAt": "2015-08-14 19:57:43"
    },
    {
      "ticker": "AAPL",
      "dte": 0,
      "strike": 75,
      "delta": 1,
      "bidAskWidth": null,
      "smoothSmvVol": 0.620692,
      "cBidIv": null,
      "cAskIv": 3.60558,
      "pBidIv": null,
      "pAskIv": 2.89404,
      "alert": null,
      "updatedAt": "2015-08-14 19:57:43"
    },
    {
      "ticker": "AAPL",
      "dte": 0,
      "strike": 80,
      "delta": 1,
      "bidAskWidth": null,
      "smoothSmvVol": 0.620692,
      "cBidIv": null,
      "cAskIv": 3.1293,
      "pBidIv": null,
      "pAskIv": 2.49618,
      "alert": null,
      "updatedAt": "2015-08-14 19:57:43"
    }
  ]
}

This endpoint retrieves finalout strikes information.

HTTP Request

GET https://api.orats.com/v2/live/strikes/finalout

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/live/strikes/finalout/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying Symbol
dte Days to Expiration.
strike Option strike price.
delta Delta of an option.
bidAskWidth Bid ask width of the option.
smoothSmvVol Smooth Volatility.
cBidIv Call Implied Volatility Bid.
cAskIv Call Implied Volatility Ask.
pBidIv Put Implied Volatility Bid.
pAskIv Put Implied Volatility Ask.
alert
updatedAt Date and time of updated data.

Implied Dividends Dates

Example Code

'Declare a collection to set a list of ImpliedDividend data
Dim iDividendCollection As Collection
'Call GetImpliedDividend API by passing in secret API user key
Set iDividendCollection = oratsAPI.GetImpliedDividend(userKey)
Dim iDividend As ImpliedDividend

'Go through the collection and print out ticker, tradeDate, divDate, and divAmt
If Not iDividendCollection Is Nothing Then
    For Each iDividend In iDividendCollection
        Debug.Print iDividend.ticker & "," & iDividend.tradeDate & "," & iDividend.divDate & "," & iDividend.divAmt
    Next iDividend
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(iDividendCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "A",
      "tradeDate": "2015-08-14",
      "autoAddType": 2,
      "divFreq": 0.25,
      "divDate": "2015-09-28",
      "days": 8,
      "iRate": 0.28,
      "divAmt": 0,
      "updatedAt": "2015-08-14 13:02:36"
    },
    {
      "ticker": "A",
      "tradeDate": "2015-08-14",
      "autoAddType": 2,
      "divFreq": 0.25,
      "divDate": "2015-09-28",
      "days": 36,
      "iRate": 0.32,
      "divAmt": 0,
      "updatedAt": "2015-08-14 13:02:36"
    },
    {
      "ticker": "A",
      "tradeDate": "2015-08-14",
      "autoAddType": 2,
      "divFreq": 0.25,
      "divDate": "2015-09-28",
      "days": 99,
      "iRate": 0.48,
      "divAmt": 0.08,
      "updatedAt": "2015-08-14 13:02:36"
    }
  ]
}

This endpoint retrieves implied dividends dates.

HTTP Request

GET https://api.orats.com/v2/live/dividends/implied

Output Fields

Parameter Description
ticker Underlying Symbol
tradeDate Trade Date
autoAddType
divFreq Dividend Frequency of payout.
divDate Dividend Date of payout.
days Days until dividend payout.
iRate Interest Rate.
divAmt Dividend amount.
updatedAt Date and time of updated data.

Forecast Dividends Dates

Example Code

'Declare a collection to set a list of ForecastDividend data
Dim fDividendCollection As Collection
'Call GetForecastDividend API by passing in secret API user key
Set fDividendCollection = oratsAPI.GetForecastDividend(userKey)
Dim fDividend As ForecastDividend

'Go through the collection and print out ticker, exDate, and divAmt
If Not fDividendCollection Is Nothing Then
    For Each fDividend In fDividendCollection
        Debug.Print fDividend.ticker & "," & fDividend.exDate & "," & fDividend.divAmt
    Next fDividend
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(fDividendCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "A",
      "exDate": "2015-09-28",
      "divAmt": 0.1,
      "divFreq": 4,
      "updatedAt": "2015-08-14 15:52:47"
    },
    {
      "ticker": "A",
      "exDate": "2016-01-04",
      "divAmt": 0.1,
      "divFreq": 4,
      "updatedAt": "2015-08-14 15:52:47"
    },
    {
      "ticker": "A",
      "exDate": "2016-03-28",
      "divAmt": 0.1,
      "divFreq": 4,
      "updatedAt": "2015-08-14 15:52:47"
    }
  ]
}

This endpoint retrieves implied dividends dates.

HTTP Request

GET https://api.orats.com/v2/live/dividends/forecast

Output Fields

Parameter Description
ticker Underlying Symbol
exDate Ex-Dividend Date
divAmt Dividend Amount
divFreq Dividend Frequency of payout.
updatedAt Date and time of updated data.

Earnings Dates

Example Code

'Declare a collection to set a list of EarningsDate data
Dim earningsCollection As Collection
'Call GetEarningsDate API by passing in secret API user key
Set earningsCollection = oratsAPI.GetEarningsDate(userKey)
Dim eDate As EarningsDate

'Go through the collection and print out ticker, nextDate, lastDate and confirmed
If Not earningsCollection Is Nothing Then
    For Each eDate In earningsCollection
        Debug.Print eDate.ticker & "," & eDate.nextDate & "," & eDate.lastDate & "," & eDate.confirmed
    Next eDate
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(earningsCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "CHLN",
      "nextDate": "2015-08-14",
      "lastDate": "2015-05-14",
      "timeOfDay": "0900",
      "confirmed": 1,
      "updatedAt": "2015-08-14 14:02:22"
    },
    {
      "ticker": "CBAK",
      "nextDate": "2015-08-14",
      "lastDate": "2015-05-20",
      "timeOfDay": "1200",
      "confirmed": 0,
      "updatedAt": "2015-08-14 14:03:58"
    },
    {
      "ticker": "MEA",
      "nextDate": "2015-08-14",
      "lastDate": "2015-05-20",
      "timeOfDay": "1630",
      "confirmed": 0,
      "updatedAt": "2015-08-14 14:02:29"
    }
  ]
}

This endpoint retrieves earnings dates.

HTTP Request

GET https://api.orats.com/v2/live/earnings

Output Fields

Parameter Description
ticker Underlying Symbol.
nextDate Next earnings date.
lastDate Last earnings date.
timeOfDay Time of day of earnings.
confirmed Earnings date confirmed.
updatedAt Date and time of updated data.

Option Scanner

Example Code

'In this example, we will create a short strangle at the 25-35 delta and 35-56 days to expiration

'Declare a collection of ScanOptionParameter to pass into OratsAPIClient's ScanOptions method
Dim scanParameters As New Collection

'Declare and Create leg1 ScanOptionParameter object
Dim leg1Parameter As ScanOptionParameter
Set leg1Parameter = Factory.CreateScanOptionParameter(1, "sell", 1, "call", 0.5, "35,56", ".25,.30", "0,4", "off", "off", _
"off", "off", "off", "off", "off", "off", "off")

'Declare and Create leg2 ScanOptionParameter object
Dim leg2Parameter As ScanOptionParameter
Set leg2Parameter = Factory.CreateScanOptionParameter(2, "sell", 1, "put", 0.5, "35,56", ".25,.30", "0,4", "off", "off", _
"off", "off", "off", "off", "off", "off", "off")

'Add the legs to the scanParameters collection
Call scanParameters.Add(leg1Parameter)
Call scanParameters.Add(leg2Parameter)

 'Declare a collection of Leg Relationship to pass into OratsAPIClient's ScanOptions method
Dim legRelationships As New Collection

'Declare and Create Leg1-leg2 Relationship Parameters
Dim leg1leg2Relation As legRelationship
Set leg1leg2Relation = Factory.CreateLegRelationship("off", "-.07,.07", "0,0")

Call legRelationships.Add(leg1leg2Relation)

'Declare a collection to set a list of OptionTrade data output
Dim optTradesCollection As Collection

'Call ScanOptions method API by passing in secret API user key, stocklist, scanParameters collection, stock parameters, and spread total parameters
Set optTradesCollection = oratsAPI.ScanOptions(userKey, "SPY,QQQ,IWM", scanParameters, legRelationships, "off", "off", "off", "off", "off")

Dim optTrade As OptionTrade

'Go through the collection and print out leg, ratio, ticker, optionType, expiration, strike, and trade option price
If Not optTradesCollection Is Nothing Then
    For Each optTrade In optTradesCollection
        Debug.Print optTrade.leg & "," & optTrade.ratio & "," & optTrade.ticker & "," & optTrade.optionType & "," & _
        optTrade.year & "-" & optTrade.month & "-" & optTrade.day & "," & optTrade.strike & "," & optTrade.tradeOptPx
    Next optTrade
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(optTradesCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "leg": 1,
      "ratio": 1,
      "ticker": "SPY",
      "optionType": "call",
      "year": 2015,
      "month": 9,
      "day": 18,
      "strike": 207,
      "dte": 35,
      "stockPx": 208.98,
      "optBid": 4.43,
      "optAsk": 4.44,
      "tradeOptPx": 4.435,
      "iVolBid": 19.4,
      "iVolAsk": 19.4,
      "tradeVol": 19.4,
      "theovol": 29.3,
      "fcstRatio": 1.54,
      "delta": 0.51,
      "gamma": 0.0247945,
      "vega": 0.24608
    },
    {
      "leg": 1,
      "ratio": 1,
      "ticker": "SPY",
      "optionType": "call",
      "year": 2015,
      "month": 9,
      "day": 18,
      "strike": 206,
      "dte": 35,
      "stockPx": 208.98,
      "optBid": 5.14,
      "optAsk": 5.16,
      "tradeOptPx": 5.15,
      "iVolBid": 20.2,
      "iVolAsk": 20.3,
      "tradeVol": 20.3,
      "theovol": 29.3,
      "fcstRatio": 1.42,
      "delta": 0.53,
      "gamma": 0.0251928,
      "vega": 0.245597
    },
    {
      "leg": 1,
      "ratio": 1,
      "ticker": "SPY",
      "optionType": "call",
      "year": 2015,
      "month": 9,
      "day": 18,
      "strike": 205,
      "dte": 35,
      "stockPx": 208.98,
      "optBid": 5.88,
      "optAsk": 5.91,
      "tradeOptPx": 5.895,
      "iVolBid": 21.1,
      "iVolAsk": 21.2,
      "tradeVol": 21.2,
      "theovol": 29.3,
      "fcstRatio": 1.33,
      "delta": 0.56,
      "gamma": 0.0255509,
      "vega": 0.240803
    }
  ]
}

This endpoint retrieves option scan trades based on parameter inputs.

HTTP Request

POST https://api.orats.com/v2/live/scan/custom

POST Data Example

legs=2&option={"leg1":{"buysell":"sell","ratio":"1","optiontype":"call","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"},"leg2":{"buysell":"sell","ratio":"1","optiontype":"put","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"}}&relation={"leg1leg2":{"deltatotal":"-.07,.07","dteDiff":"0,0"}}&stocklist=SPY,QQQ,IWM

The above POST data for option and relation is in JSON format.

POST Parameters

Parameter Required Description
legs yes Number of legs in the trade.
option yes JSON formatted option parameters/filters.
stocklist yes Stock symbols to scan against.
relation no JSON formatted leg relationship parameters/filters.
spread no JSON formatted total spread value of price and delta.
stockpx no Underlying stock price range. For example it will search stocks that have a stock price between and including $5.00 to $20.00.
daysearnings no Days to earnings. For example it will search stocks that have earnings between and including 40 to 100 days.
optvolume20 no 20 day option volume moving average. For example 1000,off will search stocks that have option volume greater than or equal to 1000.

Example of Option Parameter JSON formatted POST data

option={"leg1":{"buysell":"sell","ratio":"1","optiontype":"call","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"},"leg2":{"buysell":"sell","ratio":"1","optiontype":"put","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"}}

Option Parameters (JSON Format)

Parameter Required Default Description
leg1 yes none Depending on the number of legs for the trade, you will be required to pass each leg in json format.
buysell yes none Buy or sell the option trade. Valid value is buy or sell.
ratio yes none Ratio relative to your strategy. For example, if it is a 1x2 Call Ratio, you would enter 1 for leg1 and 2 for leg2.
optiontype yes none Type of option. Valid value is call or put.
tradepct no .5 Percent of market of trade entry. For example if you were buying the option with a tradepct of .75 and the bid/ask of an option is 1.00 x 1.10, then the price you would pay for the option is 1.075 ( 1.00 + (1.10 - 1.00) * .75). If you were selling the option, it would be 1.025 (1.10 - (1.10 - 1.00) * .75). The formula for the option entry price is bid + (ask - bid) * tradepct if you were buying and ask - (ask - bid) * tradepct if you were selling.
dte no off Days to expiration. For example it will search options that have days to expiration between and including 20 to 55.
absdelta no off Absolute value of a delta of an option. For example, it would search options that have absolute value of a delta between and including .20 and .40.
fcstratio no off ORATS price forecast of an option divided by the current option trade entry price. For example it would search options that have fcstratio between and including 1 to 4.
yldpct no off Yield Percentage is (option entry price / stockprice) * 100. For example it would search options that have yldpct between and including 5 to 10.
optbid no off Current Option bid price. For example it would search options that have a bid price between and including .40 to 1.20.
optask no off Current Option ask price. For example it would search options that have a ask price between and including .40 to 1.20.
optpx no off Current Option entry price. For example it would search options that have a option trade price between and including .40 to 1.20.
ibidvol no off Implied Bid Volatility. For example it would search options that have ibidvol between and including 15 to 80.
iaskvol no off Implied Ask Volatility. For example it would search options that have iaskvol between and including 20 to 85.
mktwidthpct no off Market Width Percentage ((optAsk - optBid) / strike). For example it would search options that have mktwidthpct between and including .004 to .01.
ddeltaprice no off Dollar delta price (stockpx * absdelta / optpx). For example it would search options that have ddeltaprice between and including 40 to 100.
stockpct no off Stock Percentage (strike / stockpx). For example it would search options that have stockpct between and including .9 to 1.25.

Example of Leg Relationship JSON formatted POST data

relation={"leg1leg2":{"strikewidth":"-40,-30","deltatotal":"-.07,.07","dteDiff":"0,0"}}

Leg Relationship (JSON Format)

Parameter Required Default Description
strikewidth no off Width between 2 strikes of your spread trade. For example above, it would search for trades that have leg1 strike - leg2 strike between and including -40,-30.
deltatotal no off Total delta between 2 legs of your spread trade. For example above, it would search for trades that have leg1 delta + leg2 delta between and including -.07,.07.
dtediff no off Days to expiration between 2 legs of your spread trade. For example above, it would search for trades that have leg1 dte - leg2 dte between and including 0,0. Which means leg1 and leg2 would have the same expiration.

Example of Spread Total JSON formatted POST data

spread={"price":"1.00,1.50","delta":".30,.60"}

Spread total (JSON Format)

Parameter Required Default Description
price no off Total price of the spread. For example, it would search for spread price between and including 1.00 to 1.50.
delta no off Total delta of the spread. For example, it would search for spread delta between and including .30 to .60.

Output Fields

Parameter Description
leg Leg number of the trade.
ratio Ratio of the trade. Positive number is a buy and negative number is a sell.
ticker Underlying Symbol.
optionType Call or Put.
year Year of the option expiration.
month Month of the option expiration.
day Day of the option expiration.
strike Strike of the option.
dte Days to expiration.
stockPx Stock Price of option trade entry.
optBid Option bid price.
optAsk Option ask price.
tradeOptPx Option entry trade price.
iVolBid Implied Volatility Bid.
iVolAsk Implied Volatility Ask.
tradeVol Option Trade volatility.
theovol Theoretical volatility.
fcstRatio Forecast Ratio (Forecast option price / tradeOptPx)
delta Delta of the option.
gamma Gamma of the option.
vega Vega of the option.

Historical Data

Daily Closing Stock Price

Example Code

'Declare a collection to set a list of DailyPrice data
Dim dailyPxCollection As Collection
'Call GetDailyPrice API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set dailyPxCollection = oratsAPI.GetDailyPrice(userKey, "IBM")
Dim dailyPx As DailyPrice

'Go through the collection and print out ticker, tradeDate, stkPx and vol
If Not dailyPxCollection Is Nothing Then
    For Each dailyPx In dailyPxCollection
        Debug.Print dailyPx.ticker & "," & dailyPx.tradeDate & "," & dailyPx.stkPx & "," & dailyPx.vol
    Next dailyPx
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(dailyPxCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-03",
      "stkPx": 91.093,
      "vol": 14.952
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-04",
      "stkPx": 92.067,
      "vol": 15.408
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-05",
      "stkPx": 91.234,
      "vol": 15.898
    }
  ]
}

This endpoint retrieves daily closing price and at the money implied 20 day volatility data.

HTTP Request

GET https://api.orats.com/v2/historical/dailies

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/historical/dailies/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying Symbol
tradeDate Date of trading day.
stkPx Daily stock price close.
vol At the money implied volatility interpolated 28 trading days to expiration.

Stock Info

Example Code

'Declare a collection to set a list of StockInfo data
Dim stockInfoCollection As Collection
'Call GetStockInfo API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set stockInfoCollection = oratsAPI.GetStockInfo(userKey, "IBM")
Dim stkInfo As StockInfo

'Go through the collection and print out ticker, tradeDate, stkPx and avg20dVolu
If Not stockInfoCollection Is Nothing Then
    For Each stkInfo In stockInfoCollection
        Debug.Print stkInfo.ticker & "," & stkInfo.tradeDate & "," & stkInfo.stkPx & "," & stkInfo.avg20dVolu
    Next stkInfo
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(stockInfoCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-03",
      "stkPx": 97.21,
      "avg20dVolu": 26822.3333,
      "ticVol20": 9.59,
      "iv28": 14.95,
      "imp200ma": 16.78,
      "avgDailyDiffQrt": null,
      "daysToNextErn": 19,
      "nextErn": "2007-01-17",
      "clsCls20Imp28": 79.72,
      "impR2": 0.6756,
      "fcstR2": 0.284,
      "vol100dRVol28": null,
      "rDrv28": 0.0001,
      "rSlp28": 2.0981,
      "impFcst": 15.1,
      "rVolInf": 16.2837,
      "rRip": 0.6518,
      "or20dFcst": 10.8641,
      "orInfFcst": 16.5167,
      "fcstSlp": 2.8,
      "xErnOr20dHv": null,
      "xErnOr252dHv": null
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-04",
      "stkPx": 98.38,
      "avg20dVolu": 28619.2857,
      "ticVol20": 9.87,
      "iv28": 15.41,
      "imp200ma": 16.78,
      "avgDailyDiffQrt": null,
      "daysToNextErn": 15,
      "nextErn": "2007-01-18",
      "clsCls20Imp28": 56.59,
      "impR2": 0.6812,
      "fcstR2": 0.2211,
      "vol100dRVol28": null,
      "rDrv28": 0,
      "rSlp28": 3.2247,
      "impFcst": 16.4,
      "rVolInf": 16.1673,
      "rRip": 0.6823,
      "or20dFcst": 11.7166,
      "orInfFcst": 16.6488,
      "fcstSlp": 2.7,
      "xErnOr20dHv": null,
      "xErnOr252dHv": null
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-05",
      "stkPx": 97.64,
      "avg20dVolu": 29562.619,
      "ticVol20": 8.84,
      "iv28": 15.9,
      "imp200ma": 16.8,
      "avgDailyDiffQrt": null,
      "daysToNextErn": 14,
      "nextErn": "2007-01-18",
      "clsCls20Imp28": 55.1,
      "impR2": 0.6816,
      "fcstR2": 0.182,
      "vol100dRVol28": null,
      "rDrv28": 0.0001,
      "rSlp28": 1.8617,
      "impFcst": 16.3,
      "rVolInf": 16.0603,
      "rRip": 0.8703,
      "or20dFcst": 11.7602,
      "orInfFcst": 16.6618,
      "fcstSlp": 2.7,
      "xErnOr20dHv": null,
      "xErnOr252dHv": null
    }
  ]
}

This endpoint retrieves historical stock data.

HTTP Request

GET https://api.orats.com/v2/historical/stocks

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/historical/stocks/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying Symbol
tradeDate Date of trading day.
stkPx Daily stock price close.
avg20dVolu Average 20 day volume.
ticVol20 Tick Volatility 20 day.
iv28 At the money implied volatility interpolated 20 trading days to expiration.
imp200ma Implied volatility 200 day moving average.
avgDailyDiffQrt Average of the daily profitability readings of owning implied vs actual 20 days after for ¼ of the available data for a stock max 5 years.
daysToNextErn Days to next Earnings.
nextErn Next Earnings Date.
clsCls20Imp28 Close to close historical volatility for the past 20 readings divided by the implied volatility at 28 days interpolated.
impR2 The r-squared of the implied volatility as the independent variable and actual historical volatility as the dependent variable in a regression.
fcstR2 The r-squared of the ORATS forecast of 20 day volatility as the independent variable and actual historical volatility as the dependent variable in a regression.
vol100dRVol28 ORATS tick historical volatility for the past 100 readings divided by the implied volatility at 28 days interpolated.
rDrv28 Curvature of the monthly skew line.
rSlp28 Slope of the monthly skew line.
impFcst ORATS forecast of the implied volatility in 28 days.
rVolInf The infinite or asymptote for the implied volatility term structure line ex earnings.
rRip The value of an option when it begins to lose relevance in the Black-Scholes option pricing equation.
or20dFcst ORATS forecast of the historic volatility for the next 20 days ex earnings.
orInfFcst ORATS forecast of the infinite or asymptote for the implied volatility term structure.
fcstSlp ORATS forecast of the slope of the monthly skew line.
xErnOr20dHv ORATS tick historical volatility for the past 20 readings not including the day of or after earnings.
xErnOr252dHv ORATS tick historical volatility for the past 252 readings not including the day of or after earnings.

Quarterly Stock Return

Example Code

'Declare a collection to set a list of QuarterlyReturn data
Dim qrtReturnCollection As Collection
'Call GetQuarterlyReturn API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set qrtReturnCollection = oratsAPI.GetQuarterlyReturn(userKey, "IBM")
Dim qrtReturn As QuarterlyReturn

'Go through the collection and print out ticker, quarter, stkPx and vol
If Not qrtReturnCollection Is Nothing Then
    For Each qrtReturn In qrtReturnCollection
        Debug.Print qrtReturn.ticker & "," & qrtReturn.quarter & "," & qrtReturn.stkPx & "," & qrtReturn.vol
    Next qrtReturn
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(qrtReturnCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "IBM",
      "quarter": "20071",
      "stkPx": -2.8,
      "vol": 3.77
    },
    {
      "ticker": "IBM",
      "quarter": "20072",
      "stkPx": 10.97,
      "vol": -1.65
    },
    {
      "ticker": "IBM",
      "quarter": "20073",
      "stkPx": 12.58,
      "vol": 23.22
    },
    {
      "ticker": "IBM",
      "quarter": "20074",
      "stkPx": -8.86,
      "vol": 31.86
    },
    {
      "ticker": "IBM",
      "quarter": "20081",
      "stkPx": 10.4,
      "vol": -6.02
    }
  ]
}

This endpoint retrieves quarterly stock returns and volatility returns in percentage terms.

HTTP Request

GET https://api.orats.com/v2/historical/quarterlyreturns

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/historical/quarterlyreturns/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying Symbol
quarter Year and quarter. Quarter 1 = Jan to Mar, Quarter 2 = Apr to Jun, Quarter 3 = Jul to Sept, Quarter 4 = Oct to Dec
stkPx Returns of stock price.
vol Returns of at the money implied volatility interpolated 28 trading days to expiration.

TOES

Example Code

'Declare a collection to set a list of Toes data
Dim toesCollection As Collection
'Call GetToes API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set toesCollection = oratsAPI.GetToes(userKey, "IBM")
Dim toesData As Toes

'Go through the collection and print out ticker, tradeDate, pxToes and volToes
If Not toesCollection Is Nothing Then
    For Each toesData In toesCollection
        Debug.Print toesData.ticker & "," & toesData.tradeDate & "," & toesData.pxToes & toesData.volToes
    Next toesData
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(toesCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-03",
      "stkPx": 91.093,
      "vol": 14.952,
      "pxMa": 81.652,
      "pxStdev": 6.053,
      "volMm": 14.131,
      "volStdev": 0.634,
      "pxToes": "HS",
      "volToes": "HV"
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-04",
      "stkPx": 92.067,
      "vol": 15.408,
      "pxMa": 81.859,
      "pxStdev": 6.018,
      "volMm": 14.131,
      "volStdev": 0.63,
      "pxToes": "HS",
      "volToes": "HV"
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-05",
      "stkPx": 91.234,
      "vol": 15.898,
      "pxMa": 82.073,
      "pxStdev": 5.997,
      "volMm": 14.131,
      "volStdev": 0.626,
      "pxToes": "HS",
      "volToes": "HV"
    },
    {
      "ticker": "IBM",
      "tradeDate": "2007-01-08",
      "stkPx": 92.62,
      "vol": 16.742,
      "pxMa": 82.281,
      "pxStdev": 5.951,
      "volMm": 14.131,
      "volStdev": 0.626,
      "pxToes": "HS",
      "volToes": "HV"
    }
  ]
}

This endpoint retrieves TOES (Tested Option Environment Strategies and it is defined by High, Medium, or Low stock price and short-term 20 day implied volatility).

HTTP Request

GET https://api.orats.com/v2/historical/toes

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/historical/toes/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying Symbol
tradeDate Date of trading day.
stkPx Daily stock price close.
vol At the money implied volatility interpolated 28 trading days to expiration.
pxMa 100-day moving average of the closing stock price.
pxStdev 100-day standard deviation of the closing stock price.
volMm 100-day median of the vol.
volStdev 100-day standard deviation of the vol.
pxToes TOES of the closing stock price. (HS, MS, LS stands for High Stock, Medium Stock, Low Stock)
volToes TOES of the vol. (HV, MV, LV for High Vol, Medium Vol, Low Vol)

Volatility Info

Example Code

'Declare a collection to set a list of VolatilityInfo data
Dim volInfoHistCollection As Collection
'Call GetVolInfoHistCollection API by passing in secret API user key and ticker(This method can only take 1 ticker symbol)
Set volInfoHistCollection = oratsAPI.GetVolatilityInfoHistorical(userKey, "IBM")
Dim volInfoHist As VolatilityInfo

'Go through the collection and print out ticker and tradeDate
If Not volInfoHistCollection Is Nothing Then
    For Each volInfoHist In volInfoHistCollection
        Debug.Print volInfoHist.ticker & "," & volInfoHist.tradeDate
    Next volInfoHist
End If

'Add data to SandBox tab worksheet starting from row 10 and column 1
Call oratsAPI.AddCollectionToWorksheet(volInfoHistCollection, "SandBox", 10, 1)
{
  "data": [
    {
      "ticker": "IBM",
      "tradeDate": "2010-01-04",
      "clsStkPx": 132.54,
      "iv30d": 19.81,
      "iv60d": 20.53,
      "iv90d": 20.62,
      "m1AtmIv": 18.1,
      "m1Dte": 12,
      "m2AtmIv": 19.11,
      "m2Dte": 47,
      "m3AtmIv": 19.86,
      "m3Dte": 103,
      "m4AtmIv": 21.62,
      "m4Dte": 194,
      "slp": 3.715,
      "drv": 0.06129,
      "infSlp": 4.429,
      "infDrv": 0.06129,
      "cls10dHv": 13.12,
      "cls20dHv": 12.02,
      "cls60dHv": 18.15,
      "cls120dHv": 18.28,
      "cls252dHv": 27.44,
      "or10dHv": 0.1312,
      "or20dHv": 0.1202,
      "or60dHv": 0.1815,
      "or120dHv": 0.1828,
      "or252dHv": 0.2744
    },
    {
      "ticker": "IBM",
      "tradeDate": "2010-01-05",
      "clsStkPx": 130.83,
      "iv30d": 18.98,
      "iv60d": 19.96,
      "iv90d": 20.07,
      "m1AtmIv": 17.64,
      "m1Dte": 11,
      "m2AtmIv": 19.61,
      "m2Dte": 46,
      "m3AtmIv": 20.15,
      "m3Dte": 102,
      "m4AtmIv": 21.72,
      "m4Dte": 193,
      "slp": 3.686,
      "drv": 0.05379,
      "infSlp": 4.4,
      "infDrv": 0.05379,
      "cls10dHv": 14.33,
      "cls20dHv": 12.74,
      "cls60dHv": 18.3,
      "cls120dHv": 17.53,
      "cls252dHv": 27.46,
      "or10dHv": 0.1433,
      "or20dHv": 0.1274,
      "or60dHv": 0.183,
      "or120dHv": 0.1753,
      "or252dHv": 0.2746
    }
  ]
}

This endpoint retrieves historical volatility information.

HTTP Request

GET https://api.orats.com/v2/historical/volatility

Get a Specific Ticker

HTTP Request

GET https://api.orats.com/v2/historical/volatility/ticker/{ticker}

URL Parameters

Parameter Default Description
ticker None This must be set to a ticker symbol, for example AAPL.

Output Fields

Parameter Description
ticker Underlying symbol.
tradeDate Date of the skew reading for market prices.
clsStkPx Daily stock price close.
iv30d The 30 day interpolated implied volatility.
iv60d The 60 day interpolated implied volatility.
iv90d The 90 day interpolated implied volatility.
m1AtmIv Implied volatility for month 1.
m1Dte Days to expiration in month 1 (no weekly or quarterly expirations).
m2AtmIv Implied volatility for month 2.
m2Dte Days to expiration in month 2.
m3AtmIv Implied volatility for month 3.
m3Dte Days to expiration in month 3.
m4AtmIv Implied volatility for month 4.
m4Dte Days to expiration in month 4.
slp Best-fit regression line through the strike volatilities adjusted to the tangent slope at the 50 delta.
drv Derivative or curvature of the monthly strikes at 28 day interpolated.
infSlp Implied infinite slope.
infDrv Derivative infinite implied.
cls10dHv The 10 day historical close to close volatility.
cls20dHv The 20 day historical close to close volatility.
cls60dHv The 60 day historical close to close volatility.
cls120dHv The 120 day historical close to close volatility.
cls252dHv The 252 day historical close to close volatility.
or10dHv The 10 day historical tick volatility.
or20dHv The 20 day historical tick volatility.
or60dHv The 60 day historical tick volatility.
or120dHv The 120 day historical tick volatility.
or252dHv The 252 day historical tick volatility.

Backtest

API Backtest

Example Code

'In this example, we will create a short strangle at the 25-35 delta and 35-56 days to expiration Backtest

'Declare a collection of ScanOptionParameter to pass into OratsAPIClient's Backtest method
Dim btScanParameters As New Collection

'Declare and Create leg1 ScanOptionParameter object
Dim btLeg1Parameter As ScanOptionParameter
Set btLeg1Parameter = Factory.CreateScanOptionParameter(1, "sell", 1, "call", 0.5, "35,56", ".25,.30", "0,4", "off", "off", _
"off", "off", "off", "off", "off", "off", "off")

'Declare and Create leg2 ScanOptionParameter object
Dim btLeg2Parameter As ScanOptionParameter
Set btLeg2Parameter = Factory.CreateScanOptionParameter(2, "sell", 1, "put", 0.5, "35,56", ".25,.30", "0,4", "off", "off", _
"off", "off", "off", "off", "off", "off", "off")

'Add the legs to the scanParameters collection
Call btScanParameters.Add(btLeg1Parameter)
Call btScanParameters.Add(btLeg2Parameter)

 'Declare a collection of Leg Relationship to pass into OratsAPIClient's ScanOptions method
Dim btLegRelationships As New Collection

'Declare and Create Leg1-leg2 Relationship Parameters
Dim btLeg1leg2Relation As legRelationship
Set btLeg1leg2Relation = Factory.CreateLegRelationship("off", "-.07,.07", "0,0")

Call btLegRelationships.Add(btLeg1leg2Relation)

'Declare and Create Backtest Parameters
Dim backtestOptParameter As BacktestOptionParameter
Set backtestOptParameter = Factory.CreateBacktestOptionParameter(100, 5, 5, "expire", "off", "off", "off", "off", "off", 0.01, 1#)


'Declare a collection to set a list of OptionTrade data output
Dim btOptTradesCollection As Collection

'Call Backtest method API by passing in secret API user key, stocklist, scanParameters collection, stock parameters, spread total parameters, backtest parameters, year, and month
Set btOptTradesCollection = oratsAPI.Backtest(userKey, "SPY", btScanParameters, btLegRelationships, "off", "off", "off", "off", "off", backtestOptParameter, 2007, 1)

'If you want to backtest multiple months, call the BacktestRange function
'Set btOptTradesCollection = oratsAPI.BacktestRange(userKey, "SPY", btScanParameters, btLegRelationships, "off", "off", "off", "off", "off", backtestOptParameter, 2007, 1, 2008, 1)

Dim btOptTrade As BacktestOptionTrade

'Go through the backtest trade collection and print out trade date, leg number, ratio, ticker, option type, expir date, strike, and trade option price
If Not btOptTradesCollection Is Nothing Then
    For Each btOptTrade In btOptTradesCollection
        Debug.Print btOptTrade.tradeDate & "," & btOptTrade.leg & "," & btOptTrade.ratio & "," & btOptTrade.ticker & "," & btOptTrade.optionType & "," & _
        btOptTrade.expirDate & "," & btOptTrade.strike & "," & btOptTrade.tradeOptPx

        'If you want to see the exit prices, loop through the exits collection
'            Dim btExit As BacktestExit
'            For Each btExit In btOptTrade.exits
'                Debug.Print btExit.ToString()
'            Next btExit
    Next btOptTrade
End If

'Add data to SandBox tab worksheet starting from row 1 and column 1
Call oratsAPI.AddCollectionToWorksheet(btOptTradesCollection, "SandBox", 1, 1)
{
  "data": [
    {
      "date": "2007-01-03",
      "leg": 1,
      "ticker": "SPY",
      "ratio": -1,
      "quantity": 100,
      "optionType": "call",
      "expirDate": "2007-02-17",
      "year": 2007,
      "month": 2,
      "strike": 145,
      "dte": 45,
      "stockPx": 141.26,
      "optBid": 0.8,
      "optAsk": 0.9,
      "tradeOptPx": 0.85,
      "iVolBid": 9.5,
      "iVolAsk": 10.1,
      "tradeVol": 9.799,
      "theovol": 4.8,
      "fcstRatio": 0.16,
      "delta": 0.28,
      "gamma": 0.0701,
      "vega": 0.1683,
      "exitDate": "2007-02-16",
      "exitStockPx": 145.55,
      "exitOptionPx": 0.55000000000001,
      "stockProfit": 0,
      "optionProfit": 2801.43,
      "optionCommission": -200,
      "stockCommission": 0,
      "interest": 1.43,
      "dividend": 0,
      "totalProfit": 2801.43,
      "date^stockpx^dte^callbid^callask^putbid^putask^callfcst^putfcst^delta^rip^divamt^split^cpdiff": "2007-01-03^141.26^45^0.8^0.9^3.9^4.1^0.1372^3.7509^0.2847^0.8187^0^0^-0.0133|2007-01-04^141.66^44^0.85^0.95^3.5^3.7^0.2604^3.3495^0.3006^0.8259^0^0^0.0375|2007-01-05^140.91^43^0.65^0.7^4.1^4.3^0.1681^4.0999^0.2421^0.84^0^0^0.0442|2007-01-08^141.23^40^0.65^0.7^3.8^4^0.1627^3.7796^0.2591^0.7308^0^0^0.0464|2007-01-09^141.14^39^0.6^0.65^3.9^4^0.1646^3.8695^0.2413^0.7295^0^0^0.0648|2007-01-10^141.32^38^0.55^0.65^3.7^3.9^0.195^3.688^0.2407^0.6753^0^0^0.0136|2007-01-11^142.25^37^0.75^0.8^2.95^3^0.3163^2.7566^0.3079^0.7369^0^0^0.0391|2007-01-12^142.95^36^0.9^1^2.4^2.5^0.4509^2.0844^0.3661^0.5536^0^0^0.0058|2007-01-16^142.99^32^0.9^0.95^2.35^2.45^0.3317^2.0181^0.3582^0.5994^0^0^0.0478|2007-01-17^142.93^31^0.8^0.9^2.4^2.5^0.2598^2.0757^0.3465^0.5916^0^0^0.0037|2007-01-18^142.54^30^0.6^0.65^2.6^2.7^0.1042^2.4674^0.2901^0.6035^0^0^0.0222|2007-01-19^142.93^29^0.65^0.7^2.25^2.35^0.081^2.0772^0.317^0.7087^0^0^0.028|2007-01-22^142.22^26^0.4^0.45^2.8^2.9^0.0114^2.7868^0.2287^0.7153^0^0^0.0389|2007-01-23^142.7^25^0.45^0.5^2.4^2.5^0.0364^2.3065^0.2585^0.7637^0^0^-0.01|2007-01-24^143.89^24^0.8^0.9^1.55^1.6^0.1831^1.1147^0.4137^0.5998^0^0^-0.0033|2007-01-25^142.36^23^0.4^0.45^2.7^2.75^0.009^2.646^0.2352^0.7261^0^0^0.0505|2007-01-26^142.16^22^0.3^0.35^2.85^2.95^0.0052^2.8457^0.19^0.7295^0^0^0.0104|2007-01-29^142.01^19^0.25^0.3^2.95^3.1^0.0024^2.9949^0.1488^0.7787^0^0^0.0313|2007-01-30^142.76^18^0.35^0.4^2.3^2.4^0.0003^2.2445^0.2269^0.7957^0^0^0.0286|2007-01-31^143.88^17^0.65^0.7^1.45^1.55^0.0378^1.1248^0.3795^0.6493^0^0^0.0221|2007-02-01^144.59^16^0.95^1^1.1^1.15^0.3209^0.4889^0.4883^0.6771^0^0^-0.0178|2007-02-02^144.85^15^1^1.05^0.9^0.95^0.4371^0.3335^0.527^0.6328^0^0^-0.0157|2007-02-05^144.71^12^0.85^0.9^0.95^1^0.2863^0.3867^0.4935^0.7182^0^0^-0.0208|2007-02-06^144.81^11^0.85^0.9^0.8^0.9^0.3142^0.3223^0.5076^0.6766^0^0^0.0202|2007-02-07^145.02^10^0.85^0.95^0.65^0.75^0.4068^0.2175^0.5435^0.3786^0^0^0.0084|2007-02-08^144.82^9^0.65^0.75^0.75^0.8^0.2703^0.3015^0.5018^0.9064^0^0^-0.0543|2007-02-09^143.86^8^0.3^0.35^1.3^1.35^0.0309^1.1425^0.2744^0.892^0^0^0.0174|2007-02-12^143.32^5^0.1^0.2^1.7^1.8^0.0003^1.6814^0.1344^0.9557^0^0^0.0136|2007-02-13^144.47^4^0.25^0.3^0.7^0.75^0.0031^0.5312^0.362^0.8127^0^0^0.0139|2007-02-14^145.66^3^0.85^0.9^0.15^0.25^0.7729^0.0549^0.7092^0.7062^0^0^-0.0422|2007-02-15^145.8^2^0.85^0.95^0.05^0.1^0.8963^0.0576^0.7869^0.517^0^0^-0.0136|2007-02-16^145.55^1^0.55^0.6^0^0.05^0.6243^0.055^0.6601^0.356^0^0^-0.0195"
    }
  ]
}

This endpoint retrieves option scan trades based on parameter inputs.

HTTP Request

POST https://api.orats.com/v2/backtest

POST Data Example

legs=2&option={"leg1":{"buysell":"sell","ratio":"1","optiontype":"call","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"},"leg2":{"buysell":"sell","ratio":"1","optiontype":"put","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"}}&relation={"leg1leg2":{"deltatotal":"-.07,.07","dtediff":"0,0"}}&stocklist=SPY&exits={"quantity":"100","numofresults":"5","trades_per_symbol":"5","exit_days":"expire","stk_commish":"0.01","opt_commish":"1"}&year=2007&month=1

The above POST data for option and relation is in JSON format.

POST Parameters

Parameter Required Description
legs yes Number of legs in the trade.
option yes JSON formatted option parameters/filters.
stocklist yes Stock symbols to scan against.
relation no JSON formatted leg relationship parameters/filters.
spread no JSON formatted total spread value of price and delta.
stockpx no Underlying stock price range. For example it will search stocks that have a stock price between and including $5.00 to $20.00.
daysearnings no Days to earnings. For example it will search stocks that have earnings between and including 40 to 100 days.
optvolume20 no 20 day option volume moving average. For example 1000,off will search stocks that have option volume greater than or equal to 1000.
exits yes JSON formatted exit parameters/filters for backtesting.
year yes Year number of backtest study.
month yes Month number of backtest study.

Example of Option Parameter JSON formatted POST data

option={"leg1":{"buysell":"sell","ratio":"1","optiontype":"call","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"},"leg2":{"buysell":"sell","ratio":"1","optiontype":"put","tradepct":"0.5","dte":"35,56","absdelta":".25,.30","fcstratio":"0,4"}}

Option Parameters (JSON Format)

Parameter Required Default Description
leg1 yes none Depending on the number of legs for the trade, you will be required to pass each leg in json format.
buysell yes none Buy or sell the option trade. Valid value is buy or sell.
ratio yes none Ratio relative to your strategy. For example, if it is a 1x2 Call Ratio, you would enter 1 for leg1 and 2 for leg2.
optiontype yes none Type of option. Valid value is call or put.
tradepct no .5 Percent of market of trade entry. For example if you were buying the option with a tradepct of .75 and the bid/ask of an option is 1.00 x 1.10, then the price you would pay for the option is 1.075 ( 1.00 + (1.10 - 1.00) * .75). If you were selling the option, it would be 1.025 (1.10 - (1.10 - 1.00) * .75). The formula for the option entry price is bid + (ask - bid) * tradepct if you were buying and ask - (ask - bid) * tradepct if you were selling.
dte no off Days to expiration. For example it will search options that have days to expiration between and including 20 to 55.
absdelta no off Absolute value of a delta of an option. For example, it would search options that have absolute value of a delta between and including .20 and .40.
fcstratio no off ORATS price forecast of an option divided by the current option trade entry price. For example it would search options that have fcstratio between and including 1 to 4.
yldpct no off Yield Percentage is (option entry price / stockprice) * 100. For example it would search options that have yldpct between and including 5 to 10.
optbid no off Current Option bid price. For example it would search options that have a bid price between and including .40 to 1.20.
optask no off Current Option ask price. For example it would search options that have a ask price between and including .40 to 1.20.
optpx no off Current Option entry price. For example it would search options that have a option trade price between and including .40 to 1.20.
ibidvol no off Implied Bid Volatility. For example it would search options that have ibidvol between and including 15 to 80.
iaskvol no off Implied Ask Volatility. For example it would search options that have iaskvol between and including 20 to 85.
mktwidthpct no off Market Width Percentage ((optAsk - optBid) / strike). For example it would search options that have mktwidthpct between and including .004 to .01.
ddeltaprice no off Dollar delta price (stockpx * absdelta / optpx). For example it would search options that have ddeltaprice between and including 40 to 100.
stockpct no off Stock Percentage (strike / stockpx). For example it would search options that have stockpct between and including .9 to 1.25.

Example of Leg Relationship JSON formatted POST data

relation={"leg1leg2":{"strikewidth":"-40,-30","deltatotal":"-.07,.07","dteDiff":"0,0"}}

Leg Relationship (JSON Format)

Parameter Required Default Description
strikewidth no off Width between 2 strikes of your spread trade. For example above, it would search for trades that have leg1 strike - leg2 strike between and including -40,-30.
deltatotal no off Total delta between 2 legs of your spread trade. For example above, it would search for trades that have leg1 delta + leg2 delta between and including -.07,.07.
dtediff no off Days to expiration between 2 legs of your spread trade. For example above, it would search for trades that have leg1 dte - leg2 dte between and including 0,0. Which means leg1 and leg2 would have the same expiration.

Example of Spread Total JSON formatted POST data

spread={"price":"1.00,1.50","delta":".30,.60"}

Spread total (JSON Format)

Parameter Required Default Description
price no off Total price of the spread. For example, it would search for spread price between and including 1.00 to 1.50.
delta no off Total delta of the spread. For example, it would search for spread delta between and including .30 to .60.

Example of Exit JSON formatted POST data

exits={"quantity":"100","numofresults":"5","trades_per_symbol":"5","exit_days":"expire","stk_commish":"0.01","opt_commish":"1"}

Spread total (JSON Format)

Parameter Required Default Description
quantity yes n/a Number of contracts to trade.
numofresults yes n/a Number of results per day.
trades_per_symbol yes n/a Number of option trades per stock symbol.
exit_days yes n/a Number of days to exit the trade. If set to expire, it will exit at expiration unless any of the exit filters are triggered.
exit_optpx_pct no off Exit price / Entry price. Exit if this value is outside of the range. For example, if exit_optpx_pct is set to .10,1.20, it will exit the trade if exit price / entry price is below .10 or above 1.20.
exit_optpx no off Exit Price. Exit if this value is outside of the range. For example, if exit_optpx is set to .05,.80, it will exit the trade if exit price is below .05 or above .80.
exit_absdelta no off Absolute Delta. Exit if this value is outside of the range. For example, if exit_absdelta is set to .10,.40, it will exit the trade if absolute delta is below .10 or above .40.
exit_fcstratio no off Forecast price / exit option price. Exit if this value is outside of the range. For example, if exit_fcstratio is set to off,1.00, it will exit the trade if forecast ratio is above 1.00.
exit_rippct no off Exit price / rip value. Exit if this value is outside of the range. For example, if exit_rippct is set to .10,1.20, it will exit the trade if rippct is below .10 or above 1.20.
stk_commish no .01 Stock commission per share.
opt_commish no 1.00 Option commission per contract.

Output Fields

Parameter Description
date Trade date.
leg Leg number of the trade.
ticker Underlying Symbol.
ratio Ratio of the trade. Positive number is a buy and negative number is a sell.
quantity Number of contract traded.
optionType Call or Put.
expirDate Option expiration date.
year Year of the option expiration.
month Month of the option expiration.
day Day of the option expiration.
strike Strike of the option.
dte Days to expiration.
stockPx Stock Price of option trade entry.
optBid Option bid price.
optAsk Option ask price.
tradeOptPx Option entry trade price.
iVolBid Implied Volatility Bid.
iVolAsk Implied Volatility Ask.
tradeVol Option Trade volatility.
theovol Theoretical volatility.
fcstRatio Forecast Ratio (Forecast option price / tradeOptPx)
delta Delta of the option.
gamma Gamma of the option.
vega Vega of the option.
exitDate Exit Date of the trade.
exitStockPx Exit Stock price of the trade.
exitOptionPx Exit Option price of the trade.
stockProfit Profit from stock hedge.
optionProfit Option profit.
optionCommission Total option commissions.
stockCommission Total stock commissions.
interest Interest received or paid from the trade.
dividend Dividend received or paid from the trade.
totalProfit Total profit from the trade.
Last columns Option market information for the life of the option.

Custom Backtest

You can create a custom and advanced backtest by emailing a CSV file to backtest@orats.com.

Backtest Results

After you email the backtest input CSV file to backtest@orats.com, a download link of the results will be emailed to the user’s email address that was entered in the input CSV file.

Types of Backtests

Type Description
Basic Single Leg backtest with no exit strategy.
Standard Same as Basic with exit strategy and signal entry & exit dates.
Standard-Multileg Same as Standard but can do multi-leg strategies.
Advanced Same as Standard with component symbols, weightings, signals, and hedging.
Advanced-Multileg Same as Advanced but can do multi-leg strategies.

Strategy

Strategy
LongCall
LongPut
ShortCall
ShortPut
LongCallSpread
LongPutSpread
ShortCallSpread
ShortPutSpread
LongStraddle
ShortStraddle
LongStrangle
ShortStrangle
LongCallCalendar
LongPutCalendar
ShortCallCalendar
ShortPutCalendar
LongCallButterfly
LongPutButterfly
ShortCallButterfly
ShortPutButterfly
IronCondor
Custom

CSV Headers

Parameter Description
Email User’s email to receive backtest results.
BacktestType Type of backtest to run. (ie Basic, Standard, Standard-Multileg, Advanced, etc.)
StrategyName Name of the strategy. (ie LongCall, LongPut, ShortStrangle, etc.)
StartDate Date to start the backtest. (Earliest date is 1/1/2007).
EndDate Date to end the backtest. Latest date is the last full month. (If today was 12/3/2016, then the lastest full month is Novemeber so you will use 11/30/2016).
EntryDays Enter trades every X amount of days. (ie. Enter trades every 5 days).
Leg The leg number of the multi-leg strategy. Enter none if it is a single leg strategy.
Ratio The ratio of the multi-leg strategy. (ie. -1 for short one contract or 1 for long one contract).
OptionType Put or call.
DTE Days to expiration trade entry target. (ie. 30)
DTEMin Days to expiration trade entry minimum.
DTEMax Days to expiration trade entry maximum.
AbsDelta Absolute delta trade entry target. (ie .15)
AbsDeltaMin Absolute delta trade entry minimum.
AbsDeltaMax Absolute delta trade entry maximum.
ReEnterAbsDelta If you have a delta exit strategy, you can re-enter a trade at this delta when the ExitLeg1DeltaMax is triggered. (ie .25)
ReEnterAbsDeltaMin Re-enter absolute delta trade entry minimum.
ReEnterAbsDeltaMax Re-enter absolute delta trade entry maximum.
StockOTMPct Strike / Stock Price = StockOTMPct. If you want a 5% OTM strike call option, you would enter 1.05. If you want a 5% OTM put option, you would enter .95.
StockOTMPctMin Option out of the money % trade entry minimum.
StockOTMPctMax Option out of the money % trade entry maximum.
ReEnterStockOTMPct If you have a StockOTMPct exit strategy, you can re-enter a trade at this OTM % when the ExitLeg1OTMPctMax is triggered. (ie .25)
ReEnterStockOTMPctMin Re-enter out of the money % minimum.
ReEnterStockOTMPctMax Re-enter out of the money % maximum.
IVRank Implied Volitility Rank. (Entering 50 means enter trade if IVRank is over 50).
SpreadPx Spread price entry target. (1.50 will enter the spread trade closest to 1.50).
SpreadPxMin Spread price entry minimum.
SpreadPxMax Spread price entry maximum.
SpreadDelta Spread delta entry target.
SpreadDeltaMin Spread delta entry minimum.
SpreadDeltaMax Spread delta entry maximum.
SpreadYieldPctMin Spread price / stock price = SpreadYield. Enter the entry trade minimum.
SpreadYieldPctMax Spread price / stock price = SpreadYield. Enter the entry trade maximum.
ExitDTEDays Exit the trade on Days To Expiration left or at Expiration. (ie. expire, 10, 5, etc.)
ExitHoldDays Exit the trade after holding X amount of days.
ExitProfitLossPctMin Exit the trade below % loss min. (ie. -.10, -.30, etc.)
ExitProfitLossPctMax Exit the trade above % profit max. (ie. .10, .30, 1.20, etc.)
ExitLeg1DeltaMin Exit the trade if Leg1’s delta falls below ExitLeg1DeltaMin. (ie. .05)
ExitLeg1DeltaMax Exit the trade if Leg1’s delta rises above ExitLeg1DeltaMax. (ie. .70). You can re-enter the trade using a different intial delta using ReEnterAbsDelta.
ExitLeg1OTMPctMin Exit the trade if Leg1’s out of money % falls below ExitLeg1OTMPctMin. (ie. .95)
ExitLeg1OTMPctMax Exit the trade if Leg1’s out of money % rises above ExitLeg1OTMPctMax. (ie. 1.15)
ExitSpreadDeltaMin Exit the trade if the spread’s total delta falls below ExitSpreadDeltaMin. (ie. .05)
ExitSpreadDeltaMax Exit the trade if the spread’s total delta rises above ExitSpreadDeltaMax. (ie. .75)
ExitSpreadPxMin Exit the trade if the spread’s price falls below ExitSpreadPxMin. (ie. .50)
ExitSpreadPxMax Exit the trade if the spread’s price rises above ExitSpreadPxMax. (ie. 4.00)
HedgeDays If the strategy is hedged with stock, use this parameter to delta hedge every X amount of days.
HedgeDeltaToleranceMin If the strategy is hedged with stock, use this parameter to delta hedge if position delta falls below the tolerance min.
HedgeDeltaToleranceMax If the strategy is hedged with stock, use this parameter to delta hedge if position delta rises above the tolerance max.
Symbol List of underlying symbols to backtest.
Weightings List of weightings next to list of symbols for weighted backtest. (No symbol permutations but each symbol is mapped with the weightings).
SignalSymbol List of underlying symbols with entry and exit dates. Only use this if you have entry and exit date signals.
SignalEntryDate List of entry dates mapped to SignalSymbol.
SignalExitDate List of exit dates mapped to SignalEntryDate.
ComponentSymbol Enter 1 component symbol to test out component strategy. For example, OEF is an index with 100 symbols in the basket. Enter OEF in the ComponentSymbol and list the individual basket of symbols in the Symbol column.
ComponentDate If you have your own custom component stock, you can enter the daily date and returns. The backtester will combine these returns with the Symbols list.
ComponentReturns If you have your own custom component stock, you can enter the daily date and returns. The backtester will combine these returns with the Symbols list.

Backtest CSV Examples

Type # of permutations Description Templates
Basic 1 SPY Short Call 30 DTE and 2% OTM Download
Basic 1 TLT Short Call 45 DTE, 30 delta, and 50 IVRank Download
Basic 5 Multiple symbols Short Call 30 DTE and 2% OTM Download
Basic 45 Multiple Short Call 30, 45, 60 DTE and 2%, 5%, 7.5% OTM Download
Standard 1 SPY Short Call 30 DTE and 30 Delta with -75% stop loss and 50% max profit. Download
Standard 324 SPY, IWM, TLT Short Call 30, 45, 60 DTE and 20, 30, 40, 45 Delta with 5-60, 5-70, 5-80 delta exit or none-30%, none-40%, none-50% Profit exit. Download
Standard-Multileg 1 SPY Short Strangle 45 DTE and 30 Delta with 50% Profit exit. Download
Standard-Multileg 20 Multiple symbols Short Strangle 45 DTE and 30 Delta with none, 20%, 35%, 50%, 75% Profit exit. Download
Advanced 6 Short Call 30, 60, 90 DTE and 25, 35 delta with weightings Download
Advanced 12 AAPL and MSFT Short Call 30, 60, 90 DTE and 25, 35 delta with signals Download
Advanced 6 AAPL and MSFT Short Call 30, 60, 90 DTE and 25, 35 delta with weightings and signals (Notice if you enter weightings, AAPL and MSFT returns are combined.) Download
Advanced-Multileg 2 AAPL and MSFT Iron Condor 45 DTE, 30 short delta, 15 long delta with 50 IVRank, 1.80 min spread price entry, and 50% max profit exit.) Download
Advanced-Multileg 1 AAPL and MSFT Iron Condor 45 DTE, 30 short delta, 15 long delta, 50 IVRank, 1.80 min spread price entry, and 50% max profit exit with weightings and signals) Download