Constructor
new ActiveTick(params)
Constructor
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Params to be set into this instance |
Methods
exeStack(params, cb)
Execute a Stack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Params of the stack item |
cb |
function | Callback |
fetch(params, path, cb)
Fetch a response from the ActiveTick API
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Query String params to be sent |
path |
String | API route to be called |
cb |
function | Callback |
formatToAT(date) → {String}
Format a MomentJS date to ActiveTick API standard string
Parameters:
Name | Type | Description |
---|---|---|
date |
Date | MomentJS date in which to format |
Returns:
Formatted String of the date given.
- Type
- String
parseResponse(string) → {Array}
Parse the CSV format into JS Array
Parameters:
Name | Type | Description |
---|---|---|
string |
String | CSV string ActiveTick API returns |
Returns:
Array of items parsed from string
- Type
- Array
parseTick(str) → {Object}
Parse a Tick Response
Parameters:
Name | Type | Description |
---|---|---|
str |
String | Line response from ActiveTick eg: Q,20160825093000577,0.730000,0.747000,47,35,P,Q,0 |
Returns:
Object of tick data from str
- Type
- Object
tickData(symbol, day) → {Promise}
Get Tick data of a Stock Symbol for an entire day
Parameters:
Name | Type | Description |
---|---|---|
symbol |
String | Symbol you want the tick data for |
day |
String | Date you want tick data for eg: 08/25/2016 |
Returns:
Returns a promise
- Type
- Promise