@polyester/sdk 0.24.0 → 0.25.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/CHANGELOG.md +20 -0
- package/README.md +18 -12
- package/dist/account-signer/create-polyester-account-signer.d.ts +9 -5
- package/dist/account-signer/create-polyester-account-signer.d.ts.map +1 -1
- package/dist/account-signer/create-polyester-account-signer.js +9 -5
- package/dist/account-signer/create-polyester-account-signer.js.map +1 -1
- package/dist/account-signer/types.d.ts +10 -4
- package/dist/account-signer/types.d.ts.map +1 -1
- package/dist/account-signer/types.js.map +1 -1
- package/dist/core-client.d.ts +3 -0
- package/dist/core-client.d.ts.map +1 -1
- package/dist/core-client.js +23 -45
- package/dist/core-client.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +7 -4
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/claims/v1/claims_pb.d.ts +313 -0
- package/dist/gen/claims/v1/claims_pb.d.ts.map +1 -0
- package/dist/gen/claims/v1/claims_pb.js +135 -0
- package/dist/gen/claims/v1/claims_pb.js.map +1 -0
- package/dist/gen/index.d.ts +2 -1
- package/dist/gen/index.js +2 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +50 -3
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +55 -43
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +10 -0
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +3 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/realtime/client.js +45 -26
- package/dist/realtime/client.js.map +1 -1
- package/dist/services/accounts/accounts.schemas.d.ts +2 -2
- package/dist/services/accounts/accounts.schemas.d.ts.map +1 -1
- package/dist/services/accounts/accounts.schemas.js +3 -3
- package/dist/services/accounts/accounts.schemas.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +67 -68
- package/dist/services/address-book/address-book.schemas.d.ts.map +1 -1
- package/dist/services/address-book/address-book.schemas.js +11 -13
- package/dist/services/address-book/address-book.schemas.js.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.d.ts +1 -2
- package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.js +4 -9
- package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
- package/dist/services/auth/account-signer-auth.js +1 -1
- package/dist/services/auth/account-signer-auth.js.map +1 -1
- package/dist/services/auth/auth.d.ts +2 -3
- package/dist/services/auth/auth.d.ts.map +1 -1
- package/dist/services/auth/auth.js +4 -2
- package/dist/services/auth/auth.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +3 -3
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +7 -12
- package/dist/services/balances/balances.schemas.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts +3 -3
- package/dist/services/candles/candles.schemas.d.ts.map +1 -1
- package/dist/services/candles/candles.schemas.js +5 -6
- package/dist/services/candles/candles.schemas.js.map +1 -1
- package/dist/services/chain-analytics/chain-analytics.schemas.d.ts +3 -3
- package/dist/services/chain-analytics/chain-analytics.schemas.d.ts.map +1 -1
- package/dist/services/chain-analytics/chain-analytics.schemas.js +2 -3
- package/dist/services/chain-analytics/chain-analytics.schemas.js.map +1 -1
- package/dist/services/claims/claims.codecs.d.ts +8 -0
- package/dist/services/claims/claims.codecs.d.ts.map +1 -0
- package/dist/services/claims/claims.codecs.js +17 -0
- package/dist/services/claims/claims.codecs.js.map +1 -0
- package/dist/services/claims/claims.d.ts +19 -0
- package/dist/services/claims/claims.d.ts.map +1 -0
- package/dist/services/claims/claims.js +30 -0
- package/dist/services/claims/claims.js.map +1 -0
- package/dist/services/claims/claims.schemas.d.ts +122 -0
- package/dist/services/claims/claims.schemas.d.ts.map +1 -0
- package/dist/services/claims/claims.schemas.js +47 -0
- package/dist/services/claims/claims.schemas.js.map +1 -0
- package/dist/services/claims/claims.types.d.ts +3 -0
- package/dist/services/claims/index.d.ts +5 -0
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/heatmap/heatmap.schemas.d.ts.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.js +10 -10
- package/dist/services/heatmap/heatmap.schemas.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.js +1 -5
- package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +90 -90
- package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +10 -11
- package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.js +3 -3
- package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
- package/dist/services/mfa/mfa.schemas.d.ts +11 -11
- package/dist/services/mfa/mfa.schemas.d.ts.map +1 -1
- package/dist/services/mfa/mfa.schemas.js +4 -5
- package/dist/services/mfa/mfa.schemas.js.map +1 -1
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-enums.codecs.js +2 -1
- package/dist/services/orders/order-enums.codecs.js.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +4 -5
- package/dist/services/orders/order-errors.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +110 -32
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-batch.schemas.js +9 -10
- package/dist/services/orders/orders-batch.schemas.js.map +1 -1
- package/dist/services/orders/orders-input.schemas.d.ts +111 -8
- package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-input.schemas.js +20 -4
- package/dist/services/orders/orders-input.schemas.js.map +1 -1
- package/dist/services/orders/orders-modify.schemas.d.ts +2 -2
- package/dist/services/orders/orders-modify.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-modify.schemas.js +3 -3
- package/dist/services/orders/orders-modify.schemas.js.map +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +48 -32
- package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-output.schemas.js +16 -16
- package/dist/services/orders/orders-output.schemas.js.map +1 -1
- package/dist/services/orders/orders-risk.schemas.d.ts +0 -1
- package/dist/services/orders/orders-risk.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-risk.schemas.js +4 -4
- package/dist/services/orders/orders-risk.schemas.js.map +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +4 -4
- package/dist/services/policies/shared.codecs.js +3 -3
- package/dist/services/policies/shared.codecs.js.map +1 -1
- package/dist/services/policies/shared.d.ts +0 -1
- package/dist/services/policies/shared.d.ts.map +1 -1
- package/dist/services/policies/shared.js +2 -3
- package/dist/services/policies/shared.js.map +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +2 -2
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts.map +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +2 -5
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js.map +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.d.ts +6 -7
- package/dist/services/rate-limits/rate-limits.schemas.d.ts.map +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.js +2 -3
- package/dist/services/rate-limits/rate-limits.schemas.js.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.js +4 -4
- package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +23 -24
- package/dist/services/subaccounts/subaccounts.schemas.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.js +10 -12
- package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trades/trades.schemas.d.ts.map +1 -1
- package/dist/services/trades/trades.schemas.js +4 -8
- package/dist/services/trades/trades.schemas.js.map +1 -1
- package/dist/services/transfers/transfers.schemas.d.ts +3 -4
- package/dist/services/transfers/transfers.schemas.d.ts.map +1 -1
- package/dist/services/transfers/transfers.schemas.js +5 -10
- package/dist/services/transfers/transfers.schemas.js.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +56 -58
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +34 -36
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/services/whiteboard/whiteboard.schemas.d.ts +42 -42
- package/dist/services/whiteboard/whiteboard.schemas.d.ts.map +1 -1
- package/dist/services/whiteboard/whiteboard.schemas.js +9 -10
- package/dist/services/whiteboard/whiteboard.schemas.js.map +1 -1
- package/dist/shared/proto-enum-codec.js +11 -6
- package/dist/shared/proto-enum-codec.js.map +1 -1
- package/dist/shared/rate-limit.schemas.d.ts +4 -5
- package/dist/shared/rate-limit.schemas.d.ts.map +1 -1
- package/dist/shared/rate-limit.schemas.js +41 -46
- package/dist/shared/rate-limit.schemas.js.map +1 -1
- package/dist/shared/schemas.js +5 -1
- package/dist/shared/schemas.js.map +1 -1
- package/dist/shared/transports.d.ts +5 -1
- package/dist/shared/transports.d.ts.map +1 -1
- package/dist/shared/transports.js.map +1 -1
- package/dist/utils/timestamp.js +8 -1
- package/dist/utils/timestamp.js.map +1 -1
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +2 -0
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-enums.codecs.js","names":[],"sources":["../../../src/services/orders/order-enums.codecs.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const ORDER_SIDE_VALUES = [\"buy\", \"sell\"] as const;\nexport type OrderSideValue = (typeof ORDER_SIDE_VALUES)[number];\n\nexport const ORDER_TYPE_VALUES = [\"limit\", \"market\"] as const;\nexport type OrderTypeValue = (typeof ORDER_TYPE_VALUES)[number];\n\nexport const TIME_IN_FORCE_VALUES = [\"gtc\", \"ioc\", \"fok\"] as const;\nexport type TimeInForceValue = (typeof TIME_IN_FORCE_VALUES)[number];\nexport const TIME_IN_FORCE_OUTPUT_VALUES = [\"GTC\", \"IOC\", \"FOK\"] as const;\nexport type TimeInForceOutputValue = (typeof TIME_IN_FORCE_OUTPUT_VALUES)[number];\n\nexport const FEE_ASSET_VALUES = [\"quote\", \"base\"] as const;\nexport type FeeAssetValue = (typeof FEE_ASSET_VALUES)[number];\n\nexport const SELF_TRADE_PREVENTION_MODE_VALUES = [\n \"expire_taker\",\n \"expire_maker\",\n \"expire_both\",\n] as const;\nexport type SelfTradePreventionModeValue = (typeof SELF_TRADE_PREVENTION_MODE_VALUES)[number];\n\nexport const TRIGGER_PRICE_SOURCE_VALUES = [\"last\", \"index\", \"mark\"] as const;\nexport type TriggerPriceSourceValue = (typeof TRIGGER_PRICE_SOURCE_VALUES)[number];\n\nexport const OrderSideCodec = {\n inputToProto: {\n buy: ProtoWrite.Side.BUY,\n sell: ProtoWrite.Side.SELL,\n } satisfies InputToProto<OrderSideValue, ProtoWrite.Side>,\n protoToOutput: {\n [ProtoWrite.Side.SIDE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.Side.BUY]: \"buy\",\n [ProtoWrite.Side.SELL]: \"sell\",\n } satisfies ProtoToOutput<ProtoWrite.Side, OrderSideValue>,\n} as const;\n\nexport const OrderTypeCodec = {\n inputToProto: {\n limit: ProtoWrite.OrderType.LIMIT,\n market: ProtoWrite.OrderType.MARKET,\n } satisfies InputToProto<OrderTypeValue, ProtoWrite.OrderType>,\n protoToOutput: {\n [ProtoWrite.OrderType.ORDER_TYPE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.OrderType.LIMIT]: \"limit\",\n [ProtoWrite.OrderType.MARKET]: \"market\",\n } satisfies ProtoToOutput<ProtoWrite.OrderType, OrderTypeValue>,\n} as const;\n\nexport const TimeInForceCodec = {\n inputToProto: {\n gtc: ProtoWrite.TimeInForce.GTC,\n ioc: ProtoWrite.TimeInForce.IOC,\n fok: ProtoWrite.TimeInForce.FOK,\n } satisfies InputToProto<TimeInForceValue, ProtoWrite.TimeInForce>,\n protoToOutput: {\n [ProtoWrite.TimeInForce.TIME_IN_FORCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TimeInForce.GTC]: \"GTC\",\n [ProtoWrite.TimeInForce.IOC]: \"IOC\",\n [ProtoWrite.TimeInForce.FOK]: \"FOK\",\n } satisfies ProtoToOutput<ProtoWrite.TimeInForce, TimeInForceOutputValue>,\n} as const;\n\nexport const FeeAssetCodec = {\n inputToProto: {\n quote: ProtoWrite.FeeAsset.QUOTE,\n base: ProtoWrite.FeeAsset.BASE,\n } satisfies InputToProto<FeeAssetValue, ProtoWrite.FeeAsset>,\n protoToOutput: {\n [ProtoWrite.FeeAsset.FEE_ASSET_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.FeeAsset.QUOTE]: \"quote\",\n [ProtoWrite.FeeAsset.BASE]: \"base\",\n } satisfies ProtoToOutput<ProtoWrite.FeeAsset, FeeAssetValue>,\n} as const;\n\nexport const SelfTradePreventionModeCodec = {\n inputToProto: {\n expire_taker: ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER,\n expire_maker: ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER,\n expire_both: ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH,\n } satisfies InputToProto<SelfTradePreventionModeValue, ProtoWrite.SelfTradePreventionMode>,\n protoToOutput: {\n [ProtoWrite.SelfTradePreventionMode.SELF_TRADE_PREVENTION_MODE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER]: \"expire_taker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER]: \"expire_maker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH]: \"expire_both\",\n } satisfies ProtoToOutput<ProtoWrite.SelfTradePreventionMode, SelfTradePreventionModeValue>,\n} as const;\n\nexport const TriggerPriceSourceCodec = {\n inputToProto: {\n last: ProtoWrite.TriggerPriceSource.LAST_PRICE,\n index: ProtoWrite.TriggerPriceSource.INDEX_PRICE,\n mark: ProtoWrite.TriggerPriceSource.MARK_PRICE,\n } satisfies InputToProto<TriggerPriceSourceValue, ProtoWrite.TriggerPriceSource>,\n protoToOutput: {\n [ProtoWrite.TriggerPriceSource.TRIGGER_PRICE_SOURCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TriggerPriceSource.LAST_PRICE]: \"last\",\n [ProtoWrite.TriggerPriceSource.INDEX_PRICE]: \"index\",\n [ProtoWrite.TriggerPriceSource.MARK_PRICE]: \"mark\",\n } satisfies ProtoToOutput<ProtoWrite.TriggerPriceSource, TriggerPriceSourceValue>,\n} as const;\n"],"mappings":";;AAGA,MAAa,oBAAoB,CAAC,OAAO,MAAM;AAW/C,MAAa,mBAAmB,CAAC,SAAS,MAAM;AAGhD,MAAa,oCAAoC;CAC7C;CACA;CACA;AACJ;AAMA,MAAa,iBAAiB;CAC1B,cAAc;EACV,KAAA;EACA,MAAA;CACJ;CACA,eAAe;GACyB,IAAA;GACb,IAAA;GACC,IAAA;CAC5B;AACJ;AAEA,MAAa,iBAAiB;CAC1B,cAAc;EACV,OAAA;EACA,QAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACjB,IAAA;GACC,IAAA;CACnC;AACJ;AAEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,KAAA;EACA,KAAA;EACA,KAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACA,IAAA;CAClC;AACJ;AAEA,MAAa,gBAAgB;CACzB,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACkC,IAAA;GAChB,IAAA;GACD,IAAA;CAChC;AACJ;AAEA,MAAa,+BAA+B;CACxC,cAAc;EACV,cAAA;EACA,cAAA;EACA,aAAA;CACJ;CACA,eAAe;GACkE,IAAA;GAC1B,IAAA;GACA,IAAA;GACD,IAAA;CACtD;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,MAAA;EACA,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACuD,IAAA;GACtB,IAAA;GACC,IAAA;GACD,IAAA;CAChD;AACJ"}
|
|
1
|
+
{"version":3,"file":"order-enums.codecs.js","names":[],"sources":["../../../src/services/orders/order-enums.codecs.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const ORDER_SIDE_VALUES = [\"buy\", \"sell\"] as const;\nexport type OrderSideValue = (typeof ORDER_SIDE_VALUES)[number];\n\nexport const ORDER_TYPE_VALUES = [\"limit\", \"market\"] as const;\nexport type OrderTypeValue = (typeof ORDER_TYPE_VALUES)[number];\n\nexport const TIME_IN_FORCE_VALUES = [\"gtc\", \"ioc\", \"fok\"] as const;\nexport type TimeInForceValue = (typeof TIME_IN_FORCE_VALUES)[number];\nexport const TIME_IN_FORCE_OUTPUT_VALUES = [\"GTC\", \"IOC\", \"FOK\", \"GTD\"] as const;\nexport type TimeInForceOutputValue = (typeof TIME_IN_FORCE_OUTPUT_VALUES)[number];\n\nexport const FEE_ASSET_VALUES = [\"quote\", \"base\"] as const;\nexport type FeeAssetValue = (typeof FEE_ASSET_VALUES)[number];\n\nexport const SELF_TRADE_PREVENTION_MODE_VALUES = [\n \"expire_taker\",\n \"expire_maker\",\n \"expire_both\",\n] as const;\nexport type SelfTradePreventionModeValue = (typeof SELF_TRADE_PREVENTION_MODE_VALUES)[number];\n\nexport const TRIGGER_PRICE_SOURCE_VALUES = [\"last\", \"index\", \"mark\"] as const;\nexport type TriggerPriceSourceValue = (typeof TRIGGER_PRICE_SOURCE_VALUES)[number];\n\nexport const OrderSideCodec = {\n inputToProto: {\n buy: ProtoWrite.Side.BUY,\n sell: ProtoWrite.Side.SELL,\n } satisfies InputToProto<OrderSideValue, ProtoWrite.Side>,\n protoToOutput: {\n [ProtoWrite.Side.SIDE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.Side.BUY]: \"buy\",\n [ProtoWrite.Side.SELL]: \"sell\",\n } satisfies ProtoToOutput<ProtoWrite.Side, OrderSideValue>,\n} as const;\n\nexport const OrderTypeCodec = {\n inputToProto: {\n limit: ProtoWrite.OrderType.LIMIT,\n market: ProtoWrite.OrderType.MARKET,\n } satisfies InputToProto<OrderTypeValue, ProtoWrite.OrderType>,\n protoToOutput: {\n [ProtoWrite.OrderType.ORDER_TYPE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.OrderType.LIMIT]: \"limit\",\n [ProtoWrite.OrderType.MARKET]: \"market\",\n } satisfies ProtoToOutput<ProtoWrite.OrderType, OrderTypeValue>,\n} as const;\n\nexport const TimeInForceCodec = {\n inputToProto: {\n gtc: ProtoWrite.TimeInForce.GTC,\n ioc: ProtoWrite.TimeInForce.IOC,\n fok: ProtoWrite.TimeInForce.FOK,\n } satisfies InputToProto<TimeInForceValue, ProtoWrite.TimeInForce>,\n protoToOutput: {\n [ProtoWrite.TimeInForce.TIME_IN_FORCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TimeInForce.GTC]: \"GTC\",\n [ProtoWrite.TimeInForce.IOC]: \"IOC\",\n [ProtoWrite.TimeInForce.FOK]: \"FOK\",\n [ProtoWrite.TimeInForce.GTD]: \"GTD\",\n } satisfies ProtoToOutput<ProtoWrite.TimeInForce, TimeInForceOutputValue>,\n} as const;\n\nexport const FeeAssetCodec = {\n inputToProto: {\n quote: ProtoWrite.FeeAsset.QUOTE,\n base: ProtoWrite.FeeAsset.BASE,\n } satisfies InputToProto<FeeAssetValue, ProtoWrite.FeeAsset>,\n protoToOutput: {\n [ProtoWrite.FeeAsset.FEE_ASSET_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.FeeAsset.QUOTE]: \"quote\",\n [ProtoWrite.FeeAsset.BASE]: \"base\",\n } satisfies ProtoToOutput<ProtoWrite.FeeAsset, FeeAssetValue>,\n} as const;\n\nexport const SelfTradePreventionModeCodec = {\n inputToProto: {\n expire_taker: ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER,\n expire_maker: ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER,\n expire_both: ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH,\n } satisfies InputToProto<SelfTradePreventionModeValue, ProtoWrite.SelfTradePreventionMode>,\n protoToOutput: {\n [ProtoWrite.SelfTradePreventionMode.SELF_TRADE_PREVENTION_MODE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER]: \"expire_taker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER]: \"expire_maker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH]: \"expire_both\",\n } satisfies ProtoToOutput<ProtoWrite.SelfTradePreventionMode, SelfTradePreventionModeValue>,\n} as const;\n\nexport const TriggerPriceSourceCodec = {\n inputToProto: {\n last: ProtoWrite.TriggerPriceSource.LAST_PRICE,\n index: ProtoWrite.TriggerPriceSource.INDEX_PRICE,\n mark: ProtoWrite.TriggerPriceSource.MARK_PRICE,\n } satisfies InputToProto<TriggerPriceSourceValue, ProtoWrite.TriggerPriceSource>,\n protoToOutput: {\n [ProtoWrite.TriggerPriceSource.TRIGGER_PRICE_SOURCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TriggerPriceSource.LAST_PRICE]: \"last\",\n [ProtoWrite.TriggerPriceSource.INDEX_PRICE]: \"index\",\n [ProtoWrite.TriggerPriceSource.MARK_PRICE]: \"mark\",\n } satisfies ProtoToOutput<ProtoWrite.TriggerPriceSource, TriggerPriceSourceValue>,\n} as const;\n"],"mappings":";;AAGA,MAAa,oBAAoB,CAAC,OAAO,MAAM;AAW/C,MAAa,mBAAmB,CAAC,SAAS,MAAM;AAGhD,MAAa,oCAAoC;CAC7C;CACA;CACA;AACJ;AAMA,MAAa,iBAAiB;CAC1B,cAAc;EACV,KAAA;EACA,MAAA;CACJ;CACA,eAAe;GACyB,IAAA;GACb,IAAA;GACC,IAAA;CAC5B;AACJ;AAEA,MAAa,iBAAiB;CAC1B,cAAc;EACV,OAAA;EACA,QAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACjB,IAAA;GACC,IAAA;CACnC;AACJ;AAEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,KAAA;EACA,KAAA;EACA,KAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACA,IAAA;GACA,IAAA;CAClC;AACJ;AAEA,MAAa,gBAAgB;CACzB,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACkC,IAAA;GAChB,IAAA;GACD,IAAA;CAChC;AACJ;AAEA,MAAa,+BAA+B;CACxC,cAAc;EACV,cAAA;EACA,cAAA;EACA,aAAA;CACJ;CACA,eAAe;GACkE,IAAA;GAC1B,IAAA;GACA,IAAA;GACD,IAAA;CACtD;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,MAAA;EACA,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACuD,IAAA;GACtB,IAAA;GACC,IAAA;GACD,IAAA;CAChD;AACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FailureReason, LimiterScope, PolicyClass, RefillModel } from "../../gen/polyester/ratelimit/v1/types_pb.js";
|
|
2
1
|
import { ErrorCode } from "../../gen/orders/v1/orders_pb.js";
|
|
3
2
|
import * as v from "valibot";
|
|
4
3
|
//#region src/services/orders/order-errors.schemas.d.ts
|
|
@@ -11,15 +10,15 @@ declare const OrderErrorDetailSchema: v.ObjectSchema<{
|
|
|
11
10
|
readonly message: v.StringSchema<undefined>;
|
|
12
11
|
}, undefined>, undefined>;
|
|
13
12
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
14
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
13
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
15
14
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
16
15
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
17
16
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
18
17
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
19
18
|
readonly operationId: v.StringSchema<undefined>;
|
|
20
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
21
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
22
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
19
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
20
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
21
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
23
22
|
}, undefined>, undefined>;
|
|
24
23
|
}, undefined>;
|
|
25
24
|
type OrderErrorDetail = v.InferOutput<typeof OrderErrorDetailSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-errors.schemas.d.ts","names":[],"sources":["../../../src/services/orders/order-errors.schemas.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"order-errors.schemas.d.ts","names":[],"sources":["../../../src/services/orders/order-errors.schemas.ts"],"mappings":";;;KAIY,8BAA8B;cAU7B,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;KAevB,mBAAmB,EAAE,mBAAmB"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BatchCancelResultItem_Status, BatchReplaceAdmissionStatus, BatchReplaceItemAdmissionStatus, CancelAllAfterResponse_Status, ErrorCode, FeeAsset, LimitFok, LimitGtc, LimitIoc, MarketIoc, RiskLimitGtc, RiskMarketIoc, SelfTradePreventionMode, Side } from "../../gen/orders/v1/orders_pb.js";
|
|
3
|
-
import { BatchReplacePhase, OrderStatus } from "../../gen/orders/v1/orders_read_pb.js";
|
|
1
|
+
import { ErrorCode, FeeAsset, LimitFok, LimitGtc, LimitGtd, LimitIoc, MarketIoc, RiskLimitGtc, RiskMarketIoc, SelfTradePreventionMode, Side } from "../../gen/orders/v1/orders_pb.js";
|
|
4
2
|
import { AccountScopeInputEntries } from "../../shared/account-scope.js";
|
|
5
3
|
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
6
4
|
import { createRequiredRiskPolicyInputSchema } from "./orders-risk.schemas.js";
|
|
@@ -31,7 +29,7 @@ declare const CancelAllAfterInputSchema: v.SchemaWithPipe<readonly [v.StrictObje
|
|
|
31
29
|
}>]>;
|
|
32
30
|
type CancelAllAfterInput = v.InferInput<typeof CancelAllAfterInputSchema>;
|
|
33
31
|
declare const CancelAllAfterResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
34
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
32
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "armed">]>;
|
|
35
33
|
readonly effectiveTimeoutSec: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
36
34
|
readonly expiresAtTsNs: v.BigintSchema<undefined>;
|
|
37
35
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
@@ -94,6 +92,19 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
94
92
|
}, {
|
|
95
93
|
case: "limitGtc";
|
|
96
94
|
value: LimitGtc;
|
|
95
|
+
}>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
96
|
+
readonly type: v.LiteralSchema<"limit_gtd", undefined>;
|
|
97
|
+
readonly price: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
98
|
+
readonly expireAt: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -9223372036854, undefined>, v.MaxValueAction<number, 9223372036854, undefined>]>;
|
|
99
|
+
readonly postOnly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
100
|
+
}, undefined>, v.TransformAction<{
|
|
101
|
+
type: "limit_gtd";
|
|
102
|
+
price: string;
|
|
103
|
+
expireAt: number;
|
|
104
|
+
postOnly: boolean;
|
|
105
|
+
}, {
|
|
106
|
+
case: "limitGtd";
|
|
107
|
+
value: LimitGtd;
|
|
97
108
|
}>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
98
109
|
readonly type: v.LiteralSchema<"limit_ioc", undefined>;
|
|
99
110
|
readonly price: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -617,6 +628,19 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
617
628
|
}, {
|
|
618
629
|
case: "limitGtc";
|
|
619
630
|
value: LimitGtc;
|
|
631
|
+
}>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
632
|
+
readonly type: v.LiteralSchema<"limit_gtd", undefined>;
|
|
633
|
+
readonly price: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
634
|
+
readonly expireAt: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -9223372036854, undefined>, v.MaxValueAction<number, 9223372036854, undefined>]>;
|
|
635
|
+
readonly postOnly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
636
|
+
}, undefined>, v.TransformAction<{
|
|
637
|
+
type: "limit_gtd";
|
|
638
|
+
price: string;
|
|
639
|
+
expireAt: number;
|
|
640
|
+
postOnly: boolean;
|
|
641
|
+
}, {
|
|
642
|
+
case: "limitGtd";
|
|
643
|
+
value: LimitGtd;
|
|
620
644
|
}>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
621
645
|
readonly type: v.LiteralSchema<"limit_ioc", undefined>;
|
|
622
646
|
readonly price: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -1108,6 +1132,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1108
1132
|
} | {
|
|
1109
1133
|
case: "limitGtc";
|
|
1110
1134
|
value: LimitGtc;
|
|
1135
|
+
} | {
|
|
1136
|
+
case: "limitGtd";
|
|
1137
|
+
value: LimitGtd;
|
|
1111
1138
|
} | {
|
|
1112
1139
|
case: "limitIoc";
|
|
1113
1140
|
value: LimitIoc;
|
|
@@ -1187,6 +1214,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1187
1214
|
} | {
|
|
1188
1215
|
case: "limitGtc";
|
|
1189
1216
|
value: LimitGtc;
|
|
1217
|
+
} | {
|
|
1218
|
+
case: "limitGtd";
|
|
1219
|
+
value: LimitGtd;
|
|
1190
1220
|
} | {
|
|
1191
1221
|
case: "limitIoc";
|
|
1192
1222
|
value: LimitIoc;
|
|
@@ -1266,6 +1296,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1266
1296
|
} | {
|
|
1267
1297
|
case: "limitGtc";
|
|
1268
1298
|
value: LimitGtc;
|
|
1299
|
+
} | {
|
|
1300
|
+
case: "limitGtd";
|
|
1301
|
+
value: LimitGtd;
|
|
1269
1302
|
} | {
|
|
1270
1303
|
case: "limitIoc";
|
|
1271
1304
|
value: LimitIoc;
|
|
@@ -1345,6 +1378,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1345
1378
|
} | {
|
|
1346
1379
|
case: "limitGtc";
|
|
1347
1380
|
value: LimitGtc;
|
|
1381
|
+
} | {
|
|
1382
|
+
case: "limitGtd";
|
|
1383
|
+
value: LimitGtd;
|
|
1348
1384
|
} | {
|
|
1349
1385
|
case: "limitIoc";
|
|
1350
1386
|
value: LimitIoc;
|
|
@@ -1424,6 +1460,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1424
1460
|
} | {
|
|
1425
1461
|
case: "limitGtc";
|
|
1426
1462
|
value: LimitGtc;
|
|
1463
|
+
} | {
|
|
1464
|
+
case: "limitGtd";
|
|
1465
|
+
value: LimitGtd;
|
|
1427
1466
|
} | {
|
|
1428
1467
|
case: "limitIoc";
|
|
1429
1468
|
value: LimitIoc;
|
|
@@ -1503,6 +1542,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1503
1542
|
} | {
|
|
1504
1543
|
case: "limitGtc";
|
|
1505
1544
|
value: LimitGtc;
|
|
1545
|
+
} | {
|
|
1546
|
+
case: "limitGtd";
|
|
1547
|
+
value: LimitGtd;
|
|
1506
1548
|
} | {
|
|
1507
1549
|
case: "limitIoc";
|
|
1508
1550
|
value: LimitIoc;
|
|
@@ -1646,6 +1688,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1646
1688
|
} | {
|
|
1647
1689
|
case: "limitGtc";
|
|
1648
1690
|
value: LimitGtc;
|
|
1691
|
+
} | {
|
|
1692
|
+
case: "limitGtd";
|
|
1693
|
+
value: LimitGtd;
|
|
1649
1694
|
} | {
|
|
1650
1695
|
case: "limitIoc";
|
|
1651
1696
|
value: LimitIoc;
|
|
@@ -1730,6 +1775,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1730
1775
|
} | {
|
|
1731
1776
|
case: "limitGtc";
|
|
1732
1777
|
value: LimitGtc;
|
|
1778
|
+
} | {
|
|
1779
|
+
case: "limitGtd";
|
|
1780
|
+
value: LimitGtd;
|
|
1733
1781
|
} | {
|
|
1734
1782
|
case: "limitIoc";
|
|
1735
1783
|
value: LimitIoc;
|
|
@@ -1814,6 +1862,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1814
1862
|
} | {
|
|
1815
1863
|
case: "limitGtc";
|
|
1816
1864
|
value: LimitGtc;
|
|
1865
|
+
} | {
|
|
1866
|
+
case: "limitGtd";
|
|
1867
|
+
value: LimitGtd;
|
|
1817
1868
|
} | {
|
|
1818
1869
|
case: "limitIoc";
|
|
1819
1870
|
value: LimitIoc;
|
|
@@ -1898,6 +1949,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1898
1949
|
} | {
|
|
1899
1950
|
case: "limitGtc";
|
|
1900
1951
|
value: LimitGtc;
|
|
1952
|
+
} | {
|
|
1953
|
+
case: "limitGtd";
|
|
1954
|
+
value: LimitGtd;
|
|
1901
1955
|
} | {
|
|
1902
1956
|
case: "limitIoc";
|
|
1903
1957
|
value: LimitIoc;
|
|
@@ -1982,6 +2036,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
1982
2036
|
} | {
|
|
1983
2037
|
case: "limitGtc";
|
|
1984
2038
|
value: LimitGtc;
|
|
2039
|
+
} | {
|
|
2040
|
+
case: "limitGtd";
|
|
2041
|
+
value: LimitGtd;
|
|
1985
2042
|
} | {
|
|
1986
2043
|
case: "limitIoc";
|
|
1987
2044
|
value: LimitIoc;
|
|
@@ -2066,6 +2123,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2066
2123
|
} | {
|
|
2067
2124
|
case: "limitGtc";
|
|
2068
2125
|
value: LimitGtc;
|
|
2126
|
+
} | {
|
|
2127
|
+
case: "limitGtd";
|
|
2128
|
+
value: LimitGtd;
|
|
2069
2129
|
} | {
|
|
2070
2130
|
case: "limitIoc";
|
|
2071
2131
|
value: LimitIoc;
|
|
@@ -2156,6 +2216,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2156
2216
|
} | {
|
|
2157
2217
|
case: "limitGtc";
|
|
2158
2218
|
value: LimitGtc;
|
|
2219
|
+
} | {
|
|
2220
|
+
case: "limitGtd";
|
|
2221
|
+
value: LimitGtd;
|
|
2159
2222
|
} | {
|
|
2160
2223
|
case: "limitIoc";
|
|
2161
2224
|
value: LimitIoc;
|
|
@@ -2240,6 +2303,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2240
2303
|
} | {
|
|
2241
2304
|
case: "limitGtc";
|
|
2242
2305
|
value: LimitGtc;
|
|
2306
|
+
} | {
|
|
2307
|
+
case: "limitGtd";
|
|
2308
|
+
value: LimitGtd;
|
|
2243
2309
|
} | {
|
|
2244
2310
|
case: "limitIoc";
|
|
2245
2311
|
value: LimitIoc;
|
|
@@ -2330,6 +2396,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2330
2396
|
} | {
|
|
2331
2397
|
case: "limitGtc";
|
|
2332
2398
|
value: LimitGtc;
|
|
2399
|
+
} | {
|
|
2400
|
+
case: "limitGtd";
|
|
2401
|
+
value: LimitGtd;
|
|
2333
2402
|
} | {
|
|
2334
2403
|
case: "limitIoc";
|
|
2335
2404
|
value: LimitIoc;
|
|
@@ -2414,6 +2483,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2414
2483
|
} | {
|
|
2415
2484
|
case: "limitGtc";
|
|
2416
2485
|
value: LimitGtc;
|
|
2486
|
+
} | {
|
|
2487
|
+
case: "limitGtd";
|
|
2488
|
+
value: LimitGtd;
|
|
2417
2489
|
} | {
|
|
2418
2490
|
case: "limitIoc";
|
|
2419
2491
|
value: LimitIoc;
|
|
@@ -2505,6 +2577,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2505
2577
|
} | {
|
|
2506
2578
|
case: "limitGtc";
|
|
2507
2579
|
value: LimitGtc;
|
|
2580
|
+
} | {
|
|
2581
|
+
case: "limitGtd";
|
|
2582
|
+
value: LimitGtd;
|
|
2508
2583
|
} | {
|
|
2509
2584
|
case: "limitIoc";
|
|
2510
2585
|
value: LimitIoc;
|
|
@@ -2589,6 +2664,9 @@ declare function createBatchCreateOrdersInputSchema(scales: SdkScales): v.Schema
|
|
|
2589
2664
|
} | {
|
|
2590
2665
|
case: "limitGtc";
|
|
2591
2666
|
value: LimitGtc;
|
|
2667
|
+
} | {
|
|
2668
|
+
case: "limitGtd";
|
|
2669
|
+
value: LimitGtd;
|
|
2592
2670
|
} | {
|
|
2593
2671
|
case: "limitIoc";
|
|
2594
2672
|
value: LimitIoc;
|
|
@@ -2625,15 +2703,15 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2625
2703
|
readonly message: v.StringSchema<undefined>;
|
|
2626
2704
|
}, undefined>, undefined>;
|
|
2627
2705
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
2628
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
2706
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
2629
2707
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2630
2708
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2631
2709
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2632
2710
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2633
2711
|
readonly operationId: v.StringSchema<undefined>;
|
|
2634
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
2635
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
2636
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
2712
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
2713
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
2714
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
2637
2715
|
}, undefined>, undefined>;
|
|
2638
2716
|
}, undefined>, undefined>;
|
|
2639
2717
|
}, undefined>;
|
|
@@ -2822,7 +2900,7 @@ type BatchReplaceOrdersInput = {
|
|
|
2822
2900
|
};
|
|
2823
2901
|
declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2824
2902
|
readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
2825
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
2903
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted">]>;
|
|
2826
2904
|
readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2827
2905
|
readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2828
2906
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
@@ -2835,15 +2913,15 @@ declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
2835
2913
|
readonly message: v.StringSchema<undefined>;
|
|
2836
2914
|
}, undefined>, undefined>;
|
|
2837
2915
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
2838
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
2916
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
2839
2917
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2840
2918
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2841
2919
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2842
2920
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2843
2921
|
readonly operationId: v.StringSchema<undefined>;
|
|
2844
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
2845
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
2846
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
2922
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
2923
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
2924
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
2847
2925
|
}, undefined>, undefined>;
|
|
2848
2926
|
}, undefined>, undefined>;
|
|
2849
2927
|
}, undefined>, v.TransformAction<{
|
|
@@ -2902,10 +2980,10 @@ declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
2902
2980
|
type BatchReplaceAdmissionItem = v.InferOutput<typeof BatchReplaceAdmissionItemSchema>;
|
|
2903
2981
|
declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2904
2982
|
readonly batchRequestId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.GtValueAction<bigint, 0n, undefined>, v.TransformAction<bigint, string>]>;
|
|
2905
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
2983
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted" | "partially_admitted">]>;
|
|
2906
2984
|
readonly results: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2907
2985
|
readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
2908
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
2986
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted">]>;
|
|
2909
2987
|
readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2910
2988
|
readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2911
2989
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
@@ -2918,15 +2996,15 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
2918
2996
|
readonly message: v.StringSchema<undefined>;
|
|
2919
2997
|
}, undefined>, undefined>;
|
|
2920
2998
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
2921
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
2999
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
2922
3000
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2923
3001
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2924
3002
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2925
3003
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2926
3004
|
readonly operationId: v.StringSchema<undefined>;
|
|
2927
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
2928
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
2929
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
3005
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3006
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3007
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
2930
3008
|
}, undefined>, undefined>;
|
|
2931
3009
|
}, undefined>, undefined>;
|
|
2932
3010
|
}, undefined>, v.TransformAction<{
|
|
@@ -3137,13 +3215,13 @@ declare const GetBatchReplaceStatusInputSchema: v.SchemaWithPipe<readonly [v.Str
|
|
|
3137
3215
|
type GetBatchReplaceStatusInput = v.InferInput<typeof GetBatchReplaceStatusInputSchema>;
|
|
3138
3216
|
declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3139
3217
|
readonly batchRequestId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.GtValueAction<bigint, 0n, undefined>, v.TransformAction<bigint, string>]>;
|
|
3140
|
-
readonly admissionStatus: v.SchemaWithPipe<readonly [v.
|
|
3218
|
+
readonly admissionStatus: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted" | "partially_admitted">]>;
|
|
3141
3219
|
readonly items: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3142
3220
|
readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
3143
|
-
readonly phase: v.SchemaWithPipe<readonly [v.
|
|
3221
|
+
readonly phase: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "terminal" | "working" | "rejected" | "admitted">]>;
|
|
3144
3222
|
readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3145
3223
|
readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3146
|
-
readonly orderStatus: v.SchemaWithPipe<readonly [v.
|
|
3224
|
+
readonly orderStatus: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "pending" | "pending_cancel" | "working" | "filled" | "canceled" | "rejected">]>;
|
|
3147
3225
|
readonly code: v.StringSchema<undefined>;
|
|
3148
3226
|
readonly updatedTsNs: v.BigintSchema<undefined>;
|
|
3149
3227
|
}, undefined>, v.TransformAction<{
|
|
@@ -3329,7 +3407,7 @@ declare const BatchCancelOrdersInputSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
3329
3407
|
}>]>;
|
|
3330
3408
|
type BatchCancelOrdersInput = v.InferInput<typeof BatchCancelOrdersInputSchema>;
|
|
3331
3409
|
declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
3332
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
3410
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "accepted" | "rejected">]>;
|
|
3333
3411
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3334
3412
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3335
3413
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -3341,22 +3419,22 @@ declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
|
3341
3419
|
readonly message: v.StringSchema<undefined>;
|
|
3342
3420
|
}, undefined>, undefined>;
|
|
3343
3421
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
3344
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
3422
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
3345
3423
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3346
3424
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3347
3425
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3348
3426
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3349
3427
|
readonly operationId: v.StringSchema<undefined>;
|
|
3350
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
3351
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
3352
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
3428
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3429
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3430
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3353
3431
|
}, undefined>, undefined>;
|
|
3354
3432
|
}, undefined>, undefined>;
|
|
3355
3433
|
}, undefined>;
|
|
3356
3434
|
type BatchCancelOrderResult = v.InferOutput<typeof BatchCancelOrderResultSchema>;
|
|
3357
3435
|
declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3358
3436
|
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
3359
|
-
readonly status: v.SchemaWithPipe<readonly [v.
|
|
3437
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "accepted" | "rejected">]>;
|
|
3360
3438
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3361
3439
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3362
3440
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -3368,15 +3446,15 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3368
3446
|
readonly message: v.StringSchema<undefined>;
|
|
3369
3447
|
}, undefined>, undefined>;
|
|
3370
3448
|
readonly rateLimit: v.OptionalSchema<v.ObjectSchema<{
|
|
3371
|
-
readonly reason: v.SchemaWithPipe<readonly [v.
|
|
3449
|
+
readonly reason: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "quota_exceeded" | "authority_unavailable">]>;
|
|
3372
3450
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3373
3451
|
readonly remaining: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3374
3452
|
readonly retryAfterMs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3375
3453
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3376
3454
|
readonly operationId: v.StringSchema<undefined>;
|
|
3377
|
-
readonly policyClass: v.SchemaWithPipe<readonly [v.
|
|
3378
|
-
readonly scope: v.SchemaWithPipe<readonly [v.
|
|
3379
|
-
readonly refillModel: v.SchemaWithPipe<readonly [v.
|
|
3455
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3456
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3457
|
+
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3380
3458
|
}, undefined>, undefined>;
|
|
3381
3459
|
}, undefined>, undefined>;
|
|
3382
3460
|
}, undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orders-batch.schemas.d.ts","names":[],"sources":["../../../src/services/orders/orders-batch.schemas.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"orders-batch.schemas.d.ts","names":[],"sources":["../../../src/services/orders/orders-batch.schemas.ts"],"mappings":";;;;;;cAwDa,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;KAc1B,sBAAsB,EAAE,kBAAkB;cAEzC,4BAA0B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;KAgB3B,uBAAuB,EAAE,mBAAmB;iBAExC,mCAAmC,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ders/v1/orders_pb.js";
|
|
2
|
+
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
3
3
|
import { formatId } from "../../utils/base58-id.js";
|
|
4
4
|
import { tsNsToMs } from "../../utils/time.js";
|
|
5
5
|
import { OptionalPublicIdSchema, PublicIdSchema, idInputSchema } from "../../shared/schemas.js";
|
|
@@ -7,7 +7,6 @@ import { OrderErrorDetailSchema } from "./order-errors.schemas.js";
|
|
|
7
7
|
import { SideSchema, SymbolIdInputSchema } from "../shared.js";
|
|
8
8
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
9
9
|
import { positiveDecimalInputToScaled, scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
10
|
-
import { BatchReplacePhase, OrderStatus } from "../../gen/orders/v1/orders_read_pb.js";
|
|
11
10
|
import { OrderSideCodec } from "./order-enums.codecs.js";
|
|
12
11
|
import { BatchCancelOrderStatusCodec, BatchReplaceAdmissionStatusCodec, BatchReplaceItemAdmissionStatusCodec, BatchReplacePhaseCodec, CancelAllAfterStatusCodec, OrderStatusCodec } from "./orders.codecs.js";
|
|
13
12
|
import { ClientOrderIdInputSchema, OrderRequestIdInputSchema, positiveOrderIdInputSchema } from "./orders-identifiers.schemas.js";
|
|
@@ -32,7 +31,7 @@ const CancelAllAfterInputSchema = v.pipe(v.strictObject({
|
|
|
32
31
|
subaccountId: accountScopeToSubaccountId(account)
|
|
33
32
|
})));
|
|
34
33
|
const CancelAllAfterResultSchema = v.pipe(v.object({
|
|
35
|
-
status:
|
|
34
|
+
status: enumLabelSchema(CancelAllAfterStatusCodec.protoToOutput),
|
|
36
35
|
effectiveTimeoutSec: v.pipe(v.number(), v.integer(), v.minValue(0)),
|
|
37
36
|
expiresAtTsNs: v.bigint(),
|
|
38
37
|
tsNs: v.bigint()
|
|
@@ -185,7 +184,7 @@ function createBatchReplaceOrdersInputSchema(scales) {
|
|
|
185
184
|
}
|
|
186
185
|
const BatchReplaceAdmissionItemSchema = v.pipe(v.object({
|
|
187
186
|
itemIndex: BatchItemIndexSchema,
|
|
188
|
-
status:
|
|
187
|
+
status: enumLabelSchema(BatchReplaceItemAdmissionStatusCodec.protoToOutput),
|
|
189
188
|
oldOrderId: OptionalPublicIdSchema,
|
|
190
189
|
replacementOrderId: OptionalPublicIdSchema,
|
|
191
190
|
clientOrderId: v.string(),
|
|
@@ -197,7 +196,7 @@ const BatchReplaceAdmissionItemSchema = v.pipe(v.object({
|
|
|
197
196
|
})));
|
|
198
197
|
const BatchReplaceOrdersResultSchema = v.pipe(v.object({
|
|
199
198
|
batchRequestId: PositivePublicIdSchema,
|
|
200
|
-
status:
|
|
199
|
+
status: enumLabelSchema(BatchReplaceAdmissionStatusCodec.protoToOutput),
|
|
201
200
|
results: v.array(BatchReplaceAdmissionItemSchema),
|
|
202
201
|
acceptedCount: BatchCountSchema,
|
|
203
202
|
rejectedCount: BatchCountSchema,
|
|
@@ -216,10 +215,10 @@ const GetBatchReplaceStatusInputSchema = v.pipe(v.strictObject({
|
|
|
216
215
|
})));
|
|
217
216
|
const BatchReplaceStatusItemSchema = v.pipe(v.object({
|
|
218
217
|
itemIndex: BatchItemIndexSchema,
|
|
219
|
-
phase:
|
|
218
|
+
phase: enumLabelSchema(BatchReplacePhaseCodec.protoToOutput),
|
|
220
219
|
oldOrderId: OptionalPublicIdSchema,
|
|
221
220
|
replacementOrderId: OptionalPublicIdSchema,
|
|
222
|
-
orderStatus:
|
|
221
|
+
orderStatus: enumLabelSchema(OrderStatusCodec.protoToOutput),
|
|
223
222
|
code: v.string(),
|
|
224
223
|
updatedTsNs: v.bigint()
|
|
225
224
|
}), v.transform(({ updatedTsNs, ...item }) => ({
|
|
@@ -230,7 +229,7 @@ const BatchReplaceStatusItemSchema = v.pipe(v.object({
|
|
|
230
229
|
})));
|
|
231
230
|
const GetBatchReplaceStatusResultSchema = v.pipe(v.object({
|
|
232
231
|
batchRequestId: PositivePublicIdSchema,
|
|
233
|
-
admissionStatus:
|
|
232
|
+
admissionStatus: enumLabelSchema(BatchReplaceAdmissionStatusCodec.protoToOutput),
|
|
234
233
|
items: v.array(BatchReplaceStatusItemSchema),
|
|
235
234
|
acceptedCount: BatchCountSchema,
|
|
236
235
|
rejectedCount: BatchCountSchema,
|
|
@@ -267,7 +266,7 @@ const BatchCancelOrdersInputSchema = v.pipe(v.strictObject({
|
|
|
267
266
|
subaccountId: accountScopeToSubaccountId(account)
|
|
268
267
|
})));
|
|
269
268
|
const BatchCancelOrderResultSchema = v.object({
|
|
270
|
-
status:
|
|
269
|
+
status: enumLabelSchema(BatchCancelOrderStatusCodec.protoToOutput),
|
|
271
270
|
orderId: OptionalPublicIdSchema,
|
|
272
271
|
clientOrderId: v.string(),
|
|
273
272
|
code: v.string(),
|