Skip to content

Latest commit

 

History

History
executable file
·
407 lines (312 loc) · 15.5 KB

GLOBALS.md

File metadata and controls

executable file
·
407 lines (312 loc) · 15.5 KB

Classes

LibraryError
OptionsChain
Quote

LibraryError

Kind: global class
Author: Torrey Leonard https://github.com/Ladinn

new LibraryError(message)

Param
message

libraryError.toString() ⇒ string

Kind: instance method of LibraryError
Author: Torrey Leonard https://github.com/Ladinn

OptionsChain

Kind: global class
Author: Torrey Leonard https://github.com/Ladinn

new OptionsChain(array)

Creates a new OptionsChain object.

Param Type
array Array

optionsChain.getExpirationDates() ⇒ Array.<Date>

Returns an array of all expiration dates for the OptionsChain object.

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

optionsChain.getStrikePrices(date, side) ⇒ Array.<Number> | Error

Returns an array of all strike prices for the OptionsChain object.

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date
side String put, call

optionsChain.getByExpirationDate(date) ⇒ Object

Returns an options chain for the given date.

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type
date Date

optionsChain.getNearestStrikePrice(date, side, priceTarget) ⇒ Number | Error

Returns the nearest strike price to the given price target.

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
side String Strike price to query.
priceTarget Number

optionsChain.getNearestExpirationDate(targetDate) ⇒ Date

Returns the nearest expiration date to the given date.

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type
targetDate Date

optionsChain.getVolume(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query.
side String put, call

optionsChain.getOpenInterest(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getLastPrice(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getBid(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getAsk(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getChange(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getLastTradeDate(date, strike, side) ⇒ Date

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.getImpliedVolatility(date, strike, side) ⇒ Number

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

optionsChain.isInTheMoney(date, strike, side) ⇒ Boolean

Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
date Date Expiration date to query.
strike Number Strike price to query
side String put, call

Quote

Kind: global class
Author: Torrey Leonard https://github.com/Ladinn
Properties

Name Type Description
symbol String
date Date
source String
price Object
price.last Number
price.open Number
price.high Number
price.low Number
price.close Number
price.volume Number
price.adjustedClose Number
dom Object
dom.bid.price Number
dom.bid.size Number
dom.ask.price Number
dom.ask.size Number
meta Object Price changes, dividends, splits, market cap, etc.
original String Original JSON string

new Quote(object)

Creates a new Quote instance.

Param Type
object Object

quote.getSymbol() ⇒ String

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getDate() ⇒ Date

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getSource() ⇒ String

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getLast() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getOpen() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getHigh() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getLow() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getClose() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getOHLC4() ⇒ number

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getVolume() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getAdjustedClose() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getBidPrice() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getBidSize() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getAskPrice() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getAskSize() ⇒ Number | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getMeta() ⇒ Object | Null

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

quote.getOriginal() ⇒ String

Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn

Quote.getVWAP(quoteArray) ⇒ Number

Returns the volume weighted average price (VWAP) for the given quote array. https://www.investopedia.com/terms/v/vwap.asp

Kind: static method of Quote
Author: Torrey Leonard https://github.com/Ladinn

Param Type
quoteArray Array

Quote.priceChannel(quoteArray, period) ⇒ Object

Calculates the highest high and lowest low for the provided period of time.

Kind: static method of Quote
Author: Torrey Leonard https://github.com/Ladinn

Param Type
quoteArray Array
period int