@structbuild/sdk 0.6.0 → 0.6.1

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.
@@ -5227,7 +5227,7 @@ export interface components {
5227
5227
  * closed those values are no longer meaningful.
5228
5228
  * @enum {string}
5229
5229
  */
5230
- PositionClosedPnlSortBy: "realized_pnl_usd" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "merge_count" | "split_count" | "end_date" | "is_neg_risk";
5230
+ PositionClosedPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "merge_count" | "split_count" | "end_date" | "is_neg_risk";
5231
5231
  /** @description Per-position detail for Split/Merge/Redemption trades. */
5232
5232
  PositionDetail: {
5233
5233
  /** @description Market condition ID for this ERC1155 position. */
@@ -5256,11 +5256,6 @@ export interface components {
5256
5256
  condition_id?: string | null;
5257
5257
  market_slug?: string | null;
5258
5258
  event_slug?: string | null;
5259
- /**
5260
- * @description Market category slug — mirror of `PositionRollup.category_id`
5261
- * resolved server-side. Enables `?category=<slug>` filtering on
5262
- * the positions endpoint.
5263
- */
5264
5259
  category?: string | null;
5265
5260
  title?: string | null;
5266
5261
  question?: string | null;
@@ -5307,7 +5302,11 @@ export interface components {
5307
5302
  */
5308
5303
  avg_price?: number | null;
5309
5304
  /** Format: double */
5310
- realized_pnl_usd?: number | null;
5305
+ realized_pnl_usd?: number;
5306
+ /** Format: double */
5307
+ total_pnl_usd?: number;
5308
+ /** Format: double */
5309
+ unrealized_pnl_usd?: number;
5311
5310
  /** Format: double */
5312
5311
  total_fees?: number | null;
5313
5312
  /** Format: int64 */
@@ -5427,7 +5426,11 @@ export interface components {
5427
5426
  */
5428
5427
  avg_price?: number | null;
5429
5428
  /** Format: double */
5430
- realized_pnl_usd?: number | null;
5429
+ realized_pnl_usd?: number;
5430
+ /** Format: double */
5431
+ total_pnl_usd?: number;
5432
+ /** Format: double */
5433
+ unrealized_pnl_usd?: number;
5431
5434
  /** Format: double */
5432
5435
  total_fees?: number | null;
5433
5436
  /** Format: int64 */
@@ -5551,7 +5554,7 @@ export interface components {
5551
5554
  * (`redeemable`, `mergeable`) are exclusive to open positions.
5552
5555
  * @enum {string}
5553
5556
  */
5554
- PositionOpenPnlSortBy: "realized_pnl_usd" | "total_buy_usd" | "total_sell_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
5557
+ PositionOpenPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
5555
5558
  /**
5556
5559
  * @description Union of every sort_by value accepted by the positions endpoint
5557
5560
  * across both `status=open` and `status=closed`. Note that some
@@ -5562,7 +5565,7 @@ export interface components {
5562
5565
  * `PositionClosedPnlSortBy` for the exact per-status whitelists.
5563
5566
  * @enum {string}
5564
5567
  */
5565
- PositionPnlSortBy: "realized_pnl_usd" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "title" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
5568
+ PositionPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "title" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
5566
5569
  /** @enum {string} */
5567
5570
  PositionStatus: "open" | "closed";
5568
5571
  PositionVolumeChartResponse: {
@@ -9502,7 +9505,7 @@ export interface operations {
9502
9505
  won?: boolean;
9503
9506
  /** @description Case-insensitive substring match on the market title. Scoped to the chosen `status` — results never cross the open/closed boundary. */
9504
9507
  search?: string;
9505
- /** @description Sort field. Default: realized_pnl_usd. status=open accepts: realized_pnl_usd, total_buy_usd, total_sell_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, current_value, realized_pnl_pct, title, current_price, current_shares_balance, merge_count, split_count, end_date, is_neg_risk, redeemable, mergeable. status=closed accepts: realized_pnl_usd, total_buy_usd, total_sell_usd, redemption_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, realized_pnl_pct, title, merge_count, split_count, end_date, is_neg_risk. */
9508
+ /** @description Sort field. Default: total_pnl_usd. status=open accepts: realized_pnl_usd, total_pnl_usd, unrealized_pnl_usd, merge_usd, convert_collateral_usd, converted_count, converted_shares_gained, converted_shares_lost, last_traded_price, total_buy_usd, total_sell_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, current_value, realized_pnl_pct, total_pnl_pct, title, current_price, current_shares_balance, merge_count, split_count, end_date, is_neg_risk, redeemable, mergeable. status=closed accepts: realized_pnl_usd, total_pnl_usd, unrealized_pnl_usd, merge_usd, convert_collateral_usd, converted_count, converted_shares_gained, converted_shares_lost, last_traded_price, total_buy_usd, total_sell_usd, redemption_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, realized_pnl_pct, total_pnl_pct, title, merge_count, split_count, end_date, is_neg_risk. */
9506
9509
  sort_by?: components["schemas"]["PositionPnlSortBy"];
9507
9510
  /** @description Default: desc */
9508
9511
  sort_direction?: components["schemas"]["SortDirection"];
@@ -2494,6 +2494,8 @@ export interface components {
2494
2494
  /** Format: double */
2495
2495
  total_pnl_usd?: number;
2496
2496
  /** Format: double */
2497
+ unrealized_pnl_usd?: number;
2498
+ /** Format: double */
2497
2499
  redemption_usd?: number;
2498
2500
  open?: boolean;
2499
2501
  won?: boolean | null;
@@ -2514,6 +2516,8 @@ export interface components {
2514
2516
  * window. `0.0` when the trader has no cost basis on this row yet.
2515
2517
  */
2516
2518
  realized_pnl_pct?: number;
2519
+ /** Format: double */
2520
+ total_pnl_pct?: number;
2517
2521
  /** @description Market slug for the parent market of this outcome. */
2518
2522
  market_slug?: string | null;
2519
2523
  /** @description Market title. */
@@ -1756,6 +1756,8 @@ export interface components {
1756
1756
  /** Format: double */
1757
1757
  total_pnl_usd?: number;
1758
1758
  /** Format: double */
1759
+ unrealized_pnl_usd?: number;
1760
+ /** Format: double */
1759
1761
  redemption_usd?: number;
1760
1762
  open?: boolean;
1761
1763
  won?: boolean | null;
@@ -1776,6 +1778,8 @@ export interface components {
1776
1778
  * window. `0.0` when the trader has no cost basis on this row yet.
1777
1779
  */
1778
1780
  realized_pnl_pct?: number;
1781
+ /** Format: double */
1782
+ total_pnl_pct?: number;
1779
1783
  /** @description Market slug for the parent market of this outcome. */
1780
1784
  market_slug?: string | null;
1781
1785
  /** @description Market title. */
@@ -4389,6 +4393,7 @@ export interface components {
4389
4393
  * "total_fees": 2.5,
4390
4394
  * "realized_pnl_usd": 100,
4391
4395
  * "total_pnl_usd": 100,
4396
+ * "unrealized_pnl_usd": 0,
4392
4397
  * "redemption_usd": 50,
4393
4398
  * "open": false,
4394
4399
  * "won": true,
@@ -4398,6 +4403,7 @@ export interface components {
4398
4403
  * "position_resolved"
4399
4404
  * ],
4400
4405
  * "realized_pnl_pct": 0,
4406
+ * "total_pnl_pct": 0,
4401
4407
  * "converted_count": 0,
4402
4408
  * "converted_shares_gained": 0,
4403
4409
  * "converted_shares_lost": 0,
@@ -1756,6 +1756,8 @@ export interface components {
1756
1756
  /** Format: double */
1757
1757
  total_pnl_usd?: number;
1758
1758
  /** Format: double */
1759
+ unrealized_pnl_usd?: number;
1760
+ /** Format: double */
1759
1761
  redemption_usd?: number;
1760
1762
  open?: boolean;
1761
1763
  won?: boolean | null;
@@ -1776,6 +1778,8 @@ export interface components {
1776
1778
  * window. `0.0` when the trader has no cost basis on this row yet.
1777
1779
  */
1778
1780
  realized_pnl_pct?: number;
1781
+ /** Format: double */
1782
+ total_pnl_pct?: number;
1779
1783
  /** @description Market slug for the parent market of this outcome. */
1780
1784
  market_slug?: string | null;
1781
1785
  /** @description Market title. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",