@alphaio/quote-client 0.2.0 → 0.2.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.
- package/README.md +10 -5
- package/dist/client.d.ts +1 -1
- package/dist/curve-helpers.d.ts +1 -1
- package/dist/curve-helpers.js +1 -1
- package/examples/README.md +26 -0
- package/examples/demo-fenshi-vol.mjs +53 -0
- package/examples/demo-fenshi.mjs +53 -0
- package/examples/demo-l2.mjs +49 -0
- package/examples/demo-mf-range.mjs +62 -0
- package/examples/demo-order.mjs +45 -0
- package/examples/demo-trans.mjs +45 -0
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -63,12 +63,17 @@ await client.subscribe(['l2.600519', 'mf_range.600519']);
|
|
|
63
63
|
const d = diffMfRangePoints(leftPoint, rightPoint); // 右 − 左
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
## Demo
|
|
66
|
+
## Demo(库级依赖)
|
|
67
|
+
|
|
68
|
+
包内 [`examples/`](./examples/) 全部 `import '@alphaio/quote-client'`:
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
|
-
|
|
70
|
-
yarn workspace @alphaio/quote-client demo
|
|
71
|
-
|
|
71
|
+
export QUOTE_ACTIVATION_KEY='…'
|
|
72
|
+
yarn workspace @alphaio/quote-client demo:l2
|
|
73
|
+
yarn workspace @alphaio/quote-client demo:mf-range
|
|
74
|
+
# 或:node node_modules/@alphaio/quote-client/examples/demo-l2.mjs
|
|
72
75
|
```
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
综合板:`yarn workspace @alphaio/quote-client demo`(`src/cli.ts`,需本地/联调 relay)。
|
|
78
|
+
|
|
79
|
+
Python 版见 [`packages/client-sdk-python`](../client-sdk-python)。发布:[docs/PUBLISH_SDKS.md](../../docs/PUBLISH_SDKS.md)。
|
package/dist/client.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type QuoteClientOptions = {
|
|
|
9
9
|
clientVersion?: string;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 类型化事件映射:`on('quote', q => …)` 可收窄 `q` 的类型。
|
|
13
13
|
* 按 topic 监听请用 `quote:${topic}` / `curve:${topic}`,或
|
|
14
14
|
* {@link QuoteClient.onTopic} / {@link QuoteClient.onCurveTopic}。
|
|
15
15
|
*/
|
package/dist/curve-helpers.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare function narrowCurveDelta(delta: CurveDeltaPayload): NarrowedCurv
|
|
|
53
53
|
/** 区间主力序列末点(开盘→此刻累计);非 mf_range 或空序列返回 null。 */
|
|
54
54
|
export declare function lastMfRangePoint(snapOrItems: CurveSnapPayload | CurveDeltaPayload | readonly CurvePoint[], topicHint?: string): MfRangePoint | null;
|
|
55
55
|
/**
|
|
56
|
-
* 区间差分:右端 −
|
|
56
|
+
* 区间差分:右端 − 左端(客户端滑杆选两点时用)。
|
|
57
57
|
* 传入同一序列上的两点(开盘累计水位)。
|
|
58
58
|
*/
|
|
59
59
|
export declare function diffMfRangePoints(left: MfRangePoint, right: MfRangePoint): MfRangePoint;
|
package/dist/curve-helpers.js
CHANGED
|
@@ -110,7 +110,7 @@ export function lastMfRangePoint(snapOrItems, topicHint) {
|
|
|
110
110
|
return isMfRangePoint(last) ? last : last;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* 区间差分:右端 −
|
|
113
|
+
* 区间差分:右端 − 左端(客户端滑杆选两点时用)。
|
|
114
114
|
* 传入同一序列上的两点(开盘累计水位)。
|
|
115
115
|
*/
|
|
116
116
|
export function diffMfRangePoints(left, right) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Examples(库级依赖)
|
|
2
|
+
|
|
3
|
+
全部 Demo **只** `import` 已发布包 `@alphaio/quote-client`,不再粘贴 SDK 源码。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i @alphaio/quote-client
|
|
7
|
+
export QUOTE_ACTIVATION_KEY='…'
|
|
8
|
+
node node_modules/@alphaio/quote-client/examples/demo-l2.mjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
仓库内:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
export QUOTE_ACTIVATION_KEY='…' # 或默认本地 relay 的 dev key
|
|
15
|
+
yarn workspace @alphaio/quote-client demo:l2
|
|
16
|
+
yarn workspace @alphaio/quote-client demo:mf-range
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
| 文件 | topic |
|
|
20
|
+
| --------------------- | -------------- |
|
|
21
|
+
| `demo-l2.mjs` | `l2.*` |
|
|
22
|
+
| `demo-trans.mjs` | `trans.*` |
|
|
23
|
+
| `demo-order.mjs` | `order.*` |
|
|
24
|
+
| `demo-fenshi.mjs` | `fenshi.*` |
|
|
25
|
+
| `demo-fenshi-vol.mjs` | `fenshi_vol.*` |
|
|
26
|
+
| `demo-mf-range.mjs` | `mf_range.*` |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 分时量额 Demo — `import` from `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
5
|
+
* yarn workspace @alphaio/quote-client demo:fenshi-vol
|
|
6
|
+
*/
|
|
7
|
+
import { QuoteClient } from '@alphaio/quote-client';
|
|
8
|
+
|
|
9
|
+
const client = new QuoteClient({
|
|
10
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
11
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
12
|
+
auth: {
|
|
13
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY,
|
|
14
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-fenshi-vol-node',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
client.on('authFail', (f) => {
|
|
19
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
20
|
+
void client.close();
|
|
21
|
+
});
|
|
22
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
23
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
24
|
+
|
|
25
|
+
const curve = new Map();
|
|
26
|
+
client.on('curveSnap', (s) => {
|
|
27
|
+
curve.clear();
|
|
28
|
+
for (const p of s.items ?? []) curve.set(p.ts, p);
|
|
29
|
+
console.log(
|
|
30
|
+
`[FENSHI_VOL SNAP] ${s.topic} total=${s.total ?? '—'} loaded=${curve.size}`
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
client.on('curveDelta', (d) => {
|
|
34
|
+
for (const p of d.items ?? []) curve.set(p.ts, p);
|
|
35
|
+
const last = d.items?.[d.items.length - 1];
|
|
36
|
+
console.log(
|
|
37
|
+
`[FENSHI_VOL Δ] ${d.topic} +${d.items?.length ?? 0} last ts=${last?.ts} vol=${last?.volume} amount=${last?.amount} size=${curve.size}`
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const lease = await client.connect();
|
|
42
|
+
console.log(
|
|
43
|
+
`AUTH_OK fenshiVolQuota=${lease.streamQuotas?.fenshiVol} until=${lease.validUntil}`
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const topic = process.env.QUOTE_TOPIC || 'fenshi_vol.600519';
|
|
47
|
+
const ack = await client.subscribe([topic]);
|
|
48
|
+
console.log('accepted', ack.accepted);
|
|
49
|
+
console.log('rejected', ack.rejected);
|
|
50
|
+
|
|
51
|
+
process.on('SIGINT', () => {
|
|
52
|
+
void client.close().then(() => process.exit(0));
|
|
53
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 分时价格 Demo — `import` from `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
5
|
+
* yarn workspace @alphaio/quote-client demo:fenshi
|
|
6
|
+
*/
|
|
7
|
+
import { QuoteClient } from '@alphaio/quote-client';
|
|
8
|
+
|
|
9
|
+
const client = new QuoteClient({
|
|
10
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
11
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
12
|
+
auth: {
|
|
13
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY,
|
|
14
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-fenshi-node',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
client.on('authFail', (f) => {
|
|
19
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
20
|
+
void client.close();
|
|
21
|
+
});
|
|
22
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
23
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
24
|
+
|
|
25
|
+
const curve = new Map();
|
|
26
|
+
client.on('curveSnap', (s) => {
|
|
27
|
+
curve.clear();
|
|
28
|
+
for (const p of s.items ?? []) curve.set(p.ts, p);
|
|
29
|
+
console.log(
|
|
30
|
+
`[FENSHI SNAP] ${s.topic} total=${s.total ?? '—'} loaded=${curve.size}`
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
client.on('curveDelta', (d) => {
|
|
34
|
+
for (const p of d.items ?? []) curve.set(p.ts, p);
|
|
35
|
+
const last = d.items?.[d.items.length - 1];
|
|
36
|
+
console.log(
|
|
37
|
+
`[FENSHI Δ] ${d.topic} +${d.items?.length ?? 0} last ts=${last?.ts} price=${last?.price} avg=${last?.avg} size=${curve.size}`
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const lease = await client.connect();
|
|
42
|
+
console.log(
|
|
43
|
+
`AUTH_OK fenshiQuota=${lease.streamQuotas?.fenshi} until=${lease.validUntil}`
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const topic = process.env.QUOTE_TOPIC || 'fenshi.600519';
|
|
47
|
+
const ack = await client.subscribe([topic]);
|
|
48
|
+
console.log('accepted', ack.accepted);
|
|
49
|
+
console.log('rejected', ack.rejected);
|
|
50
|
+
|
|
51
|
+
process.on('SIGINT', () => {
|
|
52
|
+
void client.close().then(() => process.exit(0));
|
|
53
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 十档 L2 Demo — 依赖已发布包 `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* npm i @alphaio/quote-client
|
|
5
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
6
|
+
* node node_modules/@alphaio/quote-client/examples/demo-l2.mjs
|
|
7
|
+
* # 或仓库内:yarn workspace @alphaio/quote-client demo:l2
|
|
8
|
+
*/
|
|
9
|
+
import { QuoteClient } from '@alphaio/quote-client';
|
|
10
|
+
|
|
11
|
+
const client = new QuoteClient({
|
|
12
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
13
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
14
|
+
auth: {
|
|
15
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY,
|
|
16
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-l2-node',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
client.on('authFail', (f) => {
|
|
21
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
22
|
+
void client.close();
|
|
23
|
+
});
|
|
24
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
25
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
26
|
+
client.on('quote', (q) => {
|
|
27
|
+
const b1 = q.bid_price?.[0] ?? q.bid;
|
|
28
|
+
const a1 = q.ask_price?.[0] ?? q.ask;
|
|
29
|
+
console.log(
|
|
30
|
+
`[L2] ${q.topic} last=${q.last} bid1=${b1} ask1=${a1} phase=${q.trading_phase} time=${q.time}`
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
client.on('quoteSnap', (s) =>
|
|
34
|
+
console.log(`[L2 SNAP] ${s.topic} items=${s.items.length}`)
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const lease = await client.connect();
|
|
38
|
+
console.log(
|
|
39
|
+
`AUTH_OK l2Quota=${lease.streamQuotas?.l2} until=${lease.validUntil}`
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const topic = process.env.QUOTE_TOPIC || 'l2.600519';
|
|
43
|
+
const ack = await client.subscribe([topic]);
|
|
44
|
+
console.log('accepted', ack.accepted);
|
|
45
|
+
console.log('rejected', ack.rejected);
|
|
46
|
+
|
|
47
|
+
process.on('SIGINT', () => {
|
|
48
|
+
void client.close().then(() => process.exit(0));
|
|
49
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 区间主力 Demo — `import` from `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
5
|
+
* yarn workspace @alphaio/quote-client demo:mf-range
|
|
6
|
+
*/
|
|
7
|
+
import {
|
|
8
|
+
lastMfRangePoint,
|
|
9
|
+
narrowCurveSnap,
|
|
10
|
+
QuoteClient,
|
|
11
|
+
} from '@alphaio/quote-client';
|
|
12
|
+
|
|
13
|
+
const topic = process.env.QUOTE_TOPIC ?? 'mf_range.600519';
|
|
14
|
+
const client = new QuoteClient({
|
|
15
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
16
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
17
|
+
auth: {
|
|
18
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY ?? 'dev-mf-range-only',
|
|
19
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-mf-range-node',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
client.on('authFail', (f) => {
|
|
24
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
25
|
+
void client.close();
|
|
26
|
+
});
|
|
27
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
28
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
29
|
+
|
|
30
|
+
client.on('curveSnap', (snap) => {
|
|
31
|
+
const n = narrowCurveSnap(snap);
|
|
32
|
+
if (n.kind !== 'mf_range') return;
|
|
33
|
+
const last = lastMfRangePoint(n.items);
|
|
34
|
+
console.log(
|
|
35
|
+
'CURVE_SNAP',
|
|
36
|
+
snap.topic,
|
|
37
|
+
'items',
|
|
38
|
+
n.items.length,
|
|
39
|
+
'lastNet',
|
|
40
|
+
last?.mainNet
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
client.on('curveDelta', (delta) => {
|
|
44
|
+
const last = lastMfRangePoint(delta);
|
|
45
|
+
console.log(
|
|
46
|
+
'CURVE_DELTA',
|
|
47
|
+
delta.topic,
|
|
48
|
+
'items',
|
|
49
|
+
delta.items.length,
|
|
50
|
+
'lastNet',
|
|
51
|
+
last?.mainNet
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const lease = await client.connect();
|
|
56
|
+
console.log('AUTH_OK mfRange', lease.streamQuotas.mfRange);
|
|
57
|
+
const ack = await client.subscribe([topic]);
|
|
58
|
+
console.log('SUB_ACK', ack.accepted, ack.rejected);
|
|
59
|
+
|
|
60
|
+
process.on('SIGINT', () => {
|
|
61
|
+
void client.close().then(() => process.exit(0));
|
|
62
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 逐笔委托 Demo — `import` from `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
5
|
+
* yarn workspace @alphaio/quote-client demo:order
|
|
6
|
+
*/
|
|
7
|
+
import { QuoteClient } from '@alphaio/quote-client';
|
|
8
|
+
|
|
9
|
+
const client = new QuoteClient({
|
|
10
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
11
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
12
|
+
auth: {
|
|
13
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY,
|
|
14
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-order-node',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
client.on('authFail', (f) => {
|
|
19
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
20
|
+
void client.close();
|
|
21
|
+
});
|
|
22
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
23
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
24
|
+
client.on('quote', (q) => {
|
|
25
|
+
console.log(
|
|
26
|
+
`[ORDER] ${q.topic} price=${q.price} vol=${q.volume} side=${q.side ?? q.bs_flag} time=${q.time}`
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
client.on('quoteSnap', (s) =>
|
|
30
|
+
console.log(`[ORDER SNAP] ${s.topic} items=${s.items.length}`)
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const lease = await client.connect();
|
|
34
|
+
console.log(
|
|
35
|
+
`AUTH_OK orderQuota=${lease.streamQuotas?.order} until=${lease.validUntil}`
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const topic = process.env.QUOTE_TOPIC || 'order.600519';
|
|
39
|
+
const ack = await client.subscribe([topic]);
|
|
40
|
+
console.log('accepted', ack.accepted);
|
|
41
|
+
console.log('rejected', ack.rejected);
|
|
42
|
+
|
|
43
|
+
process.on('SIGINT', () => {
|
|
44
|
+
void client.close().then(() => process.exit(0));
|
|
45
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 逐笔成交 Demo — `import` from `@alphaio/quote-client`
|
|
3
|
+
*
|
|
4
|
+
* export QUOTE_ACTIVATION_KEY='…'
|
|
5
|
+
* yarn workspace @alphaio/quote-client demo:trans
|
|
6
|
+
*/
|
|
7
|
+
import { QuoteClient } from '@alphaio/quote-client';
|
|
8
|
+
|
|
9
|
+
const client = new QuoteClient({
|
|
10
|
+
host: process.env.RELAY_HOST ?? 's1.diancha.vip',
|
|
11
|
+
port: Number(process.env.RELAY_LISTEN_PORT || 17010),
|
|
12
|
+
auth: {
|
|
13
|
+
activationKey: process.env.QUOTE_ACTIVATION_KEY,
|
|
14
|
+
deviceId: process.env.QUOTE_DEVICE_ID ?? 'demo-trans-node',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
client.on('authFail', (f) => {
|
|
19
|
+
console.error('[AUTH_FAIL]', f.code, f.message);
|
|
20
|
+
void client.close();
|
|
21
|
+
});
|
|
22
|
+
client.on('kick', (k) => console.warn('[KICK]', k.reason, k.message ?? ''));
|
|
23
|
+
client.on('error', (e) => console.error('[error]', e.message));
|
|
24
|
+
client.on('quote', (q) => {
|
|
25
|
+
console.log(
|
|
26
|
+
`[TRANS] ${q.topic} price=${q.price} vol=${q.volume} bs=${q.bs_flag} time=${q.time}`
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
client.on('quoteSnap', (s) =>
|
|
30
|
+
console.log(`[TRANS SNAP] ${s.topic} items=${s.items.length}`)
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const lease = await client.connect();
|
|
34
|
+
console.log(
|
|
35
|
+
`AUTH_OK transQuota=${lease.streamQuotas?.trans} until=${lease.validUntil}`
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const topic = process.env.QUOTE_TOPIC || 'trans.600519';
|
|
39
|
+
const ack = await client.subscribe([topic]);
|
|
40
|
+
console.log('accepted', ack.accepted);
|
|
41
|
+
console.log('rejected', ack.rejected);
|
|
42
|
+
|
|
43
|
+
process.on('SIGINT', () => {
|
|
44
|
+
void client.close().then(() => process.exit(0));
|
|
45
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphaio/quote-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Thin TCP client for AlphaIO quote-relay.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"files": [
|
|
31
31
|
"./dist/",
|
|
32
|
+
"./examples/",
|
|
32
33
|
"README.md",
|
|
33
34
|
"LICENSE"
|
|
34
35
|
],
|
|
@@ -36,6 +37,12 @@
|
|
|
36
37
|
"build": "tsc -p ./tsconfig.json",
|
|
37
38
|
"clean": "rimraf --no-glob ./dist ./coverage ./.eslintcache ./tsconfig.tsbuildinfo",
|
|
38
39
|
"demo": "node --import=@hyperse/ts-node/register ./src/cli.ts",
|
|
40
|
+
"demo:l2": "node ./examples/demo-l2.mjs",
|
|
41
|
+
"demo:trans": "node ./examples/demo-trans.mjs",
|
|
42
|
+
"demo:order": "node ./examples/demo-order.mjs",
|
|
43
|
+
"demo:fenshi": "node ./examples/demo-fenshi.mjs",
|
|
44
|
+
"demo:fenshi-vol": "node ./examples/demo-fenshi-vol.mjs",
|
|
45
|
+
"demo:mf-range": "node ./examples/demo-mf-range.mjs",
|
|
39
46
|
"fix-all-files": "eslint . --fix",
|
|
40
47
|
"load-test": "node --import=@hyperse/ts-node/register ./src/load-test.ts",
|
|
41
48
|
"lint": "eslint .",
|
|
@@ -44,7 +51,7 @@
|
|
|
44
51
|
"typecheck": "tsc -p ./tsconfig.json --noEmit"
|
|
45
52
|
},
|
|
46
53
|
"dependencies": {
|
|
47
|
-
"@alphaio/quote-protocol": "^0.2.
|
|
54
|
+
"@alphaio/quote-protocol": "^0.2.1"
|
|
48
55
|
},
|
|
49
56
|
"devDependencies": {
|
|
50
57
|
"@hyperse/eslint-config-hyperse": "^2.1.0",
|