@barfinex/orders
v1.0.5
Published
Orders library for the Barfinex ecosystem. Provides shared order models, services, and utilities for creating, managing, and processing trading orders in a unified way.
Maintainers
Readme
@barfinex/orders
Order management and execution layer for the Barfinex ecosystem — create, update, cancel, and track orders in one place, with TP/SL and metrics support.
This library unifies order lifecycle across connectors and detectors. Use it in Provider, Detector, or any service that needs to place or manage orders so logic stays consistent and type-safe.
What it does
- Order lifecycle —
OrderServicefor creation, updates, and cancellation; integration with connectors and detectors. - TP/SL —
TPSLServicefor take-profit and stop-loss handling on open positions. - Metrics —
MetricsServicefor order and performance statistics. - NestJS —
OrderModuleand helpers for transformation and normalization aligned with@barfinex/types.
Installation
npm install @barfinex/ordersor
yarn add @barfinex/ordersWhat's included
| Export | Purpose |
|--------|--------|
| OrderModule | NestJS module wiring order services. |
| OrderService | Core order CRUD and execution. |
| OrderHelpers | Transform and normalize order data. |
| MetricsService | Order and performance metrics. |
| TPSLService | Take-profit and stop-loss automation. |
Documentation
- Barfinex overview — First Steps, Architecture, Glossary.
- Provider (order API) — Installation provider, Provider API reference.
- Detector (signal → orders) — Installation detector, Signals context API.
- Inspector (risk) — Inspector overview, Inspector risk policies.
- Building & troubleshooting — Building with the API, Typical problems and solutions.
Contributing
Ideas for order automation and risk features are 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. Commercial use requires explicit permission. See LICENSE and the Barfinex site for details.
