@stxapp/stx-typescript 0.8.0 → 0.8.2
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 +12 -0
- package/dist/{chunk-H7XZDE2U.js → chunk-BDKOZ6S2.js} +399 -18
- package/dist/chunk-BDKOZ6S2.js.map +1 -0
- package/dist/{chunk-L2DEU7R6.cjs → chunk-JHREXRKD.cjs} +403 -22
- package/dist/chunk-JHREXRKD.cjs.map +1 -0
- package/dist/{client-E5Lg6k8d.d.ts → client-jcBBoio1.d.cts} +458 -12
- package/dist/{client-E5Lg6k8d.d.cts → client-jcBBoio1.d.ts} +458 -12
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -1
- package/dist/oauth.cjs +17 -17
- package/dist/oauth.d.cts +2 -2
- package/dist/oauth.d.ts +2 -2
- package/dist/oauth.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-H7XZDE2U.js.map +0 -1
- package/dist/chunk-L2DEU7R6.cjs.map +0 -1
|
@@ -254,8 +254,11 @@ interface EventPlayers {
|
|
|
254
254
|
}
|
|
255
255
|
/** One market to create. */
|
|
256
256
|
interface NewMarketInput {
|
|
257
|
-
/**
|
|
258
|
-
|
|
257
|
+
/**
|
|
258
|
+
* The market rule. `"player_stat_line"`, the only one today and the default;
|
|
259
|
+
* the exchange answers any other with `unsupported_rule`.
|
|
260
|
+
*/
|
|
261
|
+
rule?: "player_stat_line" | (string & {});
|
|
259
262
|
/** From `eventPlayers()`. */
|
|
260
263
|
playerId: string;
|
|
261
264
|
/** One of the event's stats, e.g. `Stats.Basketball.POINTS`. */
|
|
@@ -266,30 +269,48 @@ interface NewMarketInput {
|
|
|
266
269
|
* are rejected with `invalid_line`.
|
|
267
270
|
*/
|
|
268
271
|
line: number;
|
|
269
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* @deprecated Not sent. A player stat line is always over/under.
|
|
274
|
+
*/
|
|
270
275
|
propType?: "ou";
|
|
271
276
|
}
|
|
272
277
|
/** Why a market was not created. */
|
|
273
|
-
type MarketRejectionReason = "invalid_market" | "
|
|
274
|
-
/**
|
|
278
|
+
type MarketRejectionReason = "invalid_market" | "unsupported_rule" | "unsupported_stat" | "invalid_line" | "unknown_player" | "event_not_open" | "not_created" | (string & {});
|
|
279
|
+
/** The market a result is for, as it was requested. */
|
|
275
280
|
interface MarketRequestEcho {
|
|
281
|
+
rule?: string;
|
|
276
282
|
player_id?: string;
|
|
277
283
|
stat?: string;
|
|
278
|
-
prop_type?: string;
|
|
279
284
|
line?: number;
|
|
280
285
|
[key: string]: unknown;
|
|
281
286
|
}
|
|
282
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* The outcome for one requested market. `index` is the market's position in
|
|
289
|
+
* the list given to `createMarkets()`, and `market` is that market as
|
|
290
|
+
* requested.
|
|
291
|
+
*/
|
|
283
292
|
type CreateMarketResult = {
|
|
293
|
+
index: number;
|
|
284
294
|
status: "created";
|
|
285
295
|
market_id: string;
|
|
296
|
+
reason: null;
|
|
286
297
|
market: MarketRequestEcho;
|
|
287
298
|
} | {
|
|
299
|
+
index: number;
|
|
288
300
|
status: "exists";
|
|
289
301
|
market_id: string;
|
|
302
|
+
reason: null;
|
|
303
|
+
market: MarketRequestEcho;
|
|
304
|
+
} | {
|
|
305
|
+
index: number;
|
|
306
|
+
status: "valid";
|
|
307
|
+
market_id: null;
|
|
308
|
+
reason: null;
|
|
290
309
|
market: MarketRequestEcho;
|
|
291
310
|
} | {
|
|
311
|
+
index: number;
|
|
292
312
|
status: "rejected";
|
|
313
|
+
market_id: null;
|
|
293
314
|
reason: MarketRejectionReason;
|
|
294
315
|
market: MarketRequestEcho;
|
|
295
316
|
};
|
|
@@ -303,6 +324,11 @@ interface CreateMarketsOptions {
|
|
|
303
324
|
* needs the `events` scope.
|
|
304
325
|
*/
|
|
305
326
|
validate?: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* Run every check on the exchange and create nothing. A market that would
|
|
329
|
+
* be created, or a repeat of one, comes back `valid`.
|
|
330
|
+
*/
|
|
331
|
+
dryRun?: boolean;
|
|
306
332
|
}
|
|
307
333
|
/** The most markets one `createMarkets()` call takes. */
|
|
308
334
|
declare const MAX_MARKETS_PER_REQUEST = 25;
|
|
@@ -2902,6 +2928,55 @@ declare class STXChannelException extends STXException {
|
|
|
2902
2928
|
*/
|
|
2903
2929
|
declare class STXTimeoutException extends STXChannelException {
|
|
2904
2930
|
}
|
|
2931
|
+
/**
|
|
2932
|
+
* Combos are not available on this environment: the exchange refused the
|
|
2933
|
+
* join to the player or maker topic with `unmatched topic`. Nothing else is
|
|
2934
|
+
* affected. Combos are available on US demo.
|
|
2935
|
+
*/
|
|
2936
|
+
declare class STXCombosUnavailableException extends STXChannelException {
|
|
2937
|
+
}
|
|
2938
|
+
/**
|
|
2939
|
+
* The exchange refused a combo command or join. `code` is the refusal
|
|
2940
|
+
* (`not_found`, `insufficient_assets`, `player_refused`, ...); for
|
|
2941
|
+
* `player_refused:<reason>` the part after the first colon is in `detail`.
|
|
2942
|
+
* `command` is the event that was refused, e.g. `accept`. `reason` (from
|
|
2943
|
+
* `STXChannelException`) is the full string as sent.
|
|
2944
|
+
*/
|
|
2945
|
+
declare class STXComboRefusedException extends STXChannelException {
|
|
2946
|
+
readonly command: string;
|
|
2947
|
+
readonly code: string;
|
|
2948
|
+
readonly detail: string | undefined;
|
|
2949
|
+
constructor(message: string, opts: {
|
|
2950
|
+
topic?: string;
|
|
2951
|
+
reply?: unknown;
|
|
2952
|
+
command: string;
|
|
2953
|
+
code: string;
|
|
2954
|
+
detail?: string;
|
|
2955
|
+
});
|
|
2956
|
+
}
|
|
2957
|
+
/**
|
|
2958
|
+
* `accept` found nothing live at the accepted amount or better. The request
|
|
2959
|
+
* stays open. `best` is the live best quote now; its fields are null when
|
|
2960
|
+
* nothing is live. Accept again at `best.amount` to take it.
|
|
2961
|
+
*/
|
|
2962
|
+
declare class STXComboPriceMovedException extends STXComboRefusedException {
|
|
2963
|
+
readonly best: {
|
|
2964
|
+
quote_id: string | null;
|
|
2965
|
+
amount: string | null;
|
|
2966
|
+
expires_at: number | null;
|
|
2967
|
+
};
|
|
2968
|
+
constructor(message: string, opts: {
|
|
2969
|
+
topic?: string;
|
|
2970
|
+
reply?: unknown;
|
|
2971
|
+
command: string;
|
|
2972
|
+
code: string;
|
|
2973
|
+
best: {
|
|
2974
|
+
quote_id: string | null;
|
|
2975
|
+
amount: string | null;
|
|
2976
|
+
expires_at: number | null;
|
|
2977
|
+
};
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2905
2980
|
/** Build the exception for one non-2xx response. */
|
|
2906
2981
|
declare function errorForStatus(statusCode: number, body: unknown, opts: {
|
|
2907
2982
|
method: string;
|
|
@@ -3003,8 +3078,8 @@ declare class ApiKeyCredentials implements AuthProvider {
|
|
|
3003
3078
|
toString(): string;
|
|
3004
3079
|
}
|
|
3005
3080
|
|
|
3006
|
-
declare const VERSION = "0.8.
|
|
3007
|
-
declare const USER_AGENT = "stx-typescript/0.8.
|
|
3081
|
+
declare const VERSION = "0.8.2";
|
|
3082
|
+
declare const USER_AGENT = "stx-typescript/0.8.2";
|
|
3008
3083
|
/**
|
|
3009
3084
|
* `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
|
|
3010
3085
|
* `await using client = new STX()` works there; a registered stand-in on
|
|
@@ -3101,6 +3176,353 @@ declare class AccountView {
|
|
|
3101
3176
|
close(): Promise<void>;
|
|
3102
3177
|
}
|
|
3103
3178
|
|
|
3179
|
+
/** What the combination needs of a leg. */
|
|
3180
|
+
type ComboOutcome = "won" | "lost";
|
|
3181
|
+
/** One leg of a quote request. */
|
|
3182
|
+
interface ComboLeg {
|
|
3183
|
+
/** An `open`, ordinary (not combination) market. */
|
|
3184
|
+
marketId: string;
|
|
3185
|
+
outcome: ComboOutcome;
|
|
3186
|
+
}
|
|
3187
|
+
/** Options for `STXWebSocket.comboPlayer()` and `STXWebSocket.comboMaker()`. */
|
|
3188
|
+
interface ComboJoinOptions<E> {
|
|
3189
|
+
/**
|
|
3190
|
+
* A geolocation packet, or a function returning one, sent on every join
|
|
3191
|
+
* where the exchange is geo-fenced. A function is called again on each
|
|
3192
|
+
* rejoin, so a reconnect sends a fresh packet.
|
|
3193
|
+
*/
|
|
3194
|
+
geoLocation?: GeoLocationProvider;
|
|
3195
|
+
/** Called for every typed event, as it arrives. */
|
|
3196
|
+
onEvent?: (event: E) => void | Promise<void>;
|
|
3197
|
+
}
|
|
3198
|
+
/** The join reply on either topic. */
|
|
3199
|
+
interface ComboJoinReply {
|
|
3200
|
+
/** Your account's pseudonym for counterparties. Makers see the player's on requests and quotes. */
|
|
3201
|
+
external_id: string;
|
|
3202
|
+
/** ISO 8601 time the geolocation packet expires, or null when no packet was needed. Rejoin before it. */
|
|
3203
|
+
next_geolocation_at: string | null;
|
|
3204
|
+
}
|
|
3205
|
+
/** `requestQuote()` reply. */
|
|
3206
|
+
interface ComboRequestReply {
|
|
3207
|
+
rfq_id: string;
|
|
3208
|
+
}
|
|
3209
|
+
/** `cashOut()` reply. */
|
|
3210
|
+
interface ComboCashOutReply {
|
|
3211
|
+
rfq_id: string;
|
|
3212
|
+
/** The combination being sold. */
|
|
3213
|
+
market_id: string;
|
|
3214
|
+
/** Contracts to sell, set by the exchange: what you hold less your resting sells. */
|
|
3215
|
+
quantity: string;
|
|
3216
|
+
}
|
|
3217
|
+
/** `accept()` reply: what was placed for the player, not what filled. */
|
|
3218
|
+
interface ComboPlacement {
|
|
3219
|
+
market_id: string;
|
|
3220
|
+
/** The player's order. Its fills arrive on `fills`. */
|
|
3221
|
+
order_id: string;
|
|
3222
|
+
quantity: string;
|
|
3223
|
+
price: string;
|
|
3224
|
+
}
|
|
3225
|
+
/** `cancel()` reply. */
|
|
3226
|
+
interface ComboCancelReply {
|
|
3227
|
+
/** The `rfq_id` that was cancelled. */
|
|
3228
|
+
cancelled: string;
|
|
3229
|
+
}
|
|
3230
|
+
/** The best live quote. All three fields are null when nothing is live. */
|
|
3231
|
+
interface ComboBestQuote {
|
|
3232
|
+
quote_id: string | null;
|
|
3233
|
+
amount: string | null;
|
|
3234
|
+
/** Microseconds since the Unix epoch. */
|
|
3235
|
+
expires_at: number | null;
|
|
3236
|
+
}
|
|
3237
|
+
/** `snapshot()` reply. */
|
|
3238
|
+
interface ComboSnapshot {
|
|
3239
|
+
rfq_id: string;
|
|
3240
|
+
/** Null on a buy until a bind places; the combination on a cash out. */
|
|
3241
|
+
market_id: string | null;
|
|
3242
|
+
/** `binding` while an acceptance waits for its next bind attempt. */
|
|
3243
|
+
status: "open" | "binding";
|
|
3244
|
+
/** The player's side: `buy` for a request, `sell` for a cash out. */
|
|
3245
|
+
side: "buy" | "sell";
|
|
3246
|
+
/** The stake on a buy; null on a cash out. */
|
|
3247
|
+
amount: string | null;
|
|
3248
|
+
/** The size on a cash out; null on a buy. */
|
|
3249
|
+
quantity: string | null;
|
|
3250
|
+
/** When the request ends, in microseconds since the Unix epoch. */
|
|
3251
|
+
expires_at: number;
|
|
3252
|
+
best_quote: ComboBestQuote;
|
|
3253
|
+
}
|
|
3254
|
+
/** `quote()` reply. It carries no price or size: the bind sets those. */
|
|
3255
|
+
interface ComboQuoteReply {
|
|
3256
|
+
quote_id: string;
|
|
3257
|
+
/** The amount as recorded. */
|
|
3258
|
+
amount: string;
|
|
3259
|
+
/** The player's `external_id`. */
|
|
3260
|
+
external_id: string;
|
|
3261
|
+
}
|
|
3262
|
+
/** `withdrawQuote()` reply. */
|
|
3263
|
+
interface ComboWithdrawReply {
|
|
3264
|
+
/** The `quote_id` that was withdrawn. */
|
|
3265
|
+
withdrawn: string;
|
|
3266
|
+
}
|
|
3267
|
+
/** Why a player's request ended without placing. */
|
|
3268
|
+
type ComboRequestClosedReason = "cancelled" | "expired" | "leg_not_quotable" | "unknown_leg" | "player_refused" | "maker_refused";
|
|
3269
|
+
/** `best_quote`: the best quote changed. */
|
|
3270
|
+
interface ComboBestQuoteEvent extends ComboBestQuote {
|
|
3271
|
+
rfq_id: string;
|
|
3272
|
+
market_id: string | null;
|
|
3273
|
+
}
|
|
3274
|
+
/** `placed`: the bind placed. The `accept()` reply plus `rfq_id`. */
|
|
3275
|
+
interface ComboPlacedEvent extends ComboPlacement {
|
|
3276
|
+
rfq_id: string;
|
|
3277
|
+
}
|
|
3278
|
+
/** `negotiation_closed` to the player: the request ended without placing. */
|
|
3279
|
+
interface ComboRequestClosedEvent {
|
|
3280
|
+
rfq_id: string;
|
|
3281
|
+
market_id: string | null;
|
|
3282
|
+
reason: ComboRequestClosedReason;
|
|
3283
|
+
}
|
|
3284
|
+
/** An event on the player's topic. Narrow on `event`. */
|
|
3285
|
+
type ComboPlayerEvent = {
|
|
3286
|
+
event: "best_quote";
|
|
3287
|
+
payload: ComboBestQuoteEvent;
|
|
3288
|
+
} | {
|
|
3289
|
+
event: "placed";
|
|
3290
|
+
payload: ComboPlacedEvent;
|
|
3291
|
+
} | {
|
|
3292
|
+
event: "negotiation_closed";
|
|
3293
|
+
payload: ComboRequestClosedEvent;
|
|
3294
|
+
};
|
|
3295
|
+
/** One leg as makers see it. */
|
|
3296
|
+
interface ComboRfqLeg {
|
|
3297
|
+
market_id: string;
|
|
3298
|
+
outcome: ComboOutcome;
|
|
3299
|
+
short_name: string;
|
|
3300
|
+
}
|
|
3301
|
+
/** `rfq_opened`: a player opened a request. */
|
|
3302
|
+
interface ComboRfqOpenedEvent {
|
|
3303
|
+
rfq_id: string;
|
|
3304
|
+
/** Null on a buy; the combination on a cash out. */
|
|
3305
|
+
market_id: string | null;
|
|
3306
|
+
/** The player's pseudonym. */
|
|
3307
|
+
external_id: string;
|
|
3308
|
+
/** The player's side; the maker takes the other. */
|
|
3309
|
+
side: "buy" | "sell";
|
|
3310
|
+
/** The stake on a buy; null on a cash out. */
|
|
3311
|
+
amount: string | null;
|
|
3312
|
+
/** The size on a cash out; null on a buy. */
|
|
3313
|
+
quantity: string | null;
|
|
3314
|
+
/** Price against this, not a constant. */
|
|
3315
|
+
max_price: string;
|
|
3316
|
+
/** Price against this, not a constant. */
|
|
3317
|
+
tick_size: string;
|
|
3318
|
+
expires_at: number;
|
|
3319
|
+
legs: ComboRfqLeg[];
|
|
3320
|
+
}
|
|
3321
|
+
/** Why a request ended, as the feed reports it. */
|
|
3322
|
+
type ComboRfqClosedReason = "placed" | "cancelled" | "expired" | "leg_not_quotable" | "unknown_leg" | "player_refused" | "maker_refused" | "ended";
|
|
3323
|
+
/** `rfq_closed`: a request ended. */
|
|
3324
|
+
interface ComboRfqClosedEvent {
|
|
3325
|
+
rfq_id: string;
|
|
3326
|
+
market_id: string | null;
|
|
3327
|
+
reason: ComboRfqClosedReason;
|
|
3328
|
+
}
|
|
3329
|
+
/** `quote_accepted`: this quote is about to be bound. */
|
|
3330
|
+
interface ComboQuoteAcceptedEvent {
|
|
3331
|
+
rfq_id: string;
|
|
3332
|
+
market_id: string | null;
|
|
3333
|
+
external_id: string;
|
|
3334
|
+
quote_id: string;
|
|
3335
|
+
}
|
|
3336
|
+
/** `placed` to the maker: this quote bound and the maker's order was placed. Both orders share the size and price. */
|
|
3337
|
+
interface ComboMakerPlacedEvent {
|
|
3338
|
+
rfq_id: string;
|
|
3339
|
+
market_id: string;
|
|
3340
|
+
external_id: string;
|
|
3341
|
+
quote_id: string;
|
|
3342
|
+
/** The maker's order. Its fills arrive on `fills`. */
|
|
3343
|
+
order_id: string;
|
|
3344
|
+
quantity: string;
|
|
3345
|
+
price: string;
|
|
3346
|
+
}
|
|
3347
|
+
/** Why one of the maker's quotes stopped standing. */
|
|
3348
|
+
type ComboQuoteClosedReason = "placed_elsewhere" | "maker_refused" | "cancelled" | "expired" | "leg_not_quotable" | "unknown_leg" | "player_refused";
|
|
3349
|
+
/** `negotiation_closed` to the maker: this quote stopped standing. */
|
|
3350
|
+
interface ComboQuoteClosedEvent {
|
|
3351
|
+
rfq_id: string;
|
|
3352
|
+
market_id: string | null;
|
|
3353
|
+
external_id: string;
|
|
3354
|
+
quote_id: string;
|
|
3355
|
+
reason: ComboQuoteClosedReason;
|
|
3356
|
+
}
|
|
3357
|
+
/** An event on the maker's topic. Narrow on `event`. */
|
|
3358
|
+
type ComboMakerEvent = {
|
|
3359
|
+
event: "rfq_opened";
|
|
3360
|
+
payload: ComboRfqOpenedEvent;
|
|
3361
|
+
} | {
|
|
3362
|
+
event: "rfq_closed";
|
|
3363
|
+
payload: ComboRfqClosedEvent;
|
|
3364
|
+
} | {
|
|
3365
|
+
event: "quote_accepted";
|
|
3366
|
+
payload: ComboQuoteAcceptedEvent;
|
|
3367
|
+
} | {
|
|
3368
|
+
event: "placed";
|
|
3369
|
+
payload: ComboMakerPlacedEvent;
|
|
3370
|
+
} | {
|
|
3371
|
+
event: "negotiation_closed";
|
|
3372
|
+
payload: ComboQuoteClosedEvent;
|
|
3373
|
+
};
|
|
3374
|
+
/**
|
|
3375
|
+
* A refusal `reason` the exchange documents for combo commands. The type stays
|
|
3376
|
+
* open (`string`) because a few reasons are sentences passed through verbatim.
|
|
3377
|
+
*/
|
|
3378
|
+
type ComboRefusalReason = "malformed_payload" | "malformed_id" | "malformed_money" | "malformed_leg" | "malformed_client_order_id" | "unknown_command" | "not_found" | "timeout" | "request_unavailable" | "not_the_requester" | "combo_minimum_two_markets_needed" | "combo_maximum_legs_exceeded" | "unknown_outcome" | "non_positive_amount" | "sub_cent_amount" | "insufficient_assets" | "draining" | "account_unreachable" | "unknown_leg" | "leg_not_quotable" | "duplicate_legs" | "request_not_started" | "unknown_combination" | "market_not_quotable" | "combination_unavailable" | "nothing_to_sell" | "price_moved" | "player_refused" | "maker_refused" | "market_not_trading" | "market_unavailable" | "price_out_of_range" | "below_one_contract" | "bind_in_progress" | "cancelled" | "expired" | "expires_at_required" | "cannot_quote_own_request" | "unknown_quote" | "unauthorized" | "insufficient_scope" | (string & {});
|
|
3379
|
+
/** What the player and maker sessions share: the joined channel, typed events and waiting. */
|
|
3380
|
+
declare abstract class ComboSession<E extends {
|
|
3381
|
+
event: string;
|
|
3382
|
+
payload: {
|
|
3383
|
+
rfq_id: string;
|
|
3384
|
+
};
|
|
3385
|
+
}> implements AsyncIterable<E> {
|
|
3386
|
+
#private;
|
|
3387
|
+
/** The underlying channel. Its `reply` is the latest join reply. */
|
|
3388
|
+
readonly channel: Channel;
|
|
3389
|
+
/** @internal */
|
|
3390
|
+
constructor(channel: Channel, events: ReadonlySet<string>, onEvent: ((event: E) => void | Promise<void>) | undefined);
|
|
3391
|
+
/** Your account's pseudonym for counterparties, from the join reply. */
|
|
3392
|
+
get externalId(): string;
|
|
3393
|
+
/** When the geolocation packet this join used expires (ISO 8601), or null. Rejoin before it. */
|
|
3394
|
+
get nextGeolocationAt(): string | null;
|
|
3395
|
+
/** @internal */
|
|
3396
|
+
_typed(msg: ChannelMessage): E | undefined;
|
|
3397
|
+
/** @internal Called for every message on the channel, before it is queued. */
|
|
3398
|
+
_receive(msg: ChannelMessage): Promise<void>;
|
|
3399
|
+
/** The events received so far (the latest 1000), oldest first. */
|
|
3400
|
+
get events(): readonly E[];
|
|
3401
|
+
/**
|
|
3402
|
+
* The next event, in arrival order. Rejects with `STXTimeoutException` when
|
|
3403
|
+
* none arrives within `timeoutMs`, and with `STXChannelException` once the
|
|
3404
|
+
* channel is closed. Use either this or `for await`, not both.
|
|
3405
|
+
*/
|
|
3406
|
+
next(timeoutMs?: number | null): Promise<E>;
|
|
3407
|
+
[Symbol.asyncIterator](): AsyncIterator<E>;
|
|
3408
|
+
/**
|
|
3409
|
+
* Resolve with the first event named `event` (or one of several) for
|
|
3410
|
+
* `rfqId`, looking first at events already received. Unlike `next()`, it
|
|
3411
|
+
* takes nothing from the queue. Rejects with `STXTimeoutException` after
|
|
3412
|
+
* `timeoutMs` (default 10000).
|
|
3413
|
+
*
|
|
3414
|
+
* @param event An event name, or several.
|
|
3415
|
+
* @param opts.rfqId Only events for this request.
|
|
3416
|
+
* @param opts.quoteId Only events for this quote (maker events).
|
|
3417
|
+
* @param opts.timeoutMs Milliseconds to wait. Default 10000.
|
|
3418
|
+
*/
|
|
3419
|
+
waitFor<K extends E["event"]>(event: K | readonly K[], opts?: {
|
|
3420
|
+
rfqId?: string;
|
|
3421
|
+
quoteId?: string;
|
|
3422
|
+
timeoutMs?: number;
|
|
3423
|
+
}): Promise<Extract<E, {
|
|
3424
|
+
event: K;
|
|
3425
|
+
}>>;
|
|
3426
|
+
/** Leave the topic. Requests opened and quotes placed on this channel end, as on any close. */
|
|
3427
|
+
leave(): Promise<void>;
|
|
3428
|
+
/** @internal Send a command and map a refusal to the combo exceptions. */
|
|
3429
|
+
_command<T>(command: string, payload: Record<string, unknown>, timeoutMs?: number): Promise<T>;
|
|
3430
|
+
}
|
|
3431
|
+
/**
|
|
3432
|
+
* The player's side of combos, on `rfq:<user_id>`. Get one with
|
|
3433
|
+
* `ws.comboPlayer()`.
|
|
3434
|
+
*
|
|
3435
|
+
* Available on US demo.
|
|
3436
|
+
*
|
|
3437
|
+
* A request belongs to this channel: leaving, a dropped socket or a geo lapse
|
|
3438
|
+
* ends it `cancelled`, and the SDK's automatic rejoin does not bring it back.
|
|
3439
|
+
* Every refusal throws `STXComboRefusedException` with the exchange's
|
|
3440
|
+
* `reason` in `code`.
|
|
3441
|
+
*/
|
|
3442
|
+
declare class ComboPlayer extends ComboSession<ComboPlayerEvent> {
|
|
3443
|
+
/** @internal */
|
|
3444
|
+
constructor(channel: Channel, onEvent?: (event: ComboPlayerEvent) => void | Promise<void>);
|
|
3445
|
+
/**
|
|
3446
|
+
* `request_quote`: ask makers to quote on these legs for a stake. `amount`
|
|
3447
|
+
* is the stake as a decimal string in whole cents, e.g. `"250.00"`. Makers
|
|
3448
|
+
* quote what you win; quotes arrive as `best_quote` events.
|
|
3449
|
+
*
|
|
3450
|
+
* @param legs Two or more `open` markets and the outcome the combination needs of each.
|
|
3451
|
+
* @param amount The stake in dollars, e.g. `"250.00"`.
|
|
3452
|
+
*/
|
|
3453
|
+
requestQuote(legs: readonly ComboLeg[], amount: string): Promise<ComboRequestReply>;
|
|
3454
|
+
/**
|
|
3455
|
+
* `cash_out`: ask makers to quote for what you hold of a combination, by the
|
|
3456
|
+
* `market_id` from `placed`. The exchange sets the size.
|
|
3457
|
+
*
|
|
3458
|
+
* @param marketId The combination's market id.
|
|
3459
|
+
*/
|
|
3460
|
+
cashOut(marketId: string): Promise<ComboCashOutReply>;
|
|
3461
|
+
/**
|
|
3462
|
+
* `accept`: bind the request at `amount` or more, normally the amount
|
|
3463
|
+
* `best_quote` showed. The best live quote binds whoever made it, so the
|
|
3464
|
+
* placement can be better than `amount`. Waits up to 35 s.
|
|
3465
|
+
*
|
|
3466
|
+
* Throws `STXComboPriceMovedException` (with the live `best`) when nothing
|
|
3467
|
+
* at least as good is live; the request stays open and you can accept again.
|
|
3468
|
+
* The reply says what was placed; fills arrive on `fills`.
|
|
3469
|
+
*
|
|
3470
|
+
* @param rfqId The request.
|
|
3471
|
+
* @param quoteId The quote you saw, normally from `best_quote`.
|
|
3472
|
+
* @param amount The least amount you take, e.g. `"1750.00"`.
|
|
3473
|
+
*/
|
|
3474
|
+
accept(rfqId: string, quoteId: string, amount: string): Promise<ComboPlacement>;
|
|
3475
|
+
/**
|
|
3476
|
+
* `cancel`: end the request and drop every quote on it.
|
|
3477
|
+
*
|
|
3478
|
+
* @param rfqId The request.
|
|
3479
|
+
*/
|
|
3480
|
+
cancel(rfqId: string): Promise<ComboCancelReply>;
|
|
3481
|
+
/**
|
|
3482
|
+
* `snapshot`: the request now, with the live best quote. Not delayed like `best_quote` events.
|
|
3483
|
+
*
|
|
3484
|
+
* @param rfqId The request.
|
|
3485
|
+
*/
|
|
3486
|
+
snapshot(rfqId: string): Promise<ComboSnapshot>;
|
|
3487
|
+
}
|
|
3488
|
+
/**
|
|
3489
|
+
* The maker's side of combos, on `combo_quote:<user_id>`. Get one with
|
|
3490
|
+
* `ws.comboMaker()`. Joining subscribes to every request opened after the
|
|
3491
|
+
* join (`rfq_opened`); earlier requests are not replayed.
|
|
3492
|
+
*
|
|
3493
|
+
* Available on US demo.
|
|
3494
|
+
*
|
|
3495
|
+
* A quote belongs to this channel: leaving or a dropped socket withdraws it.
|
|
3496
|
+
* Every refusal throws `STXComboRefusedException` with the exchange's
|
|
3497
|
+
* `reason` in `code`.
|
|
3498
|
+
*/
|
|
3499
|
+
declare class ComboMaker extends ComboSession<ComboMakerEvent> {
|
|
3500
|
+
/** @internal */
|
|
3501
|
+
constructor(channel: Channel, onEvent?: (event: ComboMakerEvent) => void | Promise<void>);
|
|
3502
|
+
/**
|
|
3503
|
+
* `quote`: offer `amount` on a request. On a buy it is what the player wins;
|
|
3504
|
+
* on a cash out, what you pay for the whole size. Price it against the
|
|
3505
|
+
* request's `max_price` and `tick_size`. `expiresInMs` (a positive integer)
|
|
3506
|
+
* counts from receipt; the quote ends no later than its request.
|
|
3507
|
+
* `clientOrderId` (at most 255 bytes) is copied onto your order if it binds.
|
|
3508
|
+
*
|
|
3509
|
+
* @param rfqId The request, from `rfq_opened`.
|
|
3510
|
+
* @param amount In dollars, e.g. `"1750.00"`.
|
|
3511
|
+
* @param expiresInMs How long the quote stands, in milliseconds.
|
|
3512
|
+
* @param opts.clientOrderId Copied onto your order if the quote binds.
|
|
3513
|
+
*/
|
|
3514
|
+
quote(rfqId: string, amount: string, expiresInMs: number, opts?: {
|
|
3515
|
+
clientOrderId?: string | null;
|
|
3516
|
+
}): Promise<ComboQuoteReply>;
|
|
3517
|
+
/**
|
|
3518
|
+
* `withdraw_quote`: remove one of your quotes.
|
|
3519
|
+
*
|
|
3520
|
+
* @param rfqId The request.
|
|
3521
|
+
* @param quoteId Your quote, from the `quote()` reply.
|
|
3522
|
+
*/
|
|
3523
|
+
withdrawQuote(rfqId: string, quoteId: string): Promise<ComboWithdrawReply>;
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3104
3526
|
/** Events that carry state on join, by channel name (topic prefix). */
|
|
3105
3527
|
declare const SNAPSHOT_EVENTS: Readonly<Record<string, readonly string[]>>;
|
|
3106
3528
|
/** One pushed frame. */
|
|
@@ -3159,6 +3581,8 @@ declare class Channel implements AsyncIterable<ChannelMessage> {
|
|
|
3159
3581
|
joinRef: string | null;
|
|
3160
3582
|
joined: boolean;
|
|
3161
3583
|
closed: boolean;
|
|
3584
|
+
/** @internal Runs before every (re)join, e.g. to refresh a geolocation packet in `joinPayload`. */
|
|
3585
|
+
_beforeJoin: (() => Promise<void>) | undefined;
|
|
3162
3586
|
constructor(ws: STXWebSocket, topic: string, joinPayload: Record<string, unknown>, onMessage: MessageHandler | undefined, opts: {
|
|
3163
3587
|
pingIntervalMs: number | null;
|
|
3164
3588
|
queueSize: number;
|
|
@@ -3424,6 +3848,25 @@ declare class STXWebSocket {
|
|
|
3424
3848
|
userInfo(opts?: {
|
|
3425
3849
|
onMessage?: MessageHandler;
|
|
3426
3850
|
}): Promise<Channel>;
|
|
3851
|
+
/**
|
|
3852
|
+
* Join `rfq:{user_id}` and return a `ComboPlayer`: request quotes on a
|
|
3853
|
+
* combination, cash one out, accept, cancel and read a request.
|
|
3854
|
+
*
|
|
3855
|
+
* Available on US demo.
|
|
3856
|
+
* Where combos are not available, rejects with
|
|
3857
|
+
* `STXCombosUnavailableException`. Other join refusals (a read-only key, an
|
|
3858
|
+
* account that may not trade) reject with `STXComboRefusedException`.
|
|
3859
|
+
*/
|
|
3860
|
+
comboPlayer(opts?: ComboJoinOptions<ComboPlayerEvent>): Promise<ComboPlayer>;
|
|
3861
|
+
/**
|
|
3862
|
+
* Join `combo_quote:{user_id}` and return a `ComboMaker`: receive every
|
|
3863
|
+
* request opened from now on (`rfq_opened`), quote and withdraw quotes.
|
|
3864
|
+
*
|
|
3865
|
+
* Available on US demo.
|
|
3866
|
+
* Where combos are not available, rejects with
|
|
3867
|
+
* `STXCombosUnavailableException`.
|
|
3868
|
+
*/
|
|
3869
|
+
comboMaker(opts?: ComboJoinOptions<ComboMakerEvent>): Promise<ComboMaker>;
|
|
3427
3870
|
/**
|
|
3428
3871
|
* Join `topic` with `payload` and wait for the reply. Rejects with
|
|
3429
3872
|
* `STXChannelException` carrying the server's reason (for example
|
|
@@ -3694,14 +4137,17 @@ declare class STX {
|
|
|
3694
4137
|
* `markets.write`, which STX grants, from the client's IP allow-list.
|
|
3695
4138
|
*
|
|
3696
4139
|
* Returns one result per market, in order: `created` or `exists` (both with
|
|
3697
|
-
* `market_id`), or `rejected` with a `reason`.
|
|
4140
|
+
* `market_id`), `valid` with `dryRun`, or `rejected` with a `reason`. Each
|
|
4141
|
+
* result's `index` is its position in `markets`, and `market` is that market
|
|
4142
|
+
* as requested. A rejected market is a
|
|
3698
4143
|
* result, not an error, and resending is safe: a market that is already
|
|
3699
4144
|
* listed comes back `exists`. A refused request throws (`403` without
|
|
3700
4145
|
* `markets.write`, `404` unknown event, `422` event not open).
|
|
3701
4146
|
*
|
|
3702
4147
|
* Each `line` must be a positive number ending in `.5`, e.g. `18.5`. More
|
|
3703
4148
|
* than `MAX_MARKETS_PER_REQUEST` markets throws `TypeError` before any
|
|
3704
|
-
* request. `
|
|
4149
|
+
* request. `dryRun` runs every check and creates nothing. `validate` also
|
|
4150
|
+
* needs the `events` scope.
|
|
3705
4151
|
*/
|
|
3706
4152
|
createMarkets(eventId: string, markets: readonly NewMarketInput[], opts?: CreateMarketsOptions): Promise<CreateMarketResult[]>;
|
|
3707
4153
|
/** `GET /api/v1/orders`: one page of your orders, newest first. */
|
|
@@ -3826,4 +4272,4 @@ declare class STX {
|
|
|
3826
4272
|
websocket(opts?: Omit<STXWebSocketOptions, "rest">): STXWebSocket;
|
|
3827
4273
|
}
|
|
3828
4274
|
|
|
3829
|
-
export { type
|
|
4275
|
+
export { type EventTeam as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, type ComboPlayerEvent as D, type ComboQuoteAcceptedEvent as E, type ComboQuoteClosedEvent as F, type ComboQuoteClosedReason as G, type ComboQuoteReply as H, type ComboRefusalReason as I, type ComboRequestClosedEvent as J, type ComboRequestClosedReason as K, type ComboRequestReply as L, type ComboRfqClosedEvent as M, type ComboRfqClosedReason as N, type ComboRfqLeg as O, type ComboRfqOpenedEvent as P, type ComboSnapshot as Q, type ComboWithdrawReply as R, type CreateMarketResult as S, type CreateMarketsOptions as T, Environment as U, Environments as V, type Error$1 as W, type Event as X, type EventPlayer as Y, type EventPlayers as Z, type EventStat as _, type AccountChange as a, STXInsufficientScopeException as a$, type EventsQuery as a0, type FeeTransaction as a1, type FetchLike as a2, type Fill as a3, type FillsQuery as a4, type GeoCheckResult as a5, type GeoLocationProvider as a6, type GeoOption as a7, type GeoRejection as a8, HOSTS as a9, Page as aA, type PageQuery as aB, type PaymentTransaction as aC, type Position as aD, type PrivateKeyInput as aE, type ProfileUpdate as aF, type RecentTrade as aG, ReconnectPolicy as aH, type ReconnectPolicyOptions as aI, Region as aJ, type ResponseEvent as aK, RetryPolicy as aL, type RetryPolicyOptions as aM, SIGNATURE_HEADER as aN, SNAPSHOT_EVENTS as aO, STX as aP, STXAPIException as aQ, STXAuthenticationException as aR, STXChannelException as aS, STXComboPriceMovedException as aT, STXComboRefusedException as aU, STXCombosUnavailableException as aV, STXConfigException as aW, type STXEnvironment as aX, STXException as aY, STXForbiddenException as aZ, STXGeoLocationException as a_, KEY_HEADER as aa, type KnownStat as ab, type Leaderboard as ac, type LeaderboardEntry as ad, type LeaderboardStanding as ae, type Logger as af, MAX_MARKETS_PER_REQUEST as ag, type Market as ah, type MarketFilter as ai, type MarketRejectionReason as aj, type MarketRequestEcho as ak, type MarketStat as al, type MarketStatsQuery as am, type MarketsQuery as an, type Me as ao, type MessageHandler as ap, NO_RETRY as aq, type NewMarketInput as ar, type NewOrder as as, type NewOrderInput as at, OPERATIONS as au, type Operation as av, type OperationId as aw, type Order as ax, type OrderOptions as ay, type OrdersQuery as az, type AccountChangeKind as b, STXInvalidTokenException as b0, STXNotFoundException as b1, type STXOptions as b2, STXRateLimitException as b3, STXRejectedException as b4, STXServerException as b5, STXTimeoutException as b6, STXTransportException as b7, STXValidationException as b8, STXWebSocket as b9, signerFromPrivateKey as bA, socketUrlFor as bB, type STXWebSocketOptions as ba, type Settlement as bb, type SettlementsQuery as bc, type Signer as bd, type Stat as be, type StatDetail as bf, Stats as bg, type StrList as bh, TERMINAL_ORDER_STATUSES as bi, TIMESTAMP_HEADER as bj, type Transaction as bk, USER_AGENT as bl, VERSION as bm, type WebSocketAuthContext as bn, baseUrlFor as bo, buildMessage as bp, environmentNamed as bq, errorForStatus as br, geoRejection as bs, handshakePath as bt, isValidLine as bu, loadPrivateKey as bv, models as bw, orderBody as bx, requestPath as by, resolveHost 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, Channel as k, ChannelMessage as l, type ComboBestQuote as m, type ComboBestQuoteEvent as n, type ComboCancelReply as o, type ComboCashOutReply as p, type ComboJoinOptions as q, type ComboJoinReply as r, type ComboLeg as s, ComboMaker as t, type ComboMakerEvent as u, type ComboMakerPlacedEvent as v, type ComboOutcome as w, type ComboPlacedEvent as x, type ComboPlacement as y, ComboPlayer as z };
|
package/dist/index.cjs
CHANGED
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var _chunkL2DEU7R6cjs = require('./chunk-L2DEU7R6.cjs');
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
|
|
68
67
|
|
|
68
|
+
var _chunkJHREXRKDcjs = require('./chunk-JHREXRKD.cjs');
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
@@ -123,5 +123,15 @@ var _chunkL2DEU7R6cjs = require('./chunk-L2DEU7R6.cjs');
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
exports.AccountView = _chunkJHREXRKDcjs.AccountView; exports.ApiKeyCredentials = _chunkJHREXRKDcjs.ApiKeyCredentials; exports.Channel = _chunkJHREXRKDcjs.Channel; exports.ChannelMessage = _chunkJHREXRKDcjs.ChannelMessage; exports.ComboMaker = _chunkJHREXRKDcjs.ComboMaker; exports.ComboPlayer = _chunkJHREXRKDcjs.ComboPlayer; exports.Environment = _chunkJHREXRKDcjs.Environment; exports.Environments = _chunkJHREXRKDcjs.Environments; exports.HOSTS = _chunkJHREXRKDcjs.HOSTS; exports.KEY_HEADER = _chunkJHREXRKDcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunkJHREXRKDcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunkJHREXRKDcjs.NO_RETRY; exports.OPERATIONS = _chunkJHREXRKDcjs.OPERATIONS; exports.Page = _chunkJHREXRKDcjs.Page; exports.ReconnectPolicy = _chunkJHREXRKDcjs.ReconnectPolicy; exports.Region = _chunkJHREXRKDcjs.Region; exports.RetryPolicy = _chunkJHREXRKDcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunkJHREXRKDcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunkJHREXRKDcjs.SNAPSHOT_EVENTS; exports.STX = _chunkJHREXRKDcjs.STX; exports.STXAPIException = _chunkJHREXRKDcjs.STXAPIException; exports.STXAuthenticationException = _chunkJHREXRKDcjs.STXAuthenticationException; exports.STXChannelException = _chunkJHREXRKDcjs.STXChannelException; exports.STXComboPriceMovedException = _chunkJHREXRKDcjs.STXComboPriceMovedException; exports.STXComboRefusedException = _chunkJHREXRKDcjs.STXComboRefusedException; exports.STXCombosUnavailableException = _chunkJHREXRKDcjs.STXCombosUnavailableException; exports.STXConfigException = _chunkJHREXRKDcjs.STXConfigException; exports.STXException = _chunkJHREXRKDcjs.STXException; exports.STXForbiddenException = _chunkJHREXRKDcjs.STXForbiddenException; exports.STXGeoLocationException = _chunkJHREXRKDcjs.STXGeoLocationException; exports.STXInsufficientScopeException = _chunkJHREXRKDcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkJHREXRKDcjs.STXInvalidTokenException; exports.STXNotFoundException = _chunkJHREXRKDcjs.STXNotFoundException; exports.STXRateLimitException = _chunkJHREXRKDcjs.STXRateLimitException; exports.STXRejectedException = _chunkJHREXRKDcjs.STXRejectedException; exports.STXServerException = _chunkJHREXRKDcjs.STXServerException; exports.STXTimeoutException = _chunkJHREXRKDcjs.STXTimeoutException; exports.STXTransportException = _chunkJHREXRKDcjs.STXTransportException; exports.STXValidationException = _chunkJHREXRKDcjs.STXValidationException; exports.STXWebSocket = _chunkJHREXRKDcjs.STXWebSocket; exports.Stats = _chunkJHREXRKDcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunkJHREXRKDcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunkJHREXRKDcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunkJHREXRKDcjs.USER_AGENT; exports.VERSION = _chunkJHREXRKDcjs.VERSION; exports.baseUrlFor = _chunkJHREXRKDcjs.baseUrlFor; exports.buildMessage = _chunkJHREXRKDcjs.buildMessage; exports.centsToDollars = _chunkJHREXRKDcjs.centsToDollars; exports.convertBook = _chunkJHREXRKDcjs.convertBook; exports.convertMarketChannelPayload = _chunkJHREXRKDcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunkJHREXRKDcjs.convertMarketPayload; exports.convertMarketsFrame = _chunkJHREXRKDcjs.convertMarketsFrame; exports.environmentNamed = _chunkJHREXRKDcjs.environmentNamed; exports.errorForStatus = _chunkJHREXRKDcjs.errorForStatus; exports.geoRejection = _chunkJHREXRKDcjs.geoRejection; exports.handshakePath = _chunkJHREXRKDcjs.handshakePath; exports.isValidLine = _chunkJHREXRKDcjs.isValidLine; exports.loadPrivateKey = _chunkJHREXRKDcjs.loadPrivateKey; exports.orderBody = _chunkJHREXRKDcjs.orderBody; exports.requestPath = _chunkJHREXRKDcjs.requestPath; exports.resolveHost = _chunkJHREXRKDcjs.resolveHost; exports.resolveSettings = _chunkJHREXRKDcjs.resolveSettings; exports.signerFromPrivateKey = _chunkJHREXRKDcjs.signerFromPrivateKey; exports.socketUrlFor = _chunkJHREXRKDcjs.socketUrlFor; exports.toDollarString = _chunkJHREXRKDcjs.toDollarString; exports.toQuantity = _chunkJHREXRKDcjs.toQuantity;
|
|
127
137
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -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;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;AACF,
|
|
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;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;AACF,m8HAAC","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 Channel, l as ChannelMessage, m as
|
|
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 Channel, l as ChannelMessage, m as ComboBestQuote, n as ComboBestQuoteEvent, o as ComboCancelReply, p as ComboCashOutReply, q as ComboJoinOptions, r as ComboJoinReply, s as ComboLeg, t as ComboMaker, u as ComboMakerEvent, v as ComboMakerPlacedEvent, w as ComboOutcome, x as ComboPlacedEvent, y as ComboPlacement, z as ComboPlayer, D as ComboPlayerEvent, E as ComboQuoteAcceptedEvent, F as ComboQuoteClosedEvent, G as ComboQuoteClosedReason, H as ComboQuoteReply, I as ComboRefusalReason, J as ComboRequestClosedEvent, K as ComboRequestClosedReason, L as ComboRequestReply, M as ComboRfqClosedEvent, N as ComboRfqClosedReason, O as ComboRfqLeg, P as ComboRfqOpenedEvent, Q as ComboSnapshot, R as ComboWithdrawReply, S as CreateMarketResult, T as CreateMarketsOptions, U as Environment, V as Environments, W as Error, X as Event, Y as EventPlayer, Z as EventPlayers, _ as EventStat, $ as EventTeam, a0 as EventsQuery, a1 as FeeTransaction, a2 as FetchLike, a3 as Fill, a4 as FillsQuery, a5 as GeoCheckResult, a6 as GeoLocationProvider, a7 as GeoOption, a8 as GeoRejection, a9 as HOSTS, aa as KEY_HEADER, ab as KnownStat, ac as Leaderboard, ad as LeaderboardEntry, ae as LeaderboardStanding, af as Logger, ag as MAX_MARKETS_PER_REQUEST, ah as Market, ai as MarketFilter, aj as MarketRejectionReason, ak as MarketRequestEcho, al as MarketStat, am as MarketStatsQuery, an as MarketsQuery, ao as Me, ap as MessageHandler, aq as NO_RETRY, ar as NewMarketInput, as as NewOrder, at as NewOrderInput, au as OPERATIONS, av as Operation, aw as OperationId, ax as Order, ay as OrderOptions, az as OrdersQuery, aA as Page, aB as PageQuery, aC as PaymentTransaction, aD as Position, aE as PrivateKeyInput, aF as ProfileUpdate, aG as RecentTrade, aH as ReconnectPolicy, aI as ReconnectPolicyOptions, aJ as Region, aK as ResponseEvent, aL as RetryPolicy, aM as RetryPolicyOptions, aN as SIGNATURE_HEADER, aO as SNAPSHOT_EVENTS, aP as STX, aQ as STXAPIException, aR as STXAuthenticationException, aS as STXChannelException, aT as STXComboPriceMovedException, aU as STXComboRefusedException, aV as STXCombosUnavailableException, aW as STXConfigException, aX as STXEnvironment, aY as STXException, aZ as STXForbiddenException, a_ as STXGeoLocationException, a$ as STXInsufficientScopeException, b0 as STXInvalidTokenException, b1 as STXNotFoundException, b2 as STXOptions, b3 as STXRateLimitException, b4 as STXRejectedException, b5 as STXServerException, b6 as STXTimeoutException, b7 as STXTransportException, b8 as STXValidationException, b9 as STXWebSocket, ba as STXWebSocketOptions, bb as Settlement, bc as SettlementsQuery, bd as Signer, be as Stat, bf as StatDetail, bg as Stats, bh as StrList, bi as TERMINAL_ORDER_STATUSES, bj as TIMESTAMP_HEADER, bk as Transaction, bl as USER_AGENT, bm as VERSION, bn as WebSocketAuthContext, bo as baseUrlFor, bp as buildMessage, bq as environmentNamed, br as errorForStatus, bs as geoRejection, bt as handshakePath, bu as isValidLine, bv as loadPrivateKey, bw as models, bx as orderBody, by as requestPath, bz as resolveHost, bA as signerFromPrivateKey, bB as socketUrlFor } from './client-jcBBoio1.cjs';
|
|
2
2
|
import 'node:crypto';
|
|
3
3
|
|
|
4
4
|
/** The fully resolved configuration the clients consume. */
|