@structbuild/sdk 0.5.6-staging.1 → 0.5.6-staging.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.
|
@@ -1742,8 +1742,8 @@ export interface paths {
|
|
|
1742
1742
|
cookie?: never;
|
|
1743
1743
|
};
|
|
1744
1744
|
/**
|
|
1745
|
-
* Get trader PnL
|
|
1746
|
-
* @description Retrieve
|
|
1745
|
+
* Get trader PnL candles
|
|
1746
|
+
* @description Retrieve a trader's PnL chart candles, including total PnL, realized and unrealized PnL, balances, portfolio value, and open-position count.
|
|
1747
1747
|
*/
|
|
1748
1748
|
get: operations["get_trader_pnl_v3_candles"];
|
|
1749
1749
|
put?: never;
|
|
@@ -1762,7 +1762,7 @@ export interface paths {
|
|
|
1762
1762
|
cookie?: never;
|
|
1763
1763
|
};
|
|
1764
1764
|
/**
|
|
1765
|
-
* Get trader PnL
|
|
1765
|
+
* Get trader PnL changes
|
|
1766
1766
|
* @description Retrieve absolute and percentage PnL, portfolio, balance, and open-position changes over 1h, 24h, 7d, 30d, and lifetime.
|
|
1767
1767
|
*/
|
|
1768
1768
|
get: operations["get_trader_pnl_v3_changes"];
|
|
@@ -1782,8 +1782,8 @@ export interface paths {
|
|
|
1782
1782
|
cookie?: never;
|
|
1783
1783
|
};
|
|
1784
1784
|
/**
|
|
1785
|
-
* Get trader
|
|
1786
|
-
* @description Retrieve best and worst daily, weekly, and monthly total
|
|
1785
|
+
* Get trader best and worst PnL periods
|
|
1786
|
+
* @description Retrieve the trader's best and worst daily, weekly, and monthly periods for total PnL and portfolio value.
|
|
1787
1787
|
*/
|
|
1788
1788
|
get: operations["get_trader_pnl_v3_periods"];
|
|
1789
1789
|
put?: never;
|
|
@@ -1802,7 +1802,7 @@ export interface paths {
|
|
|
1802
1802
|
cookie?: never;
|
|
1803
1803
|
};
|
|
1804
1804
|
/**
|
|
1805
|
-
* Get trader PnL
|
|
1805
|
+
* Get trader PnL risk
|
|
1806
1806
|
* @description Retrieve max drawdown, current drawdown, max runup, high, low, and latest values over a timeframe.
|
|
1807
1807
|
*/
|
|
1808
1808
|
get: operations["get_trader_pnl_v3_risk"];
|
|
@@ -4478,6 +4478,82 @@ export interface components {
|
|
|
4478
4478
|
*/
|
|
4479
4479
|
num_open_positions: number;
|
|
4480
4480
|
};
|
|
4481
|
+
PnlV3CandlestickBar: {
|
|
4482
|
+
/**
|
|
4483
|
+
* Format: double
|
|
4484
|
+
* @description Total PnL low value for the candle.
|
|
4485
|
+
*/
|
|
4486
|
+
l?: number | null;
|
|
4487
|
+
/**
|
|
4488
|
+
* Format: double
|
|
4489
|
+
* @description Total PnL high value for the candle.
|
|
4490
|
+
*/
|
|
4491
|
+
h?: number | null;
|
|
4492
|
+
/**
|
|
4493
|
+
* Format: double
|
|
4494
|
+
* @description Total PnL open value for the candle.
|
|
4495
|
+
*/
|
|
4496
|
+
o?: number | null;
|
|
4497
|
+
/**
|
|
4498
|
+
* Format: double
|
|
4499
|
+
* @description Total PnL close/latest value for the candle.
|
|
4500
|
+
*/
|
|
4501
|
+
c?: number | null;
|
|
4502
|
+
/**
|
|
4503
|
+
* Format: int64
|
|
4504
|
+
* @description Timestamp in epoch seconds at the start of the candle bucket.
|
|
4505
|
+
*/
|
|
4506
|
+
t: number;
|
|
4507
|
+
/** Format: int64 */
|
|
4508
|
+
open_block: number;
|
|
4509
|
+
/** Format: int64 */
|
|
4510
|
+
close_block: number;
|
|
4511
|
+
/**
|
|
4512
|
+
* Format: double
|
|
4513
|
+
* @description Latest realized PnL at candle close.
|
|
4514
|
+
*/
|
|
4515
|
+
realized_pnl: number;
|
|
4516
|
+
/**
|
|
4517
|
+
* Format: double
|
|
4518
|
+
* @description Latest unrealized/open-position value at candle close.
|
|
4519
|
+
*/
|
|
4520
|
+
unrealized_pnl: number;
|
|
4521
|
+
/**
|
|
4522
|
+
* Format: double
|
|
4523
|
+
* @description Latest USDC balance at candle close.
|
|
4524
|
+
*/
|
|
4525
|
+
usdc_balance: number;
|
|
4526
|
+
/**
|
|
4527
|
+
* Format: double
|
|
4528
|
+
* @description Latest pUSD balance at candle close.
|
|
4529
|
+
*/
|
|
4530
|
+
pusd_balance: number;
|
|
4531
|
+
/**
|
|
4532
|
+
* Format: double
|
|
4533
|
+
* @description Portfolio value low value for the candle.
|
|
4534
|
+
*/
|
|
4535
|
+
portfolio_l?: number | null;
|
|
4536
|
+
/**
|
|
4537
|
+
* Format: double
|
|
4538
|
+
* @description Portfolio value high value for the candle.
|
|
4539
|
+
*/
|
|
4540
|
+
portfolio_h?: number | null;
|
|
4541
|
+
/**
|
|
4542
|
+
* Format: double
|
|
4543
|
+
* @description Portfolio value open value for the candle.
|
|
4544
|
+
*/
|
|
4545
|
+
portfolio_o?: number | null;
|
|
4546
|
+
/**
|
|
4547
|
+
* Format: double
|
|
4548
|
+
* @description Portfolio value close/latest value for the candle.
|
|
4549
|
+
*/
|
|
4550
|
+
portfolio_c?: number | null;
|
|
4551
|
+
/**
|
|
4552
|
+
* Format: int32
|
|
4553
|
+
* @description Latest open position count at candle close.
|
|
4554
|
+
*/
|
|
4555
|
+
num_open_positions: number;
|
|
4556
|
+
};
|
|
4481
4557
|
PnlV3ChangeWindow: {
|
|
4482
4558
|
timeframe: string;
|
|
4483
4559
|
/** Format: int64 */
|
|
@@ -9892,13 +9968,13 @@ export interface operations {
|
|
|
9892
9968
|
};
|
|
9893
9969
|
requestBody?: never;
|
|
9894
9970
|
responses: {
|
|
9895
|
-
/** @description PnL
|
|
9971
|
+
/** @description Trader PnL candles */
|
|
9896
9972
|
200: {
|
|
9897
9973
|
headers: {
|
|
9898
9974
|
[name: string]: unknown;
|
|
9899
9975
|
};
|
|
9900
9976
|
content: {
|
|
9901
|
-
"application/json": components["schemas"]["
|
|
9977
|
+
"application/json": components["schemas"]["PnlV3CandlestickBar"][];
|
|
9902
9978
|
};
|
|
9903
9979
|
};
|
|
9904
9980
|
};
|
|
@@ -9915,7 +9991,7 @@ export interface operations {
|
|
|
9915
9991
|
};
|
|
9916
9992
|
requestBody?: never;
|
|
9917
9993
|
responses: {
|
|
9918
|
-
/** @description PnL
|
|
9994
|
+
/** @description Trader PnL changes */
|
|
9919
9995
|
200: {
|
|
9920
9996
|
headers: {
|
|
9921
9997
|
[name: string]: unknown;
|
|
@@ -9941,7 +10017,7 @@ export interface operations {
|
|
|
9941
10017
|
};
|
|
9942
10018
|
requestBody?: never;
|
|
9943
10019
|
responses: {
|
|
9944
|
-
/** @description
|
|
10020
|
+
/** @description Trader best and worst PnL periods */
|
|
9945
10021
|
200: {
|
|
9946
10022
|
headers: {
|
|
9947
10023
|
[name: string]: unknown;
|
|
@@ -9967,7 +10043,7 @@ export interface operations {
|
|
|
9967
10043
|
};
|
|
9968
10044
|
requestBody?: never;
|
|
9969
10045
|
responses: {
|
|
9970
|
-
/** @description PnL
|
|
10046
|
+
/** @description Trader PnL risk */
|
|
9971
10047
|
200: {
|
|
9972
10048
|
headers: {
|
|
9973
10049
|
[name: string]: unknown;
|
package/dist/generated/ws.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export interface components {
|
|
|
202
202
|
*/
|
|
203
203
|
threshold: number;
|
|
204
204
|
};
|
|
205
|
-
/** @description Condition metrics webhook payload
|
|
205
|
+
/** @description Condition metrics webhook payload. */
|
|
206
206
|
ConditionMetricsPayload: {
|
|
207
207
|
condition_id?: string | null;
|
|
208
208
|
timeframe?: string | null;
|
|
@@ -284,7 +284,7 @@ export interface components {
|
|
|
284
284
|
slug?: string | null;
|
|
285
285
|
event_slug?: string | null;
|
|
286
286
|
};
|
|
287
|
-
/** @description Event metrics webhook payload
|
|
287
|
+
/** @description Event metrics webhook payload. */
|
|
288
288
|
EventMetricsPayload: {
|
|
289
289
|
event_slug?: string | null;
|
|
290
290
|
timeframe?: string | null;
|
|
@@ -297,7 +297,7 @@ export interface components {
|
|
|
297
297
|
/** Format: int64 */
|
|
298
298
|
unique_traders?: number | null;
|
|
299
299
|
};
|
|
300
|
-
/** @description Event PnL webhook payload
|
|
300
|
+
/** @description Event PnL webhook payload. */
|
|
301
301
|
EventPnlPayload: {
|
|
302
302
|
trader?: string | null;
|
|
303
303
|
event_slug?: string | null;
|
|
@@ -453,7 +453,7 @@ export interface components {
|
|
|
453
453
|
exchange: string;
|
|
454
454
|
trade_type: string;
|
|
455
455
|
};
|
|
456
|
-
/** @description Global PnL webhook payload
|
|
456
|
+
/** @description Global PnL webhook payload. */
|
|
457
457
|
GlobalPnlPayload: {
|
|
458
458
|
trader?: string | null;
|
|
459
459
|
/** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
|
|
@@ -551,7 +551,7 @@ export interface components {
|
|
|
551
551
|
/** @description Whether this is a neg-risk market */
|
|
552
552
|
neg_risk: boolean;
|
|
553
553
|
};
|
|
554
|
-
/** @description Market PnL webhook payload
|
|
554
|
+
/** @description Market PnL webhook payload. */
|
|
555
555
|
MarketPnlPayload: {
|
|
556
556
|
trader?: string | null;
|
|
557
557
|
condition_id?: string | null;
|
|
@@ -1040,7 +1040,7 @@ export interface components {
|
|
|
1040
1040
|
*/
|
|
1041
1041
|
oracle_event_types?: string[];
|
|
1042
1042
|
};
|
|
1043
|
-
/** @description Position metrics webhook payload
|
|
1043
|
+
/** @description Position metrics webhook payload. */
|
|
1044
1044
|
PositionMetricsPayload: {
|
|
1045
1045
|
position_id?: string | null;
|
|
1046
1046
|
outcome?: string | null;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -471,6 +471,7 @@ export type OnboardStatus = Schemas["OnboardStatus"];
|
|
|
471
471
|
export type OrderType = Schemas["OrderType"];
|
|
472
472
|
export type PnlV3AnalyticsTimeframe = Schemas["PnlV3AnalyticsTimeframe"];
|
|
473
473
|
export type PnlV3CandleEntry = Schemas["PnlV3CandleEntry"];
|
|
474
|
+
export type PnlV3CandlestickBar = Schemas["PnlV3CandlestickBar"];
|
|
474
475
|
export type PnlV3ChangeWindow = Schemas["PnlV3ChangeWindow"];
|
|
475
476
|
export type PnlV3ChangesResponse = Schemas["PnlV3ChangesResponse"];
|
|
476
477
|
export type PnlV3LatestSnapshot = Schemas["PnlV3LatestSnapshot"];
|