@stxapp/stx-typescript 0.10.0 → 0.11.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.
@@ -31,7 +31,7 @@ interface WebSocketAuthContext {
31
31
  }
32
32
 
33
33
  /** The features `STX.capabilities()` reports, by stable id. */
34
- declare const FEATURES: readonly ["oauth", "oauth.member", "oauth.app", "connect", "terms.stx_page", "markets.create", "market_types", "event_players", "leaderboard", "loyalty", "combos"];
34
+ declare const FEATURES: readonly ["oauth", "oauth.member", "oauth.app", "connect", "terms.stx_page", "markets.create", "market_types", "event_players", "leaderboard", "loyalty", "combos", "orders.post_only", "orders.fill_or_kill"];
35
35
  /** A feature id `STX.capabilities()` reports. */
36
36
  type Feature = (typeof FEATURES)[number];
37
37
  /**
@@ -671,8 +671,8 @@ interface FeeTransaction {
671
671
  * What moved the money or the points, for example a deposit, a trade fee, a
672
672
  * referral, or a manual adjustment. Each endpoint returns only its own subset
673
673
  * of these. One of: `deposit`, `withdrawal`, `settlement`, `fee`,
674
- * `fee_refund`, `casino`, `adjustment`, `loyalty`, `loyalty_points_rollup`,
675
- * `loyalty_points_referral`.
674
+ * `fee_refund`, `maker_rebate`, `casino`, `adjustment`, `loyalty`,
675
+ * `loyalty_points_rollup`, `loyalty_points_referral`.
676
676
  */
677
677
  type?: string | null;
678
678
  /** Fields the server added after this SDK was generated. */
@@ -912,12 +912,13 @@ interface Fill {
912
912
  time?: string | null;
913
913
  /**
914
914
  * Sum of on-trade fee plus fees paid from settlements linked with the trade.
915
- * In dollars. Money as a decimal string, as sent by the API.
915
+ * Negative when a maker rebate exceeds the fees paid. In dollars. Money as a
916
+ * decimal string, as sent by the API.
916
917
  */
917
918
  total_fee?: string | null;
918
919
  /**
919
- * Per-trade fee (on-trade fee schedule). Included in total_fee. In dollars.
920
- * Money as a decimal string, as sent by the API.
920
+ * Per-trade fee (on-trade fee schedule). Included in total_fee. Negative for
921
+ * a maker rebate. In dollars. Money as a decimal string, as sent by the API.
921
922
  */
922
923
  trade_fee?: string | null;
923
924
  /**
@@ -930,9 +931,10 @@ interface Fill {
930
931
  */
931
932
  traded_contracts?: string | null;
932
933
  /**
933
- * Fee before rounding. Use the rounded fee for reconciliation. In dollars.
934
- * Carries up to 9 decimal places; parse money with a variable-scale decimal
935
- * type, not a fixed-width one. Money as a decimal string, as sent by the API.
934
+ * Fee before rounding; negative for a maker rebate. Use the rounded fee for
935
+ * reconciliation. In dollars. Carries up to 9 decimal places; parse money
936
+ * with a variable-scale decimal type, not a fixed-width one. Money as a
937
+ * decimal string, as sent by the API.
936
938
  */
937
939
  unrounded_trade_fee?: string | null;
938
940
  /**
@@ -947,6 +949,28 @@ interface Fill {
947
949
  /** Fields the server added after this SDK was generated. */
948
950
  [key: string]: unknown;
949
951
  }
952
+ /**
953
+ * The 403 failure envelope. A refusal on the member's STX terms adds
954
+ * `error_description` and `terms_url` to `error`.
955
+ */
956
+ interface ForbiddenError {
957
+ /**
958
+ * Failure reason: `terms_required` or `terms_not_delegable` for a terms
959
+ * refusal, otherwise a human-readable message.
960
+ */
961
+ error?: string | null;
962
+ /**
963
+ * Present on a terms refusal: what the app should do, in plain words.
964
+ */
965
+ error_description?: string | null;
966
+ /**
967
+ * Present on a terms refusal: the STX page where the member accepts the
968
+ * terms, e.g. `<STX host>/connect/terms?client_id=<client_id>`.
969
+ */
970
+ terms_url?: string | null;
971
+ /** Fields the server added after this SDK was generated. */
972
+ [key: string]: unknown;
973
+ }
950
974
  /**
951
975
  * One ranked board.
952
976
  */
@@ -1199,6 +1223,12 @@ interface Market {
1199
1223
  * The market this record relates to.
1200
1224
  */
1201
1225
  market_id?: string | null;
1226
+ /**
1227
+ * The contract rules document for this market, as a PDF, the same version as
1228
+ * `rules_version`. `null` where rules documents are not published, or before
1229
+ * one takes effect.
1230
+ */
1231
+ market_rules_pdf_url?: string | null;
1202
1232
  /**
1203
1233
  * The settlement value of one winning contract, and the ceiling on order
1204
1234
  * prices: an order must price strictly below it. Read it per market. In
@@ -1229,7 +1259,7 @@ interface Market {
1229
1259
  */
1230
1260
  position?: string | null;
1231
1261
  /**
1232
- * The provider used to result this market.
1262
+ * The provider used to result this market, or `null` when there is none.
1233
1263
  */
1234
1264
  powered_by?: Record<string, unknown> | null;
1235
1265
  /**
@@ -1262,6 +1292,11 @@ interface Market {
1262
1292
  * The rules for this market.
1263
1293
  */
1264
1294
  rules?: string | null;
1295
+ /**
1296
+ * The version number of the contract rules document in force for this market.
1297
+ * `null` where rules documents are not published, or before one takes effect.
1298
+ */
1299
+ rules_version?: number | null;
1265
1300
  /**
1266
1301
  * When the market was resulted or voided. A raw microsecond integer, unlike
1267
1302
  * the ISO-8601 `timestamp` and `event_start` beside it. UNIX microseconds.
@@ -1888,6 +1923,22 @@ interface NewOrder {
1888
1923
  * `good_till_time`. UNIX microseconds.
1889
1924
  */
1890
1925
  expiration_time?: number | null;
1926
+ /**
1927
+ * `post_only` makes a limit order rest only as a maker. When it would match
1928
+ * on arrival, it is cancelled with `cancellation_reason` `auto_matching` and
1929
+ * the response carries the cancelled order; when the first order it would
1930
+ * match is your own, it is a 422 (`match_with_self`). `fill_or_kill` makes a
1931
+ * limit order fill in full when it is matched, at its price or better, or not
1932
+ * at all. The response carries it `accepted` before it is matched, or
1933
+ * `delayed` during the in-play delay; it then becomes `filled`, or
1934
+ * `cancelled` with `cancellation_reason` `auto_matching`, nothing filled and
1935
+ * nothing left on the book, or `rejected` for a reason any order can be
1936
+ * (`match_with_self`, `market_liability_limit`). Either is a 400 on a
1937
+ * `market` order or where it is not enabled, and a 422 on a combination
1938
+ * market. `normal` is the default; any other value is a 400. One of:
1939
+ * `normal`, `post_only`, `fill_or_kill`.
1940
+ */
1941
+ fill_mode?: string | null;
1891
1942
  /**
1892
1943
  * The market to place the order on.
1893
1944
  */
@@ -1898,18 +1949,15 @@ interface NewOrder {
1898
1949
  */
1899
1950
  order_type?: string | null;
1900
1951
  /**
1901
- * Limit price in dollars, as a string: `"0.42"` is 42 cents. A number is
1902
- * rejected outright rather than reinterpreted, because a bare `42` could mean
1903
- * 42 cents or 42 dollars and the wrong reading is off by 100x. Must be
1904
- * strictly less than the market's `max_price`; read that per market rather
1905
- * than assuming a fixed ceiling. Required for `limit` orders and unused by
1906
- * `market` orders, but validated whenever it is present: a malformed or
1907
- * sub-cent price is a 400 on a `market` order too, rather than being quietly
1908
- * dropped. An explicit `null` is accepted there, exactly as omitting the key
1909
- * is. Must be greater than zero and a whole number of cents: at most two
1910
- * decimal places, not counting trailing zeros. So "0.42" and "0.4200" are the
1911
- * same accepted value, and "0.001" is rejected. Money as a decimal string, as
1912
- * sent by the API.
1952
+ * Limit price in dollars, as a string: `"0.42"` is 42 cents. A number such as
1953
+ * `42` is rejected, since it could mean cents or dollars. Must be strictly
1954
+ * less than the market's `max_price`, read per market. Required for `limit`
1955
+ * orders. A `market` order ignores it but still rejects a malformed or
1956
+ * sub-cent price with a 400; an explicit `null` is the same as omitting it.
1957
+ * Must be greater than zero and a whole number of cents: at most two decimal
1958
+ * places, not counting trailing zeros. So "0.42" and "0.4200" are the same
1959
+ * accepted value, and "0.001" is rejected. Money as a decimal string, as sent
1960
+ * by the API.
1913
1961
  */
1914
1962
  price?: string | null;
1915
1963
  /**
@@ -1980,6 +2028,12 @@ interface Order {
1980
2028
  * the market has no event. Not the same as `expiration_time`.
1981
2029
  */
1982
2030
  expires_at?: number | null;
2031
+ /**
2032
+ * How the order matches: `normal`, `post_only` or `fill_or_kill` for a limit
2033
+ * order you placed, `cancel_unfilled` for a market order, `rfq` or `quote`
2034
+ * for an order of a combination bind.
2035
+ */
2036
+ fill_mode?: string | null;
1983
2037
  /**
1984
2038
  * Contracts filled so far. Compare with `quantity` to get remaining size.
1985
2039
  * Quantity as a decimal string, as sent by the API.
@@ -2133,8 +2187,8 @@ interface PaymentTransaction {
2133
2187
  * What moved the money or the points, for example a deposit, a trade fee, a
2134
2188
  * referral, or a manual adjustment. Each endpoint returns only its own subset
2135
2189
  * of these. One of: `deposit`, `withdrawal`, `settlement`, `fee`,
2136
- * `fee_refund`, `casino`, `adjustment`, `loyalty`, `loyalty_points_rollup`,
2137
- * `loyalty_points_referral`.
2190
+ * `fee_refund`, `maker_rebate`, `casino`, `adjustment`, `loyalty`,
2191
+ * `loyalty_points_rollup`, `loyalty_points_referral`.
2138
2192
  */
2139
2193
  type?: string | null;
2140
2194
  /** Fields the server added after this SDK was generated. */
@@ -2195,6 +2249,12 @@ interface Position {
2195
2249
  * loss. In dollars. Money as a decimal string, as sent by the API.
2196
2250
  */
2197
2251
  max_risk?: string | null;
2252
+ /**
2253
+ * A combination position's payout per dollar risked: max price over the
2254
+ * buy-side average fill, floored to two places. `null` for any market that is
2255
+ * not a combination.
2256
+ */
2257
+ multiplier?: number | null;
2198
2258
  /**
2199
2259
  * Potential fee on the open contracts when they settle. In dollars. Money as
2200
2260
  * a decimal string, as sent by the API.
@@ -2246,6 +2306,21 @@ interface Position {
2246
2306
  /** Fields the server added after this SDK was generated. */
2247
2307
  [key: string]: unknown;
2248
2308
  }
2309
+ /**
2310
+ * The data provider that results a market.
2311
+ */
2312
+ interface PoweredBy {
2313
+ /**
2314
+ * A link to the provider, or to its page for the event.
2315
+ */
2316
+ link?: string | null;
2317
+ /**
2318
+ * The provider's name, e.g. `ESPN`.
2319
+ */
2320
+ provider?: string | null;
2321
+ /** Fields the server added after this SDK was generated. */
2322
+ [key: string]: unknown;
2323
+ }
2249
2324
  /**
2250
2325
  * The public-profile fields to change. Every key is optional, but at least one
2251
2326
  * is required.
@@ -2499,8 +2574,8 @@ interface Transaction {
2499
2574
  * What moved the money or the points, for example a deposit, a trade fee, a
2500
2575
  * referral, or a manual adjustment. Each endpoint returns only its own subset
2501
2576
  * of these. One of: `deposit`, `withdrawal`, `settlement`, `fee`,
2502
- * `fee_refund`, `casino`, `adjustment`, `loyalty`, `loyalty_points_rollup`,
2503
- * `loyalty_points_referral`.
2577
+ * `fee_refund`, `maker_rebate`, `casino`, `adjustment`, `loyalty`,
2578
+ * `loyalty_points_rollup`, `loyalty_points_referral`.
2504
2579
  */
2505
2580
  type?: string | null;
2506
2581
  /** Fields the server added after this SDK was generated. */
@@ -2513,6 +2588,7 @@ type models_Cancellation = Cancellation;
2513
2588
  type models_Event = Event;
2514
2589
  type models_FeeTransaction = FeeTransaction;
2515
2590
  type models_Fill = Fill;
2591
+ type models_ForbiddenError = ForbiddenError;
2516
2592
  type models_Leaderboard = Leaderboard;
2517
2593
  type models_LeaderboardEntry = LeaderboardEntry;
2518
2594
  type models_LeaderboardStanding = LeaderboardStanding;
@@ -2524,13 +2600,14 @@ type models_NewOrder = NewOrder;
2524
2600
  type models_Order = Order;
2525
2601
  type models_PaymentTransaction = PaymentTransaction;
2526
2602
  type models_Position = Position;
2603
+ type models_PoweredBy = PoweredBy;
2527
2604
  type models_ProfileUpdate = ProfileUpdate;
2528
2605
  type models_RecentTrade = RecentTrade;
2529
2606
  type models_Settlement = Settlement;
2530
2607
  type models_StatDetail = StatDetail;
2531
2608
  type models_Transaction = Transaction;
2532
2609
  declare namespace models {
2533
- export type { models_Balance as Balance, models_BookLevel as BookLevel, models_Cancellation as Cancellation, Error$1 as Error, models_Event as Event, models_FeeTransaction as FeeTransaction, models_Fill as Fill, models_Leaderboard as Leaderboard, models_LeaderboardEntry as LeaderboardEntry, models_LeaderboardStanding as LeaderboardStanding, models_Market as Market, models_MarketFilter as MarketFilter, models_MarketStat as MarketStat, models_Me as Me, models_NewOrder as NewOrder, models_Order as Order, models_PaymentTransaction as PaymentTransaction, models_Position as Position, models_ProfileUpdate as ProfileUpdate, models_RecentTrade as RecentTrade, models_Settlement as Settlement, models_StatDetail as StatDetail, models_Transaction as Transaction };
2610
+ export type { models_Balance as Balance, models_BookLevel as BookLevel, models_Cancellation as Cancellation, Error$1 as Error, models_Event as Event, models_FeeTransaction as FeeTransaction, models_Fill as Fill, models_ForbiddenError as ForbiddenError, models_Leaderboard as Leaderboard, models_LeaderboardEntry as LeaderboardEntry, models_LeaderboardStanding as LeaderboardStanding, models_Market as Market, models_MarketFilter as MarketFilter, models_MarketStat as MarketStat, models_Me as Me, models_NewOrder as NewOrder, models_Order as Order, models_PaymentTransaction as PaymentTransaction, models_Position as Position, models_PoweredBy as PoweredBy, models_ProfileUpdate as ProfileUpdate, models_RecentTrade as RecentTrade, models_Settlement as Settlement, models_StatDetail as StatDetail, models_Transaction as Transaction };
2534
2611
  }
2535
2612
 
2536
2613
  interface Operation {
@@ -2559,7 +2636,7 @@ declare const OPERATIONS: {
2559
2636
  readonly account_market_stats_get: {
2560
2637
  readonly method: "GET";
2561
2638
  readonly path: "/api/v1/account/market_stats";
2562
- readonly query: readonly ["market_ids", "event_ids", "exclude_zero_settlements", "from_time", "to_time", "sports", "competitions", "limit", "cursor"];
2639
+ readonly query: readonly ["market_ids", "event_ids", "exclude_zero_settlements", "unsettled_only", "from_time", "to_time", "sports", "competitions", "limit", "cursor"];
2563
2640
  readonly pathParams: readonly [];
2564
2641
  readonly hasBody: false;
2565
2642
  readonly responseKey: "market_stats";
@@ -2950,6 +3027,30 @@ declare class STXTermsRequiredException extends STXForbiddenException {
2950
3027
  */
2951
3028
  declare class STXIPNotAllowedException extends STXForbiddenException {
2952
3029
  }
3030
+ /**
3031
+ * 403 from the network edge in front of the exchange: the request never
3032
+ * reached it, so nothing was done. `reason` is `restricted_jurisdiction`,
3033
+ * `unusual_network`, or `blocked` when the edge sent no reason (most often a
3034
+ * request without a `User-Agent` header). `reference` identifies the block for
3035
+ * support, when sent. Retrying will not help, so it is never retried.
3036
+ */
3037
+ declare class STXBlockedException extends STXForbiddenException {
3038
+ readonly reason: string;
3039
+ readonly reference: string | undefined;
3040
+ constructor(message: string, opts?: STXExceptionOptions & {
3041
+ reason?: string;
3042
+ reference?: string;
3043
+ });
3044
+ }
3045
+ /** 403 `restricted_jurisdiction`: the request came from a location the exchange does not serve. */
3046
+ declare class STXRestrictedJurisdictionException extends STXBlockedException {
3047
+ }
3048
+ /**
3049
+ * 403 `unusual_network`: the request came from a network the exchange does
3050
+ * not accept traffic from, such as some hosting providers, proxies or VPNs.
3051
+ */
3052
+ declare class STXUnusualNetworkException extends STXBlockedException {
3053
+ }
2953
3054
  /** 404: the resource does not exist, or belongs to another account. */
2954
3055
  declare class STXNotFoundException extends STXAPIException {
2955
3056
  }
@@ -2959,11 +3060,42 @@ declare class STXNotFoundException extends STXAPIException {
2959
3060
  */
2960
3061
  declare class STXRejectedException extends STXAPIException {
2961
3062
  }
2962
- /** 429: too many requests. `retryAfter` is seconds, when sent. */
3063
+ /**
3064
+ * 422: this market does not take the order's `fillMode`. Combination markets
3065
+ * accept only normal orders. `fillMode` is the mode sent.
3066
+ */
3067
+ declare class STXFillModeNotAllowedException extends STXRejectedException {
3068
+ readonly fillMode: string;
3069
+ constructor(message: string, opts: STXExceptionOptions & {
3070
+ fillMode: string;
3071
+ });
3072
+ }
3073
+ /**
3074
+ * A `post_only` order would have matched on arrival, so it was not left on the
3075
+ * book and nothing filled. `reason` is `auto_matching` when the exchange
3076
+ * accepted and cancelled it (`order` is that cancelled order), or
3077
+ * `match_with_self` when the first order it would match is your own (a 422;
3078
+ * `order` is undefined).
3079
+ */
3080
+ declare class STXPostOnlyWouldMatchException extends STXRejectedException {
3081
+ readonly reason: "auto_matching" | "match_with_self";
3082
+ readonly order: Order | undefined;
3083
+ constructor(message: string, opts: STXExceptionOptions & {
3084
+ reason: "auto_matching" | "match_with_self";
3085
+ order?: Order;
3086
+ });
3087
+ }
3088
+ /**
3089
+ * 429: too many requests. `retryAfter` is seconds, when sent. `reference`
3090
+ * identifies the block for support when the network edge in front of the
3091
+ * exchange answered (`{"error": "rate_limited", ...}`), else it is undefined.
3092
+ */
2963
3093
  declare class STXRateLimitException extends STXAPIException {
2964
3094
  readonly retryAfter: number | undefined;
3095
+ readonly reference: string | undefined;
2965
3096
  constructor(message: string, opts?: STXExceptionOptions & {
2966
3097
  retryAfter?: number;
3098
+ reference?: string;
2967
3099
  });
2968
3100
  }
2969
3101
  /** 5xx: the server failed. Retried by the default policy on GET and DELETE. */
@@ -2996,7 +3128,7 @@ declare class STXChannelException extends STXException {
2996
3128
  declare class STXTimeoutException extends STXChannelException {
2997
3129
  }
2998
3130
  /** The sentence an `STXNotAvailableException` carries: `Combos are not available on demo.stxapp.ca yet.` */
2999
- declare function notAvailableMessage(feature: string, host: string): string;
3131
+ declare function notAvailableMessage(feature: string, host: string, apiVersion?: string | null): string;
3000
3132
  /**
3001
3133
  * This exchange does not have the feature yet: combos on an exchange without
3002
3134
  * them, OAuth where it is not switched on, a scope the exchange does not offer
@@ -3007,7 +3139,9 @@ declare function notAvailableMessage(feature: string, host: string): string;
3007
3139
  *
3008
3140
  * `feature` is a stable id (`oauth`, `oauth.member`, `oauth.app`, `connect`,
3009
3141
  * `terms.stx_page`, `markets.create`, `market_types`, `event_players`,
3010
- * `leaderboard`, `loyalty`, `combos`, or `scope:<name>`); `host` is the exchange that answered.
3142
+ * `leaderboard`, `loyalty`, `combos`, `orders.post_only`, `orders.fill_or_kill`, or
3143
+ * `scope:<name>`); `host` is the exchange that answered, and `apiVersion` its
3144
+ * build when known.
3011
3145
  * `statusCode` and `body` are the HTTP answer the decision came from, when
3012
3146
  * there was one.
3013
3147
  */
@@ -3016,8 +3150,11 @@ declare class STXNotAvailableException extends STXAPIException {
3016
3150
  readonly feature: string;
3017
3151
  /** The exchange host that lacks it, e.g. `"demo.stxapp.ca"`. */
3018
3152
  readonly host: string;
3153
+ /** The exchange build, e.g. `"3.4.24"`, when known. */
3154
+ readonly apiVersion: string | undefined;
3019
3155
  constructor(feature: string, host: string, opts?: STXExceptionOptions & {
3020
3156
  message?: string;
3157
+ apiVersion?: string | null;
3021
3158
  });
3022
3159
  static [Symbol.hasInstance](value: unknown): boolean;
3023
3160
  }
@@ -3086,6 +3223,10 @@ declare function errorForStatus(statusCode: number, body: unknown, opts: {
3086
3223
  path: string;
3087
3224
  retryAfter?: string | null;
3088
3225
  wwwAuthenticate?: string | null;
3226
+ /** The `x-stx-error` response header: the exchange sets it, an edge block never does. */
3227
+ stxError?: string | null;
3228
+ /** The `x-amz-cf-id` response header: the reference of an edge block. */
3229
+ cfId?: string | null;
3089
3230
  }): STXAPIException;
3090
3231
 
3091
3232
  type ExceptionClass = abstract new (...args: never[]) => STXException;
@@ -3181,8 +3322,8 @@ declare class ApiKeyCredentials implements AuthProvider {
3181
3322
  toString(): string;
3182
3323
  }
3183
3324
 
3184
- declare const VERSION = "0.10.0";
3185
- declare const USER_AGENT = "stx-typescript/0.10.0";
3325
+ declare const VERSION = "0.11.0";
3326
+ declare const USER_AGENT = "stx-typescript/0.11.0";
3186
3327
  /**
3187
3328
  * `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
3188
3329
  * `await using client = new STX()` works there; a registered stand-in on
@@ -4129,6 +4270,12 @@ interface MarketStatsQuery {
4129
4270
  marketIds?: StrList;
4130
4271
  eventIds?: StrList;
4131
4272
  excludeZeroSettlements?: boolean;
4273
+ /**
4274
+ * Only markets not yet resulted or voided, ordered by market id so a row
4275
+ * keeps its place between pages. Not combinable with `fromTime`, `toTime` or
4276
+ * `excludeZeroSettlements: true`.
4277
+ */
4278
+ unsettledOnly?: boolean;
4132
4279
  fromTime?: number;
4133
4280
  toTime?: number;
4134
4281
  sports?: StrList;
@@ -4170,7 +4317,15 @@ interface OrderOptions {
4170
4317
  expirationTime?: number;
4171
4318
  cancelOnDisconnect?: boolean;
4172
4319
  deviceId?: string;
4320
+ /**
4321
+ * `"normal"` (the default), `"post_only"` (only ever rests on the book as a
4322
+ * maker) or `"fill_or_kill"` (fills in full or not at all). Limit orders
4323
+ * only.
4324
+ */
4325
+ fillMode?: FillMode;
4173
4326
  }
4327
+ /** How a limit order matches. */
4328
+ type FillMode = "normal" | "post_only" | "fill_or_kill";
4174
4329
  /** One order in a `placeOrders` batch. */
4175
4330
  interface NewOrderInput extends OrderOptions {
4176
4331
  marketId: string;
@@ -4184,7 +4339,10 @@ interface AcceptTermsOptions {
4184
4339
  acceptPrivacy?: boolean;
4185
4340
  acceptHouseRules?: boolean;
4186
4341
  }
4187
- /** The JSON body for one new order. Fields left undefined are omitted. */
4342
+ /**
4343
+ * The JSON body for one new order. Fields left undefined are omitted, and so is
4344
+ * `fillMode: "normal"`, the default.
4345
+ */
4188
4346
  declare function orderBody(marketId: string, action: string, orderType: string, opts: OrderOptions): Record<string, unknown>;
4189
4347
  /**
4190
4348
  * The STX client. Configuration comes from the options, then
@@ -4314,6 +4472,17 @@ declare class STX {
4314
4472
  * are decimal strings, e.g. `{ price: "0.58", quantity: "100" }`. Numbers are
4315
4473
  * refused client-side.
4316
4474
  *
4475
+ * `fillMode` (limit orders only) is `"normal"` (the default), `"post_only"`
4476
+ * or `"fill_or_kill"`. A post-only order that would match on arrival is not
4477
+ * placed: this throws `STXPostOnlyWouldMatchException`. A fill-or-kill order
4478
+ * comes back `accepted` (or `delayed` in play); follow it on the `orders`
4479
+ * channel or with `order()` to see it `filled` or `cancelled`.
4480
+ *
4481
+ * Before sending either mode, the client checks once that the exchange offers
4482
+ * it (`GET /api_version`, cached) and throws `STXNotAvailableException`
4483
+ * (`orders.post_only`, `orders.fill_or_kill`) without sending the order when
4484
+ * it does not. A combination market throws `STXFillModeNotAllowedException`.
4485
+ *
4317
4486
  * The exchange validates the order: a bad price step or a fractional
4318
4487
  * quantity throws `STXValidationException` (400) or `STXRejectedException`
4319
4488
  * (422) with the API's message. An order from outside the region is also
@@ -4326,7 +4495,13 @@ declare class STX {
4326
4495
  /**
4327
4496
  * `POST /api/v1/orders/batched`: place several orders in one call. Returns
4328
4497
  * one result per order, in order; a rejected order has `errors` instead of
4329
- * `order` and does not stop the others.
4498
+ * `order` and does not stop the others. A post-only order that would have
4499
+ * matched comes back as its order, `cancelled` with `cancellation_reason`
4500
+ * `auto_matching`.
4501
+ *
4502
+ * When any order has a `fillMode` other than `"normal"`, the exchange is
4503
+ * checked first as in `placeOrder()`, and `STXNotAvailableException` is
4504
+ * thrown with nothing sent.
4330
4505
  */
4331
4506
  placeOrders(orders: readonly NewOrderInput[]): Promise<BatchOrderResult[]>;
4332
4507
  /**
@@ -4430,4 +4605,4 @@ declare class STX {
4430
4605
  websocket(opts?: Omit<STXWebSocketOptions, "rest">): STXWebSocket;
4431
4606
  }
4432
4607
 
4433
- export { type EventPlayers as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, ComboPlayer as D, type ComboPlayerEvent as E, type ComboQuoteAcceptedEvent as F, type ComboQuoteClosedEvent as G, type ComboQuoteClosedReason as H, type ComboQuoteReply as I, type ComboRefusalReason as J, type ComboRequestClosedEvent as K, type ComboRequestClosedReason as L, type ComboRequestReply as M, type ComboRfqClosedEvent as N, type ComboRfqClosedReason as O, type ComboRfqLeg as P, type ComboRfqOpenedEvent as Q, type ComboSnapshot as R, type ComboWithdrawReply as S, type CreatableMarketType as T, type CreateMarketResult as U, type CreateMarketsOptions as V, Environment as W, Environments as X, type Error$1 as Y, type Event as Z, type EventPlayer as _, type AccountChange as a, STXAuthenticationException as a$, type EventStat as a0, type EventTeam as a1, type EventsQuery as a2, FEATURES as a3, type Feature as a4, type FeatureMap as a5, type FeeTransaction as a6, type FetchLike as a7, type Fill as a8, type FillsQuery as a9, type NewMarketInput as aA, type NewOrder as aB, type NewOrderInput as aC, OPERATIONS as aD, type Operation as aE, type OperationId as aF, type Order as aG, type OrderOptions as aH, type OrdersQuery as aI, Page as aJ, type PageQuery as aK, type PaymentTransaction as aL, type PlayerStatLineMarket as aM, type Position as aN, type PrivateKeyInput as aO, type ProfileUpdate as aP, type RecentTrade as aQ, ReconnectPolicy as aR, type ReconnectPolicyOptions as aS, Region as aT, type ResponseEvent as aU, RetryPolicy as aV, type RetryPolicyOptions as aW, SIGNATURE_HEADER as aX, SNAPSHOT_EVENTS as aY, STX as aZ, STXAPIException as a_, HOSTS as aa, KEY_HEADER as ab, type KnownStat as ac, type Leaderboard as ad, type LeaderboardEntry as ae, type LeaderboardQuery as af, type LeaderboardStanding as ag, type ListedMarketType as ah, type Logger as ai, MAX_MARKETS_PER_REQUEST as aj, type Market as ak, type MarketFilter as al, type MarketRejectionReason as am, type MarketRequestEcho as an, type MarketRule as ao, type MarketStat as ap, type MarketStatsQuery as aq, type MarketType as ar, type MarketTypeEventType as as, type MarketTypeField as at, type MarketTypes as au, type MarketsQuery as av, type Me as aw, type MessageHandler as ax, NO_RETRY as ay, type NewMarket as az, type AccountChangeKind as b, STXChannelException as b0, STXComboPriceMovedException as b1, STXComboRefusedException as b2, STXCombosUnavailableException as b3, STXConfigException as b4, type STXEnvironment as b5, STXException as b6, STXForbiddenException as b7, STXIPNotAllowedException as b8, STXInsufficientScopeException as b9, baseUrlFor as bA, buildMessage as bB, environmentNamed as bC, errorForStatus as bD, handshakePath as bE, isValidLine as bF, loadPrivateKey as bG, models as bH, notAvailableMessage as bI, orderBody as bJ, requestPath as bK, resolveHost as bL, signerFromPrivateKey as bM, socketUrlFor as bN, STXInvalidTokenException as ba, STXNotAvailableException as bb, STXNotFoundException as bc, type STXOptions as bd, STXRateLimitException as be, STXRejectedException as bf, STXServerException as bg, STXTermsRequiredException as bh, STXTimeoutException as bi, STXTransportException as bj, STXValidationException as bk, STXWebSocket as bl, type STXWebSocketOptions as bm, type Settlement as bn, type SettlementsQuery as bo, type Signer as bp, type Stat as bq, type StatDetail as br, Stats as bs, type StrList as bt, TERMINAL_ORDER_STATUSES as bu, TIMESTAMP_HEADER as bv, type Transaction as bw, USER_AGENT as bx, VERSION as by, type WebSocketAuthContext as bz, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Capabilities as k, Channel as l, ChannelMessage as m, type ComboBestQuote as n, type ComboBestQuoteEvent as o, type ComboCancelReply as p, type ComboCashOutReply as q, type ComboJoinOptions as r, type ComboJoinReply as s, type ComboLeg as t, ComboMaker as u, type ComboMakerEvent as v, type ComboMakerPlacedEvent as w, type ComboOutcome as x, type ComboPlacedEvent as y, type ComboPlacement as z };
4608
+ export { type EventPlayers as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, ComboPlayer as D, type ComboPlayerEvent as E, type ComboQuoteAcceptedEvent as F, type ComboQuoteClosedEvent as G, type ComboQuoteClosedReason as H, type ComboQuoteReply as I, type ComboRefusalReason as J, type ComboRequestClosedEvent as K, type ComboRequestClosedReason as L, type ComboRequestReply as M, type ComboRfqClosedEvent as N, type ComboRfqClosedReason as O, type ComboRfqLeg as P, type ComboRfqOpenedEvent as Q, type ComboSnapshot as R, type ComboWithdrawReply as S, type CreatableMarketType as T, type CreateMarketResult as U, type CreateMarketsOptions as V, Environment as W, Environments as X, type Error$1 as Y, type Event as Z, type EventPlayer as _, type AccountChange as a, SNAPSHOT_EVENTS as a$, type EventStat as a0, type EventTeam as a1, type EventsQuery as a2, FEATURES as a3, type Feature as a4, type FeatureMap as a5, type FeeTransaction as a6, type FetchLike as a7, type Fill as a8, type FillMode as a9, NO_RETRY as aA, type NewMarket as aB, type NewMarketInput as aC, type NewOrder as aD, type NewOrderInput as aE, OPERATIONS as aF, type Operation as aG, type OperationId as aH, type Order as aI, type OrderOptions as aJ, type OrdersQuery as aK, Page as aL, type PageQuery as aM, type PaymentTransaction as aN, type PlayerStatLineMarket as aO, type Position as aP, type PoweredBy as aQ, type PrivateKeyInput as aR, type ProfileUpdate as aS, type RecentTrade as aT, ReconnectPolicy as aU, type ReconnectPolicyOptions as aV, Region as aW, type ResponseEvent as aX, RetryPolicy as aY, type RetryPolicyOptions as aZ, SIGNATURE_HEADER as a_, type FillsQuery as aa, type ForbiddenError as ab, HOSTS as ac, KEY_HEADER as ad, type KnownStat as ae, type Leaderboard as af, type LeaderboardEntry as ag, type LeaderboardQuery as ah, type LeaderboardStanding as ai, type ListedMarketType as aj, type Logger as ak, MAX_MARKETS_PER_REQUEST as al, type Market as am, type MarketFilter as an, type MarketRejectionReason as ao, type MarketRequestEcho as ap, type MarketRule as aq, type MarketStat as ar, type MarketStatsQuery as as, type MarketType as at, type MarketTypeEventType as au, type MarketTypeField as av, type MarketTypes as aw, type MarketsQuery as ax, type Me as ay, type MessageHandler as az, type AccountChangeKind as b, STX as b0, STXAPIException as b1, STXAuthenticationException as b2, STXBlockedException as b3, STXChannelException as b4, STXComboPriceMovedException as b5, STXComboRefusedException as b6, STXCombosUnavailableException as b7, STXConfigException as b8, type STXEnvironment as b9, Stats as bA, type StrList as bB, TERMINAL_ORDER_STATUSES as bC, TIMESTAMP_HEADER as bD, type Transaction as bE, USER_AGENT as bF, VERSION as bG, type WebSocketAuthContext as bH, baseUrlFor as bI, buildMessage as bJ, environmentNamed as bK, errorForStatus as bL, handshakePath as bM, isValidLine as bN, loadPrivateKey as bO, models as bP, notAvailableMessage as bQ, orderBody as bR, requestPath as bS, resolveHost as bT, signerFromPrivateKey as bU, socketUrlFor as bV, STXException as ba, STXFillModeNotAllowedException as bb, STXForbiddenException as bc, STXIPNotAllowedException as bd, STXInsufficientScopeException as be, STXInvalidTokenException as bf, STXNotAvailableException as bg, STXNotFoundException as bh, type STXOptions as bi, STXPostOnlyWouldMatchException as bj, STXRateLimitException as bk, STXRejectedException as bl, STXRestrictedJurisdictionException as bm, STXServerException as bn, STXTermsRequiredException as bo, STXTimeoutException as bp, STXTransportException as bq, STXUnusualNetworkException as br, STXValidationException as bs, STXWebSocket as bt, type STXWebSocketOptions as bu, type Settlement as bv, type SettlementsQuery as bw, type Signer as bx, type Stat as by, type StatDetail as bz, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Capabilities as k, Channel as l, ChannelMessage as m, type ComboBestQuote as n, type ComboBestQuoteEvent as o, type ComboCancelReply as p, type ComboCashOutReply as q, type ComboJoinOptions as r, type ComboJoinReply as s, type ComboLeg as t, ComboMaker as u, type ComboMakerEvent as v, type ComboMakerPlacedEvent as w, type ComboOutcome as x, type ComboPlacedEvent as y, type ComboPlacement as z };
package/dist/index.cjs CHANGED
@@ -69,12 +69,12 @@
69
69
 
70
70
 
71
71
 
72
- var _chunk42OCIF3Gcjs = require('./chunk-42OCIF3G.cjs');
73
72
 
74
73
 
75
74
 
76
75
 
77
76
 
77
+ var _chunkBSX65XEAcjs = require('./chunk-BSX65XEA.cjs');
78
78
 
79
79
 
80
80
 
@@ -141,5 +141,15 @@ var _chunk42OCIF3Gcjs = require('./chunk-42OCIF3G.cjs');
141
141
 
142
142
 
143
143
 
144
- exports.AccountView = _chunk42OCIF3Gcjs.AccountView; exports.ApiKeyCredentials = _chunk42OCIF3Gcjs.ApiKeyCredentials; exports.Capabilities = _chunk42OCIF3Gcjs.Capabilities; exports.Channel = _chunk42OCIF3Gcjs.Channel; exports.ChannelMessage = _chunk42OCIF3Gcjs.ChannelMessage; exports.ComboMaker = _chunk42OCIF3Gcjs.ComboMaker; exports.ComboPlayer = _chunk42OCIF3Gcjs.ComboPlayer; exports.Environment = _chunk42OCIF3Gcjs.Environment; exports.Environments = _chunk42OCIF3Gcjs.Environments; exports.FEATURES = _chunk42OCIF3Gcjs.FEATURES; exports.HOSTS = _chunk42OCIF3Gcjs.HOSTS; exports.KEY_HEADER = _chunk42OCIF3Gcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunk42OCIF3Gcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunk42OCIF3Gcjs.NO_RETRY; exports.OPERATIONS = _chunk42OCIF3Gcjs.OPERATIONS; exports.Page = _chunk42OCIF3Gcjs.Page; exports.ReconnectPolicy = _chunk42OCIF3Gcjs.ReconnectPolicy; exports.Region = _chunk42OCIF3Gcjs.Region; exports.RetryPolicy = _chunk42OCIF3Gcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunk42OCIF3Gcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunk42OCIF3Gcjs.SNAPSHOT_EVENTS; exports.STX = _chunk42OCIF3Gcjs.STX; exports.STXAPIException = _chunk42OCIF3Gcjs.STXAPIException; exports.STXAuthenticationException = _chunk42OCIF3Gcjs.STXAuthenticationException; exports.STXChannelException = _chunk42OCIF3Gcjs.STXChannelException; exports.STXComboPriceMovedException = _chunk42OCIF3Gcjs.STXComboPriceMovedException; exports.STXComboRefusedException = _chunk42OCIF3Gcjs.STXComboRefusedException; exports.STXCombosUnavailableException = _chunk42OCIF3Gcjs.STXCombosUnavailableException; exports.STXConfigException = _chunk42OCIF3Gcjs.STXConfigException; exports.STXException = _chunk42OCIF3Gcjs.STXException; exports.STXForbiddenException = _chunk42OCIF3Gcjs.STXForbiddenException; exports.STXIPNotAllowedException = _chunk42OCIF3Gcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunk42OCIF3Gcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunk42OCIF3Gcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunk42OCIF3Gcjs.STXNotAvailableException; exports.STXNotFoundException = _chunk42OCIF3Gcjs.STXNotFoundException; exports.STXRateLimitException = _chunk42OCIF3Gcjs.STXRateLimitException; exports.STXRejectedException = _chunk42OCIF3Gcjs.STXRejectedException; exports.STXServerException = _chunk42OCIF3Gcjs.STXServerException; exports.STXTermsRequiredException = _chunk42OCIF3Gcjs.STXTermsRequiredException; exports.STXTimeoutException = _chunk42OCIF3Gcjs.STXTimeoutException; exports.STXTransportException = _chunk42OCIF3Gcjs.STXTransportException; exports.STXValidationException = _chunk42OCIF3Gcjs.STXValidationException; exports.STXWebSocket = _chunk42OCIF3Gcjs.STXWebSocket; exports.Stats = _chunk42OCIF3Gcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunk42OCIF3Gcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunk42OCIF3Gcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunk42OCIF3Gcjs.USER_AGENT; exports.VERSION = _chunk42OCIF3Gcjs.VERSION; exports.baseUrlFor = _chunk42OCIF3Gcjs.baseUrlFor; exports.buildMessage = _chunk42OCIF3Gcjs.buildMessage; exports.centsToDollars = _chunk42OCIF3Gcjs.centsToDollars; exports.convertBook = _chunk42OCIF3Gcjs.convertBook; exports.convertMarketChannelPayload = _chunk42OCIF3Gcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunk42OCIF3Gcjs.convertMarketPayload; exports.convertMarketsFrame = _chunk42OCIF3Gcjs.convertMarketsFrame; exports.environmentNamed = _chunk42OCIF3Gcjs.environmentNamed; exports.errorForStatus = _chunk42OCIF3Gcjs.errorForStatus; exports.handshakePath = _chunk42OCIF3Gcjs.handshakePath; exports.isValidLine = _chunk42OCIF3Gcjs.isValidLine; exports.loadPrivateKey = _chunk42OCIF3Gcjs.loadPrivateKey; exports.notAvailableMessage = _chunk42OCIF3Gcjs.notAvailableMessage; exports.orderBody = _chunk42OCIF3Gcjs.orderBody; exports.requestPath = _chunk42OCIF3Gcjs.requestPath; exports.resolveHost = _chunk42OCIF3Gcjs.resolveHost; exports.resolveSettings = _chunk42OCIF3Gcjs.resolveSettings; exports.signerFromPrivateKey = _chunk42OCIF3Gcjs.signerFromPrivateKey; exports.socketUrlFor = _chunk42OCIF3Gcjs.socketUrlFor; exports.toDollarString = _chunk42OCIF3Gcjs.toDollarString; exports.toQuantity = _chunk42OCIF3Gcjs.toQuantity;
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ exports.AccountView = _chunkBSX65XEAcjs.AccountView; exports.ApiKeyCredentials = _chunkBSX65XEAcjs.ApiKeyCredentials; exports.Capabilities = _chunkBSX65XEAcjs.Capabilities; exports.Channel = _chunkBSX65XEAcjs.Channel; exports.ChannelMessage = _chunkBSX65XEAcjs.ChannelMessage; exports.ComboMaker = _chunkBSX65XEAcjs.ComboMaker; exports.ComboPlayer = _chunkBSX65XEAcjs.ComboPlayer; exports.Environment = _chunkBSX65XEAcjs.Environment; exports.Environments = _chunkBSX65XEAcjs.Environments; exports.FEATURES = _chunkBSX65XEAcjs.FEATURES; exports.HOSTS = _chunkBSX65XEAcjs.HOSTS; exports.KEY_HEADER = _chunkBSX65XEAcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunkBSX65XEAcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunkBSX65XEAcjs.NO_RETRY; exports.OPERATIONS = _chunkBSX65XEAcjs.OPERATIONS; exports.Page = _chunkBSX65XEAcjs.Page; exports.ReconnectPolicy = _chunkBSX65XEAcjs.ReconnectPolicy; exports.Region = _chunkBSX65XEAcjs.Region; exports.RetryPolicy = _chunkBSX65XEAcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunkBSX65XEAcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunkBSX65XEAcjs.SNAPSHOT_EVENTS; exports.STX = _chunkBSX65XEAcjs.STX; exports.STXAPIException = _chunkBSX65XEAcjs.STXAPIException; exports.STXAuthenticationException = _chunkBSX65XEAcjs.STXAuthenticationException; exports.STXBlockedException = _chunkBSX65XEAcjs.STXBlockedException; exports.STXChannelException = _chunkBSX65XEAcjs.STXChannelException; exports.STXComboPriceMovedException = _chunkBSX65XEAcjs.STXComboPriceMovedException; exports.STXComboRefusedException = _chunkBSX65XEAcjs.STXComboRefusedException; exports.STXCombosUnavailableException = _chunkBSX65XEAcjs.STXCombosUnavailableException; exports.STXConfigException = _chunkBSX65XEAcjs.STXConfigException; exports.STXException = _chunkBSX65XEAcjs.STXException; exports.STXFillModeNotAllowedException = _chunkBSX65XEAcjs.STXFillModeNotAllowedException; exports.STXForbiddenException = _chunkBSX65XEAcjs.STXForbiddenException; exports.STXIPNotAllowedException = _chunkBSX65XEAcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunkBSX65XEAcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkBSX65XEAcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunkBSX65XEAcjs.STXNotAvailableException; exports.STXNotFoundException = _chunkBSX65XEAcjs.STXNotFoundException; exports.STXPostOnlyWouldMatchException = _chunkBSX65XEAcjs.STXPostOnlyWouldMatchException; exports.STXRateLimitException = _chunkBSX65XEAcjs.STXRateLimitException; exports.STXRejectedException = _chunkBSX65XEAcjs.STXRejectedException; exports.STXRestrictedJurisdictionException = _chunkBSX65XEAcjs.STXRestrictedJurisdictionException; exports.STXServerException = _chunkBSX65XEAcjs.STXServerException; exports.STXTermsRequiredException = _chunkBSX65XEAcjs.STXTermsRequiredException; exports.STXTimeoutException = _chunkBSX65XEAcjs.STXTimeoutException; exports.STXTransportException = _chunkBSX65XEAcjs.STXTransportException; exports.STXUnusualNetworkException = _chunkBSX65XEAcjs.STXUnusualNetworkException; exports.STXValidationException = _chunkBSX65XEAcjs.STXValidationException; exports.STXWebSocket = _chunkBSX65XEAcjs.STXWebSocket; exports.Stats = _chunkBSX65XEAcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunkBSX65XEAcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunkBSX65XEAcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunkBSX65XEAcjs.USER_AGENT; exports.VERSION = _chunkBSX65XEAcjs.VERSION; exports.baseUrlFor = _chunkBSX65XEAcjs.baseUrlFor; exports.buildMessage = _chunkBSX65XEAcjs.buildMessage; exports.centsToDollars = _chunkBSX65XEAcjs.centsToDollars; exports.convertBook = _chunkBSX65XEAcjs.convertBook; exports.convertMarketChannelPayload = _chunkBSX65XEAcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunkBSX65XEAcjs.convertMarketPayload; exports.convertMarketsFrame = _chunkBSX65XEAcjs.convertMarketsFrame; exports.environmentNamed = _chunkBSX65XEAcjs.environmentNamed; exports.errorForStatus = _chunkBSX65XEAcjs.errorForStatus; exports.handshakePath = _chunkBSX65XEAcjs.handshakePath; exports.isValidLine = _chunkBSX65XEAcjs.isValidLine; exports.loadPrivateKey = _chunkBSX65XEAcjs.loadPrivateKey; exports.notAvailableMessage = _chunkBSX65XEAcjs.notAvailableMessage; exports.orderBody = _chunkBSX65XEAcjs.orderBody; exports.requestPath = _chunkBSX65XEAcjs.requestPath; exports.resolveHost = _chunkBSX65XEAcjs.resolveHost; exports.resolveSettings = _chunkBSX65XEAcjs.resolveSettings; exports.signerFromPrivateKey = _chunkBSX65XEAcjs.signerFromPrivateKey; exports.socketUrlFor = _chunkBSX65XEAcjs.socketUrlFor; exports.toDollarString = _chunkBSX65XEAcjs.toDollarString; exports.toQuantity = _chunkBSX65XEAcjs.toQuantity;
145
155
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/tssdk/tssdk/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ytIAAC","file":"/home/runner/work/tssdk/tssdk/dist/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/tssdk/tssdk/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,0oJAAC","file":"/home/runner/work/tssdk/tssdk/dist/index.cjs"}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillsQuery, aa as HOSTS, ab as KEY_HEADER, ac as KnownStat, ad as Leaderboard, ae as LeaderboardEntry, af as LeaderboardQuery, ag as LeaderboardStanding, ah as ListedMarketType, ai as Logger, aj as MAX_MARKETS_PER_REQUEST, ak as Market, al as MarketFilter, am as MarketRejectionReason, an as MarketRequestEcho, ao as MarketRule, ap as MarketStat, aq as MarketStatsQuery, ar as MarketType, as as MarketTypeEventType, at as MarketTypeField, au as MarketTypes, av as MarketsQuery, aw as Me, ax as MessageHandler, ay as NO_RETRY, az as NewMarket, aA as NewMarketInput, aB as NewOrder, aC as NewOrderInput, aD as OPERATIONS, aE as Operation, aF as OperationId, aG as Order, aH as OrderOptions, aI as OrdersQuery, aJ as Page, aK as PageQuery, aL as PaymentTransaction, aM as PlayerStatLineMarket, aN as Position, aO as PrivateKeyInput, aP as ProfileUpdate, aQ as RecentTrade, aR as ReconnectPolicy, aS as ReconnectPolicyOptions, aT as Region, aU as ResponseEvent, aV as RetryPolicy, aW as RetryPolicyOptions, aX as SIGNATURE_HEADER, aY as SNAPSHOT_EVENTS, aZ as STX, a_ as STXAPIException, a$ as STXAuthenticationException, b0 as STXChannelException, b1 as STXComboPriceMovedException, b2 as STXComboRefusedException, b3 as STXCombosUnavailableException, b4 as STXConfigException, b5 as STXEnvironment, b6 as STXException, b7 as STXForbiddenException, b8 as STXIPNotAllowedException, b9 as STXInsufficientScopeException, ba as STXInvalidTokenException, bb as STXNotAvailableException, bc as STXNotFoundException, bd as STXOptions, be as STXRateLimitException, bf as STXRejectedException, bg as STXServerException, bh as STXTermsRequiredException, bi as STXTimeoutException, bj as STXTransportException, bk as STXValidationException, bl as STXWebSocket, bm as STXWebSocketOptions, bn as Settlement, bo as SettlementsQuery, bp as Signer, bq as Stat, br as StatDetail, bs as Stats, bt as StrList, bu as TERMINAL_ORDER_STATUSES, bv as TIMESTAMP_HEADER, bw as Transaction, bx as USER_AGENT, by as VERSION, bz as WebSocketAuthContext, bA as baseUrlFor, bB as buildMessage, bC as environmentNamed, bD as errorForStatus, bE as handshakePath, bF as isValidLine, bG as loadPrivateKey, bH as models, bI as notAvailableMessage, bJ as orderBody, bK as requestPath, bL as resolveHost, bM as signerFromPrivateKey, bN as socketUrlFor } from './client-DJr0UUvB.cjs';
1
+ export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-DxY8eJ58.cjs';
2
2
  import 'node:crypto';
3
3
 
4
4
  /** The fully resolved configuration the clients consume. */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillsQuery, aa as HOSTS, ab as KEY_HEADER, ac as KnownStat, ad as Leaderboard, ae as LeaderboardEntry, af as LeaderboardQuery, ag as LeaderboardStanding, ah as ListedMarketType, ai as Logger, aj as MAX_MARKETS_PER_REQUEST, ak as Market, al as MarketFilter, am as MarketRejectionReason, an as MarketRequestEcho, ao as MarketRule, ap as MarketStat, aq as MarketStatsQuery, ar as MarketType, as as MarketTypeEventType, at as MarketTypeField, au as MarketTypes, av as MarketsQuery, aw as Me, ax as MessageHandler, ay as NO_RETRY, az as NewMarket, aA as NewMarketInput, aB as NewOrder, aC as NewOrderInput, aD as OPERATIONS, aE as Operation, aF as OperationId, aG as Order, aH as OrderOptions, aI as OrdersQuery, aJ as Page, aK as PageQuery, aL as PaymentTransaction, aM as PlayerStatLineMarket, aN as Position, aO as PrivateKeyInput, aP as ProfileUpdate, aQ as RecentTrade, aR as ReconnectPolicy, aS as ReconnectPolicyOptions, aT as Region, aU as ResponseEvent, aV as RetryPolicy, aW as RetryPolicyOptions, aX as SIGNATURE_HEADER, aY as SNAPSHOT_EVENTS, aZ as STX, a_ as STXAPIException, a$ as STXAuthenticationException, b0 as STXChannelException, b1 as STXComboPriceMovedException, b2 as STXComboRefusedException, b3 as STXCombosUnavailableException, b4 as STXConfigException, b5 as STXEnvironment, b6 as STXException, b7 as STXForbiddenException, b8 as STXIPNotAllowedException, b9 as STXInsufficientScopeException, ba as STXInvalidTokenException, bb as STXNotAvailableException, bc as STXNotFoundException, bd as STXOptions, be as STXRateLimitException, bf as STXRejectedException, bg as STXServerException, bh as STXTermsRequiredException, bi as STXTimeoutException, bj as STXTransportException, bk as STXValidationException, bl as STXWebSocket, bm as STXWebSocketOptions, bn as Settlement, bo as SettlementsQuery, bp as Signer, bq as Stat, br as StatDetail, bs as Stats, bt as StrList, bu as TERMINAL_ORDER_STATUSES, bv as TIMESTAMP_HEADER, bw as Transaction, bx as USER_AGENT, by as VERSION, bz as WebSocketAuthContext, bA as baseUrlFor, bB as buildMessage, bC as environmentNamed, bD as errorForStatus, bE as handshakePath, bF as isValidLine, bG as loadPrivateKey, bH as models, bI as notAvailableMessage, bJ as orderBody, bK as requestPath, bL as resolveHost, bM as signerFromPrivateKey, bN as socketUrlFor } from './client-DJr0UUvB.js';
1
+ export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-DxY8eJ58.js';
2
2
  import 'node:crypto';
3
3
 
4
4
  /** The fully resolved configuration the clients consume. */