@qtsurfer/api-client 0.1.0 → 0.1.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 +6 -0
- package/dist/index.d.ts +636 -3
- package/dist/index.js +128 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/generated/client.gen.d.ts +0 -13
- package/dist/generated/client.gen.d.ts.map +0 -1
- package/dist/generated/client.gen.js +0 -6
- package/dist/generated/client.gen.js.map +0 -1
- package/dist/generated/index.d.ts +0 -3
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -4
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/schemas.gen.d.ts +0 -284
- package/dist/generated/schemas.gen.d.ts.map +0 -1
- package/dist/generated/schemas.gen.js +0 -287
- package/dist/generated/schemas.gen.js.map +0 -1
- package/dist/generated/sdk.gen.d.ts +0 -98
- package/dist/generated/sdk.gen.d.ts.map +0 -1
- package/dist/generated/sdk.gen.js +0 -177
- package/dist/generated/sdk.gen.js.map +0 -1
- package/dist/generated/types.gen.d.ts +0 -534
- package/dist/generated/types.gen.d.ts.map +0 -1
- package/dist/generated/types.gen.js +0 -3
- package/dist/generated/types.gen.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// src/generated/client.gen.ts
|
|
2
|
+
import { createClient, createConfig } from "@hey-api/client-fetch";
|
|
3
|
+
var client = createClient(createConfig({
|
|
4
|
+
baseUrl: "https://api.staging.qtsurfer.com/v1"
|
|
5
|
+
}));
|
|
6
|
+
|
|
7
|
+
// src/generated/sdk.gen.ts
|
|
8
|
+
var getExchanges = (options) => {
|
|
9
|
+
return (options?.client ?? client).get({
|
|
10
|
+
url: "/exchanges",
|
|
11
|
+
...options
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var getInstruments = (options) => {
|
|
15
|
+
return (options.client ?? client).get({
|
|
16
|
+
url: "/exchange/{exchangeId}/instruments",
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var postStrategy = (options) => {
|
|
21
|
+
return (options.client ?? client).post({
|
|
22
|
+
bodySerializer: null,
|
|
23
|
+
security: [
|
|
24
|
+
{
|
|
25
|
+
scheme: "bearer",
|
|
26
|
+
type: "http"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
url: "/strategy",
|
|
30
|
+
...options,
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "text/plain",
|
|
33
|
+
...options?.headers
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var getStrategyStatus = (options) => {
|
|
38
|
+
return (options.client ?? client).get({
|
|
39
|
+
security: [
|
|
40
|
+
{
|
|
41
|
+
scheme: "bearer",
|
|
42
|
+
type: "http"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
url: "/strategy/{strategyId}",
|
|
46
|
+
...options
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var prepareBacktesting = (options) => {
|
|
50
|
+
return (options.client ?? client).post({
|
|
51
|
+
security: [
|
|
52
|
+
{
|
|
53
|
+
scheme: "bearer",
|
|
54
|
+
type: "http"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
url: "/backtest/{exchangeId}/{type}/prepare",
|
|
58
|
+
...options,
|
|
59
|
+
headers: {
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
...options?.headers
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var getPreparationStatus = (options) => {
|
|
66
|
+
return (options.client ?? client).get({
|
|
67
|
+
security: [
|
|
68
|
+
{
|
|
69
|
+
scheme: "bearer",
|
|
70
|
+
type: "http"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
url: "/backtest/{exchangeId}/{type}/prepare/{jobId}",
|
|
74
|
+
...options
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
var executeBacktesting = (options) => {
|
|
78
|
+
return (options.client ?? client).post({
|
|
79
|
+
security: [
|
|
80
|
+
{
|
|
81
|
+
scheme: "bearer",
|
|
82
|
+
type: "http"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
url: "/backtest/{exchangeId}/{type}/execute",
|
|
86
|
+
...options,
|
|
87
|
+
headers: {
|
|
88
|
+
"Content-Type": "application/json",
|
|
89
|
+
...options?.headers
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
var cancelExecution = (options) => {
|
|
94
|
+
return (options.client ?? client).delete({
|
|
95
|
+
security: [
|
|
96
|
+
{
|
|
97
|
+
scheme: "bearer",
|
|
98
|
+
type: "http"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
url: "/backtest/{exchangeId}/{type}/execute/{jobId}",
|
|
102
|
+
...options
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var getExecutionResult = (options) => {
|
|
106
|
+
return (options.client ?? client).get({
|
|
107
|
+
security: [
|
|
108
|
+
{
|
|
109
|
+
scheme: "bearer",
|
|
110
|
+
type: "http"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
url: "/backtest/{exchangeId}/{type}/execute/{jobId}",
|
|
114
|
+
...options
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
cancelExecution,
|
|
119
|
+
client,
|
|
120
|
+
executeBacktesting,
|
|
121
|
+
getExchanges,
|
|
122
|
+
getExecutionResult,
|
|
123
|
+
getInstruments,
|
|
124
|
+
getPreparationStatus,
|
|
125
|
+
getStrategyStatus,
|
|
126
|
+
postStrategy,
|
|
127
|
+
prepareBacktesting
|
|
128
|
+
};
|
|
3
129
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../src/generated/client.gen.ts","../src/generated/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ClientOptions } from './types.gen';\nimport { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;\n\nexport const client = createClient(createConfig<ClientOptions>({\n baseUrl: 'https://api.staging.qtsurfer.com/v1'\n}));","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';\nimport type { GetExchangesData, GetExchangesResponse, GetInstrumentsData, GetInstrumentsResponse, GetInstrumentsError, PostStrategyData, PostStrategyResponse, PostStrategyError, GetStrategyStatusData, GetStrategyStatusResponse, GetStrategyStatusError, PrepareBacktestingData, PrepareBacktestingResponse, PrepareBacktestingError, GetPreparationStatusData, GetPreparationStatusResponse, GetPreparationStatusError, ExecuteBacktestingData, ExecuteBacktestingResponse, ExecuteBacktestingError, CancelExecutionData, CancelExecutionResponse, CancelExecutionError, GetExecutionResultData, GetExecutionResultResponse, GetExecutionResultError } from './types.gen';\nimport { client as _heyApiClient } from './client.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: Record<string, unknown>;\n};\n\n/**\n * Get a list of available exchanges\n */\nexport const getExchanges = <ThrowOnError extends boolean = false>(options?: Options<GetExchangesData, ThrowOnError>) => {\n return (options?.client ?? _heyApiClient).get<GetExchangesResponse, unknown, ThrowOnError>({\n url: '/exchanges',\n ...options\n });\n};\n\n/**\n * Get a list of Instruments from a specific exchange\n */\nexport const getInstruments = <ThrowOnError extends boolean = false>(options: Options<GetInstrumentsData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).get<GetInstrumentsResponse, GetInstrumentsError, ThrowOnError>({\n url: '/exchange/{exchangeId}/instruments',\n ...options\n });\n};\n\n/**\n * Compile a strategy from source code\n * Submits raw strategy source for compilation. By default the call is synchronous and returns\n * the `strategyId` once compilation succeeds. Set the header `X-Compile-Async: true` to enqueue\n * the compile task and return immediately with a `jobId` — poll\n * `GET /strategy/{strategyId}` to check status.\n *\n * The `strategyId` is deterministic: the same source for the same user always produces the\n * same id.\n *\n */\nexport const postStrategy = <ThrowOnError extends boolean = false>(options: Options<PostStrategyData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).post<PostStrategyResponse, PostStrategyError, ThrowOnError>({\n bodySerializer: null,\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/strategy',\n ...options,\n headers: {\n 'Content-Type': 'text/plain',\n ...options?.headers\n }\n });\n};\n\n/**\n * Get the status of an async compile task\n * Polls the status of a strategy compilation. Useful when the strategy was submitted with\n * `X-Compile-Async: true`. Returns the resolved `strategyId` once compilation completes.\n *\n */\nexport const getStrategyStatus = <ThrowOnError extends boolean = false>(options: Options<GetStrategyStatusData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).get<GetStrategyStatusResponse, GetStrategyStatusError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/strategy/{strategyId}',\n ...options\n });\n};\n\n/**\n * Prepare backtesting data\n * Enqueues a prepare task over the requested date range. Returns immediately with a `jobId`;\n * poll `GET /backtest/{exchangeId}/{type}/prepare/{jobId}` for completion.\n *\n * The same params always return the same `jobId` (idempotent). Repeated calls with identical\n * params do not enqueue duplicate work — they reuse the existing job.\n *\n */\nexport const prepareBacktesting = <ThrowOnError extends boolean = false>(options: Options<PrepareBacktestingData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).post<PrepareBacktestingResponse, PrepareBacktestingError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/backtest/{exchangeId}/{type}/prepare',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers\n }\n });\n};\n\n/**\n * Get the status of a prepare job\n * Retrieves the current state of the prepare job identified by `jobId`.\n * Poll until `status` is `Completed`, `Failed`, or `Aborted`.\n *\n */\nexport const getPreparationStatus = <ThrowOnError extends boolean = false>(options: Options<GetPreparationStatusData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).get<GetPreparationStatusResponse, GetPreparationStatusError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/backtest/{exchangeId}/{type}/prepare/{jobId}',\n ...options\n });\n};\n\n/**\n * Execute a compiled strategy against a prepared dataset\n * Enqueues an execute task that runs the strategy identified by `strategyId` over the data\n * prepared by the prepare job identified by `prepareJobId`. The instrument and date range are\n * recovered from the prepare job — they do not need to be sent again.\n *\n * Returns immediately with a `jobId`; poll `GET /backtest/{exchangeId}/{type}/execute/{jobId}`\n * for the result.\n *\n * The same params (same `prepareJobId`, `strategyId`, `storeSignals`) always return the same\n * `jobId` (idempotent).\n *\n */\nexport const executeBacktesting = <ThrowOnError extends boolean = false>(options: Options<ExecuteBacktestingData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).post<ExecuteBacktestingResponse, ExecuteBacktestingError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/backtest/{exchangeId}/{type}/execute',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers\n }\n });\n};\n\n/**\n * Cancel a running backtest execution\n * Requests cancellation of the specified execution. The execution\n * status will transition to `Aborted` once the cancellation is\n * processed. Cancellation is asynchronous — poll the GET endpoint\n * to confirm the final status.\n *\n */\nexport const cancelExecution = <ThrowOnError extends boolean = false>(options: Options<CancelExecutionData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).delete<CancelExecutionResponse, CancelExecutionError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/backtest/{exchangeId}/{type}/execute/{jobId}',\n ...options\n });\n};\n\n/**\n * Get the result of a backtest execution job\n * Retrieves the current state and results of the execute job identified by `jobId`.\n * Poll until `state.status` is `Completed`, `Failed`, or `Aborted`.\n *\n */\nexport const getExecutionResult = <ThrowOnError extends boolean = false>(options: Options<GetExecutionResultData, ThrowOnError>) => {\n return (options.client ?? _heyApiClient).get<GetExecutionResultResponse, GetExecutionResultError, ThrowOnError>({\n security: [\n {\n scheme: 'bearer',\n type: 'http'\n }\n ],\n url: '/backtest/{exchangeId}/{type}/execute/{jobId}',\n ...options\n });\n};"],"mappings":";AAGA,SAAkE,cAAc,oBAAoB;AAY7F,IAAM,SAAS,aAAa,aAA4B;AAAA,EAC3D,SAAS;AACb,CAAC,CAAC;;;ACMK,IAAM,eAAe,CAAuC,YAAsD;AACrH,UAAQ,SAAS,UAAU,QAAe,IAAiD;AAAA,IACvF,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;AAKO,IAAM,iBAAiB,CAAuC,YAAuD;AACxH,UAAQ,QAAQ,UAAU,QAAe,IAA+D;AAAA,IACpG,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;AAaO,IAAM,eAAe,CAAuC,YAAqD;AACpH,UAAQ,QAAQ,UAAU,QAAe,KAA4D;AAAA,IACjG,gBAAgB;AAAA,IAChB,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG,SAAS;AAAA,IAChB;AAAA,EACJ,CAAC;AACL;AAQO,IAAM,oBAAoB,CAAuC,YAA0D;AAC9H,UAAQ,QAAQ,UAAU,QAAe,IAAqE;AAAA,IAC1G,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;AAWO,IAAM,qBAAqB,CAAuC,YAA2D;AAChI,UAAQ,QAAQ,UAAU,QAAe,KAAwE;AAAA,IAC7G,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG,SAAS;AAAA,IAChB;AAAA,EACJ,CAAC;AACL;AAQO,IAAM,uBAAuB,CAAuC,YAA6D;AACpI,UAAQ,QAAQ,UAAU,QAAe,IAA2E;AAAA,IAChH,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;AAeO,IAAM,qBAAqB,CAAuC,YAA2D;AAChI,UAAQ,QAAQ,UAAU,QAAe,KAAwE;AAAA,IAC7G,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG,SAAS;AAAA,IAChB;AAAA,EACJ,CAAC;AACL;AAUO,IAAM,kBAAkB,CAAuC,YAAwD;AAC1H,UAAQ,QAAQ,UAAU,QAAe,OAAoE;AAAA,IACzG,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;AAQO,IAAM,qBAAqB,CAAuC,YAA2D;AAChI,UAAQ,QAAQ,UAAU,QAAe,IAAuE;AAAA,IAC5G,UAAU;AAAA,MACN;AAAA,QACI,QAAQ;AAAA,QACR,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qtsurfer/api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Auto-generated TypeScript API client for the QTSurfer API (from OpenAPI 3.1 spec)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"generate": "openapi-ts",
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "tsup",
|
|
24
24
|
"lint": "tsc --noEmit",
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@hey-api/openapi-ts": "^0.66",
|
|
51
|
+
"tsup": "^8.5.1",
|
|
51
52
|
"typescript": "^5.8.0"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ClientOptions } from './types.gen';
|
|
2
|
-
import { type Config, type ClientOptions as DefaultClientOptions } from '@hey-api/client-fetch';
|
|
3
|
-
/**
|
|
4
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
5
|
-
* and the returned object will become the client's initial configuration.
|
|
6
|
-
*
|
|
7
|
-
* You may want to initialize your client this way instead of calling
|
|
8
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
9
|
-
* to ensure your client always has the correct values.
|
|
10
|
-
*/
|
|
11
|
-
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
|
|
12
|
-
export declare const client: import("@hey-api/client-fetch").Client;
|
|
13
|
-
//# sourceMappingURL=client.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../src/generated/client.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,IAAI,oBAAoB,EAA8B,MAAM,uBAAuB,CAAC;AAE5H;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,oBAAoB,GAAG,aAAa,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,oBAAoB,GAAG,CAAC,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7K,eAAO,MAAM,MAAM,wCAEhB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { createClient, createConfig } from '@hey-api/client-fetch';
|
|
3
|
-
export const client = createClient(createConfig({
|
|
4
|
-
baseUrl: 'https://api.staging.qtsurfer.com/v1'
|
|
5
|
-
}));
|
|
6
|
-
//# sourceMappingURL=client.gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.js","sourceRoot":"","sources":["../../src/generated/client.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAGrD,OAAO,EAA2D,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAY5H,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,YAAY,CAAgB;IAC3D,OAAO,EAAE,qCAAqC;CACjD,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
package/dist/generated/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
export declare const ResponseErrorSchema: {
|
|
2
|
-
readonly description: "General response error";
|
|
3
|
-
readonly type: "object";
|
|
4
|
-
readonly required: readonly ["code", "message"];
|
|
5
|
-
readonly properties: {
|
|
6
|
-
readonly code: {
|
|
7
|
-
readonly description: "Status code";
|
|
8
|
-
readonly type: "integer";
|
|
9
|
-
readonly example: 400;
|
|
10
|
-
};
|
|
11
|
-
readonly message: {
|
|
12
|
-
readonly description: "Error description";
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly example: "Invalid request";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare const InstrumentSchema: {
|
|
19
|
-
readonly description: "Exchange instrument identifier (e.g. a currency pair)";
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
readonly example: "BTC/USDT";
|
|
22
|
-
};
|
|
23
|
-
export declare const InstrumentDetailSchema: {
|
|
24
|
-
readonly description: "Exchange instrument with data availability and market info";
|
|
25
|
-
readonly type: "object";
|
|
26
|
-
readonly required: readonly ["id", "base", "quote"];
|
|
27
|
-
readonly properties: {
|
|
28
|
-
readonly id: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly description: "Instrument identifier (e.g. currency pair)";
|
|
31
|
-
readonly example: "BTC/USDT";
|
|
32
|
-
};
|
|
33
|
-
readonly base: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
readonly description: "Base currency";
|
|
36
|
-
readonly example: "BTC";
|
|
37
|
-
};
|
|
38
|
-
readonly quote: {
|
|
39
|
-
readonly type: "string";
|
|
40
|
-
readonly description: "Quote currency";
|
|
41
|
-
readonly example: "USDT";
|
|
42
|
-
};
|
|
43
|
-
readonly dataFrom: {
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
readonly format: "date-time";
|
|
46
|
-
readonly description: "Earliest timestamp with quality-verified data available for backtesting";
|
|
47
|
-
readonly example: "2026-03-17T00:00:00Z";
|
|
48
|
-
};
|
|
49
|
-
readonly dataTo: {
|
|
50
|
-
readonly type: "string";
|
|
51
|
-
readonly format: "date-time";
|
|
52
|
-
readonly description: "Latest timestamp with quality-verified data available for backtesting";
|
|
53
|
-
readonly example: "2026-03-31T18:00:00Z";
|
|
54
|
-
};
|
|
55
|
-
readonly lastPrice: {
|
|
56
|
-
readonly type: "number";
|
|
57
|
-
readonly format: "double";
|
|
58
|
-
readonly description: "Last traded price";
|
|
59
|
-
readonly example: 84250.5;
|
|
60
|
-
};
|
|
61
|
-
readonly volume24h: {
|
|
62
|
-
readonly type: "number";
|
|
63
|
-
readonly format: "double";
|
|
64
|
-
readonly description: "Trading volume in the last 24 hours (in quote currency)";
|
|
65
|
-
readonly example: 1234567.89;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export declare const ExchangeSchema: {
|
|
70
|
-
readonly description: "Exchange service provider";
|
|
71
|
-
readonly type: "object";
|
|
72
|
-
readonly required: readonly ["id", "name"];
|
|
73
|
-
readonly properties: {
|
|
74
|
-
readonly id: {
|
|
75
|
-
readonly description: "Unique identifier for the exchange";
|
|
76
|
-
readonly type: "string";
|
|
77
|
-
readonly example: "binance";
|
|
78
|
-
};
|
|
79
|
-
readonly name: {
|
|
80
|
-
readonly description: "Name of the exchange";
|
|
81
|
-
readonly type: "string";
|
|
82
|
-
readonly example: "Binance";
|
|
83
|
-
};
|
|
84
|
-
readonly description: {
|
|
85
|
-
readonly description: "Description of the exchange";
|
|
86
|
-
readonly type: "string";
|
|
87
|
-
readonly example: "Binance cryptocurrency exchange";
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export declare const DataSourceTypeSchema: {
|
|
92
|
-
readonly type: "string";
|
|
93
|
-
readonly description: "Managed exchange data sources available for backtesting. Currently only ticker is supported; kline and funding rate support is planned.";
|
|
94
|
-
readonly enum: readonly ["ticker"];
|
|
95
|
-
readonly example: "ticker";
|
|
96
|
-
};
|
|
97
|
-
export declare const JobStateSchema: {
|
|
98
|
-
readonly type: "object";
|
|
99
|
-
readonly description: "Information about a single job";
|
|
100
|
-
readonly required: readonly ["contextId", "status", "size", "completed"];
|
|
101
|
-
readonly properties: {
|
|
102
|
-
readonly contextId: {
|
|
103
|
-
readonly type: "string";
|
|
104
|
-
readonly description: "Unique context ID for the job";
|
|
105
|
-
readonly example: "jctx:ticker:4a627755-7f5a-4297-b647-8dddd8aee416:binance:1rabbrpk5r4kkegs83w6qr:btc/usdt:2o8heaioicr0edvx5ybcap";
|
|
106
|
-
};
|
|
107
|
-
readonly status: {
|
|
108
|
-
readonly type: "string";
|
|
109
|
-
readonly description: "Current status of the job";
|
|
110
|
-
readonly enum: readonly ["New", "Started", "Completed", "Aborted", "Failed"];
|
|
111
|
-
readonly example: "Completed";
|
|
112
|
-
};
|
|
113
|
-
readonly statusDetail: {
|
|
114
|
-
readonly type: readonly ["string", "null"];
|
|
115
|
-
readonly description: "Detailed status information, if available";
|
|
116
|
-
readonly example: "Job completed with error code 5001";
|
|
117
|
-
};
|
|
118
|
-
readonly size: {
|
|
119
|
-
readonly type: "integer";
|
|
120
|
-
readonly description: "Total size of the data being prepared";
|
|
121
|
-
readonly example: 100;
|
|
122
|
-
};
|
|
123
|
-
readonly completed: {
|
|
124
|
-
readonly type: "integer";
|
|
125
|
-
readonly description: "The amount of data processed so far";
|
|
126
|
-
readonly example: 50;
|
|
127
|
-
};
|
|
128
|
-
readonly startTime: {
|
|
129
|
-
readonly type: readonly ["string", "null"];
|
|
130
|
-
readonly format: "date-time";
|
|
131
|
-
readonly description: "Timestamp for when the preparation started";
|
|
132
|
-
readonly example: "2025-01-04T14:00:00Z";
|
|
133
|
-
};
|
|
134
|
-
readonly endTime: {
|
|
135
|
-
readonly type: readonly ["string", "null"];
|
|
136
|
-
readonly format: "date-time";
|
|
137
|
-
readonly description: "Timestamp for when the preparation finished";
|
|
138
|
-
readonly example: "2025-01-04T14:00:20Z";
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
export declare const AcceptedJobSchema: {
|
|
143
|
-
readonly type: "object";
|
|
144
|
-
readonly description: "Response returned by async endpoints (`202 Accepted`). The `jobId` is deterministic for the\nsame input parameters — repeated calls with identical params return the same id.\n";
|
|
145
|
-
readonly required: readonly ["jobId"];
|
|
146
|
-
readonly properties: {
|
|
147
|
-
readonly jobId: {
|
|
148
|
-
readonly type: "string";
|
|
149
|
-
readonly description: "Unique job identifier; use this to poll for completion.";
|
|
150
|
-
readonly example: "13RBLGQlPnfDjO6wyKSX8i";
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
readonly example: {
|
|
154
|
-
readonly jobId: "13RBLGQlPnfDjO6wyKSX8i";
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
export declare const BacktestJobResultSchema: {
|
|
158
|
-
readonly type: "object";
|
|
159
|
-
readonly description: "Backtest job result.";
|
|
160
|
-
readonly required: readonly ["results", "state"];
|
|
161
|
-
readonly properties: {
|
|
162
|
-
readonly results: {
|
|
163
|
-
readonly $ref: "#/components/schemas/ResultMap";
|
|
164
|
-
};
|
|
165
|
-
readonly state: {
|
|
166
|
-
readonly $ref: "#/components/schemas/JobState";
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
export declare const ResultMapSchema: {
|
|
171
|
-
readonly type: "object";
|
|
172
|
-
readonly description: "Execution result map. Always includes core fields (hostName, iops, strategyId, instrument). Yield metrics (pnlTotal, totalTrades, winRate, etc.) are present when the strategy emitted at least one trade. When signal storage is enabled, includes signal fields described below.";
|
|
173
|
-
readonly required: readonly ["strategyId", "instrument"];
|
|
174
|
-
readonly properties: {
|
|
175
|
-
readonly hostName: {
|
|
176
|
-
readonly type: "string";
|
|
177
|
-
readonly description: "Hostname of the worker node that executed the strategy";
|
|
178
|
-
readonly example: "backtesting-job-worker-84b569dff9-dr4lb";
|
|
179
|
-
};
|
|
180
|
-
readonly iops: {
|
|
181
|
-
readonly type: "number";
|
|
182
|
-
readonly format: "double";
|
|
183
|
-
readonly description: "Instrument operations per second throughput during execution";
|
|
184
|
-
readonly example: 123956.53;
|
|
185
|
-
};
|
|
186
|
-
readonly strategyId: {
|
|
187
|
-
readonly type: "string";
|
|
188
|
-
readonly description: "Redis key of the compiled strategy used for execution. Format: strategy:{userId}:ticker:{compilationId}";
|
|
189
|
-
readonly example: "strategy:4a627755-7f5a-4297-b647-8dddd8aee416:ticker:2iyvtenlzh9dabqtxn7nbv";
|
|
190
|
-
};
|
|
191
|
-
readonly instrument: {
|
|
192
|
-
readonly type: "string";
|
|
193
|
-
readonly description: "The instrument (currency pair) that was backtested";
|
|
194
|
-
readonly example: "BTC/USDT";
|
|
195
|
-
};
|
|
196
|
-
readonly pnlTotal: {
|
|
197
|
-
readonly type: "number";
|
|
198
|
-
readonly format: "double";
|
|
199
|
-
readonly description: "Total profit and loss in the output currency";
|
|
200
|
-
readonly example: 42.75;
|
|
201
|
-
};
|
|
202
|
-
readonly totalTrades: {
|
|
203
|
-
readonly type: "integer";
|
|
204
|
-
readonly format: "int64";
|
|
205
|
-
readonly description: "Total number of trades executed by the strategy";
|
|
206
|
-
readonly example: 156;
|
|
207
|
-
};
|
|
208
|
-
readonly winRate: {
|
|
209
|
-
readonly type: "number";
|
|
210
|
-
readonly format: "double";
|
|
211
|
-
readonly description: "Percentage of profitable trades (0-100)";
|
|
212
|
-
readonly example: 58.33;
|
|
213
|
-
};
|
|
214
|
-
readonly sharpeRatio: {
|
|
215
|
-
readonly type: "number";
|
|
216
|
-
readonly format: "double";
|
|
217
|
-
readonly description: "Risk-adjusted return ratio (mean return / standard deviation of returns)";
|
|
218
|
-
readonly example: 1.245;
|
|
219
|
-
};
|
|
220
|
-
readonly sortinoRatio: {
|
|
221
|
-
readonly type: "number";
|
|
222
|
-
readonly format: "double";
|
|
223
|
-
readonly description: "Downside risk-adjusted return ratio (mean return / downside deviation)";
|
|
224
|
-
readonly example: 1.872;
|
|
225
|
-
};
|
|
226
|
-
readonly cagr: {
|
|
227
|
-
readonly type: "number";
|
|
228
|
-
readonly format: "double";
|
|
229
|
-
readonly description: "Compound Annual Growth Rate";
|
|
230
|
-
readonly example: 0.1534;
|
|
231
|
-
};
|
|
232
|
-
readonly maxDrawdown: {
|
|
233
|
-
readonly type: "number";
|
|
234
|
-
readonly format: "double";
|
|
235
|
-
readonly description: "Maximum absolute drawdown in the output currency";
|
|
236
|
-
readonly example: 12.5;
|
|
237
|
-
};
|
|
238
|
-
readonly maxDrawdownPercent: {
|
|
239
|
-
readonly type: "number";
|
|
240
|
-
readonly format: "double";
|
|
241
|
-
readonly description: "Maximum percentage drawdown from peak equity";
|
|
242
|
-
readonly example: 8.75;
|
|
243
|
-
};
|
|
244
|
-
readonly signalCount: {
|
|
245
|
-
readonly type: "integer";
|
|
246
|
-
readonly description: "Number of signals emitted during strategy execution";
|
|
247
|
-
readonly example: 100000;
|
|
248
|
-
};
|
|
249
|
-
readonly signalsId: {
|
|
250
|
-
readonly type: "string";
|
|
251
|
-
readonly description: "Storage key for the signal Parquet file. Format: {userId}/exec/{exchange}/{jobId}";
|
|
252
|
-
readonly example: "4a627755-7f5a-4297-b647-8dddd8aee416/exec/binance/3vsndwikcuaatjmb83fjtl";
|
|
253
|
-
};
|
|
254
|
-
readonly signalsUrl: {
|
|
255
|
-
readonly type: "string";
|
|
256
|
-
readonly format: "uri";
|
|
257
|
-
readonly description: "Public HTTPS URL to the Parquet file. Computed at setup time from publicBaseUrl + signalsId + .parquet. Available even before upload completes.";
|
|
258
|
-
readonly example: "https://storage.qtsurfer.com/4a627755-7f5a-4297-b647-8dddd8aee416/exec/binance/3vsndwikcuaatjmb83fjtl.parquet";
|
|
259
|
-
};
|
|
260
|
-
readonly signalsUpload: {
|
|
261
|
-
readonly type: "string";
|
|
262
|
-
readonly enum: readonly ["Done", "Failed", "Skipped"];
|
|
263
|
-
readonly description: "Upload status. Done = file uploaded to R2. Failed = upload error (see signalsUploadReason). Skipped = no signals emitted or storage not configured.";
|
|
264
|
-
readonly example: "Done";
|
|
265
|
-
};
|
|
266
|
-
readonly signalsUploadedAt: {
|
|
267
|
-
readonly type: "string";
|
|
268
|
-
readonly format: "date-time";
|
|
269
|
-
readonly description: "ISO 8601 timestamp of when the upload completed. Only present when signalsUpload is Done.";
|
|
270
|
-
readonly example: "2026-03-18T13:21:48.170Z";
|
|
271
|
-
};
|
|
272
|
-
readonly signalsUploadReason: {
|
|
273
|
-
readonly type: "string";
|
|
274
|
-
readonly description: "Human-readable reason when signalsUpload is Failed or Skipped.";
|
|
275
|
-
readonly example: "parquet file empty or missing after close";
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
export declare const strategyIdSchema: {
|
|
280
|
-
readonly description: "Unique identifier for a compiled strategy";
|
|
281
|
-
readonly type: "string";
|
|
282
|
-
readonly example: "6bsh31ikwkuivhtgcoa6s4";
|
|
283
|
-
};
|
|
284
|
-
//# sourceMappingURL=schemas.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.gen.d.ts","sourceRoot":"","sources":["../../src/generated/schemas.gen.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CzB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CAqBjB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CjB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAgBpB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;CAY1B,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC"}
|