You are on page 1of 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/
RYKbvLqfKirkbafd1XOqJELenPBKr4Y+FAgbqei34v6NKmWyp1RWvhDhh2jrLXAela7ZdmyrHShEPCaVopV
Dul8R91B2SbFshwrUsS7yKn5+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"

---------------------------------------FOR ADDITION OF STOCK REFERE BELOW


QUERRY---------------------------------

let symbol = () =>

let
// Here we take the content of the cell named "Date" in current workbook
Source = Excel.CurrentWorkbook(){[name="SYMBOL"]}[Content] ,
// Result is returned as the table with one row, convert it to text type
ChangeTypeToText = Table.TransformColumnTypes(Source,{{"Column1", type text}}) ,
TakeDataValue = ChangeTypeToText{0}[Column1]
in
TakeDataValue
in symbol

https://www.youtube.com/channel/UCyE6M1F_KQeuGj1ien9N1tw/playlists

You might also like