node-kraken-api
Advanced tools
Comparing version 0.3.1 to 0.4.0
@@ -22,4 +22,4 @@ /** | ||
*/ | ||
const handleResponse = (settings, res) => new Promise( | ||
(resolve, reject) => { | ||
const handleResponse = (settings, res) => | ||
new Promise((resolve, reject) => { | ||
let body = '' | ||
@@ -57,4 +57,3 @@ res.setEncoding('utf8') | ||
}) | ||
} | ||
) | ||
}) | ||
@@ -69,9 +68,10 @@ /** | ||
*/ | ||
const makeRequest = (settings, params) => new Promise( | ||
(resolve, reject) => { | ||
const makeRequest = (settings, params) => | ||
new Promise((resolve, reject) => { | ||
try { | ||
const reqData = genRequestData(settings, params) | ||
const req = https.request( | ||
reqData.options, | ||
res => handleResponse(settings, res).then(resolve).catch(reject) | ||
const req = https.request(reqData.options, res => | ||
handleResponse(settings, res) | ||
.then(resolve) | ||
.catch(reject) | ||
) | ||
@@ -88,5 +88,6 @@ req.on('error', e => { | ||
req.end() | ||
} catch (err) { reject(err) } | ||
} | ||
) | ||
} catch (err) { | ||
reject(err) | ||
} | ||
}) | ||
@@ -114,4 +115,4 @@ /** | ||
const listenersCopy = new Set([...thread.get(serial)]) | ||
makeRequest(settings, params).then( | ||
data => { | ||
makeRequest(settings, params) | ||
.then(data => { | ||
limiter.addPass(params.method) | ||
@@ -122,12 +123,14 @@ if (typeof settings.dataFormatter === 'function') { | ||
listenersCopy.forEach(listener => listener(null, data)) | ||
} | ||
).catch( | ||
err => { | ||
if (err.message.match(/rate limit/gi)) { | ||
}) | ||
.catch(err => { | ||
if (err.message.match(/temporary ?lockout/i)) { | ||
limiter.addLockout(params.method) | ||
} else if (err.message.match(/rate ?limit/gi)) { | ||
limiter.addFail(params.method) | ||
} else limiter.addPass(params.method) | ||
} else { | ||
limiter.addPass(params.method) | ||
} | ||
listenersCopy.forEach(listener => listener(err, null)) | ||
} | ||
) | ||
}) | ||
listenersCopy.forEach(listener => thread.get(serial).delete(listener)) | ||
@@ -176,3 +179,6 @@ if (thread.get(serial).size === 0) { | ||
} else { | ||
state.catThreads.get(cat).get(serial).add(retryListener) | ||
state.catThreads | ||
.get(cat) | ||
.get(serial) | ||
.add(retryListener) | ||
} | ||
@@ -215,6 +221,3 @@ if (launch) { | ||
if (arg.constructor === Object) { | ||
if ( | ||
op.args.has('options') || | ||
op.args.has('cb') | ||
) { | ||
if (op.args.has('options') || op.args.has('cb')) { | ||
op.invalid = true | ||
@@ -235,3 +238,4 @@ } else { | ||
return op | ||
}, { args: new Map(), invalid: false } | ||
}, | ||
{ args: new Map(), invalid: false } | ||
) | ||
@@ -286,8 +290,6 @@ | ||
const op = new Promise( | ||
(resolve, reject) => { | ||
const opListener = (err, data) => err ? reject(err) : resolve(data) | ||
queueCall(settings, state, args, opListener) | ||
} | ||
) | ||
const op = new Promise((resolve, reject) => { | ||
const opListener = (err, data) => (err ? reject(err) : resolve(data)) | ||
queueCall(settings, state, args, opListener) | ||
}) | ||
@@ -294,0 +296,0 @@ if (typeof args.cb !== 'function') return op |
@@ -81,3 +81,7 @@ /** | ||
const checkContext = (context, limitConfig, any, spec) => { | ||
if (context === 'fail') { | ||
if (context === 'lockout') { | ||
if (!spec.hasOwnProperty('lockoutCt')) spec.lockoutCt = 1 | ||
spec.intvl = limitConfig.lockoutResetIntvl * spec.lockoutCt | ||
spec.lockoutCt++ | ||
} else if (context === 'fail') { | ||
if (spec.intvl < limitConfig.violationResetIntvl) { | ||
@@ -88,2 +92,6 @@ spec.intvl = limitConfig.violationResetIntvl | ||
} else if (context === 'pass') { | ||
if (spec.hasOwnProperty('lockoutCt')) { | ||
delete spec.lockoutCt | ||
spec.intvl = limitConfig.baseIntvl | ||
} | ||
any.intvl *= limitConfig.anyPassDecay | ||
@@ -125,12 +133,27 @@ spec.intvl *= limitConfig.specificPassDecay | ||
if (cat === 'auth' && context === undefined) { | ||
const now = Date.now() | ||
const elapsed = now - state.authCounter.time | ||
const intervalsPassed = | ||
elapsed / getAuthDecrementInterval(state.settings.tier) | ||
let newCount = state.authCounter.count - intervalsPassed | ||
if (newCount < 0) newCount = 0 | ||
newCount += getAuthIncrementAmt(method) | ||
state.authCounter.count = newCount | ||
state.authCounter.time = now | ||
if (cat === 'auth') { | ||
if (context === undefined) { | ||
const now = Date.now() | ||
const elapsed = now - state.authCounter.time | ||
const intervalsPassed = | ||
elapsed / getAuthDecrementInterval(state.settings.tier) | ||
let newCount = state.authCounter.count - intervalsPassed | ||
if (newCount < 0) newCount = 0 | ||
newCount += getAuthIncrementAmt(method) | ||
state.authCounter.count = newCount | ||
state.authCounter.time = now | ||
} else if (context === 'fail') { | ||
if (!state.authCounter.hasOwnProperty('reductions')) { | ||
state.authCounter.reductions = [] | ||
} | ||
state.authCounter.reductions.push(Date.now()) | ||
} | ||
if (state.authCounter.hasOwnProperty('reductions')) { | ||
state.authCounter.reductions = state.authCounter.reductions.filter( | ||
x => x > Date.now() - limitConfig.authCounterReductionTimeout | ||
) | ||
if (state.authCounter.reductions.length === 0) { | ||
delete state.authCounter.reductions | ||
} | ||
} | ||
} | ||
@@ -165,4 +188,6 @@ } | ||
pileUpMultiplier: 1.05, | ||
lockoutResetIntvl: 300000, | ||
violationResetIntvl: 4500, | ||
violationMultiplier: 1.1, | ||
authCounterReductionTimeout: 60000, | ||
anyPassDecay: 0.95, | ||
@@ -232,4 +257,7 @@ specificPassDecay: 0.95 | ||
if (cat === 'auth') { | ||
const countDiff = | ||
state.authCounter.count - getAuthCounterLimit(state.settings.tier) | ||
const adjustment = state.authCounter.reductions | ||
? state.authCounter.reductions.length | ||
: 0 | ||
const limit = getAuthCounterLimit(state.settings.tier) - adjustment | ||
const countDiff = state.authCounter.count - limit | ||
if (countDiff > 0) { | ||
@@ -267,2 +295,13 @@ const authWait = | ||
/** | ||
* Registers a lockout state and forces a category pause. | ||
* | ||
* @function API~RateLimits~AddLockout | ||
* @param {Kraken~Method} method - Method being called. | ||
* @returns {boolean} True if successfully updated. | ||
*/ | ||
addLockout: method => { | ||
update(state, method, 'lockout') | ||
return true | ||
}, | ||
/** | ||
* Gets the type of server-side rate-limiter category based on the method. Wrapper for {@link API~RateLimits~GetRLCategory}. | ||
@@ -269,0 +308,0 @@ * |
@@ -0,2 +1,28 @@ | ||
# Changelog | ||
<a name="0.4.0"></a> | ||
## [0.4.0](https://github.com/jpcx/node-kraken-api/tree/0.4.0) (2018-07-21) | ||
| __[Changes since 0.3.1](https://github.com/jpcx/node-kraken-api/compare/0.3.1...0.4.0)__ | [Release Notes](https://github.com/jpcx/node-kraken-api/releases/tag/0.4.0) | [README](https://github.com/jpcx/node-kraken-api/tree/0.4.0/README.md) | | ||
| --- | --- | --- | | ||
| [Source Code (zip)](https://github.com/jpcx/node-kraken-api/archive/0.4.0.zip) | [Source Code (tar.gz)](https://github.com/jpcx/node-kraken-api/archive/0.4.0.tar.gz) | | ||
| --- | --- | | ||
__Features:__ | ||
+ __API/RateLimits:__ Added logic for handling temporary lockouts. | ||
+ __API/RateLimits:__ Added logic for private call rate-limit violations. | ||
+ __Tests/API/RateLimits:__ Added tests for new rate-limiting logic. | ||
__Bugfixes:__ | ||
+ __Docs:__ Applied linting rules to markdown. | ||
+ __CHANGELOG:__ Changed naming scheme for information entries. | ||
+ __package.json:__ Removed 'crypto' from dependencies. | ||
+ __package.json:__ Removed eslint* from devDependencies. | ||
<a name="0.3.1"></a> | ||
## [0.3.1](https://github.com/jpcx/node-kraken-api/tree/0.3.1) (2018-07-20) | ||
@@ -10,6 +36,8 @@ | ||
#### Bugfixes | ||
+ __CHANGELOG:__ Fixed new feature language and added more information to 0.3.0 bugfixes. | ||
__Bugfixes:__ | ||
+ __CHANGELOG:__ Fixed new feature language and added more information to 0.3.0 bugfixes. | ||
<a name="0.3.0"></a> | ||
## [0.3.0](https://github.com/jpcx/node-kraken-api/tree/0.3.0) (2018-07-20) | ||
@@ -23,10 +51,13 @@ | ||
#### Features | ||
+ __RateLimits:__ Implemented authenticated call rate-limiting using a counter as defined in the Kraken API Docs. | ||
__Features:__ | ||
#### Bugfixes | ||
+ __README:__ Reduced donation qr size. | ||
+ __RateLimits/Tests:__ Fixed 'Limits public categories correctly' test. | ||
+ __API/RateLimits:__ Implemented authenticated call rate-limiting using a counter as defined in the Kraken API Docs. | ||
__Bugfixes:__ | ||
+ __README:__ Reduced donation qr size. | ||
+ __Tests/API/RateLimits:__ Fixed 'Limits public categories correctly' test. | ||
<a name="0.2.0"></a> | ||
## [0.2.0](https://github.com/jpcx/node-kraken-api/tree/0.2.0) (2018-06-26) | ||
@@ -40,16 +71,20 @@ | ||
#### BREAKING CHANGES | ||
+ __Settings:__ Rate Limiter settings have been reduced to only baseIntvl and minIntvl. | ||
+ __Sync:__ Sync instance data is no longer non-writable and non-configurable. | ||
+ __Sync:__ Sync instance time property is now directly below the data property. | ||
+ __Sync:__ RemoveAllListeners has been removed. | ||
__BREAKING CHANGES:__ | ||
#### Features | ||
+ __Settings:__ DataFormatter functionality added. | ||
+ __Settings:__ Rate Limiter settings have been reduced to only baseIntvl and minIntvl. | ||
+ __API/Syncing:__ Sync instance data is no longer non-writable and non-configurable. | ||
+ __API/Syncing:__ Sync instance time property is now directly below the data property. | ||
+ __API/Syncing:__ RemoveAllListeners has been removed. | ||
#### Bugfixes | ||
+ __node-kraken-api:__ SetOTP now returns true. | ||
+ __Docs:__ API\~Syncing\~EventListener documentation has been updated to reflect new behavior. | ||
__Features:__ | ||
+ __Settings:__ DataFormatter functionality added. | ||
__Bugfixes:__ | ||
+ __node-kraken-api:__ SetOTP now returns true. | ||
+ __Docs:__ API\~Syncing\~EventListener documentation has been updated to reflect new behavior. | ||
<a name="0.1.3"></a> | ||
## [0.1.3](https://github.com/jpcx/node-kraken-api/tree/0.1.3) (2018-06-24) | ||
@@ -63,8 +98,10 @@ | ||
#### Bugfixes | ||
+ __Settings:__ Changed default sync interval settings to 2000ms. | ||
+ __Settings:__ Improved settings and defaults combination logic. | ||
+ __Sync:__ Improved authenticated call interval logic. | ||
__Bugfixes:__ | ||
+ __Settings:__ Changed default sync interval settings to 2000ms. | ||
+ __Settings:__ Improved settings and defaults combination logic. | ||
+ __API/Syncing:__ Improved authenticated call interval logic. | ||
<a name="0.1.2"></a> | ||
## [0.1.2](https://github.com/jpcx/node-kraken-api/tree/0.1.2) (2018-06-24) | ||
@@ -78,6 +115,8 @@ | ||
#### Bugfixes | ||
+ __CHANGELOG:__ Added CHANGELOG entries for 0.1.1 and 0.1.2. | ||
__Bugfixes:__ | ||
+ __CHANGELOG:__ Added CHANGELOG entries for 0.1.1 and 0.1.2. | ||
<a name="0.1.1"></a> | ||
## [0.1.1](https://github.com/jpcx/node-kraken-api/tree/0.1.1) (2018-06-24) | ||
@@ -91,7 +130,9 @@ | ||
#### Bugfixes | ||
+ __README:__ Fixed formatting for mobile devices. | ||
+ __README:__ Fixed BTC donation address. | ||
__Bugfixes:__ | ||
+ __README:__ Fixed formatting for mobile devices. | ||
+ __README:__ Fixed BTC donation address. | ||
<a name="0.1.0"></a> | ||
## [0.1.0](https://github.com/jpcx/node-kraken-api/tree/0.1.0) (2018-06-24) | ||
@@ -105,3 +146,4 @@ | ||
#### Features | ||
+ __node-kraken-api:__ Module created. | ||
__Features:__ | ||
+ __node-kraken-api:__ Module created. |
@@ -1,44 +0,43 @@ | ||
Module: API/Calls/GenRequestData | ||
================================ | ||
# Module: API/Calls/GenRequestData | ||
Generates request data for a given call. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Execution settings. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) | Object containing call specs. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Execution settings. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) | Object containing call specs. | | ||
Source: | ||
* [node-kraken-api/api/calls/genRequestData.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/genRequestData.js), [line 12](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/genRequestData.js#L12) | ||
* [node-kraken-api/api/calls/genRequestData.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/genRequestData.js), [line 12](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/genRequestData.js#L12) | ||
##### Returns: | ||
__Returns:__ | ||
Request data. | ||
Type | ||
___Type:___ | ||
[API\~Calls~RequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~RequestData) | ||
* [API\~Calls~RequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~RequestData) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,44 +0,43 @@ | ||
Module: API/Calls/LoadCall | ||
========================== | ||
# Module: API/Calls/LoadCall | ||
Loads settings and limiter instance and generates a stateful call function. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Execution settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Execution settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 238](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L238) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 242](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L242) | ||
##### Returns: | ||
__Returns:__ | ||
Stateful call function. | ||
Type | ||
___Type:___ | ||
[API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Call) | ||
* [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Call) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,46 +0,45 @@ | ||
Module: API/Calls/SignRequest | ||
============================= | ||
# Module: API/Calls/SignRequest | ||
Signs the request using the 'crypto' library based on the specifications listed in the [Kraken API Docs](https://www.kraken.com/help/api#general-usage). | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `secret` | [Kraken~Secret](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Secret) | Kraken API secret key. | | ||
| `nonce` | [Kraken~Nonce](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Nonce) | Kraken API nonce. | | ||
| `post` | [Kraken~HTTPSRequestPOSTData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~HTTPSRequestPOSTData) | POST data. | | ||
| `path` | [Kraken~Path](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Path) | Path to Kraken Method URL. | | ||
| `secret` | [Kraken~Secret](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Secret) | Kraken API secret key. | | ||
| `nonce` | [Kraken~Nonce](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Nonce) | Kraken API nonce. | | ||
| `post` | [Kraken~HTTPSRequestPOSTData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~HTTPSRequestPOSTData) | POST data. | | ||
| `path` | [Kraken~Path](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Path) | Path to Kraken Method URL. | | ||
Source: | ||
* [node-kraken-api/api/calls/signRequest.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/signRequest.js), [line 11](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/signRequest.js#L11) | ||
* [node-kraken-api/api/calls/signRequest.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/signRequest.js), [line 11](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/signRequest.js#L11) | ||
##### Returns: | ||
__Returns:__ | ||
Signature for a given call. | ||
Type | ||
___Type:___ | ||
[API\~Calls~Signature](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Signature) | ||
* [API\~Calls~Signature](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Signature) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,43 +0,42 @@ | ||
Module: API/RateLimits/LoadLimiter | ||
================================== | ||
# Module: API/RateLimits/LoadLimiter | ||
Loads settings and returns an object with rate-limiting functions. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 136](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L136) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 159](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L159) | ||
##### Returns: | ||
__Returns:__ | ||
Rate-limiting functions. | ||
Type | ||
___Type:___ | ||
[API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | ||
* [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,45 +0,44 @@ | ||
Module: API/Syncing/LoadSync | ||
============================ | ||
# Module: API/Syncing/LoadSync | ||
Creates a sync instance creator by loading relevant information into a closure. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Call) | Stateful call function. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Call) | Stateful call function. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 280](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L280) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 280](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L280) | ||
##### Returns: | ||
__Returns:__ | ||
Function which creates sync instances. | ||
Type | ||
___Type:___ | ||
[API\~Syncing~Sync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Sync) | ||
* [API\~Syncing~Sync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Sync) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,51 +0,50 @@ | ||
Module: node-kraken-api | ||
======================= | ||
# Module: node-kraken-api | ||
Provides an interface to the Kraken cryptocurrency exchange. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | User-defined settings. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | User-defined settings. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L14) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L14) | ||
##### Throws: | ||
__Throws:__ | ||
Throws an error if a setting is not of an acceptable type or range. | ||
Type | ||
___Type:___ | ||
TypeError | RangeError | ||
* TypeError | RangeError | ||
##### Returns: | ||
__Returns:__ | ||
Object with methods for interacting with the API. | ||
Type | ||
___Type:___ | ||
[API~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~Functions) | ||
* [API~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~Functions) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,51 +0,50 @@ | ||
Module: Settings/ParseSettings | ||
============================== | ||
# Module: Settings/ParseSettings | ||
Parses settings input, checks for bad values, and combines with defaults. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Current supplied custom settings configuration. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Current supplied custom settings configuration. | | ||
Source: | ||
* [node-kraken-api/settings/parseSettings.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/parseSettings.js), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/parseSettings.js#L13) | ||
* [node-kraken-api/settings/parseSettings.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/parseSettings.js), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/parseSettings.js#L13) | ||
##### Throws: | ||
__Throws:__ | ||
Throws an error if a setting is not of an acceptable type or range. | ||
Type | ||
___Type:___ | ||
TypeError | RangeError | ||
* TypeError | RangeError | ||
##### Returns: | ||
__Returns:__ | ||
Parsed settings. | ||
Type | ||
___Type:___ | ||
[Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | ||
* [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,7 +0,6 @@ | ||
Module: Tools/AlphabetizeNested | ||
=============================== | ||
# Module: Tools/AlphabetizeNested | ||
Alphabetizes a nested object. | ||
##### Parameters: | ||
__Parameters:__ | ||
@@ -12,33 +11,33 @@ | Name | Type | Description | | ||
Source: | ||
* [node-kraken-api/tools/alphabetizeNested.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/alphabetizeNested.js), [line 4](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/alphabetizeNested.js#L4) | ||
* [node-kraken-api/tools/alphabetizeNested.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/alphabetizeNested.js), [line 3](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/alphabetizeNested.js#L3) | ||
##### Returns: | ||
__Returns:__ | ||
Alphabetized object. | ||
Type | ||
___Type:___ | ||
Object | ||
* Object | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,44 +0,43 @@ | ||
Module: Tools/ParseNested | ||
========================= | ||
# Module: Tools/ParseNested | ||
Parses objects based on [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md#~ParseNestedConfig). | ||
Parses objects based on [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md#~ParseNestedConfig). | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `config` | [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md#~ParseNestedConfig) | Parse types config. | | ||
| `config` | [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md#~ParseNestedConfig) | Parse types config. | | ||
| `obj` | Object \| Array \| Map \| Set | Object to parse. | | ||
Source: | ||
* [node-kraken-api/tools/parseNested.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/parseNested.js), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/parseNested.js#L13) | ||
* [node-kraken-api/tools/parseNested.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/parseNested.js), [line 12](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/parseNested.js#L12) | ||
##### Returns: | ||
__Returns:__ | ||
Parsed object | ||
Type | ||
___Type:___ | ||
Object | Array | Map | Set | ||
* Object | Array | Map | Set | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -7,204 +7,205 @@ # API | ||
* [node-kraken-api/api/api.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/api.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/api.jsdoc#L7) | ||
* [node-kraken-api/api/api.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/api.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/api.jsdoc#L7) | ||
### Namespaces | ||
## Namespaces | ||
[Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
[Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
[RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
[RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
[Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
[Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
### Methods | ||
## Methods | ||
<a name="~SetLimiter"></a> | ||
#### (inner) SetLimiter(limiter) → \{boolean} | ||
### (inner) SetLimiter(limiter) → \{boolean} | ||
Sets new limiter settings to the execution settings | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `limiter` | [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~RateLimiter) | New limiter settings. | | ||
| `limiter` | [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~RateLimiter) | New limiter settings. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 87](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L87) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 87](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L87) | ||
##### Throws: | ||
__Throws:__ | ||
Throws a TypeError if limiter does not match specifications; throws a RangeError if settings are not >= 0. | ||
Type | ||
___Type:___ | ||
TypeError | RangeError | ||
* TypeError | RangeError | ||
##### Returns: | ||
__Returns:__ | ||
True if successful. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~SetOTP"></a> | ||
#### (inner) SetOTP(otp) → \{boolean} | ||
### (inner) SetOTP(otp) → \{boolean} | ||
Sets a new two-factor password to the execution settings | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~OTP) | New two-factor password. | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~OTP) | New two-factor password. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 28](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L28) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 28](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L28) | ||
##### Throws: | ||
__Throws:__ | ||
Throws a TypeError if otp is a not string or a number. | ||
Type | ||
___Type:___ | ||
TypeError | ||
* TypeError | ||
##### Returns: | ||
__Returns:__ | ||
True if successful. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~SetRetryCt"></a> | ||
#### (inner) SetRetryCt(retryCt) → \{boolean} | ||
### (inner) SetRetryCt(retryCt) → \{boolean} | ||
Sets a new RetryCount to the execution settings | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `retryCt` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~RetryCount) | New retryCt. | | ||
| `retryCt` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~RetryCount) | New retryCt. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 66](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L66) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 66](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L66) | ||
##### Throws: | ||
__Throws:__ | ||
Throws a TypeError if retryCt is a not equivalent to a number; throws a RangeError if retryCt is not >= 0. | ||
Type | ||
___Type:___ | ||
TypeError | RangeError | ||
* TypeError | RangeError | ||
##### Returns: | ||
__Returns:__ | ||
True if successful. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~SetTimeout"></a> | ||
#### (inner) SetTimeout(timeout) → \{boolean} | ||
### (inner) SetTimeout(timeout) → \{boolean} | ||
Sets a new timeout to the execution settings | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `timeout` | [API\~Calls~Timeout](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Timeout) | New timeout. | | ||
| `timeout` | [API\~Calls~Timeout](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Timeout) | New timeout. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 45](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L45) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 45](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L45) | ||
##### Throws: | ||
__Throws:__ | ||
Throws a TypeError if timeout is a not equivalent to a number; throws a RangeError if timeout is not greater than 0. | ||
Type | ||
___Type:___ | ||
TypeError | RangeError | ||
* TypeError | RangeError | ||
##### Returns: | ||
__Returns:__ | ||
True if successful. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~Callback"></a> | ||
#### Callback(err, data) | ||
### Callback(err, data) | ||
Function which handles errors and data. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `err` | [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallError) | Request errors. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) | Response data. | | ||
| `err` | [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallError) | Request errors. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) | Response data. | | ||
Source: | ||
* [node-kraken-api/api/api.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/api.jsdoc), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/api.jsdoc#L13) | ||
* [node-kraken-api/api/api.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/api.jsdoc), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/api.jsdoc#L13) | ||
<a name="~Functions"></a> | ||
#### Functions | ||
### Functions | ||
Provides functions which can be used to interact with the API. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Call) | Call a single method. | | ||
| `sync` | [API\~Syncing~Sync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Sync) | Create a sync instance. | | ||
| `setOTP` | [API~SetOTP](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~SetOTP) | Sets new two-factor password. | | ||
| `setTimeout` | [API~SetTimeout](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~SetTimeout) | Sets a new timeout. | | ||
| `setRetryCt` | [API~SetRetryCt](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~SetRetryCt) | Sets a new retryCt. | | ||
| `setLimiter` | [API~SetLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~SetLimiter) | Sets new limiter settings. | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Call) | Call a single method. | | ||
| `sync` | [API\~Syncing~Sync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Sync) | Create a sync instance. | | ||
| `setOTP` | [API~SetOTP](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~SetOTP) | Sets new two-factor password. | | ||
| `setTimeout` | [API~SetTimeout](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~SetTimeout) | Sets a new timeout. | | ||
| `setRetryCt` | [API~SetRetryCt](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~SetRetryCt) | Sets a new retryCt. | | ||
| `setLimiter` | [API~SetLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~SetLimiter) | Sets new limiter settings. | | ||
Source: | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js), [line 131](https://github.com/jpcx/node-kraken-api/blob/0.3.1/index.js#L131) | ||
* [node-kraken-api/index.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js), [line 131](https://github.com/jpcx/node-kraken-api/blob/0.4.0/index.js#L131) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,455 +0,465 @@ | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md)~Calls | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md)~Calls | ||
Types and methods specific to making direct API calls to Kraken. | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `LoadCall` | [module:API/Calls/LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | Loads a stateful call function given the execution settings. | | ||
| `GenRequestData` | [module:API/Calls/GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | Generates request data for a given request. | | ||
| `SignRequest` | [module:API/Calls/SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | Applies a cryptographic signature to a given request. | | ||
| `LoadCall` | [module:API/Calls/LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | Loads a stateful call function given the execution settings. | | ||
| `GenRequestData` | [module:API/Calls/GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | Generates request data for a given request. | | ||
| `SignRequest` | [module:API/Calls/SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | Applies a cryptographic signature to a given request. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L7) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L7) | ||
### Methods | ||
## Methods | ||
<a name="~Call"></a> | ||
#### (inner) Call(method, optionsopt, cbopt) → \{Promise|boolean} | ||
### (inner) Call(method, optionsopt, cbopt) → \{Promise|boolean} | ||
Makes a call to the Kraken server-side API. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Attributes | Description | | ||
| --- | --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | \<optional> | Method-specific options. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~Callback) | \<optional> | Optional callback for error or data. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | \<optional> | Method-specific options. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~Callback) | \<optional> | Optional callback for error or data. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 263](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L263) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 267](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L267) | ||
##### Throws: | ||
__Throws:__ | ||
Throws 'Invalid method' if method is not found in [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config). | ||
Throws 'Invalid method' if method is not found in [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config). | ||
Type | ||
___Type:___ | ||
Error | ||
* Error | ||
##### Returns: | ||
__Returns:__ | ||
Promise which resolves with error or data (if no callback supplied), or `true` if operation registered successfully. | ||
Type | ||
___Type:___ | ||
Promise | boolean | ||
* Promise | boolean | ||
<a name="~HandleResponse"></a> | ||
#### (inner) HandleResponse(settings, res) → \{Promise} | ||
### (inner) HandleResponse(settings, res) → \{Promise} | ||
Handles request responses. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Instance settings. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Instance settings. | | ||
| `res` | Object | Provides an 'on' function which emits 'data' and 'end' events while receiving data chunks from request. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L14) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L14) | ||
##### Returns: | ||
__Returns:__ | ||
Promise that resolves with call data or rejects with any errors. | ||
Type | ||
___Type:___ | ||
Promise | ||
* Promise | ||
<a name="~MakeRequest"></a> | ||
#### (inner) MakeRequest(settings, params) → \{Promise} | ||
### (inner) MakeRequest(settings, params) → \{Promise} | ||
Makes a request to the Kraken server-side API. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Instance settings. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) | Call parameters. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Instance settings. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) | Call parameters. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 59](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L59) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 58](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L58) | ||
##### Returns: | ||
__Returns:__ | ||
Resolves after successful operation and rejects upon errors. | ||
Type | ||
___Type:___ | ||
Promise | ||
* Promise | ||
<a name="~ParseArgs"></a> | ||
#### (inner) ParseArgs(settings, method, options, otp, cb) → \{[API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Arguments)} | ||
### (inner) ParseArgs(settings, method, options, otp, cb) → \{[API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Arguments)} | ||
Parses inputted arguments and reassigns them based on their type. Arguments will be successfully recognized regardless of omissions. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~OTP) | Two-factor password. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~Callback) | Listener for errors and data. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~OTP) | Two-factor password. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~Callback) | Listener for errors and data. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 180](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L180) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 186](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L186) | ||
##### Throws: | ||
__Throws:__ | ||
Throws 'Bad arguments' or 'Bad method' errors if arguments are invalid. | ||
Type | ||
___Type:___ | ||
Error | ||
* Error | ||
##### Returns: | ||
__Returns:__ | ||
Parsed arguments. | ||
Type | ||
___Type:___ | ||
[API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Arguments) | ||
* [API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Arguments) | ||
<a name="~ProcessCalls"></a> | ||
#### (inner) ProcessCalls(settings, cat, thread, serialReg, limiter) → \{Promise} | ||
### (inner) ProcessCalls(settings, cat, thread, serialReg, limiter) → \{Promise} | ||
Processes a call queue for a given rate-limit category. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Execution settings configuraiton. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category) | Rate-limit category. | | ||
| `thread` | [API\~Calls~Thread](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Thread) | Map of serialized parameters to listeners sets. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialRegistry) | Map of serialized params to actual parameter data. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | Rate-limit handler. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Execution settings configuraiton. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category) | Rate-limit category. | | ||
| `thread` | [API\~Calls~Thread](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Thread) | Map of serialized parameters to listeners sets. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialRegistry) | Map of serialized params to actual parameter data. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | Rate-limit handler. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 89](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L89) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 90](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L90) | ||
##### Returns: | ||
__Returns:__ | ||
Returns a promise that resolves once all calls for a given category have completed. Rejects with operational errors. | ||
Type | ||
___Type:___ | ||
Promise | ||
* Promise | ||
<a name="~QueueCall"></a> | ||
#### (inner) QueueCall(settings, state, args, opListener, retryCt) | ||
Attaches calls to state maps. Launches dequeue operation if necessary. Recursively calls itself in response to call errors, depending on [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config).retryCt. | ||
### (inner) QueueCall(settings, state, args, opListener, retryCt) | ||
##### Parameters: | ||
Attaches calls to state maps. Launches dequeue operation if necessary. Recursively calls itself in response to call errors, depending on [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config).retryCt. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Execution settings configuraiton. | | ||
| `state` | [API\~Calls~State](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~State) | Current state variables. | | ||
| `args` | [API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Arguments) | Call-specific arguments. | | ||
| `opListener` | [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~OpListener) | Listener error and data in order to resolve or reject the operational promise or to forward to the [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~Callback). | | ||
| `retryCt` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~RetryCount) | Number of times call has been attempted. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Execution settings configuraiton. | | ||
| `state` | [API\~Calls~State](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~State) | Current state variables. | | ||
| `args` | [API\~Calls~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Arguments) | Call-specific arguments. | | ||
| `opListener` | [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~OpListener) | Listener error and data in order to resolve or reject the operational promise or to forward to the [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~Callback). | | ||
| `retryCt` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~RetryCount) | Number of times call has been attempted. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 136](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L136) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 139](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L139) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~Arguments"></a> | ||
#### Arguments | ||
### Arguments | ||
Object of parsed arguments provided to the call function. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Call method. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md#~Callback) | Callback for error or data. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Call method. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `cb` | [API~Callback](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md#~Callback) | Callback for error or data. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 16](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L16) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 16](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L16) | ||
<a name="~CallData"></a> | ||
#### CallData | ||
### CallData | ||
Response data for a given call after any parsing processes. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 51](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L51) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 51](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L51) | ||
<a name="~CallError"></a> | ||
#### CallError | ||
### CallError | ||
Response errors for a given call. | ||
##### Type: | ||
__Type:__ | ||
* Error | ||
* Error | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 45](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L45) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 45](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L45) | ||
<a name="~CatThreads"></a> | ||
#### CatThreads | ||
Holds maps of [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) to internal instances by rate-limit category. Different categories are executed in parallel. | ||
### CatThreads | ||
##### Type: | ||
Holds maps of [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) to internal instances by rate-limit category. Different categories are executed in parallel. | ||
* Map.<[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category), [API\~Calls~Thread](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Thread)> | ||
__Type:__ | ||
* Map.<[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category), [API\~Calls~Thread](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Thread)> | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 101](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L101) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 101](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L101) | ||
<a name="~ListenerSet"></a> | ||
#### ListenerSet | ||
### ListenerSet | ||
Set of all lower listeners associated with a call. | ||
##### Type: | ||
__Type:__ | ||
* Set.<[API\~Calls~RetryListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~RetryListener)> | ||
* Set.<[API\~Calls~RetryListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~RetryListener)> | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 107](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L107) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 107](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L107) | ||
<a name="~OpListener"></a> | ||
#### OpListener(err, data) | ||
### OpListener(err, data) | ||
Listener created upon first execution of call function which resolves the operational promise or rejects it. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `err` | Error | Any operational errors or [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallError) | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) | Data received from call. | | ||
| `err` | Error | Any operational errors or [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallError) | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) | Data received from call. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 83](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L83) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 83](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L83) | ||
<a name="~Params"></a> | ||
#### Params | ||
### Params | ||
Holds data for Kraken call method and options. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 57](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L57) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 57](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L57) | ||
<a name="~RequestData"></a> | ||
#### RequestData | ||
### RequestData | ||
Request data prepared for use with the 'https' module. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `options` | [Kraken~HTTPSRequestOptions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~HTTPSRequestOptions) | Options for HTTPS request to Kraken servers. | | ||
| `post` | [Kraken~HTTPSRequestPOSTData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~HTTPSRequestPOSTData) | POST data for HTTPS request to Kraken servers. | | ||
| `options` | [Kraken~HTTPSRequestOptions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~HTTPSRequestOptions) | Options for HTTPS request to Kraken servers. | | ||
| `post` | [Kraken~HTTPSRequestPOSTData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~HTTPSRequestPOSTData) | POST data for HTTPS request to Kraken servers. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L31) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L31) | ||
<a name="~RetryCount"></a> | ||
#### RetryCount | ||
### RetryCount | ||
Number of times that a call has been retried in response to an error. Includes retries due to rate limit violations. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 77](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L77) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 77](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L77) | ||
<a name="~RetryListener"></a> | ||
#### RetryListener(err, data) | ||
Listener created during call queueing; data is forwarded to [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~OpListener); errors trigger a retry attempt if possible- if not, they are forwarded to the [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~OpListener). | ||
### RetryListener(err, data) | ||
##### Parameters: | ||
Listener created during call queueing; data is forwarded to [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~OpListener); errors trigger a retry attempt if possible- if not, they are forwarded to the [API\~Calls~OpListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~OpListener). | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `err` | Error | Any operational errors or [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallError) | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) | Data received from call. | | ||
| `err` | Error | Any operational errors or [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallError) | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) | Data received from call. | | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 92](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L92) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 92](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L92) | ||
<a name="~SerialParams"></a> | ||
#### SerialParams | ||
Alphabetized and serialized [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) used for identifying multiple copies of the same call parameters. | ||
### SerialParams | ||
##### Type: | ||
Alphabetized and serialized [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) used for identifying multiple copies of the same call parameters. | ||
* string | ||
__Type:__ | ||
* string | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 65](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L65) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 65](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L65) | ||
<a name="~SerialRegistry"></a> | ||
#### SerialRegistry | ||
### SerialRegistry | ||
Map of serialized params to actual param objects. | ||
##### Type: | ||
__Type:__ | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialParams), [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params)> | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialParams), [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params)> | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 71](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L71) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 71](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L71) | ||
<a name="~Signature"></a> | ||
#### Signature | ||
### Signature | ||
Cryptographic signature of a given call according to the specifications listed in the [Kraken API Docs](https://www.kraken.com/help/api#general-usage). | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 39](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L39) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 39](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L39) | ||
<a name="~State"></a> | ||
#### State | ||
### State | ||
Holds information essential to call operations during state. | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Execution settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | Limiter object. | | ||
| `catThreads` | [API\~Calls~CatThreads](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CatThreads) | Category-based execution threads. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialRegistry) | Maps serialized params to actual params. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Execution settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | Limiter object. | | ||
| `catThreads` | [API\~Calls~CatThreads](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CatThreads) | Category-based execution threads. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialRegistry) | Maps serialized params to actual params. | | ||
Source: | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js), [line 247](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/loadCall.js#L247) | ||
* [node-kraken-api/api/calls/loadCall.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js), [line 251](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/loadCall.js#L251) | ||
<a name="~Thread"></a> | ||
#### Thread | ||
### Thread | ||
Maps serial params to sets of associated listeners. | ||
##### Type: | ||
__Type:__ | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialParams), [API\~Calls~ListenerSet](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~ListenerSet)> | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialParams), [API\~Calls~ListenerSet](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~ListenerSet)> | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 113](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L113) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 113](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L113) | ||
<a name="~Timeout"></a> | ||
#### Timeout | ||
### Timeout | ||
Timeout (in ms) for terminating HTTPS connections. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc), [line 25](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/calls/calls.jsdoc#L25) | ||
* [node-kraken-api/api/calls/calls.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc), [line 25](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/calls/calls.jsdoc#L25) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,302 +0,326 @@ | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md)~RateLimits | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md)~RateLimits | ||
Types and methods specific to dynamically limiting call frequency in response to rate limit violations and according to the rate limit specifications listed in the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `LoadLimiter` | [module:API/RateLimits/LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | Prepares rate-limiting promises according to the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier), [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method), and [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~RateLimiter). | | ||
| `LoadLimiter` | [module:API/RateLimits/LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | Prepares rate-limiting promises according to the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier), [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method), and [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~RateLimiter). | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc#L7) | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc#L7) | ||
### Methods | ||
## Methods | ||
<a name="~AddFail"></a> | ||
#### (inner) AddFail(method) → \{boolean} | ||
### (inner) AddFail(method) → \{boolean} | ||
Registers a new rate-limit violation and updates frequencies accordingly. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 278](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L278) | ||
__Returns:__ | ||
True if successfully updated. | ||
___Type:___ | ||
* boolean | ||
<a name="~AddLockout"></a> | ||
### (inner) AddLockout(method) → \{boolean} | ||
Registers a lockout state and forces a category pause. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 250](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L250) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 289](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L289) | ||
##### Returns: | ||
__Returns:__ | ||
True if successfully updated. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~AddPass"></a> | ||
#### (inner) AddPass(method) → \{boolean} | ||
### (inner) AddPass(method) → \{boolean} | ||
Registers any response that is not a rate-limit violation and updates frequencies accordingly. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 239](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L239) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 267](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L267) | ||
##### Returns: | ||
__Returns:__ | ||
True if successfully updated. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~Attempt"></a> | ||
#### (inner) Attempt(method) → \{Promise} | ||
### (inner) Attempt(method) → \{Promise} | ||
Registers a new call attempt and returns a promise that signifies that the call placement may be submitted. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 189](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L189) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 214](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L214) | ||
##### Returns: | ||
__Returns:__ | ||
Resolves when an adequate wait period has been completed. | ||
Type | ||
___Type:___ | ||
Promise | ||
* Promise | ||
<a name="~CheckContext"></a> | ||
#### (inner) CheckContext(context, limitConfig, any, spec) | ||
Checks the response context for [API\~RateLimits~Update](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Update) and adjusts call frequency accordingly. | ||
### (inner) CheckContext(context, limitConfig, any, spec) | ||
##### Parameters: | ||
Checks the response context for [API\~RateLimits~Update](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Update) and adjusts call frequency accordingly. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `context` | 'pass' \| 'fail' \| undefined | Reason for invocation; may be called in response to a successful call, a rate limit violation, or a pre-response call attempt. | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate-limiter settings configuration. | | ||
| `any` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate information for all calls. | | ||
| `spec` | [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CatInfo) | Rate information for specific [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category). | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate-limiter settings configuration. | | ||
| `any` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate information for all calls. | | ||
| `spec` | [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CatInfo) | Rate information for specific [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category). | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 71](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L71) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 71](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L71) | ||
<a name="~CheckPileUp"></a> | ||
#### (inner) CheckPileUp(limitConfig, any) | ||
### (inner) CheckPileUp(limitConfig, any) | ||
Checks for more calls being made than responses received and adjusts call frequency accordingly. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate-limiter settings configuration. | | ||
| `any` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate information for all calls. | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate-limiter settings configuration. | | ||
| `any` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate information for all calls. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 55](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L55) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 55](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L55) | ||
<a name="~GetAuthCounterLimit"></a> | ||
#### (inner) GetAuthCounterLimit(tier) → \{[Kraken~AuthCounterLimit](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthCounterLimit)} | ||
### (inner) GetAuthCounterLimit(tier) → \{[Kraken~AuthCounterLimit](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthCounterLimit)} | ||
Returns the maximum counter value for authenticated methods. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier) | Kraken verification tier. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier) | Kraken verification tier. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L31) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L31) | ||
##### Returns: | ||
__Returns:__ | ||
Maximum count for auth counter. | ||
Type | ||
___Type:___ | ||
[Kraken~AuthCounterLimit](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthCounterLimit) | ||
* [Kraken~AuthCounterLimit](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthCounterLimit) | ||
<a name="~GetAuthDecrementInterval"></a> | ||
#### (inner) GetAuthDecrementInterval(tier) → \{[Kraken~AuthDecrementInterval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthDecrementInterval)} | ||
### (inner) GetAuthDecrementInterval(tier) → \{[Kraken~AuthDecrementInterval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthDecrementInterval)} | ||
Returns the amount of time required to decrement the auth counter. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier) | Kraken verification tier. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier) | Kraken verification tier. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 21](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L21) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 21](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L21) | ||
##### Returns: | ||
__Returns:__ | ||
Amount of time required to decrement the counter. | ||
Type | ||
___Type:___ | ||
[Kraken~AuthDecrementInterval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthDecrementInterval) | ||
* [Kraken~AuthDecrementInterval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthDecrementInterval) | ||
<a name="~GetAuthIncrementAmt"></a> | ||
#### (inner) GetAuthIncrementAmt(method) → \{[Kraken~AuthIncrementAmount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthIncrementAmount)} | ||
### (inner) GetAuthIncrementAmt(method) → \{[Kraken~AuthIncrementAmount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthIncrementAmount)} | ||
Returns the amount of counter incrementation based on the method. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 9](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L9) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 9](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L9) | ||
##### Returns: | ||
__Returns:__ | ||
Amount to increment the auth counter. | ||
Type | ||
___Type:___ | ||
[Kraken~AuthIncrementAmount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthIncrementAmount) | ||
* [Kraken~AuthIncrementAmount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthIncrementAmount) | ||
<a name="~GetAuthRegenIntvl"></a> | ||
#### (inner) GetAuthRegenIntvl(method, tier) → \{number} | ||
### (inner) GetAuthRegenIntvl(method, tier) → \{number} | ||
Gets the frequency required for sustainable execution of a private method. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier) | Current verification tier. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier) | Current verification tier. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 269](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L269) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 308](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L308) | ||
##### Returns: | ||
__Returns:__ | ||
Optimal interval. | ||
Type | ||
___Type:___ | ||
number | ||
* number | ||
<a name="~GetCategory"></a> | ||
#### (inner) GetCategory(method) → \{[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category)} | ||
Gets the type of server-side rate-limiter category based on the method. Wrapper for [API\~RateLimits~GetRLCategory](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~GetRLCategory). | ||
### (inner) GetCategory(method) → \{[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category)} | ||
##### Parameters: | ||
Gets the type of server-side rate-limiter category based on the method. Wrapper for [API\~RateLimits~GetRLCategory](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~GetRLCategory). | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 261](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L261) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 300](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L300) | ||
##### Returns: | ||
__Returns:__ | ||
Type of rate-limiter category. | ||
Type | ||
___Type:___ | ||
[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category) | ||
* [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category) | ||
<a name="~GetRLCategory"></a> | ||
#### (inner) GetRLCategory(privMethods, method) → \{[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category)} | ||
### (inner) GetRLCategory(privMethods, method) → \{[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category)} | ||
Returns the rate-limit category for a given method. Different categories follow different server-side limiting behavior. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `privMethods` | [Kraken~PrivateMethods](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~PrivateMethods) | List of all available private methods. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `privMethods` | [Kraken~PrivateMethods](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~PrivateMethods) | List of all available private methods. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 40](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L40) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 40](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L40) | ||
##### Returns: | ||
__Returns:__ | ||
Rate-limiting category. | ||
Type | ||
___Type:___ | ||
[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category) | ||
* [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category) | ||
<a name="~Update"></a> | ||
#### (inner) Update(state, method, contextopt) | ||
Updates [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CallInfo) and [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CatInfo) intervals in response to server response behavior. | ||
### (inner) Update(state, method, contextopt) | ||
##### Parameters: | ||
Updates [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CallInfo) and [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CatInfo) intervals in response to server response behavior. | ||
__Parameters:__ | ||
| Name | Type | Attributes | Description | | ||
| --- | --- | --- | --- | | ||
| `state` | [API\~RateLimits~State](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~State) | | Stateful registry of limiter information. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `state` | [API\~RateLimits~State](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~State) | | Stateful registry of limiter information. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `context` | 'pass' \| 'fail' | \<optional> | Reason for invocation; may be called in response to a successful call, a rate limit violation, or a pre-response call attempt. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 92](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L92) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 100](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L100) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~CallInfo"></a> | ||
#### CallInfo | ||
### CallInfo | ||
Contains rate information for all calls. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
@@ -309,30 +333,31 @@ | Name | Type | Description | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc), [line 20](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc#L20) | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc), [line 20](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc#L20) | ||
<a name="~Category"></a> | ||
#### Category | ||
### Category | ||
Separates calls into four categories that are known to have different server-side rate-limiting behavior. | ||
##### Type: | ||
__Type:__ | ||
* 'ohlc' | 'trades' | 'other' | 'auth' | ||
* 'ohlc' | 'trades' | 'other' | 'auth' | ||
Source: | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc#L14) | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc#L14) | ||
<a name="~CatInfo"></a> | ||
#### CatInfo | ||
### CatInfo | ||
Holds information for category-specific frequencies. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
@@ -344,41 +369,41 @@ | Name | Type | Description | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc), [line 35](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc#L35) | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc), [line 35](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc#L35) | ||
<a name="~Functions"></a> | ||
#### Functions | ||
### Functions | ||
Contains functions for working with rate-limits. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `attempt` | [API\~RateLimits~Attempt](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Attempt) | Register a new call attempt. | | ||
| `addPass` | [API\~RateLimits~AddPass](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~AddPass) | Register a new successful call response. | | ||
| `addFail` | [API\~RateLimits~AddFail](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~AddFail) | Register a new rate-limit violation. | | ||
| `getCategory` | [API\~RateLimits~GetCategory](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~GetCategory) | Gets the type of rate-limiting behavior based on the method. | | ||
| `getAuthRegenIntvl` | [API\~RateLimits~GetAuthRegenIntvl](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~GetAuthRegenIntvl) | Gets the amount of time necessary for a given private method to be called sustainably. | | ||
| `attempt` | [API\~RateLimits~Attempt](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Attempt) | Register a new call attempt. | | ||
| `addPass` | [API\~RateLimits~AddPass](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~AddPass) | Register a new successful call response. | | ||
| `addFail` | [API\~RateLimits~AddFail](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~AddFail) | Register a new rate-limit violation. | | ||
| `getCategory` | [API\~RateLimits~GetCategory](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~GetCategory) | Gets the type of rate-limiting behavior based on the method. | | ||
| `getAuthRegenIntvl` | [API\~RateLimits~GetAuthRegenIntvl](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~GetAuthRegenIntvl) | Gets the amount of time necessary for a given private method to be called sustainably. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 178](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L178) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 203](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L203) | ||
<a name="~LimitConfig"></a> | ||
#### LimitConfig | ||
### LimitConfig | ||
Rules for limiting call frequency and responding to violations. Frequencies are split into two main categories: all calls and specific calls. All calls frequency determines the request rate for any kind of call. Specific call frequencies are split into several categories of distinct server-side rate-limiting behavior. Pile-up refers to more calls being made than responses received. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
@@ -393,49 +418,51 @@ | Name | Type | Description | | ||
| `pileUpMultiplier` | number | Amount to multiply by call interval in response to excessive calling. | | ||
| `lockoutResetIntvl` | number | Interval to reset a call type to in response to a rate limit lockout. Interval is multiplied by the number of failed resume attempts plus one. | | ||
| `violationResetIntvl` | number | Interval to reset a call type to in response to a rate limit violation | | ||
| `violationMultiplier` | number | Multiplies call type interval in response to rate limit violations (if greater than violationResetIntvl). | | ||
| `authCounterReductionTimeout` | number | Rate limit violations during authenticated calling should only happen when multiple sources are utilizing the private API, or if node-kraken-api instance is reset before the authenticated counter expires. As such, maximum count is reduced by one for every violation, and is increased by one (restored) after this many milliseconds. | | ||
| `anyPassDecay` | number | Amount to multiply all calls interval in response to a successful call. | | ||
| `specificPassDecay` | number | Amount to multiply call type interval in response to a successful call. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc), [line 43](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/rateLimits.jsdoc#L43) | ||
* [node-kraken-api/api/rateLimits/rateLimits.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc), [line 43](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/rateLimits.jsdoc#L43) | ||
<a name="~State"></a> | ||
#### State | ||
### State | ||
Holds data relevant to current execution state. | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate limter behavior configuration. | | ||
| `calls` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate info for all calls. | | ||
| `catInfo` | [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~CatInfo) | Map of category to object containing category-specific rate information. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `limitConfig` | [API\~RateLimits~LimitConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~LimitConfig) | Rate limter behavior configuration. | | ||
| `calls` | [API\~RateLimits~CallInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CallInfo) | Rate info for all calls. | | ||
| `catInfo` | [API\~RateLimits~CatInfo](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~CatInfo) | Map of category to object containing category-specific rate information. | | ||
Source: | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js), [line 144](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/rateLimits/loadLimiter.js#L144) | ||
* [node-kraken-api/api/rateLimits/loadLimiter.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js), [line 167](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/rateLimits/loadLimiter.js#L167) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -1,45 +0,45 @@ | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md)~Syncing | ||
# [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md)~Syncing | ||
Types and methods specific to scheduling persistent [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Call) operations. | ||
Types and methods specific to scheduling persistent [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Call) operations. | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `LoadSync` | [module:API/Syncing/LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | Loads settings and loaded call function and returns stateful sync creation function. | | ||
| `LoadSync` | [module:API/Syncing/LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | Loads settings and loaded call function and returns stateful sync creation function. | | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L7) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L7) | ||
### Methods | ||
## Methods | ||
<a name="~AddListener"></a> | ||
#### (inner) AddListener(listener) → \{boolean} | ||
Associates a new [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) with the instance. | ||
### (inner) AddListener(listener) → \{boolean} | ||
##### Parameters: | ||
Associates a new [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) with the instance. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | Listener function to add. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | Listener function to add. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 443](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L443) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 443](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L443) | ||
##### Returns: | ||
__Returns:__ | ||
True if added successfully. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~Close"></a> | ||
#### (inner) Close() → \{boolean} | ||
### (inner) Close() → \{boolean} | ||
Closes the instance if opened. | ||
@@ -49,64 +49,65 @@ | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 416](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L416) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 416](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L416) | ||
##### Returns: | ||
__Returns:__ | ||
True if closed or already closed. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~HandleRequests"></a> | ||
#### (inner) HandleRequests(state, cat) → \{Promise} | ||
Handles request queue and sends data to associated [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener)s. | ||
### (inner) HandleRequests(state, cat) → \{Promise} | ||
##### Parameters: | ||
Handles request queue and sends data to associated [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener)s. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `state` | [API\~Syncing~State](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~State) | Object containing runtime data. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category) | Current rate-limit category. | | ||
| `state` | [API\~Syncing~State](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~State) | Object containing runtime data. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category) | Current rate-limit category. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 132](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L132) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 132](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L132) | ||
##### Returns: | ||
__Returns:__ | ||
Promise which resolves when there are no more requests to process and rejects upon any operational errors. | ||
Type | ||
___Type:___ | ||
Promise | ||
* Promise | ||
<a name="~Once"></a> | ||
#### (inner) Once(listeneropt) → \{boolean|Promise} | ||
Adds a one-time [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) to the instance. If no listener is provided as a parameter, returns a promise which resolves with the next update's error or data. | ||
### (inner) Once(listeneropt) → \{boolean|Promise} | ||
##### Parameters: | ||
Adds a one-time [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) to the instance. If no listener is provided as a parameter, returns a promise which resolves with the next update's error or data. | ||
__Parameters:__ | ||
| Name | Type | Attributes | Description | | ||
| --- | --- | --- | --- | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | \<optional> | Once listener function to add. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | \<optional> | Once listener function to add. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 459](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L459) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 459](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L459) | ||
##### Returns: | ||
__Returns:__ | ||
Returns true if added successfully or a promise if a listener function is not provided. | ||
Type | ||
___Type:___ | ||
boolean | Promise | ||
* boolean | Promise | ||
<a name="~Open"></a> | ||
#### (inner) Open() → \{boolean} | ||
### (inner) Open() → \{boolean} | ||
Opens the instance if closed. | ||
@@ -116,174 +117,176 @@ | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 372](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L372) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 372](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L372) | ||
##### Returns: | ||
__Returns:__ | ||
True if opened or already open. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~ParseArgs"></a> | ||
#### (inner) ParseArgs(settings, method, options, interval, listener) → \{[API\~Syncing~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Arguments)} | ||
### (inner) ParseArgs(settings, method, options, interval, listener) → \{[API\~Syncing~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Arguments)} | ||
Parses inputted arguments and reassigns them based on their type. Arguments will be successfully recognized regardless of omissions. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | Listener for errors and data. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Current settings configuration. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | Listener for errors and data. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 209](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L209) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 209](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L209) | ||
##### Throws: | ||
__Throws:__ | ||
Throws 'Bad arguments' or 'Bad method' errors if arguments are invalid. | ||
Type | ||
___Type:___ | ||
Error | ||
* Error | ||
##### Returns: | ||
__Returns:__ | ||
Parsed sync arguments. | ||
Type | ||
___Type:___ | ||
[API\~Syncing~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Arguments) | ||
* [API\~Syncing~Arguments](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Arguments) | ||
<a name="~RemoveListener"></a> | ||
#### (inner) RemoveListener(listener) → \{boolean} | ||
Disassociates an [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) from the instance. | ||
### (inner) RemoveListener(listener) → \{boolean} | ||
##### Parameters: | ||
Disassociates an [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) from the instance. | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | Listener function to remove. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | Listener function to remove. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 451](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L451) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 451](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L451) | ||
##### Returns: | ||
__Returns:__ | ||
True if not in the listeners set. | ||
Type | ||
___Type:___ | ||
boolean | ||
* boolean | ||
<a name="~Sync"></a> | ||
#### (inner) Sync(method, optionsopt, intervalopt, listeneropt) → \{[API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Instance)} | ||
### (inner) Sync(method, optionsopt, intervalopt, listeneropt) → \{[API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Instance)} | ||
Stateful function which creates sync instances. Any argument (except method) may be omitted and replaced with another, as long as the order \[options, interval, listener\] is preserved. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Attributes | Description | | ||
| --- | --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | \<optional> | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Interval) | \<optional> | Minimum update interval for sync operation. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | \<optional> | Listener for error and data events. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | \<optional> | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Interval) | \<optional> | Minimum update interval for sync operation. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | \<optional> | Listener for error and data events. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 307](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L307) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 307](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L307) | ||
##### Throws: | ||
__Throws:__ | ||
Throws 'Bad arguments' or 'Bad method' errors if arguments are invalid. | ||
Type | ||
___Type:___ | ||
Error | ||
* Error | ||
##### Returns: | ||
__Returns:__ | ||
Instance of sync operation. | ||
Type | ||
___Type:___ | ||
[API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Instance) | ||
* [API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Instance) | ||
<a name="~VerifyInternals"></a> | ||
#### (inner) VerifyInternals(state, cat, serial, internals) | ||
### (inner) VerifyInternals(state, cat, serial, internals) | ||
Responds to changes to changes within the instances associated with the current thread. Pushes out errors if the params are invalid and reverts changes. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `state` | [API\~Syncing~State](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~State) | Object containing runtime data. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category) | Rate limiting category of the current thread. | | ||
| `serial` | [API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialParams) | Serial currently associated with the call that triggered verifyInternals. | | ||
| `internals` | [API\~Syncing~InternalSet](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~InternalSet) | Set of all internals associated with the current thread. | | ||
| `state` | [API\~Syncing~State](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~State) | Object containing runtime data. | | ||
| `cat` | [API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category) | Rate limiting category of the current thread. | | ||
| `serial` | [API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialParams) | Serial currently associated with the call that triggered verifyInternals. | | ||
| `internals` | [API\~Syncing~InternalSet](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~InternalSet) | Set of all internals associated with the current thread. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 11](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L11) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 11](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L11) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~Arguments"></a> | ||
#### Arguments | ||
### Arguments | ||
Contains parsed and assigned arguments from initial call of the sync operation. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) | Event listener for sync error and data events. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `listener` | [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) | Event listener for sync error and data events. | | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L14) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L14) | ||
<a name="~CatThreads"></a> | ||
#### CatThreads | ||
Holds maps of [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) to internal instances by rate-limit category. Different categories are executed in parallel. | ||
### CatThreads | ||
##### Type: | ||
Holds maps of [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) to internal instances by rate-limit category. Different categories are executed in parallel. | ||
* Map.<[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Category), [API\~Syncing~Thread](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Thread)> | ||
__Type:__ | ||
* Map.<[API\~RateLimits~Category](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Category), [API\~Syncing~Thread](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Thread)> | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 57](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L57) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 57](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L57) | ||
<a name="~Error"></a> | ||
#### Error | ||
Timestamped [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallError) (or other execution error) which is added to the instance error array and sent to any available listeners. | ||
### Error | ||
##### Type: | ||
Timestamped [API\~Calls~CallError](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallError) (or other execution error) which is added to the instance error array and sent to any available listeners. | ||
* Error | ||
__Type:__ | ||
##### Properties: | ||
* Error | ||
__Properties:__ | ||
| Name | Type | Description | | ||
@@ -293,187 +296,192 @@ | --- | --- | --- | | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 50](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L50) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 50](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L50) | ||
<a name="~EventListener"></a> | ||
#### EventListener(err, data, instanceopt) | ||
### EventListener(err, data, instanceopt) | ||
Callback function that is executed upon sync errors or data events. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Attributes | Description | | ||
| --- | --- | --- | --- | | ||
| `err` | [API\~Syncing~Error](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Error) | | Sync error. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) | | Data received from call. | | ||
| `instance` | [API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Instance) | \<optional> | Reference to the current instance, if necessary. | | ||
| `err` | [API\~Syncing~Error](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Error) | | Sync error. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) | | Data received from call. | | ||
| `instance` | [API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Instance) | \<optional> | Reference to the current instance, if necessary. | | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 41](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L41) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 41](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L41) | ||
<a name="~Instance"></a> | ||
#### Instance | ||
### Instance | ||
Sync instance used for behavior manipulation and data retrieval. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `status` | [API\~Syncing~Status](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Status) | Current status of the instance. Set to 'init' until request attempt, 'open' when active, and 'closed' when not. Note: changing this value during runtime will not change instance behaviors; use the associated 'open' and 'close' methods instead. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update time. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Current method associated with the instance. Changes to this value during runtime will result in thread reassignment if valid; if invalid, will be reverted and will notify the event listeners with an 'Invalid method' error. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Current method-specific options. Changes to this value during runtime will result in map reassignment if valid; if invalid (not an object), will be reverted and will notify the event listeners with an 'Invalid options' error. | | ||
| `data` | [API\~Syncing~InstanceData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~InstanceData) | Object containing data from the last successful response. | | ||
| `time` | number | Time (in ms) of last successful [API\~Syncing~InstanceData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~InstanceData) update. | | ||
| `open` | [API\~Syncing~Open](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Open) | Opens the instance if closed. | | ||
| `close` | [API\~Syncing~Close](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Close) | Closes the instance if open. | | ||
| `addListener` | [API\~Syncing~AddListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~AddListener) | Associates a new [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener). | | ||
| `removeListener` | [API\~Syncing~RemoveListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~RemoveListener) | Disassociates a [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener). | | ||
| `once` | [API\~Syncing~Once](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Once) | Adds a one-time [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) if provided; otherwise returns a promise which resolves/rejects on the next error/data event. | | ||
| `status` | [API\~Syncing~Status](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Status) | Current status of the instance. Set to 'init' until request attempt, 'open' when active, and 'closed' when not. Note: changing this value during runtime will not change instance behaviors; use the associated 'open' and 'close' methods instead. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update time. | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Current method associated with the instance. Changes to this value during runtime will result in thread reassignment if valid; if invalid, will be reverted and will notify the event listeners with an 'Invalid method' error. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Current method-specific options. Changes to this value during runtime will result in map reassignment if valid; if invalid (not an object), will be reverted and will notify the event listeners with an 'Invalid options' error. | | ||
| `data` | [API\~Syncing~InstanceData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~InstanceData) | Object containing data from the last successful response. | | ||
| `time` | number | Time (in ms) of last successful [API\~Syncing~InstanceData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~InstanceData) update. | | ||
| `open` | [API\~Syncing~Open](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Open) | Opens the instance if closed. | | ||
| `close` | [API\~Syncing~Close](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Close) | Closes the instance if open. | | ||
| `addListener` | [API\~Syncing~AddListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~AddListener) | Associates a new [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener). | | ||
| `removeListener` | [API\~Syncing~RemoveListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~RemoveListener) | Disassociates a [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener). | | ||
| `once` | [API\~Syncing~Once](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Once) | Adds a one-time [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) if provided; otherwise returns a promise which resolves/rejects on the next error/data event. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 328](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L328) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 328](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L328) | ||
<a name="~InstanceData"></a> | ||
#### InstanceData | ||
Data value of the instance. Defaults to an object that is replaced with [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) upon every successful call, but may be customized within an [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener) or otherwise. | ||
### InstanceData | ||
##### Type: | ||
Data value of the instance. Defaults to an object that is replaced with [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) upon every successful call, but may be customized within an [API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener) or otherwise. | ||
* Object | * | ||
__Type:__ | ||
* Object | * | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 23](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L23) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 23](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L23) | ||
<a name="~Internal"></a> | ||
#### Internal | ||
### Internal | ||
Internal sync instance data. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `status` | [API\~Syncing~Status](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Status) | Current status of the request. | | ||
| `status` | [API\~Syncing~Status](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Status) | Current status of the request. | | ||
| `paused` | boolean | Whether or not sync updates are paused due to interval. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Params) | Object containing method and options. | | ||
| `instance` | [API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Instance) | Instance being tracked. | | ||
| `listeners` | Set.<[API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~EventListener)> | Set of all associated event listeners. | | ||
| `interval` | [API\~Syncing~Interval](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Interval) | Minimum sync update interval. | | ||
| `params` | [API\~Calls~Params](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Params) | Object containing method and options. | | ||
| `instance` | [API\~Syncing~Instance](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Instance) | Instance being tracked. | | ||
| `listeners` | Set.<[API\~Syncing~EventListener](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~EventListener)> | Set of all associated event listeners. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 348](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L348) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 348](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L348) | ||
<a name="~InternalSet"></a> | ||
#### InternalSet | ||
### InternalSet | ||
Set of all internal instances associated with a call. | ||
##### Type: | ||
__Type:__ | ||
* Set.<[API\~Syncing~Internal](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~Internal)> | ||
* Set.<[API\~Syncing~Internal](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~Internal)> | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 69](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L69) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 69](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L69) | ||
<a name="~Interval"></a> | ||
#### Interval | ||
### Interval | ||
Interval for sync updates. Triggers a removal of the instance from the update queue and spawns a timeout for re-integration. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 35](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L35) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 35](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L35) | ||
<a name="~State"></a> | ||
#### State | ||
### State | ||
Contains runtime information to be passed around within sync operations. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | Settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Call) | Stateful call function. | | ||
| `catThreads` | [API\~Syncing~CatThreads](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~CatThreads) | Map of category to map of serials to internals set. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialRegistry) | Maps serialized params to actual params. | | ||
| `settings` | [Settings~Config](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | Settings configuration. | | ||
| `limiter` | [API\~RateLimits~Functions](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md#~Functions) | Limiter instance. | | ||
| `call` | [API\~Calls~Call](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Call) | Stateful call function. | | ||
| `catThreads` | [API\~Syncing~CatThreads](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~CatThreads) | Map of category to map of serials to internals set. | | ||
| `serialReg` | [API\~Calls~SerialRegistry](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialRegistry) | Maps serialized params to actual params. | | ||
Source: | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js), [line 290](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/loadSync.js#L290) | ||
* [node-kraken-api/api/syncing/loadSync.js](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js), [line 290](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/loadSync.js#L290) | ||
<a name="~Status"></a> | ||
#### Status | ||
Current state of the instance's request. 'init' if first [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) has not been received; 'open' if queued; 'closed' if not queued. | ||
### Status | ||
##### Type: | ||
Current state of the instance's request. 'init' if first [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) has not been received; 'open' if queued; 'closed' if not queued. | ||
* 'init' | 'open' | 'closed' | ||
__Type:__ | ||
* 'init' | 'open' | 'closed' | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 29](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L29) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 29](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L29) | ||
<a name="~Thread"></a> | ||
#### Thread | ||
### Thread | ||
Maps serial params to internal instances. | ||
##### Type: | ||
__Type:__ | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~SerialParams), [API\~Syncing~InternalSet](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md#~InternalSet)> | ||
* Map.<[API\~Calls~SerialParams](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~SerialParams), [API\~Syncing~InternalSet](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md#~InternalSet)> | ||
Source: | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc), [line 63](https://github.com/jpcx/node-kraken-api/blob/0.3.1/api/syncing/syncing.jsdoc#L63) | ||
* [node-kraken-api/api/syncing/syncing.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc), [line 63](https://github.com/jpcx/node-kraken-api/blob/0.4.0/api/syncing/syncing.jsdoc#L63) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -7,309 +7,327 @@ # Kraken | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L7) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L7) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~AuthCounterLimit"></a> | ||
#### AuthCounterLimit | ||
Positive integer counter limit used for determining private API rate limit adherence. Depends on the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
### AuthCounterLimit | ||
##### Type: | ||
Positive integer counter limit used for determining private API rate limit adherence. Depends on the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
* [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthRateLimitCount) | ||
__Type:__ | ||
* [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthRateLimitCount) | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 122](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L122) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 122](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L122) | ||
<a name="~AuthDecrementInterval"></a> | ||
#### AuthDecrementInterval | ||
Number of seconds for the [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthRateLimitCount) to decrement by one. Depends on the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
### AuthDecrementInterval | ||
##### Type: | ||
Number of seconds for the [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthRateLimitCount) to decrement by one. Depends on the [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
* number | ||
__Type:__ | ||
* number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 134](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L134) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 134](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L134) | ||
<a name="~AuthIncrementAmount"></a> | ||
#### AuthIncrementAmount | ||
Positive integer counter increment amount used for determining private API rate limit adherence. Depends on the [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
### AuthIncrementAmount | ||
##### Type: | ||
Positive integer counter increment amount used for determining private API rate limit adherence. Depends on the [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method). See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
* [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~AuthRateLimitCount) | ||
__Type:__ | ||
* [Kraken~AuthRateLimitCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~AuthRateLimitCount) | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 128](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L128) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 128](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L128) | ||
<a name="~AuthRateLimitCount"></a> | ||
#### AuthRateLimitCount | ||
### AuthRateLimitCount | ||
Counts within the the authenticated rate-limit counter. Kraken limits authenticated requests using a counter system. Counts go up when a call is made, and decay after a certain amount of time. Counter behavior is dependent on verification tier. See the [Kraken API docs](https://www.kraken.com/help/api#api-call-rate-limit) for more information. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 116](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L116) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 116](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L116) | ||
<a name="~Hostname"></a> | ||
#### Hostname | ||
### Hostname | ||
Hostname for the Kraken API endpoint. See the [Kraken API docs](https://www.kraken.com/help/api#public-market-data) for more info. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 80](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L80) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 80](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L80) | ||
<a name="~HTTPSRequestHeaders"></a> | ||
#### HTTPSRequestHeaders | ||
### HTTPSRequestHeaders | ||
HTTPS request headers for calls to Kraken servers. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `API-Key` | [Kraken~Key](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Key) | Kraken API key. | | ||
| `API-Sign` | [API\~Calls~Signature](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Signature) | Cryptographic signature using API secret and other call parameters. | | ||
| `API-Key` | [Kraken~Key](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Key) | Kraken API key. | | ||
| `API-Sign` | [API\~Calls~Signature](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Signature) | Cryptographic signature using API secret and other call parameters. | | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 92](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L92) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 92](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L92) | ||
<a name="~HTTPSRequestOptions"></a> | ||
#### HTTPSRequestOptions | ||
### HTTPSRequestOptions | ||
HTTPS request options for calls to Kraken servers. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `hostname` | [Kraken~Hostname](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Hostname) | Kraken hostname. | | ||
| `path` | [Kraken~Path](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Path) | Kraken method path. | | ||
| `method` | string | 'POST' HTTPS request specification. NOTE: This is NOT the same as the [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) for the request. | | ||
| `headers` | [Kraken~HTTPSRequestHeaders](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~HTTPSRequestHeaders) | Kraken HTTPS request headers. | | ||
| `hostname` | [Kraken~Hostname](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Hostname) | Kraken hostname. | | ||
| `path` | [Kraken~Path](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Path) | Kraken method path. | | ||
| `method` | string | 'POST' HTTPS request specification. NOTE: This is NOT the same as the [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) for the request. | | ||
| `headers` | [Kraken~HTTPSRequestHeaders](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~HTTPSRequestHeaders) | Kraken HTTPS request headers. | | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 100](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L100) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 100](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L100) | ||
<a name="~HTTPSRequestPOSTData"></a> | ||
#### HTTPSRequestPOSTData | ||
### HTTPSRequestPOSTData | ||
HTTPS request POST data for calls to Kraken servers. Generated using 'qs' module. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 110](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L110) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 110](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L110) | ||
<a name="~Key"></a> | ||
#### Key | ||
### Key | ||
API key from Kraken used for authenticated connections. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L13) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 13](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L13) | ||
<a name="~Method"></a> | ||
#### Method | ||
### Method | ||
Type of method being called on Kraken servers. See the [Kraken API docs](https://www.kraken.com/help/api#public-market-data) for more info. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 55](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L55) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 55](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L55) | ||
<a name="~Nonce"></a> | ||
#### Nonce | ||
### Nonce | ||
Unique ever-increasing integer used by Kraken servers to determine request validity. See the [Kraken API docs](https://www.kraken.com/help/api#general-usage) for more info. As recommended by Kraken, nonce is the current time in microseconds. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 74](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L74) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 74](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L74) | ||
<a name="~Option"></a> | ||
#### Option | ||
### Option | ||
A single option to be sent to the Kraken servers; varies by method type. | ||
##### Type: | ||
__Type:__ | ||
* string | number | ||
* string | number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 61](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L61) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 61](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L61) | ||
<a name="~Options"></a> | ||
#### Options | ||
### Options | ||
Method-specific options for calls to Kraken servers. See the [Kraken API docs](https://www.kraken.com/help/api#public-market-data) for more info. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `*` | [Kraken~Option](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Option) | An option to send to the servers. | | ||
| `*` | [Kraken~Option](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Option) | An option to send to the servers. | | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 67](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L67) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 67](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L67) | ||
<a name="~OTP"></a> | ||
#### OTP | ||
### OTP | ||
Two factor password used for authenticated calls (if required). | ||
##### Type: | ||
__Type:__ | ||
* number | string | ||
* number | string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L31) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 31](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L31) | ||
<a name="~Path"></a> | ||
#### Path | ||
### Path | ||
Path to the Kraken API endpoint for a given method. See the [Kraken API docs](https://www.kraken.com/help/api#public-market-data) for more info. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 86](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L86) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 86](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L86) | ||
<a name="~PrivateMethods"></a> | ||
#### PrivateMethods | ||
### PrivateMethods | ||
Set of server-side API methods available exclusively to authenticated users. | ||
##### Type: | ||
__Type:__ | ||
* Array | ||
* Array | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 49](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L49) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 49](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L49) | ||
<a name="~PublicMethods"></a> | ||
#### PublicMethods | ||
### PublicMethods | ||
Set of server-side API methods available to all users. | ||
##### Type: | ||
__Type:__ | ||
* Array | ||
* Array | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 43](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L43) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 43](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L43) | ||
<a name="~Secret"></a> | ||
#### Secret | ||
### Secret | ||
API secret from Kraken used for authenticated connections. | ||
##### Type: | ||
__Type:__ | ||
* string | ||
* string | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 19](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L19) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 19](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L19) | ||
<a name="~Tier"></a> | ||
#### Tier | ||
### Tier | ||
Verification tier from Kraken used for determining rate limits. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 25](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L25) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 25](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L25) | ||
<a name="~Version"></a> | ||
#### Version | ||
### Version | ||
Server-side API version. See the [Kraken API docs](https://www.kraken.com/help/api#public-market-data) for more info. | ||
##### Type: | ||
__Type:__ | ||
* number | ||
* number | ||
Source: | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc), [line 37](https://github.com/jpcx/node-kraken-api/blob/0.3.1/kraken/kraken.jsdoc#L37) | ||
* [node-kraken-api/kraken/kraken.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc), [line 37](https://github.com/jpcx/node-kraken-api/blob/0.4.0/kraken/kraken.jsdoc#L37) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -5,84 +5,84 @@ # Settings | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `ParseSettings` | [module:Settings/ParseSettings](module-Settings_Parsehttps://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | Parses user-provided settings, throws errors if necessary, and combines with defaults. | | ||
| `ParseSettings` | [module:Settings/ParseSettings](module-Settings_Parsehttps://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | Parses user-provided settings, throws errors if necessary, and combines with defaults. | | ||
Source: | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc#L7) | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc#L7) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~Config"></a> | ||
#### Config | ||
### Config | ||
Contains execution settings configuration for API operations. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Attributes | Default | Description | | ||
| --- | --- | --- | --- | --- | | ||
| `key` | [Kraken~Key](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Key) | \<optional> | '' | API key. | | ||
| `secret` | [Kraken~Secret](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Secret) | \<optional> | '' | API secret. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Tier) | \<optional> | 0 | Verification tier. | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~OTP) | \<optional> | null | Two factor password. | | ||
| `timeout` | [API\~Calls~Timeout](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~Timeout) | \<optional> | 5000 | Response timeout in ms. | | ||
| `retryct` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~RetryCount) | \<optional> | 3 | Maximum number of times to automatically retry a call after an error. | | ||
| `hostname` | [Kraken~Hostname](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Hostname) | \<optional> | 'api.kraken.com' | Hostname of the Kraken API endpoint. | | ||
| `version` | [Kraken~Version](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Version) | \<optional> | 0 | Kraken API version. | | ||
| `pubMethods` | [Kraken~PublicMethods](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~PublicMethods) | \<optional> | \[ 'Time', 'Assets','AssetPairs', 'Ticker','OHLC', 'Depth', 'Trades', 'Spread' \] | API methods available for public users. | | ||
| `privMethods` | [Kraken~PrivateMethods](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~PrivateMethods) | \<optional> | \[ 'Balance', 'TradeBalance', 'OpenOrders', 'ClosedOrders', 'QueryOrders', 'TradesHistory', 'QueryTrades', 'OpenPositions', 'Ledgers', 'QueryLedgers', 'TradeVolume', 'AddOrder', 'CancelOrder', 'DepositMethods', 'DepositAddresses', 'DepositStatus', 'WithdrawInfo', 'Withdraw', 'WithdrawStatus', 'WithdrawCancel' \] | API methods available for authenticated users. | | ||
| `parse` | [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md#~ParseNestedConfig) | \<optional> | { numbers: true, dates: true } | Response parser settings. | | ||
| `limiter` | [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~RateLimiter) | \<optional> | { baseIntvl: 500, minIntvl: 250 } | Settings for call interval limitations. | | ||
| `syncIntervals` | [Settings~SyncIntervals](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~SyncIntervals) | \<optional> | { Time: 2000, Assets: 2000, AssetPairs: 2000, Ticker: 2000, OHLC: 60000, Depth: 2000, Trades: 2000, Spread: 2000 } | | | ||
| `dataFormatter` | [Settings~DataFormatter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~DataFormatter) | \<optional> | null | Function for response data formatting (post-parsing, if enabled). | | ||
| `key` | [Kraken~Key](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Key) | \<optional> | '' | API key. | | ||
| `secret` | [Kraken~Secret](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Secret) | \<optional> | '' | API secret. | | ||
| `tier` | [Kraken~Tier](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Tier) | \<optional> | 0 | Verification tier. | | ||
| `otp` | [Kraken~OTP](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~OTP) | \<optional> | null | Two factor password. | | ||
| `timeout` | [API\~Calls~Timeout](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~Timeout) | \<optional> | 5000 | Response timeout in ms. | | ||
| `retryct` | [API\~Calls~RetryCount](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~RetryCount) | \<optional> | 3 | Maximum number of times to automatically retry a call after an error. | | ||
| `hostname` | [Kraken~Hostname](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Hostname) | \<optional> | 'api.kraken.com' | Hostname of the Kraken API endpoint. | | ||
| `version` | [Kraken~Version](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Version) | \<optional> | 0 | Kraken API version. | | ||
| `pubMethods` | [Kraken~PublicMethods](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~PublicMethods) | \<optional> | \[ 'Time', 'Assets','AssetPairs', 'Ticker','OHLC', 'Depth', 'Trades', 'Spread' \] | API methods available for public users. | | ||
| `privMethods` | [Kraken~PrivateMethods](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~PrivateMethods) | \<optional> | \[ 'Balance', 'TradeBalance', 'OpenOrders', 'ClosedOrders', 'QueryOrders', 'TradesHistory', 'QueryTrades', 'OpenPositions', 'Ledgers', 'QueryLedgers', 'TradeVolume', 'AddOrder', 'CancelOrder', 'DepositMethods', 'DepositAddresses', 'DepositStatus', 'WithdrawInfo', 'Withdraw', 'WithdrawStatus', 'WithdrawCancel' \] | API methods available for authenticated users. | | ||
| `parse` | [Tools~ParseNestedConfig](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md#~ParseNestedConfig) | \<optional> | { numbers: true, dates: true } | Response parser settings. | | ||
| `limiter` | [Settings~RateLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~RateLimiter) | \<optional> | { baseIntvl: 500, minIntvl: 250 } | Settings for call interval limitations. | | ||
| `syncIntervals` | [Settings~SyncIntervals](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~SyncIntervals) | \<optional> | { Time: 2000, Assets: 2000, AssetPairs: 2000, Ticker: 2000, OHLC: 60000, Depth: 2000, Trades: 2000, Spread: 2000 } | | | ||
| `dataFormatter` | [Settings~DataFormatter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~DataFormatter) | \<optional> | null | Function for response data formatting (post-parsing, if enabled). | | ||
Source: | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc#L14) | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc), [line 14](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc#L14) | ||
<a name="~DataFormatter"></a> | ||
#### DataFormatter(method, options, data) → \{*} | ||
### DataFormatter(method, options, data) → \{*} | ||
Formats response data (post-parsing, if enabled). Anything returned from this function is returned as the call response; returning nothing will result in the call to respond with `undefined`. | ||
##### Parameters: | ||
__Parameters:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md#~CallData) | Data received from call (post-parsing, if enabled). | | ||
| `method` | [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) | Method being called. | | ||
| `options` | [Kraken~Options](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Options) | Method-specific options. | | ||
| `data` | [API\~Calls~CallData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md#~CallData) | Data received from call (post-parsing, if enabled). | | ||
Source: | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc), [line 49](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc#L49) | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc), [line 49](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc#L49) | ||
##### Returns: | ||
__Returns:__ | ||
Formatted data. | ||
Type | ||
___Type:___ | ||
* \* | ||
* \* | ||
<a name="~RateLimiter"></a> | ||
#### RateLimiter | ||
### RateLimiter | ||
Limits calls frequency. Call frequency begins at base and is gradually reduced to minimum if no violations are triggered. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
@@ -94,45 +94,45 @@ | Name | Type | Description | | ||
Source: | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc), [line 34](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc#L34) | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc), [line 34](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc#L34) | ||
<a name="~SyncIntervals"></a> | ||
#### SyncIntervals | ||
### SyncIntervals | ||
Defines default method intervals for sync updates. Intervals may be set here or via each sync instance individually. | ||
##### Type: | ||
__Type:__ | ||
* Object | ||
* Object | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `*` | number | Name of [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md#~Method) and default interval (in ms). | | ||
| `*` | number | Name of [Kraken~Method](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md#~Method) and default interval (in ms). | | ||
Source: | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc), [line 42](https://github.com/jpcx/node-kraken-api/blob/0.3.1/settings/settings.jsdoc#L42) | ||
* [node-kraken-api/settings/settings.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc), [line 42](https://github.com/jpcx/node-kraken-api/blob/0.4.0/settings/settings.jsdoc#L42) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
@@ -5,25 +5,25 @@ # Tools | ||
##### Properties: | ||
__Properties:__ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `AlphabetizeNested` | [module:Tools/AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | Alphabetizes a nested Object. | | ||
| `ParseNested` | [module:Tools/ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | Parses a nested Object, Array, Map, or Set according to the rules defined in Settings~Parse | | ||
| `AlphabetizeNested` | [module:Tools/AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | Alphabetizes a nested Object. | | ||
| `ParseNested` | [module:Tools/ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | Parses a nested Object, Array, Map, or Set according to the rules defined in Settings~Parse | | ||
Source: | ||
* [node-kraken-api/tools/tools.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/tools.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/tools.jsdoc#L7) | ||
* [node-kraken-api/tools/tools.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/tools.jsdoc), [line 7](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/tools.jsdoc#L7) | ||
### Type Definitions | ||
## Type Definitions | ||
<a name="~ParseNestedConfig"></a> | ||
#### ParseNestedConfig | ||
##### Type: | ||
### ParseNestedConfig | ||
* Object | ||
__Type:__ | ||
##### Properties: | ||
* Object | ||
__Properties:__ | ||
| Name | Type | Description | | ||
@@ -34,25 +34,25 @@ | --- | --- | --- | | ||
Source: | ||
* [node-kraken-api/tools/tools.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/tools.jsdoc), [line 15](https://github.com/jpcx/node-kraken-api/blob/0.3.1/tools/tools.jsdoc#L15) | ||
* [node-kraken-api/tools/tools.jsdoc](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/tools.jsdoc), [line 15](https://github.com/jpcx/node-kraken-api/blob/0.4.0/tools/tools.jsdoc#L15) | ||
<hr> | ||
___ | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.3.1/README.md) | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
## [Home](https://github.com/jpcx/node-kraken-api/blob/0.4.0/README.md) | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) |
{ | ||
"name": "node-kraken-api", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "Interfaces with the Kraken cryptocurrency exchange API. Observes rate limits. Parses response JSON, converts stringed numbers, and normalizes timestamps. Facilitates persistent data syncing.", | ||
@@ -32,3 +32,2 @@ "engines": { | ||
"dependencies": { | ||
"crypto": "^1.0.1", | ||
"qs": "^6.5.2", | ||
@@ -39,5 +38,2 @@ "deep-props": "^0.3.3", | ||
"devDependencies": { | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-jsdoc": "^3.5.0", | ||
"eslint-plugin-node": "^6.0.1", | ||
"jest": "^23.0.0", | ||
@@ -44,0 +40,0 @@ "jsdoc": "^3.5.5", |
103
README.md
@@ -38,2 +38,3 @@ # node-kraken-api | ||
___NOTE:___ Use a read-only key to be safe. | ||
```console | ||
@@ -44,2 +45,3 @@ nano /path/to/node_modules/node-kraken-api/auth.json | ||
___Installing the jest library:___ | ||
```console | ||
@@ -58,2 +60,3 @@ npm i --prefix /path/to/node_modules/node-kraken-api jest | ||
___Loading the module:___ | ||
```js | ||
@@ -64,2 +67,3 @@ const kraken = require('node-kraken-api') | ||
___Public client instantiation:___ | ||
```js | ||
@@ -70,2 +74,3 @@ const api = kraken() | ||
___Private client instantiation (with authenticated [configuration](#configuration)):___ | ||
```js | ||
@@ -93,2 +98,3 @@ const api = kraken({ | ||
___Instantiation with any number of configuration settings (see [configuration](#configuration)):___ | ||
```js | ||
@@ -111,5 +117,6 @@ const api = kraken(require('./config.json')) | ||
#### Making a single call: | ||
#### Making a single call | ||
___Using promises:___ | ||
```js | ||
@@ -122,2 +129,3 @@ api.call('Time') | ||
___Using callbacks:___ | ||
```js | ||
@@ -131,2 +139,3 @@ api.call('Time', (err, data) => { | ||
___Using promises (with Kraken method options):___ | ||
```js | ||
@@ -139,2 +148,3 @@ api.call('Depth', { pair: 'XXBTZUSD', count: 1 }) | ||
___Using callbacks (with Kraken method options):___ | ||
```js | ||
@@ -149,5 +159,6 @@ api.call('Depth', { pair: 'XXBTZUSD', count: 1 }, | ||
<a name='setOTP'></a> | ||
___Using a one-time password (if enabled):___ | ||
<a name='setOTP'></a> | ||
___NOTE:___ Due to call queueing functionality and rate limiting, OTP may need to be set again if the call has not been executed before the password decays. This shouldn't be a problem unless there have been a very large volume of calls sent to the queue. | ||
@@ -158,2 +169,3 @@ | ||
As such, it is best to continuously call setOTP with each new password until an error or response has been received. | ||
```js | ||
@@ -171,5 +183,7 @@ api.setOTP(158133) | ||
<a name='dataFormatter'></a> | ||
#### Custom formatting of response data: | ||
Response data may be formatted in any way based on method and options by setting a [DataFormatter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~DataFormatter) function during instantiation. | ||
#### Custom formatting of response data | ||
Response data may be formatted in any way based on method and options by setting a [DataFormatter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~DataFormatter) function during instantiation. | ||
___NOTE:___ Any data returned from this function will be treated as the new data, and call responses will be undefined if it does not return anything. | ||
@@ -180,2 +194,3 @@ | ||
___Adding a time formatting rule:___ | ||
```js | ||
@@ -200,5 +215,7 @@ const dataFormatter = (method, options, data) => { | ||
<a name='syncing'></a> | ||
#### Working with data syncing: | ||
#### Working with data syncing | ||
___Creating a sync object:___ | ||
```js | ||
@@ -215,2 +232,3 @@ const timeSync = api.sync('Time') | ||
___Creating a sync object with a custom update interval:___ | ||
```js | ||
@@ -228,2 +246,3 @@ // updates every 5 seconds | ||
___Using syncing promises:___ | ||
```js | ||
@@ -248,2 +267,3 @@ const api = require('./')() | ||
___Creating a sync object (using a listener callback):___ | ||
```js | ||
@@ -259,2 +279,3 @@ const timeSync = api.sync('Time', | ||
___Adding a listener callback after creation:___ | ||
```js | ||
@@ -269,2 +290,3 @@ const timeSync = api.sync('Time') | ||
___Adding a once listener via Promises:___ | ||
```js | ||
@@ -278,2 +300,3 @@ const timeSync = api.sync('Time') | ||
___Adding a once listener callback:___ | ||
```js | ||
@@ -288,2 +311,3 @@ const timeSync = api.sync('Time') | ||
___Closing a sync operation:___ | ||
```js | ||
@@ -302,2 +326,3 @@ const timeSync = api.sync('Time') | ||
___Re-opening a sync operation:___ | ||
```js | ||
@@ -318,2 +343,3 @@ const timeSync = api.sync('Time') | ||
___Removing a sync listener callback:___ | ||
```js | ||
@@ -332,2 +358,3 @@ const timeSync = api.sync('Time') | ||
<a name='syncUpdates'></a> | ||
#### Updating Instance Options | ||
@@ -339,2 +366,3 @@ | ||
___Logging new trades only:___ | ||
```js | ||
@@ -357,2 +385,3 @@ const tradesSync = api.sync( | ||
<a name='syncInstanceMods'></a> | ||
#### Custom Handling of Sync Data | ||
@@ -363,2 +392,3 @@ | ||
___Creating a realtime historical trades tracker:___ | ||
```js | ||
@@ -392,3 +422,3 @@ const tradesHistory = api.sync( | ||
___NOTE:___ OHLC calls are set to a 60s sync interval by default. This may be changed either in the settings configuration, during instance creation, or by changing the instance's <code>interval</code> property. | ||
___NOTE:___ OHLC calls are set to a 60s sync interval by default. This may be changed either in the settings configuration, during instance creation, or by changing the instance's `interval` property. | ||
@@ -434,2 +464,3 @@ ```js | ||
<a name='configuration'></a> | ||
## Configuration | ||
@@ -439,3 +470,3 @@ | ||
Configuration specifications are detailed in the documentation [here](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) | ||
Configuration specifications are detailed in the documentation [here](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) | ||
@@ -462,9 +493,9 @@ Additionally, various settings may be modified during runtime by using the following functions: | ||
Method names are found within the 'URL' subtitle in the Kraken API docs. For example: under 'Get server time', the text 'URL: https://api.kraken.com/0/public/Time' shows that the method name is 'Time'. | ||
Method names are found within the 'URL' subtitle in the Kraken API docs. For example: 'Get server time', lists the URL as <https://api.kraken.com/0/public/Time>, which means that the method name is 'Time'. | ||
Alternatively, refer to the [default settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md#~Config) in the node-kraken-api documentation. Default method types are listed here (under the 'pubMethods' and 'privMethods' properties). | ||
Alternatively, refer to the [default settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md#~Config) in the node-kraken-api documentation. Default method types are listed here (under the 'pubMethods' and 'privMethods' properties). | ||
Method options are found under the 'Input:' section. For example, 'Get order book' lists the following: | ||
``` | ||
```js | ||
pair = asset pair to get market depth for | ||
@@ -474,28 +505,28 @@ count = maximum number of asks/bids (optional) | ||
This translates to an object such as <code>{ pair: 'XXBTZUSD', count: 10 }</code>, which should be used when passing method options to API calls. | ||
This translates to an object such as `{ pair: 'XXBTZUSD', count: 10 }`, which should be used when passing method options to API calls. | ||
You may learn more about the types of options and response data by probing the API. Use the methods 'Assets' and 'AssetPairs' to discover the naming scheme for the assets tradable via Kraken. | ||
### Internal: | ||
+ [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/node-kraken-api.md) | ||
+ [API](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API.md) | ||
+ [Calls](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Calls.md) | ||
+ [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/GenRequestData.md) | ||
+ [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/LoadCall.md) | ||
+ [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Calls/SignRequest.md) | ||
+ [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/RateLimits.md) | ||
+ [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/RateLimits/LoadLimiter.md) | ||
+ [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/API/Syncing.md) | ||
+ [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/API/Syncing/LoadSync.md) | ||
+ [Settings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Settings.md) | ||
+ [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Settings/ParseSettings.md) | ||
+ [Tools](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Tools.md) | ||
+ [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/AlphabetizeNested.md) | ||
+ [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/modules/Tools/ParseNested.md) | ||
+ [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.3.1/docs/namespaces/Kraken.md) | ||
### Internal | ||
* [node-kraken-api](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/node-kraken-api.md) | ||
* [API](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API.md) | ||
* [Calls](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Calls.md) | ||
* [GenRequestData](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/GenRequestData.md) | ||
* [LoadCall](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/LoadCall.md) | ||
* [SignRequest](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Calls/SignRequest.md) | ||
* [RateLimits](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/RateLimits.md) | ||
* [LoadLimiter](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/RateLimits/LoadLimiter.md) | ||
* [Syncing](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/API/Syncing.md) | ||
* [LoadSync](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/API/Syncing/LoadSync.md) | ||
* [Settings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Settings.md) | ||
* [ParseSettings](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Settings/ParseSettings.md) | ||
* [Tools](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Tools.md) | ||
* [AlphabetizeNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/AlphabetizeNested.md) | ||
* [ParseNested](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/modules/Tools/ParseNested.md) | ||
* [Kraken](https://github.com/jpcx/node-kraken-api/blob/0.4.0/docs/namespaces/Kraken.md) | ||
## Versioning | ||
Versioned using [SemVer](http://semver.org/). For available versions, see the [Changelog](https://github.com/jpcx/node-kraken-api/blob/0.3.1/CHANGELOG.md). | ||
Versioned using [SemVer](http://semver.org/). For available versions, see the [Changelog](https://github.com/jpcx/node-kraken-api/blob/0.4.0/CHANGELOG.md). | ||
@@ -508,14 +539,12 @@ ## Contribution | ||
+ **Justin Collier** - [jpcx](https://github.com/jpcx) | ||
**Justin Collier** - [jpcx](https://github.com/jpcx) | ||
![bitcoin](http://i65.tinypic.com/34pkrib.jpg) | ||
`bitcoin:bc1qla9wynkvmnmcnygls5snqeu3rj5dxr7tunwzp6` | ||
Created using [npm-kraken-api](https://github.com/nothingisdead/npm-kraken-api) ([_nothingisdead_](https://github.com/nothingisdead)) for reference. | ||
___BTC donation address:___ | ||
bc1qla9wynkvmnmcnygls5snqeu3rj5dxr7tunwzp6 | ||
![donate](http://i66.tinypic.com/2rp4kd5.jpg) | ||
## License | ||
This project is licensed under the MIT License - see the [LICENSE](https://github.com/jpcx/node-kraken-api/blob/0.3.1/LICENSE) file for details | ||
This project is licensed under the MIT License - see the [LICENSE](https://github.com/jpcx/node-kraken-api/blob/0.4.0/LICENSE) file for details |
@@ -7,3 +7,3 @@ { | ||
"repo": "https://github.com/jpcx/node-kraken-api", | ||
"tag": "0.3.1", | ||
"tag": "0.4.0", | ||
"node": "8.7.0", | ||
@@ -151,3 +151,2 @@ "jsdoc": [ | ||
"dependencies": { | ||
"crypto": "^1.0.1", | ||
"qs": "^6.5.2", | ||
@@ -158,5 +157,2 @@ "deep-props": "^0.3.3", | ||
"devDependencies": { | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-jsdoc": "^3.5.0", | ||
"eslint-plugin-node": "^6.0.1", | ||
"jest": "^23.0.0", | ||
@@ -163,0 +159,0 @@ "jsdoc": "^3.5.5", |
@@ -107,4 +107,4 @@ /** | ||
const fixAsterixBullets = string => string.replace( | ||
/\* {3}\*/g, | ||
'* \\*' | ||
/\* +\*/g, | ||
'* \\*' | ||
) | ||
@@ -121,3 +121,3 @@ | ||
/^Type\n\n\*\n\n/gm, | ||
'Type\n\n* \\*\n\n' | ||
'Type\n\n* \\*\n\n' | ||
) | ||
@@ -138,2 +138,68 @@ | ||
/** | ||
* Formats header with # style. | ||
* | ||
* @private | ||
* @param {string} string - Search string. | ||
* @returns {string} Formatted string. | ||
*/ | ||
const formatTopModuleHeader = string => string.replace( | ||
/^(Module:[\S\s]*?)\n=*\n/gm, | ||
'# $1\n' | ||
) | ||
/** | ||
* Formats low-level headers to bold text. | ||
* | ||
* @private | ||
* @param {string} string - Search string. | ||
* @returns {string} Formatted string. | ||
*/ | ||
const formatLowLevelHeaders = string => string.replace( | ||
/^##### (.*:?)\n/gm, | ||
'__$1__\n' | ||
) | ||
/** | ||
* Converts bullets behind 3 spaces to bullets behind one space. | ||
* | ||
* @private | ||
* @param {string} string - Search string. | ||
* @returns {string} Formatted string. | ||
*/ | ||
const decreaseBulletSpaces = string => string.replace( | ||
/\* {3}/gm, | ||
'* ' | ||
) | ||
/** | ||
* Converts double linefeeds to single linefeeds. | ||
* | ||
* @private | ||
* @param {string} string - Search string. | ||
* @returns {string} Formatted string. | ||
*/ | ||
const reduceDoubleLineFeed = string => string.replace( | ||
/\n\n\n/g, | ||
'\n\n' | ||
) | ||
/** | ||
* Formats 'throws' and 'returns' type headings. Fixes double asterisks. | ||
* | ||
* @private | ||
* @param {string} string - Search string. | ||
* @returns {string} Formatted string. | ||
*/ | ||
const formatThrowsAndReturnsTypes = string => string.replace( | ||
/^(__Throws:__\n\n[\S\s]*?)(Type)(\n\n)([\S\s]*?)$(\n\n)/gm, | ||
'$1___$2:___$3* $4$5' | ||
).replace( | ||
/^(__Returns:__\n\n[\S\s]*?)(Type)(\n\n)([\S\s]*?)$(\n\n)/gm, | ||
'$1___$2:___$3* $4$5' | ||
).replace( | ||
/^\* \* \\\*$/gm, | ||
'* \\*' | ||
) | ||
/** | ||
* Escapes sub-namespace strikethrough indicators. | ||
@@ -265,3 +331,3 @@ * | ||
}, {}) | ||
let md = '' | ||
let md = '\n' | ||
/** | ||
@@ -276,4 +342,5 @@ * Recursively generates markdown table of contents from contents object. | ||
Object.entries(ref).forEach(entry => { | ||
md += ' ' + Array(depth + 1).join(' ') | ||
md += '+ ' + '[' + entry[0] + '](' + entry[1].url + ')\n' | ||
md += Array(depth + 1).join(' ') | ||
md += '* ' + '[' + entry[0] + '](' + entry[1].url + ')\n' | ||
if (depth === 0) depth++ | ||
if (Object.keys(entry[1].children).length > 0) { | ||
@@ -287,3 +354,3 @@ recurse(entry[1].children, depth + 1) | ||
/^\[Home\]\(index\.html\)\n-*\n[\s\S]*/gm, | ||
`<hr>\n\n## [Home](${localPathToURL(path, mappings)}/README.md)\n${md}` | ||
`___\n\n## [Home](${localPathToURL(path, mappings)}/README.md)\n${md}` | ||
) | ||
@@ -498,2 +565,5 @@ } | ||
proc[key] = removeTopNamespace(proc[key]) | ||
proc[key] = formatTopModuleHeader(proc[key]) | ||
proc[key] = formatLowLevelHeaders(proc[key]) | ||
proc[key] = formatThrowsAndReturnsTypes(proc[key]) | ||
proc[key] = formatHomeFooter(proc[key], key, mappings) | ||
@@ -506,2 +576,4 @@ proc[key] = formatSourceCodeURLs(proc[key]) | ||
proc[key] = escapeBarsWithinTablesFix(proc[key]) | ||
proc[key] = decreaseBulletSpaces(proc[key]) | ||
proc[key] = reduceDoubleLineFeed(proc[key]) | ||
proc[key] = proc[key].trim() | ||
@@ -535,8 +607,14 @@ return proc | ||
if (ID !== undefined) { | ||
return `<a name="${ID}"></a>\n#### ${content}` | ||
return `<a name="${ID}"></a>\n\n### ${content}` | ||
} else { | ||
return `#### ${content}` | ||
return `### ${content}` | ||
} | ||
} | ||
}) | ||
turndown.addRule('increaseH3', { | ||
filter: 'h3', | ||
replacement: (content, node) => { | ||
return `## ${content}\n\n` | ||
} | ||
}) | ||
turndown.addRule('escapeBarsWithinTables', { | ||
@@ -543,0 +621,0 @@ filter: 'td', |
@@ -20,9 +20,14 @@ /** | ||
expect(new Set(Object.keys(limiter))).toEqual( | ||
new Set( | ||
['attempt', 'addPass', 'addFail', 'getCategory', 'getAuthRegenIntvl'] | ||
) | ||
new Set([ | ||
'attempt', | ||
'addPass', | ||
'addFail', | ||
'addLockout', | ||
'getCategory', | ||
'getAuthRegenIntvl' | ||
]) | ||
) | ||
}) | ||
test('\'Attempt\' function returns promise', () => { | ||
test("'Attempt' function returns promise", () => { | ||
const limiter = loadLimiter(defaults) | ||
@@ -32,3 +37,3 @@ expect(limiter.attempt('other').constructor).toBe(Promise) | ||
test('\'AddPass\' function returns true', () => { | ||
test("'AddPass' function returns true", () => { | ||
const limiter = loadLimiter(defaults) | ||
@@ -38,3 +43,3 @@ expect(limiter.addPass('other')).toBe(true) | ||
test('\'AddFail\' function returns true', () => { | ||
test("'AddFail' function returns true", () => { | ||
const limiter = loadLimiter(defaults) | ||
@@ -129,3 +134,3 @@ expect(limiter.addFail('other')).toBe(true) | ||
test('Limits private calls correctly', async() => { | ||
test('Limits private calls correctly', async () => { | ||
jest.setTimeout(60000) | ||
@@ -137,6 +142,26 @@ const limiter = loadLimiter(defaults) | ||
} | ||
const starttm = Date.now() | ||
let starttm = Date.now() | ||
await limiter.attempt('Ledgers') | ||
expect(Date.now() - starttm).toBeGreaterThan(5800) | ||
expect(Date.now() - starttm).toBeLessThan(6200) | ||
}) | ||
limiter.addFail('Ledgers') | ||
starttm = Date.now() | ||
await limiter.attempt('Ledgers') | ||
expect(Date.now() - starttm).toBeGreaterThan(8800) | ||
expect(Date.now() - starttm).toBeLessThan(9200) | ||
}) | ||
test('Responds to lockouts', () => | ||
new Promise((resolve, reject) => { | ||
jest.setTimeout(60000) | ||
const limiter = loadLimiter(defaults) | ||
limiter.attempt('Time') | ||
limiter.addLockout('Time') | ||
const starttm = Date.now() | ||
limiter.attempt('OHLC').then(() => { | ||
expect(Date.now() - starttm).toBeGreaterThan(400) | ||
expect(Date.now() - starttm).toBeLessThan(600) | ||
setTimeout(resolve, 50000) | ||
limiter.attempt('Time').then(reject) | ||
}) | ||
})) |
@@ -1,3 +0,2 @@ | ||
const extract = require('deep-props').extract | ||
const set = require('deep-props').set | ||
const { extract, set } = require('deep-props') | ||
@@ -4,0 +3,0 @@ /** |
@@ -9,4 +9,3 @@ /** | ||
const extract = require('deep-props').extract | ||
const set = require('deep-props').set | ||
const { extract, set } = require('deep-props') | ||
const rangedDate = require('ranged-date') | ||
@@ -13,0 +12,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
282619
3
5
3272
516
- Removedcrypto@^1.0.1
- Removedcrypto@1.0.1(transitive)