@vuu-ui/vuu-data-test 0.8.88 → 0.8.89
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.
- package/cjs/simul/reference-data/instruments.js +5 -2
- package/cjs/simul/reference-data/instruments.js.map +1 -1
- package/cjs/simul/simul-module.js +1 -1
- package/cjs/simul/simul-module.js.map +1 -1
- package/cjs/simul/simul-schemas.js +3 -1
- package/cjs/simul/simul-schemas.js.map +1 -1
- package/esm/simul/reference-data/instruments.js +5 -2
- package/esm/simul/reference-data/instruments.js.map +1 -1
- package/esm/simul/simul-module.js +1 -1
- package/esm/simul/simul-module.js.map +1 -1
- package/esm/simul/simul-schemas.js +3 -1
- package/esm/simul/simul-schemas.js.map +1 -1
- package/package.json +6 -6
- package/types/simul/reference-data/instruments.d.ts +4 -1
|
@@ -16,7 +16,8 @@ const InstrumentColumnMap = {
|
|
|
16
16
|
string: 4,
|
|
17
17
|
number: 5,
|
|
18
18
|
ric: 6,
|
|
19
|
-
price: 7
|
|
19
|
+
price: 7,
|
|
20
|
+
date: 8
|
|
20
21
|
};
|
|
21
22
|
const instrumentsData = [];
|
|
22
23
|
const chars1 = Array.from("ABCEFGHKMN");
|
|
@@ -42,6 +43,7 @@ for (const char1 of chars1) {
|
|
|
42
43
|
const lotSize = lotsizes.lotsizes[dataUtils.random(0, lotsizes.lotsizes.length - 1)];
|
|
43
44
|
const exchange = locations.locations[suffix][1];
|
|
44
45
|
const price = randomPrice();
|
|
46
|
+
const date = (/* @__PURE__ */ new Date()).getTime();
|
|
45
47
|
instrumentsData.push([
|
|
46
48
|
bbg,
|
|
47
49
|
currency,
|
|
@@ -50,7 +52,8 @@ for (const char1 of chars1) {
|
|
|
50
52
|
String(isin),
|
|
51
53
|
lotSize,
|
|
52
54
|
ric,
|
|
53
|
-
price
|
|
55
|
+
price,
|
|
56
|
+
date
|
|
54
57
|
]);
|
|
55
58
|
count++;
|
|
56
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruments.js","sources":["../../../src/simul/reference-data/instruments.ts"],"sourcesContent":["import { isinGenerator } from \"@thomaschaplin/isin-generator\";\nimport { currencies } from \"./currencies\";\nimport { locations, suffixes } from \"./locations\";\nimport { lotsizes } from \"./lotsizes\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\n\nexport type bbg = string;\nexport type currency = string;\nexport type ric = string;\nexport type description = string;\nexport type exchange = string;\n// seed for price generation\nexport type price = number;\n\nexport type InstrumentsDataRow = [\n bbg,\n currency,\n description,\n exchange,\n string,\n number,\n ric,\n price\n];\n\nexport const InstrumentColumnMap = {\n bbg: 0,\n currency: 1,\n description: 2,\n exchange: 3,\n string: 4,\n number: 5,\n ric: 6,\n price: 7,\n} as const;\n\nconst instrumentsData: InstrumentsDataRow[] = [];\n\nconst chars1 = Array.from(\"ABCEFGHKMN\");\nconst chars2 = Array.from(\"ABCEFGHKMN\");\nconst chars3 = Array.from(\"OPQRTUVWYZ\");\nconst chars4 = Array.from(\"OPQRTUVWYZ\");\n\nconst randomPrice = () => {\n const price = random(0, 10000);\n const multiplier = random(1, 10);\n return price / multiplier;\n};\n\n// const start = performance.now();\n// Create 10_000 Instruments\nlet count = 0;\nfor (const char1 of chars1) {\n for (const char2 of chars2) {\n for (const char3 of chars3) {\n for (const char4 of chars4) {\n const suffix = suffixes[count % 8];\n const ric = char1 + char2 + char3 + char4 + \".\" + suffix;\n const bbg = char1 + char2 + char3 + char4 + \" \" + suffix;\n const description = `${ric} description`;\n const currency = currencies[random(0, 4)];\n const isin = isinGenerator();\n const lotSize = lotsizes[random(0, lotsizes.length - 1)];\n\n const exchange = locations[suffix][1];\n const price = randomPrice();\n\n instrumentsData.push([\n bbg,\n currency,\n description,\n exchange,\n String(isin),\n lotSize,\n ric,\n price,\n ]);\n count++;\n }\n }\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 10,000 instruments took ${end - start} ms`);\n\nexport const getRic = (defaultRic: string) => {\n const row = instrumentsData.at(random(0, instrumentsData.length));\n return row?.[InstrumentColumnMap.ric] ?? defaultRic;\n};\n\nexport const instrumentsTable = new Table(\n schemas.instruments,\n instrumentsData,\n buildDataColumnMap(schemas, \"instruments\")\n);\n\nexport { instrumentsData };\n"],"names":["random","suffixes","currencies","isinGenerator","lotsizes","locations","Table","schemas","buildDataColumnMap"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"instruments.js","sources":["../../../src/simul/reference-data/instruments.ts"],"sourcesContent":["import { isinGenerator } from \"@thomaschaplin/isin-generator\";\nimport { currencies } from \"./currencies\";\nimport { locations, suffixes } from \"./locations\";\nimport { lotsizes } from \"./lotsizes\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\n\nexport type bbg = string;\nexport type currency = string;\nexport type ric = string;\nexport type description = string;\nexport type exchange = string;\n// seed for price generation\nexport type price = number;\nexport type date = number;\n\nexport type InstrumentsDataRow = [\n bbg,\n currency,\n description,\n exchange,\n string,\n number,\n ric,\n price,\n date\n];\n\nexport const InstrumentColumnMap = {\n bbg: 0,\n currency: 1,\n description: 2,\n exchange: 3,\n string: 4,\n number: 5,\n ric: 6,\n price: 7,\n date: 8\n} as const;\n\nconst instrumentsData: InstrumentsDataRow[] = [];\n\nconst chars1 = Array.from(\"ABCEFGHKMN\");\nconst chars2 = Array.from(\"ABCEFGHKMN\");\nconst chars3 = Array.from(\"OPQRTUVWYZ\");\nconst chars4 = Array.from(\"OPQRTUVWYZ\");\n\nconst randomPrice = () => {\n const price = random(0, 10000);\n const multiplier = random(1, 10);\n return price / multiplier;\n};\n\n// const start = performance.now();\n// Create 10_000 Instruments\nlet count = 0;\nfor (const char1 of chars1) {\n for (const char2 of chars2) {\n for (const char3 of chars3) {\n for (const char4 of chars4) {\n const suffix = suffixes[count % 8];\n const ric = char1 + char2 + char3 + char4 + \".\" + suffix;\n const bbg = char1 + char2 + char3 + char4 + \" \" + suffix;\n const description = `${ric} description`;\n const currency = currencies[random(0, 4)];\n const isin = isinGenerator();\n const lotSize = lotsizes[random(0, lotsizes.length - 1)];\n\n const exchange = locations[suffix][1];\n const price = randomPrice();\n const date = new Date().getTime();\n\n instrumentsData.push([\n bbg,\n currency,\n description,\n exchange,\n String(isin),\n lotSize,\n ric,\n price,\n date\n ]);\n count++;\n }\n }\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 10,000 instruments took ${end - start} ms`);\n\nexport const getRic = (defaultRic: string) => {\n const row = instrumentsData.at(random(0, instrumentsData.length));\n return row?.[InstrumentColumnMap.ric] ?? defaultRic;\n};\n\nexport const instrumentsTable = new Table(\n schemas.instruments,\n instrumentsData,\n buildDataColumnMap(schemas, \"instruments\")\n);\n\nexport { instrumentsData };\n"],"names":["random","suffixes","currencies","isinGenerator","lotsizes","locations","Table","schemas","buildDataColumnMap"],"mappings":";;;;;;;;;;AA6BO,MAAM,mBAAsB,GAAA;AAAA,EACjC,GAAK,EAAA,CAAA;AAAA,EACL,QAAU,EAAA,CAAA;AAAA,EACV,WAAa,EAAA,CAAA;AAAA,EACb,QAAU,EAAA,CAAA;AAAA,EACV,MAAQ,EAAA,CAAA;AAAA,EACR,MAAQ,EAAA,CAAA;AAAA,EACR,GAAK,EAAA,CAAA;AAAA,EACL,KAAO,EAAA,CAAA;AAAA,EACP,IAAM,EAAA,CAAA;AACR,EAAA;AAEA,MAAM,kBAAwC,GAAC;AAE/C,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AAEtC,MAAM,cAAc,MAAM;AACxB,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eAAA,CAAgB,IAAK,CAAA;AAAA,UACnB,GAAA;AAAA,UACA,QAAA;AAAA,UACA,WAAA;AAAA,UACA,QAAA;AAAA,UACA,OAAO,IAAI,CAAA;AAAA,UACX,OAAA;AAAA,UACA,GAAA;AAAA,UACA,KAAA;AAAA,UACA,IAAA;AAAA,SACD,CAAA,CAAA;AACD,QAAA,KAAA,EAAA,CAAA;AAAA,OACF;AAAA,KACF;AAAA,GACF;AACF,CAAA;AAKa,MAAA,MAAA,GAAS,CAAC,UAAuB,KAAA;AAC5C,EAAA,MAAM,MAAM,eAAgB,CAAA,EAAA,CAAGL,iBAAO,CAAG,EAAA,eAAA,CAAgB,MAAM,CAAC,CAAA,CAAA;AAChE,EAAO,OAAA,GAAA,GAAM,mBAAoB,CAAA,GAAG,CAAK,IAAA,UAAA,CAAA;AAC3C,EAAA;AAEO,MAAM,mBAAmB,IAAIM,WAAA;AAAA,EAClCC,oBAAQ,CAAA,WAAA;AAAA,EACR,eAAA;AAAA,EACAC,wBAAA,CAAmBD,sBAAS,aAAa,CAAA;AAC3C;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
3
4
|
var Table = require('../Table.js');
|
|
4
5
|
var SimulModule = require('./SimulModule.js');
|
|
5
6
|
var instruments = require('./reference-data/instruments.js');
|
|
@@ -7,7 +8,6 @@ var instrumentsExtended = require('./reference-data/instruments-extended.js');
|
|
|
7
8
|
var orders = require('./reference-data/orders.js');
|
|
8
9
|
var prices = require('./reference-data/prices.js');
|
|
9
10
|
var simulSchemas = require('./simul-schemas.js');
|
|
10
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
11
11
|
|
|
12
12
|
const undefinedTables = {
|
|
13
13
|
childOrders: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-module.js","sources":["../../src/simul/simul-module.ts"],"sourcesContent":["import {\n ClientToServerMenuRowRPC,\n VuuLink,\n VuuMenu,\n} from \"@vuu-ui/vuu-protocol-types\";\nimport { Table, buildDataColumnMap, joinTables } from \"../Table\";\nimport { RpcService, ServiceHandler } from \"../VuuModule\";\nimport { SimulModule } from \"./SimulModule\";\nimport { instrumentsTable } from \"./reference-data/instruments\";\nimport { instrumentsExtendedTable } from \"./reference-data/instruments-extended\";\nimport { ordersTable } from \"./reference-data/orders\";\nimport { pricesTable } from \"./reference-data/prices\";\nimport { schemas, type SimulTableName } from \"./simul-schemas\";\
|
|
1
|
+
{"version":3,"file":"simul-module.js","sources":["../../src/simul/simul-module.ts"],"sourcesContent":["import {\n ClientToServerMenuRowRPC,\n VuuLink,\n VuuMenu,\n} from \"@vuu-ui/vuu-protocol-types\";\nimport { isVuuMenuRpcRequest } from \"@vuu-ui/vuu-utils\";\nimport { Table, buildDataColumnMap, joinTables } from \"../Table\";\nimport { RpcService, ServiceHandler } from \"../VuuModule\";\nimport { SimulModule } from \"./SimulModule\";\nimport { instrumentsTable } from \"./reference-data/instruments\";\nimport { instrumentsExtendedTable } from \"./reference-data/instruments-extended\";\nimport { ordersTable } from \"./reference-data/orders\";\nimport { pricesTable } from \"./reference-data/prices\";\nimport { schemas, type SimulTableName } from \"./simul-schemas\";\n\nconst undefinedTables = {\n childOrders: undefined,\n instruments: undefined,\n instrumentsExtended: undefined,\n instrumentPrices: undefined,\n orders: undefined,\n parentOrders: undefined,\n prices: undefined,\n};\n\nconst tables: Record<SimulTableName, Table> = {\n childOrders: new Table(\n schemas.childOrders,\n [],\n buildDataColumnMap<SimulTableName>(schemas, \"childOrders\"),\n ),\n instruments: instrumentsTable,\n instrumentsExtended: instrumentsExtendedTable,\n instrumentPrices: joinTables(\n { module: \"SIMUL\", table: \"instrumentPrices\" },\n instrumentsTable,\n pricesTable,\n \"ric\",\n ),\n orders: ordersTable,\n parentOrders: new Table(\n schemas.parentOrders,\n [],\n buildDataColumnMap<SimulTableName>(schemas, \"parentOrders\"),\n ),\n prices: pricesTable,\n};\n\nconst vuuLinks: Record<SimulTableName, VuuLink[] | undefined> = {\n ...undefinedTables,\n};\n\nconst menus: Record<SimulTableName, VuuMenu | undefined> = {\n childOrders: undefined,\n instruments: {\n name: \"ROOT\",\n menus: [\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Add Instruments To Order\",\n rpcName: \"ADD_INSTRUMENTS_TO_ORDER\",\n },\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Edit Row\",\n rpcName: \"EDIT_ROW\",\n },\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Edit Rows\",\n rpcName: \"VP_BULK_EDIT_BEGIN_RPC\",\n },\n ],\n },\n instrumentsExtended: undefined,\n instrumentPrices: undefined,\n orders: {\n name: \"ROOT\",\n menus: [\n {\n context: \"row\",\n filter: `status in [\"New\",\"Partial Exec\"]`,\n name: \"Cancel Order\",\n rpcName: \"CANCEL_ORDER\",\n },\n ],\n },\n parentOrders: undefined,\n prices: undefined,\n};\n\nconst cancelOrder: ServiceHandler = async (rpcRequest) => {\n if (isVuuMenuRpcRequest(rpcRequest)) {\n const { rowKey, vpId } = rpcRequest as ClientToServerMenuRowRPC;\n const table = tables.orders;\n const row = table.findByKey(rowKey);\n row[table.map.status] = \"Cancelled\";\n table.updateRow(row);\n\n return {\n action: {\n type: \"SHOW_NOTIFICATION_ACTION\",\n message: `Order id: ${rowKey}`,\n title: \"Order cancelled\",\n },\n rpcName: \"CANCEL_ORDER\",\n type: \"VIEW_PORT_MENU_RESP\",\n vpId,\n };\n } else {\n throw Error(\"cancelOrder invalid rpcRequest\");\n }\n};\n\nconst services: Record<SimulTableName, RpcService[] | undefined> = {\n ...undefinedTables,\n orders: [\n {\n rpcName: \"CANCEL_ORDER\",\n service: cancelOrder,\n },\n ],\n};\n\nexport const simulModule = new SimulModule({\n menus,\n name: \"SIMUL\",\n schemas,\n services,\n tables,\n vuuLinks,\n});\n"],"names":["Table","schemas","buildDataColumnMap","instrumentsTable","inst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,CAAA;AAEnB,IAAO,OAAA;AAAA,MACL,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,0BAAA;AAAA,QACN,OAAA,EAAS,aAAa,MAAM,CAAA,CAAA;AAAA,QAC5B,KAAO,EAAA,iBAAA;AAAA,OACT;AAAA,MACA,OAAS,EAAA,cAAA;AAAA,MACT,IAAM,EAAA,qBAAA;AAAA,MACN,IAAA;AAAA,KACF,CAAA;AAAA,GACK,MAAA;AACL,IAAA,MAAM,MAAM,gCAAgC,CAAA,CAAA;AAAA,GAC9C;AACF,CAAA,CAAA;AAEA,MAAM,QAA6D,GAAA;AAAA,EACjE,GAAG,eAAA;AAAA,EACH,MAAQ,EAAA;AAAA,IACN;AAAA,MACE,OAAS,EAAA,cAAA;AAAA,MACT,OAAS,EAAA,WAAA;AAAA,KACX;AAAA,GACF;AACF,CAAA,CAAA;AAEa,MAAA,WAAA,GAAc,IAAIC,uBAAY,CAAA;AAAA,EACzC,KAAA;AAAA,EACA,IAAM,EAAA,OAAA;AAAA,WACNR,oBAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AACF,CAAC;;;;"}
|
|
@@ -9,7 +9,9 @@ const schemas = {
|
|
|
9
9
|
{ name: "exchange", serverDataType: "string" },
|
|
10
10
|
{ name: "isin", serverDataType: "string" },
|
|
11
11
|
{ name: "lotSize", serverDataType: "int" },
|
|
12
|
-
{ name: "ric", serverDataType: "string" }
|
|
12
|
+
{ name: "ric", serverDataType: "string" },
|
|
13
|
+
{ name: "price", serverDataType: "double" },
|
|
14
|
+
{ name: "date", serverDataType: "long" }
|
|
13
15
|
],
|
|
14
16
|
key: "ric",
|
|
15
17
|
table: { module: "SIMUL", table: "instruments" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":";;AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,E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C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC5C,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS,EAAA;AAAA,GAC5C;AACF,EAAA;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":";;AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EA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,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS,EAAA;AAAA,GAC5C;AACF,EAAA;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;;"}
|
|
@@ -14,7 +14,8 @@ const InstrumentColumnMap = {
|
|
|
14
14
|
string: 4,
|
|
15
15
|
number: 5,
|
|
16
16
|
ric: 6,
|
|
17
|
-
price: 7
|
|
17
|
+
price: 7,
|
|
18
|
+
date: 8
|
|
18
19
|
};
|
|
19
20
|
const instrumentsData = [];
|
|
20
21
|
const chars1 = Array.from("ABCEFGHKMN");
|
|
@@ -40,6 +41,7 @@ for (const char1 of chars1) {
|
|
|
40
41
|
const lotSize = lotsizes[random(0, lotsizes.length - 1)];
|
|
41
42
|
const exchange = locations[suffix][1];
|
|
42
43
|
const price = randomPrice();
|
|
44
|
+
const date = (/* @__PURE__ */ new Date()).getTime();
|
|
43
45
|
instrumentsData.push([
|
|
44
46
|
bbg,
|
|
45
47
|
currency,
|
|
@@ -48,7 +50,8 @@ for (const char1 of chars1) {
|
|
|
48
50
|
String(isin),
|
|
49
51
|
lotSize,
|
|
50
52
|
ric,
|
|
51
|
-
price
|
|
53
|
+
price,
|
|
54
|
+
date
|
|
52
55
|
]);
|
|
53
56
|
count++;
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruments.js","sources":["../../../src/simul/reference-data/instruments.ts"],"sourcesContent":["import { isinGenerator } from \"@thomaschaplin/isin-generator\";\nimport { currencies } from \"./currencies\";\nimport { locations, suffixes } from \"./locations\";\nimport { lotsizes } from \"./lotsizes\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\n\nexport type bbg = string;\nexport type currency = string;\nexport type ric = string;\nexport type description = string;\nexport type exchange = string;\n// seed for price generation\nexport type price = number;\n\nexport type InstrumentsDataRow = [\n bbg,\n currency,\n description,\n exchange,\n string,\n number,\n ric,\n price\n];\n\nexport const InstrumentColumnMap = {\n bbg: 0,\n currency: 1,\n description: 2,\n exchange: 3,\n string: 4,\n number: 5,\n ric: 6,\n price: 7,\n} as const;\n\nconst instrumentsData: InstrumentsDataRow[] = [];\n\nconst chars1 = Array.from(\"ABCEFGHKMN\");\nconst chars2 = Array.from(\"ABCEFGHKMN\");\nconst chars3 = Array.from(\"OPQRTUVWYZ\");\nconst chars4 = Array.from(\"OPQRTUVWYZ\");\n\nconst randomPrice = () => {\n const price = random(0, 10000);\n const multiplier = random(1, 10);\n return price / multiplier;\n};\n\n// const start = performance.now();\n// Create 10_000 Instruments\nlet count = 0;\nfor (const char1 of chars1) {\n for (const char2 of chars2) {\n for (const char3 of chars3) {\n for (const char4 of chars4) {\n const suffix = suffixes[count % 8];\n const ric = char1 + char2 + char3 + char4 + \".\" + suffix;\n const bbg = char1 + char2 + char3 + char4 + \" \" + suffix;\n const description = `${ric} description`;\n const currency = currencies[random(0, 4)];\n const isin = isinGenerator();\n const lotSize = lotsizes[random(0, lotsizes.length - 1)];\n\n const exchange = locations[suffix][1];\n const price = randomPrice();\n\n instrumentsData.push([\n bbg,\n currency,\n description,\n exchange,\n String(isin),\n lotSize,\n ric,\n price,\n ]);\n count++;\n }\n }\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 10,000 instruments took ${end - start} ms`);\n\nexport const getRic = (defaultRic: string) => {\n const row = instrumentsData.at(random(0, instrumentsData.length));\n return row?.[InstrumentColumnMap.ric] ?? defaultRic;\n};\n\nexport const instrumentsTable = new Table(\n schemas.instruments,\n instrumentsData,\n buildDataColumnMap(schemas, \"instruments\")\n);\n\nexport { instrumentsData };\n"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"instruments.js","sources":["../../../src/simul/reference-data/instruments.ts"],"sourcesContent":["import { isinGenerator } from \"@thomaschaplin/isin-generator\";\nimport { currencies } from \"./currencies\";\nimport { locations, suffixes } from \"./locations\";\nimport { lotsizes } from \"./lotsizes\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\n\nexport type bbg = string;\nexport type currency = string;\nexport type ric = string;\nexport type description = string;\nexport type exchange = string;\n// seed for price generation\nexport type price = number;\nexport type date = number;\n\nexport type InstrumentsDataRow = [\n bbg,\n currency,\n description,\n exchange,\n string,\n number,\n ric,\n price,\n date\n];\n\nexport const InstrumentColumnMap = {\n bbg: 0,\n currency: 1,\n description: 2,\n exchange: 3,\n string: 4,\n number: 5,\n ric: 6,\n price: 7,\n date: 8\n} as const;\n\nconst instrumentsData: InstrumentsDataRow[] = [];\n\nconst chars1 = Array.from(\"ABCEFGHKMN\");\nconst chars2 = Array.from(\"ABCEFGHKMN\");\nconst chars3 = Array.from(\"OPQRTUVWYZ\");\nconst chars4 = Array.from(\"OPQRTUVWYZ\");\n\nconst randomPrice = () => {\n const price = random(0, 10000);\n const multiplier = random(1, 10);\n return price / multiplier;\n};\n\n// const start = performance.now();\n// Create 10_000 Instruments\nlet count = 0;\nfor (const char1 of chars1) {\n for (const char2 of chars2) {\n for (const char3 of chars3) {\n for (const char4 of chars4) {\n const suffix = suffixes[count % 8];\n const ric = char1 + char2 + char3 + char4 + \".\" + suffix;\n const bbg = char1 + char2 + char3 + char4 + \" \" + suffix;\n const description = `${ric} description`;\n const currency = currencies[random(0, 4)];\n const isin = isinGenerator();\n const lotSize = lotsizes[random(0, lotsizes.length - 1)];\n\n const exchange = locations[suffix][1];\n const price = randomPrice();\n const date = new Date().getTime();\n\n instrumentsData.push([\n bbg,\n currency,\n description,\n exchange,\n String(isin),\n lotSize,\n ric,\n price,\n date\n ]);\n count++;\n }\n }\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 10,000 instruments took ${end - start} ms`);\n\nexport const getRic = (defaultRic: string) => {\n const row = instrumentsData.at(random(0, instrumentsData.length));\n return row?.[InstrumentColumnMap.ric] ?? defaultRic;\n};\n\nexport const instrumentsTable = new Table(\n schemas.instruments,\n instrumentsData,\n buildDataColumnMap(schemas, \"instruments\")\n);\n\nexport { instrumentsData };\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,mBAAsB,GAAA;AAAA,EACjC,GAAK,EAAA,CAAA;AAAA,EACL,QAAU,EAAA,CAAA;AAAA,EACV,WAAa,EAAA,CAAA;AAAA,EACb,QAAU,EAAA,CAAA;AAAA,EACV,MAAQ,EAAA,CAAA;AAAA,EACR,MAAQ,EAAA,CAAA;AAAA,EACR,GAAK,EAAA,CAAA;AAAA,EACL,KAAO,EAAA,CAAA;AAAA,EACP,IAAM,EAAA,CAAA;AACR,EAAA;AAEA,MAAM,kBAAwC,GAAC;AAE/C,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AACtC,MAAM,MAAA,GAAS,KAAM,CAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AAEtC,MAAM,cAAc,MAAM;AACxB,EAAM,MAAA,KAAA,GAAQ,MAAO,CAAA,CAAA,EAAG,GAA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;AAAA,UACA,QAAA;AAAA,UACA,OAAO,IAAI,CAAA;AAAA,UACX,OAAA;AAAA,UACA,GAAA;AAAA,UACA,KAAA;AAAA,UACA,IAAA;AAAA,SACD,CAAA,CAAA;AACD,QAAA,KAAA,EAAA,CAAA;AAAA,OACF;AAAA,KACF;AAAA,GACF;AACF,CAAA;AAKa,MAAA,MAAA,GAAS,CAAC,UAAuB,KAAA;AAC5C,EAAA,MAAM,MAAM,eAAgB,CAAA,EAAA,CAAG,OAAO,CAAG,EAAA,eAAA,CAAgB,MAAM,CAAC,CAAA,CAAA;AAChE,EAAO,OAAA,GAAA,GAAM,mBAAoB,CAAA,GAAG,CAAK,IAAA,UAAA,CAAA;AAC3C,EAAA;AAEO,MAAM,mBAAmB,IAAI,KAAA;AAAA,EAClC,OAAQ,CAAA,WAAA;AAAA,EACR,eAAA;AAAA,EACA,kBAAA,CAAmB,SAAS,aAAa,CAAA;AAC3C;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isVuuMenuRpcRequest } from '@vuu-ui/vuu-utils';
|
|
1
2
|
import { Table, buildDataColumnMap, joinTables } from '../Table.js';
|
|
2
3
|
import { SimulModule } from './SimulModule.js';
|
|
3
4
|
import { instrumentsTable } from './reference-data/instruments.js';
|
|
@@ -5,7 +6,6 @@ import { instrumentsExtendedTable } from './reference-data/instruments-extended.
|
|
|
5
6
|
import { ordersTable } from './reference-data/orders.js';
|
|
6
7
|
import { pricesTable } from './reference-data/prices.js';
|
|
7
8
|
import { schemas } from './simul-schemas.js';
|
|
8
|
-
import { isVuuMenuRpcRequest } from '@vuu-ui/vuu-utils';
|
|
9
9
|
|
|
10
10
|
const undefinedTables = {
|
|
11
11
|
childOrders: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-module.js","sources":["../../src/simul/simul-module.ts"],"sourcesContent":["import {\n ClientToServerMenuRowRPC,\n VuuLink,\n VuuMenu,\n} from \"@vuu-ui/vuu-protocol-types\";\nimport { Table, buildDataColumnMap, joinTables } from \"../Table\";\nimport { RpcService, ServiceHandler } from \"../VuuModule\";\nimport { SimulModule } from \"./SimulModule\";\nimport { instrumentsTable } from \"./reference-data/instruments\";\nimport { instrumentsExtendedTable } from \"./reference-data/instruments-extended\";\nimport { ordersTable } from \"./reference-data/orders\";\nimport { pricesTable } from \"./reference-data/prices\";\nimport { schemas, type SimulTableName } from \"./simul-schemas\";\
|
|
1
|
+
{"version":3,"file":"simul-module.js","sources":["../../src/simul/simul-module.ts"],"sourcesContent":["import {\n ClientToServerMenuRowRPC,\n VuuLink,\n VuuMenu,\n} from \"@vuu-ui/vuu-protocol-types\";\nimport { isVuuMenuRpcRequest } from \"@vuu-ui/vuu-utils\";\nimport { Table, buildDataColumnMap, joinTables } from \"../Table\";\nimport { RpcService, ServiceHandler } from \"../VuuModule\";\nimport { SimulModule } from \"./SimulModule\";\nimport { instrumentsTable } from \"./reference-data/instruments\";\nimport { instrumentsExtendedTable } from \"./reference-data/instruments-extended\";\nimport { ordersTable } from \"./reference-data/orders\";\nimport { pricesTable } from \"./reference-data/prices\";\nimport { schemas, type SimulTableName } from \"./simul-schemas\";\n\nconst undefinedTables = {\n childOrders: undefined,\n instruments: undefined,\n instrumentsExtended: undefined,\n instrumentPrices: undefined,\n orders: undefined,\n parentOrders: undefined,\n prices: undefined,\n};\n\nconst tables: Record<SimulTableName, Table> = {\n childOrders: new Table(\n schemas.childOrders,\n [],\n buildDataColumnMap<SimulTableName>(schemas, \"childOrders\"),\n ),\n instruments: instrumentsTable,\n instrumentsExtended: instrumentsExtendedTable,\n instrumentPrices: joinTables(\n { module: \"SIMUL\", table: \"instrumentPrices\" },\n instrumentsTable,\n pricesTable,\n \"ric\",\n ),\n orders: ordersTable,\n parentOrders: new Table(\n schemas.parentOrders,\n [],\n buildDataColumnMap<SimulTableName>(schemas, \"parentOrders\"),\n ),\n prices: pricesTable,\n};\n\nconst vuuLinks: Record<SimulTableName, VuuLink[] | undefined> = {\n ...undefinedTables,\n};\n\nconst menus: Record<SimulTableName, VuuMenu | undefined> = {\n childOrders: undefined,\n instruments: {\n name: \"ROOT\",\n menus: [\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Add Instruments To Order\",\n rpcName: \"ADD_INSTRUMENTS_TO_ORDER\",\n },\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Edit Row\",\n rpcName: \"EDIT_ROW\",\n },\n {\n context: \"selected-rows\",\n filter: \"\",\n name: \"Edit Rows\",\n rpcName: \"VP_BULK_EDIT_BEGIN_RPC\",\n },\n ],\n },\n instrumentsExtended: undefined,\n instrumentPrices: undefined,\n orders: {\n name: \"ROOT\",\n menus: [\n {\n context: \"row\",\n filter: `status in [\"New\",\"Partial Exec\"]`,\n name: \"Cancel Order\",\n rpcName: \"CANCEL_ORDER\",\n },\n ],\n },\n parentOrders: undefined,\n prices: undefined,\n};\n\nconst cancelOrder: ServiceHandler = async (rpcRequest) => {\n if (isVuuMenuRpcRequest(rpcRequest)) {\n const { rowKey, vpId } = rpcRequest as ClientToServerMenuRowRPC;\n const table = tables.orders;\n const row = table.findByKey(rowKey);\n row[table.map.status] = \"Cancelled\";\n table.updateRow(row);\n\n return {\n action: {\n type: \"SHOW_NOTIFICATION_ACTION\",\n message: `Order id: ${rowKey}`,\n title: \"Order cancelled\",\n },\n rpcName: \"CANCEL_ORDER\",\n type: \"VIEW_PORT_MENU_RESP\",\n vpId,\n };\n } else {\n throw Error(\"cancelOrder invalid rpcRequest\");\n }\n};\n\nconst services: Record<SimulTableName, RpcService[] | undefined> = {\n ...undefinedTables,\n orders: [\n {\n rpcName: \"CANCEL_ORDER\",\n service: cancelOrder,\n },\n ],\n};\n\nexport const simulModule = new SimulModule({\n menus,\n name: \"SIMUL\",\n schemas,\n services,\n tables,\n vuuLinks,\n});\n"],"names":[],"mappings":";;;;;;;;;AAeA,MAAM,eAAkB,GAAA;AAAA,EACtB,WAAa,EAAA,KAAA,CAAA;AAAA,EACb,WAAa,EAAA,K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,cAAA;AAAA,MACT,IAAM,EAAA,qBAAA;AAAA,MACN,IAAA;AAAA,KACF,CAAA;AAAA,GACK,MAAA;AACL,IAAA,MAAM,MAAM,gCAAgC,CAAA,CAAA;AAAA,GAC9C;AACF,CAAA,CAAA;AAEA,MAAM,QAA6D,GAAA;AAAA,EACjE,GAAG,eAAA;AAAA,EACH,MAAQ,EAAA;AAAA,IACN;AAAA,MACE,OAAS,EAAA,cAAA;AAAA,MACT,OAAS,EAAA,WAAA;AAAA,KACX;AAAA,GACF;AACF,CAAA,CAAA;AAEa,MAAA,WAAA,GAAc,IAAI,WAAY,CAAA;AAAA,EACzC,KAAA;AAAA,EACA,IAAM,EAAA,OAAA;AAAA,EACN,OAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AACF,CAAC;;;;"}
|
|
@@ -7,7 +7,9 @@ const schemas = {
|
|
|
7
7
|
{ name: "exchange", serverDataType: "string" },
|
|
8
8
|
{ name: "isin", serverDataType: "string" },
|
|
9
9
|
{ name: "lotSize", serverDataType: "int" },
|
|
10
|
-
{ name: "ric", serverDataType: "string" }
|
|
10
|
+
{ name: "ric", serverDataType: "string" },
|
|
11
|
+
{ name: "price", serverDataType: "double" },
|
|
12
|
+
{ name: "date", serverDataType: "long" }
|
|
11
13
|
],
|
|
12
14
|
key: "ric",
|
|
13
15
|
table: { module: "SIMUL", table: "instruments" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":"AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,KA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,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS,EAAA;AAAA,GAC5C;AACF,EAAA;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":"AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,MAAO,EAAA;AAAA,KACzC;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,aAAc,EAAA;AAAA,GACjD;AAAA,EACA,mBAAqB,EAAA;AAAA,IAC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IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS,EAAA;AAAA,GAC5C;AACF,EAAA;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.8.
|
|
2
|
+
"version": "0.8.89",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@vuu-ui/vuu-data-local": "0.8.
|
|
7
|
-
"@vuu-ui/vuu-utils": "0.8.
|
|
6
|
+
"@vuu-ui/vuu-data-local": "0.8.89",
|
|
7
|
+
"@vuu-ui/vuu-utils": "0.8.89",
|
|
8
8
|
"@thomaschaplin/isin-generator": "1.0.3"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
12
|
-
"@vuu-ui/vuu-data-types": "0.8.
|
|
13
|
-
"@vuu-ui/vuu-table-types": "0.8.
|
|
11
|
+
"@vuu-ui/vuu-protocol-types": "0.8.89",
|
|
12
|
+
"@vuu-ui/vuu-data-types": "0.8.89",
|
|
13
|
+
"@vuu-ui/vuu-table-types": "0.8.89"
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"files": [
|
|
@@ -5,6 +5,7 @@ export type ric = string;
|
|
|
5
5
|
export type description = string;
|
|
6
6
|
export type exchange = string;
|
|
7
7
|
export type price = number;
|
|
8
|
+
export type date = number;
|
|
8
9
|
export type InstrumentsDataRow = [
|
|
9
10
|
bbg,
|
|
10
11
|
currency,
|
|
@@ -13,7 +14,8 @@ export type InstrumentsDataRow = [
|
|
|
13
14
|
string,
|
|
14
15
|
number,
|
|
15
16
|
ric,
|
|
16
|
-
price
|
|
17
|
+
price,
|
|
18
|
+
date
|
|
17
19
|
];
|
|
18
20
|
export declare const InstrumentColumnMap: {
|
|
19
21
|
readonly bbg: 0;
|
|
@@ -24,6 +26,7 @@ export declare const InstrumentColumnMap: {
|
|
|
24
26
|
readonly number: 5;
|
|
25
27
|
readonly ric: 6;
|
|
26
28
|
readonly price: 7;
|
|
29
|
+
readonly date: 8;
|
|
27
30
|
};
|
|
28
31
|
declare const instrumentsData: InstrumentsDataRow[];
|
|
29
32
|
export declare const getRic: (defaultRic: string) => string;
|