Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
torreyleonard committed Mar 1, 2019
1 parent c49a248 commit 025cff8
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 37 deletions.
52 changes: 52 additions & 0 deletions docs/DATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Further documentation can be found here: https://www.alphavantage.co/documentati
* [.rsi(symbol, interval, timePeriod, seriesType)](#AlphaVantage+rsi) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.stochRSI(symbol, interval, timePeriod, seriesType, fastKPeriod, fastDPeriod, fastDmaType)](#AlphaVantage+stochRSI) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.bbands(symbol, interval, timePeriod, seriesType, nbdevup, nbdevdn, matype)](#AlphaVantage+bbands) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.minus_di(symbol, interval, timePeriod)](#AlphaVantage+minus_di) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.plus_di(symbol, interval, timePeriod)](#AlphaVantage+plus_di) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.adx(symbol, interval, timePeriod)](#AlphaVantage+adx) ⇒ <code>Promise.&lt;Array&gt;</code>

<a name="new_AlphaVantage_new"></a>

Expand Down Expand Up @@ -402,6 +405,48 @@ https://www.investopedia.com/articles/technical/04/030304.asp
| nbdevdn | <code>Number</code> \| <code>Null</code> | The standard deviation multiplier of the lower band. Positive integers are accepted. By default, nbdevdn=2. |
| matype | <code>Number</code> \| <code>Null</code> | Moving average type of the time series. By default, matype=0. Integers 0 - 8 are accepted with the following mappings. 0 = Simple Moving Average (SMA), 1 = Exponential Moving Average (EMA), 2 = Weighted Moving Average (WMA), 3 = Double Exponential Moving Average (DEMA), 4 = Triple Exponential Moving Average (TEMA), 5 = Triangular Moving Average (TRIMA), 6 = T3 Moving Average, 7 = Kaufman Adaptive Moving Average (KAMA), 8 = MESA Adaptive Moving Average (MAMA). |

<a name="AlphaVantage+minus_di"></a>

### alphaVantage.minus\_di(symbol, interval, timePeriod) ⇒ <code>Promise.&lt;Array&gt;</code>
This API returns the minus directional indicator (MINUS_DI) values
http://www.investopedia.com/articles/technical/02/050602.asp

**Kind**: instance method of [<code>AlphaVantage</code>](#AlphaVantage)

| Param | Type | Description |
| --- | --- | --- |
| symbol | <code>String</code> | |
| interval | <code>String</code> | Time between two data points in the series: 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly |
| timePeriod | <code>Number</code> | Number of data points used to calculate each moving average value. Positive integers are accepted. |

<a name="AlphaVantage+plus_di"></a>

### alphaVantage.plus\_di(symbol, interval, timePeriod) ⇒ <code>Promise.&lt;Array&gt;</code>
This API returns the plus directional indicator (PLUS_DI) values
http://www.investopedia.com/articles/technical/02/050602.asp

**Kind**: instance method of [<code>AlphaVantage</code>](#AlphaVantage)

| Param | Type | Description |
| --- | --- | --- |
| symbol | <code>String</code> | |
| interval | <code>String</code> | Time between two data points in the series: 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly |
| timePeriod | <code>Number</code> | Number of data points used to calculate each moving average value. Positive integers are accepted. |

<a name="AlphaVantage+adx"></a>

### alphaVantage.adx(symbol, interval, timePeriod) ⇒ <code>Promise.&lt;Array&gt;</code>
This API returns the average directional movement index (ADX) values
http://www.investopedia.com/articles/trading/07/adx-trend-indicator.asp

**Kind**: instance method of [<code>AlphaVantage</code>](#AlphaVantage)

| Param | Type | Description |
| --- | --- | --- |
| symbol | <code>String</code> | |
| interval | <code>String</code> | Time between two data points in the series: 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly |
| timePeriod | <code>Number</code> | Number of data points used to calculate each ADX value. Positive integers are accepted |

<a name="IEX"></a>

## IEX
Expand All @@ -410,6 +455,7 @@ Used to interact with the IEX api. See the official documentation for more: http
**Kind**: global class

* [IEX](#IEX)
* [.getMarket()](#IEX.getMarket) ⇒ <code>Promise.&lt;Market&gt;</code>
* [.getQuote(symbol)](#IEX.getQuote) ⇒ <code>Promise.&lt;Quote&gt;</code>
* [.getBatchQuotes(symbolArray)](#IEX.getBatchQuotes) ⇒ <code>Promise.&lt;Array.&lt;Quote&gt;&gt;</code>
* [.getCompanyDetails(symbol)](#IEX.getCompanyDetails) ⇒ <code>Promise.&lt;Object&gt;</code>
Expand All @@ -424,6 +470,12 @@ Used to interact with the IEX api. See the official documentation for more: http
* [.getVolumeByVenue(symbol)](#IEX.getVolumeByVenue) ⇒ <code>Promise.&lt;Array.&lt;String&gt;&gt;</code>
* [.getAllSymbols()](#IEX.getAllSymbols) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>

<a name="IEX.getMarket"></a>

### IEX.getMarket() ⇒ <code>Promise.&lt;Market&gt;</code>
Returns a market object.

**Kind**: static method of [<code>IEX</code>](#IEX)
<a name="IEX.getQuote"></a>

### IEX.getQuote(symbol) ⇒ <code>Promise.&lt;Quote&gt;</code>
Expand Down
85 changes: 48 additions & 37 deletions docs/ROBINHOOD.md
Original file line number Diff line number Diff line change
Expand Up @@ -1222,14 +1222,15 @@ Represents the user that is logged in while accessing the Robinhood API.
* [User](#User)
* [new User(username, password)](#new_User_new)
* _instance_
* [.authenticate(password, mfaFunction)](#User+authenticate) ⇒ <code>Promise.&lt;Boolean&gt;</code>
* [.authenticate(password, mfaFunction)](#User+authenticate)[<code>Promise.&lt;User&gt;</code>](#User)
* [.reauthenticate()](#User+reauthenticate)[<code>Promise.&lt;User&gt;</code>](#User)
* [.logout()](#User+logout) ⇒ <code>Promise.&lt;Boolean&gt;</code>
* [.serialize()](#User+serialize) ⇒ <code>string</code>
* [.save()](#User+save) ⇒ <code>Promise.&lt;Boolean&gt;</code>
* [.serialize()](#User+serialize) ⇒ <code>String</code>
* [.isAuthenticated()](#User+isAuthenticated) ⇒ <code>Boolean</code>
* [.getAuthToken()](#User+getAuthToken) ⇒ <code>String</code> \| <code>Null</code>
* [.getAccountNumber()](#User+getAccountNumber) ⇒ <code>String</code> \| <code>Null</code>
* [.getUsername()](#User+getUsername) ⇒ <code>String</code> \| <code>Null</code>
* [.isAuthenticated()](#User+isAuthenticated) ⇒ <code>boolean</code>
* [.getAuthToken()](#User+getAuthToken) ⇒ <code>null</code> \| <code>string</code>
* [.getAccountNumber()](#User+getAccountNumber) ⇒ <code>null</code> \| <code>string</code>
* [.getUsername()](#User+getUsername) ⇒ <code>null</code> \| <code>string</code>
* [.getAccount()](#User+getAccount) ⇒ <code>Promise</code>
* [.getBalances()](#User+getBalances) ⇒ <code>Promise.&lt;Object&gt;</code>
* [.getBuyingPower()](#User+getBuyingPower) ⇒ <code>Promise</code>
Expand All @@ -1250,8 +1251,9 @@ Represents the user that is logged in while accessing the Robinhood API.
* [.getDocuments()](#User+getDocuments) ⇒ <code>Promise.&lt;Array&gt;</code>
* [.downloadDocuments(folder)](#User+downloadDocuments) ⇒ <code>Promise</code>
* _static_
* [.deserialize(data)](#User.deserialize)[<code>Promise.&lt;User&gt;</code>](#User)
* [.load()](#User.load)[<code>Promise.&lt;User&gt;</code>](#User)
* [.deserialize()](#User.deserialize)[<code>Promise.&lt;User&gt;</code>](#User)
* [.isUser(object)](#User.isUser) ⇒ <code>boolean</code>

<a name="new_User_new"></a>

Expand All @@ -1266,7 +1268,7 @@ Creates a new User object.

<a name="User+authenticate"></a>

### user.authenticate(password, mfaFunction) ⇒ <code>Promise.&lt;Object&gt;</code>
### user.authenticate(password, mfaFunction) ⇒ [<code>Promise.&lt;User&gt;</code>](#User)
Authenticates a user using the inputted username and password.

**Kind**: instance method of [<code>User</code>](#User)
Expand All @@ -1278,59 +1280,55 @@ Authenticates a user using the inputted username and password.

<a name="User+reauthenticate"></a>

### user.reauthenticate() ⇒ <code>Promise.&lt;Object&gt;</code>
Re-authenticates a user using the refresh token.
**Kind**: instance method of [<code>User</code>](#User)

| Param | Type | Description |
| --- | --- | --- |
| refreshToken | <code>String</code> \| <code>Undefined</code> | Optional if not restored from a securely saved user. |
### user.reauthenticate() ⇒ [<code>Promise.&lt;User&gt;</code>](#User)
Re-authenticates a user with the the expired authentication token using the refresh token.

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+logout"></a>

### user.logout() ⇒ <code>Promise.&lt;Boolean&gt;</code>
Logout the user by expiring the authentication token and removing any saved data.

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+serialize"></a>

### user.serialize() ⇒ <code>string</code>
Converts a user object to a string to be securely stored.

Note that serialized object contains refreshToken and it's subject to strict storage requirements
to ensure that they are not leaked

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+save"></a>

### user.save() ⇒ <code>Promise.&lt;Boolean&gt;</code>
Save the user to disk. Prevents having to login and logout each run.
Note that this function does not save a refreshToken since it's a subject to strict storage requirements.
Use `serialize` and `deserealize` functions and safe storage to use `reauthenticate` .
**Kind**: instance method of [<code>User</code>](#User)

<a name="User+serialize"></a>

### user.serialize() ⇒ <code>String</code>
Converts a user object to a string to be securely stored.
Note that serialized object contains refreshToken and it's a subject to strict storage requirements to ensure that they are not leaked.
**Kind**: instance method of [<code>User</code>](#User)

<a name="User+isAuthenticated"></a>

### user.isAuthenticated() ⇒ <code>Boolean</code>
### user.isAuthenticated() ⇒ <code>boolean</code>
Checks if the current user is authenticated and authentication is not expired.
**Kind**: instance method of [<code>User</code>](#User)

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+getAuthToken"></a>

### user.getAuthToken() ⇒ <code>String</code> \| <code>Null</code>
### user.getAuthToken() ⇒ <code>null</code> \| <code>string</code>
Returns an auth token.
**Kind**: instance method of [<code>User</code>](#User)

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+getAccountNumber"></a>

### user.getAccountNumber() ⇒ <code>String</code> \| <code>Null</code>
### user.getAccountNumber() ⇒ <code>null</code> \| <code>string</code>
Returns an account number.
**Kind**: instance method of [<code>User</code>](#User)

**Kind**: instance method of [<code>User</code>](#User)
<a name="User+getUsername"></a>

### user.getUsername() ⇒ <code>String</code> \| <code>Null</code>
### user.getUsername() ⇒ <code>null</code> \| <code>string</code>
Returns a username.

**Kind**: instance method of [<code>User</code>](#User)

<a name="User+getAccount"></a>

### user.getAccount() ⇒ <code>Promise</code>
Expand Down Expand Up @@ -1459,18 +1457,31 @@ Downloads will be attempted every second and will wait for any connection thrott
| --- | --- |
| folder | <code>String</code> |

<a name="User.deserialize"></a>

### User.deserialize(data) ⇒ [<code>Promise.&lt;User&gt;</code>](#User)
Restores a user from the serialized object.

**Kind**: static method of [<code>User</code>](#User)

| Param | Type | Description |
| --- | --- | --- |
| data | <code>String</code> | serialized data |

<a name="User.load"></a>

### User.load() ⇒ [<code>Promise.&lt;User&gt;</code>](#User)
If a saved user exists, this will load it into system memory. Recommended if using multi-factor authentication.

**Kind**: static method of [<code>User</code>](#User)
<a name="User.isUser"></a>

<a name="User.unserialize"></a>
### User.isUser(object) ⇒ <code>boolean</code>
Checks if the provided object an instance of User object

### User.deserialize(data) ⇒ [<code>Promise.&lt;User&gt;</code>](#User)
Restores a user object from a serialized string.
**Kind**: static method of [<code>User</code>](#User)

Param | Type |
| Param | Type |
| --- | --- |
| data | <code>String</code> |
| object | <code>Object</code> |

0 comments on commit 025cff8

Please sign in to comment.