parsec-api 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +7 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +15 -1
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +15 -1
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +6 -0
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +6 -0
- package/resources/account.mjs.map +1 -1
- package/resources/approvals.d.mts +4 -1
- package/resources/approvals.d.mts.map +1 -1
- package/resources/approvals.d.ts +4 -1
- package/resources/approvals.d.ts.map +1 -1
- package/resources/events.d.mts +5 -0
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +5 -0
- package/resources/events.d.ts.map +1 -1
- package/resources/exchanges.d.mts +5 -5
- package/resources/exchanges.d.mts.map +1 -1
- package/resources/exchanges.d.ts +5 -5
- package/resources/exchanges.d.ts.map +1 -1
- package/resources/exchanges.js +1 -1
- package/resources/exchanges.mjs +1 -1
- package/resources/execution-price.d.mts +13 -12
- package/resources/execution-price.d.mts.map +1 -1
- package/resources/execution-price.d.ts +13 -12
- package/resources/execution-price.d.ts.map +1 -1
- package/resources/execution-price.js +2 -1
- package/resources/execution-price.js.map +1 -1
- package/resources/execution-price.mjs +2 -1
- package/resources/execution-price.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/markets.d.mts +5 -0
- package/resources/markets.d.mts.map +1 -1
- package/resources/markets.d.ts +5 -0
- package/resources/markets.d.ts.map +1 -1
- package/resources/orders.d.mts +4 -1
- package/resources/orders.d.mts.map +1 -1
- package/resources/orders.d.ts +4 -1
- package/resources/orders.d.ts.map +1 -1
- package/src/client.ts +10 -0
- package/src/resources/account.ts +20 -0
- package/src/resources/approvals.ts +4 -1
- package/src/resources/events.ts +6 -0
- package/src/resources/exchanges.ts +8 -6
- package/src/resources/execution-price.ts +14 -13
- package/src/resources/index.ts +2 -1
- package/src/resources/markets.ts +6 -0
- package/src/resources/orders.ts +4 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -6,34 +6,36 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class Exchanges extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Returns exchange
|
|
9
|
+
* Returns exchange capability objects available to the authenticated customer.
|
|
10
10
|
*/
|
|
11
11
|
list(options?: RequestOptions): APIPromise<ExchangeListResponse> {
|
|
12
12
|
return this._client.get('/api/v1/exchanges', options);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export type ExchangeListResponse = Array<ExchangeListResponse.
|
|
16
|
+
export type ExchangeListResponse = Array<ExchangeListResponse.ExchangeListResponseItem>;
|
|
17
17
|
|
|
18
18
|
export namespace ExchangeListResponse {
|
|
19
|
-
export interface
|
|
19
|
+
export interface ExchangeListResponseItem {
|
|
20
20
|
/**
|
|
21
21
|
* Exchange identifier (e.g., "polymarket", "kalshi").
|
|
22
22
|
*/
|
|
23
23
|
id: string;
|
|
24
24
|
|
|
25
|
+
has: ExchangeListResponseItem.Has;
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* Human-readable exchange name.
|
|
27
29
|
*/
|
|
28
30
|
name: string;
|
|
29
|
-
|
|
30
|
-
has: ExchangeCapability.Has;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export namespace
|
|
33
|
+
export namespace ExchangeListResponseItem {
|
|
34
34
|
export interface Has {
|
|
35
35
|
create_order: boolean;
|
|
36
|
+
|
|
36
37
|
fetch_markets: boolean;
|
|
38
|
+
|
|
37
39
|
websocket: boolean;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -6,7 +6,8 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class ExecutionPrice extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Walks the orderbook to estimate the volume-weighted average price (VWAP) for a
|
|
10
|
+
* hypothetical order of the given size. Does not place an order.
|
|
10
11
|
*/
|
|
11
12
|
retrieve(
|
|
12
13
|
query: ExecutionPriceRetrieveParams,
|
|
@@ -17,18 +18,13 @@ export class ExecutionPrice extends APIResource {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export interface ExecutionPriceRetrieveResponse {
|
|
20
|
-
/**
|
|
21
|
-
* Volume-weighted average execution price, or null when no liquidity is available.
|
|
22
|
-
*/
|
|
23
|
-
avg_price?: number | null;
|
|
24
|
-
|
|
25
21
|
/**
|
|
26
22
|
* Number of contracts that would be filled.
|
|
27
23
|
*/
|
|
28
24
|
filled_amount: number;
|
|
29
25
|
|
|
30
26
|
/**
|
|
31
|
-
* True
|
|
27
|
+
* True if the entire requested amount can be filled.
|
|
32
28
|
*/
|
|
33
29
|
fully_filled: boolean;
|
|
34
30
|
|
|
@@ -38,19 +34,24 @@ export interface ExecutionPriceRetrieveResponse {
|
|
|
38
34
|
levels_consumed: number;
|
|
39
35
|
|
|
40
36
|
/**
|
|
41
|
-
*
|
|
37
|
+
* Total cost of the filled portion.
|
|
42
38
|
*/
|
|
43
|
-
|
|
39
|
+
total_cost: number;
|
|
44
40
|
|
|
45
41
|
/**
|
|
46
|
-
*
|
|
42
|
+
* Volume-weighted average execution price (null if no liquidity).
|
|
47
43
|
*/
|
|
48
|
-
|
|
44
|
+
avg_price?: number | null;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Price impact vs best price (null if no liquidity).
|
|
48
|
+
*/
|
|
49
|
+
slippage?: number | null;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
export interface ExecutionPriceRetrieveParams {
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
54
|
+
* Order size in contracts.
|
|
54
55
|
*/
|
|
55
56
|
amount: number;
|
|
56
57
|
|
|
@@ -60,7 +61,7 @@ export interface ExecutionPriceRetrieveParams {
|
|
|
60
61
|
parsec_id: string;
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
|
-
* Order side.
|
|
64
|
+
* Order side ("buy" or "sell").
|
|
64
65
|
*/
|
|
65
66
|
side: 'buy' | 'sell';
|
|
66
67
|
|
package/src/resources/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export {
|
|
4
4
|
Account,
|
|
5
5
|
type AccountBalanceResponse,
|
|
6
|
+
type AccountCapabilitiesResponse,
|
|
6
7
|
type AccountPingResponse,
|
|
7
8
|
type AccountUserActivityResponse,
|
|
8
9
|
type AccountBalanceParams,
|
|
@@ -19,12 +20,12 @@ export {
|
|
|
19
20
|
} from './approvals';
|
|
20
21
|
export { Events, type EventListResponse, type EventListParams } from './events';
|
|
21
22
|
export { Exchanges, type ExchangeListResponse } from './exchanges';
|
|
22
|
-
export { Markets, type MarketListResponse, type MarketListParams } from './markets';
|
|
23
23
|
export {
|
|
24
24
|
ExecutionPrice,
|
|
25
25
|
type ExecutionPriceRetrieveResponse,
|
|
26
26
|
type ExecutionPriceRetrieveParams,
|
|
27
27
|
} from './execution-price';
|
|
28
|
+
export { Markets, type MarketListResponse, type MarketListParams } from './markets';
|
|
28
29
|
export {
|
|
29
30
|
Orderbook,
|
|
30
31
|
type OrderbookRetrieveResponse,
|
package/src/resources/markets.ts
CHANGED
|
@@ -176,6 +176,12 @@ export namespace MarketListResponse {
|
|
|
176
176
|
*/
|
|
177
177
|
liquidity?: number;
|
|
178
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Minimum order size in contracts. Varies per market on Polymarket (e.g. 5, 15);
|
|
181
|
+
* typically 1 on Kalshi.
|
|
182
|
+
*/
|
|
183
|
+
min_order_size?: number;
|
|
184
|
+
|
|
179
185
|
/**
|
|
180
186
|
* Current open interest (contracts/pairs).
|
|
181
187
|
*/
|
package/src/resources/orders.ts
CHANGED
|
@@ -93,7 +93,10 @@ export interface OrderCreateParams {
|
|
|
93
93
|
size: number;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Body param
|
|
96
|
+
* Body param: Optional key-value parameters. Supported keys:
|
|
97
|
+
*
|
|
98
|
+
* - `order_type`: Order time-in-force. Values: `gtc` (default), `ioc`, `fok`.
|
|
99
|
+
* Unsupported types return 501 per exchange.
|
|
97
100
|
*/
|
|
98
101
|
params?: { [key: string]: string };
|
|
99
102
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|