Skip to content

Commit

Permalink
Merge pull request #24 from ezeswci/v2-compatibility
Browse files Browse the repository at this point in the history
V2 compatibility
  • Loading branch information
f3rno authored Apr 5, 2019
2 parents d47617e + 64a5fe4 commit c61c4cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/rest2.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ Get a list of valid symbol names

**Kind**: instance method of <code>[RESTv2](#RESTv2)</code>
**Returns**: <code>Promise</code> - p
**See**: https://docs.bitfinex.com/v1/reference#rest-public-symbols
**See**: https://docs.bitfinex.com/v2/reference#rest-public-symbols

| Param | Type | Description |
| --- | --- | --- |
Expand Down
8 changes: 5 additions & 3 deletions lib/rest2.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,13 @@ class RESTv2 {
*
* @param {Method?} cb - legacy callback
* @return {Promise} p
* @deprecated
* @see https://docs.bitfinex.com/v1/reference#rest-public-symbols
* @see https://docs.bitfinex.com/v2/reference#rest-public-symbols
*/
symbols (cb = () => {}) {
return this._makePublicLegacyRequest('symbols', cb)
const url = '/conf/pub:list:pair:exchange'
return this._makePublicRequest(url, cb, (data) => {
return data && data[0]
})
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-api-node-rest",
"version": "1.0.7",
"version": "1.0.8",
"description": "Official Bitfinex REST v1 & v2 API interfaces",
"engines": {
"node": ">=7"
Expand Down

0 comments on commit c61c4cb

Please sign in to comment.