{"id":15676898,"url":"https://github.com/bitfinexcom/bfx-api-node-rest","last_synced_at":"2025-03-23T00:18:28.317Z","repository":{"id":33153399,"uuid":"145868829","full_name":"bitfinexcom/bfx-api-node-rest","owner":"bitfinexcom","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-17T10:34:10.000Z","size":1363,"stargazers_count":12,"open_issues_count":8,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-15T02:12:30.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitfinexcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-23T14:57:01.000Z","updated_at":"2024-09-17T10:23:02.000Z","dependencies_parsed_at":"2024-10-23T13:03:32.727Z","dependency_job_id":null,"html_url":"https://github.com/bitfinexcom/bfx-api-node-rest","commit_stats":{"total_commits":378,"total_committers":24,"mean_commits":15.75,"dds":0.7645502645502645,"last_synced_commit":"d32e2703dd0edbd46e9a615da42d59a9fd8b19a5"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitfinexcom","download_url":"https://codeload.github.com/bitfinexcom/bfx-api-node-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036423,"owners_count":20550712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T16:07:01.585Z","updated_at":"2025-03-23T00:18:28.296Z","avatar_url":"https://github.com/bitfinexcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitfinex RESTv1 \u0026 RESTv2 APIs for Node.JS\n\n[![Build Status](https://travis-ci.org/bitfinexcom/bfx-api-node-rest.svg?branch=master)](https://travis-ci.org/bitfinexcom/bfx-api-node-rest)\nA Node.JS reference implementation of the Bitfinex REST APIs\n\nTo use, construct a new instance of either the `RESTv1` or `RESTv2` classes.\nAll API methods return promises and accept a callback as the last parameter; the\ncallback will be called with `(error, response)`.\n\nTo minimize the data sent over the network the transmitted data is structured in\narrays. In order to reconstruct key / value pairs, set `opts.transform` to `true`\nwhen creating an interface.\n\n## Features\n\n* Official implementation\n* REST v2 API\n* REST v1 API\n\n## Installation\n\n```bash\n  npm i --save bfx-api-node-rest\n```\n\n### Quickstart\n\n```js\nconst { RESTv2 } = require('bfx-api-node-rest')\nconst rest = new RESTv2({ transform: true })\n\n// do something with the RESTv2 instance\n```\n\n### Docs\n\nDocumentation at [https://docs.bitfinex.com/v2/reference](https://docs.bitfinex.com/v2/reference)\n\n[See `docs/`](/docs) for JSDoc generated documentation of available methods.\n\n## Example\n\n```js\nconst { RESTv2 } = require('bfx-api-node-rest')\n\nconst rest = new RESTv2({\n  apiKey: '...',\n  apiSecret: '...',\n  authToken: '...', // optional, has priority over API key/secret\n  url: '...',       // optional\n  transform: true,  // to have full models returned by all methods\n  agent: null,      // optional proxy agent\n})\n\nrest.candles({\n  timeframe: '1m',\n  symbol: 'tBTCUSD',\n  query: {\n    start: Date.now() - (24 * 60 * 60 * 1000),\n    end: Date.now(),\n    limit: 1000,\n  }\n}).then((candles) =\u003e {\n  // ...\n}).catch((err) =\u003e {\n  console.log(err)\n})\n```\n\n## FAQ\n\n### nonce too small\n\nI make multiple parallel request and I receive an error that the nonce is too\nsmall. What does it mean?\n\nNonces are used to guard against replay attacks. When multiple HTTP requests\narrive at the API with the wrong nonce, e.g. because of an async timing issue,\nthe API will reject the request.\n\nIf you need to go parallel, you have to use multiple API keys right now.\n\n### Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfinexcom%2Fbfx-api-node-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitfinexcom%2Fbfx-api-node-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfinexcom%2Fbfx-api-node-rest/lists"}