@barchart/portfolio-api-common

1.30.0 • Public • Published

@barchart/portfolio-api-common

AWS CodeBuild NPM

A public library of shared JavaScript code used by Barchart's paper-trading portfolio system.

Overview

Simply put, this project contains code that runs on both the servers (i.e. Serverless applications) and clients (e.g. browser, mobile, etc).

Data is passed between client and server in JSON format. However, the code works with more complex types. For example, Decimal instances are used in place of native JavaScript floats and Day instances are used instead of native JavaScript Dates.

So, before data is exchanged, it must be converted to pure JSON. Conversely, when data is received, as pure JSON, its translated into more complex types before use. This is facilitated by the Schema definitions which build custom "reviver" functions for JSON parsing.

For reporting and display purposes, positions can be grouped together (by asset class, by portfolio, by user, etc). This code supports aggregation and gain/loss calculation. It is used by server-generated reports and dynamic user interfaces.

Notable Consumers

Package Managers

This library has been published as a public module to NPM as @barchart/portfolio-api-common.

npm install @barchart/portfolio-api-common -S

Readme

Keywords

none

Package Sidebar

Install

npm i @barchart/portfolio-api-common

Weekly Downloads

15

Version

1.30.0

License

MIT

Unpacked Size

244 kB

Total Files

30

Last publish

Collaborators

  • jmbaker
  • tomsisk
  • swiderberg
  • alena.labada
  • ebarchukov
  • avasilevich
  • ravish.brahmbhatt
  • ddotlic
  • eapikat
  • l-zhang
  • igor-losev
  • mark.kerman
  • borja.yanes
  • bryan.ingle