@barfinex/utils
v1.0.10
Published
Utility functions and helper classes for the Barfinex ecosystem. Includes type guards, HTTP client, Redis client, and common helpers for trading applications.
Maintainers
Readme
@barfinex/utils
Shared utilities and helpers for the Barfinex ecosystem — date/math, HTTP client, Redis client, promises, and Provider-related helpers used across services.
Use this library wherever you need consistent formatting, retries, or low-level client logic without duplicating code in Provider, Detector, connectors, or plugins.
What it does
- Date & math —
dateandmathnamespaces for timestamps and calculations. - HTTP —
clienthelpers for requests and common patterns. - Async —
promiseutilities (e.g. retries, timeouts). - Provider —
providerUtilsfor Barfinex Provider-specific logic. - Type-safe — works with
@barfinex/typesand NestJS where needed.
Installation
npm install @barfinex/utilsor
yarn add @barfinex/utilsWhat's included
Namespaced exports:
| Namespace | Purpose |
|-----------|--------|
| date | Date/time and timestamp helpers. |
| math | Math and rounding helpers. |
| client | HTTP client and request helpers. |
| promise | Promise utilities (retry, etc.). |
| providerUtils | Provider-related helpers. |
Documentation
- Barfinex overview — First Steps, Architecture, Glossary.
- Deployment — Installation provider, Installation detector.
- APIs & troubleshooting — Provider API reference, Building with the API, Typical problems and solutions.
Contributing
New helpers and refactors welcome. Open an issue or PR. Community: Telegram · GitHub.
License
Licensed under the Apache License 2.0 with additional terms. Attribution to Barfin Network Limited and a link to https://barfinex.com are required. See LICENSE and the Barfinex site for details.
