Files
OpenBB/website/content/terminal/reference/stocks/options/hist.md
DidierRLopes 4ad995fdd0 Docs/terminalpro and improvement (#5622)
* add first iteration of content for Terminal Pro

* Update index.md

* Update dashboards.md

* Update folders.md

* Update grouping.md

* Update report.md

* Update templates.md

* Update quick-start.md

* Update index.md

* Update index.md

* Update home.md

* Update news.md

* Update index.md

* Update index.md

* Update index.md

* Update data-provider.md

* Update chat-with-widget.md

* Update data-manipulation.md

* Update forecasting.md

* fix: images self closing tags

* fix: only pro visitors can see pro

* inter font

* improve SEO content and restructuring

* add new package for toggle on tutorials

* move folder around

* improve main page of each prod

* small updates and improvements

* fix logo above

* small improvement in headtitle for portfolio funcs

* fix typos from OpenAI's GPT-4

* fix _category_ json

* remove generic SEO words

* add script that generates SEO for documentation

* add missing file

* remove sdk warning message

* fix links for andrew

---------

Co-authored-by: jose-donato <zmcdonato@gmail.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
2023-10-30 21:01:29 +00:00

125 lines
18 KiB
Markdown
Vendored

---
title: hist
description: The page provides a method to get historical quotes for the provided
option chain using Python. It details the usage and parameters required, including
the strike price, put option flag, and OCC option symbol. Example code and output
are provided.
keywords:
- historical quotes
- option chain
- strike price
- put option
- OCC option symbol
- code example
---
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
<HeadTitle title="stocks/options/hist - Reference | OpenBB Terminal Docs" />
Gets historical quotes for given option chain
### Usage
```python
hist -s STRIKE [-p] [-c CHAIN_ID]
```
---
## Parameters
| Name | Description | Default | Optional | Choices |
| ---- | ----------- | ------- | -------- | ------- |
| strike | Strike price to look at | None | False | None |
| put | Flag for showing put option | False | True | None |
| chain_id | OCC option symbol | None | True | None |
---
## Examples
```python
2022 Feb 16, 09:07 (🦋) /stocks/options/ $ hist -s 3300 -p
AMZN raw data
┏━━━━┳━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ ┃ Date ┃ Open ┃ High ┃ Low ┃ Close ┃ Change ┃ Volume ┃ Open Interest ┃ Change Since ┃
┡━━━━╇━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ 0 │ 2022-02-11 │ 327.53 │ 386.93 │ 327.53 │ 386.93 │ 0.26 │ 6.00 │ 98.00 │ 0.00 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 1 │ 2022-02-10 │ 313.51 │ 313.51 │ 297.92 │ 307.95 │ 0.05 │ 6.00 │ 97.00 │ 0.26 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 2 │ 2022-02-09 │ 272.93 │ 292.00 │ 272.00 │ 292.00 │ 0.02 │ 7.00 │ 96.00 │ 0.33 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 3 │ 2022-02-08 │ 321.15 │ 321.15 │ 287.15 │ 287.15 │ -0.10 │ 17.00 │ 96.00 │ 0.35 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 4 │ 2022-02-07 │ 292.28 │ 319.55 │ 292.28 │ 319.55 │ 0.02 │ 7.00 │ 106.00 │ 0.21 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 5 │ 2022-02-04 │ 395.34 │ 395.34 │ 311.87 │ 311.90 │ -0.48 │ 14.00 │ 104.00 │ 0.24 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 6 │ 2022-02-03 │ 601.59 │ 601.59 │ 599.94 │ 599.94 │ 0.15 │ 2.00 │ 104.00 │ -0.36 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 7 │ 2022-01-27 │ 527.86 │ 527.93 │ 513.45 │ 520.77 │ -0.13 │ 62.00 │ 103.00 │ -0.26 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 8 │ 2022-01-25 │ 574.01 │ 598.50 │ 574.01 │ 598.50 │ 0.01 │ 5.00 │ 103.00 │ -0.35 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 9 │ 2022-01-24 │ 572.19 │ 617.00 │ 572.19 │ 593.00 │ 0.12 │ 8.00 │ 107.00 │ -0.35 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 10 │ 2022-01-21 │ 446.38 │ 532.21 │ 446.38 │ 531.03 │ 0.36 │ 16.00 │ 106.00 │ -0.27 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 11 │ 2022-01-20 │ 333.40 │ 389.75 │ 332.17 │ 389.75 │ 0.23 │ 13.00 │ 103.00 │ -0.01 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 12 │ 2022-01-19 │ 325.00 │ 325.00 │ 316.58 │ 316.58 │ -0.03 │ 11.00 │ 97.00 │ 0.22 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 13 │ 2022-01-18 │ 319.90 │ 325.00 │ 314.90 │ 325.00 │ 0.05 │ 5.00 │ 96.00 │ 0.19 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 14 │ 2022-01-14 │ 295.10 │ 310.09 │ 295.10 │ 310.09 │ 0.07 │ 2.00 │ 95.00 │ 0.25 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 15 │ 2022-01-13 │ 260.17 │ 290.68 │ 260.12 │ 290.68 │ 0.14 │ 38.00 │ 95.00 │ 0.33 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 16 │ 2022-01-12 │ 255.55 │ 255.55 │ 254.00 │ 254.00 │ -0.02 │ 3.00 │ 113.00 │ 0.52 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 17 │ 2022-01-11 │ 282.10 │ 282.10 │ 253.15 │ 258.89 │ -0.22 │ 28.00 │ 114.00 │ 0.49 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 18 │ 2022-01-10 │ 357.10 │ 365.85 │ 333.90 │ 333.90 │ 0.15 │ 8.00 │ 97.00 │ 0.16 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 19 │ 2022-01-07 │ 290.40 │ 290.40 │ 290.40 │ 290.40 │ 0.23 │ 41.00 │ 98.00 │ 0.33 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 20 │ 2022-01-04 │ 237.00 │ 237.00 │ 237.00 │ 237.00 │ -0.01 │ 1.00 │ 77.00 │ 0.63 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 21 │ 2021-12-28 │ 238.50 │ 238.50 │ 238.50 │ 238.50 │ 0.05 │ 1.00 │ 75.00 │ 0.62 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 22 │ 2021-12-23 │ 228.00 │ 228.00 │ 228.00 │ 228.00 │ -0.09 │ 1.00 │ 82.00 │ 0.70 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 23 │ 2021-12-21 │ 250.00 │ 250.00 │ 250.00 │ 250.00 │ -0.13 │ 1.00 │ 82.00 │ 0.55 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 24 │ 2021-12-20 │ 290.00 │ 297.00 │ 283.50 │ 289.00 │ 0.11 │ 17.00 │ 82.00 │ 0.34 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 25 │ 2021-12-17 │ 262.80 │ 262.80 │ 260.24 │ 260.51 │ 0.02 │ 7.00 │ 82.00 │ 0.49 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 26 │ 2021-12-16 │ 250.04 │ 256.42 │ 250.04 │ 256.42 │ 0.12 │ 3.00 │ 80.00 │ 0.51 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 27 │ 2021-12-15 │ 282.10 │ 288.62 │ 229.73 │ 229.73 │ -0.06 │ 16.00 │ 77.00 │ 0.68 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 28 │ 2021-12-13 │ 245.50 │ 245.50 │ 245.50 │ 245.50 │ 0.01 │ 1.00 │ 63.00 │ 0.58 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 29 │ 2021-12-10 │ 243.42 │ 243.42 │ 243.42 │ 243.42 │ 0.08 │ 2.00 │ 63.00 │ 0.59 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 30 │ 2021-12-07 │ 234.85 │ 234.85 │ 224.38 │ 224.45 │ -0.15 │ 3.00 │ 61.00 │ 0.72 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 31 │ 2021-12-06 │ 283.15 │ 285.20 │ 263.81 │ 263.81 │ -0.08 │ 14.00 │ 45.00 │ 0.47 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 32 │ 2021-12-03 │ 290.59 │ 293.03 │ 286.41 │ 286.81 │ 0.16 │ 20.00 │ 45.00 │ 0.35 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 33 │ 2021-11-30 │ 225.00 │ 246.50 │ 225.00 │ 246.50 │ 0.10 │ 3.00 │ 25.00 │ 0.57 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 34 │ 2021-11-23 │ 224.00 │ 224.00 │ 224.00 │ 224.00 │ 0.12 │ 1.00 │ 24.00 │ 0.73 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 35 │ 2021-11-22 │ 177.26 │ 200.50 │ 177.26 │ 200.50 │ 0.15 │ 2.00 │ 23.00 │ 0.93 │
├────┼────────────┼────────┼────────┼────────┼────────┼────────┼────────┼───────────────┼──────────────┤
│ 36 │ 2021-11-19 │ 169.00 │ 174.20 │ 169.00 │ 174.20 │ 0.00 │ 22.00 │ 22.00 │ 1.22 │
└────┴────────────┴────────┴────────┴────────┴────────┴────────┴────────┴───────────────┴──────────────┘
```
---