# What are the alice blue api's to extract option greeks and option chain data

**URL:** <https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732>\
**Category:** API\
**Created:** [March 30, 2023, 1:30pm UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732 "2023-03-30T13:30:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dalwinder\_Singh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/dalwinder_singh/32/349_2.png) [@Dalwinder\_Singh](https://community.aliceblueonline.com/u/Dalwinder_Singh)\
**Post date:** [March 30, 2023, 1:30pm UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/1 "2023-03-30T13:30:37Z")

</div>

what are api to extract option greeks and option chain data

i have checked pya3, i dont see any api there

could you help with some basic example?

---

<div class="post-metadata">

**Author:** ![nandagopal](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nandagopal](https://community.aliceblueonline.com/u/nandagopal)\
**Post date:** [March 31, 2023, 4:52am UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/2 "2023-03-31T04:52:44Z")

</div>

Kindy find the below GitHub link for the option greeks API

> **[GitHub - Aliceblueofficial/ONLYOPTION: ONLY OPTION CHAIN ALICE BLUE](https://github.com/Aliceblueofficial/ONLYOPTION)**
>
> ONLY OPTION CHAIN ALICE BLUE . Contribute to Aliceblueofficial/ONLYOPTION development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Dalwinder\_Singh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/dalwinder_singh/32/349_2.png) [@Dalwinder\_Singh](https://community.aliceblueonline.com/u/Dalwinder_Singh)\
**Post date:** [April 1, 2023, 11:38am UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/3 "2023-04-01T11:38:45Z")

</div>

getting following error

{“type”:“[https://tools.ietf.org/html/rfc7231#section-6.5.1",“title”:"One](https://tools.ietf.org/html/rfc7231#section-6.5.1%22,%22title%22:%22One) or more validation errors occurred.”,“status”:400,“traceId”:“00-350c5d96278528eb17d3844cded5a314-a209a2c2225a650a-00”,“errors”:{“$.token”:[“The JSON value could not be converted to System.String. Path: $.token | LineNumber: 0 | BytePositionInLine: 35.”]}}

my code is

from pya3 import \*  
from Optionchain import \*  
alice = Aliceblue(user\_id=username, api\_key=app\_code)

Optionchainlogin(  
user\_id=alice.user\_id,  
session\_id=alice.get\_session\_id())

any idea ?

---

<div class="post-metadata">

**Author:** ![nandagopal](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nandagopal](https://community.aliceblueonline.com/u/nandagopal)\
**Post date:** [April 1, 2023, 12:36pm UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/4 "2023-04-01T12:36:05Z")

</div>

The session\_ID need to be converted to a string from json, By storing the value in a variable from there you can try to fetch the option chain, have a try in this way.

---

<div class="post-metadata">

**Author:** ![Dalwinder\_Singh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/dalwinder_singh/32/349_2.png) [@Dalwinder\_Singh](https://community.aliceblueonline.com/u/Dalwinder_Singh)\
**Post date:** [April 1, 2023, 3:50pm UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/5 "2023-04-01T15:50:52Z")

</div>

It worked, thanks

But currently it is extracting data for only nifty

How i can extract data for other stock options

And bank nifty?

And let me know if i can contribute to the coding of it.

Regards  
Dalwinder singh

---

<div class="post-metadata">

**Author:** ![nandagopal](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nandagopal](https://community.aliceblueonline.com/u/nandagopal)\
**Post date:** [April 12, 2023, 4:34am UTC](https://community.aliceblueonline.com/t/what-are-the-alice-blue-apis-to-extract-option-greeks-and-option-chain-data/732/6 "2023-04-12T04:34:45Z")

</div>

kindly the change the name value in the function called.
