pmxtjs 2.51.2 → 2.51.3
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/README.md +14 -5
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +6 -0
- package/dist/esm/generated/src/apis/DefaultApi.js +6 -0
- package/dist/esm/generated/src/models/CreateOrderParams.d.ts +20 -0
- package/dist/esm/generated/src/models/CreateOrderParams.js +11 -0
- package/dist/esm/pmxt/client.d.ts +40 -9
- package/dist/esm/pmxt/client.js +78 -3
- package/dist/esm/pmxt/hosted-typed-data.d.ts +1 -1
- package/dist/esm/pmxt/hosted-typed-data.js +14 -0
- package/dist/esm/pmxt/models.d.ts +17 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +6 -0
- package/dist/generated/src/apis/DefaultApi.js +6 -0
- package/dist/generated/src/models/CreateOrderParams.d.ts +20 -0
- package/dist/generated/src/models/CreateOrderParams.js +12 -1
- package/dist/pmxt/client.d.ts +40 -9
- package/dist/pmxt/client.js +78 -3
- package/dist/pmxt/hosted-typed-data.d.ts +1 -1
- package/dist/pmxt/hosted-typed-data.js +14 -0
- package/dist/pmxt/models.d.ts +17 -0
- package/generated/docs/ArbitrageOpportunity.md +0 -29
- package/generated/docs/Balance.md +0 -25
- package/generated/docs/BaseRequest.md +0 -21
- package/generated/docs/BaseResponse.md +0 -22
- package/generated/docs/BuildOrder200Response.md +0 -23
- package/generated/docs/BuildOrderRequest.md +0 -22
- package/generated/docs/BuiltOrder.md +0 -26
- package/generated/docs/BuiltOrderTx.md +0 -24
- package/generated/docs/CancelOrderRequest.md +0 -22
- package/generated/docs/CloseRequest.md +0 -22
- package/generated/docs/CompareMarketPrices200Response.md +0 -23
- package/generated/docs/CompareMarketPricesRequest.md +0 -22
- package/generated/docs/CreateOrder200Response.md +0 -23
- package/generated/docs/CreateOrderParams.md +2 -30
- package/generated/docs/CreateOrderRequest.md +0 -22
- package/generated/docs/DataFeedsApi.md +0 -329
- package/generated/docs/DefaultApi.md +3 -1438
- package/generated/docs/ErrorDetail.md +0 -25
- package/generated/docs/ErrorResponse.md +0 -22
- package/generated/docs/EventFetchParams.md +0 -35
- package/generated/docs/EventFilterCriteria.md +0 -26
- package/generated/docs/EventFilterCriteriaTotalVolume.md +0 -22
- package/generated/docs/EventMatchResult.md +0 -22
- package/generated/docs/ExchangeCredentials.md +0 -29
- package/generated/docs/ExchangeCredentialsSignatureType.md +0 -20
- package/generated/docs/ExchangeOptions.md +0 -27
- package/generated/docs/ExecutionPriceResult.md +0 -23
- package/generated/docs/FeedFetchHistoricalPrices200Response.md +0 -22
- package/generated/docs/FeedFetchOHLCV200Response.md +0 -22
- package/generated/docs/FeedFetchOracleHistory200Response.md +0 -22
- package/generated/docs/FeedFetchOracleRound200Response.md +0 -22
- package/generated/docs/FeedFetchOrderBook200Response.md +0 -22
- package/generated/docs/FeedFetchOrderBook200ResponseData.md +0 -25
- package/generated/docs/FeedFetchTicker200Response.md +0 -22
- package/generated/docs/FeedFetchTickers200Response.md +0 -22
- package/generated/docs/FeedList200Response.md +0 -22
- package/generated/docs/FeedLoadMarkets200Response.md +0 -22
- package/generated/docs/FeedMarket.md +0 -27
- package/generated/docs/FeedOracleRound.md +0 -28
- package/generated/docs/FeedTicker.md +0 -42
- package/generated/docs/FetchArbitrage200Response.md +0 -23
- package/generated/docs/FetchArbitrageParams.md +0 -24
- package/generated/docs/FetchBalance200Response.md +0 -23
- package/generated/docs/FetchEvent200Response.md +0 -23
- package/generated/docs/FetchEventMatches200Response.md +0 -23
- package/generated/docs/FetchEventMatchesParams.md +0 -29
- package/generated/docs/FetchEvents200Response.md +0 -23
- package/generated/docs/FetchEventsPaginated200Response.md +0 -23
- package/generated/docs/FetchMarket200Response.md +0 -23
- package/generated/docs/FetchMarketMatches200Response.md +0 -23
- package/generated/docs/FetchMarketMatchesParams.md +0 -32
- package/generated/docs/FetchMarkets200Response.md +0 -23
- package/generated/docs/FetchMarketsPaginated200Response.md +0 -23
- package/generated/docs/FetchMatchedMarkets200Response.md +0 -23
- package/generated/docs/FetchMatchedMarketsParams.md +0 -24
- package/generated/docs/FetchMyTrades200Response.md +0 -23
- package/generated/docs/FetchOHLCV200Response.md +0 -23
- package/generated/docs/FetchOpenOrders200Response.md +0 -23
- package/generated/docs/FetchOrderBook200Response.md +0 -23
- package/generated/docs/FetchOrderBookParams.md +0 -24
- package/generated/docs/FetchOrderBooks200Response.md +0 -23
- package/generated/docs/FetchOrderBooksRequest.md +0 -22
- package/generated/docs/FetchPositions200Response.md +0 -23
- package/generated/docs/FetchSeries200Response.md +0 -23
- package/generated/docs/FetchTrades200Response.md +0 -23
- package/generated/docs/FilterEventsRequest.md +0 -22
- package/generated/docs/FilterEventsRequestArgsInner.md +0 -26
- package/generated/docs/FilterMarketsRequest.md +0 -22
- package/generated/docs/FilterMarketsRequestArgsInner.md +0 -31
- package/generated/docs/GetExecutionPrice200Response.md +0 -23
- package/generated/docs/GetExecutionPriceDetailed200Response.md +0 -23
- package/generated/docs/GetExecutionPriceDetailedRequest.md +0 -22
- package/generated/docs/GetExecutionPriceRequest.md +0 -22
- package/generated/docs/GetExecutionPriceRequestArgsInner.md +0 -27
- package/generated/docs/HealthCheck200Response.md +0 -22
- package/generated/docs/HistoryFilterParams.md +0 -24
- package/generated/docs/LoadMarkets200Response.md +0 -23
- package/generated/docs/LoadMarketsRequest.md +0 -22
- package/generated/docs/MarketFilterCriteria.md +0 -31
- package/generated/docs/MarketFilterCriteriaLiquidity.md +0 -22
- package/generated/docs/MarketFilterCriteriaOpenInterest.md +0 -22
- package/generated/docs/MarketFilterCriteriaPrice.md +0 -23
- package/generated/docs/MarketFilterCriteriaResolutionDate.md +0 -22
- package/generated/docs/MarketFilterCriteriaVolume.md +0 -22
- package/generated/docs/MarketFilterCriteriaVolume24h.md +0 -22
- package/generated/docs/MarketFilterParams.md +0 -34
- package/generated/docs/MarketOutcome.md +0 -26
- package/generated/docs/MatchResult.md +0 -27
- package/generated/docs/MatchedMarketPair.md +0 -30
- package/generated/docs/MyTradesParams.md +0 -26
- package/generated/docs/OHLCVParams.md +0 -24
- package/generated/docs/Order.md +0 -37
- package/generated/docs/OrderBook.md +0 -27
- package/generated/docs/OrderHistoryParams.md +0 -25
- package/generated/docs/OrderLevel.md +0 -23
- package/generated/docs/PaginatedEventsResult.md +0 -23
- package/generated/docs/PaginatedMarketsResult.md +0 -23
- package/generated/docs/Position.md +0 -32
- package/generated/docs/PriceCandle.md +0 -26
- package/generated/docs/PriceComparison.md +0 -27
- package/generated/docs/SubmitOrderRequest.md +0 -22
- package/generated/docs/Trade.md +0 -26
- package/generated/docs/TradesParams.md +0 -23
- package/generated/docs/UnifiedEvent.md +0 -33
- package/generated/docs/UnifiedMarket.md +0 -44
- package/generated/docs/UnifiedSeries.md +0 -31
- package/generated/docs/UserTrade.md +0 -32
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +6 -0
- package/generated/src/models/CreateOrderParams.ts +25 -0
- package/package.json +2 -2
- package/pmxt/client.ts +92 -11
- package/pmxt/hosted-typed-data.ts +17 -1
- package/pmxt/models.ts +20 -0
package/dist/pmxt/client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* OpenAPI client, matching the Python API exactly.
|
|
6
6
|
*/
|
|
7
7
|
import { Configuration, DefaultApi, ExchangeCredentials } from "../generated/src/index.js";
|
|
8
|
-
import { Balance, BuiltOrder,
|
|
8
|
+
import { Balance, BuiltOrder, CreateOrderInput, EventFetchParams, EventFilterCriteria, EventFilterFunction, ExecutionPriceResult, FetchOrderBookParams, MarketFetchParams, MarketFilterCriteria, MarketFilterFunction, MarketOutcome, MyTradesParams, Order, OrderBook, OrderHistoryParams, PaginatedMarketsResult, PaginatedEventsResult, Position, SeriesFetchParams, PriceCandle, SubscribedAddressSnapshot, SubscriptionOption, Trade, UnifiedEvent, UnifiedMarket, UnifiedSeries, UserTrade, FirehoseEvent, FetchMatchedMarketClustersParams } from "./models.js";
|
|
9
9
|
import { ServerManager } from "./server-manager.js";
|
|
10
10
|
import type { Signer } from "./signers.js";
|
|
11
11
|
import { Escrow } from "./escrow.js";
|
|
@@ -336,7 +336,13 @@ export declare abstract class Exchange {
|
|
|
336
336
|
* ```
|
|
337
337
|
*/
|
|
338
338
|
watchAllOrderBooks(venues?: string[]): Promise<FirehoseEvent>;
|
|
339
|
-
/**
|
|
339
|
+
/**
|
|
340
|
+
* Stream all orderbook updates across venues.
|
|
341
|
+
*
|
|
342
|
+
* @deprecated Use {@link watchAllOrderBooks} instead.
|
|
343
|
+
* @param venues - Optional venue filter
|
|
344
|
+
* @returns Next event with source, symbol, and orderbook
|
|
345
|
+
*/
|
|
340
346
|
firehose(venues?: string[]): Promise<FirehoseEvent>;
|
|
341
347
|
/**
|
|
342
348
|
* Watch real-time trade updates via WebSocket.
|
|
@@ -412,17 +418,18 @@ export declare abstract class Exchange {
|
|
|
412
418
|
* const order = await exchange.submitOrder(built);
|
|
413
419
|
*
|
|
414
420
|
* // Using outcome shorthand:
|
|
421
|
+
* const yes = market.yes;
|
|
422
|
+
* if (!yes) throw new Error("Market has no YES outcome");
|
|
423
|
+
*
|
|
415
424
|
* const built2 = await exchange.buildOrder({
|
|
416
|
-
* outcome:
|
|
425
|
+
* outcome: yes,
|
|
417
426
|
* side: "buy",
|
|
418
427
|
* type: "market",
|
|
419
428
|
* amount: 10
|
|
420
429
|
* });
|
|
421
430
|
* ```
|
|
422
431
|
*/
|
|
423
|
-
buildOrder(params:
|
|
424
|
-
outcome?: MarketOutcome;
|
|
425
|
-
}): Promise<BuiltOrder>;
|
|
432
|
+
buildOrder(params: CreateOrderInput): Promise<BuiltOrder>;
|
|
426
433
|
private _discoverHostedAccount;
|
|
427
434
|
private _executeSorOrder;
|
|
428
435
|
/**
|
|
@@ -476,9 +483,7 @@ export declare abstract class Exchange {
|
|
|
476
483
|
* });
|
|
477
484
|
* ```
|
|
478
485
|
*/
|
|
479
|
-
createOrder(params:
|
|
480
|
-
outcome?: MarketOutcome;
|
|
481
|
-
}): Promise<Order>;
|
|
486
|
+
createOrder(params: CreateOrderInput): Promise<Order>;
|
|
482
487
|
/**
|
|
483
488
|
* Calculate the average execution price for a given amount by walking the order book.
|
|
484
489
|
* Uses the sidecar server for calculation to ensure consistency.
|
|
@@ -635,6 +640,32 @@ export declare class Kalshi extends Exchange {
|
|
|
635
640
|
*/
|
|
636
641
|
export declare class Limitless extends Exchange {
|
|
637
642
|
constructor(options?: ExchangeOptions);
|
|
643
|
+
/**
|
|
644
|
+
* Watch real-time AMM price updates via WebSocket.
|
|
645
|
+
*
|
|
646
|
+
* @param marketAddress - Limitless market contract address
|
|
647
|
+
* @param callback - Optional callback invoked with the returned update
|
|
648
|
+
* @returns Next price update
|
|
649
|
+
*/
|
|
650
|
+
watchPrices(marketAddress: string, callback?: (data: Record<string, any>) => void): Promise<Record<string, any>>;
|
|
651
|
+
/**
|
|
652
|
+
* Watch real-time Limitless user position updates.
|
|
653
|
+
*
|
|
654
|
+
* Requires API key authentication.
|
|
655
|
+
*
|
|
656
|
+
* @param callback - Optional callback invoked with the returned positions
|
|
657
|
+
* @returns Next position update payload
|
|
658
|
+
*/
|
|
659
|
+
watchUserPositions(callback?: (data: Position[]) => void): Promise<Position[]>;
|
|
660
|
+
/**
|
|
661
|
+
* Watch real-time Limitless user transaction updates.
|
|
662
|
+
*
|
|
663
|
+
* Requires API key authentication.
|
|
664
|
+
*
|
|
665
|
+
* @param callback - Optional callback invoked with the returned update
|
|
666
|
+
* @returns Next transaction update
|
|
667
|
+
*/
|
|
668
|
+
watchUserTransactions(callback?: (data: Record<string, any>) => void): Promise<Record<string, any>>;
|
|
638
669
|
}
|
|
639
670
|
/**
|
|
640
671
|
* Kalshi Demo exchange client (paper trading / sandbox environment).
|
package/dist/pmxt/client.js
CHANGED
|
@@ -1810,7 +1810,13 @@ class Exchange {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
throw this.wsTransportUnavailableError("watchAllOrderBooks");
|
|
1812
1812
|
}
|
|
1813
|
-
/**
|
|
1813
|
+
/**
|
|
1814
|
+
* Stream all orderbook updates across venues.
|
|
1815
|
+
*
|
|
1816
|
+
* @deprecated Use {@link watchAllOrderBooks} instead.
|
|
1817
|
+
* @param venues - Optional venue filter
|
|
1818
|
+
* @returns Next event with source, symbol, and orderbook
|
|
1819
|
+
*/
|
|
1814
1820
|
async firehose(venues) {
|
|
1815
1821
|
return this.watchAllOrderBooks(venues);
|
|
1816
1822
|
}
|
|
@@ -1935,8 +1941,11 @@ class Exchange {
|
|
|
1935
1941
|
* const order = await exchange.submitOrder(built);
|
|
1936
1942
|
*
|
|
1937
1943
|
* // Using outcome shorthand:
|
|
1944
|
+
* const yes = market.yes;
|
|
1945
|
+
* if (!yes) throw new Error("Market has no YES outcome");
|
|
1946
|
+
*
|
|
1938
1947
|
* const built2 = await exchange.buildOrder({
|
|
1939
|
-
* outcome:
|
|
1948
|
+
* outcome: yes,
|
|
1940
1949
|
* side: "buy",
|
|
1941
1950
|
* type: "market",
|
|
1942
1951
|
* amount: 10
|
|
@@ -2229,8 +2238,9 @@ class Exchange {
|
|
|
2229
2238
|
const venue = this.exchangeName;
|
|
2230
2239
|
if (venue === "polymarket")
|
|
2231
2240
|
return "cancel_polymarket";
|
|
2232
|
-
if (venue === "limitless")
|
|
2241
|
+
if (venue === "limitless") {
|
|
2233
2242
|
return isPull ? "cancel_limitless_base_pull" : "cancel_limitless_polygon";
|
|
2243
|
+
}
|
|
2234
2244
|
return isPull ? "cancel_opinion_bsc_pull" : "cancel_opinion_polygon";
|
|
2235
2245
|
}
|
|
2236
2246
|
/**
|
|
@@ -2806,6 +2816,71 @@ class Limitless extends Exchange {
|
|
|
2806
2816
|
constructor(options = {}) {
|
|
2807
2817
|
super("limitless", options);
|
|
2808
2818
|
}
|
|
2819
|
+
/**
|
|
2820
|
+
* Watch real-time AMM price updates via WebSocket.
|
|
2821
|
+
*
|
|
2822
|
+
* @param marketAddress - Limitless market contract address
|
|
2823
|
+
* @param callback - Optional callback invoked with the returned update
|
|
2824
|
+
* @returns Next price update
|
|
2825
|
+
*/
|
|
2826
|
+
async watchPrices(marketAddress, callback) {
|
|
2827
|
+
await this.initPromise;
|
|
2828
|
+
try {
|
|
2829
|
+
const json = await this.sidecarPostRequest("watchPrices", [marketAddress]);
|
|
2830
|
+
const data = this.handleResponse(json);
|
|
2831
|
+
callback?.(data);
|
|
2832
|
+
return data;
|
|
2833
|
+
}
|
|
2834
|
+
catch (error) {
|
|
2835
|
+
if (error instanceof errors_js_1.PmxtError)
|
|
2836
|
+
throw error;
|
|
2837
|
+
throw new errors_js_1.PmxtError(`Failed to watch prices: ${error}`);
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
/**
|
|
2841
|
+
* Watch real-time Limitless user position updates.
|
|
2842
|
+
*
|
|
2843
|
+
* Requires API key authentication.
|
|
2844
|
+
*
|
|
2845
|
+
* @param callback - Optional callback invoked with the returned positions
|
|
2846
|
+
* @returns Next position update payload
|
|
2847
|
+
*/
|
|
2848
|
+
async watchUserPositions(callback) {
|
|
2849
|
+
await this.initPromise;
|
|
2850
|
+
try {
|
|
2851
|
+
const json = await this.sidecarPostRequest("watchUserPositions", []);
|
|
2852
|
+
const data = this.handleResponse(json).map(convertPosition);
|
|
2853
|
+
callback?.(data);
|
|
2854
|
+
return data;
|
|
2855
|
+
}
|
|
2856
|
+
catch (error) {
|
|
2857
|
+
if (error instanceof errors_js_1.PmxtError)
|
|
2858
|
+
throw error;
|
|
2859
|
+
throw new errors_js_1.PmxtError(`Failed to watch user positions: ${error}`);
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* Watch real-time Limitless user transaction updates.
|
|
2864
|
+
*
|
|
2865
|
+
* Requires API key authentication.
|
|
2866
|
+
*
|
|
2867
|
+
* @param callback - Optional callback invoked with the returned update
|
|
2868
|
+
* @returns Next transaction update
|
|
2869
|
+
*/
|
|
2870
|
+
async watchUserTransactions(callback) {
|
|
2871
|
+
await this.initPromise;
|
|
2872
|
+
try {
|
|
2873
|
+
const json = await this.sidecarPostRequest("watchUserTransactions", []);
|
|
2874
|
+
const data = this.handleResponse(json);
|
|
2875
|
+
callback?.(data);
|
|
2876
|
+
return data;
|
|
2877
|
+
}
|
|
2878
|
+
catch (error) {
|
|
2879
|
+
if (error instanceof errors_js_1.PmxtError)
|
|
2880
|
+
throw error;
|
|
2881
|
+
throw new errors_js_1.PmxtError(`Failed to watch user transactions: ${error}`);
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2809
2884
|
}
|
|
2810
2885
|
exports.Limitless = Limitless;
|
|
2811
2886
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Layer 3 uses the optional `ethers` peer dependency for typed-data verification.
|
|
10
10
|
*/
|
|
11
11
|
import { TypedData } from "./signers";
|
|
12
|
-
export type HostedRoute = "polymarket_buy" | "polymarket_sell" | "limitless_buy" | "limitless_sell_polygon" | "limitless_sell_base_pull" | "opinion_buy" | "opinion_sell_polygon" | "opinion_sell_bsc_pull" | "cancel_polymarket" | "cancel_opinion_polygon" | "cancel_opinion_bsc_pull";
|
|
12
|
+
export type HostedRoute = "polymarket_buy" | "polymarket_sell" | "limitless_buy" | "limitless_sell_polygon" | "limitless_sell_base_pull" | "opinion_buy" | "opinion_sell_polygon" | "opinion_sell_bsc_pull" | "cancel_polymarket" | "cancel_opinion_polygon" | "cancel_opinion_bsc_pull" | "cancel_limitless_polygon" | "cancel_limitless_base_pull";
|
|
13
13
|
export declare const SECP256K1_HALF_N = 57896044618658097711785492504343953926418782139537452191302581570759080747168n;
|
|
14
14
|
/**
|
|
15
15
|
* Validate the structural shape of a typed-data payload before signing.
|
|
@@ -211,6 +211,20 @@ const SCHEMAS = {
|
|
|
211
211
|
messageKeys: messageKeysFromFields(CANCEL_PULL_FIELDS),
|
|
212
212
|
walletField: "user",
|
|
213
213
|
},
|
|
214
|
+
cancel_limitless_polygon: {
|
|
215
|
+
primaryType: "CancelOrder",
|
|
216
|
+
domain: PREFUNDED_DOMAIN,
|
|
217
|
+
fields: CANCEL_ORDER_FIELDS,
|
|
218
|
+
messageKeys: messageKeysFromFields(CANCEL_ORDER_FIELDS),
|
|
219
|
+
walletField: "user",
|
|
220
|
+
},
|
|
221
|
+
cancel_limitless_base_pull: {
|
|
222
|
+
primaryType: "CancelPull",
|
|
223
|
+
domain: LIMITLESS_VENUE_DOMAIN,
|
|
224
|
+
fields: CANCEL_PULL_FIELDS,
|
|
225
|
+
messageKeys: messageKeysFromFields(CANCEL_PULL_FIELDS),
|
|
226
|
+
walletField: "user",
|
|
227
|
+
},
|
|
214
228
|
};
|
|
215
229
|
// secp256k1 group order / 2, for canonical low-s check.
|
|
216
230
|
exports.SECP256K1_HALF_N = 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0n;
|
package/dist/pmxt/models.d.ts
CHANGED
|
@@ -400,6 +400,10 @@ export interface CreateOrderParams {
|
|
|
400
400
|
amount: number;
|
|
401
401
|
/** Limit price (required for limit orders, 0.0-1.0) */
|
|
402
402
|
price?: number;
|
|
403
|
+
/** Hosted mode: unit that amount is denominated in. Market buys use usdc; market sells and limit orders use shares. */
|
|
404
|
+
denom?: "usdc" | "shares";
|
|
405
|
+
/** Hosted mode: maximum slippage percentage for market orders. */
|
|
406
|
+
slippage_pct?: number;
|
|
403
407
|
/** Optional fee rate (e.g., 1000 for 0.1%) */
|
|
404
408
|
fee?: number;
|
|
405
409
|
/** Optional override for Limitless/Polymarket */
|
|
@@ -409,6 +413,19 @@ export interface CreateOrderParams {
|
|
|
409
413
|
/** Limitless delegated signing: profile ID to trade on behalf of */
|
|
410
414
|
onBehalfOf?: number;
|
|
411
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Public order input accepted by createOrder/buildOrder.
|
|
418
|
+
*
|
|
419
|
+
* Callers can either pass explicit marketId/outcomeId fields, or pass an
|
|
420
|
+
* outcome object returned by fetchMarkets and let the SDK infer those ids.
|
|
421
|
+
*/
|
|
422
|
+
export type CreateOrderInput = (CreateOrderParams & {
|
|
423
|
+
outcome?: never;
|
|
424
|
+
}) | (Omit<CreateOrderParams, 'marketId' | 'outcomeId'> & {
|
|
425
|
+
outcome: MarketOutcome;
|
|
426
|
+
marketId?: never;
|
|
427
|
+
outcomeId?: never;
|
|
428
|
+
});
|
|
412
429
|
/** Alias matching the core MarketFetchParams name. */
|
|
413
430
|
export type MarketFetchParams = MarketFilterParams;
|
|
414
431
|
/**
|
|
@@ -16,35 +16,6 @@ Name | Type
|
|
|
16
16
|
`relation` | string
|
|
17
17
|
`confidence` | number
|
|
18
18
|
|
|
19
|
-
## Example
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import type { ArbitrageOpportunity } from 'pmxtjs'
|
|
23
|
-
|
|
24
|
-
// TODO: Update the object below with actual values
|
|
25
|
-
const example = {
|
|
26
|
-
"marketA": null,
|
|
27
|
-
"marketB": null,
|
|
28
|
-
"spread": null,
|
|
29
|
-
"buyVenue": null,
|
|
30
|
-
"sellVenue": null,
|
|
31
|
-
"buyPrice": null,
|
|
32
|
-
"sellPrice": null,
|
|
33
|
-
"relation": null,
|
|
34
|
-
"confidence": null,
|
|
35
|
-
} satisfies ArbitrageOpportunity
|
|
36
|
-
|
|
37
|
-
console.log(example)
|
|
38
|
-
|
|
39
|
-
// Convert the instance to a JSON string
|
|
40
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
-
console.log(exampleJSON)
|
|
42
|
-
|
|
43
|
-
// Parse the JSON string back to an object
|
|
44
|
-
const exampleParsed = JSON.parse(exampleJSON) as ArbitrageOpportunity
|
|
45
|
-
console.log(exampleParsed)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
19
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
20
|
|
|
50
21
|
|
|
@@ -12,31 +12,6 @@ Name | Type
|
|
|
12
12
|
`locked` | number
|
|
13
13
|
`venue` | string
|
|
14
14
|
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import type { Balance } from 'pmxtjs'
|
|
19
|
-
|
|
20
|
-
// TODO: Update the object below with actual values
|
|
21
|
-
const example = {
|
|
22
|
-
"currency": null,
|
|
23
|
-
"total": null,
|
|
24
|
-
"available": null,
|
|
25
|
-
"locked": null,
|
|
26
|
-
"venue": null,
|
|
27
|
-
} satisfies Balance
|
|
28
|
-
|
|
29
|
-
console.log(example)
|
|
30
|
-
|
|
31
|
-
// Convert the instance to a JSON string
|
|
32
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
-
console.log(exampleJSON)
|
|
34
|
-
|
|
35
|
-
// Parse the JSON string back to an object
|
|
36
|
-
const exampleParsed = JSON.parse(exampleJSON) as Balance
|
|
37
|
-
console.log(exampleParsed)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
15
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
16
|
|
|
42
17
|
|
|
@@ -9,27 +9,6 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { BaseRequest } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"credentials": null,
|
|
20
|
-
} satisfies BaseRequest
|
|
21
|
-
|
|
22
|
-
console.log(example)
|
|
23
|
-
|
|
24
|
-
// Convert the instance to a JSON string
|
|
25
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
-
console.log(exampleJSON)
|
|
27
|
-
|
|
28
|
-
// Parse the JSON string back to an object
|
|
29
|
-
const exampleParsed = JSON.parse(exampleJSON) as BaseRequest
|
|
30
|
-
console.log(exampleParsed)
|
|
31
|
-
```
|
|
32
|
-
|
|
33
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
13
|
|
|
35
14
|
|
|
@@ -9,28 +9,6 @@ Name | Type
|
|
|
9
9
|
`success` | boolean
|
|
10
10
|
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { BaseResponse } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"success": true,
|
|
20
|
-
"error": null,
|
|
21
|
-
} satisfies BaseResponse
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as BaseResponse
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
13
|
|
|
36
14
|
|
|
@@ -10,29 +10,6 @@ Name | Type
|
|
|
10
10
|
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
11
|
`data` | [BuiltOrder](BuiltOrder.md)
|
|
12
12
|
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type { BuildOrder200Response } from 'pmxtjs'
|
|
17
|
-
|
|
18
|
-
// TODO: Update the object below with actual values
|
|
19
|
-
const example = {
|
|
20
|
-
"success": true,
|
|
21
|
-
"error": null,
|
|
22
|
-
"data": null,
|
|
23
|
-
} satisfies BuildOrder200Response
|
|
24
|
-
|
|
25
|
-
console.log(example)
|
|
26
|
-
|
|
27
|
-
// Convert the instance to a JSON string
|
|
28
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
-
console.log(exampleJSON)
|
|
30
|
-
|
|
31
|
-
// Parse the JSON string back to an object
|
|
32
|
-
const exampleParsed = JSON.parse(exampleJSON) as BuildOrder200Response
|
|
33
|
-
console.log(exampleParsed)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
13
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
14
|
|
|
38
15
|
|
|
@@ -9,28 +9,6 @@ Name | Type
|
|
|
9
9
|
`args` | [Array<CreateOrderParams>](CreateOrderParams.md)
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { BuildOrderRequest } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"args": null,
|
|
20
|
-
"credentials": null,
|
|
21
|
-
} satisfies BuildOrderRequest
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as BuildOrderRequest
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
13
|
|
|
36
14
|
|
|
@@ -13,32 +13,6 @@ Name | Type
|
|
|
13
13
|
`raw` | any
|
|
14
14
|
`expiry` | number
|
|
15
15
|
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import type { BuiltOrder } from 'pmxtjs'
|
|
20
|
-
|
|
21
|
-
// TODO: Update the object below with actual values
|
|
22
|
-
const example = {
|
|
23
|
-
"exchange": null,
|
|
24
|
-
"params": null,
|
|
25
|
-
"signedOrder": null,
|
|
26
|
-
"tx": null,
|
|
27
|
-
"raw": null,
|
|
28
|
-
"expiry": null,
|
|
29
|
-
} satisfies BuiltOrder
|
|
30
|
-
|
|
31
|
-
console.log(example)
|
|
32
|
-
|
|
33
|
-
// Convert the instance to a JSON string
|
|
34
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
-
console.log(exampleJSON)
|
|
36
|
-
|
|
37
|
-
// Parse the JSON string back to an object
|
|
38
|
-
const exampleParsed = JSON.parse(exampleJSON) as BuiltOrder
|
|
39
|
-
console.log(exampleParsed)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
16
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
43
17
|
|
|
44
18
|
|
|
@@ -12,30 +12,6 @@ Name | Type
|
|
|
12
12
|
`value` | string
|
|
13
13
|
`chainId` | number
|
|
14
14
|
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import type { BuiltOrderTx } from 'pmxtjs'
|
|
19
|
-
|
|
20
|
-
// TODO: Update the object below with actual values
|
|
21
|
-
const example = {
|
|
22
|
-
"to": null,
|
|
23
|
-
"data": null,
|
|
24
|
-
"value": null,
|
|
25
|
-
"chainId": null,
|
|
26
|
-
} satisfies BuiltOrderTx
|
|
27
|
-
|
|
28
|
-
console.log(example)
|
|
29
|
-
|
|
30
|
-
// Convert the instance to a JSON string
|
|
31
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
-
console.log(exampleJSON)
|
|
33
|
-
|
|
34
|
-
// Parse the JSON string back to an object
|
|
35
|
-
const exampleParsed = JSON.parse(exampleJSON) as BuiltOrderTx
|
|
36
|
-
console.log(exampleParsed)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
15
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
16
|
|
|
41
17
|
|
|
@@ -9,28 +9,6 @@ Name | Type
|
|
|
9
9
|
`args` | Array<string>
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { CancelOrderRequest } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"args": null,
|
|
20
|
-
"credentials": null,
|
|
21
|
-
} satisfies CancelOrderRequest
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as CancelOrderRequest
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
13
|
|
|
36
14
|
|
|
@@ -9,28 +9,6 @@ Name | Type
|
|
|
9
9
|
`args` | Array<any>
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { CloseRequest } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"args": null,
|
|
20
|
-
"credentials": null,
|
|
21
|
-
} satisfies CloseRequest
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as CloseRequest
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
13
|
|
|
36
14
|
|
|
@@ -10,29 +10,6 @@ Name | Type
|
|
|
10
10
|
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
11
|
`data` | [Array<PriceComparison>](PriceComparison.md)
|
|
12
12
|
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type { CompareMarketPrices200Response } from 'pmxtjs'
|
|
17
|
-
|
|
18
|
-
// TODO: Update the object below with actual values
|
|
19
|
-
const example = {
|
|
20
|
-
"success": true,
|
|
21
|
-
"error": null,
|
|
22
|
-
"data": null,
|
|
23
|
-
} satisfies CompareMarketPrices200Response
|
|
24
|
-
|
|
25
|
-
console.log(example)
|
|
26
|
-
|
|
27
|
-
// Convert the instance to a JSON string
|
|
28
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
-
console.log(exampleJSON)
|
|
30
|
-
|
|
31
|
-
// Parse the JSON string back to an object
|
|
32
|
-
const exampleParsed = JSON.parse(exampleJSON) as CompareMarketPrices200Response
|
|
33
|
-
console.log(exampleParsed)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
13
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
14
|
|
|
38
15
|
|
|
@@ -9,28 +9,6 @@ Name | Type
|
|
|
9
9
|
`args` | [Array<FetchMarketMatchesParams>](FetchMarketMatchesParams.md)
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { CompareMarketPricesRequest } from 'pmxtjs'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"args": null,
|
|
20
|
-
"credentials": null,
|
|
21
|
-
} satisfies CompareMarketPricesRequest
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as CompareMarketPricesRequest
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
12
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
13
|
|
|
36
14
|
|
|
@@ -10,29 +10,6 @@ Name | Type
|
|
|
10
10
|
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
11
|
`data` | [Order](Order.md)
|
|
12
12
|
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type { CreateOrder200Response } from 'pmxtjs'
|
|
17
|
-
|
|
18
|
-
// TODO: Update the object below with actual values
|
|
19
|
-
const example = {
|
|
20
|
-
"success": true,
|
|
21
|
-
"error": null,
|
|
22
|
-
"data": null,
|
|
23
|
-
} satisfies CreateOrder200Response
|
|
24
|
-
|
|
25
|
-
console.log(example)
|
|
26
|
-
|
|
27
|
-
// Convert the instance to a JSON string
|
|
28
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
-
console.log(exampleJSON)
|
|
30
|
-
|
|
31
|
-
// Parse the JSON string back to an object
|
|
32
|
-
const exampleParsed = JSON.parse(exampleJSON) as CreateOrder200Response
|
|
33
|
-
console.log(exampleParsed)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
13
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
14
|
|
|
38
15
|
|