@yuants/exchange 0.8.23 → 0.8.24
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/dist/exchange.d.ts +16 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +27 -1
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/temp/build/typescript/ts_ji-pb6h_.json +1 -1
- package/temp/exchange.api.json +177 -0
- package/temp/exchange.api.md +7 -0
- package/temp/package-deps.json +5 -5
- package/temp/test/jest/haste-map-f50e7cc8db739b6ac2b07d506eb6fdee-b0f299de6a65bcc22988084da157f170-c4011bd9f6a16ae7503ec572fe00f1e3 +0 -0
- package/temp/test/jest/perf-cache-f50e7cc8db739b6ac2b07d506eb6fdee-da39a3ee5e6b4b0d3255bfef95601890 +1 -1
package/temp/exchange.api.json
CHANGED
|
@@ -375,6 +375,112 @@
|
|
|
375
375
|
],
|
|
376
376
|
"name": "getCredentialId"
|
|
377
377
|
},
|
|
378
|
+
{
|
|
379
|
+
"kind": "Function",
|
|
380
|
+
"canonicalReference": "@yuants/exchange!getOrderByOrderId:function(1)",
|
|
381
|
+
"docComment": "/**\n * Get order by order ID\n *\n * @public\n */\n",
|
|
382
|
+
"excerptTokens": [
|
|
383
|
+
{
|
|
384
|
+
"kind": "Content",
|
|
385
|
+
"text": "getOrderByOrderId: <T>(terminal: "
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"kind": "Reference",
|
|
389
|
+
"text": "Terminal",
|
|
390
|
+
"canonicalReference": "@yuants/protocol!Terminal:class"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "Content",
|
|
394
|
+
"text": ", credential: "
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"kind": "Content",
|
|
398
|
+
"text": "{\n type: string;\n payload: T;\n}"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"kind": "Content",
|
|
402
|
+
"text": ", params: "
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"kind": "Reference",
|
|
406
|
+
"text": "Record",
|
|
407
|
+
"canonicalReference": "!Record:type"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"kind": "Content",
|
|
411
|
+
"text": "<string, unknown>"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"kind": "Content",
|
|
415
|
+
"text": ") => "
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"kind": "Reference",
|
|
419
|
+
"text": "Promise",
|
|
420
|
+
"canonicalReference": "!Promise:interface"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"kind": "Content",
|
|
424
|
+
"text": "<"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"kind": "Reference",
|
|
428
|
+
"text": "IResponse",
|
|
429
|
+
"canonicalReference": "@yuants/protocol!IResponse:interface"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"kind": "Content",
|
|
433
|
+
"text": "<void>>"
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"fileUrlPath": "src/index.ts",
|
|
437
|
+
"returnTypeTokenRange": {
|
|
438
|
+
"startIndex": 8,
|
|
439
|
+
"endIndex": 12
|
|
440
|
+
},
|
|
441
|
+
"releaseTag": "Public",
|
|
442
|
+
"overloadIndex": 1,
|
|
443
|
+
"parameters": [
|
|
444
|
+
{
|
|
445
|
+
"parameterName": "terminal",
|
|
446
|
+
"parameterTypeTokenRange": {
|
|
447
|
+
"startIndex": 1,
|
|
448
|
+
"endIndex": 2
|
|
449
|
+
},
|
|
450
|
+
"isOptional": false
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"parameterName": "credential",
|
|
454
|
+
"parameterTypeTokenRange": {
|
|
455
|
+
"startIndex": 3,
|
|
456
|
+
"endIndex": 4
|
|
457
|
+
},
|
|
458
|
+
"isOptional": false
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"parameterName": "params",
|
|
462
|
+
"parameterTypeTokenRange": {
|
|
463
|
+
"startIndex": 5,
|
|
464
|
+
"endIndex": 7
|
|
465
|
+
},
|
|
466
|
+
"isOptional": false
|
|
467
|
+
}
|
|
468
|
+
],
|
|
469
|
+
"typeParameters": [
|
|
470
|
+
{
|
|
471
|
+
"typeParameterName": "T",
|
|
472
|
+
"constraintTokenRange": {
|
|
473
|
+
"startIndex": 0,
|
|
474
|
+
"endIndex": 0
|
|
475
|
+
},
|
|
476
|
+
"defaultTypeTokenRange": {
|
|
477
|
+
"startIndex": 0,
|
|
478
|
+
"endIndex": 0
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
],
|
|
482
|
+
"name": "getOrderByOrderId"
|
|
483
|
+
},
|
|
378
484
|
{
|
|
379
485
|
"kind": "Function",
|
|
380
486
|
"canonicalReference": "@yuants/exchange!getOrders:function(1)",
|
|
@@ -776,6 +882,77 @@
|
|
|
776
882
|
],
|
|
777
883
|
"name": "getCredentialId"
|
|
778
884
|
},
|
|
885
|
+
{
|
|
886
|
+
"kind": "MethodSignature",
|
|
887
|
+
"canonicalReference": "@yuants/exchange!IExchange#getOrderByOrderId:member(1)",
|
|
888
|
+
"docComment": "/**\n * Get an order by its ID\n *\n * @param credential - The credential object\n *\n * @param params - The parameters to identify the order\n */\n",
|
|
889
|
+
"excerptTokens": [
|
|
890
|
+
{
|
|
891
|
+
"kind": "Content",
|
|
892
|
+
"text": "getOrderByOrderId?(credential: "
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"kind": "Content",
|
|
896
|
+
"text": "T"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"kind": "Content",
|
|
900
|
+
"text": ", params: "
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"kind": "Reference",
|
|
904
|
+
"text": "Record",
|
|
905
|
+
"canonicalReference": "!Record:type"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"kind": "Content",
|
|
909
|
+
"text": "<string, unknown>"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"kind": "Content",
|
|
913
|
+
"text": "): "
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"kind": "Reference",
|
|
917
|
+
"text": "Promise",
|
|
918
|
+
"canonicalReference": "!Promise:interface"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"kind": "Content",
|
|
922
|
+
"text": "<any>"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"kind": "Content",
|
|
926
|
+
"text": ";"
|
|
927
|
+
}
|
|
928
|
+
],
|
|
929
|
+
"isOptional": true,
|
|
930
|
+
"returnTypeTokenRange": {
|
|
931
|
+
"startIndex": 6,
|
|
932
|
+
"endIndex": 8
|
|
933
|
+
},
|
|
934
|
+
"releaseTag": "Public",
|
|
935
|
+
"overloadIndex": 1,
|
|
936
|
+
"parameters": [
|
|
937
|
+
{
|
|
938
|
+
"parameterName": "credential",
|
|
939
|
+
"parameterTypeTokenRange": {
|
|
940
|
+
"startIndex": 1,
|
|
941
|
+
"endIndex": 2
|
|
942
|
+
},
|
|
943
|
+
"isOptional": false
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"parameterName": "params",
|
|
947
|
+
"parameterTypeTokenRange": {
|
|
948
|
+
"startIndex": 3,
|
|
949
|
+
"endIndex": 5
|
|
950
|
+
},
|
|
951
|
+
"isOptional": false
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
"name": "getOrderByOrderId"
|
|
955
|
+
},
|
|
779
956
|
{
|
|
780
957
|
"kind": "MethodSignature",
|
|
781
958
|
"canonicalReference": "@yuants/exchange!IExchange#getOrders:member(1)",
|
package/temp/exchange.api.md
CHANGED
|
@@ -29,6 +29,12 @@ export const getCredentialId: <T>(terminal: Terminal, credential: {
|
|
|
29
29
|
payload: T;
|
|
30
30
|
}) => Promise<IResponse<string>>;
|
|
31
31
|
|
|
32
|
+
// @public
|
|
33
|
+
export const getOrderByOrderId: <T>(terminal: Terminal, credential: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: T;
|
|
36
|
+
}, params: Record<string, unknown>) => Promise<IResponse<void>>;
|
|
37
|
+
|
|
32
38
|
// @public
|
|
33
39
|
export const getOrders: <T>(terminal: Terminal, credential: {
|
|
34
40
|
type: string;
|
|
@@ -46,6 +52,7 @@ export interface IExchange<T = any> {
|
|
|
46
52
|
cancelOrder(credential: T, order: IOrder): Promise<void>;
|
|
47
53
|
credentialSchema: JSONSchema7;
|
|
48
54
|
getCredentialId(credential: T): Promise<string>;
|
|
55
|
+
getOrderByOrderId?(credential: T, params: Record<string, unknown>): Promise<any>;
|
|
49
56
|
getOrders(credential: T): Promise<IOrder[]>;
|
|
50
57
|
getOrdersByProductId(credential: T, product_id: string): Promise<IOrder[]>;
|
|
51
58
|
getPositions(credential: T): Promise<IPosition[]>;
|
package/temp/package-deps.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"libraries/exchange/CHANGELOG.json": "
|
|
3
|
-
"libraries/exchange/CHANGELOG.md": "
|
|
2
|
+
"libraries/exchange/CHANGELOG.json": "482e9682ecc1ad5e08a64d829b80718ed551117b",
|
|
3
|
+
"libraries/exchange/CHANGELOG.md": "756024f66298bbf28c2c1004d7f9d0406c3e8d20",
|
|
4
4
|
"libraries/exchange/config/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
5
5
|
"libraries/exchange/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
6
6
|
"libraries/exchange/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
7
7
|
"libraries/exchange/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
8
|
-
"libraries/exchange/etc/exchange.api.md": "
|
|
9
|
-
"libraries/exchange/package.json": "
|
|
10
|
-
"libraries/exchange/src/index.ts": "
|
|
8
|
+
"libraries/exchange/etc/exchange.api.md": "3f30bae94d7663dad2ec7bbc3eb33395f2a5398f",
|
|
9
|
+
"libraries/exchange/package.json": "e9e9bd60d1a0a330d761c4a4a46496937f9d0158",
|
|
10
|
+
"libraries/exchange/src/index.ts": "ee7b7eaaa52b2cb8e4766a3b5549ff4840cbe210",
|
|
11
11
|
"libraries/exchange/src/interest_rate.test.ts": "9197fe2ace778d3dd6ef6043926d776abf21ab89",
|
|
12
12
|
"libraries/exchange/src/interest_rate.ts": "4a0a0ade0a5508fd5660af96a3ade416c97f5436",
|
|
13
13
|
"libraries/exchange/src/ohlc.test.ts": "975b880372c2c608d09944a37e294244bd6e488b",
|
|
Binary file
|
package/temp/test/jest/perf-cache-f50e7cc8db739b6ac2b07d506eb6fdee-da39a3ee5e6b4b0d3255bfef95601890
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/
|
|
1
|
+
{"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/quote.test.js":[1,918],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/ohlc.test.js":[1,919],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/interest_rate.test.js":[1,933]}
|