yggio 0.0.6 → 0.0.14

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/benchmarks/fix.js CHANGED
@@ -7,7 +7,7 @@
7
7
  // wrapper the answer is put in, and - for the two loads - the shard read the
8
8
  // boundary only names. The generated registries are written to a temporary
9
9
  // folder and removed on the way out, so the only tracked input is the seed
10
- // dictionary at `config/fix`.
10
+ // dictionary `config/seeds/fix.parquet`.
11
11
 
12
12
  const fs = require('node:fs')
13
13
  const os = require('node:os')
@@ -53,7 +53,7 @@ function benchmarkLoad(name, operation) {
53
53
  console.log(`${name}: ${rate.toLocaleString('en-US')} operations/second`)
54
54
  }
55
55
 
56
- const SEED = path.join(__dirname, '..', '..', 'config', 'fix')
56
+ const SEED = path.join(__dirname, '..', '..', 'config', 'seeds', 'fix.parquet')
57
57
  const WIDE_FIELDS = 200
58
58
  const VENDOR_DIALECT = 'cme'
59
59
  const VENDOR_FIELDS = 200
@@ -184,7 +184,7 @@ if (parsed.identifiers.get('clordid') !== 'ORDER-000000') {
184
184
  if (orderType.identifierValues(parsed)[0][0].name !== 'clordid') {
185
185
  throw new Error('the compiled selector must reach the stated order identifier')
186
186
  }
187
- if (orderType.marketdatakind !== 'ORDR' || parsed.marketdatakind !== 'ORDR' || snapshotCodec.snapshotNs !== 1_000_000_000n) {
187
+ if (orderType.marketdatakind !== 'OPER' || parsed.marketdatakind !== 'OPER' || snapshotCodec.snapshotNs !== 1_000_000_000n) {
188
188
  throw new Error('FIX category and exact snapshot boundary mismatch')
189
189
  }
190
190
  const parsedRow = parsed.intoRow(fixedSchema)
@@ -111,7 +111,7 @@ const figiScalar = figi.scalar('BBG000BLNQ16')
111
111
  const side = DataType.from('side')
112
112
  const sideScalar = side.scalar('BUY')
113
113
  const kind = DataType.from('marketdatakind')
114
- const kindScalar = kind.scalar('ORDR')
114
+ const kindScalar = kind.scalar('OPER')
115
115
 
116
116
  benchmark('version/native_parts', () => new Version(5, 0, 300))
117
117
  benchmark('version/native_parse', () => Version.fromStr('5.0.300'))
@@ -131,8 +131,8 @@ benchmark('figi/scalar_as_js', () => figiScalar.asJs())
131
131
  benchmark('side/member_lookup', () => Side.SELL)
132
132
  benchmark('side/into_scalar', () => side.scalar('SELL'))
133
133
  benchmark('side/scalar_as_js', () => sideScalar.asJs())
134
- benchmark('marketdatakind/member_lookup', () => MarketDataKind.QUOT)
135
- benchmark('marketdatakind/into_scalar', () => kind.scalar('QUOT'))
134
+ benchmark('marketdatakind/member_lookup', () => MarketDataKind.OPER)
135
+ benchmark('marketdatakind/into_scalar', () => kind.scalar('OPER'))
136
136
  benchmark('marketdatakind/scalar_as_js', () => kindScalar.asJs())
137
137
 
138
138
  benchmark('schema/from_fields', () => DataType.fromFields([id, name]))
package/binding.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export {
2
+ ai,
2
3
  Arn,
3
4
  BatchReader,
4
5
  CellRange,
@@ -177,6 +178,7 @@ import {
177
178
  FixRegistry,
178
179
  FixMessages,
179
180
  MsgType,
181
+ Underlyings,
180
182
  IcebergOptions,
181
183
  ManifestFile,
182
184
  PartitionField,
@@ -326,6 +328,7 @@ export type {
326
328
  FixRegistry,
327
329
  FixMessages,
328
330
  MsgType,
331
+ Underlyings,
329
332
  IcebergOptions,
330
333
  ManifestFile,
331
334
  PartitionField,
@@ -3501,9 +3504,10 @@ export type StateName = keyof typeof State
3501
3504
  /**
3502
3505
  * What kind of market data an element is: FIX's MsgCat code set, each
3503
3506
  * member's four-letter name under the `uint8` code a `marketdatakind`
3504
- * column stores - an order `ORDR`, a quote `QUOT`, an execution `EXEC`, a
3505
- * trade `TRAD`, a book `BOOK`, the batches `ORDB`, `QUOB`, `EXEB` and
3506
- * `TRDB`, and `UKNW` for a type the dictionary files under none.
3507
+ * column stores - an operation `OPER` (an order, a quote or an execution,
3508
+ * which its `marketdatatype` tells apart), a trade `TRAD`, a book `BOOK`,
3509
+ * the batches `OPEB` and `TRDB`, and `UKNW` for a type the dictionary files
3510
+ * under none; the codes 8, 14, 23 and 24 name no member.
3507
3511
  */
3508
3512
  export declare const MarketDataKind: Readonly<{
3509
3513
  UKNW: 0
@@ -3514,13 +3518,11 @@ export declare const MarketDataKind: Readonly<{
3514
3518
  COLL: 5
3515
3519
  COMM: 6
3516
3520
  CONF: 7
3517
- EXEC: 8
3518
3521
  MKST: 9
3519
- ORDR: 10
3522
+ OPER: 10
3520
3523
  PAYM: 11
3521
3524
  POSN: 12
3522
3525
  PRTY: 13
3523
- QUOT: 14
3524
3526
  REGI: 15
3525
3527
  RISK: 16
3526
3528
  SECU: 17
@@ -3528,9 +3530,7 @@ export declare const MarketDataKind: Readonly<{
3528
3530
  SETL: 19
3529
3531
  STRM: 20
3530
3532
  TRAD: 21
3531
- ORDB: 22
3532
- QUOB: 23
3533
- EXEB: 24
3533
+ OPEB: 22
3534
3534
  TRDB: 25
3535
3535
  }>
3536
3536
 
@@ -3817,17 +3817,17 @@ export declare const enums: {
3817
3817
  /**
3818
3818
  * The forty-two market column names, in schema order:
3819
3819
  * `marketdatakind`, `marketdatatype`, `ack`, `conversationid`,
3820
- * `securityids`, `cfi`, `mic`, `undcode`, `undcat`, `side`, `quantity`,
3821
- * `prevqty`, `displayqty`, `hiddenqty`, `unit`, `lotsize`, `currency`,
3822
- * `origccy`, `price`, `prevpx`, `stoppx`, `strikepx`, `execunix`,
3820
+ * `securityids`, `cficode`, `mic`, `undcode`, `undcat`, `side`, `quantity`,
3821
+ * `prevqty`, `displayqty`, `hiddenqty`, `unitofmeasure`, `roundlot`, `currency`,
3822
+ * `origccy`, `price`, `prevpx`, `stoppx`, `strikeprice`, `execunix`,
3823
3823
  * `lastpx`, `lastqty`, `avgpx`, `cumqty`, `leavesqty`, `cxlqty`,
3824
- * `spotrate`, `forwardpoints`, `bidpx`, `bidqty`, `bidccy`, `askpx`,
3825
- * `askqty`, `askccy`, `bidspotrate`, `bidforwardpoints`, `askspotrate`,
3826
- * `askforwardpoints`, `targetfxrates`.
3824
+ * `lastspotrate`, `lastforwardpoints`, `bidpx`, `bidsize`, `bidccy`, `offerpx`,
3825
+ * `offersize`, `offerccy`, `bidspotrate`, `bidforwardpoints`, `offerspotrate`,
3826
+ * `offerforwardpoints`, `targetfxrates`.
3827
3827
  */
3828
3828
  readonly marketColumns: readonly string[]
3829
3829
  /**
3830
- * The four operation column names, in schema order: `ordqty`,
3830
+ * The four operation column names, in schema order: `orderqty`,
3831
3831
  * `timeinforce`, `tradable`, `identifiers`.
3832
3832
  */
3833
3833
  readonly operationColumns: readonly string[]
@@ -5216,8 +5216,9 @@ export interface MarketMessageStatic extends Function {
5216
5216
  /**
5217
5217
  * The one message row, `fixmsg`: the element, event, market, operation,
5218
5218
  * source and session columns, the `trdregtimestamps` and `parties`
5219
- * holders, the identifier columns, then `metadata` and `entries` - every
5220
- * stated entry no column of the row holds, keyed `tag:name` in lower case.
5219
+ * holders, then `metadata` and `entries` - every stated entry no column
5220
+ * of the row holds, an identifier's statement among them, keyed
5221
+ * `tag:name` in lower case.
5221
5222
  */
5222
5223
  field(): Field
5223
5224
  readonly prototype: MarketMessage
@@ -5272,6 +5273,18 @@ export interface Fix {
5272
5273
  readonly MsgType: abstract new () => MsgType
5273
5274
  /** A lazy stream of messages: what every stage of `FixCodec` answers. */
5274
5275
  readonly FixMessages: abstract new () => FixMessages
5276
+ /**
5277
+ * The table of underlyings, its essential doors: `Underlyings.seeded()`,
5278
+ * `get(code)` - a code, an instrument key, an index key `{key}={value}` or
5279
+ * a bare identity value, a one-row `Serie`, else `null` -
5280
+ * `search(text, limit = 20)` - the rows a text names, strongest first,
5281
+ * each once: the exact code, an identifier the key index answers (an ISIN,
5282
+ * a FIGI, a RIC, a Bloomberg code, `{ticker}@{MIC}`, `{MIC}:{ticker}`, a
5283
+ * currency pair in any spelling), then a ticker, a name or an alias,
5284
+ * exact, prefix, substring - as a `Serie` under `underlyingField()`, and
5285
+ * `length`.
5286
+ */
5287
+ readonly Underlyings: { seeded(): Underlyings; readonly prototype: Underlyings }
5275
5288
  /**
5276
5289
  * The crate's own definitions in tag order, above every tag FIX or a
5277
5290
  * venue publishes: the event's instants, the identities, the cross code
@@ -5291,6 +5304,12 @@ export interface Fix {
5291
5304
  * by `code`.
5292
5305
  */
5293
5306
  underlyingField(): Field
5307
+ /**
5308
+ * The row a FIX dictionary is laid out as, `fixdefinition`: one per scalar
5309
+ * field, named definition, code set and source, and one for the plugin
5310
+ * dictionary, keyed by `category`, `tag` and `name`.
5311
+ */
5312
+ registryField(): Field
5294
5313
  /** The row of the ISO 10383 register, `mic`: one market identifier code ever assigned, sorted by `mic`. */
5295
5314
  micEntryField(): Field
5296
5315
  /** The row of GLEIF's register, `legalentity`: one LEI's Level 1 record with its parents, partitioned by `country`. */
package/binding.js CHANGED
@@ -1435,11 +1435,6 @@ Object.defineProperties(Scalar.prototype, {
1435
1435
  return Reflect.apply(nativeScalarRemove, this, [Scalar.from(key)])
1436
1436
  },
1437
1437
  },
1438
- toJSON: {
1439
- value() {
1440
- return JSON.parse(this.intoJson())
1441
- },
1442
- },
1443
1438
  })
1444
1439
 
1445
1440
  // A serie is the native value; the conversions it needs from JavaScript -
@@ -5818,8 +5813,10 @@ const fix = Object.freeze({
5818
5813
  FixCodec: binding.FixCodec,
5819
5814
  MsgType: binding.MsgType,
5820
5815
  FixMessages: binding.FixMessages,
5816
+ Underlyings: binding.Underlyings,
5821
5817
  crateFields: binding.fixCrateFields,
5822
5818
  underlyingField: binding.fixUnderlyingField,
5819
+ registryField: binding.fixRegistryField,
5823
5820
  micEntryField: binding.fixMicEntryField,
5824
5821
  legalEntityField: binding.fixLegalEntityField,
5825
5822
  fxRateField: binding.fixFxRateField,
@@ -5836,14 +5833,17 @@ for (const name of [
5836
5833
  'FixRegistry',
5837
5834
  'MsgType',
5838
5835
  'FixMessages',
5836
+ 'Underlyings',
5839
5837
  'JsFixFieldIterator',
5840
5838
  'JsMarketMessage',
5841
5839
  'JsFixCodec',
5842
5840
  'JsFixRegistry',
5843
5841
  'JsMsgType',
5844
5842
  'JsFixMessages',
5843
+ 'JsUnderlyings',
5845
5844
  'fixCrateFields',
5846
5845
  'fixUnderlyingField',
5846
+ 'fixRegistryField',
5847
5847
  'fixMicEntryField',
5848
5848
  'fixLegalEntityField',
5849
5849
  'fixFxRateField',