@yuants/exchange 0.8.23 → 0.8.25

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.
@@ -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": false,
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)",
@@ -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[]>;
@@ -1,13 +1,13 @@
1
1
  {
2
- "libraries/exchange/CHANGELOG.json": "cee9123d5ba5f32ad3834a9134f4a7dcfc0242b8",
3
- "libraries/exchange/CHANGELOG.md": "6b254d3dc10865c7cb877fb8ffe60a39b4c4cda7",
2
+ "libraries/exchange/CHANGELOG.json": "3dca0a254cb2d957b0ff6b36384bc9538b9f3702",
3
+ "libraries/exchange/CHANGELOG.md": "f4defa60817c5cc0bad4a8d2cfc87b50c6ccb91b",
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": "395a59dc1354013febe0138ee5990962b6704e56",
9
- "libraries/exchange/package.json": "1a291de6bd5a37c446975a46a3dc7ca5732995f4",
10
- "libraries/exchange/src/index.ts": "d50f575bee8bb10e0207dd0c54b0aef75890de2c",
8
+ "libraries/exchange/etc/exchange.api.md": "6e3e73065adb85ede583f432d76ac2261dafea16",
9
+ "libraries/exchange/package.json": "a41183fa2e26f9d6d1dc41c2b219fae9dafc48b8",
10
+ "libraries/exchange/src/index.ts": "47ced091d021ee96992e45c9b526ef0602c7a08c",
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",
@@ -1 +1 @@
1
- {"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/interest_rate.test.js":[1,1888],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/quote.test.js":[1,2126],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/ohlc.test.js":[1,2176]}
1
+ {"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/interest_rate.test.js":[1,923],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/ohlc.test.js":[1,947],"/home/runner/work/Yuan/Yuan/libraries/exchange/lib/quote.test.js":[1,955]}