GLOBALS.md

March 1, 2019 · View on GitHub

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.

ParamType
arrayArray

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

ParamTypeDescription
dateDate
sideStringput, 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

ParamType
dateDate

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

ParamTypeDescription
dateDateExpiration date to query.
sideStringStrike price to query.
priceTargetNumber

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

ParamType
targetDateDate

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query.
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

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

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

ParamTypeDescription
dateDateExpiration date to query.
strikeNumberStrike price to query
sideStringput, call

Quote

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

NameTypeDescription
symbolString
dateDate
sourceString
priceObject
price.lastNumber
price.openNumber
price.highNumber
price.lowNumber
price.closeNumber
price.volumeNumber
price.adjustedCloseNumber
domObject
dom.bid.priceNumber
dom.bid.sizeNumber
dom.ask.priceNumber
dom.ask.sizeNumber
metaObjectPrice changes, dividends, splits, market cap, etc.
originalStringOriginal JSON string

new Quote(object)

Creates a new Quote instance.

ParamType
objectObject

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

ParamType
quoteArrayArray

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

ParamType
quoteArrayArray
periodint