ault-sdk-ts 0.7.1 → 0.8.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/index.cjs CHANGED
@@ -125,6 +125,7 @@ __export(index_exports, {
125
125
  TxError: () => TxError,
126
126
  TxNotConfirmedError: () => TxNotConfirmedError,
127
127
  TxSimulationError: () => TxSimulationError,
128
+ USER_AGENT: () => USER_AGENT,
128
129
  ValidatorStatus: () => BondStatus,
129
130
  WebSocketError: () => WebSocketError,
130
131
  WithdrawRewardsPartialError: () => WithdrawRewardsPartialError,
@@ -213,6 +214,10 @@ __export(index_exports, {
213
214
  getOrderResponseFilledRegExp: () => getOrderResponseFilledRegExp,
214
215
  getOrderResponseInfoBlockHeightRegExp: () => getOrderResponseInfoBlockHeightRegExp,
215
216
  getOrderResponseInfoRemainingDepositRegExp: () => getOrderResponseInfoRemainingDepositRegExp,
217
+ getOrderResponseInfoTwapIdRegExp: () => getOrderResponseInfoTwapIdRegExp,
218
+ getOrderResponseInfoTwapOnePriceToleranceRegExp: () => getOrderResponseInfoTwapOnePriceToleranceRegExp,
219
+ getOrderResponseInfoTwapOneTotalDepositRegExp: () => getOrderResponseInfoTwapOneTotalDepositRegExp,
220
+ getOrderResponseInfoTwapOneWorstPriceRegExp: () => getOrderResponseInfoTwapOneWorstPriceRegExp,
216
221
  getOrderResponsePriceRegExp: () => getOrderResponsePriceRegExp,
217
222
  getOrderResponseRemainingRegExp: () => getOrderResponseRemainingRegExp,
218
223
  getOrderbookQueryLimitDefault: () => getOrderbookQueryLimitDefault,
@@ -281,6 +286,10 @@ __export(index_exports, {
281
286
  listOrdersResponseFilledRegExp: () => listOrdersResponseFilledRegExp,
282
287
  listOrdersResponseInfoBlockHeightRegExp: () => listOrdersResponseInfoBlockHeightRegExp,
283
288
  listOrdersResponseInfoRemainingDepositRegExp: () => listOrdersResponseInfoRemainingDepositRegExp,
289
+ listOrdersResponseInfoTwapIdRegExp: () => listOrdersResponseInfoTwapIdRegExp,
290
+ listOrdersResponseInfoTwapOnePriceToleranceRegExp: () => listOrdersResponseInfoTwapOnePriceToleranceRegExp,
291
+ listOrdersResponseInfoTwapOneTotalDepositRegExp: () => listOrdersResponseInfoTwapOneTotalDepositRegExp,
292
+ listOrdersResponseInfoTwapOneWorstPriceRegExp: () => listOrdersResponseInfoTwapOneWorstPriceRegExp,
284
293
  listOrdersResponsePriceRegExp: () => listOrdersResponsePriceRegExp,
285
294
  listOrdersResponseRemainingRegExp: () => listOrdersResponseRemainingRegExp,
286
295
  listTradesQueryBeforeIndexMax: () => listTradesQueryBeforeIndexMax,
@@ -319,6 +328,16 @@ __export(index_exports, {
319
328
  });
320
329
  module.exports = __toCommonJS(index_exports);
321
330
 
331
+ // src/core/user-agent.ts
332
+ var SDK_VERSION = "0.8.0";
333
+ var USER_AGENT = `ault-sdk-ts/${SDK_VERSION}`;
334
+ function isServerRuntime() {
335
+ if (typeof document !== "undefined") return false;
336
+ if (typeof globalThis.Deno !== "undefined") return false;
337
+ const versions = globalThis.process?.versions;
338
+ return Boolean(versions?.node || versions?.bun);
339
+ }
340
+
322
341
  // src/proto/gen/google/protobuf/duration.ts
323
342
  var import_wire = require("@bufbuild/protobuf/wire");
324
343
  function createBaseDuration() {
@@ -522,7 +541,8 @@ var DEFAULT_OPTIONS = {
522
541
  exponentialBackoff: true,
523
542
  retryableMethods: ["GET", "HEAD", "OPTIONS"],
524
543
  retryableStatuses: [...DEFAULT_RETRYABLE_STATUSES],
525
- retryOnTimeout: false
544
+ retryOnTimeout: false,
545
+ userAgent: USER_AGENT
526
546
  };
527
547
  function ensureFetch(fetchFn) {
528
548
  const resolved = fetchFn ?? globalThis.fetch;
@@ -567,6 +587,21 @@ async function fetchWithTimeout(fetchFn, url, options, timeout) {
567
587
  removeAbortListener?.();
568
588
  }
569
589
  }
590
+ function withUserAgent(options, userAgent) {
591
+ if (!isServerRuntime()) return options;
592
+ const entries = [];
593
+ const raw = options.headers;
594
+ if (Array.isArray(raw)) {
595
+ entries.push(...raw.map(([k, v]) => [k, v]));
596
+ } else if (raw && typeof raw.forEach === "function") {
597
+ raw.forEach((value, key) => entries.push([key, value]));
598
+ } else if (raw) {
599
+ entries.push(...Object.entries(raw));
600
+ }
601
+ if (entries.some(([k]) => k.toLowerCase() === "user-agent")) return options;
602
+ entries.push(["user-agent", userAgent]);
603
+ return { ...options, headers: entries };
604
+ }
570
605
  function calculateDelay(attempt, baseDelay, exponential) {
571
606
  if (exponential) {
572
607
  const exponentialDelay = baseDelay * Math.pow(2, attempt);
@@ -583,11 +618,12 @@ async function fetchWithRetry(url, options = {}, fetchOptions = {}, fetchFn) {
583
618
  const method = (options.method || "GET").toUpperCase();
584
619
  const canRetry = opts.retryableMethods.includes(method);
585
620
  const resolvedFetch = ensureFetch(fetchFn);
621
+ const init = withUserAgent(options, opts.userAgent);
586
622
  const isAbortError = (error) => error instanceof Error && error.name === "AbortError";
587
623
  let lastError = null;
588
624
  for (let attempt = 0; attempt <= opts.retries; attempt++) {
589
625
  try {
590
- const response = await fetchWithTimeout(resolvedFetch, url, options, opts.timeout);
626
+ const response = await fetchWithTimeout(resolvedFetch, url, init, opts.timeout);
591
627
  if (!response.ok && canRetry && opts.retryableStatuses.includes(response.status) && attempt < opts.retries) {
592
628
  const delay = calculateDelay(attempt, opts.retryDelay, opts.exponentialBackoff);
593
629
  await sleep(delay);
@@ -11750,6 +11786,7 @@ __export(dex_generated_exports, {
11750
11786
  OrderResponseStatus: () => OrderResponseStatus,
11751
11787
  OrderResponseTimeInForce: () => OrderResponseTimeInForce,
11752
11788
  OrderResponseType: () => OrderResponseType,
11789
+ OrderTwapInfoDepositAsset: () => OrderTwapInfoDepositAsset,
11753
11790
  RangeQueryDayParameter: () => RangeQueryDayParameter,
11754
11791
  RangeQueryParameter: () => RangeQueryParameter,
11755
11792
  ReadyResponseStatus: () => ReadyResponseStatus,
@@ -11835,6 +11872,10 @@ var OrderInfoChainType = {
11835
11872
  twap: "twap",
11836
11873
  unknown: "unknown"
11837
11874
  };
11875
+ var OrderTwapInfoDepositAsset = {
11876
+ base: "base",
11877
+ quote: "quote"
11878
+ };
11838
11879
  var HealthResponseStatus = {
11839
11880
  healthy: "healthy"
11840
11881
  };
@@ -12448,22 +12489,31 @@ function frameMatches(sub, data) {
12448
12489
  }
12449
12490
  }
12450
12491
  var isowsModulePromise = null;
12451
- function wrapCtor(Ctor) {
12452
- return (url, protocols) => protocols === void 0 ? new Ctor(url) : new Ctor(url, protocols);
12492
+ function wrapCtor(Ctor, userAgent) {
12493
+ return (url, protocols) => {
12494
+ if (protocols !== void 0) return new Ctor(url, protocols);
12495
+ if (isServerRuntime()) {
12496
+ try {
12497
+ return new Ctor(url, { headers: { "User-Agent": userAgent } });
12498
+ } catch {
12499
+ }
12500
+ }
12501
+ return new Ctor(url);
12502
+ };
12453
12503
  }
12454
12504
  function currentGlobalCtor() {
12455
12505
  return typeof globalThis !== "undefined" && typeof globalThis.WebSocket === "function" ? globalThis.WebSocket : null;
12456
12506
  }
12457
- function getDefaultWebSocketFactory() {
12507
+ function getDefaultWebSocketFactory(userAgent) {
12458
12508
  const G = currentGlobalCtor();
12459
- if (G) return wrapCtor(G);
12509
+ if (G) return wrapCtor(G, userAgent);
12460
12510
  if (!isowsModulePromise) {
12461
12511
  isowsModulePromise = import("isows");
12462
12512
  }
12463
12513
  return isowsModulePromise.then((mod) => {
12464
12514
  const G2 = currentGlobalCtor();
12465
- if (G2) return wrapCtor(G2);
12466
- return wrapCtor(mod.WebSocket);
12515
+ if (G2) return wrapCtor(G2, userAgent);
12516
+ return wrapCtor(mod.WebSocket, userAgent);
12467
12517
  });
12468
12518
  }
12469
12519
  var DexWsClient = class {
@@ -12491,7 +12541,8 @@ var DexWsClient = class {
12491
12541
  reconnect: opts?.reconnect ?? true,
12492
12542
  maxReconnectAttempts: opts?.maxReconnectAttempts ?? Infinity,
12493
12543
  reconnectDelay: opts?.reconnectDelay ?? 1e3,
12494
- maxReconnectDelay: opts?.maxReconnectDelay ?? 3e4
12544
+ maxReconnectDelay: opts?.maxReconnectDelay ?? 3e4,
12545
+ userAgent: opts?.userAgent ?? USER_AGENT
12495
12546
  };
12496
12547
  this.userFactory = opts?.createWebSocket;
12497
12548
  }
@@ -12709,7 +12760,7 @@ var DexWsClient = class {
12709
12760
  }
12710
12761
  resolveFactory() {
12711
12762
  if (this.userFactory) return this.userFactory;
12712
- return getDefaultWebSocketFactory();
12763
+ return getDefaultWebSocketFactory(this.options.userAgent);
12713
12764
  }
12714
12765
  handleMessage(raw) {
12715
12766
  let msg2;
@@ -28041,247 +28092,201 @@ var PageResponseSchema = import_zod3.z.object({
28041
28092
  // src/rest/dex-types.generated.ts
28042
28093
  var zod = __toESM(require("zod"), 1);
28043
28094
  var GetHealthResponse = zod.object({
28044
- status: zod.enum(["healthy"])
28095
+ "status": zod.enum(["healthy"])
28045
28096
  });
28046
28097
  var GetReadyResponse = zod.object({
28047
- status: zod.enum(["ready"])
28098
+ "status": zod.enum(["ready"])
28048
28099
  });
28049
28100
  var GetLiveResponse = zod.object({
28050
- status: zod.enum(["alive"])
28101
+ "status": zod.enum(["alive"])
28051
28102
  });
28052
28103
  var GetDBReadyResponse = zod.object({
28053
- status: zod.enum(["ok", "unavailable"]),
28054
- database: zod.enum(["ok", "unreachable"])
28104
+ "status": zod.enum(["ok", "unavailable"]),
28105
+ "database": zod.enum(["ok", "unreachable"])
28055
28106
  });
28056
28107
  var GetStatusResponse = zod.object({
28057
- last_indexed_height: zod.number(),
28058
- last_indexed_at: zod.iso.datetime({})
28108
+ "last_indexed_height": zod.number(),
28109
+ "last_indexed_at": zod.iso.datetime({})
28059
28110
  });
28060
28111
  var GetSDKManifestResponse = zod.object({
28061
- schemaVersion: zod.number().min(1).describe(
28062
- "Manifest schema version. Server rejects values `< 1` at boot;\nfuture majors (e.g. `2`) pass through and are interpreted by\nthe SDK.\n"
28063
- ),
28064
- gas: zod.record(zod.string(), zod.unknown()).optional().describe(
28065
- "Module gas constants overridden for this env (keyed by message\ntype, e.g. `LIMIT_ORDER`). Values are integers.\n"
28066
- ),
28067
- eip712: zod.record(zod.string(), zod.unknown()).optional().describe(
28068
- "EIP-712 fee-related defaults (e.g. fee amount, gas limit). Shape\nis operator-controlled.\n"
28069
- ),
28070
- urls: zod.record(zod.string(), zod.unknown()).optional().describe("Env-specific URL overrides (e.g. `rest`, `rpc`, `ws`).\n")
28071
- }).describe(
28072
- "Per-environment SDK manifest. The dex-api treats this as an opaque\noperator-supplied document apart from `schemaVersion`; the named\nsections below describe what SDKs currently look for, but unknown\ntop-level fields are preserved verbatim so a forward-compat manifest\nflows through without a server release.\n"
28073
- );
28112
+ "schemaVersion": zod.number().min(1).describe("Manifest schema version. Server rejects values `< 1` at boot;\nfuture majors (e.g. `2`) pass through and are interpreted by\nthe SDK.\n"),
28113
+ "gas": zod.record(zod.string(), zod.unknown()).optional().describe("Module gas constants overridden for this env (keyed by message\ntype, e.g. `LIMIT_ORDER`). Values are integers.\n"),
28114
+ "eip712": zod.record(zod.string(), zod.unknown()).optional().describe("EIP-712 fee-related defaults (e.g. fee amount, gas limit). Shape\nis operator-controlled.\n"),
28115
+ "urls": zod.record(zod.string(), zod.unknown()).optional().describe("Env-specific URL overrides (e.g. `rest`, `rpc`, `ws`).\n")
28116
+ }).describe("Per-environment SDK manifest. The dex-api treats this as an opaque\noperator-supplied document apart from `schemaVersion`; the named\nsections below describe what SDKs currently look for, but unknown\ntop-level fields are preserved verbatim so a forward-compat manifest\nflows through without a server release.\n");
28074
28117
  var listMarketsResponseTakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28075
28118
  var listMarketsResponseMakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28076
28119
  var listMarketsResponseInfoEscrowAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
28077
28120
  var ListMarketsResponseItem = zod.object({
28078
- id: zod.string(),
28079
- symbol: zod.string(),
28080
- base: zod.string(),
28081
- quote: zod.string(),
28082
- baseId: zod.string().describe("On-chain denom"),
28083
- quoteId: zod.string(),
28084
- active: zod.boolean(),
28085
- type: zod.enum(["spot"]),
28086
- spot: zod.boolean(),
28087
- margin: zod.boolean().optional(),
28088
- future: zod.boolean().optional(),
28089
- swap: zod.boolean().optional(),
28090
- option: zod.boolean().optional(),
28091
- contract: zod.boolean().optional(),
28092
- settle: zod.string().nullish(),
28093
- settleId: zod.string().nullish(),
28094
- contractSize: zod.number().nullish(),
28095
- linear: zod.boolean().nullish(),
28096
- inverse: zod.boolean().nullish(),
28097
- expiry: zod.number().nullish(),
28098
- expiryDatetime: zod.string().nullish(),
28099
- strike: zod.number().nullish(),
28100
- optionType: zod.string().nullish(),
28101
- feeSide: zod.string().optional(),
28102
- taker: zod.string().regex(listMarketsResponseTakerRegExp).describe(
28103
- "Taker fee rate as a canonical decimal string. Strings preserve\nprecision past 2^53 raw units and avoid float-rounding noise.\n"
28104
- ),
28105
- maker: zod.string().regex(listMarketsResponseMakerRegExp).describe("Maker fee rate as a canonical decimal string."),
28106
- percentage: zod.boolean().optional(),
28107
- tierBased: zod.boolean().optional(),
28108
- precision: zod.object({
28109
- amount: zod.number().optional(),
28110
- price: zod.number().optional(),
28111
- cost: zod.number().optional()
28121
+ "id": zod.string(),
28122
+ "symbol": zod.string(),
28123
+ "base": zod.string(),
28124
+ "quote": zod.string(),
28125
+ "baseId": zod.string().describe("On-chain denom"),
28126
+ "quoteId": zod.string(),
28127
+ "active": zod.boolean(),
28128
+ "type": zod.enum(["spot"]),
28129
+ "spot": zod.boolean(),
28130
+ "margin": zod.boolean().optional(),
28131
+ "future": zod.boolean().optional(),
28132
+ "swap": zod.boolean().optional(),
28133
+ "option": zod.boolean().optional(),
28134
+ "contract": zod.boolean().optional(),
28135
+ "settle": zod.string().nullish(),
28136
+ "settleId": zod.string().nullish(),
28137
+ "contractSize": zod.number().nullish(),
28138
+ "linear": zod.boolean().nullish(),
28139
+ "inverse": zod.boolean().nullish(),
28140
+ "expiry": zod.number().nullish(),
28141
+ "expiryDatetime": zod.string().nullish(),
28142
+ "strike": zod.number().nullish(),
28143
+ "optionType": zod.string().nullish(),
28144
+ "feeSide": zod.string().optional(),
28145
+ "taker": zod.string().regex(listMarketsResponseTakerRegExp).describe("Taker fee rate as a canonical decimal string. Strings preserve\nprecision past 2^53 raw units and avoid float-rounding noise.\n"),
28146
+ "maker": zod.string().regex(listMarketsResponseMakerRegExp).describe("Maker fee rate as a canonical decimal string."),
28147
+ "percentage": zod.boolean().optional(),
28148
+ "tierBased": zod.boolean().optional(),
28149
+ "precision": zod.object({
28150
+ "amount": zod.number().optional(),
28151
+ "price": zod.number().optional(),
28152
+ "cost": zod.number().optional()
28112
28153
  }),
28113
- limits: zod.object({
28114
- leverage: zod.object({
28115
- min: zod.number().nullish(),
28116
- max: zod.number().nullish()
28154
+ "limits": zod.object({
28155
+ "leverage": zod.object({
28156
+ "min": zod.number().nullish(),
28157
+ "max": zod.number().nullish()
28117
28158
  }).optional(),
28118
- amount: zod.object({
28119
- min: zod.number().nullish(),
28120
- max: zod.number().nullish()
28159
+ "amount": zod.object({
28160
+ "min": zod.number().nullish(),
28161
+ "max": zod.number().nullish()
28121
28162
  }).optional(),
28122
- price: zod.object({
28123
- min: zod.number().nullish(),
28124
- max: zod.number().nullish()
28163
+ "price": zod.object({
28164
+ "min": zod.number().nullish(),
28165
+ "max": zod.number().nullish()
28125
28166
  }).optional(),
28126
- cost: zod.object({
28127
- min: zod.number().nullish(),
28128
- max: zod.number().nullish()
28167
+ "cost": zod.object({
28168
+ "min": zod.number().nullish(),
28169
+ "max": zod.number().nullish()
28129
28170
  }).optional()
28130
28171
  }),
28131
- created: zod.number().nullish(),
28132
- info: zod.object({
28133
- escrow_address: zod.string().regex(listMarketsResponseInfoEscrowAddressOneRegExp).describe(
28134
- "Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
28135
- ).optional().describe(
28136
- "Bech32 address of the per-market escrow account that holds\nuser deposits while orders are resting.\n"
28137
- ),
28138
- block_height: zod.number().optional().describe("Height of the block at which the market was registered."),
28139
- market_type: zod.number().optional().describe(
28140
- "On-chain market type code (e.g. spot). Stable across the\nlifecycle of the market; `MarketResponse.type` carries the\nCCXT label.\n"
28141
- )
28142
- }).describe(
28143
- "Exchange-specific extension on `MarketResponse`. Mirrors the\n`Info` map populated in `internal/domain/market/service.go`.\n"
28144
- )
28172
+ "created": zod.number().nullish(),
28173
+ "info": zod.object({
28174
+ "escrow_address": zod.string().regex(listMarketsResponseInfoEscrowAddressOneRegExp).describe("Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n").optional().describe("Bech32 address of the per-market escrow account that holds\nuser deposits while orders are resting.\n"),
28175
+ "block_height": zod.number().optional().describe("Height of the block at which the market was registered."),
28176
+ "market_type": zod.number().optional().describe("On-chain market type code (e.g. spot). Stable across the\nlifecycle of the market; `MarketResponse.type` carries the\nCCXT label.\n")
28177
+ }).describe("Exchange-specific extension on `MarketResponse`. Mirrors the\n`Info` map populated in `internal/domain/market/service.go`.\n")
28145
28178
  });
28146
28179
  var ListMarketsResponse = zod.array(ListMarketsResponseItem);
28147
28180
  var listCurrenciesResponseInfoContractDecimalsMin = 0;
28148
28181
  var listCurrenciesResponseInfoContractDecimalsMax = 255;
28149
- var ListCurrenciesResponse = zod.record(
28150
- zod.string(),
28151
- zod.object({
28152
- id: zod.string().describe("On-chain denom"),
28153
- code: zod.string().describe("Ticker symbol"),
28154
- name: zod.string().nullish(),
28155
- active: zod.boolean(),
28156
- deposit: zod.boolean().nullish(),
28157
- withdraw: zod.boolean().nullish(),
28158
- fee: zod.number().nullish(),
28159
- precision: zod.number().describe(
28160
- "The DEX trading precision \u2014 always 18: every amount on every\nendpoint (balances, orders, trades, portfolio) is normalized to\n18-decimal units regardless of the token contract's own\ndecimals. The raw contract decimals are available in\n`info.contractDecimals`.\n"
28161
- ),
28162
- limits: zod.object({
28163
- amount: zod.object({
28164
- min: zod.number().nullish(),
28165
- max: zod.number().nullish()
28166
- }).optional(),
28167
- withdraw: zod.object({
28168
- min: zod.number().nullish(),
28169
- max: zod.number().nullish()
28170
- }).optional()
28171
- }),
28172
- networks: zod.looseObject({}).optional(),
28173
- info: zod.object({
28174
- contractDecimals: zod.number().min(listCurrenciesResponseInfoContractDecimalsMin).max(listCurrenciesResponseInfoContractDecimalsMax).describe(
28175
- "The token contract's own decimals (raw ERC20 decimals). Amounts\non the API are NOT in these units \u2014 see `precision`.\n"
28176
- )
28177
- })
28182
+ var ListCurrenciesResponse = zod.record(zod.string(), zod.object({
28183
+ "id": zod.string().describe("On-chain denom"),
28184
+ "code": zod.string().describe("Ticker symbol"),
28185
+ "name": zod.string().nullish(),
28186
+ "active": zod.boolean(),
28187
+ "deposit": zod.boolean().nullish(),
28188
+ "withdraw": zod.boolean().nullish(),
28189
+ "fee": zod.number().nullish(),
28190
+ "precision": zod.number().describe("The DEX trading precision \u2014 always 18: every amount on every\nendpoint (balances, orders, trades, portfolio) is normalized to\n18-decimal units regardless of the token contract's own\ndecimals. The raw contract decimals are available in\n`info.contractDecimals`.\n"),
28191
+ "limits": zod.object({
28192
+ "amount": zod.object({
28193
+ "min": zod.number().nullish(),
28194
+ "max": zod.number().nullish()
28195
+ }).optional(),
28196
+ "withdraw": zod.object({
28197
+ "min": zod.number().nullish(),
28198
+ "max": zod.number().nullish()
28199
+ }).optional()
28200
+ }),
28201
+ "networks": zod.looseObject({}).optional(),
28202
+ "info": zod.object({
28203
+ "contractDecimals": zod.number().min(listCurrenciesResponseInfoContractDecimalsMin).max(listCurrenciesResponseInfoContractDecimalsMax).describe("The token contract's own decimals (raw ERC20 decimals). Amounts\non the API are NOT in these units \u2014 see `precision`.\n")
28178
28204
  })
28179
- );
28205
+ }));
28180
28206
  var GetTickerParams = zod.object({
28181
- symbol: zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28207
+ "symbol": zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28182
28208
  });
28183
28209
  var GetTickerResponse = zod.object({
28184
- symbol: zod.string(),
28185
- high: zod.string().nullish(),
28186
- low: zod.string().nullish(),
28187
- bid: zod.string().nullish(),
28188
- bidVolume: zod.string().nullish().describe("Volume at the best bid price level. Extracted from the orderbook snapshot."),
28189
- ask: zod.string().nullish(),
28190
- askVolume: zod.string().nullish().describe("Volume at the best ask price level. Extracted from the orderbook snapshot."),
28191
- vwap: zod.string().nullish().describe("Volume-weighted average price: quoteVolume / baseVolume"),
28192
- open: zod.string().nullish(),
28193
- close: zod.string().nullish(),
28194
- last: zod.string().nullish(),
28195
- previousClose: zod.string().nullish().describe("Close price of the last bar before the 24h window."),
28196
- change: zod.string().nullish(),
28197
- percentage: zod.string().nullish(),
28198
- average: zod.string().nullish().describe("Simple average: (open + last) / 2"),
28199
- baseVolume: zod.string(),
28200
- quoteVolume: zod.string().nullish(),
28201
- timestamp: zod.number().describe("Milliseconds"),
28202
- datetime: zod.iso.datetime({}),
28203
- info: zod.looseObject({})
28204
- }).describe(
28205
- "24h ticker stats. All numeric fields are canonical decimal strings\nso quantities at any magnitude survive the JSON round-trip without\nrounding through float64. Pointer-style fields (high/low/bid/etc.)\nare nullable when no data is available for that field.\n"
28206
- );
28207
- var GetAllTickersResponse = zod.record(
28208
- zod.string(),
28209
- zod.object({
28210
- symbol: zod.string(),
28211
- high: zod.string().nullish(),
28212
- low: zod.string().nullish(),
28213
- bid: zod.string().nullish(),
28214
- bidVolume: zod.string().nullish().describe("Volume at the best bid price level. Extracted from the orderbook snapshot."),
28215
- ask: zod.string().nullish(),
28216
- askVolume: zod.string().nullish().describe("Volume at the best ask price level. Extracted from the orderbook snapshot."),
28217
- vwap: zod.string().nullish().describe("Volume-weighted average price: quoteVolume / baseVolume"),
28218
- open: zod.string().nullish(),
28219
- close: zod.string().nullish(),
28220
- last: zod.string().nullish(),
28221
- previousClose: zod.string().nullish().describe("Close price of the last bar before the 24h window."),
28222
- change: zod.string().nullish(),
28223
- percentage: zod.string().nullish(),
28224
- average: zod.string().nullish().describe("Simple average: (open + last) / 2"),
28225
- baseVolume: zod.string(),
28226
- quoteVolume: zod.string().nullish(),
28227
- timestamp: zod.number().describe("Milliseconds"),
28228
- datetime: zod.iso.datetime({}),
28229
- info: zod.looseObject({})
28230
- }).describe(
28231
- "24h ticker stats. All numeric fields are canonical decimal strings\nso quantities at any magnitude survive the JSON round-trip without\nrounding through float64. Pointer-style fields (high/low/bid/etc.)\nare nullable when no data is available for that field.\n"
28232
- )
28233
- );
28210
+ "symbol": zod.string(),
28211
+ "high": zod.string().nullish(),
28212
+ "low": zod.string().nullish(),
28213
+ "bid": zod.string().nullish(),
28214
+ "bidVolume": zod.string().nullish().describe("Volume at the best bid price level. Extracted from the orderbook snapshot."),
28215
+ "ask": zod.string().nullish(),
28216
+ "askVolume": zod.string().nullish().describe("Volume at the best ask price level. Extracted from the orderbook snapshot."),
28217
+ "vwap": zod.string().nullish().describe("Volume-weighted average price: quoteVolume / baseVolume"),
28218
+ "open": zod.string().nullish(),
28219
+ "close": zod.string().nullish(),
28220
+ "last": zod.string().nullish(),
28221
+ "previousClose": zod.string().nullish().describe("Close price of the last bar before the 24h window."),
28222
+ "change": zod.string().nullish(),
28223
+ "percentage": zod.string().nullish(),
28224
+ "average": zod.string().nullish().describe("Simple average: (open + last) / 2"),
28225
+ "baseVolume": zod.string(),
28226
+ "quoteVolume": zod.string().nullish(),
28227
+ "timestamp": zod.number().describe("Milliseconds"),
28228
+ "datetime": zod.iso.datetime({}),
28229
+ "info": zod.looseObject({})
28230
+ }).describe("24h ticker stats. All numeric fields are canonical decimal strings\nso quantities at any magnitude survive the JSON round-trip without\nrounding through float64. Pointer-style fields (high/low/bid/etc.)\nare nullable when no data is available for that field.\n");
28231
+ var GetAllTickersResponse = zod.record(zod.string(), zod.object({
28232
+ "symbol": zod.string(),
28233
+ "high": zod.string().nullish(),
28234
+ "low": zod.string().nullish(),
28235
+ "bid": zod.string().nullish(),
28236
+ "bidVolume": zod.string().nullish().describe("Volume at the best bid price level. Extracted from the orderbook snapshot."),
28237
+ "ask": zod.string().nullish(),
28238
+ "askVolume": zod.string().nullish().describe("Volume at the best ask price level. Extracted from the orderbook snapshot."),
28239
+ "vwap": zod.string().nullish().describe("Volume-weighted average price: quoteVolume / baseVolume"),
28240
+ "open": zod.string().nullish(),
28241
+ "close": zod.string().nullish(),
28242
+ "last": zod.string().nullish(),
28243
+ "previousClose": zod.string().nullish().describe("Close price of the last bar before the 24h window."),
28244
+ "change": zod.string().nullish(),
28245
+ "percentage": zod.string().nullish(),
28246
+ "average": zod.string().nullish().describe("Simple average: (open + last) / 2"),
28247
+ "baseVolume": zod.string(),
28248
+ "quoteVolume": zod.string().nullish(),
28249
+ "timestamp": zod.number().describe("Milliseconds"),
28250
+ "datetime": zod.iso.datetime({}),
28251
+ "info": zod.looseObject({})
28252
+ }).describe("24h ticker stats. All numeric fields are canonical decimal strings\nso quantities at any magnitude survive the JSON round-trip without\nrounding through float64. Pointer-style fields (high/low/bid/etc.)\nare nullable when no data is available for that field.\n"));
28234
28253
  var GetOrderbookParams = zod.object({
28235
- symbol: zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28254
+ "symbol": zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28236
28255
  });
28237
28256
  var getOrderbookQueryLimitDefault = 20;
28238
28257
  var getOrderbookQueryLimitMax = 20;
28239
28258
  var GetOrderbookQueryParams = zod.object({
28240
- limit: zod.number().min(1).max(getOrderbookQueryLimitMax).default(getOrderbookQueryLimitDefault)
28259
+ "limit": zod.number().min(1).max(getOrderbookQueryLimitMax).default(getOrderbookQueryLimitDefault)
28241
28260
  });
28242
28261
  var getOrderbookResponseMarketIdRegExp = new RegExp("^[0-9a-f]{2,510}$");
28243
28262
  var GetOrderbookResponse = zod.object({
28244
- symbol: zod.string(),
28245
- market_id: zod.string().regex(getOrderbookResponseMarketIdRegExp).describe(
28246
- "Hex-encoded chain market identifier (no `0x` prefix). Provided so\nconsumers can round-trip back to chain proto endpoints which key\non the binary market id without re-resolving the symbol map.\nLayout on the chain side is `MarketType (1 byte) | baseDenom |\n\\\\x00 | quoteDenom`, with the full id stored as `VARBINARY(255)`\nin the indexer; the hex form is therefore variable-length, even\nfor short-denom test markets that hit the lower bound.\n"
28247
- ),
28248
- bids: zod.array(
28249
- zod.tuple([
28250
- zod.string().describe("price, decimal string"),
28251
- zod.string().describe("quantity, decimal string")
28252
- ])
28253
- ).describe(
28254
- "Bid levels as `[price, qty]` decimal-string tuples. Ordered by\nprice descending \u2014 index 0 is the best bid. Matches the WS\n`book` topic (`docs/websocket-api.md`), so consumers that switch\nbetween REST snapshots and WS deltas don't need to re-sort.\n"
28255
- ),
28256
- asks: zod.array(
28257
- zod.tuple([
28258
- zod.string().describe("price, decimal string"),
28259
- zod.string().describe("quantity, decimal string")
28260
- ])
28261
- ).describe(
28262
- "Ask levels as `[price, qty]` decimal-string tuples. Ordered by\nprice ascending \u2014 index 0 is the best ask. Matches the WS\n`book` topic, so consumers that switch between REST snapshots\nand WS deltas don't need to re-sort.\n"
28263
- ),
28264
- timestamp: zod.number(),
28265
- datetime: zod.iso.datetime({}),
28266
- nonce: zod.number()
28263
+ "symbol": zod.string(),
28264
+ "market_id": zod.string().regex(getOrderbookResponseMarketIdRegExp).describe("Hex-encoded chain market identifier (no `0x` prefix). Provided so\nconsumers can round-trip back to chain proto endpoints which key\non the binary market id without re-resolving the symbol map.\nLayout on the chain side is `MarketType (1 byte) | baseDenom |\n\\\\x00 | quoteDenom`, with the full id stored as `VARBINARY(255)`\nin the indexer; the hex form is therefore variable-length, even\nfor short-denom test markets that hit the lower bound.\n"),
28265
+ "bids": zod.array(zod.tuple([
28266
+ zod.string().describe("price, decimal string"),
28267
+ zod.string().describe("quantity, decimal string")
28268
+ ])).describe("Bid levels as `[price, qty]` decimal-string tuples. Ordered by\nprice descending \u2014 index 0 is the best bid. Matches the WS\n`book` topic (`docs/websocket-api.md`), so consumers that switch\nbetween REST snapshots and WS deltas don't need to re-sort.\n"),
28269
+ "asks": zod.array(zod.tuple([
28270
+ zod.string().describe("price, decimal string"),
28271
+ zod.string().describe("quantity, decimal string")
28272
+ ])).describe("Ask levels as `[price, qty]` decimal-string tuples. Ordered by\nprice ascending \u2014 index 0 is the best ask. Matches the WS\n`book` topic, so consumers that switch between REST snapshots\nand WS deltas don't need to re-sort.\n"),
28273
+ "timestamp": zod.number(),
28274
+ "datetime": zod.iso.datetime({}),
28275
+ "nonce": zod.number()
28267
28276
  });
28268
28277
  var ListTradesParams = zod.object({
28269
- symbol: zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28278
+ "symbol": zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28270
28279
  });
28271
28280
  var listTradesQueryLimitDefault = 100;
28272
28281
  var listTradesQueryLimitMax = 500;
28273
28282
  var listTradesQueryBeforeIndexMin = 0;
28274
28283
  var listTradesQueryBeforeIndexMax = 4294967295;
28275
28284
  var ListTradesQueryParams = zod.object({
28276
- limit: zod.number().min(1).max(listTradesQueryLimitMax).default(listTradesQueryLimitDefault),
28277
- since: zod.number().optional().describe("Unix timestamp in milliseconds"),
28278
- cursor: zod.string().optional().describe(
28279
- 'Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'
28280
- ),
28281
- before_height: zod.number().min(1).optional().describe(
28282
- "Deprecated in favour of `cursor`; still honoured, and ignored when\n`cursor` is also present.\n\nComposite pagination cursor, upper half. Returns only trades\nstrictly older (in feed order) than the row identified by\n(`before_height`, `before_index`) \u2014 take both values from the\nlast row's `info.block_height` / `info.event_index`. Must be\npassed together with `before_index`. Unlike `since`, the cursor\ncannot skip or repeat trades when many share one timestamp.\n"
28283
- ),
28284
- before_index: zod.number().min(listTradesQueryBeforeIndexMin).max(listTradesQueryBeforeIndexMax).optional().describe("Composite pagination cursor, lower half. See `before_height`.")
28285
+ "limit": zod.number().min(1).max(listTradesQueryLimitMax).default(listTradesQueryLimitDefault),
28286
+ "since": zod.number().optional().describe("Unix timestamp in milliseconds"),
28287
+ "cursor": zod.string().optional().describe('Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'),
28288
+ "before_height": zod.number().min(1).optional().describe("Deprecated in favour of `cursor`; still honoured, and ignored when\n`cursor` is also present.\n\nComposite pagination cursor, upper half. Returns only trades\nstrictly older (in feed order) than the row identified by\n(`before_height`, `before_index`) \u2014 take both values from the\nlast row's `info.block_height` / `info.event_index`. Must be\npassed together with `before_index`. Unlike `since`, the cursor\ncannot skip or repeat trades when many share one timestamp.\n"),
28289
+ "before_index": zod.number().min(listTradesQueryBeforeIndexMin).max(listTradesQueryBeforeIndexMax).optional().describe("Composite pagination cursor, lower half. See `before_height`.")
28285
28290
  });
28286
28291
  var listTradesResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28287
28292
  var listTradesResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28293,70 +28298,36 @@ var listTradesResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
28293
28298
  var listTradesResponseInfoEventIndexMin = 0;
28294
28299
  var listTradesResponseInfoEventIndexMax = 4294967295;
28295
28300
  var ListTradesResponseItem = zod.object({
28296
- id: zod.string(),
28297
- order: zod.string().nullish(),
28298
- timestamp: zod.number(),
28299
- datetime: zod.iso.datetime({}),
28300
- symbol: zod.string(),
28301
- type: zod.union([
28302
- zod.literal("limit"),
28303
- zod.literal("market"),
28304
- zod.literal("twap"),
28305
- zod.literal("unknown"),
28306
- zod.literal(null)
28307
- ]).nullish().describe(
28308
- "Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."
28309
- ),
28310
- cloid: zod.string().nullish().describe(
28311
- "Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."
28312
- ),
28313
- side: zod.enum(["buy", "sell"]),
28314
- takerOrMaker: zod.enum(["taker", "maker"]).optional().describe(
28315
- "Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."
28316
- ),
28317
- price: zod.string().regex(listTradesResponsePriceRegExp),
28318
- amount: zod.string().regex(listTradesResponseAmountRegExp),
28319
- cost: zod.string().regex(listTradesResponseCostRegExp).describe("price * amount"),
28320
- fee: zod.object({
28321
- cost: zod.string().regex(listTradesResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28322
- currency: zod.string().optional().describe(
28323
- 'Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'
28324
- ),
28325
- rate: zod.string().regex(listTradesResponseFeeRateRegExp).optional().describe(
28326
- "This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise."
28327
- )
28328
- }).optional().describe(
28329
- "Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."
28330
- ),
28331
- info: zod.object({
28332
- address: zod.string().regex(listTradesResponseInfoAddressOneRegExp).describe(
28333
- "Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
28334
- ).describe("Bech32 address of the orderer that owns this leg of the fill."),
28335
- paid: zod.string().describe(
28336
- 'Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'
28337
- ),
28338
- received: zod.string().describe(
28339
- "Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
28340
- ),
28341
- block_height: zod.string().regex(listTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28342
- event_index: zod.number().min(listTradesResponseInfoEventIndexMin).max(listTradesResponseInfoEventIndexMax).describe(
28343
- "The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n"
28344
- )
28345
- }).describe(
28346
- "Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
28347
- )
28348
- }).describe(
28349
- "All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n"
28350
- );
28301
+ "id": zod.string(),
28302
+ "order": zod.string().nullish(),
28303
+ "timestamp": zod.number(),
28304
+ "datetime": zod.iso.datetime({}),
28305
+ "symbol": zod.string(),
28306
+ "type": zod.union([zod.literal("limit"), zod.literal("market"), zod.literal("twap"), zod.literal("unknown"), zod.literal(null)]).nullish().describe("Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."),
28307
+ "cloid": zod.string().nullish().describe("Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."),
28308
+ "side": zod.enum(["buy", "sell"]),
28309
+ "takerOrMaker": zod.enum(["taker", "maker"]).optional().describe("Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."),
28310
+ "price": zod.string().regex(listTradesResponsePriceRegExp),
28311
+ "amount": zod.string().regex(listTradesResponseAmountRegExp),
28312
+ "cost": zod.string().regex(listTradesResponseCostRegExp).describe("price * amount"),
28313
+ "fee": zod.object({
28314
+ "cost": zod.string().regex(listTradesResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28315
+ "currency": zod.string().optional().describe('Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'),
28316
+ "rate": zod.string().regex(listTradesResponseFeeRateRegExp).optional().describe("This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise.")
28317
+ }).optional().describe("Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."),
28318
+ "info": zod.object({
28319
+ "address": zod.string().regex(listTradesResponseInfoAddressOneRegExp).describe("Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n").describe("Bech32 address of the orderer that owns this leg of the fill."),
28320
+ "paid": zod.string().describe('Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'),
28321
+ "received": zod.string().describe("Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"),
28322
+ "block_height": zod.string().regex(listTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28323
+ "event_index": zod.number().min(listTradesResponseInfoEventIndexMin).max(listTradesResponseInfoEventIndexMax).describe("The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n")
28324
+ }).describe("Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n")
28325
+ }).describe("All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n");
28351
28326
  var ListTradesResponse = zod.array(ListTradesResponseItem);
28352
28327
  var getTradePathIdMax = 114;
28353
- var getTradePathIdRegExp = new RegExp(
28354
- "^(0|[1-9][0-9]*)-[0-9a-f]{32}-(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"
28355
- );
28328
+ var getTradePathIdRegExp = new RegExp("^(0|[1-9][0-9]*)-[0-9a-f]{32}-(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$");
28356
28329
  var GetTradeParams = zod.object({
28357
- id: zod.string().max(getTradePathIdMax).regex(getTradePathIdRegExp).describe(
28358
- "Synthesized trade id in the form\n`<block_height>-<hex(order_id)>-<open_quantity>`, taken verbatim from\na REST trade object's `id` field (not the WebSocket `tid`).\n"
28359
- )
28330
+ "id": zod.string().max(getTradePathIdMax).regex(getTradePathIdRegExp).describe("Synthesized trade id in the form\n`<block_height>-<hex(order_id)>-<open_quantity>`, taken verbatim from\na REST trade object's `id` field (not the WebSocket `tid`).\n")
28360
28331
  });
28361
28332
  var getTradeResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28362
28333
  var getTradeResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28368,76 +28339,43 @@ var getTradeResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
28368
28339
  var getTradeResponseInfoEventIndexMin = 0;
28369
28340
  var getTradeResponseInfoEventIndexMax = 4294967295;
28370
28341
  var GetTradeResponse = zod.object({
28371
- id: zod.string(),
28372
- order: zod.string().nullish(),
28373
- timestamp: zod.number(),
28374
- datetime: zod.iso.datetime({}),
28375
- symbol: zod.string(),
28376
- type: zod.union([
28377
- zod.literal("limit"),
28378
- zod.literal("market"),
28379
- zod.literal("twap"),
28380
- zod.literal("unknown"),
28381
- zod.literal(null)
28382
- ]).nullish().describe(
28383
- "Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."
28384
- ),
28385
- cloid: zod.string().nullish().describe(
28386
- "Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."
28387
- ),
28388
- side: zod.enum(["buy", "sell"]),
28389
- takerOrMaker: zod.enum(["taker", "maker"]).optional().describe(
28390
- "Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."
28391
- ),
28392
- price: zod.string().regex(getTradeResponsePriceRegExp),
28393
- amount: zod.string().regex(getTradeResponseAmountRegExp),
28394
- cost: zod.string().regex(getTradeResponseCostRegExp).describe("price * amount"),
28395
- fee: zod.object({
28396
- cost: zod.string().regex(getTradeResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28397
- currency: zod.string().optional().describe(
28398
- 'Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'
28399
- ),
28400
- rate: zod.string().regex(getTradeResponseFeeRateRegExp).optional().describe(
28401
- "This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise."
28402
- )
28403
- }).optional().describe(
28404
- "Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."
28405
- ),
28406
- info: zod.object({
28407
- address: zod.string().regex(getTradeResponseInfoAddressOneRegExp).describe(
28408
- "Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
28409
- ).describe("Bech32 address of the orderer that owns this leg of the fill."),
28410
- paid: zod.string().describe(
28411
- 'Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'
28412
- ),
28413
- received: zod.string().describe(
28414
- "Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
28415
- ),
28416
- block_height: zod.string().regex(getTradeResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28417
- event_index: zod.number().min(getTradeResponseInfoEventIndexMin).max(getTradeResponseInfoEventIndexMax).describe(
28418
- "The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n"
28419
- )
28420
- }).describe(
28421
- "Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
28422
- )
28423
- }).describe(
28424
- "All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n"
28425
- );
28342
+ "id": zod.string(),
28343
+ "order": zod.string().nullish(),
28344
+ "timestamp": zod.number(),
28345
+ "datetime": zod.iso.datetime({}),
28346
+ "symbol": zod.string(),
28347
+ "type": zod.union([zod.literal("limit"), zod.literal("market"), zod.literal("twap"), zod.literal("unknown"), zod.literal(null)]).nullish().describe("Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."),
28348
+ "cloid": zod.string().nullish().describe("Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."),
28349
+ "side": zod.enum(["buy", "sell"]),
28350
+ "takerOrMaker": zod.enum(["taker", "maker"]).optional().describe("Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."),
28351
+ "price": zod.string().regex(getTradeResponsePriceRegExp),
28352
+ "amount": zod.string().regex(getTradeResponseAmountRegExp),
28353
+ "cost": zod.string().regex(getTradeResponseCostRegExp).describe("price * amount"),
28354
+ "fee": zod.object({
28355
+ "cost": zod.string().regex(getTradeResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28356
+ "currency": zod.string().optional().describe('Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'),
28357
+ "rate": zod.string().regex(getTradeResponseFeeRateRegExp).optional().describe("This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise.")
28358
+ }).optional().describe("Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."),
28359
+ "info": zod.object({
28360
+ "address": zod.string().regex(getTradeResponseInfoAddressOneRegExp).describe("Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n").describe("Bech32 address of the orderer that owns this leg of the fill."),
28361
+ "paid": zod.string().describe('Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'),
28362
+ "received": zod.string().describe("Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"),
28363
+ "block_height": zod.string().regex(getTradeResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28364
+ "event_index": zod.number().min(getTradeResponseInfoEventIndexMin).max(getTradeResponseInfoEventIndexMax).describe("The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n")
28365
+ }).describe("Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n")
28366
+ }).describe("All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n");
28426
28367
  var getTradingFeesResponseMakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28427
28368
  var getTradingFeesResponseTakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28428
- var GetTradingFeesResponse = zod.record(
28429
- zod.string(),
28430
- zod.object({
28431
- symbol: zod.string(),
28432
- maker: zod.string().regex(getTradingFeesResponseMakerRegExp).describe("Maker fee rate as a canonical decimal string."),
28433
- taker: zod.string().regex(getTradingFeesResponseTakerRegExp).describe("Taker fee rate as a canonical decimal string."),
28434
- percentage: zod.boolean(),
28435
- tierBased: zod.boolean(),
28436
- info: zod.looseObject({})
28437
- })
28438
- );
28369
+ var GetTradingFeesResponse = zod.record(zod.string(), zod.object({
28370
+ "symbol": zod.string(),
28371
+ "maker": zod.string().regex(getTradingFeesResponseMakerRegExp).describe("Maker fee rate as a canonical decimal string."),
28372
+ "taker": zod.string().regex(getTradingFeesResponseTakerRegExp).describe("Taker fee rate as a canonical decimal string."),
28373
+ "percentage": zod.boolean(),
28374
+ "tierBased": zod.boolean(),
28375
+ "info": zod.looseObject({})
28376
+ }));
28439
28377
  var GetStatsQueryParams = zod.object({
28440
- window: zod.enum(["24h", "7d", "30d", "all"]).optional().describe("Precomputed reporting window. Defaults to `24h`.")
28378
+ "window": zod.enum(["24h", "7d", "30d", "all"]).optional().describe("Precomputed reporting window. Defaults to `24h`.")
28441
28379
  });
28442
28380
  var getStatsResponseTotalsQuoteVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28443
28381
  var getStatsResponseTotalsEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28449,44 +28387,30 @@ var getStatsResponseMarketsItemBaseVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$
28449
28387
  var getStatsResponseMarketsItemEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28450
28388
  var getStatsResponseMarketsItemTakerFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28451
28389
  var GetStatsResponse = zod.object({
28452
- window: zod.enum(["24h", "7d", "30d", "all"]),
28453
- totals: zod.object({
28454
- quoteVolume: zod.string().regex(getStatsResponseTotalsQuoteVolumeRegExp).nullable().describe(
28455
- "Total quote volume over the window as a canonical decimal string.\nNull when contributing markets span more than one quote (then\n`estimatedFee` and `quoteAsset` are null too).\n"
28456
- ),
28457
- quoteAsset: zod.string().nullable().describe(
28458
- 'Shared quote ticker of the markets that had volume. Null when they\nspan more than one quote, or on an idle window (then `quoteVolume`\nis "0"; a null `quoteVolume` means multi-quote).\n'
28459
- ),
28460
- estimatedFee: zod.string().regex(getStatsResponseTotalsEstimatedFeeRegExp).nullable().describe(
28461
- "Estimated total fees (`\u03A3 quoteVolume \xD7 takerFeeRate`) as a decimal\nstring; an estimate, not booked revenue. Null on multi-quote.\n"
28462
- ),
28463
- tradeCount: zod.number().describe("Number of fills (maker legs) in the window."),
28464
- traderCount: zod.number().describe("Distinct trading addresses in the window."),
28465
- activeMarkets: zod.number().describe("Number of markets with at least one fill in the window."),
28466
- dailyActiveUsers: zod.number().nullable().describe(
28467
- "Distinct trading addresses over 24 hours. An alias of\n`traderCount` for the `24h` response and null for longer windows;\nseparate so a precise DAU source can diverge later.\n"
28468
- ),
28469
- averageSlippageBps: zod.string().regex(getStatsResponseTotalsAverageSlippageBpsRegExp).nullable().describe(
28470
- "Volume-weighted taker slippage (fill vs book-mid) in bps as a\ndecimal string. Null with no benchmarkable taker fill or when\nfills span more than one quote.\n"
28471
- ),
28472
- depositUsdcVolume24h: zod.string().regex(getStatsResponseTotalsDepositUsdcVolume24hRegExp).nullable().describe("24h USDC deposit volume when available; null for longer windows."),
28473
- builderCodesFee24h: zod.string().regex(getStatsResponseTotalsBuilderCodesFee24hRegExp).nullable().describe("Reserved. Currently always null.")
28390
+ "window": zod.enum(["24h", "7d", "30d", "all"]),
28391
+ "totals": zod.object({
28392
+ "quoteVolume": zod.string().regex(getStatsResponseTotalsQuoteVolumeRegExp).nullable().describe("Total quote volume over the window as a canonical decimal string.\nNull when contributing markets span more than one quote (then\n`estimatedFee` and `quoteAsset` are null too).\n"),
28393
+ "quoteAsset": zod.string().nullable().describe('Shared quote ticker of the markets that had volume. Null when they\nspan more than one quote, or on an idle window (then `quoteVolume`\nis "0"; a null `quoteVolume` means multi-quote).\n'),
28394
+ "estimatedFee": zod.string().regex(getStatsResponseTotalsEstimatedFeeRegExp).nullable().describe("Estimated total fees (`\u03A3 quoteVolume \xD7 takerFeeRate`) as a decimal\nstring; an estimate, not booked revenue. Null on multi-quote.\n"),
28395
+ "tradeCount": zod.number().describe("Number of fills (maker legs) in the window."),
28396
+ "traderCount": zod.number().describe("Distinct trading addresses in the window."),
28397
+ "activeMarkets": zod.number().describe("Number of markets with at least one fill in the window."),
28398
+ "dailyActiveUsers": zod.number().nullable().describe("Distinct trading addresses over 24 hours. An alias of\n`traderCount` for the `24h` response and null for longer windows;\nseparate so a precise DAU source can diverge later.\n"),
28399
+ "averageSlippageBps": zod.string().regex(getStatsResponseTotalsAverageSlippageBpsRegExp).nullable().describe("Volume-weighted taker slippage (fill vs book-mid) in bps as a\ndecimal string. Null with no benchmarkable taker fill or when\nfills span more than one quote.\n"),
28400
+ "depositUsdcVolume24h": zod.string().regex(getStatsResponseTotalsDepositUsdcVolume24hRegExp).nullable().describe("24h USDC deposit volume when available; null for longer windows."),
28401
+ "builderCodesFee24h": zod.string().regex(getStatsResponseTotalsBuilderCodesFee24hRegExp).nullable().describe("Reserved. Currently always null.")
28474
28402
  }).describe("Protocol-wide aggregates for the window."),
28475
- markets: zod.array(
28476
- zod.object({
28477
- symbol: zod.string(),
28478
- base: zod.string(),
28479
- quote: zod.string(),
28480
- quoteVolume: zod.string().regex(getStatsResponseMarketsItemQuoteVolumeRegExp),
28481
- baseVolume: zod.string().regex(getStatsResponseMarketsItemBaseVolumeRegExp),
28482
- estimatedFee: zod.string().regex(getStatsResponseMarketsItemEstimatedFeeRegExp),
28483
- tradeCount: zod.number(),
28484
- takerFeeRate: zod.string().regex(getStatsResponseMarketsItemTakerFeeRateRegExp)
28485
- }).describe("Per-market aggregates for the window.")
28486
- )
28487
- }).describe(
28488
- "Protocol stats overview for a rolling window. Monetary fields are\ncanonical decimal strings; counts are integers.\n"
28489
- );
28403
+ "markets": zod.array(zod.object({
28404
+ "symbol": zod.string(),
28405
+ "base": zod.string(),
28406
+ "quote": zod.string(),
28407
+ "quoteVolume": zod.string().regex(getStatsResponseMarketsItemQuoteVolumeRegExp),
28408
+ "baseVolume": zod.string().regex(getStatsResponseMarketsItemBaseVolumeRegExp),
28409
+ "estimatedFee": zod.string().regex(getStatsResponseMarketsItemEstimatedFeeRegExp),
28410
+ "tradeCount": zod.number(),
28411
+ "takerFeeRate": zod.string().regex(getStatsResponseMarketsItemTakerFeeRateRegExp)
28412
+ }).describe("Per-market aggregates for the window."))
28413
+ }).describe("Protocol stats overview for a rolling window. Monetary fields are\ncanonical decimal strings; counts are integers.\n");
28490
28414
  var listOrdersQueryAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
28491
28415
  var listOrdersQueryAddressTwoRegExp = new RegExp("^0x[a-f0-9]{40}$");
28492
28416
  var listOrdersQueryMarketIdRegExp = new RegExp("^[0-9a-fA-F]+$");
@@ -28494,27 +28418,14 @@ var listOrdersQueryCloidRegExp = new RegExp("^([0-9a-fA-F]{16})?$");
28494
28418
  var listOrdersQueryLimitDefault = 100;
28495
28419
  var listOrdersQueryLimitMax = 500;
28496
28420
  var ListOrdersQueryParams = zod.object({
28497
- address: zod.union([
28498
- zod.string().regex(listOrdersQueryAddressOneRegExp).describe(
28499
- "Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
28500
- ),
28501
- zod.string().regex(listOrdersQueryAddressTwoRegExp).describe(
28502
- "EVM hex form of the same 20-byte account address. Always\n`0x`-prefixed and lowercased; mixed-case bodies are rejected so a\nnon-checksummed and a checksummed copy of the same address never\ncompare unequal at the API boundary.\n"
28503
- )
28504
- ]).describe(
28505
- "Account address. Accepts either bech32 (`ault1...`) or 0x-hex\n(`0x...`) form; the API normalizes to the canonical bech32\nstored in the indexer before querying.\n"
28506
- ),
28507
- status: zod.enum(["open", "closed", "canceled"]).optional(),
28508
- symbol: zod.string().optional().describe("Symbol to filter by (e.g., AULT/USDT). Alternative to market_id."),
28509
- market_id: zod.string().regex(listOrdersQueryMarketIdRegExp).optional().describe("Hex-encoded binary market ID to filter by. Takes precedence over symbol."),
28510
- cloid: zod.string().regex(listOrdersQueryCloidRegExp).optional().describe(
28511
- "Client order id (cloid) to filter by, as a hex string. A\nnon-empty value must decode to exactly 8 bytes (16 hex chars);\nanything else returns 400. An absent or empty (`cloid=`) value\napplies no cloid filter, matching how `market_id` behaves.\nCombined with `address`, a set cloid returns the orders carrying\nit. cloid uniqueness is only enforced for currently-resting\norders, so closed orders that reused the cloid may also match and\nmore than one order can be returned.\n"
28512
- ),
28513
- since: zod.number().optional().describe("Return orders created after this Unix timestamp (milliseconds)"),
28514
- limit: zod.number().min(1).max(listOrdersQueryLimitMax).default(listOrdersQueryLimitDefault),
28515
- cursor: zod.string().optional().describe(
28516
- 'Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'
28517
- )
28421
+ "address": zod.union([zod.string().regex(listOrdersQueryAddressOneRegExp).describe("Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"), zod.string().regex(listOrdersQueryAddressTwoRegExp).describe("EVM hex form of the same 20-byte account address. Always\n`0x`-prefixed and lowercased; mixed-case bodies are rejected so a\nnon-checksummed and a checksummed copy of the same address never\ncompare unequal at the API boundary.\n")]).describe("Account address. Accepts either bech32 (`ault1...`) or 0x-hex\n(`0x...`) form; the API normalizes to the canonical bech32\nstored in the indexer before querying.\n"),
28422
+ "status": zod.enum(["open", "closed", "canceled"]).optional(),
28423
+ "symbol": zod.string().optional().describe("Symbol to filter by (e.g., AULT/USDT). Alternative to market_id."),
28424
+ "market_id": zod.string().regex(listOrdersQueryMarketIdRegExp).optional().describe("Hex-encoded binary market ID to filter by. Takes precedence over symbol."),
28425
+ "cloid": zod.string().regex(listOrdersQueryCloidRegExp).optional().describe("Client order id (cloid) to filter by, as a hex string. A\nnon-empty value must decode to exactly 8 bytes (16 hex chars);\nanything else returns 400. An absent or empty (`cloid=`) value\napplies no cloid filter, matching how `market_id` behaves.\nCombined with `address`, a set cloid returns the orders carrying\nit. cloid uniqueness is only enforced for currently-resting\norders, so closed orders that reused the cloid may also match and\nmore than one order can be returned.\n"),
28426
+ "since": zod.number().optional().describe("Return orders created after this Unix timestamp (milliseconds)"),
28427
+ "limit": zod.number().min(1).max(listOrdersQueryLimitMax).default(listOrdersQueryLimitDefault),
28428
+ "cursor": zod.string().optional().describe('Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n')
28518
28429
  });
28519
28430
  var listOrdersResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28520
28431
  var listOrdersResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28525,77 +28436,60 @@ var listOrdersResponseFeeCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28525
28436
  var listOrdersResponseFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28526
28437
  var listOrdersResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
28527
28438
  var listOrdersResponseInfoRemainingDepositRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28439
+ var listOrdersResponseInfoTwapIdRegExp = new RegExp("^[0-9a-f]+$");
28440
+ var listOrdersResponseInfoTwapOneTotalDepositRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28441
+ var listOrdersResponseInfoTwapOnePriceToleranceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28442
+ var listOrdersResponseInfoTwapOneWorstPriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28528
28443
  var ListOrdersResponseItem = zod.object({
28529
- id: zod.string(),
28530
- clientOrderId: zod.string().nullish().describe(
28531
- "The order's cloid (client order id) as a hex string, or null when the order was placed without one."
28532
- ),
28533
- timestamp: zod.number(),
28534
- datetime: zod.iso.datetime({}),
28535
- lastTradeTimestamp: zod.number().nullish().describe("Timestamp (ms) of the last trade executed against this order. Null if no trades."),
28536
- status: zod.enum(["open", "closed", "canceled", "unknown"]).describe("`unknown` is the fallback for a chain status code the API doesn't recognize."),
28537
- symbol: zod.string(),
28538
- type: zod.enum(["limit", "market", "twap", "unknown"]).describe(
28539
- "`unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is a TWAP slice execution \u2014 the TWAP parent lives in `twap_orders` and is not returned by the order endpoints."
28540
- ),
28541
- timeInForce: zod.union([zod.literal("ioc"), zod.literal(null)]).nullable().describe(
28542
- "CCXT-collapsed time-in-force. `ioc` for an immediate-or-cancel\norder (chain TIF code 1); null for the default (GTT/GTC) or an\nunrecognized code. Always present (never omitted). The WS\n`orderUpdates` payload exposes the same `ioc`-or-absent value.\n"
28543
- ),
28544
- side: zod.enum(["buy", "sell"]),
28545
- price: zod.string().regex(listOrdersResponsePriceRegExp),
28546
- average: zod.string().nullish().describe("Average execution price as decimal string. Null when filled is 0."),
28547
- amount: zod.string().regex(listOrdersResponseAmountRegExp),
28548
- filled: zod.string().regex(listOrdersResponseFilledRegExp),
28549
- remaining: zod.string().regex(listOrdersResponseRemainingRegExp),
28550
- cost: zod.string().regex(listOrdersResponseCostRegExp).describe(
28551
- 'Quote-asset notional accumulated across all fills for this order.\n\nWhen the order has at least one indexed fill, the value is summed\nfrom the trades table (`SUM(filled_quantity * price)`) \u2014 it\nreflects the realized average across every level the order\nwalked, not `filled * price`. Until the indexer has caught up\nwith a freshly-matched fill, the value falls back to\n`filled * price` so consumers never see a misleading "0" while\nthe trade row is still in flight.\n'
28552
- ),
28553
- trades: zod.array(zod.looseObject({})).optional(),
28554
- fee: zod.object({
28555
- cost: zod.string().regex(listOrdersResponseFeeCostRegExp).optional().describe("Fee cost in quote currency, decimal string."),
28556
- currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
28557
- rate: zod.string().regex(listOrdersResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
28558
- }).optional().describe(
28559
- "Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"
28560
- ),
28561
- reduceOnly: zod.boolean().optional(),
28562
- postOnly: zod.boolean().optional(),
28563
- stopPrice: zod.string().nullish(),
28564
- triggerPrice: zod.string().nullish(),
28565
- info: zod.object({
28566
- block_height: zod.string().regex(listOrdersResponseInfoBlockHeightRegExp).describe(
28567
- "Height of the block that wrote the order. Decimal string for\nparity with the WS order `info.block_height`.\n"
28568
- ),
28569
- tx_index: zod.number().describe("Index of the order tx within its block."),
28570
- remaining_deposit: zod.string().regex(listOrdersResponseInfoRemainingDepositRegExp).describe(
28571
- "Remaining quote-asset escrow (raw decimal string at the chain's\natto-precision) that has not yet been spent on fills.\n"
28572
- ),
28573
- chain_status: zod.enum([
28574
- "open",
28575
- "partially_filled",
28576
- "filled",
28577
- "cancelled",
28578
- "expired",
28579
- "triggered_pending",
28580
- "unknown"
28581
- ]).describe(
28582
- "Granular chain-level status \u2014 the WS view exposes the same\nstring. The CCXT view at `OrderResponse.status` collapses these\ninto open | closed | canceled. `unknown` is the fallback for a\nchain code the API doesn't recognize.\n"
28583
- ),
28584
- chain_type: zod.enum(["limit", "market", "twap", "unknown"]).describe(
28585
- "Granular chain-level order type. Mirrors the dbindexer\n`orders.order_type` column (0=limit, 1=market, 2=twap). TWAP\nslice executions are stored as individual order rows and surface\nhere as `twap`. `unknown` is the fallback for a chain code the\nAPI doesn't recognize.\n"
28586
- ),
28587
- close_reason: zod.string().nullable().describe(
28588
- "Free-form chain close reason for a terminal order \u2014 e.g.\n`completed`, `canceled`, `expired`, `ioc_canceled`,\n`self_trade`, `post_only_rejected`, `replaced`. Null while the\norder is still live. Lets consumers tell an IOC-cancelled or\nself-trade-prevented close apart from the generic `canceled` close.\n"
28589
- )
28590
- }).describe(
28591
- "Exchange-specific extension on `OrderResponse`. Mirrors the\n`info` map populated in `internal/domain/order/service.go`.\n"
28592
- )
28593
- }).describe(
28594
- "All numeric fields (price, amount, filled, remaining, cost,\nfee.cost, fee.rate, average, triggerPrice, stopPrice) are canonical\ndecimal strings.\n"
28595
- );
28444
+ "id": zod.string(),
28445
+ "clientOrderId": zod.string().nullish().describe("The order's cloid (client order id) as a hex string, or null when the order was placed without one."),
28446
+ "timestamp": zod.number(),
28447
+ "datetime": zod.iso.datetime({}),
28448
+ "lastTradeTimestamp": zod.number().nullish().describe("Timestamp (ms) of the last trade executed against this order. Null if no trades."),
28449
+ "status": zod.enum(["open", "closed", "canceled", "unknown"]).describe("`unknown` is the fallback for a chain status code the API doesn't recognize."),
28450
+ "symbol": zod.string(),
28451
+ "type": zod.enum(["limit", "market", "twap", "unknown"]).describe("`unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set)."),
28452
+ "timeInForce": zod.union([zod.literal("ioc"), zod.literal(null)]).nullable().describe("CCXT-collapsed time-in-force. `ioc` for an immediate-or-cancel\norder (chain TIF code 1); null for the default (GTT/GTC) or an\nunrecognized code. Always present (never omitted). The WS\n`orderUpdates` payload exposes the same `ioc`-or-absent value.\n"),
28453
+ "side": zod.enum(["buy", "sell"]),
28454
+ "price": zod.string().regex(listOrdersResponsePriceRegExp),
28455
+ "average": zod.string().nullish().describe("Average execution price as decimal string. Null when filled is 0."),
28456
+ "amount": zod.string().regex(listOrdersResponseAmountRegExp),
28457
+ "filled": zod.string().regex(listOrdersResponseFilledRegExp),
28458
+ "remaining": zod.string().regex(listOrdersResponseRemainingRegExp),
28459
+ "cost": zod.string().regex(listOrdersResponseCostRegExp).describe('Quote-asset notional accumulated across all fills for this order.\n\nWhen the order has at least one indexed fill, the value is summed\nfrom the trades table (`SUM(filled_quantity * price)`) \u2014 it\nreflects the realized average across every level the order\nwalked, not `filled * price`. Until the indexer has caught up\nwith a freshly-matched fill, the value falls back to\n`filled * price` so consumers never see a misleading "0" while\nthe trade row is still in flight.\n'),
28460
+ "trades": zod.array(zod.looseObject({})).optional(),
28461
+ "fee": zod.object({
28462
+ "cost": zod.string().regex(listOrdersResponseFeeCostRegExp).optional().describe("Fee cost in quote currency, decimal string."),
28463
+ "currency": zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
28464
+ "rate": zod.string().regex(listOrdersResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
28465
+ }).optional().describe("Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"),
28466
+ "reduceOnly": zod.boolean().optional(),
28467
+ "postOnly": zod.boolean().optional(),
28468
+ "stopPrice": zod.string().nullish(),
28469
+ "triggerPrice": zod.string().nullish(),
28470
+ "info": zod.object({
28471
+ "block_height": zod.string().regex(listOrdersResponseInfoBlockHeightRegExp).describe("Height of the block that wrote the order. Decimal string for\nparity with the WS order `info.block_height`.\n"),
28472
+ "tx_index": zod.number().describe("Index of the order tx within its block."),
28473
+ "remaining_deposit": zod.string().regex(listOrdersResponseInfoRemainingDepositRegExp).describe("Remaining quote-asset escrow (raw decimal string at the chain's\natto-precision) that has not yet been spent on fills. On a TWAP\nparent: the unspent deposit (quote for a buy, base for a sell).\n"),
28474
+ "chain_status": zod.enum(["open", "partially_filled", "filled", "cancelled", "expired", "triggered_pending", "unknown"]).describe("Granular chain-level status \u2014 the WS view exposes the same\nstring. The CCXT view at `OrderResponse.status` collapses these\ninto open | closed | canceled. `unknown` is the fallback for a\nchain code the API doesn't recognize.\n"),
28475
+ "chain_type": zod.enum(["limit", "market", "twap", "unknown"]).describe("Granular chain-level order type. Mirrors the dbindexer\n`orders.order_type` column (0=limit, 1=market, 2=twap). Both a\nTWAP parent and its slice executions surface as `twap`; tell\nthem apart by `twap` (set on the parent) and `twap_id` (set on\na slice). `unknown` is the fallback for a chain code the API\ndoesn't recognize.\n"),
28476
+ "close_reason": zod.string().nullable().describe("Free-form chain close reason for a terminal order \u2014 e.g.\n`completed`, `canceled`, `expired`, `ioc_canceled`,\n`self_trade`, `post_only_rejected`, `replaced`. Null while the\norder is still live. Lets consumers tell an IOC-cancelled or\nself-trade-prevented close apart from the generic `canceled` close.\n"),
28477
+ "twap_id": zod.string().regex(listOrdersResponseInfoTwapIdRegExp).nullish().describe("Hex id of the TWAP parent a slice execution was attributed to;\nnull on parents, non-TWAP rows and unattributed slices.\n"),
28478
+ "twap": zod.union([zod.object({
28479
+ "total_deposit": zod.string().regex(listOrdersResponseInfoTwapOneTotalDepositRegExp).describe("Escrowed size in `deposit_asset` units (the `amount` of a sell, the quote budget of a buy)."),
28480
+ "deposit_asset": zod.enum(["base", "quote"]).describe("Base for a sell, quote for a buy."),
28481
+ "start_time": zod.number().nullable().describe("When the schedule started (ms)."),
28482
+ "deadline": zod.number().nullable().describe("When the schedule ends (ms)."),
28483
+ "num_slices": zod.number().describe("Slices the schedule was cut into."),
28484
+ "slice_index": zod.number().describe("Slices dispatched so far."),
28485
+ "price_tolerance": zod.string().regex(listOrdersResponseInfoTwapOnePriceToleranceRegExp).nullable().describe("Per-slice slippage bound as a ratio (`0.005` = 0.5%); null when `worst_price` is set or the chain default applied."),
28486
+ "worst_price": zod.string().regex(listOrdersResponseInfoTwapOneWorstPriceRegExp).nullable().describe("Absolute worst price per slice; null when a tolerance was used.")
28487
+ }).describe("Schedule of a TWAP parent. Amounts are human units; times are ms epoch."), zod.null()]).optional().describe("The schedule of a TWAP parent; null on every other row.")
28488
+ }).describe("Exchange-specific extension on `OrderResponse`. Mirrors the\n`info` map populated in `internal/domain/order/service.go`.\n")
28489
+ }).describe("All numeric fields (price, amount, filled, remaining, cost,\nfee.cost, fee.rate, average, triggerPrice, stopPrice) are canonical\ndecimal strings.\n");
28596
28490
  var ListOrdersResponse = zod.array(ListOrdersResponseItem);
28597
28491
  var GetOrderParams = zod.object({
28598
- id: zod.string().describe("Hex-encoded order ID")
28492
+ "id": zod.string().describe("Hex-encoded order ID")
28599
28493
  });
28600
28494
  var getOrderResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28601
28495
  var getOrderResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28606,90 +28500,69 @@ var getOrderResponseFeeCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28606
28500
  var getOrderResponseFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28607
28501
  var getOrderResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
28608
28502
  var getOrderResponseInfoRemainingDepositRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28503
+ var getOrderResponseInfoTwapIdRegExp = new RegExp("^[0-9a-f]+$");
28504
+ var getOrderResponseInfoTwapOneTotalDepositRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28505
+ var getOrderResponseInfoTwapOnePriceToleranceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28506
+ var getOrderResponseInfoTwapOneWorstPriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28609
28507
  var GetOrderResponse = zod.object({
28610
- id: zod.string(),
28611
- clientOrderId: zod.string().nullish().describe(
28612
- "The order's cloid (client order id) as a hex string, or null when the order was placed without one."
28613
- ),
28614
- timestamp: zod.number(),
28615
- datetime: zod.iso.datetime({}),
28616
- lastTradeTimestamp: zod.number().nullish().describe("Timestamp (ms) of the last trade executed against this order. Null if no trades."),
28617
- status: zod.enum(["open", "closed", "canceled", "unknown"]).describe("`unknown` is the fallback for a chain status code the API doesn't recognize."),
28618
- symbol: zod.string(),
28619
- type: zod.enum(["limit", "market", "twap", "unknown"]).describe(
28620
- "`unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is a TWAP slice execution \u2014 the TWAP parent lives in `twap_orders` and is not returned by the order endpoints."
28621
- ),
28622
- timeInForce: zod.union([zod.literal("ioc"), zod.literal(null)]).nullable().describe(
28623
- "CCXT-collapsed time-in-force. `ioc` for an immediate-or-cancel\norder (chain TIF code 1); null for the default (GTT/GTC) or an\nunrecognized code. Always present (never omitted). The WS\n`orderUpdates` payload exposes the same `ioc`-or-absent value.\n"
28624
- ),
28625
- side: zod.enum(["buy", "sell"]),
28626
- price: zod.string().regex(getOrderResponsePriceRegExp),
28627
- average: zod.string().nullish().describe("Average execution price as decimal string. Null when filled is 0."),
28628
- amount: zod.string().regex(getOrderResponseAmountRegExp),
28629
- filled: zod.string().regex(getOrderResponseFilledRegExp),
28630
- remaining: zod.string().regex(getOrderResponseRemainingRegExp),
28631
- cost: zod.string().regex(getOrderResponseCostRegExp).describe(
28632
- 'Quote-asset notional accumulated across all fills for this order.\n\nWhen the order has at least one indexed fill, the value is summed\nfrom the trades table (`SUM(filled_quantity * price)`) \u2014 it\nreflects the realized average across every level the order\nwalked, not `filled * price`. Until the indexer has caught up\nwith a freshly-matched fill, the value falls back to\n`filled * price` so consumers never see a misleading "0" while\nthe trade row is still in flight.\n'
28633
- ),
28634
- trades: zod.array(zod.looseObject({})).optional(),
28635
- fee: zod.object({
28636
- cost: zod.string().regex(getOrderResponseFeeCostRegExp).optional().describe("Fee cost in quote currency, decimal string."),
28637
- currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
28638
- rate: zod.string().regex(getOrderResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
28639
- }).optional().describe(
28640
- "Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"
28641
- ),
28642
- reduceOnly: zod.boolean().optional(),
28643
- postOnly: zod.boolean().optional(),
28644
- stopPrice: zod.string().nullish(),
28645
- triggerPrice: zod.string().nullish(),
28646
- info: zod.object({
28647
- block_height: zod.string().regex(getOrderResponseInfoBlockHeightRegExp).describe(
28648
- "Height of the block that wrote the order. Decimal string for\nparity with the WS order `info.block_height`.\n"
28649
- ),
28650
- tx_index: zod.number().describe("Index of the order tx within its block."),
28651
- remaining_deposit: zod.string().regex(getOrderResponseInfoRemainingDepositRegExp).describe(
28652
- "Remaining quote-asset escrow (raw decimal string at the chain's\natto-precision) that has not yet been spent on fills.\n"
28653
- ),
28654
- chain_status: zod.enum([
28655
- "open",
28656
- "partially_filled",
28657
- "filled",
28658
- "cancelled",
28659
- "expired",
28660
- "triggered_pending",
28661
- "unknown"
28662
- ]).describe(
28663
- "Granular chain-level status \u2014 the WS view exposes the same\nstring. The CCXT view at `OrderResponse.status` collapses these\ninto open | closed | canceled. `unknown` is the fallback for a\nchain code the API doesn't recognize.\n"
28664
- ),
28665
- chain_type: zod.enum(["limit", "market", "twap", "unknown"]).describe(
28666
- "Granular chain-level order type. Mirrors the dbindexer\n`orders.order_type` column (0=limit, 1=market, 2=twap). TWAP\nslice executions are stored as individual order rows and surface\nhere as `twap`. `unknown` is the fallback for a chain code the\nAPI doesn't recognize.\n"
28667
- ),
28668
- close_reason: zod.string().nullable().describe(
28669
- "Free-form chain close reason for a terminal order \u2014 e.g.\n`completed`, `canceled`, `expired`, `ioc_canceled`,\n`self_trade`, `post_only_rejected`, `replaced`. Null while the\norder is still live. Lets consumers tell an IOC-cancelled or\nself-trade-prevented close apart from the generic `canceled` close.\n"
28670
- )
28671
- }).describe(
28672
- "Exchange-specific extension on `OrderResponse`. Mirrors the\n`info` map populated in `internal/domain/order/service.go`.\n"
28673
- )
28674
- }).describe(
28675
- "All numeric fields (price, amount, filled, remaining, cost,\nfee.cost, fee.rate, average, triggerPrice, stopPrice) are canonical\ndecimal strings.\n"
28676
- );
28508
+ "id": zod.string(),
28509
+ "clientOrderId": zod.string().nullish().describe("The order's cloid (client order id) as a hex string, or null when the order was placed without one."),
28510
+ "timestamp": zod.number(),
28511
+ "datetime": zod.iso.datetime({}),
28512
+ "lastTradeTimestamp": zod.number().nullish().describe("Timestamp (ms) of the last trade executed against this order. Null if no trades."),
28513
+ "status": zod.enum(["open", "closed", "canceled", "unknown"]).describe("`unknown` is the fallback for a chain status code the API doesn't recognize."),
28514
+ "symbol": zod.string(),
28515
+ "type": zod.enum(["limit", "market", "twap", "unknown"]).describe("`unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set)."),
28516
+ "timeInForce": zod.union([zod.literal("ioc"), zod.literal(null)]).nullable().describe("CCXT-collapsed time-in-force. `ioc` for an immediate-or-cancel\norder (chain TIF code 1); null for the default (GTT/GTC) or an\nunrecognized code. Always present (never omitted). The WS\n`orderUpdates` payload exposes the same `ioc`-or-absent value.\n"),
28517
+ "side": zod.enum(["buy", "sell"]),
28518
+ "price": zod.string().regex(getOrderResponsePriceRegExp),
28519
+ "average": zod.string().nullish().describe("Average execution price as decimal string. Null when filled is 0."),
28520
+ "amount": zod.string().regex(getOrderResponseAmountRegExp),
28521
+ "filled": zod.string().regex(getOrderResponseFilledRegExp),
28522
+ "remaining": zod.string().regex(getOrderResponseRemainingRegExp),
28523
+ "cost": zod.string().regex(getOrderResponseCostRegExp).describe('Quote-asset notional accumulated across all fills for this order.\n\nWhen the order has at least one indexed fill, the value is summed\nfrom the trades table (`SUM(filled_quantity * price)`) \u2014 it\nreflects the realized average across every level the order\nwalked, not `filled * price`. Until the indexer has caught up\nwith a freshly-matched fill, the value falls back to\n`filled * price` so consumers never see a misleading "0" while\nthe trade row is still in flight.\n'),
28524
+ "trades": zod.array(zod.looseObject({})).optional(),
28525
+ "fee": zod.object({
28526
+ "cost": zod.string().regex(getOrderResponseFeeCostRegExp).optional().describe("Fee cost in quote currency, decimal string."),
28527
+ "currency": zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
28528
+ "rate": zod.string().regex(getOrderResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
28529
+ }).optional().describe("Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"),
28530
+ "reduceOnly": zod.boolean().optional(),
28531
+ "postOnly": zod.boolean().optional(),
28532
+ "stopPrice": zod.string().nullish(),
28533
+ "triggerPrice": zod.string().nullish(),
28534
+ "info": zod.object({
28535
+ "block_height": zod.string().regex(getOrderResponseInfoBlockHeightRegExp).describe("Height of the block that wrote the order. Decimal string for\nparity with the WS order `info.block_height`.\n"),
28536
+ "tx_index": zod.number().describe("Index of the order tx within its block."),
28537
+ "remaining_deposit": zod.string().regex(getOrderResponseInfoRemainingDepositRegExp).describe("Remaining quote-asset escrow (raw decimal string at the chain's\natto-precision) that has not yet been spent on fills. On a TWAP\nparent: the unspent deposit (quote for a buy, base for a sell).\n"),
28538
+ "chain_status": zod.enum(["open", "partially_filled", "filled", "cancelled", "expired", "triggered_pending", "unknown"]).describe("Granular chain-level status \u2014 the WS view exposes the same\nstring. The CCXT view at `OrderResponse.status` collapses these\ninto open | closed | canceled. `unknown` is the fallback for a\nchain code the API doesn't recognize.\n"),
28539
+ "chain_type": zod.enum(["limit", "market", "twap", "unknown"]).describe("Granular chain-level order type. Mirrors the dbindexer\n`orders.order_type` column (0=limit, 1=market, 2=twap). Both a\nTWAP parent and its slice executions surface as `twap`; tell\nthem apart by `twap` (set on the parent) and `twap_id` (set on\na slice). `unknown` is the fallback for a chain code the API\ndoesn't recognize.\n"),
28540
+ "close_reason": zod.string().nullable().describe("Free-form chain close reason for a terminal order \u2014 e.g.\n`completed`, `canceled`, `expired`, `ioc_canceled`,\n`self_trade`, `post_only_rejected`, `replaced`. Null while the\norder is still live. Lets consumers tell an IOC-cancelled or\nself-trade-prevented close apart from the generic `canceled` close.\n"),
28541
+ "twap_id": zod.string().regex(getOrderResponseInfoTwapIdRegExp).nullish().describe("Hex id of the TWAP parent a slice execution was attributed to;\nnull on parents, non-TWAP rows and unattributed slices.\n"),
28542
+ "twap": zod.union([zod.object({
28543
+ "total_deposit": zod.string().regex(getOrderResponseInfoTwapOneTotalDepositRegExp).describe("Escrowed size in `deposit_asset` units (the `amount` of a sell, the quote budget of a buy)."),
28544
+ "deposit_asset": zod.enum(["base", "quote"]).describe("Base for a sell, quote for a buy."),
28545
+ "start_time": zod.number().nullable().describe("When the schedule started (ms)."),
28546
+ "deadline": zod.number().nullable().describe("When the schedule ends (ms)."),
28547
+ "num_slices": zod.number().describe("Slices the schedule was cut into."),
28548
+ "slice_index": zod.number().describe("Slices dispatched so far."),
28549
+ "price_tolerance": zod.string().regex(getOrderResponseInfoTwapOnePriceToleranceRegExp).nullable().describe("Per-slice slippage bound as a ratio (`0.005` = 0.5%); null when `worst_price` is set or the chain default applied."),
28550
+ "worst_price": zod.string().regex(getOrderResponseInfoTwapOneWorstPriceRegExp).nullable().describe("Absolute worst price per slice; null when a tolerance was used.")
28551
+ }).describe("Schedule of a TWAP parent. Amounts are human units; times are ms epoch."), zod.null()]).optional().describe("The schedule of a TWAP parent; null on every other row.")
28552
+ }).describe("Exchange-specific extension on `OrderResponse`. Mirrors the\n`info` map populated in `internal/domain/order/service.go`.\n")
28553
+ }).describe("All numeric fields (price, amount, filled, remaining, cost,\nfee.cost, fee.rate, average, triggerPrice, stopPrice) are canonical\ndecimal strings.\n");
28677
28554
  var listMyTradesQueryLimitDefault = 100;
28678
28555
  var listMyTradesQueryLimitMax = 500;
28679
28556
  var listMyTradesQueryBeforeIndexMin = 0;
28680
28557
  var listMyTradesQueryBeforeIndexMax = 4294967295;
28681
28558
  var ListMyTradesQueryParams = zod.object({
28682
- address: zod.string().describe("Blockchain address of the trader"),
28683
- symbol: zod.string().optional().describe("Symbol to filter by (e.g., AULT/USDT)"),
28684
- since: zod.number().optional().describe("Unix timestamp in milliseconds"),
28685
- limit: zod.number().min(1).max(listMyTradesQueryLimitMax).default(listMyTradesQueryLimitDefault),
28686
- cursor: zod.string().optional().describe(
28687
- 'Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'
28688
- ),
28689
- before_height: zod.number().min(1).optional().describe(
28690
- "Deprecated in favour of `cursor`; still honoured, and ignored when\n`cursor` is also present.\n\nComposite pagination cursor, upper half. Returns only trades\nstrictly older (in feed order) than the row identified by\n(`before_height`, `before_index`) \u2014 take both values from the\nlast row's `info.block_height` / `info.event_index`. Must be\npassed together with `before_index`. Unlike `since`, the cursor\ncannot skip or repeat trades when many share one timestamp.\n"
28691
- ),
28692
- before_index: zod.number().min(listMyTradesQueryBeforeIndexMin).max(listMyTradesQueryBeforeIndexMax).optional().describe("Composite pagination cursor, lower half. See `before_height`.")
28559
+ "address": zod.string().describe("Blockchain address of the trader"),
28560
+ "symbol": zod.string().optional().describe("Symbol to filter by (e.g., AULT/USDT)"),
28561
+ "since": zod.number().optional().describe("Unix timestamp in milliseconds"),
28562
+ "limit": zod.number().min(1).max(listMyTradesQueryLimitMax).default(listMyTradesQueryLimitDefault),
28563
+ "cursor": zod.string().optional().describe('Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'),
28564
+ "before_height": zod.number().min(1).optional().describe("Deprecated in favour of `cursor`; still honoured, and ignored when\n`cursor` is also present.\n\nComposite pagination cursor, upper half. Returns only trades\nstrictly older (in feed order) than the row identified by\n(`before_height`, `before_index`) \u2014 take both values from the\nlast row's `info.block_height` / `info.event_index`. Must be\npassed together with `before_index`. Unlike `since`, the cursor\ncannot skip or repeat trades when many share one timestamp.\n"),
28565
+ "before_index": zod.number().min(listMyTradesQueryBeforeIndexMin).max(listMyTradesQueryBeforeIndexMax).optional().describe("Composite pagination cursor, lower half. See `before_height`.")
28693
28566
  });
28694
28567
  var listMyTradesResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
28695
28568
  var listMyTradesResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
@@ -28701,93 +28574,57 @@ var listMyTradesResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
28701
28574
  var listMyTradesResponseInfoEventIndexMin = 0;
28702
28575
  var listMyTradesResponseInfoEventIndexMax = 4294967295;
28703
28576
  var ListMyTradesResponseItem = zod.object({
28704
- id: zod.string(),
28705
- order: zod.string().nullish(),
28706
- timestamp: zod.number(),
28707
- datetime: zod.iso.datetime({}),
28708
- symbol: zod.string(),
28709
- type: zod.union([
28710
- zod.literal("limit"),
28711
- zod.literal("market"),
28712
- zod.literal("twap"),
28713
- zod.literal("unknown"),
28714
- zod.literal(null)
28715
- ]).nullish().describe(
28716
- "Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."
28717
- ),
28718
- cloid: zod.string().nullish().describe(
28719
- "Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."
28720
- ),
28721
- side: zod.enum(["buy", "sell"]),
28722
- takerOrMaker: zod.enum(["taker", "maker"]).optional().describe(
28723
- "Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."
28724
- ),
28725
- price: zod.string().regex(listMyTradesResponsePriceRegExp),
28726
- amount: zod.string().regex(listMyTradesResponseAmountRegExp),
28727
- cost: zod.string().regex(listMyTradesResponseCostRegExp).describe("price * amount"),
28728
- fee: zod.object({
28729
- cost: zod.string().regex(listMyTradesResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28730
- currency: zod.string().optional().describe(
28731
- 'Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'
28732
- ),
28733
- rate: zod.string().regex(listMyTradesResponseFeeRateRegExp).optional().describe(
28734
- "This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise."
28735
- )
28736
- }).optional().describe(
28737
- "Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."
28738
- ),
28739
- info: zod.object({
28740
- address: zod.string().regex(listMyTradesResponseInfoAddressOneRegExp).describe(
28741
- "Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
28742
- ).describe("Bech32 address of the orderer that owns this leg of the fill."),
28743
- paid: zod.string().describe(
28744
- 'Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'
28745
- ),
28746
- received: zod.string().describe(
28747
- "Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
28748
- ),
28749
- block_height: zod.string().regex(listMyTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28750
- event_index: zod.number().min(listMyTradesResponseInfoEventIndexMin).max(listMyTradesResponseInfoEventIndexMax).describe(
28751
- "The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n"
28752
- )
28753
- }).describe(
28754
- "Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
28755
- )
28756
- }).describe(
28757
- "All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n"
28758
- );
28577
+ "id": zod.string(),
28578
+ "order": zod.string().nullish(),
28579
+ "timestamp": zod.number(),
28580
+ "datetime": zod.iso.datetime({}),
28581
+ "symbol": zod.string(),
28582
+ "type": zod.union([zod.literal("limit"), zod.literal("market"), zod.literal("twap"), zod.literal("unknown"), zod.literal(null)]).nullish().describe("Order type resolved via JOIN to orders table. `twap` marks a TWAP slice execution (chain code 2). Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."),
28583
+ "cloid": zod.string().nullish().describe("Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."),
28584
+ "side": zod.enum(["buy", "sell"]),
28585
+ "takerOrMaker": zod.enum(["taker", "maker"]).optional().describe("Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."),
28586
+ "price": zod.string().regex(listMyTradesResponsePriceRegExp),
28587
+ "amount": zod.string().regex(listMyTradesResponseAmountRegExp),
28588
+ "cost": zod.string().regex(listMyTradesResponseCostRegExp).describe("price * amount"),
28589
+ "fee": zod.object({
28590
+ "cost": zod.string().regex(listMyTradesResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
28591
+ "currency": zod.string().optional().describe('Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'),
28592
+ "rate": zod.string().regex(listMyTradesResponseFeeRateRegExp).optional().describe("This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise.")
28593
+ }).optional().describe("Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."),
28594
+ "info": zod.object({
28595
+ "address": zod.string().regex(listMyTradesResponseInfoAddressOneRegExp).describe("Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n").describe("Bech32 address of the orderer that owns this leg of the fill."),
28596
+ "paid": zod.string().describe('Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'),
28597
+ "received": zod.string().describe("Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"),
28598
+ "block_height": zod.string().regex(listMyTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
28599
+ "event_index": zod.number().min(listMyTradesResponseInfoEventIndexMin).max(listMyTradesResponseInfoEventIndexMax).describe("The trade's event position within its block. With `block_height`\nit forms the row's composite pagination cursor: pass the last\nrow's pair as `before_height`/`before_index` to fetch the next\n(older) page.\n")
28600
+ }).describe("Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n")
28601
+ }).describe("All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n");
28759
28602
  var ListMyTradesResponse = zod.array(ListMyTradesResponseItem);
28760
28603
  var GetBalanceQueryParams = zod.object({
28761
- address: zod.string()
28604
+ "address": zod.string()
28762
28605
  });
28763
28606
  var getBalanceResponseFreeRegExpOne = new RegExp("^-?\\d+(\\.\\d+)?$");
28764
28607
  var getBalanceResponseUsedRegExpOne = new RegExp("^-?\\d+(\\.\\d+)?$");
28765
28608
  var getBalanceResponseTotalRegExpOne = new RegExp("^-?\\d+(\\.\\d+)?$");
28766
28609
  var GetBalanceResponse = zod.object({
28767
- free: zod.record(zod.string(), zod.string().regex(getBalanceResponseFreeRegExpOne)),
28768
- used: zod.record(zod.string(), zod.string().regex(getBalanceResponseUsedRegExpOne)),
28769
- total: zod.record(zod.string(), zod.string().regex(getBalanceResponseTotalRegExpOne)),
28770
- timestamp: zod.number().nullish(),
28771
- datetime: zod.string().nullish(),
28772
- info: zod.looseObject({})
28773
- }).describe(
28774
- "Balance object. Contains `free`, `used`, `total` dictionaries\n(currency code -> decimal string), plus per-currency entries with\n{free, used, total} as decimal strings, and `info`, `timestamp`,\n`datetime`. Strings preserve precision past 2^53 raw units.\n"
28775
- );
28610
+ "free": zod.record(zod.string(), zod.string().regex(getBalanceResponseFreeRegExpOne)),
28611
+ "used": zod.record(zod.string(), zod.string().regex(getBalanceResponseUsedRegExpOne)),
28612
+ "total": zod.record(zod.string(), zod.string().regex(getBalanceResponseTotalRegExpOne)),
28613
+ "timestamp": zod.number().nullish(),
28614
+ "datetime": zod.string().nullish(),
28615
+ "info": zod.looseObject({})
28616
+ }).describe("Balance object. Contains `free`, `used`, `total` dictionaries\n(currency code -> decimal string), plus per-currency entries with\n{free, used, total} as decimal strings, and `info`, `timestamp`,\n`datetime`. Strings preserve precision past 2^53 raw units.\n");
28776
28617
  var GetOHLCVParams = zod.object({
28777
- symbol: zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28618
+ "symbol": zod.string().describe("URL-encoded trading pair (e.g., `AULT%2FUSDT`)")
28778
28619
  });
28779
28620
  var getOHLCVQueryTimeframeDefault = `1m`;
28780
28621
  var getOHLCVQueryLimitDefault = 500;
28781
28622
  var getOHLCVQueryLimitMax = 1e3;
28782
28623
  var GetOHLCVQueryParams = zod.object({
28783
- timeframe: zod.string().default(getOHLCVQueryTimeframeDefault).describe("Timeframe: 1m, 5m, 15m, 30m, 1h, 4h, 1d. Also accepts TV format: 1, 5, 15, 60, 1D"),
28784
- limit: zod.number().min(1).max(getOHLCVQueryLimitMax).default(getOHLCVQueryLimitDefault).describe(
28785
- "Bars per page, oldest first within the page. Without `since` the\npage holds the newest `limit` bars and the cursor walks back in\ntime; with `since` it holds the first `limit` bars from `since`\nand the cursor walks forward.\n"
28786
- ),
28787
- since: zod.number().optional().describe("Unix timestamp in milliseconds"),
28788
- cursor: zod.string().optional().describe(
28789
- 'Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n'
28790
- )
28624
+ "timeframe": zod.string().default(getOHLCVQueryTimeframeDefault).describe("Timeframe: 1m, 5m, 15m, 30m, 1h, 4h, 1d. Also accepts TV format: 1, 5, 15, 60, 1D"),
28625
+ "limit": zod.number().min(1).max(getOHLCVQueryLimitMax).default(getOHLCVQueryLimitDefault).describe("Bars per page, oldest first within the page. Without `since` the\npage holds the newest `limit` bars and the cursor walks back in\ntime; with `since` it holds the first `limit` bars from `since`\nand the cursor walks forward.\n"),
28626
+ "since": zod.number().optional().describe("Unix timestamp in milliseconds"),
28627
+ "cursor": zod.string().optional().describe('Opaque pagination cursor. Take it verbatim from the previous page\'s\n`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and\nrepeat every other query parameter; the cursor is bound to that\nfilter set and a different one is rejected with 400. `limit` may\nchange between pages. No `X-Next-Cursor` on a response means the\nfeed is exhausted. Clients must not build or parse cursors.\n')
28791
28628
  });
28792
28629
  var GetOHLCVResponseItem = zod.tuple([
28793
28630
  zod.number().describe("timestamp in milliseconds"),
@@ -28797,142 +28634,134 @@ var GetOHLCVResponseItem = zod.tuple([
28797
28634
  zod.string().describe("close price, decimal string"),
28798
28635
  zod.string().describe("base-asset volume, decimal string"),
28799
28636
  zod.string().describe("quote-asset volume, decimal string (approximation of `baseVolume * close`)")
28800
- ]).describe(
28801
- "`[timestamp_ms, open, high, low, close, baseVolume, quoteVolume]`.\nTimestamp is a numeric ms epoch; the o/h/l/c/baseVolume/quoteVolume\nfields are canonical decimal strings so quantities at any magnitude\nsurvive the JSON round-trip. The trailing `quoteVolume` slot is\nderived as `baseVolume * close_price` until the chain indexer\nemits a realized `volume_quote` column. Both SDK clients\n(`ault-sdk-ts`, `ault-sdk-py`) consume the 7-tuple as the\ncanonical shape.\n(Patterns omitted on tuple items because orval generates broken\nregex references when `prefixItems` carry `pattern`; the format is\ndocumented in the descriptions.)\n"
28802
- );
28637
+ ]).describe("`[timestamp_ms, open, high, low, close, baseVolume, quoteVolume]`.\nTimestamp is a numeric ms epoch; the o/h/l/c/baseVolume/quoteVolume\nfields are canonical decimal strings so quantities at any magnitude\nsurvive the JSON round-trip. The trailing `quoteVolume` slot is\nderived as `baseVolume * close_price` until the chain indexer\nemits a realized `volume_quote` column. Both SDK clients\n(`ault-sdk-ts`, `ault-sdk-py`) consume the 7-tuple as the\ncanonical shape.\n(Patterns omitted on tuple items because orval generates broken\nregex references when `prefixItems` carry `pattern`; the format is\ndocumented in the descriptions.)\n");
28803
28638
  var GetOHLCVResponse = zod.array(GetOHLCVResponseItem);
28804
28639
  var GetUDFConfigResponse = zod.object({
28805
- supports_search: zod.boolean(),
28806
- supports_group_request: zod.boolean(),
28807
- supports_marks: zod.boolean(),
28808
- supports_timescale_marks: zod.boolean(),
28809
- supports_time: zod.boolean(),
28810
- supported_resolutions: zod.array(zod.string()),
28811
- exchanges: zod.array(
28812
- zod.object({
28813
- value: zod.string(),
28814
- name: zod.string(),
28815
- desc: zod.string()
28816
- })
28817
- ),
28818
- symbols_types: zod.array(
28819
- zod.object({
28820
- name: zod.string(),
28821
- value: zod.string()
28822
- })
28823
- )
28640
+ "supports_search": zod.boolean(),
28641
+ "supports_group_request": zod.boolean(),
28642
+ "supports_marks": zod.boolean(),
28643
+ "supports_timescale_marks": zod.boolean(),
28644
+ "supports_time": zod.boolean(),
28645
+ "supported_resolutions": zod.array(zod.string()),
28646
+ "exchanges": zod.array(zod.object({
28647
+ "value": zod.string(),
28648
+ "name": zod.string(),
28649
+ "desc": zod.string()
28650
+ })),
28651
+ "symbols_types": zod.array(zod.object({
28652
+ "name": zod.string(),
28653
+ "value": zod.string()
28654
+ }))
28824
28655
  });
28825
28656
  var GetUDFSymbolQueryParams = zod.object({
28826
- symbol: zod.string()
28657
+ "symbol": zod.string()
28827
28658
  });
28828
28659
  var GetUDFSymbolResponse = zod.object({
28829
- name: zod.string(),
28830
- ticker: zod.string(),
28831
- description: zod.string(),
28832
- type: zod.string(),
28833
- session: zod.string(),
28834
- exchange: zod.string(),
28835
- listed_exchange: zod.string(),
28836
- timezone: zod.string(),
28837
- minmov: zod.number(),
28838
- pricescale: zod.number(),
28839
- has_intraday: zod.boolean(),
28840
- has_daily: zod.boolean(),
28841
- has_no_volume: zod.boolean().describe("Whether the symbol has volume data"),
28842
- volume_precision: zod.number().describe("Number of decimal places for volume"),
28843
- data_status: zod.enum(["streaming", "endofday", "pulsed", "delayed_streaming"]).describe("Data feed status"),
28844
- currency_code: zod.string().describe("Quote currency code"),
28845
- supported_resolutions: zod.array(zod.string())
28660
+ "name": zod.string(),
28661
+ "ticker": zod.string(),
28662
+ "description": zod.string(),
28663
+ "type": zod.string(),
28664
+ "session": zod.string(),
28665
+ "exchange": zod.string(),
28666
+ "listed_exchange": zod.string(),
28667
+ "timezone": zod.string(),
28668
+ "minmov": zod.number(),
28669
+ "pricescale": zod.number(),
28670
+ "has_intraday": zod.boolean(),
28671
+ "has_daily": zod.boolean(),
28672
+ "has_no_volume": zod.boolean().describe("Whether the symbol has volume data"),
28673
+ "volume_precision": zod.number().describe("Number of decimal places for volume"),
28674
+ "data_status": zod.enum(["streaming", "endofday", "pulsed", "delayed_streaming"]).describe("Data feed status"),
28675
+ "currency_code": zod.string().describe("Quote currency code"),
28676
+ "supported_resolutions": zod.array(zod.string())
28846
28677
  });
28847
28678
  var SearchUDFSymbolsQueryParams = zod.object({
28848
- query: zod.string().optional().describe("Text typed by the user in the search box"),
28849
- type: zod.string().optional().describe("Symbol type filter"),
28850
- exchange: zod.string().optional().describe("Exchange filter"),
28851
- limit: zod.number().min(1).optional().describe("Maximum number of results (default 30)")
28679
+ "query": zod.string().optional().describe("Text typed by the user in the search box"),
28680
+ "type": zod.string().optional().describe("Symbol type filter"),
28681
+ "exchange": zod.string().optional().describe("Exchange filter"),
28682
+ "limit": zod.number().min(1).optional().describe("Maximum number of results (default 30)")
28852
28683
  });
28853
28684
  var SearchUDFSymbolsResponseItem = zod.object({
28854
- symbol: zod.string(),
28855
- full_name: zod.string(),
28856
- description: zod.string(),
28857
- exchange: zod.string(),
28858
- ticker: zod.string(),
28859
- type: zod.string()
28685
+ "symbol": zod.string(),
28686
+ "full_name": zod.string(),
28687
+ "description": zod.string(),
28688
+ "exchange": zod.string(),
28689
+ "ticker": zod.string(),
28690
+ "type": zod.string()
28860
28691
  });
28861
28692
  var SearchUDFSymbolsResponse = zod.array(SearchUDFSymbolsResponseItem);
28862
28693
  var getUDFHistoryQueryCountbackMax = 1e3;
28863
28694
  var GetUDFHistoryQueryParams = zod.object({
28864
- symbol: zod.string(),
28865
- resolution: zod.enum(["1", "5", "15", "30", "60", "1D", "1W", "1M"]),
28866
- from: zod.number().describe("Unix seconds"),
28867
- to: zod.number().describe("Unix seconds"),
28868
- countback: zod.number().min(1).max(getUDFHistoryQueryCountbackMax).optional().describe("Values above 1000 are clamped to 1000 server-side.")
28695
+ "symbol": zod.string(),
28696
+ "resolution": zod.enum(["1", "5", "15", "30", "60", "1D", "1W", "1M"]),
28697
+ "from": zod.number().describe("Unix seconds"),
28698
+ "to": zod.number().describe("Unix seconds"),
28699
+ "countback": zod.number().min(1).max(getUDFHistoryQueryCountbackMax).optional().describe("Values above 1000 are clamped to 1000 server-side.")
28869
28700
  });
28870
28701
  var GetUDFHistoryResponse = zod.object({
28871
- s: zod.enum(["ok", "no_data", "error"]),
28872
- errmsg: zod.string().optional().describe('Error message (present only when s = "error")'),
28873
- t: zod.array(zod.number()).optional(),
28874
- o: zod.array(zod.number()).optional(),
28875
- h: zod.array(zod.number()).optional(),
28876
- l: zod.array(zod.number()).optional(),
28877
- c: zod.array(zod.number()).optional(),
28878
- v: zod.array(zod.number()).optional(),
28879
- nextTime: zod.number().optional().describe('Unix seconds of next available bar (when s = "no_data")')
28702
+ "s": zod.enum(["ok", "no_data", "error"]),
28703
+ "errmsg": zod.string().optional().describe('Error message (present only when s = "error")'),
28704
+ "t": zod.array(zod.number()).optional(),
28705
+ "o": zod.array(zod.number()).optional(),
28706
+ "h": zod.array(zod.number()).optional(),
28707
+ "l": zod.array(zod.number()).optional(),
28708
+ "c": zod.array(zod.number()).optional(),
28709
+ "v": zod.array(zod.number()).optional(),
28710
+ "nextTime": zod.number().optional().describe('Unix seconds of next available bar (when s = "no_data")')
28880
28711
  });
28881
28712
  var GetUDFQuotesQueryParams = zod.object({
28882
- symbols: zod.string().describe("Comma-separated list of symbols, at most 100 (400 above that)")
28713
+ "symbols": zod.string().describe("Comma-separated list of symbols, at most 100 (400 above that)")
28883
28714
  });
28884
28715
  var GetUDFQuotesResponse = zod.object({
28885
- s: zod.enum(["ok", "error"]),
28886
- errmsg: zod.string().optional(),
28887
- d: zod.array(
28888
- zod.object({
28889
- s: zod.enum(["ok", "error"]).describe("Per-symbol status"),
28890
- n: zod.string().describe("Full symbol name"),
28891
- v: zod.object({
28892
- ch: zod.number().nullish().describe("Price change"),
28893
- chp: zod.number().nullish().describe("Change percentage"),
28894
- short_name: zod.string().optional(),
28895
- exchange: zod.string().optional(),
28896
- description: zod.string().optional(),
28897
- lp: zod.number().nullish().describe("Last price"),
28898
- ask: zod.number().nullish(),
28899
- bid: zod.number().nullish(),
28900
- open_price: zod.number().nullish(),
28901
- high_price: zod.number().nullish(),
28902
- low_price: zod.number().nullish(),
28903
- prev_close_price: zod.number().nullish(),
28904
- volume: zod.number().nullish()
28905
- })
28716
+ "s": zod.enum(["ok", "error"]),
28717
+ "errmsg": zod.string().optional(),
28718
+ "d": zod.array(zod.object({
28719
+ "s": zod.enum(["ok", "error"]).describe("Per-symbol status"),
28720
+ "n": zod.string().describe("Full symbol name"),
28721
+ "v": zod.object({
28722
+ "ch": zod.number().nullish().describe("Price change"),
28723
+ "chp": zod.number().nullish().describe("Change percentage"),
28724
+ "short_name": zod.string().optional(),
28725
+ "exchange": zod.string().optional(),
28726
+ "description": zod.string().optional(),
28727
+ "lp": zod.number().nullish().describe("Last price"),
28728
+ "ask": zod.number().nullish(),
28729
+ "bid": zod.number().nullish(),
28730
+ "open_price": zod.number().nullish(),
28731
+ "high_price": zod.number().nullish(),
28732
+ "low_price": zod.number().nullish(),
28733
+ "prev_close_price": zod.number().nullish(),
28734
+ "volume": zod.number().nullish()
28906
28735
  })
28907
- )
28736
+ }))
28908
28737
  });
28909
28738
  var GetUDFMarksQueryParams = zod.object({
28910
- symbol: zod.string(),
28911
- from: zod.number().describe("Left boundary of the visible range (Unix seconds)"),
28912
- to: zod.number().describe("Right boundary of the visible range (Unix seconds)"),
28913
- resolution: zod.string().optional().describe("Bar resolution (e.g. 1, 5, 15, 30, 60, 1D, 1W, 1M)")
28739
+ "symbol": zod.string(),
28740
+ "from": zod.number().describe("Left boundary of the visible range (Unix seconds)"),
28741
+ "to": zod.number().describe("Right boundary of the visible range (Unix seconds)"),
28742
+ "resolution": zod.string().optional().describe("Bar resolution (e.g. 1, 5, 15, 30, 60, 1D, 1W, 1M)")
28914
28743
  });
28915
28744
  var GetUDFMarksResponse = zod.object({
28916
- id: zod.array(zod.number()),
28917
- time: zod.array(zod.number()),
28918
- color: zod.array(zod.string()),
28919
- text: zod.array(zod.string()),
28920
- label: zod.array(zod.string()),
28921
- labelFontColor: zod.array(zod.string()),
28922
- minSize: zod.array(zod.number())
28745
+ "id": zod.array(zod.number()),
28746
+ "time": zod.array(zod.number()),
28747
+ "color": zod.array(zod.string()),
28748
+ "text": zod.array(zod.string()),
28749
+ "label": zod.array(zod.string()),
28750
+ "labelFontColor": zod.array(zod.string()),
28751
+ "minSize": zod.array(zod.number())
28923
28752
  });
28924
28753
  var GetUDFTimescaleMarksQueryParams = zod.object({
28925
- symbol: zod.string(),
28926
- from: zod.number().describe("Left boundary of the visible range (Unix seconds)"),
28927
- to: zod.number().describe("Right boundary of the visible range (Unix seconds)"),
28928
- resolution: zod.string().optional().describe("Bar resolution (e.g. 1, 5, 15, 30, 60, 1D, 1W, 1M)")
28754
+ "symbol": zod.string(),
28755
+ "from": zod.number().describe("Left boundary of the visible range (Unix seconds)"),
28756
+ "to": zod.number().describe("Right boundary of the visible range (Unix seconds)"),
28757
+ "resolution": zod.string().optional().describe("Bar resolution (e.g. 1, 5, 15, 30, 60, 1D, 1W, 1M)")
28929
28758
  });
28930
28759
  var GetUDFTimescaleMarksResponseItem = zod.object({
28931
- id: zod.number(),
28932
- time: zod.number(),
28933
- color: zod.string(),
28934
- label: zod.string().describe("Single character displayed in a circle"),
28935
- tooltip: zod.string()
28760
+ "id": zod.number(),
28761
+ "time": zod.number(),
28762
+ "color": zod.string(),
28763
+ "label": zod.string().describe("Single character displayed in a circle"),
28764
+ "tooltip": zod.string()
28936
28765
  });
28937
28766
  var GetUDFTimescaleMarksResponse = zod.array(GetUDFTimescaleMarksResponseItem);
28938
28767
 
@@ -28940,9 +28769,6 @@ var GetUDFTimescaleMarksResponse = zod.array(GetUDFTimescaleMarksResponseItem);
28940
28769
  function createDexWs(url, options) {
28941
28770
  return new DexWsClient(url, options);
28942
28771
  }
28943
-
28944
- // src/index.ts
28945
- var SDK_VERSION = "0.7.1";
28946
28772
  // Annotate the CommonJS export names for ESM import in node:
28947
28773
  0 && (module.exports = {
28948
28774
  AGENT_DEFAULTS,
@@ -29040,6 +28866,7 @@ var SDK_VERSION = "0.7.1";
29040
28866
  TxError,
29041
28867
  TxNotConfirmedError,
29042
28868
  TxSimulationError,
28869
+ USER_AGENT,
29043
28870
  ValidatorStatus,
29044
28871
  WebSocketError,
29045
28872
  WithdrawRewardsPartialError,
@@ -29128,6 +28955,10 @@ var SDK_VERSION = "0.7.1";
29128
28955
  getOrderResponseFilledRegExp,
29129
28956
  getOrderResponseInfoBlockHeightRegExp,
29130
28957
  getOrderResponseInfoRemainingDepositRegExp,
28958
+ getOrderResponseInfoTwapIdRegExp,
28959
+ getOrderResponseInfoTwapOnePriceToleranceRegExp,
28960
+ getOrderResponseInfoTwapOneTotalDepositRegExp,
28961
+ getOrderResponseInfoTwapOneWorstPriceRegExp,
29131
28962
  getOrderResponsePriceRegExp,
29132
28963
  getOrderResponseRemainingRegExp,
29133
28964
  getOrderbookQueryLimitDefault,
@@ -29196,6 +29027,10 @@ var SDK_VERSION = "0.7.1";
29196
29027
  listOrdersResponseFilledRegExp,
29197
29028
  listOrdersResponseInfoBlockHeightRegExp,
29198
29029
  listOrdersResponseInfoRemainingDepositRegExp,
29030
+ listOrdersResponseInfoTwapIdRegExp,
29031
+ listOrdersResponseInfoTwapOnePriceToleranceRegExp,
29032
+ listOrdersResponseInfoTwapOneTotalDepositRegExp,
29033
+ listOrdersResponseInfoTwapOneWorstPriceRegExp,
29199
29034
  listOrdersResponsePriceRegExp,
29200
29035
  listOrdersResponseRemainingRegExp,
29201
29036
  listTradesQueryBeforeIndexMax,