## Functions
ObjectGenerates an auth signature, payload, and nonce for passing to the WS & REST APIs
booleanbooleannumberGenerates a new nonce for usage with the Bitfinex APIs
Array.<Array>Fills in missing (0 volume) candles on the provided dataset. The result is a new array (does not mutate)
stringSmartly set the precision (decimal) on a value based off of the significant digit maximum. For example, calling with 3.34 when the max sig figs allowed is 5 would return '3.3400', the representation number of decimals IF they weren't zeros.
stringCasts the provided value to a number if required, and limits the number of decimals to the specified value. Returns a decimal string.
stringPrepares a amount for submitting via the API
stringPrepares a price for submitting via the API
Object
Generates an auth signature, payload, and nonce for passing to the WS & REST
APIs
**Kind**: global function
**Returns**: Object - authSignature
| Param | Type | Description |
| --- | --- | --- |
| apiSecret | string | |
| payload | string | optional signature payload, generated by default |
## isClass(f) ⇒ boolean
**Kind**: global function
**Returns**: boolean - isClass
| Param | Type |
| --- | --- |
| f | Class |
## isSnapshot(msg) ⇒ boolean
**Kind**: global function
**Returns**: boolean - isSnapshot
| Param | Type |
| --- | --- |
| msg | Array \| Array.<Array> |
## nonce() ⇒ number
Generates a new nonce for usage with the Bitfinex APIs
**Kind**: global function
**Returns**: number - nonce
## padCandles(candles, candleWidth) ⇒ Array.<Array>
Fills in missing (0 volume) candles on the provided dataset. The result is a
new array (does not mutate)
**Kind**: global function
**Returns**: Array.<Array> - paddedCandles
| Param | Type | Description |
| --- | --- | --- |
| candles | Array.<Array> | array-format candles |
| candleWidth | number | in ms |
## setSigFig(n, maxSigs) ⇒ string
Smartly set the precision (decimal) on a value based off of the significant
digit maximum. For example, calling with 3.34 when the max sig figs allowed
is 5 would return '3.3400', the representation number of decimals IF they
weren't zeros.
**Kind**: global function
**Returns**: string - str
| Param | Type | Description |
| --- | --- | --- |
| n | number | |
| maxSigs | number | default 5 |
## setPrecision(number, decimals) ⇒ string
Casts the provided value to a number if required, and limits the number of
decimals to the specified value. Returns a decimal string.
**Kind**: global function
**Returns**: string - result
| Param | Type | Default |
| --- | --- | --- |
| number | number \| string | 0 |
| decimals | number | 0 |
## prepareAmount(amount) ⇒ string
Prepares a amount for submitting via the API
**Kind**: global function
**Returns**: string - preparedAmount
| Param | Type | Default |
| --- | --- | --- |
| amount | number \| string | 0 |
## preparePrice(price) ⇒ string
Prepares a price for submitting via the API
**Kind**: global function
**Returns**: string - preparedPrice
| Param | Type | Default |
| --- | --- | --- |
| price | number \| string | 0 |