@polyester/sdk 0.34.0 → 0.34.1-devnet-20261106025831
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/CHANGELOG.md +6 -0
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/heatmap/heatmap.schemas.d.ts +9 -9
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +79 -79
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orders/orders-batch.schemas.d.ts +5 -5
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +3 -3
- package/dist/utils/columnar-time.d.ts.map +1 -1
- package/dist/utils/columnar-time.js +2 -1
- package/dist/utils/columnar-time.js.map +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
30
30
|
readonly bestAskTicks: v.BigintSchema<undefined>;
|
|
31
31
|
readonly bestAskQtyScaled: v.BigintSchema<undefined>;
|
|
32
32
|
readonly sparklines: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
33
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
33
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1h" | "24h" | "1w" | "1m">]>;
|
|
34
34
|
readonly closeTicks: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
35
35
|
}, undefined>, undefined>, readonly []>;
|
|
36
36
|
readonly indexPriceTicks: v.BigintSchema<undefined>;
|
|
@@ -50,7 +50,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
50
50
|
bestAskTicks: bigint;
|
|
51
51
|
bestAskQtyScaled: bigint;
|
|
52
52
|
sparklines: {
|
|
53
|
-
interval: "unspecified" | "
|
|
53
|
+
interval: "unspecified" | "1h" | "24h" | "1w" | "1m";
|
|
54
54
|
closeTicks: bigint[];
|
|
55
55
|
}[];
|
|
56
56
|
indexPriceTicks: bigint;
|
|
@@ -80,7 +80,7 @@ declare const ListMarketOverviewInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
80
80
|
readonly orderBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["change_24h_bps", "volume_24h_usd", "last_price", "date_added"], undefined>, "volume_24h_usd">, v.TransformAction<"change_24h_bps" | "volume_24h_usd" | "last_price" | "date_added", MarketOrderBy.ORDER_BY_CHANGE_24H_BPS | MarketOrderBy.ORDER_BY_VOLUME_24H_USD | MarketOrderBy.ORDER_BY_LAST_PRICE | MarketOrderBy.ORDER_BY_DATE_ADDED>]>;
|
|
81
81
|
readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, "desc">, v.TransformAction<"asc" | "desc", SortDirection.SORT_ASC | SortDirection.SORT_DESC>]>;
|
|
82
82
|
readonly includeSparklines: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
83
|
-
readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("
|
|
83
|
+
readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1h" | "24h" | "1w" | "1m")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
|
|
84
84
|
}, undefined>, v.TransformAction<{
|
|
85
85
|
symbolIds: number[];
|
|
86
86
|
limit: number;
|
|
@@ -3950,7 +3950,7 @@ declare const BatchCancelOrdersInputSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
3950
3950
|
}>]>;
|
|
3951
3951
|
type BatchCancelOrdersInput = v.InferInput<typeof BatchCancelOrdersInputSchema>;
|
|
3952
3952
|
declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
3953
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
3953
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "accepted">]>;
|
|
3954
3954
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3955
3955
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3956
3956
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -3978,7 +3978,7 @@ declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
|
3978
3978
|
type BatchCancelOrderResult = v.InferOutput<typeof BatchCancelOrderResultSchema>;
|
|
3979
3979
|
declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3980
3980
|
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
3981
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
3981
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "accepted">]>;
|
|
3982
3982
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3983
3983
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3984
3984
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -4008,7 +4008,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
4008
4008
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
4009
4009
|
}, undefined>, v.CheckAction<{
|
|
4010
4010
|
results: {
|
|
4011
|
-
status: "unspecified" | "
|
|
4011
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
4012
4012
|
orderId?: string | undefined;
|
|
4013
4013
|
clientOrderId: string;
|
|
4014
4014
|
code: string;
|
|
@@ -4038,7 +4038,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
4038
4038
|
tsNs: bigint;
|
|
4039
4039
|
}, "Batch cancel result counts do not match the returned results.">, v.TransformAction<{
|
|
4040
4040
|
results: {
|
|
4041
|
-
status: "unspecified" | "
|
|
4041
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
4042
4042
|
orderId?: string | undefined;
|
|
4043
4043
|
clientOrderId: string;
|
|
4044
4044
|
code: string;
|
|
@@ -4070,7 +4070,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
4070
4070
|
ts: number;
|
|
4071
4071
|
tsNs: string;
|
|
4072
4072
|
results: {
|
|
4073
|
-
status: "unspecified" | "
|
|
4073
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
4074
4074
|
orderId?: string | undefined;
|
|
4075
4075
|
clientOrderId: string;
|
|
4076
4076
|
code: string;
|
|
@@ -282,7 +282,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
282
282
|
attachedRisk: {
|
|
283
283
|
takeProfit: {
|
|
284
284
|
state: {
|
|
285
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
285
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
286
286
|
armedTs: number | undefined;
|
|
287
287
|
armedTsNs: string | undefined;
|
|
288
288
|
terminalTs: number | undefined;
|
|
@@ -302,7 +302,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
302
302
|
} | undefined;
|
|
303
303
|
stopLoss: {
|
|
304
304
|
state: {
|
|
305
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
305
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
306
306
|
armedTs: number | undefined;
|
|
307
307
|
armedTsNs: string | undefined;
|
|
308
308
|
terminalTs: number | undefined;
|
|
@@ -322,7 +322,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
322
322
|
} | undefined;
|
|
323
323
|
trailingStop: {
|
|
324
324
|
state: {
|
|
325
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
325
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
326
326
|
armedTs: number | undefined;
|
|
327
327
|
armedTsNs: string | undefined;
|
|
328
328
|
terminalTs: number | undefined;
|
|
@@ -703,7 +703,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
703
703
|
attachedRisk: {
|
|
704
704
|
takeProfit: {
|
|
705
705
|
state: {
|
|
706
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
706
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
707
707
|
armedTs: number | undefined;
|
|
708
708
|
armedTsNs: string | undefined;
|
|
709
709
|
terminalTs: number | undefined;
|
|
@@ -723,7 +723,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
723
723
|
} | undefined;
|
|
724
724
|
stopLoss: {
|
|
725
725
|
state: {
|
|
726
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
726
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
727
727
|
armedTs: number | undefined;
|
|
728
728
|
armedTsNs: string | undefined;
|
|
729
729
|
terminalTs: number | undefined;
|
|
@@ -743,7 +743,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
743
743
|
} | undefined;
|
|
744
744
|
trailingStop: {
|
|
745
745
|
state: {
|
|
746
|
-
status: "unspecified" | "failed" | "canceled" | "completed" | "
|
|
746
|
+
status: "unspecified" | "failed" | "canceled" | "completed" | "not_configured" | "created" | "armed" | "running" | "paused";
|
|
747
747
|
armedTs: number | undefined;
|
|
748
748
|
armedTsNs: string | undefined;
|
|
749
749
|
terminalTs: number | undefined;
|
|
@@ -300,7 +300,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
300
300
|
seconds: bigint;
|
|
301
301
|
nanos: number;
|
|
302
302
|
} | undefined, number | undefined>]>;
|
|
303
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "destination" | "session" | "
|
|
303
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "destination" | "session" | "policy" | "member" | "invite" | "security">]>;
|
|
304
304
|
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "revoked" | "removed" | "failed" | "enabled" | "created" | "updated" | "deleted" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
305
305
|
readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api" | "web" | "mobile">]>;
|
|
306
306
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1329,7 +1329,7 @@ declare const ListTriggerEventsInputSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
1329
1329
|
readonly triggerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
|
|
1330
1330
|
}, undefined>, v.TransformAction<{
|
|
1331
1331
|
limit?: number | undefined;
|
|
1332
|
-
eventType?: "failed" | "canceled" | "
|
|
1332
|
+
eventType?: "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused" | undefined;
|
|
1333
1333
|
pageToken: string;
|
|
1334
1334
|
account?: "active" | "main" | {
|
|
1335
1335
|
subaccountId: string;
|
|
@@ -1196,7 +1196,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1196
1196
|
subaccountId: string;
|
|
1197
1197
|
symbolId: number;
|
|
1198
1198
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1199
|
-
eventType: "unspecified" | "failed" | "canceled" | "
|
|
1199
|
+
eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1200
1200
|
ts: number;
|
|
1201
1201
|
tsNs: string;
|
|
1202
1202
|
childSeq: number;
|
|
@@ -1211,7 +1211,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1211
1211
|
subaccountId: string;
|
|
1212
1212
|
symbolId: number;
|
|
1213
1213
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1214
|
-
eventType: "unspecified" | "failed" | "canceled" | "
|
|
1214
|
+
eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1215
1215
|
ts: number;
|
|
1216
1216
|
tsNs: string;
|
|
1217
1217
|
childSeq: number;
|
|
@@ -1226,7 +1226,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1226
1226
|
subaccountId: string;
|
|
1227
1227
|
symbolId: number;
|
|
1228
1228
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1229
|
-
eventType: "unspecified" | "failed" | "canceled" | "
|
|
1229
|
+
eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1230
1230
|
ts: number;
|
|
1231
1231
|
tsNs: string;
|
|
1232
1232
|
childSeq: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnar-time.d.ts","names":[],"sources":["../../src/utils/columnar-time.ts"],"mappings":";KAAY;EACR;EACA;EACA;;iBAQY,uBAAuB,QAAQ,oBAAoB;
|
|
1
|
+
{"version":3,"file":"columnar-time.d.ts","names":[],"sources":["../../src/utils/columnar-time.ts"],"mappings":";KAAY;EACR;EACA;EACA;;iBAQY,uBAAuB,QAAQ,oBAAoB;iBAenD,4BACZ,QAAQ,oBACR"}
|
|
@@ -11,7 +11,8 @@ function columnarTimestampSecAt(window, index) {
|
|
|
11
11
|
const endTsSec = Number(window.endTsSec);
|
|
12
12
|
if (!Number.isFinite(startTsSec) || !Number.isFinite(endTsSec)) return null;
|
|
13
13
|
if (endTsSec < startTsSec) return null;
|
|
14
|
-
|
|
14
|
+
if (points === 1) return startTsSec;
|
|
15
|
+
return startTsSec + index * (endTsSec - startTsSec) / (points - 1);
|
|
15
16
|
}
|
|
16
17
|
function expandColumnarTimestampsSec(window, count = window.points) {
|
|
17
18
|
const points = pointCount(window.points);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnar-time.js","names":[],"sources":["../../src/utils/columnar-time.ts"],"sourcesContent":["export type ColumnarTimeWindow = {\n startTsSec: number;\n endTsSec: number;\n points: number;\n};\n\nfunction pointCount(points: number): number {\n if (!Number.isFinite(points)) return 0;\n return Math.max(0, Math.trunc(points));\n}\n\nexport function columnarTimestampSecAt(window: ColumnarTimeWindow, index: number): number | null {\n const points = pointCount(window.points);\n if (points === 0) return null;\n if (!Number.isInteger(index) || index < 0 || index >= points) return null;\n\n const startTsSec = Number(window.startTsSec);\n const endTsSec = Number(window.endTsSec);\n if (!Number.isFinite(startTsSec) || !Number.isFinite(endTsSec)) return null;\n if (endTsSec < startTsSec) return null;\n\n return startTsSec + index * (
|
|
1
|
+
{"version":3,"file":"columnar-time.js","names":[],"sources":["../../src/utils/columnar-time.ts"],"sourcesContent":["export type ColumnarTimeWindow = {\n startTsSec: number;\n endTsSec: number;\n points: number;\n};\n\nfunction pointCount(points: number): number {\n if (!Number.isFinite(points)) return 0;\n return Math.max(0, Math.trunc(points));\n}\n\nexport function columnarTimestampSecAt(window: ColumnarTimeWindow, index: number): number | null {\n const points = pointCount(window.points);\n if (points === 0) return null;\n if (!Number.isInteger(index) || index < 0 || index >= points) return null;\n\n const startTsSec = Number(window.startTsSec);\n const endTsSec = Number(window.endTsSec);\n if (!Number.isFinite(startTsSec) || !Number.isFinite(endTsSec)) return null;\n if (endTsSec < startTsSec) return null;\n if (points === 1) return startTsSec;\n\n // endTsSec is the last point's own timestamp, so points span points - 1 steps.\n return startTsSec + (index * (endTsSec - startTsSec)) / (points - 1);\n}\n\nexport function expandColumnarTimestampsSec(\n window: ColumnarTimeWindow,\n count = window.points,\n): number[] {\n const points = pointCount(window.points);\n const length = Math.min(points, pointCount(count));\n const timestamps: number[] = [];\n\n for (let index = 0; index < length; index++) {\n const tsSec = columnarTimestampSecAt(window, index);\n if (tsSec == null) return [];\n timestamps.push(tsSec);\n }\n\n return timestamps;\n}\n"],"mappings":";AAMA,SAAS,WAAW,QAAwB;CACxC,IAAI,CAAC,OAAO,SAAS,MAAM,GAAG,OAAO;CACrC,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,MAAM,CAAC;AACzC;AAEA,SAAgB,uBAAuB,QAA4B,OAA8B;CAC7F,MAAM,SAAS,WAAW,OAAO,MAAM;CACvC,IAAI,WAAW,GAAG,OAAO;CACzB,IAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,KAAK,SAAS,QAAQ,OAAO;CAErE,MAAM,aAAa,OAAO,OAAO,UAAU;CAC3C,MAAM,WAAW,OAAO,OAAO,QAAQ;CACvC,IAAI,CAAC,OAAO,SAAS,UAAU,KAAK,CAAC,OAAO,SAAS,QAAQ,GAAG,OAAO;CACvE,IAAI,WAAW,YAAY,OAAO;CAClC,IAAI,WAAW,GAAG,OAAO;CAGzB,OAAO,aAAc,SAAS,WAAW,eAAgB,SAAS;AACtE;AAEA,SAAgB,4BACZ,QACA,QAAQ,OAAO,QACP;CACR,MAAM,SAAS,WAAW,OAAO,MAAM;CACvC,MAAM,SAAS,KAAK,IAAI,QAAQ,WAAW,KAAK,CAAC;CACjD,MAAM,aAAuB,CAAC;CAE9B,KAAK,IAAI,QAAQ,GAAG,QAAQ,QAAQ,SAAS;EACzC,MAAM,QAAQ,uBAAuB,QAAQ,KAAK;EAClD,IAAI,SAAS,MAAM,OAAO,CAAC;EAC3B,WAAW,KAAK,KAAK;CACzB;CAEA,OAAO;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polyester/sdk",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.1-devnet-20261106025831",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
|
|
6
6
|
"homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",
|