parsec-api 0.8.0 → 0.9.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +12 -0
  3. package/client.d.mts +3 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +29 -8
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +29 -8
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +12 -2
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +12 -2
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/exchanges.d.mts +1 -0
  21. package/resources/exchanges.d.mts.map +1 -1
  22. package/resources/exchanges.d.ts +1 -0
  23. package/resources/exchanges.d.ts.map +1 -1
  24. package/resources/index.d.mts +1 -1
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +1 -1
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js +3 -3
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +1 -1
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/orderbook.d.mts +17 -1
  33. package/resources/orderbook.d.mts.map +1 -1
  34. package/resources/orderbook.d.ts +17 -1
  35. package/resources/orderbook.d.ts.map +1 -1
  36. package/resources/orderbook.js +4 -1
  37. package/resources/orderbook.js.map +1 -1
  38. package/resources/orderbook.mjs +4 -1
  39. package/resources/orderbook.mjs.map +1 -1
  40. package/resources/orders.d.mts +65 -6
  41. package/resources/orders.d.mts.map +1 -1
  42. package/resources/orders.d.ts +65 -6
  43. package/resources/orders.d.ts.map +1 -1
  44. package/resources/orders.js +48 -8
  45. package/resources/orders.js.map +1 -1
  46. package/resources/orders.mjs +48 -8
  47. package/resources/orders.mjs.map +1 -1
  48. package/resources/positions.d.mts +9 -3
  49. package/resources/positions.d.mts.map +1 -1
  50. package/resources/positions.d.ts +9 -3
  51. package/resources/positions.d.ts.map +1 -1
  52. package/resources/positions.js +13 -2
  53. package/resources/positions.js.map +1 -1
  54. package/resources/positions.mjs +13 -2
  55. package/resources/positions.mjs.map +1 -1
  56. package/resources/{price-history.d.mts → price.d.mts} +18 -13
  57. package/resources/price.d.mts.map +1 -0
  58. package/resources/{price-history.d.ts → price.d.ts} +18 -13
  59. package/resources/price.d.ts.map +1 -0
  60. package/resources/{price-history.js → price.js} +5 -5
  61. package/resources/price.js.map +1 -0
  62. package/resources/{price-history.mjs → price.mjs} +3 -3
  63. package/resources/price.mjs.map +1 -0
  64. package/resources/trades.d.mts +32 -0
  65. package/resources/trades.d.mts.map +1 -1
  66. package/resources/trades.d.ts +32 -0
  67. package/resources/trades.d.ts.map +1 -1
  68. package/src/client.ts +6 -10
  69. package/src/resources/account.ts +41 -9
  70. package/src/resources/exchanges.ts +2 -0
  71. package/src/resources/index.ts +1 -5
  72. package/src/resources/orderbook.ts +20 -1
  73. package/src/resources/orders.ts +121 -12
  74. package/src/resources/positions.ts +22 -4
  75. package/src/resources/{price-history.ts → price.ts} +20 -17
  76. package/src/resources/trades.ts +40 -0
  77. package/src/version.ts +1 -1
  78. package/version.d.mts +1 -1
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
  81. package/version.mjs +1 -1
  82. package/resources/price-history.d.mts.map +0 -1
  83. package/resources/price-history.d.ts.map +0 -1
  84. package/resources/price-history.js.map +0 -1
  85. package/resources/price-history.mjs.map +0 -1
@@ -9,8 +9,18 @@ export class Account extends APIResource {
9
9
  /**
10
10
  * Returns the raw balance payload from the exchange (opaque JSON).
11
11
  */
12
- balance(query: AccountBalanceParams, options?: RequestOptions): APIPromise<AccountBalanceResponse> {
13
- return this._client.get('/api/v1/balance', { query, ...options });
12
+ balance(params: AccountBalanceParams, options?: RequestOptions): APIPromise<AccountBalanceResponse> {
13
+ const { 'X-Exchange-Credentials': xExchangeCredentials, ...query } = params;
14
+ return this._client.get('/api/v1/balance', {
15
+ query,
16
+ ...options,
17
+ headers: buildHeaders([
18
+ {
19
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
20
+ },
21
+ options?.headers,
22
+ ]),
23
+ });
14
24
  }
15
25
 
16
26
  /**
@@ -100,14 +110,21 @@ export namespace AccountUserActivityResponse {
100
110
 
101
111
  export interface AccountBalanceParams {
102
112
  /**
103
- * Exchange identifier (e.g., kalshi, polymarket).
113
+ * Query param: Exchange identifier (e.g., kalshi, polymarket).
104
114
  */
105
115
  exchange: string;
106
116
 
107
117
  /**
108
- * Refresh balance before returning (default false).
118
+ * Query param: Refresh balance before returning (default false).
109
119
  */
110
120
  refresh?: boolean;
121
+
122
+ /**
123
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
124
+ * When provided, Parsec creates a transient exchange session instead of using
125
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
126
+ */
127
+ 'X-Exchange-Credentials'?: string;
111
128
  }
112
129
 
113
130
  export interface AccountPingParams {
@@ -118,15 +135,30 @@ export interface AccountPingParams {
118
135
  }
119
136
 
120
137
  export interface AccountUpdateCredentialsParams {
121
- evm_private_key?: string | null;
138
+ /**
139
+ * Kalshi API key ID.
140
+ */
141
+ api_key_id?: string | null;
122
142
 
123
- kalshi_api_key_id?: string | null;
143
+ /**
144
+ * Polymarket CLOB API key.
145
+ */
146
+ clob_api_key?: string | null;
124
147
 
125
- kalshi_private_key?: string | null;
148
+ /**
149
+ * Polymarket CLOB API passphrase.
150
+ */
151
+ clob_api_passphrase?: string | null;
126
152
 
127
- poly_funder?: string | null;
153
+ /**
154
+ * Polymarket CLOB API secret.
155
+ */
156
+ clob_api_secret?: string | null;
128
157
 
129
- poly_signature_type?: string | null;
158
+ /**
159
+ * Kalshi RSA private key (PEM format).
160
+ */
161
+ private_key?: string | null;
130
162
  }
131
163
 
132
164
  export interface AccountUserActivityParams {
@@ -46,6 +46,8 @@ export namespace ExchangeListResponse {
46
46
 
47
47
  fetch_orderbook: boolean;
48
48
 
49
+ fetch_orderbook_history: boolean;
50
+
49
51
  fetch_positions: boolean;
50
52
 
51
53
  fetch_price_history: boolean;
@@ -42,11 +42,7 @@ export {
42
42
  type OrderCancelParams,
43
43
  } from './orders';
44
44
  export { Positions, type PositionListResponse, type PositionListParams } from './positions';
45
- export {
46
- PriceHistory,
47
- type PriceHistoryRetrieveResponse,
48
- type PriceHistoryRetrieveParams,
49
- } from './price-history';
45
+ export { Price, type PriceRetrieveResponse, type PriceRetrieveParams } from './price';
50
46
  export { Trades, type TradeListResponse, type TradeListParams } from './trades';
51
47
  export {
52
48
  Websocket,
@@ -6,7 +6,10 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Orderbook extends APIResource {
8
8
  /**
9
- * Returns bids/asks as `[price, size]` tuples.
9
+ * When start_ts or end_ts is provided, returns historical orderbook snapshots
10
+ * instead of a live L2 snapshot. Large time ranges are handled via internal
11
+ * chunking and may be slow for very wide windows. In historical mode, limit
12
+ * defaults to 500 (max 1000).
10
13
  */
11
14
  retrieve(query: OrderbookRetrieveParams, options?: RequestOptions): APIPromise<OrderbookRetrieveResponse> {
12
15
  return this._client.get('/api/v1/orderbook', { query, ...options });
@@ -55,11 +58,21 @@ export interface OrderbookRetrieveParams {
55
58
  */
56
59
  parsec_id: string;
57
60
 
61
+ /**
62
+ * Opaque pagination cursor for historical mode.
63
+ */
64
+ cursor?: string;
65
+
58
66
  /**
59
67
  * Alias for `limit` (REST/WS symmetry).
60
68
  */
61
69
  depth?: number;
62
70
 
71
+ /**
72
+ * Unix seconds — end of time range. Defaults to now.
73
+ */
74
+ end_ts?: number;
75
+
63
76
  /**
64
77
  * Max depth per side (default 50; server clamps to 1..=100).
65
78
  */
@@ -71,6 +84,12 @@ export interface OrderbookRetrieveParams {
71
84
  * outcome label or numeric index.
72
85
  */
73
86
  outcome?: string;
87
+
88
+ /**
89
+ * Unix seconds — when present, switches to historical mode (returns snapshots
90
+ * instead of live book).
91
+ */
92
+ start_ts?: number;
74
93
  }
75
94
 
76
95
  export declare namespace Orderbook {
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
  import { path } from '../internal/utils/path';
7
8
 
@@ -10,30 +11,69 @@ export class Orders extends APIResource {
10
11
  * Creates a new order on the selected exchange.
11
12
  */
12
13
  create(params: OrderCreateParams, options?: RequestOptions): APIPromise<Order> {
13
- const { exchange, ...body } = params;
14
- return this._client.post('/api/v1/orders', { query: { exchange }, body, ...options });
14
+ const { exchange, 'X-Exchange-Credentials': xExchangeCredentials, ...body } = params;
15
+ return this._client.post('/api/v1/orders', {
16
+ query: { exchange },
17
+ body,
18
+ ...options,
19
+ headers: buildHeaders([
20
+ {
21
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
22
+ },
23
+ options?.headers,
24
+ ]),
25
+ });
15
26
  }
16
27
 
17
28
  /**
18
29
  * Fetches a single order by ID from the selected exchange.
19
30
  */
20
- retrieve(orderID: string, query: OrderRetrieveParams, options?: RequestOptions): APIPromise<Order> {
21
- return this._client.get(path`/api/v1/orders/${orderID}`, { query, ...options });
31
+ retrieve(orderID: string, params: OrderRetrieveParams, options?: RequestOptions): APIPromise<Order> {
32
+ const { 'X-Exchange-Credentials': xExchangeCredentials, ...query } = params;
33
+ return this._client.get(path`/api/v1/orders/${orderID}`, {
34
+ query,
35
+ ...options,
36
+ headers: buildHeaders([
37
+ {
38
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
39
+ },
40
+ options?.headers,
41
+ ]),
42
+ });
22
43
  }
23
44
 
24
45
  /**
25
46
  * Lists open orders on the selected exchange.
26
47
  */
27
- list(query: OrderListParams, options?: RequestOptions): APIPromise<OrderListResponse> {
28
- return this._client.get('/api/v1/orders', { query, ...options });
48
+ list(params: OrderListParams, options?: RequestOptions): APIPromise<OrderListResponse> {
49
+ const { 'X-Exchange-Credentials': xExchangeCredentials, ...query } = params;
50
+ return this._client.get('/api/v1/orders', {
51
+ query,
52
+ ...options,
53
+ headers: buildHeaders([
54
+ {
55
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
56
+ },
57
+ options?.headers,
58
+ ]),
59
+ });
29
60
  }
30
61
 
31
62
  /**
32
63
  * Cancels an order by ID on the selected exchange.
33
64
  */
34
65
  cancel(orderID: string, params: OrderCancelParams, options?: RequestOptions): APIPromise<Order> {
35
- const { exchange } = params;
36
- return this._client.delete(path`/api/v1/orders/${orderID}`, { query: { exchange }, ...options });
66
+ const { exchange, 'X-Exchange-Credentials': xExchangeCredentials } = params;
67
+ return this._client.delete(path`/api/v1/orders/${orderID}`, {
68
+ query: { exchange },
69
+ ...options,
70
+ headers: buildHeaders([
71
+ {
72
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
73
+ },
74
+ options?.headers,
75
+ ]),
76
+ });
37
77
  }
38
78
  }
39
79
 
@@ -92,6 +132,13 @@ export interface OrderCreateParams {
92
132
  */
93
133
  size: number;
94
134
 
135
+ /**
136
+ * Body param: Per-request exchange credentials (Mode B). When provided, Parsec
137
+ * creates a transient exchange session instead of using stored credentials.
138
+ * Credentials are never persisted.
139
+ */
140
+ credentials?: OrderCreateParams.Credentials;
141
+
95
142
  /**
96
143
  * Body param: Optional key-value parameters. Supported keys:
97
144
  *
@@ -99,32 +146,94 @@ export interface OrderCreateParams {
99
146
  * Unsupported types return 501 per exchange.
100
147
  */
101
148
  params?: { [key: string]: string };
149
+
150
+ /**
151
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
152
+ * When provided, Parsec creates a transient exchange session instead of using
153
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
154
+ */
155
+ 'X-Exchange-Credentials'?: string;
156
+ }
157
+
158
+ export namespace OrderCreateParams {
159
+ /**
160
+ * Per-request exchange credentials (Mode B). When provided, Parsec creates a
161
+ * transient exchange session instead of using stored credentials. Credentials are
162
+ * never persisted.
163
+ */
164
+ export interface Credentials {
165
+ /**
166
+ * Kalshi API key ID.
167
+ */
168
+ api_key_id?: string;
169
+
170
+ /**
171
+ * Polymarket CLOB API key.
172
+ */
173
+ clob_api_key?: string;
174
+
175
+ /**
176
+ * Polymarket CLOB API passphrase.
177
+ */
178
+ clob_api_passphrase?: string;
179
+
180
+ /**
181
+ * Polymarket CLOB API secret.
182
+ */
183
+ clob_api_secret?: string;
184
+
185
+ /**
186
+ * Kalshi RSA private key (PEM format).
187
+ */
188
+ private_key?: string;
189
+ }
102
190
  }
103
191
 
104
192
  export interface OrderRetrieveParams {
105
193
  /**
106
- * Exchange identifier (e.g., kalshi, polymarket).
194
+ * Query param: Exchange identifier (e.g., kalshi, polymarket).
107
195
  */
108
196
  exchange: string;
197
+
198
+ /**
199
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
200
+ * When provided, Parsec creates a transient exchange session instead of using
201
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
202
+ */
203
+ 'X-Exchange-Credentials'?: string;
109
204
  }
110
205
 
111
206
  export interface OrderListParams {
112
207
  /**
113
- * Exchange identifier (e.g., kalshi, polymarket).
208
+ * Query param: Exchange identifier (e.g., kalshi, polymarket).
114
209
  */
115
210
  exchange: string;
116
211
 
117
212
  /**
118
- * Optional market ID filter (exchange-native).
213
+ * Query param: Optional market ID filter (exchange-native).
119
214
  */
120
215
  market_id?: string;
216
+
217
+ /**
218
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
219
+ * When provided, Parsec creates a transient exchange session instead of using
220
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
221
+ */
222
+ 'X-Exchange-Credentials'?: string;
121
223
  }
122
224
 
123
225
  export interface OrderCancelParams {
124
226
  /**
125
- * Exchange identifier (e.g., kalshi, polymarket).
227
+ * Query param: Exchange identifier (e.g., kalshi, polymarket).
126
228
  */
127
229
  exchange: string;
230
+
231
+ /**
232
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
233
+ * When provided, Parsec creates a transient exchange session instead of using
234
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
235
+ */
236
+ 'X-Exchange-Credentials'?: string;
128
237
  }
129
238
 
130
239
  export declare namespace Orders {
@@ -2,14 +2,25 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
 
7
8
  export class Positions extends APIResource {
8
9
  /**
9
10
  * Lists positions for the authenticated customer on the selected exchange.
10
11
  */
11
- list(query: PositionListParams, options?: RequestOptions): APIPromise<PositionListResponse> {
12
- return this._client.get('/api/v1/positions', { query, ...options });
12
+ list(params: PositionListParams, options?: RequestOptions): APIPromise<PositionListResponse> {
13
+ const { 'X-Exchange-Credentials': xExchangeCredentials, ...query } = params;
14
+ return this._client.get('/api/v1/positions', {
15
+ query,
16
+ ...options,
17
+ headers: buildHeaders([
18
+ {
19
+ ...(xExchangeCredentials != null ? { 'X-Exchange-Credentials': xExchangeCredentials } : undefined),
20
+ },
21
+ options?.headers,
22
+ ]),
23
+ });
13
24
  }
14
25
  }
15
26
 
@@ -31,14 +42,21 @@ export namespace PositionListResponse {
31
42
 
32
43
  export interface PositionListParams {
33
44
  /**
34
- * Exchange identifier (e.g., kalshi, polymarket).
45
+ * Query param: Exchange identifier (e.g., kalshi, polymarket).
35
46
  */
36
47
  exchange: string;
37
48
 
38
49
  /**
39
- * Optional market ID filter (exchange-native).
50
+ * Query param: Optional market ID filter (exchange-native).
40
51
  */
41
52
  market_id?: string;
53
+
54
+ /**
55
+ * Header param: Base64-encoded JSON of per-request exchange credentials (Mode B).
56
+ * When provided, Parsec creates a transient exchange session instead of using
57
+ * stored credentials. The JSON shape matches the RequestCredentials schema.
58
+ */
59
+ 'X-Exchange-Credentials'?: string;
42
60
  }
43
61
 
44
62
  export declare namespace Positions {
@@ -4,20 +4,17 @@ import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
5
  import { RequestOptions } from '../internal/request-options';
6
6
 
7
- export class PriceHistory extends APIResource {
7
+ export class Price extends APIResource {
8
8
  /**
9
9
  * Returns an array of candlesticks with timestamps at period start (UTC).
10
10
  */
11
- retrieve(
12
- query: PriceHistoryRetrieveParams,
13
- options?: RequestOptions,
14
- ): APIPromise<PriceHistoryRetrieveResponse> {
15
- return this._client.get('/api/v1/price-history', { query, ...options });
11
+ retrieve(query: PriceRetrieveParams, options?: RequestOptions): APIPromise<PriceRetrieveResponse> {
12
+ return this._client.get('/api/v1/price', { query, ...options });
16
13
  }
17
14
  }
18
15
 
19
- export interface PriceHistoryRetrieveResponse {
20
- candles: Array<PriceHistoryRetrieveResponse.Candle>;
16
+ export interface PriceRetrieveResponse {
17
+ candles: Array<PriceRetrieveResponse.Candle>;
21
18
 
22
19
  exchange: string;
23
20
 
@@ -28,7 +25,7 @@ export interface PriceHistoryRetrieveResponse {
28
25
  parsec_id: string;
29
26
  }
30
27
 
31
- export namespace PriceHistoryRetrieveResponse {
28
+ export namespace PriceRetrieveResponse {
32
29
  export interface Candle {
33
30
  /**
34
31
  * Close price (normalized 0.0-1.0).
@@ -67,22 +64,28 @@ export namespace PriceHistoryRetrieveResponse {
67
64
  }
68
65
  }
69
66
 
70
- export interface PriceHistoryRetrieveParams {
67
+ export interface PriceRetrieveParams {
71
68
  /**
72
- * Price history interval.
69
+ * Unified market ID in format `{exchange}:{native_id}`.
73
70
  */
74
- interval: '1m' | '1h' | '6h' | '1d' | '1w' | 'max';
71
+ parsec_id: string;
75
72
 
76
73
  /**
77
- * Unified market ID in format `{exchange}:{native_id}`.
74
+ * Point-in-time lookup (Unix seconds). Returns the single closest candle. Cannot
75
+ * be combined with start_ts/end_ts.
78
76
  */
79
- parsec_id: string;
77
+ at_ts?: number;
80
78
 
81
79
  /**
82
80
  * Unix seconds end timestamp (inclusive). Defaults to now.
83
81
  */
84
82
  end_ts?: number;
85
83
 
84
+ /**
85
+ * Defaults to 1h for point-in-time (at_ts)
86
+ */
87
+ interval?: '1m' | '1h' | '6h' | '1d' | '1w' | 'max';
88
+
86
89
  /**
87
90
  * Outcome selector. For binary markets this is typically "yes" or "no"
88
91
  * (case-insensitive). For categorical markets, this is required and may be an
@@ -97,9 +100,9 @@ export interface PriceHistoryRetrieveParams {
97
100
  start_ts?: number;
98
101
  }
99
102
 
100
- export declare namespace PriceHistory {
103
+ export declare namespace Price {
101
104
  export {
102
- type PriceHistoryRetrieveResponse as PriceHistoryRetrieveResponse,
103
- type PriceHistoryRetrieveParams as PriceHistoryRetrieveParams,
105
+ type PriceRetrieveResponse as PriceRetrieveResponse,
106
+ type PriceRetrieveParams as PriceRetrieveParams,
104
107
  };
105
108
  }
@@ -26,6 +26,13 @@ export interface TradeListResponse {
26
26
  token_id: string;
27
27
 
28
28
  trades: Array<TradeListResponse.Trade>;
29
+
30
+ /**
31
+ * True if there are more results available
32
+ */
33
+ has_more?: boolean;
34
+
35
+ next_cursor?: string | null;
29
36
  }
30
37
 
31
38
  export namespace TradeListResponse {
@@ -51,10 +58,38 @@ export namespace TradeListResponse {
51
58
  */
52
59
  aggressor_side?: string;
53
60
 
61
+ /**
62
+ * NO-side price from exchange data (never derived). May be null if the trade was
63
+ * on the YES side.
64
+ */
65
+ no_price?: number | null;
66
+
67
+ /**
68
+ * Trade outcome side (e.g. "Yes", "No", "yes", "no").
69
+ */
70
+ outcome?: string | null;
71
+
54
72
  /**
55
73
  * Trade side (typically "buy" or "sell").
56
74
  */
57
75
  side?: string;
76
+
77
+ /**
78
+ * Taker wallet address (Polymarket proxy_wallet). Null for exchanges that don't
79
+ * expose this.
80
+ */
81
+ taker_address?: string | null;
82
+
83
+ /**
84
+ * Transaction hash (Polymarket only).
85
+ */
86
+ tx_hash?: string | null;
87
+
88
+ /**
89
+ * YES-side price from exchange data (never derived). May be null if the trade was
90
+ * on the NO side.
91
+ */
92
+ yes_price?: number | null;
58
93
  }
59
94
  }
60
95
 
@@ -64,6 +99,11 @@ export interface TradeListParams {
64
99
  */
65
100
  parsec_id: string;
66
101
 
102
+ /**
103
+ * Opaque pagination cursor from a previous response.
104
+ */
105
+ cursor?: string;
106
+
67
107
  /**
68
108
  * Unix seconds end timestamp (inclusive).
69
109
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.8.0'; // x-release-please-version
1
+ export const VERSION = '0.9.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.8.0";
1
+ export declare const VERSION = "0.9.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.8.0";
1
+ export declare const VERSION = "0.9.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.8.0'; // x-release-please-version
4
+ exports.VERSION = '0.9.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.8.0'; // x-release-please-version
1
+ export const VERSION = '0.9.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-history.d.mts","sourceRoot":"","sources":["../src/resources/price-history.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ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AAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-history.js","sourceRoot":"","sources":["../src/resources/price-history.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAVD,oCAUC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-history.mjs","sourceRoot":"","sources":["../src/resources/price-history.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}