New Options Backtester
Search, filter, and sort 65,769,505 backtests

Data API

Monday, August 19th 2019

Beginners Guide to the ORATS Data API

Access the ORATS Data API buy using curl with these instructions for beginners.

Summary

This beginner's guide to the ORATS Data API explains how to use curl and a JSON converter to access data. After installing Git-GUI, obtain an API token and copy the curl request from the ORATS API documentation, replacing the token. Paste the JSON response into a conversion site to view the data.

I am not a programmer but I am able to get data from our Data API and view it. I will use curl and a JSON converter. Don't worry if you don't know what that means. The instructions below will walk you through.

I will be using curl which I think of as "see URL" or cURL.

In order to use curl you need to get an app called Git-GUI at https://git-scm.com

 

Download and install this and here's a help tutorial if you want https://youtu.be/B5t6i-2HWgw

Open the Git GUI:

And you will see this:

 

Next go to the ORATS API documentation and select a data source you want: I want to view our General Core data on AAPL. https://docs.orats.io/data-api-guide/data.html#general-core

You will see examples for how to pull this data in code and using curl.

 

 

Copy the curl request from that black part and paste into a notepad.

curl -H "Authorization: your-private-token" -L "https://api.orats.io/data/cores/general?tickers=AAPL"

Replace your-private-token above with your API token. If you don't have an ORATS API token, you can get yours by signing up for a free trial here: https://info.orats.com/free-trial (requires credit card).

 

 

Copy the curl request Ctrl-c from Notepad into Git-GUI with Shift-Insert.

curl -H "Authorization: 1111111111" -L "https://api.orats.io/data/cores/general?tickers=AAPL"

If you press enter with the token 11111111 you will get an access denied.

If you use your valid token you will get a JSON response as below.

 

In Git-GUI, highlight just the JSON from the first { to the last } (circled in red) and copy using Ctrl-Insert.

Here's the payload you just copied or you can copy this. Now paste this into the site below:

 

{"data":[{"ticker":"AAPL","tradeDate":"2019-08-19","assetType":3,"priorCls":202.25,"pxAtmIv":206.71,"mktCap":934160,"cVolu":288771,"cOi":1790959,"pVolu":253305,"pOi":1731485,"orFcst20d":32.166,"orIvFcst20d":35.053,"orFcstInf":25.974,"orIvXern20d":26.7,"orIvXernInf":22.64,"iv200Ma":24.99,"atmIvM1":31.866,"atmFitIvM1":26.162,"atmFcstIvM1":30.381,"dtExM1":1,"atmIvM2":26.385,"atmFitIvM2":26.629,"atmFcstIvM2":29.409,"dtExM2":36,"atmIvM3":26.955,"atmFitIvM3":26.04,"atmFcstIvM3":28.55,"dtExM3":64,"atmIvM4":28.774,"atmFitIvM4":28.184,"atmFcstIvM4":28.914,"dtExM4":92,"iRate5wk":1.98,"iRateLt":1.7,"px1kGam":5636.25,"volOfVol":0.0675,"volOfIvol":0.0508,"slope":4.01243,"slopeInf":3.57841,"slopeFcst":3.94528,"slopeFcstInf":3.35074,"deriv":0.0645,"derivInf":0.0545,"derivFcst":0.0532,"derivFcstInf":0.0505,"mktWidthVol":0.473,"mktWidthVolInf":0.621,"cAddPrem":0,"pAddPrem":0,"rip":3.41203,"ivEarnReturn":0,"fcstR2":0.3619,"fcstR2Imp":0.3088,"hiHedge":0,"loHedge":0,"stkVolu":31137610,"avgOptVolu20d":554233.9,"sector":"XLK Electronic Computer Manufacturing42941","orHv1d":25.11,"orHv5d":37.25,"orHv10d":36.29,"orHv20d":32.46,"orHv60d":25.23,"orHv90d":25.73,"orHv120d":24.97,"orHv252d":29.53,"orHv500d":25.88,"orHv1000d":23.97,"clsHv5d":38.69,"clsHv10d":41.57,"clsHv20d":33.59,"clsHv60d":25.31,"clsHv90d":27.07,"clsHv120d":25.5,"clsHv252d":31.58,"clsHv500d":27.07,"clsHv1000d":24.86,"iv20d":26.05,"iv30d":26.28,"iv60d":26.9,"iv90d":28.65,"iv6m":26.6,"clsPx1w":200.99,"stkPxChng1wk":0.63,"clsPx1m":203.35,"stkPxChng1m":-0.16,"clsPx6m":170.42,"stkPxChng6m":19.59,"clsPx1y":213.32,"stkPxChng1y":-3.72,"divFreq":4,"divYield":1.5,"divGrwth":0,"divDate":"2019-11-07","divAmt":0.77,"nextErn":"0000-00-00","nextErnTod":1630,"lastErn":"2019-07-30","lastErnTod":3,"absAvgErnMv":4.2544,"impliedIee":3.3625,"daysToNextErn":0,"tkOver":0,"etfIncl":"","bestEtf":"XLK","sectorName":"Technology Hardware & Equipment","correlSpy1m":0.97,"correlSpy1y":0.94,"correlEtf1m":0.97,"correlEtf1y":0.96,"beta1m":1.36,"beta1y":1.51,"ivPctile1m":62,"ivPctile1y":69,"ivPctileSpy":11,"ivPctileEtf":26,"ivStdvMean":0.58,"ivStdv1y":4.8,"ivSpyRatio":1.6,"ivSpyRatioAvg1m":1.82,"ivSpyRatioAvg1y":1.96,"ivSpyRatioStdv1y":7.21,"ivEtfRatio":1.23,"ivEtfRatioAvg1m":1.33,"ivEtfRatioAvg1y":1.45,"ivEtFratioStdv1y":6.07,"ivHvXernRatio":0.82,"ivHvXernRatio1m":1.33,"ivHvXernRatio1y":1.07,"ivHvXernRatioStdv1y":2.94,"etfIvHvXernRatio":0.92,"etfIvHvXernRatio1m":0.92,"etfIvHvXernRatio1y":0.95,"etfIvHvXernRatioStdv1y":0.05,"slopepctile":89.68,"slopeavg1m":3.75,"slopeavg1y":2.88,"slopeStdv1y":0.8,"etfSlopeRatio":0.58,"etfSlopeRatioAvg1m":0.54,"etfSlopeRatioAvg1y":0.41,"etfSlopeRatioAvgStdv1y":0.11,"impliedR2":0.4987,"contango":-0.018986848590429872,"nextDiv":0.77,"impliedNextDiv":0.341692,"annActDiv":3.13561,"annIdiv":1.65634,"borrow30":1.387911755591631,"borrow2yr":1.0742590762674809,"error":0.012439525744412094,"confidence":97.45339751243591,"updatedAt":"2019-08-17 03:30:20"}]}

Now go to this JSON conversion site like: https://konklone.io/json/ and paste Ctrl-v into the top.

 

You should see the JSON payload be converted to a row of headers and data.

Did this work? Let us know by sending an email to Mike here.

More on the ORATS Data API here.

Contact Us
Curious about enterprise pricing? Want to become an affiliate? Questions about our data? Let us know.
Your email
Your message
Submit
ORATSORATS
Institutional Quality Tools for All Options Traders
(312) 986 - 1060
support@orats.com
36 Maplewood Ave, Portsmouth, NH 03801
Trading Tools
APIs
Historical Data
More Information