---
title: stockPrice()
slug: stockprice
docTags: 
createdAt: 2021-09-14T17:49:42.000Z
---

Given a `Date`, returns the value of shares on that date.

### Syntax

`stockPrice([date][, symbol])`

- `date` - (optional) the date of the returned stock price
- `symbol` - (optional) the ticker symbol of the stock
- **Return type:** [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)&#x20;

### Sample usage

`stockPrice('2019-01-01')` returns the value of the stock price on 01/01/2019.

### Supported data types

| **Input type**                            | **Return type**                         | **Logic**                                                                 |
| ----------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------- |
| ****[Date](docId\:xTAQdzvLBTAKjxRnpFwe9)  | [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)  | If a Date value is passed, the stock price on that date will be returned. |
| *Unsupported data types*                  | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                                     |

