@sebspark/tradeinsight 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,25 @@
1
1
  # `@sebspark/tradeinsight`
2
2
 
3
- Trade Insight client library with helpers for instrument IDs.
3
+ TradeInsight client library with helpers for creating/parsing instrument IDs and consuming ticker feeds.
4
+
5
+ ## Instrument IDs
6
+
7
+ ### Create ID
8
+
9
+ ```javascript
10
+ const isin = 'SE0000108656'
11
+ const mic = 'XSTO'
12
+ const currency = 'SEK'
13
+ const id = createStockId({ isin, mic, currency })
14
+
15
+ console.log(id)
16
+ // STOCK-SE0000108656;XSTO;SEK
17
+ ```
18
+
19
+ ### Parse ID
20
+
21
+ ```javascript
22
+ const { type, fromCurrency, toCurrency } = parseId('FOREX-USD;EUR')
23
+ console.log(type, fromCurrency, toCurrency)
24
+ // FOREX, USD, EUR
25
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/tradeinsight",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",