{"id":22608979,"url":"https://github.com/bitfinexcom/bfx-api-node-util","last_synced_at":"2025-08-21T20:32:05.718Z","repository":{"id":46003681,"uuid":"145868892","full_name":"bitfinexcom/bfx-api-node-util","owner":"bitfinexcom","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-17T10:44:46.000Z","size":28,"stargazers_count":3,"open_issues_count":1,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-08T15:10:17.136Z","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}},"created_at":"2018-08-23T14:57:31.000Z","updated_at":"2021-11-22T10:00:59.000Z","dependencies_parsed_at":"2022-09-05T09:11:27.862Z","dependency_job_id":null,"html_url":"https://github.com/bitfinexcom/bfx-api-node-util","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fbfx-api-node-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitfinexcom","download_url":"https://codeload.github.com/bitfinexcom/bfx-api-node-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532443,"owners_count":18240792,"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-12-08T15:10:25.237Z","updated_at":"2024-12-20T04:07:04.225Z","avatar_url":"https://github.com/bitfinexcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitfinex API Utilities for Node.JS\n\n[![Build Status](https://travis-ci.org/bitfinexcom/bfx-api-node-util.svg?branch=master)](https://travis-ci.org/bitfinexcom/bfx-api-node-util)\n\nThis repo contains minor utilities shared by the Bitfinex Node.JS API libraries.\n\n### Features\n\n* `prepareAmount` and `preparePrice` for making values API-compatible\n* `nonce` generator function\n* `padCandles` for handling gaps in candle data returned by the Bitfinex APIs\n\n### Installation\n\n```bash\nnpm i --save bfx-api-node-util\n```\n\n### Quickstart\n\n```js\nconst { nonce } = require('bfx-api-node-util')\nconst n = nonce()\n\n// n is ready to be passed to API requests, or used as order CIDs, etc\n```\n\n### Docs\n\n[Refer to `docs/func_docs.md`](/docs/func_docs.md) for JSDoc-generated API documentation\n\n### Example: Padding Candles\n\n```js\nconst { padCandles } = require('bfx-api-node-util')\nconst { RESTv2 } = require('bfx-api-node-rest')\nconst rest = new RESTv2()\n\nconst candles = await rest.candles({\n  symbol: 'tBTCUSD',\n  timeframe: '1m',\n})\n\nconst paddedCandles = padCandles(candles, 60 * 1000)\n\n// paddedCandles are ready to be used for processing where 0-volume candles are required\n```\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-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitfinexcom%2Fbfx-api-node-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfinexcom%2Fbfx-api-node-util/lists"}