0% found this document useful (0 votes)
48 views

Power Query Keval

This document retrieves options chain data from a URL, extracts the records field from the JSON response, and converts it to a table with expanded columns for strikePrice, expiryDate, CE (call option) and PE (put option) fields.

Uploaded by

Bishnu Pokhrel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Power Query Keval

This document retrieves options chain data from a URL, extracts the records field from the JSON response, and converts it to a table with expanded columns for strikePrice, expiryDate, CE (call option) and PE (put option) fields.

Uploaded by

Bishnu Pokhrel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

let cookies=()=>

in
cookies

let
Source = Json.Document(Web.Contents("https://www.nseindia.com/api/option-chain-
indices?symbol=NIFTY", [Headers=[#"Accept-Encoding"="gzip, deflate", #"Accept-
Language"="en-US,en", #"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
OPR/68.0.3618.206",
Cookie="8A87B46ABA4CAFF3B69F913708597828~xM8YKIspOw4k2OTekhqVI8Ft8AHi/RYKbvLqfKirkb
afd1XOqJELenPBKr4Y+FAgbqei34v6NKmWyp1RWvhDhh2jrLXAela7ZdmyrHShEPCaVopVDul8R91B2SbFs
hwrUsS7yKn5+cmpmaF25zGeiAjHTfTMnii7F2E1slCnkEo="]])),
records = Source[records],
data = records[data],
#"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null,
null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table",
"Column1", {"strikePrice", "expiryDate", "CE", "PE"}, {"strikePrice", "expiryDate",
"CE", "PE"})
in
#"Expanded Column1"

You might also like