@yuants/exchange 0.0.0
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 +159 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/lib/index.d.ts +148 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +170 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +36 -0
- package/temp/exchange.api.json +1269 -0
- package/temp/exchange.api.md +77 -0
- package/temp/package-deps.json +16 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
## API Report File for "@yuants/exchange"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { IOrder } from '@yuants/data-order';
|
|
8
|
+
import { IPosition } from '@yuants/data-account';
|
|
9
|
+
import { IProduct } from '@yuants/data-product';
|
|
10
|
+
import { IResponse } from '@yuants/protocol';
|
|
11
|
+
import { JSONSchema7 } from 'json-schema';
|
|
12
|
+
import { Terminal } from '@yuants/protocol';
|
|
13
|
+
|
|
14
|
+
// @public
|
|
15
|
+
export const cancelOrder: <T>(terminal: Terminal, credential: {
|
|
16
|
+
type: string;
|
|
17
|
+
payload: T;
|
|
18
|
+
}, order: IOrder) => Promise<IResponse<void>>;
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
export const getCredentialId: <T>(terminal: Terminal, credential: {
|
|
22
|
+
type: string;
|
|
23
|
+
payload: T;
|
|
24
|
+
}) => Promise<IResponse<string>>;
|
|
25
|
+
|
|
26
|
+
// @public
|
|
27
|
+
export const getOrders: <T>(terminal: Terminal, credential: {
|
|
28
|
+
type: string;
|
|
29
|
+
payload: T;
|
|
30
|
+
}, product_id?: string) => Promise<IResponse<IOrder[]>>;
|
|
31
|
+
|
|
32
|
+
// @public
|
|
33
|
+
export const getPositions: <T>(terminal: Terminal, credential: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: T;
|
|
36
|
+
}, product_id?: string) => Promise<IResponse<IPosition[]>>;
|
|
37
|
+
|
|
38
|
+
// @public
|
|
39
|
+
export interface IExchange<T = any> {
|
|
40
|
+
cancelOrder(credential: T, order: IOrder): Promise<void>;
|
|
41
|
+
credentialSchema: JSONSchema7;
|
|
42
|
+
getCredentialId(credential: T): Promise<string>;
|
|
43
|
+
getOrders(credential: T): Promise<IOrder[]>;
|
|
44
|
+
getOrdersByProductId(credential: T, product_id: string): Promise<IOrder[]>;
|
|
45
|
+
getPositions(credential: T): Promise<IPosition[]>;
|
|
46
|
+
getPositionsByProductId(credential: T, product_id: string): Promise<IPosition[]>;
|
|
47
|
+
listProducts(): Promise<IProduct[]>;
|
|
48
|
+
modifyOrder(credential: T, order: IOrder): Promise<void>;
|
|
49
|
+
name: string;
|
|
50
|
+
submitOrder(credential: T, order: IOrder): Promise<{
|
|
51
|
+
order_id: string;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// @public
|
|
56
|
+
export const listProducts: (terminal: Terminal) => Promise<IResponse<IProduct[]>>;
|
|
57
|
+
|
|
58
|
+
// @public
|
|
59
|
+
export const modifyOrder: <T>(terminal: Terminal, credential: {
|
|
60
|
+
type: string;
|
|
61
|
+
payload: T;
|
|
62
|
+
}, order: IOrder) => Promise<IResponse<void>>;
|
|
63
|
+
|
|
64
|
+
// @public
|
|
65
|
+
export const provideExchangeServices: <T>(terminal: Terminal, exchange: IExchange<T>) => void;
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
export const submitOrder: <T>(terminal: Terminal, credential: {
|
|
69
|
+
type: string;
|
|
70
|
+
payload: T;
|
|
71
|
+
}, order: IOrder) => Promise<IResponse<{
|
|
72
|
+
order_id: string;
|
|
73
|
+
}>>;
|
|
74
|
+
|
|
75
|
+
// (No @packageDocumentation comment for this package)
|
|
76
|
+
|
|
77
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"libraries/exchange/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
3
|
+
"libraries/exchange/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
4
|
+
"libraries/exchange/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
5
|
+
"libraries/exchange/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
6
|
+
"libraries/exchange/etc/exchange.api.md": "ab7138054a66abc7e98f67a3153f4c67784c4cf9",
|
|
7
|
+
"libraries/exchange/package.json": "63d1906846b2fa295a29c98ca2569b69abf05a1f",
|
|
8
|
+
"libraries/exchange/src/index.ts": "cccf20974a118376387c240804d4308aac90671e",
|
|
9
|
+
"libraries/exchange/tsconfig.json": "22f94ca28b507f8ddcc21b9053158eefd3f726a9",
|
|
10
|
+
"libraries/exchange/.rush/temp/shrinkwrap-deps.json": "fe334dae90ed51c3a990a52a0c70ad89e394ef85",
|
|
11
|
+
"libraries/protocol/temp/package-deps.json": "00d9a96a90bfc0e57ef3b9547151f2970a600402",
|
|
12
|
+
"libraries/data-account/temp/package-deps.json": "bf8b41c4d878dab0f39ea684fffaf6bc3c74c988",
|
|
13
|
+
"libraries/data-order/temp/package-deps.json": "4a0272551da88c9eb52150775640b12c31786de8",
|
|
14
|
+
"libraries/data-product/temp/package-deps.json": "c9a00b88e1570374aeb333756f59975d7dcc7400",
|
|
15
|
+
"tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
|
|
16
|
+
}
|