@structbuild/sdk 0.2.0 → 0.2.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.
|
@@ -12,7 +12,7 @@ export interface paths {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Get asset price history
|
|
15
|
-
* @description Retrieve historical OHLC-style price data for a supported crypto asset (BTC, ETH, XRP, SOL) over a chosen time window variant. Timestamps are Unix seconds. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination — pass `pagination_key` from the previous response to fetch the next page.
|
|
15
|
+
* @description Retrieve historical OHLC-style price data for a supported crypto asset (BTC, ETH, XRP, SOL, DOGE, BNB, HYPE) over a chosen time window variant. Timestamps are Unix seconds. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination — pass `pagination_key` from the previous response to fetch the next page.
|
|
16
16
|
*/
|
|
17
17
|
get: operations["get_asset_history"];
|
|
18
18
|
put?: never;
|
|
@@ -552,7 +552,7 @@ export interface paths {
|
|
|
552
552
|
};
|
|
553
553
|
/**
|
|
554
554
|
* Get spread history
|
|
555
|
-
* @description Lightweight time series of derived orderbook metrics (best bid/ask, mid price, spread, liquidity depth) without raw bids/asks — ideal for charting. Default limit
|
|
555
|
+
* @description Lightweight time series of derived orderbook metrics (best bid/ask, mid price, spread, liquidity depth) without raw bids/asks — ideal for charting. Default limit 20, max 200.
|
|
556
556
|
*/
|
|
557
557
|
get: operations["get_spread_history"];
|
|
558
558
|
put?: never;
|
|
@@ -898,7 +898,7 @@ export interface components {
|
|
|
898
898
|
end_time: number;
|
|
899
899
|
};
|
|
900
900
|
/** @enum {string} */
|
|
901
|
-
AssetSymbol: "BTC" | "ETH" | "XRP" | "SOL";
|
|
901
|
+
AssetSymbol: "BTC" | "ETH" | "XRP" | "SOL" | "DOGE" | "BNB" | "HYPE";
|
|
902
902
|
/** @enum {string} */
|
|
903
903
|
AssetVariant: "5m" | "15m" | "1h" | "4h" | "1d";
|
|
904
904
|
BondMarket: {
|
|
@@ -1040,9 +1040,9 @@ export interface components {
|
|
|
1040
1040
|
};
|
|
1041
1041
|
EventMarketChartDataPoint: {
|
|
1042
1042
|
/** Format: double */
|
|
1043
|
-
|
|
1043
|
+
v: number;
|
|
1044
1044
|
/** Format: int64 */
|
|
1045
|
-
|
|
1045
|
+
t: number;
|
|
1046
1046
|
};
|
|
1047
1047
|
EventMarketChartOutcome: {
|
|
1048
1048
|
condition_id: string;
|
|
@@ -1680,9 +1680,9 @@ export interface components {
|
|
|
1680
1680
|
};
|
|
1681
1681
|
PositionChartDataPoint: {
|
|
1682
1682
|
/** Format: double */
|
|
1683
|
-
|
|
1683
|
+
v: number;
|
|
1684
1684
|
/** Format: int64 */
|
|
1685
|
-
|
|
1685
|
+
t: number;
|
|
1686
1686
|
};
|
|
1687
1687
|
PositionChartOutcome: {
|
|
1688
1688
|
position_id: string;
|
|
@@ -1867,7 +1867,7 @@ export interface components {
|
|
|
1867
1867
|
condition_id: string;
|
|
1868
1868
|
};
|
|
1869
1869
|
SearchResponse: {
|
|
1870
|
-
events:
|
|
1870
|
+
events: components["schemas"]["PolymarketEvent"][];
|
|
1871
1871
|
events_pagination: components["schemas"]["PaginationMeta"];
|
|
1872
1872
|
markets: components["schemas"]["MarketResponse"][];
|
|
1873
1873
|
markets_pagination: components["schemas"]["PaginationMeta"];
|
|
@@ -2058,6 +2058,8 @@ export interface components {
|
|
|
2058
2058
|
buy_usd?: number | null;
|
|
2059
2059
|
/** Format: double */
|
|
2060
2060
|
sell_usd?: number | null;
|
|
2061
|
+
/** Format: double */
|
|
2062
|
+
realized_pnl_usd?: number | null;
|
|
2061
2063
|
/**
|
|
2062
2064
|
* Format: double
|
|
2063
2065
|
* @description VWAP price paid per share across all buys (0–1)
|
|
@@ -2099,7 +2101,7 @@ export interface components {
|
|
|
2099
2101
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
2100
2102
|
* @enum {string}
|
|
2101
2103
|
*/
|
|
2102
|
-
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
2104
|
+
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
2103
2105
|
/**
|
|
2104
2106
|
* @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
|
|
2105
2107
|
* @enum {string}
|
|
@@ -2117,7 +2119,7 @@ export interface operations {
|
|
|
2117
2119
|
get_asset_history: {
|
|
2118
2120
|
parameters: {
|
|
2119
2121
|
query: {
|
|
2120
|
-
/** @description Asset ticker: BTC, ETH, XRP, or
|
|
2122
|
+
/** @description Asset ticker: BTC, ETH, XRP, SOL, DOGE, BNB, or HYPE */
|
|
2121
2123
|
asset_symbol: components["schemas"]["AssetSymbol"];
|
|
2122
2124
|
/** @description Time window: 5m, 15m, 1h, 4h, or 1d */
|
|
2123
2125
|
variant: components["schemas"]["AssetVariant"];
|
|
@@ -2317,7 +2319,11 @@ export interface operations {
|
|
|
2317
2319
|
headers: {
|
|
2318
2320
|
[name: string]: unknown;
|
|
2319
2321
|
};
|
|
2320
|
-
content
|
|
2322
|
+
content: {
|
|
2323
|
+
"application/json": {
|
|
2324
|
+
[key: string]: string;
|
|
2325
|
+
};
|
|
2326
|
+
};
|
|
2321
2327
|
};
|
|
2322
2328
|
/** @description Missing event_slug parameter */
|
|
2323
2329
|
400: {
|
|
@@ -2635,7 +2641,9 @@ export interface operations {
|
|
|
2635
2641
|
headers: {
|
|
2636
2642
|
[name: string]: unknown;
|
|
2637
2643
|
};
|
|
2638
|
-
content
|
|
2644
|
+
content: {
|
|
2645
|
+
"application/json": components["schemas"]["MarketResponse"][];
|
|
2646
|
+
};
|
|
2639
2647
|
};
|
|
2640
2648
|
/** @description Bad request - validation error (search length, array limits, conflicting params) */
|
|
2641
2649
|
400: {
|
|
@@ -3544,7 +3552,11 @@ export interface operations {
|
|
|
3544
3552
|
headers: {
|
|
3545
3553
|
[name: string]: unknown;
|
|
3546
3554
|
};
|
|
3547
|
-
content
|
|
3555
|
+
content: {
|
|
3556
|
+
"application/json": {
|
|
3557
|
+
[key: string]: string;
|
|
3558
|
+
};
|
|
3559
|
+
};
|
|
3548
3560
|
};
|
|
3549
3561
|
/** @description Missing series_slug parameter */
|
|
3550
3562
|
400: {
|
|
@@ -508,7 +508,7 @@ export interface webhooks {
|
|
|
508
508
|
put?: never;
|
|
509
509
|
/**
|
|
510
510
|
* Asset price tick callback
|
|
511
|
-
* @description Fired when the price of a tracked crypto asset updates (BTC, ETH, SOL, XRP). Use `asset_symbols` to restrict to specific assets (empty = all).
|
|
511
|
+
* @description Fired when the price of a tracked crypto asset updates (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Use `asset_symbols` to restrict to specific assets (empty = all).
|
|
512
512
|
*/
|
|
513
513
|
post: operations["asset-price-tick"];
|
|
514
514
|
delete?: never;
|
|
@@ -528,7 +528,7 @@ export interface webhooks {
|
|
|
528
528
|
put?: never;
|
|
529
529
|
/**
|
|
530
530
|
* Asset price window update callback
|
|
531
|
-
* @description Fired at the start and end of each price candle for tracked crypto assets (BTC, ETH, SOL, XRP). Payload includes `update_type` (`"open"` or `"close"`) indicating whether the candle is opening or closing. Use `asset_symbols` to restrict to specific assets. Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"4h"`, `"1d"`, `"24h"`.
|
|
531
|
+
* @description Fired at the start and end of each price candle for tracked crypto assets (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Payload includes `update_type` (`"open"` or `"close"`) indicating whether the candle is opening or closing. Use `asset_symbols` to restrict to specific assets. Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"4h"`, `"1d"`, `"24h"`.
|
|
532
532
|
*/
|
|
533
533
|
post: operations["asset-price-window-update"];
|
|
534
534
|
delete?: never;
|
|
@@ -546,7 +546,7 @@ export interface components {
|
|
|
546
546
|
* @description Asset symbol
|
|
547
547
|
* @enum {string}
|
|
548
548
|
*/
|
|
549
|
-
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
549
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
550
550
|
/** @description Current asset price in USD from the Chainlink feed */
|
|
551
551
|
price: number;
|
|
552
552
|
/**
|
|
@@ -561,7 +561,7 @@ export interface components {
|
|
|
561
561
|
* @description Asset symbol
|
|
562
562
|
* @enum {string}
|
|
563
563
|
*/
|
|
564
|
-
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
564
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
565
565
|
/**
|
|
566
566
|
* @description Candle / window size
|
|
567
567
|
* @enum {string}
|
|
@@ -1259,7 +1259,7 @@ export interface components {
|
|
|
1259
1259
|
exclude_shortterm_markets?: boolean;
|
|
1260
1260
|
/**
|
|
1261
1261
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
|
|
1262
|
-
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets.
|
|
1262
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets.
|
|
1263
1263
|
*/
|
|
1264
1264
|
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1265
1265
|
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
@@ -1441,7 +1441,7 @@ export interface components {
|
|
|
1441
1441
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
1442
1442
|
* @enum {string}
|
|
1443
1443
|
*/
|
|
1444
|
-
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
1444
|
+
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
1445
1445
|
/** @description Single event type entry for the events list */
|
|
1446
1446
|
WebhookEventInfo: {
|
|
1447
1447
|
/** @description Event type identifier (e.g. "first_trade") */
|
|
@@ -1569,7 +1569,7 @@ export interface components {
|
|
|
1569
1569
|
spike_ratio?: number | null;
|
|
1570
1570
|
/**
|
|
1571
1571
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
|
|
1572
|
-
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything).
|
|
1572
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets (send everything).
|
|
1573
1573
|
*/
|
|
1574
1574
|
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1575
1575
|
};
|
|
@@ -2056,12 +2056,12 @@ export interface components {
|
|
|
2056
2056
|
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
2057
2057
|
AssetPriceTickFilters: {
|
|
2058
2058
|
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2059
|
-
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
|
|
2059
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
2060
2060
|
};
|
|
2061
2061
|
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
2062
2062
|
AssetPriceWindowUpdateFilters: {
|
|
2063
2063
|
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2064
|
-
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
|
|
2064
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
2065
2065
|
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
2066
2066
|
timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
|
|
2067
2067
|
};
|