@structbuild/sdk 0.5.4 → 0.5.6-staging.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/dist/client.d.ts +2 -1
- package/dist/generated/polymarket.d.ts +6847 -4505
- package/dist/generated/webhooks.d.ts +743 -1086
- package/dist/generated/ws-alerts.d.ts +741 -1090
- package/dist/generated/ws.d.ts +114 -821
- package/dist/index.cjs +34 -1
- package/dist/index.cjs.map +6 -5
- package/dist/index.js +34 -1
- package/dist/index.js.map +6 -5
- package/dist/namespaces/index.d.ts +1 -0
- package/dist/namespaces/smartMoney.d.ts +13 -0
- package/dist/namespaces/trader.d.ts +2 -1
- package/dist/types/index.d.ts +65 -2
- package/package.json +1 -1
|
@@ -684,192 +684,111 @@ export interface components {
|
|
|
684
684
|
slug?: string | null;
|
|
685
685
|
event_slug?: string | null;
|
|
686
686
|
};
|
|
687
|
-
/** @description
|
|
688
|
-
AssetPriceTickFilters: {
|
|
689
|
-
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
690
|
-
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
|
|
691
|
-
};
|
|
692
|
-
/** @description Webhook payload for an asset price tick. */
|
|
687
|
+
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
693
688
|
AssetPriceTickPayload: {
|
|
694
|
-
/** @description Asset symbol */
|
|
695
|
-
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
696
689
|
/**
|
|
697
|
-
*
|
|
698
|
-
* @
|
|
690
|
+
* @description Asset symbol
|
|
691
|
+
* @enum {string}
|
|
699
692
|
*/
|
|
693
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
694
|
+
/** @description Current asset price in USD from the Chainlink feed */
|
|
700
695
|
price: number;
|
|
701
696
|
/**
|
|
702
697
|
* Format: int64
|
|
703
|
-
* @description Tick timestamp
|
|
698
|
+
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
704
699
|
*/
|
|
705
700
|
timestamp_ms: number;
|
|
706
701
|
};
|
|
707
|
-
/** @description
|
|
708
|
-
AssetPriceWindowUpdateFilters: {
|
|
709
|
-
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
710
|
-
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
|
|
711
|
-
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
712
|
-
timeframes?: components["schemas"]["AssetWindowFilterTimeframe"][] | null;
|
|
713
|
-
};
|
|
714
|
-
/** @description Webhook payload for an asset price window open or close. */
|
|
702
|
+
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
715
703
|
AssetPriceWindowUpdatePayload: {
|
|
716
|
-
/**
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
704
|
+
/**
|
|
705
|
+
* @description Asset symbol
|
|
706
|
+
* @enum {string}
|
|
707
|
+
*/
|
|
708
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
709
|
+
/**
|
|
710
|
+
* @description Candle / window size
|
|
711
|
+
* @enum {string}
|
|
712
|
+
*/
|
|
713
|
+
variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
720
714
|
/**
|
|
721
715
|
* Format: int64
|
|
722
|
-
* @description Window start timestamp (milliseconds since epoch)
|
|
716
|
+
* @description Window start timestamp (milliseconds since Unix epoch)
|
|
723
717
|
*/
|
|
724
718
|
start_time: number;
|
|
725
719
|
/**
|
|
726
720
|
* Format: int64
|
|
727
|
-
* @description Window end timestamp (milliseconds since epoch)
|
|
721
|
+
* @description Window end timestamp (milliseconds since Unix epoch)
|
|
728
722
|
*/
|
|
729
723
|
end_time: number;
|
|
730
|
-
/**
|
|
731
|
-
* Format: double
|
|
732
|
-
* @description Opening price at start_time
|
|
733
|
-
*/
|
|
724
|
+
/** @description Opening price at start_time (USD) */
|
|
734
725
|
open_price: number;
|
|
735
|
-
/**
|
|
736
|
-
* Format: double
|
|
737
|
-
* @description Closing price at end_time (0.0 on an "open" update — not yet available)
|
|
738
|
-
*/
|
|
726
|
+
/** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
|
|
739
727
|
close_price: number;
|
|
740
|
-
/** @description "open" when the window starts, "close" when the window is complete */
|
|
741
|
-
update_type: components["schemas"]["AssetPriceWindowUpdateType"];
|
|
742
|
-
};
|
|
743
|
-
/**
|
|
744
|
-
* @description Whether this update is the open or the close of a candle.
|
|
745
|
-
* @enum {string}
|
|
746
|
-
*/
|
|
747
|
-
AssetPriceWindowUpdateType: "open" | "close";
|
|
748
|
-
/**
|
|
749
|
-
* @description Time-window variant emitted by the asset price window stream.
|
|
750
|
-
* @enum {string}
|
|
751
|
-
*/
|
|
752
|
-
AssetPriceWindowVariant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
753
|
-
/**
|
|
754
|
-
* @description Candle sizes accepted by `asset_price_window_update.timeframes`.
|
|
755
|
-
* @enum {string}
|
|
756
|
-
*/
|
|
757
|
-
AssetWindowFilterTimeframe: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
758
|
-
/**
|
|
759
|
-
* @description Subscription filters for the `close_to_bond` event. At least one of
|
|
760
|
-
* `min_probability` or `max_probability` is required (enforced at runtime).
|
|
761
|
-
*/
|
|
762
|
-
CloseToBondFilters: {
|
|
763
|
-
/**
|
|
764
|
-
* Format: double
|
|
765
|
-
* @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set.
|
|
766
|
-
*/
|
|
767
|
-
min_probability?: number | null;
|
|
768
728
|
/**
|
|
769
|
-
*
|
|
770
|
-
* @
|
|
729
|
+
* @description "open" when the candle opens, "close" when it closes with a confirmed price
|
|
730
|
+
* @enum {string}
|
|
771
731
|
*/
|
|
772
|
-
|
|
773
|
-
/** @description Restrict to these markets. */
|
|
774
|
-
condition_ids?: string[] | null;
|
|
775
|
-
/** @description Restrict to these outcome token IDs. */
|
|
776
|
-
position_ids?: string[] | null;
|
|
777
|
-
/** @description Restrict to markets in these events. */
|
|
778
|
-
event_slugs?: string[] | null;
|
|
779
|
-
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
780
|
-
outcomes?: string[] | null;
|
|
781
|
-
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
782
|
-
position_outcome_indices?: number[] | null;
|
|
783
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
784
|
-
exclude_shortterm_markets?: boolean | null;
|
|
732
|
+
update_type: "open" | "close";
|
|
785
733
|
};
|
|
786
|
-
/** @description
|
|
734
|
+
/** @description Payload delivered when a trade occurs at a near-certain-outcome price */
|
|
787
735
|
CloseToBondPayload: {
|
|
788
|
-
/** @description
|
|
736
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
789
737
|
trader: string;
|
|
790
|
-
/** @description
|
|
738
|
+
/** @description Order filler wallet address (lowercase) */
|
|
791
739
|
taker: string;
|
|
792
|
-
/** @description
|
|
740
|
+
/** @description ERC-1155 outcome token ID */
|
|
793
741
|
position_id: string;
|
|
794
|
-
/** @description
|
|
742
|
+
/** @description Parent market condition ID */
|
|
795
743
|
condition_id?: string | null;
|
|
796
744
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
797
745
|
outcome?: string | null;
|
|
798
|
-
/**
|
|
799
|
-
* Format: int32
|
|
800
|
-
* @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
|
|
801
|
-
*/
|
|
746
|
+
/** @description 0 = Yes/Up, 1 = No */
|
|
802
747
|
outcome_index?: number | null;
|
|
803
|
-
/** @description Market question */
|
|
804
748
|
question?: string | null;
|
|
805
|
-
/** @description Market slug */
|
|
806
749
|
market_slug?: string | null;
|
|
807
|
-
/** @description Event slug */
|
|
808
750
|
event_slug?: string | null;
|
|
809
|
-
/** @description Trade ID */
|
|
810
751
|
trade_id: string;
|
|
811
752
|
/** @description Transaction hash */
|
|
812
753
|
hash: string;
|
|
813
|
-
/**
|
|
814
|
-
* Format: int64
|
|
815
|
-
* @description Block number
|
|
816
|
-
*/
|
|
754
|
+
/** Format: int64 */
|
|
817
755
|
block: number;
|
|
818
756
|
/**
|
|
819
757
|
* Format: int64
|
|
820
|
-
* @description
|
|
758
|
+
* @description Unix seconds
|
|
821
759
|
*/
|
|
822
760
|
confirmed_at: number;
|
|
823
|
-
/**
|
|
824
|
-
* Format: double
|
|
825
|
-
* @description USD size of the trade
|
|
826
|
-
*/
|
|
761
|
+
/** @description USD size of the trade */
|
|
827
762
|
amount_usd: number;
|
|
828
|
-
/**
|
|
829
|
-
* Format: double
|
|
830
|
-
* @description Outcome shares traded
|
|
831
|
-
*/
|
|
832
763
|
shares_amount: number;
|
|
833
|
-
/**
|
|
834
|
-
* Format: double
|
|
835
|
-
* @description Fee paid (USD)
|
|
836
|
-
*/
|
|
764
|
+
/** @description Fee paid in USD */
|
|
837
765
|
fee: number;
|
|
838
|
-
/** @
|
|
839
|
-
side:
|
|
840
|
-
/**
|
|
841
|
-
* Format: double
|
|
842
|
-
* @description Price per share (0.0–1.0) — the value that triggered the notification
|
|
843
|
-
*/
|
|
766
|
+
/** @enum {string} */
|
|
767
|
+
side: "Buy" | "Sell";
|
|
768
|
+
/** @description Price that triggered the notification (0.0–1.0) */
|
|
844
769
|
price: number;
|
|
845
|
-
/**
|
|
846
|
-
* Format: double
|
|
847
|
-
* @description Implied probability of the outcome (0.0–1.0)
|
|
848
|
-
*/
|
|
770
|
+
/** @description Implied probability (0.0–1.0) */
|
|
849
771
|
probability?: number | null;
|
|
850
|
-
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
851
|
-
bond_side: string;
|
|
852
772
|
/**
|
|
853
|
-
*
|
|
854
|
-
* @
|
|
773
|
+
* @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
|
|
774
|
+
* @enum {string}
|
|
855
775
|
*/
|
|
776
|
+
bond_side: "high" | "low";
|
|
777
|
+
/** @description The probability threshold from the subscription filter that was breached */
|
|
856
778
|
threshold: number;
|
|
857
779
|
};
|
|
858
780
|
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
859
781
|
ConditionMetricsPayload: {
|
|
860
782
|
/** @description Market condition ID */
|
|
861
783
|
condition_id?: string | null;
|
|
862
|
-
/** @description Aggregation window */
|
|
863
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
864
784
|
/**
|
|
865
|
-
*
|
|
866
|
-
* @
|
|
785
|
+
* @description Aggregation window
|
|
786
|
+
* @enum {string|null}
|
|
867
787
|
*/
|
|
788
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
789
|
+
/** @description Total trading volume in USD for this timeframe */
|
|
868
790
|
volume_usd?: number | null;
|
|
869
|
-
/**
|
|
870
|
-
* Format: double
|
|
871
|
-
* @description Total fees collected in USD
|
|
872
|
-
*/
|
|
791
|
+
/** @description Total fees collected in USD */
|
|
873
792
|
fees?: number | null;
|
|
874
793
|
/**
|
|
875
794
|
* Format: int64
|
|
@@ -951,43 +870,18 @@ export interface components {
|
|
|
951
870
|
slug?: string | null;
|
|
952
871
|
event_slug?: string | null;
|
|
953
872
|
};
|
|
954
|
-
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
955
|
-
EventMetricsFilters: {
|
|
956
|
-
/** @description Restrict to these events. Empty = all events. */
|
|
957
|
-
event_slugs?: string[] | null;
|
|
958
|
-
/** @description Restrict to these aggregation windows. */
|
|
959
|
-
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
960
|
-
/**
|
|
961
|
-
* Format: double
|
|
962
|
-
* @description Only fire when aggregated event volume ≥ this value (USD).
|
|
963
|
-
*/
|
|
964
|
-
min_volume_usd?: number | null;
|
|
965
|
-
/** Format: double */
|
|
966
|
-
max_volume_usd?: number | null;
|
|
967
|
-
/** Format: int64 */
|
|
968
|
-
min_txns?: number | null;
|
|
969
|
-
/** Format: int64 */
|
|
970
|
-
min_unique_traders?: number | null;
|
|
971
|
-
/** Format: double */
|
|
972
|
-
min_fees?: number | null;
|
|
973
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
974
|
-
exclude_shortterm_markets?: boolean | null;
|
|
975
|
-
};
|
|
976
873
|
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
977
874
|
EventMetricsPayload: {
|
|
978
875
|
/** @description Event slug */
|
|
979
876
|
event_slug?: string | null;
|
|
980
|
-
/** @description Aggregation window */
|
|
981
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
982
877
|
/**
|
|
983
|
-
*
|
|
984
|
-
* @
|
|
878
|
+
* @description Aggregation window
|
|
879
|
+
* @enum {string|null}
|
|
985
880
|
*/
|
|
881
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
882
|
+
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
986
883
|
volume_usd?: number | null;
|
|
987
|
-
/**
|
|
988
|
-
* Format: double
|
|
989
|
-
* @description Total fees collected in USD
|
|
990
|
-
*/
|
|
884
|
+
/** @description Total fees collected in USD */
|
|
991
885
|
fees?: number | null;
|
|
992
886
|
/**
|
|
993
887
|
* Format: int64
|
|
@@ -1000,13 +894,21 @@ export interface components {
|
|
|
1000
894
|
*/
|
|
1001
895
|
unique_traders?: number | null;
|
|
1002
896
|
};
|
|
1003
|
-
/** @description
|
|
897
|
+
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
1004
898
|
EventPnlPayload: {
|
|
899
|
+
/** @description Trader wallet address (lowercase) */
|
|
1005
900
|
trader?: string | null;
|
|
901
|
+
/** @description Event slug */
|
|
1006
902
|
event_slug?: string | null;
|
|
1007
|
-
/**
|
|
1008
|
-
|
|
1009
|
-
|
|
903
|
+
/**
|
|
904
|
+
* @description PnL aggregation window
|
|
905
|
+
* @enum {string}
|
|
906
|
+
*/
|
|
907
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
908
|
+
/**
|
|
909
|
+
* Format: int64
|
|
910
|
+
* @description Number of distinct markets traded in this event
|
|
911
|
+
*/
|
|
1010
912
|
markets_traded?: number | null;
|
|
1011
913
|
/** Format: int64 */
|
|
1012
914
|
outcomes_traded?: number | null;
|
|
@@ -1018,58 +920,44 @@ export interface components {
|
|
|
1018
920
|
total_redemptions?: number | null;
|
|
1019
921
|
/** Format: int64 */
|
|
1020
922
|
total_merges?: number | null;
|
|
1021
|
-
/**
|
|
923
|
+
/** @description Total volume in USD */
|
|
1022
924
|
total_volume_usd?: number | null;
|
|
1023
|
-
/** Format: double */
|
|
1024
925
|
buy_usd?: number | null;
|
|
1025
|
-
/** Format: double */
|
|
1026
926
|
sell_usd?: number | null;
|
|
1027
|
-
/** Format: double */
|
|
1028
927
|
redemption_usd?: number | null;
|
|
1029
|
-
/** Format: double */
|
|
1030
928
|
merge_usd?: number | null;
|
|
1031
|
-
/**
|
|
929
|
+
/** @description Realized PnL in USD for this event */
|
|
1032
930
|
realized_pnl_usd?: number | null;
|
|
1033
931
|
/** Format: int64 */
|
|
1034
932
|
winning_markets?: number | null;
|
|
1035
933
|
/** Format: int64 */
|
|
1036
934
|
losing_markets?: number | null;
|
|
1037
|
-
/** Format: double */
|
|
1038
935
|
total_fees?: number | null;
|
|
1039
|
-
/**
|
|
936
|
+
/**
|
|
937
|
+
* Format: int64
|
|
938
|
+
* @description Unix seconds
|
|
939
|
+
*/
|
|
1040
940
|
first_trade_at?: number | null;
|
|
1041
|
-
/**
|
|
941
|
+
/**
|
|
942
|
+
* Format: int64
|
|
943
|
+
* @description Unix seconds
|
|
944
|
+
*/
|
|
1042
945
|
last_trade_at?: number | null;
|
|
1043
946
|
};
|
|
1044
|
-
/** @description
|
|
1045
|
-
EventVolumeMilestoneFilters: {
|
|
1046
|
-
/** @description **Required.** Aggregation windows to monitor. */
|
|
1047
|
-
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
1048
|
-
/** @description Restrict to these events. */
|
|
1049
|
-
event_slugs?: string[] | null;
|
|
1050
|
-
/** @description Specific USD milestones to trigger on. */
|
|
1051
|
-
milestone_amounts?: number[] | null;
|
|
1052
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1053
|
-
exclude_shortterm_markets?: boolean | null;
|
|
1054
|
-
};
|
|
1055
|
-
/** @description Event volume milestone webhook payload */
|
|
947
|
+
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
1056
948
|
EventVolumeMilestonePayload: {
|
|
949
|
+
/** @description Event slug */
|
|
1057
950
|
event_slug: string;
|
|
1058
|
-
timeframe: string;
|
|
1059
951
|
/**
|
|
1060
|
-
*
|
|
1061
|
-
* @
|
|
952
|
+
* @description Aggregation window
|
|
953
|
+
* @enum {string}
|
|
1062
954
|
*/
|
|
955
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
956
|
+
/** @description The USD milestone amount that was crossed */
|
|
1063
957
|
milestone_usd: number;
|
|
1064
|
-
/**
|
|
1065
|
-
* Format: double
|
|
1066
|
-
* @description Current volume (USD) that triggered the milestone
|
|
1067
|
-
*/
|
|
958
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
1068
959
|
current_volume_usd: number;
|
|
1069
|
-
/**
|
|
1070
|
-
* Format: double
|
|
1071
|
-
* @description Total fees collected in this timeframe
|
|
1072
|
-
*/
|
|
960
|
+
/** @description Total fees in USD for this timeframe */
|
|
1073
961
|
fees: number;
|
|
1074
962
|
/**
|
|
1075
963
|
* Format: int64
|
|
@@ -1077,60 +965,25 @@ export interface components {
|
|
|
1077
965
|
*/
|
|
1078
966
|
txns: number;
|
|
1079
967
|
};
|
|
1080
|
-
/** @description
|
|
1081
|
-
EventVolumeSpikeFilters: {
|
|
1082
|
-
/**
|
|
1083
|
-
* Format: double
|
|
1084
|
-
* @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
|
|
1085
|
-
*/
|
|
1086
|
-
spike_ratio: number;
|
|
1087
|
-
/**
|
|
1088
|
-
* Format: int64
|
|
1089
|
-
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
1090
|
-
*/
|
|
1091
|
-
window_secs?: number | null;
|
|
1092
|
-
/** @description Restrict to these events. */
|
|
1093
|
-
event_slugs?: string[] | null;
|
|
1094
|
-
/** @description Restrict to these aggregation windows. */
|
|
1095
|
-
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
1096
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1097
|
-
exclude_shortterm_markets?: boolean | null;
|
|
1098
|
-
};
|
|
1099
|
-
/** @description Event volume spike webhook payload */
|
|
968
|
+
/** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
|
|
1100
969
|
EventVolumeSpikePayload: {
|
|
970
|
+
/** @description Event slug */
|
|
1101
971
|
event_slug: string;
|
|
1102
|
-
event_title?: string | null;
|
|
1103
|
-
image_url?: string | null;
|
|
1104
|
-
timeframe: string;
|
|
1105
972
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
* @
|
|
973
|
+
* @description Aggregation window
|
|
974
|
+
* @enum {string}
|
|
1108
975
|
*/
|
|
976
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
977
|
+
/** @description Current aggregated event volume at time of the spike (USD) */
|
|
1109
978
|
current_volume_usd: number;
|
|
1110
|
-
/**
|
|
1111
|
-
* Format: double
|
|
1112
|
-
* @description Volume at the snapshot baseline (USD)
|
|
1113
|
-
*/
|
|
979
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
1114
980
|
snapshot_volume_usd: number;
|
|
1115
|
-
/**
|
|
1116
|
-
* Format: double
|
|
1117
|
-
* @description New volume since the snapshot that triggered this notification (USD)
|
|
1118
|
-
*/
|
|
981
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1119
982
|
delta_volume_usd: number;
|
|
1120
|
-
/**
|
|
1121
|
-
* Format: double
|
|
1122
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
1123
|
-
*/
|
|
983
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1124
984
|
spike_pct: number;
|
|
1125
|
-
/**
|
|
1126
|
-
* Format: int64
|
|
1127
|
-
* @description Total transactions in this timeframe
|
|
1128
|
-
*/
|
|
985
|
+
/** Format: int64 */
|
|
1129
986
|
txns: number;
|
|
1130
|
-
/**
|
|
1131
|
-
* Format: double
|
|
1132
|
-
* @description Total fees in this timeframe
|
|
1133
|
-
*/
|
|
1134
987
|
fees: number;
|
|
1135
988
|
};
|
|
1136
989
|
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
@@ -1145,10 +998,7 @@ export interface components {
|
|
|
1145
998
|
condition_id?: string | null;
|
|
1146
999
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1147
1000
|
outcome?: string | null;
|
|
1148
|
-
/**
|
|
1149
|
-
* Format: int32
|
|
1150
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1151
|
-
*/
|
|
1001
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1152
1002
|
outcome_index?: number | null;
|
|
1153
1003
|
/** @description Market question text */
|
|
1154
1004
|
question?: string | null;
|
|
@@ -1170,128 +1020,148 @@ export interface components {
|
|
|
1170
1020
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1171
1021
|
*/
|
|
1172
1022
|
confirmed_at: number;
|
|
1173
|
-
/**
|
|
1174
|
-
* Format: double
|
|
1175
|
-
* @description USD size of the trade (6 decimal places)
|
|
1176
|
-
*/
|
|
1023
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1177
1024
|
amount_usd: number;
|
|
1178
|
-
/**
|
|
1179
|
-
* Format: double
|
|
1180
|
-
* @description Outcome shares traded (6 decimal places)
|
|
1181
|
-
*/
|
|
1025
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1182
1026
|
shares_amount: number;
|
|
1027
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1028
|
+
fee: number;
|
|
1183
1029
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
* @
|
|
1030
|
+
* @description Trade direction
|
|
1031
|
+
* @enum {string}
|
|
1186
1032
|
*/
|
|
1187
|
-
fee: number;
|
|
1188
|
-
/** @description Trade direction */
|
|
1189
1033
|
side: "Buy" | "Sell";
|
|
1034
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1035
|
+
price: number;
|
|
1190
1036
|
/**
|
|
1191
|
-
*
|
|
1192
|
-
* @
|
|
1037
|
+
* @description Exchange contract that processed the trade
|
|
1038
|
+
* @enum {string}
|
|
1039
|
+
*/
|
|
1040
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1041
|
+
/**
|
|
1042
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
1043
|
+
* @enum {string}
|
|
1193
1044
|
*/
|
|
1194
|
-
price: number;
|
|
1195
|
-
/** @description Exchange contract that processed the trade */
|
|
1196
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
1197
|
-
/** @description Trade type (webhook events only fire on order fills) */
|
|
1198
1045
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1199
1046
|
};
|
|
1200
|
-
/** @description
|
|
1047
|
+
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
1201
1048
|
GlobalPnlPayload: {
|
|
1049
|
+
/** @description Trader wallet address (lowercase) */
|
|
1202
1050
|
trader?: string | null;
|
|
1203
|
-
/**
|
|
1204
|
-
|
|
1205
|
-
|
|
1051
|
+
/**
|
|
1052
|
+
* @description PnL aggregation window
|
|
1053
|
+
* @enum {string}
|
|
1054
|
+
*/
|
|
1055
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
1056
|
+
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
1206
1057
|
realized_pnl_usd?: number | null;
|
|
1207
|
-
/**
|
|
1058
|
+
/**
|
|
1059
|
+
* Format: int64
|
|
1060
|
+
* @description Number of distinct events traded
|
|
1061
|
+
*/
|
|
1208
1062
|
events_traded?: number | null;
|
|
1209
|
-
/**
|
|
1063
|
+
/**
|
|
1064
|
+
* Format: int64
|
|
1065
|
+
* @description Number of distinct markets traded
|
|
1066
|
+
*/
|
|
1210
1067
|
markets_traded?: number | null;
|
|
1211
|
-
/**
|
|
1068
|
+
/**
|
|
1069
|
+
* Format: int64
|
|
1070
|
+
* @description Total buy transactions
|
|
1071
|
+
*/
|
|
1212
1072
|
total_buys?: number | null;
|
|
1213
|
-
/**
|
|
1073
|
+
/**
|
|
1074
|
+
* Format: int64
|
|
1075
|
+
* @description Total sell transactions
|
|
1076
|
+
*/
|
|
1214
1077
|
total_sells?: number | null;
|
|
1215
|
-
/**
|
|
1078
|
+
/**
|
|
1079
|
+
* Format: int64
|
|
1080
|
+
* @description Total redemption transactions
|
|
1081
|
+
*/
|
|
1216
1082
|
total_redemptions?: number | null;
|
|
1217
|
-
/**
|
|
1083
|
+
/**
|
|
1084
|
+
* Format: int64
|
|
1085
|
+
* @description Total merge transactions
|
|
1086
|
+
*/
|
|
1218
1087
|
total_merges?: number | null;
|
|
1219
|
-
/**
|
|
1088
|
+
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
1220
1089
|
total_volume_usd?: number | null;
|
|
1221
|
-
/**
|
|
1090
|
+
/** @description Total buy volume in USD */
|
|
1222
1091
|
buy_volume_usd?: number | null;
|
|
1223
|
-
/**
|
|
1092
|
+
/** @description Total sell volume in USD */
|
|
1224
1093
|
sell_volume_usd?: number | null;
|
|
1225
|
-
/**
|
|
1094
|
+
/** @description Total redemption volume in USD */
|
|
1226
1095
|
redemption_volume_usd?: number | null;
|
|
1227
|
-
/**
|
|
1096
|
+
/** @description Total merge volume in USD */
|
|
1228
1097
|
merge_volume_usd?: number | null;
|
|
1229
|
-
/**
|
|
1098
|
+
/**
|
|
1099
|
+
* Format: int64
|
|
1100
|
+
* @description Number of markets where trader realised a profit
|
|
1101
|
+
*/
|
|
1230
1102
|
markets_won?: number | null;
|
|
1231
|
-
/**
|
|
1103
|
+
/**
|
|
1104
|
+
* Format: int64
|
|
1105
|
+
* @description Number of markets where trader realised a loss
|
|
1106
|
+
*/
|
|
1232
1107
|
markets_lost?: number | null;
|
|
1233
|
-
/**
|
|
1108
|
+
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
1234
1109
|
market_win_rate_pct?: number | null;
|
|
1235
|
-
/**
|
|
1110
|
+
/** @description Average PnL per market in USD */
|
|
1236
1111
|
avg_pnl_per_market?: number | null;
|
|
1237
|
-
/**
|
|
1112
|
+
/** @description Average PnL per trade in USD */
|
|
1238
1113
|
avg_pnl_per_trade?: number | null;
|
|
1239
|
-
/**
|
|
1114
|
+
/** @description Average hold time across all positions (seconds) */
|
|
1240
1115
|
avg_hold_time_seconds?: number | null;
|
|
1241
|
-
/**
|
|
1116
|
+
/** @description Total fees paid in USD */
|
|
1242
1117
|
total_fees?: number | null;
|
|
1243
|
-
/**
|
|
1118
|
+
/** @description Best single-trade PnL in USD */
|
|
1244
1119
|
best_trade_pnl_usd?: number | null;
|
|
1120
|
+
/** @description Condition ID of the best trade */
|
|
1245
1121
|
best_trade_condition_id?: string | null;
|
|
1246
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* Format: int64
|
|
1124
|
+
* @description Timestamp of the first trade (Unix seconds)
|
|
1125
|
+
*/
|
|
1247
1126
|
first_trade_at?: number | null;
|
|
1248
|
-
/**
|
|
1127
|
+
/**
|
|
1128
|
+
* Format: int64
|
|
1129
|
+
* @description Timestamp of the most recent trade (Unix seconds)
|
|
1130
|
+
*/
|
|
1249
1131
|
last_trade_at?: number | null;
|
|
1250
1132
|
};
|
|
1251
1133
|
/** @description Response for GET /v1/webhook/events */
|
|
1252
1134
|
ListEventsResponse: {
|
|
1253
1135
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
1254
1136
|
};
|
|
1255
|
-
/** @description
|
|
1256
|
-
MarketCreatedFilters: {
|
|
1257
|
-
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
1258
|
-
tags?: string[] | null;
|
|
1259
|
-
/** @description Restrict to markets belonging to these events. */
|
|
1260
|
-
event_slugs?: string[] | null;
|
|
1261
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
1262
|
-
exclude_shortterm_markets?: boolean | null;
|
|
1263
|
-
};
|
|
1264
|
-
/** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
|
|
1137
|
+
/** @description An outcome entry within a newly created market */
|
|
1265
1138
|
MarketCreatedOutcome: {
|
|
1266
|
-
/**
|
|
1267
|
-
* Format: int32
|
|
1268
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
1269
|
-
*/
|
|
1139
|
+
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
1270
1140
|
index: number;
|
|
1271
1141
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1272
1142
|
name: string;
|
|
1273
|
-
/** @description
|
|
1143
|
+
/** @description ERC-1155 position token ID for this outcome */
|
|
1274
1144
|
position_id: string;
|
|
1275
1145
|
};
|
|
1276
|
-
/** @description
|
|
1146
|
+
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
1277
1147
|
MarketCreatedPayload: {
|
|
1278
1148
|
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
1279
1149
|
condition_id: string;
|
|
1280
1150
|
/** @description Market slug */
|
|
1281
1151
|
market_slug: string;
|
|
1282
|
-
/** @description
|
|
1152
|
+
/** @description Parent event slug */
|
|
1283
1153
|
event_slug?: string | null;
|
|
1284
|
-
/** @description
|
|
1154
|
+
/** @description Parent event ID */
|
|
1285
1155
|
event_id?: string | null;
|
|
1286
|
-
/** @description
|
|
1156
|
+
/** @description Parent event title */
|
|
1287
1157
|
event_title?: string | null;
|
|
1288
|
-
/** @description Series slug */
|
|
1158
|
+
/** @description Series slug (for recurring markets) */
|
|
1289
1159
|
series_slug?: string | null;
|
|
1290
|
-
/** @description
|
|
1160
|
+
/** @description List of market outcomes with their position IDs */
|
|
1291
1161
|
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
1292
|
-
/** @description
|
|
1162
|
+
/** @description Full market question text */
|
|
1293
1163
|
question: string;
|
|
1294
|
-
/** @description
|
|
1164
|
+
/** @description Short display title */
|
|
1295
1165
|
title?: string | null;
|
|
1296
1166
|
/** @description Market description */
|
|
1297
1167
|
description: string;
|
|
@@ -1304,46 +1174,23 @@ export interface components {
|
|
|
1304
1174
|
/** @description Whether this is a neg-risk market */
|
|
1305
1175
|
neg_risk: boolean;
|
|
1306
1176
|
};
|
|
1307
|
-
/** @description
|
|
1308
|
-
|
|
1309
|
-
/** @description
|
|
1310
|
-
|
|
1311
|
-
/** @description
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
|
|
1315
|
-
* @description Only fire when volume ≥ this value (USD).
|
|
1316
|
-
*/
|
|
1317
|
-
min_volume_usd?: number | null;
|
|
1177
|
+
/** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
|
|
1178
|
+
MarketPnlPayload: {
|
|
1179
|
+
/** @description Trader wallet address (lowercase) */
|
|
1180
|
+
trader?: string | null;
|
|
1181
|
+
/** @description Market condition ID */
|
|
1182
|
+
condition_id?: string | null;
|
|
1183
|
+
/** @description Parent event slug */
|
|
1184
|
+
event_slug?: string | null;
|
|
1318
1185
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
* @
|
|
1186
|
+
* @description PnL aggregation window
|
|
1187
|
+
* @enum {string}
|
|
1321
1188
|
*/
|
|
1322
|
-
|
|
1189
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
1323
1190
|
/**
|
|
1324
1191
|
* Format: int64
|
|
1325
|
-
* @description
|
|
1192
|
+
* @description Number of distinct outcomes traded in this market
|
|
1326
1193
|
*/
|
|
1327
|
-
min_txns?: number | null;
|
|
1328
|
-
/**
|
|
1329
|
-
* Format: int64
|
|
1330
|
-
* @description Only fire when unique trader count ≥ this value.
|
|
1331
|
-
*/
|
|
1332
|
-
min_unique_traders?: number | null;
|
|
1333
|
-
/**
|
|
1334
|
-
* Format: double
|
|
1335
|
-
* @description Only fire when total fees ≥ this value (USD).
|
|
1336
|
-
*/
|
|
1337
|
-
min_fees?: number | null;
|
|
1338
|
-
};
|
|
1339
|
-
/** @description Market PnL webhook payload (Arc-optimized) */
|
|
1340
|
-
MarketPnlPayload: {
|
|
1341
|
-
trader?: string | null;
|
|
1342
|
-
condition_id?: string | null;
|
|
1343
|
-
event_slug?: string | null;
|
|
1344
|
-
/** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
|
|
1345
|
-
timeframe: string;
|
|
1346
|
-
/** Format: int64 */
|
|
1347
1194
|
outcomes_traded?: number | null;
|
|
1348
1195
|
/** Format: int64 */
|
|
1349
1196
|
total_buys?: number | null;
|
|
@@ -1353,95 +1200,59 @@ export interface components {
|
|
|
1353
1200
|
total_redemptions?: number | null;
|
|
1354
1201
|
/** Format: int64 */
|
|
1355
1202
|
total_merges?: number | null;
|
|
1356
|
-
/**
|
|
1203
|
+
/** @description Total buy volume in USD */
|
|
1357
1204
|
buy_usd?: number | null;
|
|
1358
|
-
/**
|
|
1205
|
+
/** @description Total sell volume in USD */
|
|
1359
1206
|
sell_usd?: number | null;
|
|
1360
|
-
/**
|
|
1207
|
+
/** @description Total redemption volume in USD */
|
|
1361
1208
|
redemption_usd?: number | null;
|
|
1362
|
-
/**
|
|
1209
|
+
/** @description Total merge volume in USD */
|
|
1363
1210
|
merge_usd?: number | null;
|
|
1364
|
-
/**
|
|
1211
|
+
/** @description Realized PnL in USD for this market */
|
|
1365
1212
|
realized_pnl_usd?: number | null;
|
|
1366
|
-
/**
|
|
1213
|
+
/**
|
|
1214
|
+
* Format: int64
|
|
1215
|
+
* @description Number of outcomes with positive PnL
|
|
1216
|
+
*/
|
|
1367
1217
|
winning_outcomes?: number | null;
|
|
1368
|
-
/**
|
|
1218
|
+
/** @description Total fees paid in USD for this market */
|
|
1369
1219
|
total_fees?: number | null;
|
|
1370
|
-
/** Format: int64 */
|
|
1371
|
-
first_trade_at?: number | null;
|
|
1372
|
-
/** Format: int64 */
|
|
1373
|
-
last_trade_at?: number | null;
|
|
1374
|
-
};
|
|
1375
|
-
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
1376
|
-
MarketVolumeMilestoneFilters: {
|
|
1377
|
-
/** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
|
|
1378
|
-
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
1379
|
-
/** @description Restrict to these markets. Empty = all markets. */
|
|
1380
|
-
condition_ids?: string[] | null;
|
|
1381
|
-
/** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
|
|
1382
|
-
milestone_amounts?: number[] | null;
|
|
1383
|
-
};
|
|
1384
|
-
/** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
|
|
1385
|
-
MarketVolumeSpikeFilters: {
|
|
1386
1220
|
/**
|
|
1387
|
-
* Format:
|
|
1388
|
-
* @description
|
|
1221
|
+
* Format: int64
|
|
1222
|
+
* @description Timestamp of first trade in market (Unix seconds)
|
|
1389
1223
|
*/
|
|
1390
|
-
|
|
1224
|
+
first_trade_at?: number | null;
|
|
1391
1225
|
/**
|
|
1392
1226
|
* Format: int64
|
|
1393
|
-
* @description
|
|
1227
|
+
* @description Timestamp of most recent trade in market (Unix seconds)
|
|
1394
1228
|
*/
|
|
1395
|
-
|
|
1396
|
-
/** @description Restrict to these markets. Empty = all markets. */
|
|
1397
|
-
condition_ids?: string[] | null;
|
|
1398
|
-
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1399
|
-
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
1229
|
+
last_trade_at?: number | null;
|
|
1400
1230
|
};
|
|
1401
|
-
/** @description
|
|
1231
|
+
/** @description Payload delivered when a market's volume has spiked since the last snapshot */
|
|
1402
1232
|
MarketVolumeSpikePayload: {
|
|
1233
|
+
/** @description Market condition ID */
|
|
1403
1234
|
condition_id: string;
|
|
1404
|
-
question?: string | null;
|
|
1405
|
-
market_slug?: string | null;
|
|
1406
|
-
event_slug?: string | null;
|
|
1407
|
-
image_url?: string | null;
|
|
1408
|
-
timeframe: string;
|
|
1409
1235
|
/**
|
|
1410
|
-
*
|
|
1411
|
-
* @
|
|
1236
|
+
* @description Aggregation window
|
|
1237
|
+
* @enum {string}
|
|
1412
1238
|
*/
|
|
1239
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1240
|
+
/** @description Current volume at the time of the spike (USD) */
|
|
1413
1241
|
current_volume_usd: number;
|
|
1414
|
-
/**
|
|
1415
|
-
* Format: double
|
|
1416
|
-
* @description Volume at the snapshot baseline (USD)
|
|
1417
|
-
*/
|
|
1242
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
1418
1243
|
snapshot_volume_usd: number;
|
|
1419
|
-
/**
|
|
1420
|
-
* Format: double
|
|
1421
|
-
* @description New volume since the snapshot that triggered this notification (USD)
|
|
1422
|
-
*/
|
|
1244
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1423
1245
|
delta_volume_usd: number;
|
|
1424
|
-
/**
|
|
1425
|
-
* Format: double
|
|
1426
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
1427
|
-
*/
|
|
1246
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1428
1247
|
spike_pct: number;
|
|
1429
1248
|
/**
|
|
1430
1249
|
* Format: int64
|
|
1431
1250
|
* @description Total transactions in this timeframe
|
|
1432
1251
|
*/
|
|
1433
1252
|
txns: number;
|
|
1434
|
-
/**
|
|
1435
|
-
* Format: double
|
|
1436
|
-
* @description Total fees in this timeframe
|
|
1437
|
-
*/
|
|
1253
|
+
/** @description Total fees in USD for this timeframe */
|
|
1438
1254
|
fees: number;
|
|
1439
1255
|
};
|
|
1440
|
-
/**
|
|
1441
|
-
* @description Aggregation windows emitted by the metrics / milestone streams.
|
|
1442
|
-
* @enum {string}
|
|
1443
|
-
*/
|
|
1444
|
-
MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1445
1256
|
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
1446
1257
|
NegRiskOutcomeReportedEvent: {
|
|
1447
1258
|
id: string;
|
|
@@ -1475,11 +1286,8 @@ export interface components {
|
|
|
1475
1286
|
/** @description Parent market condition ID */
|
|
1476
1287
|
condition_id?: string | null;
|
|
1477
1288
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1478
|
-
outcome?: string | null;
|
|
1479
|
-
/**
|
|
1480
|
-
* Format: int32
|
|
1481
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1482
|
-
*/
|
|
1289
|
+
outcome?: string | null;
|
|
1290
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1483
1291
|
outcome_index?: number | null;
|
|
1484
1292
|
/** @description Market question text */
|
|
1485
1293
|
question?: string | null;
|
|
@@ -1501,44 +1309,32 @@ export interface components {
|
|
|
1501
1309
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1502
1310
|
*/
|
|
1503
1311
|
confirmed_at: number;
|
|
1504
|
-
/**
|
|
1505
|
-
* Format: double
|
|
1506
|
-
* @description USD size of the trade (6 decimal places)
|
|
1507
|
-
*/
|
|
1312
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1508
1313
|
amount_usd: number;
|
|
1509
|
-
/**
|
|
1510
|
-
* Format: double
|
|
1511
|
-
* @description Outcome shares traded (6 decimal places)
|
|
1512
|
-
*/
|
|
1314
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1513
1315
|
shares_amount: number;
|
|
1316
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1317
|
+
fee: number;
|
|
1514
1318
|
/**
|
|
1515
|
-
*
|
|
1516
|
-
* @
|
|
1319
|
+
* @description Trade direction
|
|
1320
|
+
* @enum {string}
|
|
1517
1321
|
*/
|
|
1518
|
-
fee: number;
|
|
1519
|
-
/** @description Trade direction */
|
|
1520
1322
|
side: "Buy" | "Sell";
|
|
1323
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1324
|
+
price: number;
|
|
1325
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1326
|
+
probability?: number | null;
|
|
1521
1327
|
/**
|
|
1522
|
-
*
|
|
1523
|
-
* @
|
|
1328
|
+
* @description Exchange contract that processed the trade
|
|
1329
|
+
* @enum {string}
|
|
1524
1330
|
*/
|
|
1525
|
-
|
|
1331
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1526
1332
|
/**
|
|
1527
|
-
*
|
|
1528
|
-
* @
|
|
1333
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
1334
|
+
* @enum {string}
|
|
1529
1335
|
*/
|
|
1530
|
-
probability?: number | null;
|
|
1531
|
-
/** @description Exchange contract that processed the trade */
|
|
1532
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
1533
|
-
/** @description Trade type (webhook events only fire on order fills) */
|
|
1534
1336
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1535
1337
|
};
|
|
1536
|
-
/**
|
|
1537
|
-
* @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
|
|
1538
|
-
* fill-style trades only.
|
|
1539
|
-
* @enum {string}
|
|
1540
|
-
*/
|
|
1541
|
-
NewTradeFilterType: "OrderFilled" | "OrdersMatched";
|
|
1542
1338
|
/** @description Payload delivered on every order-filled trade */
|
|
1543
1339
|
NewTradePayload: {
|
|
1544
1340
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
@@ -1551,10 +1347,7 @@ export interface components {
|
|
|
1551
1347
|
condition_id?: string | null;
|
|
1552
1348
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1553
1349
|
outcome?: string | null;
|
|
1554
|
-
/**
|
|
1555
|
-
* Format: int32
|
|
1556
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1557
|
-
*/
|
|
1350
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1558
1351
|
outcome_index?: number | null;
|
|
1559
1352
|
/** @description Market question text */
|
|
1560
1353
|
question?: string | null;
|
|
@@ -1576,43 +1369,32 @@ export interface components {
|
|
|
1576
1369
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1577
1370
|
*/
|
|
1578
1371
|
confirmed_at: number;
|
|
1579
|
-
/**
|
|
1580
|
-
* Format: double
|
|
1581
|
-
* @description USD size of the trade (6 decimal places)
|
|
1582
|
-
*/
|
|
1372
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1583
1373
|
amount_usd: number;
|
|
1584
|
-
/**
|
|
1585
|
-
* Format: double
|
|
1586
|
-
* @description Outcome shares traded (6 decimal places)
|
|
1587
|
-
*/
|
|
1374
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1588
1375
|
shares_amount: number;
|
|
1376
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1377
|
+
fee: number;
|
|
1589
1378
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
* @
|
|
1379
|
+
* @description Trade direction
|
|
1380
|
+
* @enum {string}
|
|
1592
1381
|
*/
|
|
1593
|
-
fee: number;
|
|
1594
|
-
/** @description Trade direction */
|
|
1595
1382
|
side: "Buy" | "Sell";
|
|
1383
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1384
|
+
price: number;
|
|
1385
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1386
|
+
probability?: number | null;
|
|
1596
1387
|
/**
|
|
1597
|
-
*
|
|
1598
|
-
* @
|
|
1388
|
+
* @description Exchange contract that processed the trade
|
|
1389
|
+
* @enum {string}
|
|
1599
1390
|
*/
|
|
1600
|
-
|
|
1391
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1601
1392
|
/**
|
|
1602
|
-
*
|
|
1603
|
-
* @
|
|
1393
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
1394
|
+
* @enum {string}
|
|
1604
1395
|
*/
|
|
1605
|
-
probability?: number | null;
|
|
1606
|
-
/** @description Exchange contract that processed the trade */
|
|
1607
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
1608
|
-
/** @description Trade type (webhook events only fire on order fills) */
|
|
1609
1396
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1610
1397
|
};
|
|
1611
|
-
/**
|
|
1612
|
-
* @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
|
|
1613
|
-
* @enum {string}
|
|
1614
|
-
*/
|
|
1615
|
-
OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
|
|
1616
1398
|
/**
|
|
1617
1399
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
1618
1400
|
* and only includes fields relevant to each type.
|
|
@@ -1669,18 +1451,6 @@ export interface components {
|
|
|
1669
1451
|
/** @enum {string} */
|
|
1670
1452
|
event_type: "NegRiskOutcomeReported";
|
|
1671
1453
|
});
|
|
1672
|
-
/** @description Subscription filters for the `oracle_events` event. All fields are optional. */
|
|
1673
|
-
OracleEventsFilters: {
|
|
1674
|
-
/** @description Restrict to these event types (case-insensitive). Empty = all. */
|
|
1675
|
-
oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
|
|
1676
|
-
/** @description Restrict to events for these condition IDs. */
|
|
1677
|
-
condition_ids?: string[] | null;
|
|
1678
|
-
};
|
|
1679
|
-
/**
|
|
1680
|
-
* @description PnL aggregation windows accepted by `*_pnl.timeframes`.
|
|
1681
|
-
* @enum {string}
|
|
1682
|
-
*/
|
|
1683
|
-
PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
1684
1454
|
/**
|
|
1685
1455
|
* @description PnL timeframe enum for webhook filtering
|
|
1686
1456
|
* @enum {string}
|
|
@@ -1707,7 +1477,7 @@ export interface components {
|
|
|
1707
1477
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
1708
1478
|
* - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
|
|
1709
1479
|
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
1710
|
-
* - probability_spike: condition_ids, event_slugs, outcomes,
|
|
1480
|
+
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1711
1481
|
* - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1712
1482
|
* - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
1713
1483
|
* - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
@@ -1878,44 +1648,6 @@ export interface components {
|
|
|
1878
1648
|
*/
|
|
1879
1649
|
oracle_event_types?: string[];
|
|
1880
1650
|
};
|
|
1881
|
-
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
1882
|
-
PositionMetricsFilters: {
|
|
1883
|
-
/** @description Restrict to these outcome token IDs. */
|
|
1884
|
-
position_ids?: string[] | null;
|
|
1885
|
-
/** @description Restrict to positions within these markets. */
|
|
1886
|
-
condition_ids?: string[] | null;
|
|
1887
|
-
/** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
|
|
1888
|
-
outcomes?: string[] | null;
|
|
1889
|
-
/** @description Restrict to these aggregation windows. */
|
|
1890
|
-
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
1891
|
-
/**
|
|
1892
|
-
* Format: double
|
|
1893
|
-
* @description Only fire when position volume ≥ this value (USD).
|
|
1894
|
-
*/
|
|
1895
|
-
min_volume_usd?: number | null;
|
|
1896
|
-
/** Format: double */
|
|
1897
|
-
max_volume_usd?: number | null;
|
|
1898
|
-
/** Format: double */
|
|
1899
|
-
min_buy_usd?: number | null;
|
|
1900
|
-
/** Format: double */
|
|
1901
|
-
min_sell_volume_usd?: number | null;
|
|
1902
|
-
/** Format: int64 */
|
|
1903
|
-
min_txns?: number | null;
|
|
1904
|
-
/** Format: int64 */
|
|
1905
|
-
min_unique_traders?: number | null;
|
|
1906
|
-
/**
|
|
1907
|
-
* Format: double
|
|
1908
|
-
* @description Only fire when price change % ≥ this value.
|
|
1909
|
-
*/
|
|
1910
|
-
min_price_change_pct?: number | null;
|
|
1911
|
-
/**
|
|
1912
|
-
* Format: double
|
|
1913
|
-
* @description Only fire when probability change % ≥ this value.
|
|
1914
|
-
*/
|
|
1915
|
-
min_probability_change_pct?: number | null;
|
|
1916
|
-
/** Format: double */
|
|
1917
|
-
min_fees?: number | null;
|
|
1918
|
-
};
|
|
1919
1651
|
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1920
1652
|
PositionMetricsPayload: {
|
|
1921
1653
|
/** @description ERC-1155 outcome token ID */
|
|
@@ -1923,31 +1655,22 @@ export interface components {
|
|
|
1923
1655
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1924
1656
|
outcome?: string | null;
|
|
1925
1657
|
/**
|
|
1926
|
-
* Format:
|
|
1658
|
+
* Format: int16
|
|
1927
1659
|
* @description Outcome index
|
|
1928
1660
|
*/
|
|
1929
1661
|
outcome_index?: number | null;
|
|
1930
|
-
/** @description Aggregation window */
|
|
1931
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
1932
1662
|
/**
|
|
1933
|
-
*
|
|
1934
|
-
* @
|
|
1663
|
+
* @description Aggregation window
|
|
1664
|
+
* @enum {string|null}
|
|
1935
1665
|
*/
|
|
1666
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
1667
|
+
/** @description Total trading volume in USD */
|
|
1936
1668
|
volume_usd?: number | null;
|
|
1937
|
-
/**
|
|
1938
|
-
* Format: double
|
|
1939
|
-
* @description Buy volume in USD
|
|
1940
|
-
*/
|
|
1669
|
+
/** @description Buy volume in USD */
|
|
1941
1670
|
buy_volume_usd?: number | null;
|
|
1942
|
-
/**
|
|
1943
|
-
* Format: double
|
|
1944
|
-
* @description Sell volume in USD
|
|
1945
|
-
*/
|
|
1671
|
+
/** @description Sell volume in USD */
|
|
1946
1672
|
sell_volume_usd?: number | null;
|
|
1947
|
-
/**
|
|
1948
|
-
* Format: double
|
|
1949
|
-
* @description Total fees in USD
|
|
1950
|
-
*/
|
|
1673
|
+
/** @description Total fees in USD */
|
|
1951
1674
|
fees?: number | null;
|
|
1952
1675
|
/** Format: int64 */
|
|
1953
1676
|
txns?: number | null;
|
|
@@ -1957,293 +1680,127 @@ export interface components {
|
|
|
1957
1680
|
sells?: number | null;
|
|
1958
1681
|
/** Format: int64 */
|
|
1959
1682
|
unique_traders?: number | null;
|
|
1960
|
-
/** Format: double */
|
|
1961
1683
|
price_open?: number | null;
|
|
1962
|
-
/** Format: double */
|
|
1963
1684
|
price_close?: number | null;
|
|
1964
|
-
/** Format: double */
|
|
1965
1685
|
price_high?: number | null;
|
|
1966
|
-
/** Format: double */
|
|
1967
1686
|
price_low?: number | null;
|
|
1968
|
-
/** Format: double */
|
|
1969
1687
|
probability_open?: number | null;
|
|
1970
|
-
/** Format: double */
|
|
1971
1688
|
probability_close?: number | null;
|
|
1972
|
-
/** Format: double */
|
|
1973
1689
|
probability_high?: number | null;
|
|
1974
|
-
/** Format: double */
|
|
1975
1690
|
probability_low?: number | null;
|
|
1976
1691
|
};
|
|
1977
|
-
/** @description
|
|
1978
|
-
PositionVolumeMilestoneFilters: {
|
|
1979
|
-
/** @description **Required.** Aggregation windows to monitor. */
|
|
1980
|
-
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
1981
|
-
/** @description Restrict to these outcome token IDs. */
|
|
1982
|
-
position_ids?: string[] | null;
|
|
1983
|
-
/** @description Restrict to positions within these markets. */
|
|
1984
|
-
condition_ids?: string[] | null;
|
|
1985
|
-
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
1986
|
-
outcomes?: string[] | null;
|
|
1987
|
-
/** @description Specific USD milestones to trigger on. */
|
|
1988
|
-
milestone_amounts?: number[] | null;
|
|
1989
|
-
};
|
|
1990
|
-
/** @description Position volume milestone webhook payload */
|
|
1692
|
+
/** @description Payload delivered when a position's trading volume crosses a USD milestone */
|
|
1991
1693
|
PositionVolumeMilestonePayload: {
|
|
1694
|
+
/** @description Parent market condition ID */
|
|
1992
1695
|
condition_id?: string | null;
|
|
1696
|
+
/** @description ERC-1155 outcome token ID */
|
|
1993
1697
|
position_id: string;
|
|
1698
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1994
1699
|
outcome?: string | null;
|
|
1995
|
-
/** Format: int32 */
|
|
1996
|
-
outcome_index?: number | null;
|
|
1997
|
-
timeframe: string;
|
|
1998
1700
|
/**
|
|
1999
|
-
* Format:
|
|
2000
|
-
* @description
|
|
1701
|
+
* Format: int16
|
|
1702
|
+
* @description Outcome index
|
|
2001
1703
|
*/
|
|
2002
|
-
|
|
1704
|
+
outcome_index?: number | null;
|
|
2003
1705
|
/**
|
|
2004
|
-
*
|
|
2005
|
-
* @
|
|
1706
|
+
* @description Aggregation window
|
|
1707
|
+
* @enum {string}
|
|
2006
1708
|
*/
|
|
1709
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1710
|
+
/** @description The USD milestone amount that was crossed */
|
|
1711
|
+
milestone_usd: number;
|
|
1712
|
+
/** @description Current position volume at time of trigger (USD) */
|
|
2007
1713
|
current_volume_usd: number;
|
|
2008
|
-
/**
|
|
2009
|
-
* Format: double
|
|
2010
|
-
* @description Buy volume (USD)
|
|
2011
|
-
*/
|
|
1714
|
+
/** @description Buy volume in USD for this timeframe */
|
|
2012
1715
|
buy_volume_usd: number;
|
|
2013
|
-
/**
|
|
2014
|
-
* Format: double
|
|
2015
|
-
* @description Sell volume (USD)
|
|
2016
|
-
*/
|
|
1716
|
+
/** @description Sell volume in USD for this timeframe */
|
|
2017
1717
|
sell_volume_usd: number;
|
|
2018
|
-
/**
|
|
2019
|
-
* Format: double
|
|
2020
|
-
* @description Total fees collected in this timeframe
|
|
2021
|
-
*/
|
|
1718
|
+
/** @description Total fees in USD */
|
|
2022
1719
|
fees: number;
|
|
2023
|
-
/**
|
|
2024
|
-
* Format: int64
|
|
2025
|
-
* @description Total transactions in this timeframe
|
|
2026
|
-
*/
|
|
1720
|
+
/** Format: int64 */
|
|
2027
1721
|
txns: number;
|
|
2028
|
-
/**
|
|
2029
|
-
* Format: int64
|
|
2030
|
-
* @description Buy transactions
|
|
2031
|
-
*/
|
|
1722
|
+
/** Format: int64 */
|
|
2032
1723
|
buys: number;
|
|
2033
|
-
/**
|
|
2034
|
-
* Format: int64
|
|
2035
|
-
* @description Sell transactions
|
|
2036
|
-
*/
|
|
1724
|
+
/** Format: int64 */
|
|
2037
1725
|
sells: number;
|
|
2038
1726
|
};
|
|
2039
|
-
/** @description
|
|
2040
|
-
PositionVolumeSpikeFilters: {
|
|
2041
|
-
/**
|
|
2042
|
-
* Format: double
|
|
2043
|
-
* @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
|
|
2044
|
-
*/
|
|
2045
|
-
spike_ratio: number;
|
|
2046
|
-
/**
|
|
2047
|
-
* Format: int64
|
|
2048
|
-
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
2049
|
-
*/
|
|
2050
|
-
window_secs?: number | null;
|
|
2051
|
-
/** @description Restrict to these outcome token IDs. */
|
|
2052
|
-
position_ids?: string[] | null;
|
|
2053
|
-
/** @description Restrict to positions within these markets. */
|
|
2054
|
-
condition_ids?: string[] | null;
|
|
2055
|
-
/** @description Restrict to these outcome names. */
|
|
2056
|
-
outcomes?: string[] | null;
|
|
2057
|
-
/** @description Restrict to these aggregation windows. */
|
|
2058
|
-
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
2059
|
-
};
|
|
2060
|
-
/** @description Position volume spike webhook payload */
|
|
1727
|
+
/** @description Payload delivered when a position's volume has spiked since the last snapshot */
|
|
2061
1728
|
PositionVolumeSpikePayload: {
|
|
1729
|
+
/** @description ERC-1155 outcome token ID */
|
|
2062
1730
|
position_id: string;
|
|
1731
|
+
/** @description Parent market condition ID */
|
|
2063
1732
|
condition_id: string;
|
|
2064
|
-
|
|
2065
|
-
market_slug?: string | null;
|
|
2066
|
-
event_slug?: string | null;
|
|
2067
|
-
image_url?: string | null;
|
|
1733
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
2068
1734
|
outcome?: string | null;
|
|
2069
|
-
/** Format:
|
|
1735
|
+
/** Format: int16 */
|
|
2070
1736
|
outcome_index?: number | null;
|
|
2071
|
-
timeframe: string;
|
|
2072
1737
|
/**
|
|
2073
|
-
*
|
|
2074
|
-
* @
|
|
1738
|
+
* @description Aggregation window
|
|
1739
|
+
* @enum {string}
|
|
2075
1740
|
*/
|
|
1741
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1742
|
+
/** @description Current position volume at the time of the spike (USD) */
|
|
2076
1743
|
current_volume_usd: number;
|
|
2077
|
-
/**
|
|
2078
|
-
* Format: double
|
|
2079
|
-
* @description Volume at the snapshot baseline (USD)
|
|
2080
|
-
*/
|
|
1744
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
2081
1745
|
snapshot_volume_usd: number;
|
|
2082
|
-
/**
|
|
2083
|
-
* Format: double
|
|
2084
|
-
* @description New volume since the snapshot that triggered this notification (USD)
|
|
2085
|
-
*/
|
|
1746
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
2086
1747
|
delta_volume_usd: number;
|
|
2087
|
-
/**
|
|
2088
|
-
* Format: double
|
|
2089
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
2090
|
-
*/
|
|
1748
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
2091
1749
|
spike_pct: number;
|
|
2092
|
-
/**
|
|
2093
|
-
* Format: int64
|
|
2094
|
-
* @description Total transactions in this timeframe
|
|
2095
|
-
*/
|
|
1750
|
+
/** Format: int64 */
|
|
2096
1751
|
txns: number;
|
|
2097
|
-
/**
|
|
2098
|
-
* Format: double
|
|
2099
|
-
* @description Total fees in this timeframe
|
|
2100
|
-
*/
|
|
2101
1752
|
fees: number;
|
|
2102
1753
|
};
|
|
2103
|
-
/** @description Subscription filters for the `price_spike` event. */
|
|
2104
|
-
PriceSpikeFilters: {
|
|
2105
|
-
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2106
|
-
position_ids?: string[] | null;
|
|
2107
|
-
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2108
|
-
condition_ids?: string[] | null;
|
|
2109
|
-
/** @description Restrict to specific events. Empty = all events. */
|
|
2110
|
-
event_slugs?: string[] | null;
|
|
2111
|
-
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
2112
|
-
outcomes?: string[] | null;
|
|
2113
|
-
/**
|
|
2114
|
-
* Format: double
|
|
2115
|
-
* @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
|
|
2116
|
-
*/
|
|
2117
|
-
min_price_change_pct?: number | null;
|
|
2118
|
-
/**
|
|
2119
|
-
* Format: double
|
|
2120
|
-
* @description Minimum YES probability (0-1).
|
|
2121
|
-
*/
|
|
2122
|
-
min_probability?: number | null;
|
|
2123
|
-
/**
|
|
2124
|
-
* Format: double
|
|
2125
|
-
* @description Maximum YES probability (0-1).
|
|
2126
|
-
*/
|
|
2127
|
-
max_probability?: number | null;
|
|
2128
|
-
/**
|
|
2129
|
-
* Format: int64
|
|
2130
|
-
* @description Minimum trades accumulated in the observation window before firing.
|
|
2131
|
-
*/
|
|
2132
|
-
min_txns?: number | null;
|
|
2133
|
-
/**
|
|
2134
|
-
* Format: double
|
|
2135
|
-
* @description Minimum USD volume accumulated in the observation window before firing.
|
|
2136
|
-
*/
|
|
2137
|
-
min_volume_usd?: number | null;
|
|
2138
|
-
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
2139
|
-
/**
|
|
2140
|
-
* Format: int64
|
|
2141
|
-
* @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
|
|
2142
|
-
*/
|
|
2143
|
-
window_secs?: number | null;
|
|
2144
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2145
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2146
|
-
};
|
|
2147
|
-
/** @description Position price spike webhook payload */
|
|
2148
1754
|
PriceSpikePayload: {
|
|
1755
|
+
/** @description Outcome token ID */
|
|
2149
1756
|
position_id: string;
|
|
1757
|
+
/** @description Market condition ID */
|
|
2150
1758
|
condition_id?: string | null;
|
|
2151
|
-
|
|
2152
|
-
market_slug?: string | null;
|
|
1759
|
+
/** @description Event slug */
|
|
2153
1760
|
event_slug?: string | null;
|
|
2154
|
-
|
|
1761
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
2155
1762
|
outcome?: string | null;
|
|
2156
|
-
/** Format: int32 */
|
|
2157
|
-
outcome_index?: number | null;
|
|
2158
1763
|
/**
|
|
2159
|
-
* Format:
|
|
2160
|
-
* @description
|
|
1764
|
+
* Format: int16
|
|
1765
|
+
* @description Outcome index
|
|
2161
1766
|
*/
|
|
1767
|
+
outcome_index?: number | null;
|
|
1768
|
+
/** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
2162
1769
|
previous_price: number;
|
|
2163
|
-
/**
|
|
2164
|
-
* Format: double
|
|
2165
|
-
* @description Current price that triggered the spike
|
|
2166
|
-
*/
|
|
1770
|
+
/** @description Current price that triggered the spike (0.0–1.0) */
|
|
2167
1771
|
current_price: number;
|
|
2168
|
-
/** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
|
|
2169
|
-
spike_direction: string;
|
|
2170
1772
|
/**
|
|
2171
|
-
*
|
|
2172
|
-
* @
|
|
1773
|
+
* @description `"up"` = price rising, `"down"` = price falling
|
|
1774
|
+
* @enum {string}
|
|
2173
1775
|
*/
|
|
1776
|
+
spike_direction: "up" | "down";
|
|
1777
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
2174
1778
|
spike_pct: number;
|
|
2175
1779
|
};
|
|
2176
|
-
/** @description Subscription filters for the `probability_spike` event. */
|
|
2177
|
-
ProbabilitySpikeFilters: {
|
|
2178
|
-
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2179
|
-
position_ids?: string[] | null;
|
|
2180
|
-
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2181
|
-
condition_ids?: string[] | null;
|
|
2182
|
-
/** @description Restrict to specific events. Empty = all events. */
|
|
2183
|
-
event_slugs?: string[] | null;
|
|
2184
|
-
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
2185
|
-
outcomes?: string[] | null;
|
|
2186
|
-
/**
|
|
2187
|
-
* Format: double
|
|
2188
|
-
* @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
|
|
2189
|
-
*/
|
|
2190
|
-
min_probability?: number | null;
|
|
2191
|
-
/**
|
|
2192
|
-
* Format: double
|
|
2193
|
-
* @description Maximum YES probability (0-1).
|
|
2194
|
-
*/
|
|
2195
|
-
max_probability?: number | null;
|
|
2196
|
-
/**
|
|
2197
|
-
* Format: double
|
|
2198
|
-
* @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
|
|
2199
|
-
*/
|
|
2200
|
-
min_probability_change_pct?: number | null;
|
|
2201
|
-
/**
|
|
2202
|
-
* Format: int64
|
|
2203
|
-
* @description Minimum trades accumulated in the observation window before firing.
|
|
2204
|
-
*/
|
|
2205
|
-
min_txns?: number | null;
|
|
2206
|
-
/**
|
|
2207
|
-
* Format: double
|
|
2208
|
-
* @description Minimum USD volume accumulated in the observation window before firing.
|
|
2209
|
-
*/
|
|
2210
|
-
min_volume_usd?: number | null;
|
|
2211
|
-
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
2212
|
-
/**
|
|
2213
|
-
* Format: int64
|
|
2214
|
-
* @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
|
|
2215
|
-
*/
|
|
2216
|
-
window_secs?: number | null;
|
|
2217
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2218
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2219
|
-
};
|
|
2220
|
-
/** @description Position probability spike webhook payload */
|
|
2221
1780
|
ProbabilitySpikePayload: {
|
|
1781
|
+
/** @description Outcome token ID */
|
|
2222
1782
|
position_id: string;
|
|
1783
|
+
/** @description Market condition ID */
|
|
2223
1784
|
condition_id?: string | null;
|
|
2224
|
-
|
|
2225
|
-
market_slug?: string | null;
|
|
1785
|
+
/** @description Event slug */
|
|
2226
1786
|
event_slug?: string | null;
|
|
2227
|
-
|
|
1787
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
2228
1788
|
outcome?: string | null;
|
|
2229
|
-
/** Format: int32 */
|
|
2230
|
-
outcome_index?: number | null;
|
|
2231
1789
|
/**
|
|
2232
|
-
* Format:
|
|
2233
|
-
* @description
|
|
1790
|
+
* Format: int16
|
|
1791
|
+
* @description Outcome index
|
|
2234
1792
|
*/
|
|
1793
|
+
outcome_index?: number | null;
|
|
1794
|
+
/** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
2235
1795
|
previous_probability: number;
|
|
2236
|
-
/**
|
|
2237
|
-
* Format: double
|
|
2238
|
-
* @description Current probability that triggered the spike
|
|
2239
|
-
*/
|
|
1796
|
+
/** @description Current probability that triggered the spike (0.0–1.0) */
|
|
2240
1797
|
current_probability: number;
|
|
2241
|
-
/** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
|
|
2242
|
-
spike_direction: string;
|
|
2243
1798
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
* @
|
|
1799
|
+
* @description `"up"` = probability rising, `"down"` = probability falling
|
|
1800
|
+
* @enum {string}
|
|
2246
1801
|
*/
|
|
1802
|
+
spike_direction: "up" | "down";
|
|
1803
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
2247
1804
|
spike_pct: number;
|
|
2248
1805
|
};
|
|
2249
1806
|
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
@@ -2535,290 +2092,6 @@ export interface components {
|
|
|
2535
2092
|
* @enum {string}
|
|
2536
2093
|
*/
|
|
2537
2094
|
SpikeDirection: "up" | "down" | "both";
|
|
2538
|
-
/**
|
|
2539
|
-
* @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
|
|
2540
|
-
* full set of typed prediction-trade variants.
|
|
2541
|
-
* @enum {string}
|
|
2542
|
-
*/
|
|
2543
|
-
TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
|
|
2544
|
-
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
2545
|
-
TraderEventPnlFilters: {
|
|
2546
|
-
/** @description Track only these trader wallet addresses. */
|
|
2547
|
-
traders?: string[] | null;
|
|
2548
|
-
/** @description Restrict to these events. */
|
|
2549
|
-
event_slugs?: string[] | null;
|
|
2550
|
-
/**
|
|
2551
|
-
* Format: double
|
|
2552
|
-
* @description Only fire when per-event realized PnL ≥ this value (USD).
|
|
2553
|
-
*/
|
|
2554
|
-
min_realized_pnl_usd?: number | null;
|
|
2555
|
-
/**
|
|
2556
|
-
* Format: double
|
|
2557
|
-
* @description Only fire when per-event realized PnL ≤ this value (USD).
|
|
2558
|
-
*/
|
|
2559
|
-
max_realized_pnl_usd?: number | null;
|
|
2560
|
-
/**
|
|
2561
|
-
* Format: double
|
|
2562
|
-
* @description Only fire when total event volume ≥ this value (USD).
|
|
2563
|
-
*/
|
|
2564
|
-
min_volume_usd?: number | null;
|
|
2565
|
-
/**
|
|
2566
|
-
* Format: double
|
|
2567
|
-
* @description Only fire when total event volume ≤ this value (USD).
|
|
2568
|
-
*/
|
|
2569
|
-
max_volume_usd?: number | null;
|
|
2570
|
-
/**
|
|
2571
|
-
* Format: double
|
|
2572
|
-
* @description Only fire when buy volume within the event ≥ this value (USD).
|
|
2573
|
-
*/
|
|
2574
|
-
min_buy_usd?: number | null;
|
|
2575
|
-
/**
|
|
2576
|
-
* Format: double
|
|
2577
|
-
* @description Only fire when sell volume within the event ≥ this value (USD).
|
|
2578
|
-
*/
|
|
2579
|
-
min_sell_volume_usd?: number | null;
|
|
2580
|
-
/**
|
|
2581
|
-
* Format: int64
|
|
2582
|
-
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
2583
|
-
*/
|
|
2584
|
-
min_markets_traded?: number | null;
|
|
2585
|
-
/** @description Restrict to these PnL windows. */
|
|
2586
|
-
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2587
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2588
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2589
|
-
};
|
|
2590
|
-
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
2591
|
-
TraderFirstTradeFilters: {
|
|
2592
|
-
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
2593
|
-
wallet_addresses?: string[] | null;
|
|
2594
|
-
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
2595
|
-
condition_ids?: string[] | null;
|
|
2596
|
-
/** @description Restrict to trades in markets belonging to these events. */
|
|
2597
|
-
event_slugs?: string[] | null;
|
|
2598
|
-
/**
|
|
2599
|
-
* Format: double
|
|
2600
|
-
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2601
|
-
*/
|
|
2602
|
-
min_usd_value?: number | null;
|
|
2603
|
-
/**
|
|
2604
|
-
* Format: double
|
|
2605
|
-
* @description Only fire when the outcome probability is ≥ this value.
|
|
2606
|
-
*/
|
|
2607
|
-
min_probability?: number | null;
|
|
2608
|
-
/**
|
|
2609
|
-
* Format: double
|
|
2610
|
-
* @description Only fire when the outcome probability is ≤ this value.
|
|
2611
|
-
*/
|
|
2612
|
-
max_probability?: number | null;
|
|
2613
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2614
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2615
|
-
};
|
|
2616
|
-
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
2617
|
-
TraderGlobalPnlFilters: {
|
|
2618
|
-
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
2619
|
-
traders?: string[] | null;
|
|
2620
|
-
/**
|
|
2621
|
-
* Format: double
|
|
2622
|
-
* @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
|
|
2623
|
-
*/
|
|
2624
|
-
min_realized_pnl_usd?: number | null;
|
|
2625
|
-
/**
|
|
2626
|
-
* Format: double
|
|
2627
|
-
* @description Only fire when realized PnL ≤ this value (USD).
|
|
2628
|
-
*/
|
|
2629
|
-
max_realized_pnl_usd?: number | null;
|
|
2630
|
-
/**
|
|
2631
|
-
* Format: double
|
|
2632
|
-
* @description Only fire when total trading volume ≥ this value (USD).
|
|
2633
|
-
*/
|
|
2634
|
-
min_volume_usd?: number | null;
|
|
2635
|
-
/**
|
|
2636
|
-
* Format: double
|
|
2637
|
-
* @description Only fire when total trading volume ≤ this value (USD).
|
|
2638
|
-
*/
|
|
2639
|
-
max_volume_usd?: number | null;
|
|
2640
|
-
/**
|
|
2641
|
-
* Format: double
|
|
2642
|
-
* @description Only fire when buy volume ≥ this value (USD).
|
|
2643
|
-
*/
|
|
2644
|
-
min_buy_usd?: number | null;
|
|
2645
|
-
/**
|
|
2646
|
-
* Format: double
|
|
2647
|
-
* @description Only fire when sell volume ≥ this value (USD).
|
|
2648
|
-
*/
|
|
2649
|
-
min_sell_volume_usd?: number | null;
|
|
2650
|
-
/**
|
|
2651
|
-
* Format: double
|
|
2652
|
-
* @description Only fire when market win rate ≥ this percentage (0.0–100.0).
|
|
2653
|
-
*/
|
|
2654
|
-
min_win_rate?: number | null;
|
|
2655
|
-
/**
|
|
2656
|
-
* Format: int64
|
|
2657
|
-
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
2658
|
-
*/
|
|
2659
|
-
min_markets_traded?: number | null;
|
|
2660
|
-
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
2661
|
-
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2662
|
-
};
|
|
2663
|
-
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
2664
|
-
TraderMarketPnlFilters: {
|
|
2665
|
-
/** @description Track only these trader wallet addresses. */
|
|
2666
|
-
traders?: string[] | null;
|
|
2667
|
-
/** @description Restrict to these markets. */
|
|
2668
|
-
condition_ids?: string[] | null;
|
|
2669
|
-
/** @description Restrict to markets in these events. */
|
|
2670
|
-
event_slugs?: string[] | null;
|
|
2671
|
-
/**
|
|
2672
|
-
* Format: double
|
|
2673
|
-
* @description Only fire when per-market realized PnL ≥ this value (USD).
|
|
2674
|
-
*/
|
|
2675
|
-
min_realized_pnl_usd?: number | null;
|
|
2676
|
-
/**
|
|
2677
|
-
* Format: double
|
|
2678
|
-
* @description Only fire when per-market realized PnL ≤ this value (USD).
|
|
2679
|
-
*/
|
|
2680
|
-
max_realized_pnl_usd?: number | null;
|
|
2681
|
-
/**
|
|
2682
|
-
* Format: double
|
|
2683
|
-
* @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
|
|
2684
|
-
*/
|
|
2685
|
-
min_volume_usd?: number | null;
|
|
2686
|
-
/**
|
|
2687
|
-
* Format: double
|
|
2688
|
-
* @description Only fire when total volume ≤ this value (USD).
|
|
2689
|
-
*/
|
|
2690
|
-
max_volume_usd?: number | null;
|
|
2691
|
-
/**
|
|
2692
|
-
* Format: double
|
|
2693
|
-
* @description Only fire when buy volume in the market ≥ this value (USD).
|
|
2694
|
-
*/
|
|
2695
|
-
min_buy_usd?: number | null;
|
|
2696
|
-
/**
|
|
2697
|
-
* Format: double
|
|
2698
|
-
* @description Only fire when sell volume in the market ≥ this value (USD).
|
|
2699
|
-
*/
|
|
2700
|
-
min_sell_volume_usd?: number | null;
|
|
2701
|
-
/** @description Restrict to these PnL windows. */
|
|
2702
|
-
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2703
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2704
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2705
|
-
};
|
|
2706
|
-
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
2707
|
-
TraderNewMarketFilters: {
|
|
2708
|
-
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
2709
|
-
wallet_addresses?: string[] | null;
|
|
2710
|
-
/** @description Restrict to these markets. */
|
|
2711
|
-
condition_ids?: string[] | null;
|
|
2712
|
-
/** @description Restrict to markets belonging to these events. */
|
|
2713
|
-
event_slugs?: string[] | null;
|
|
2714
|
-
/**
|
|
2715
|
-
* Format: double
|
|
2716
|
-
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2717
|
-
*/
|
|
2718
|
-
min_usd_value?: number | null;
|
|
2719
|
-
/**
|
|
2720
|
-
* Format: double
|
|
2721
|
-
* @description Only fire when the outcome probability is ≥ this value.
|
|
2722
|
-
*/
|
|
2723
|
-
min_probability?: number | null;
|
|
2724
|
-
/**
|
|
2725
|
-
* Format: double
|
|
2726
|
-
* @description Only fire when the outcome probability is ≤ this value.
|
|
2727
|
-
*/
|
|
2728
|
-
max_probability?: number | null;
|
|
2729
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2730
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2731
|
-
};
|
|
2732
|
-
/** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
|
|
2733
|
-
TraderNewTradeFilters: {
|
|
2734
|
-
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2735
|
-
wallet_addresses?: string[] | null;
|
|
2736
|
-
/** @description Restrict to these markets. */
|
|
2737
|
-
condition_ids?: string[] | null;
|
|
2738
|
-
/** @description Restrict to markets belonging to these events. */
|
|
2739
|
-
event_slugs?: string[] | null;
|
|
2740
|
-
/**
|
|
2741
|
-
* Format: double
|
|
2742
|
-
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2743
|
-
* @default 0
|
|
2744
|
-
*/
|
|
2745
|
-
min_usd_value: number | null;
|
|
2746
|
-
/**
|
|
2747
|
-
* Format: double
|
|
2748
|
-
* @description Only fire when outcome probability is ≥ this value.
|
|
2749
|
-
*/
|
|
2750
|
-
min_probability?: number | null;
|
|
2751
|
-
/**
|
|
2752
|
-
* Format: double
|
|
2753
|
-
* @description Only fire when outcome probability is ≤ this value.
|
|
2754
|
-
*/
|
|
2755
|
-
max_probability?: number | null;
|
|
2756
|
-
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
2757
|
-
trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
|
|
2758
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2759
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2760
|
-
};
|
|
2761
|
-
/**
|
|
2762
|
-
* @description Subscription filters for the `trader_trade_event` event. All fields are optional.
|
|
2763
|
-
* `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
|
|
2764
|
-
* exclude `PositionsConverted`, because conversion events do not currently carry
|
|
2765
|
-
* `event_slug` in the typed webhook payload.
|
|
2766
|
-
*/
|
|
2767
|
-
TraderTradeEventFilters: {
|
|
2768
|
-
/** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
|
|
2769
|
-
wallet_addresses?: string[] | null;
|
|
2770
|
-
/** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
|
|
2771
|
-
condition_ids?: string[] | null;
|
|
2772
|
-
/** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
|
|
2773
|
-
event_slugs?: string[] | null;
|
|
2774
|
-
/**
|
|
2775
|
-
* Format: double
|
|
2776
|
-
* @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
|
|
2777
|
-
* @default 0
|
|
2778
|
-
*/
|
|
2779
|
-
min_usd_value: number | null;
|
|
2780
|
-
/**
|
|
2781
|
-
* Format: double
|
|
2782
|
-
* @description Only fire when event probability is ≥ this value. Events without probability data do not match.
|
|
2783
|
-
*/
|
|
2784
|
-
min_probability?: number | null;
|
|
2785
|
-
/**
|
|
2786
|
-
* Format: double
|
|
2787
|
-
* @description Only fire when event probability is ≤ this value. Events without probability data do not match.
|
|
2788
|
-
*/
|
|
2789
|
-
max_probability?: number | null;
|
|
2790
|
-
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
2791
|
-
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[] | null;
|
|
2792
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
2793
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2794
|
-
};
|
|
2795
|
-
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
2796
|
-
TraderWhaleTradeFilters: {
|
|
2797
|
-
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2798
|
-
wallet_addresses?: string[] | null;
|
|
2799
|
-
/** @description Restrict to these markets. */
|
|
2800
|
-
condition_ids?: string[] | null;
|
|
2801
|
-
/** @description Restrict to markets belonging to these events. */
|
|
2802
|
-
event_slugs?: string[] | null;
|
|
2803
|
-
/**
|
|
2804
|
-
* Format: double
|
|
2805
|
-
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2806
|
-
* @default 0
|
|
2807
|
-
*/
|
|
2808
|
-
min_usd_value: number | null;
|
|
2809
|
-
/**
|
|
2810
|
-
* Format: double
|
|
2811
|
-
* @description Only fire when outcome probability is ≥ this value.
|
|
2812
|
-
*/
|
|
2813
|
-
min_probability?: number | null;
|
|
2814
|
-
/**
|
|
2815
|
-
* Format: double
|
|
2816
|
-
* @description Only fire when outcome probability is ≤ this value.
|
|
2817
|
-
*/
|
|
2818
|
-
max_probability?: number | null;
|
|
2819
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2820
|
-
exclude_shortterm_markets?: boolean | null;
|
|
2821
|
-
};
|
|
2822
2095
|
/** @description Request body for updating a webhook */
|
|
2823
2096
|
UpdateWebhookRequestBody: {
|
|
2824
2097
|
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
@@ -2831,24 +2104,20 @@ export interface components {
|
|
|
2831
2104
|
/** @description Description/name */
|
|
2832
2105
|
description?: string | null;
|
|
2833
2106
|
};
|
|
2834
|
-
/** @description
|
|
2107
|
+
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
2835
2108
|
VolumeMilestonePayload: {
|
|
2109
|
+
/** @description Market condition ID */
|
|
2836
2110
|
condition_id: string;
|
|
2837
|
-
timeframe: string;
|
|
2838
2111
|
/**
|
|
2839
|
-
*
|
|
2840
|
-
* @
|
|
2112
|
+
* @description Aggregation window that crossed the milestone
|
|
2113
|
+
* @enum {string}
|
|
2841
2114
|
*/
|
|
2115
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
2116
|
+
/** @description The USD milestone amount that was crossed */
|
|
2842
2117
|
milestone_usd: number;
|
|
2843
|
-
/**
|
|
2844
|
-
* Format: double
|
|
2845
|
-
* @description Current volume (USD) that triggered the milestone
|
|
2846
|
-
*/
|
|
2118
|
+
/** @description Current volume at time of trigger (USD) */
|
|
2847
2119
|
current_volume_usd: number;
|
|
2848
|
-
/**
|
|
2849
|
-
* Format: double
|
|
2850
|
-
* @description Total fees collected in this timeframe
|
|
2851
|
-
*/
|
|
2120
|
+
/** @description Total fees in USD for this timeframe */
|
|
2852
2121
|
fees: number;
|
|
2853
2122
|
/**
|
|
2854
2123
|
* Format: int64
|
|
@@ -2856,12 +2125,6 @@ export interface components {
|
|
|
2856
2125
|
*/
|
|
2857
2126
|
txns: number;
|
|
2858
2127
|
};
|
|
2859
|
-
/**
|
|
2860
|
-
* @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
|
|
2861
|
-
* in addition to the metric set.
|
|
2862
|
-
* @enum {string}
|
|
2863
|
-
*/
|
|
2864
|
-
VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
2865
2128
|
/**
|
|
2866
2129
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
2867
2130
|
* @enum {string}
|
|
@@ -3104,10 +2367,7 @@ export interface components {
|
|
|
3104
2367
|
condition_id?: string | null;
|
|
3105
2368
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
3106
2369
|
outcome?: string | null;
|
|
3107
|
-
/**
|
|
3108
|
-
* Format: int32
|
|
3109
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
3110
|
-
*/
|
|
2370
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
3111
2371
|
outcome_index?: number | null;
|
|
3112
2372
|
/** @description Market question text */
|
|
3113
2373
|
question?: string | null;
|
|
@@ -3129,36 +2389,30 @@ export interface components {
|
|
|
3129
2389
|
* @description Block confirmation timestamp (Unix seconds)
|
|
3130
2390
|
*/
|
|
3131
2391
|
confirmed_at: number;
|
|
3132
|
-
/**
|
|
3133
|
-
* Format: double
|
|
3134
|
-
* @description USD size of the trade (6 decimal places)
|
|
3135
|
-
*/
|
|
2392
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
3136
2393
|
amount_usd: number;
|
|
3137
|
-
/**
|
|
3138
|
-
* Format: double
|
|
3139
|
-
* @description Outcome shares traded (6 decimal places)
|
|
3140
|
-
*/
|
|
2394
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
3141
2395
|
shares_amount: number;
|
|
2396
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
2397
|
+
fee: number;
|
|
3142
2398
|
/**
|
|
3143
|
-
*
|
|
3144
|
-
* @
|
|
2399
|
+
* @description Trade direction
|
|
2400
|
+
* @enum {string}
|
|
3145
2401
|
*/
|
|
3146
|
-
fee: number;
|
|
3147
|
-
/** @description Trade direction */
|
|
3148
2402
|
side: "Buy" | "Sell";
|
|
2403
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
2404
|
+
price: number;
|
|
2405
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
2406
|
+
probability?: number | null;
|
|
3149
2407
|
/**
|
|
3150
|
-
*
|
|
3151
|
-
* @
|
|
2408
|
+
* @description Exchange contract that processed the trade
|
|
2409
|
+
* @enum {string}
|
|
3152
2410
|
*/
|
|
3153
|
-
|
|
2411
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
3154
2412
|
/**
|
|
3155
|
-
*
|
|
3156
|
-
* @
|
|
2413
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
2414
|
+
* @enum {string}
|
|
3157
2415
|
*/
|
|
3158
|
-
probability?: number | null;
|
|
3159
|
-
/** @description Exchange contract that processed the trade */
|
|
3160
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
3161
|
-
/** @description Trade type (webhook events only fire on order fills) */
|
|
3162
2416
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
3163
2417
|
};
|
|
3164
2418
|
/** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
|
|
@@ -3661,6 +2915,409 @@ export interface components {
|
|
|
3661
2915
|
/** @enum {string} */
|
|
3662
2916
|
trade_type: "Approval";
|
|
3663
2917
|
};
|
|
2918
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
2919
|
+
TraderFirstTradeFilters: {
|
|
2920
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
2921
|
+
wallet_addresses?: string[];
|
|
2922
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
2923
|
+
condition_ids?: string[];
|
|
2924
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
2925
|
+
event_slugs?: string[];
|
|
2926
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
2927
|
+
min_usd_value?: number;
|
|
2928
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
2929
|
+
min_probability?: number;
|
|
2930
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
2931
|
+
max_probability?: number;
|
|
2932
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2933
|
+
exclude_shortterm_markets?: boolean;
|
|
2934
|
+
};
|
|
2935
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
2936
|
+
TraderNewMarketFilters: {
|
|
2937
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
2938
|
+
wallet_addresses?: string[];
|
|
2939
|
+
/** @description Restrict to these markets. */
|
|
2940
|
+
condition_ids?: string[];
|
|
2941
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2942
|
+
event_slugs?: string[];
|
|
2943
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
2944
|
+
min_usd_value?: number;
|
|
2945
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
2946
|
+
min_probability?: number;
|
|
2947
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
2948
|
+
max_probability?: number;
|
|
2949
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2950
|
+
exclude_shortterm_markets?: boolean;
|
|
2951
|
+
};
|
|
2952
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
2953
|
+
TraderWhaleTradeFilters: {
|
|
2954
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2955
|
+
wallet_addresses?: string[];
|
|
2956
|
+
/** @description Restrict to these markets. */
|
|
2957
|
+
condition_ids?: string[];
|
|
2958
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2959
|
+
event_slugs?: string[];
|
|
2960
|
+
/**
|
|
2961
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2962
|
+
* @default 0
|
|
2963
|
+
*/
|
|
2964
|
+
min_usd_value: number;
|
|
2965
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
2966
|
+
min_probability?: number;
|
|
2967
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
2968
|
+
max_probability?: number;
|
|
2969
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2970
|
+
exclude_shortterm_markets?: boolean;
|
|
2971
|
+
};
|
|
2972
|
+
/** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
|
|
2973
|
+
TraderNewTradeFilters: {
|
|
2974
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2975
|
+
wallet_addresses?: string[];
|
|
2976
|
+
/** @description Restrict to these markets. */
|
|
2977
|
+
condition_ids?: string[];
|
|
2978
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2979
|
+
event_slugs?: string[];
|
|
2980
|
+
/**
|
|
2981
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2982
|
+
* @default 0
|
|
2983
|
+
*/
|
|
2984
|
+
min_usd_value: number;
|
|
2985
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
2986
|
+
min_probability?: number;
|
|
2987
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
2988
|
+
max_probability?: number;
|
|
2989
|
+
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
2990
|
+
trade_types?: ("OrderFilled" | "OrdersMatched")[];
|
|
2991
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2992
|
+
exclude_shortterm_markets?: boolean;
|
|
2993
|
+
};
|
|
2994
|
+
/** @description Subscription filters for the `trader_trade_event` event. All fields are optional. `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that exclude `PositionsConverted`, because conversion events do not currently carry `event_slug` in the typed webhook payload. */
|
|
2995
|
+
TraderTradeEventFilters: {
|
|
2996
|
+
/** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
|
|
2997
|
+
wallet_addresses?: string[];
|
|
2998
|
+
/** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
|
|
2999
|
+
condition_ids?: string[];
|
|
3000
|
+
/** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
|
|
3001
|
+
event_slugs?: string[];
|
|
3002
|
+
/**
|
|
3003
|
+
* @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
|
|
3004
|
+
* @default 0
|
|
3005
|
+
*/
|
|
3006
|
+
min_usd_value: number;
|
|
3007
|
+
/** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
|
|
3008
|
+
min_probability?: number;
|
|
3009
|
+
/** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
|
|
3010
|
+
max_probability?: number;
|
|
3011
|
+
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
3012
|
+
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
|
|
3013
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
3014
|
+
exclude_shortterm_markets?: boolean;
|
|
3015
|
+
};
|
|
3016
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
3017
|
+
TraderGlobalPnlFilters: {
|
|
3018
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
3019
|
+
traders?: string[];
|
|
3020
|
+
/** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
|
|
3021
|
+
min_realized_pnl_usd?: number;
|
|
3022
|
+
/** @description Only fire when realized PnL ≤ this value (USD). */
|
|
3023
|
+
max_realized_pnl_usd?: number;
|
|
3024
|
+
/** @description Only fire when total trading volume ≥ this value (USD). */
|
|
3025
|
+
min_volume_usd?: number;
|
|
3026
|
+
/** @description Only fire when total trading volume ≤ this value (USD). */
|
|
3027
|
+
max_volume_usd?: number;
|
|
3028
|
+
/** @description Only fire when buy volume ≥ this value (USD). */
|
|
3029
|
+
min_buy_usd?: number;
|
|
3030
|
+
/** @description Only fire when sell volume ≥ this value (USD). */
|
|
3031
|
+
min_sell_volume_usd?: number;
|
|
3032
|
+
/** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
|
|
3033
|
+
min_win_rate?: number;
|
|
3034
|
+
/**
|
|
3035
|
+
* Format: int64
|
|
3036
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
3037
|
+
*/
|
|
3038
|
+
min_markets_traded?: number;
|
|
3039
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
3040
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
3041
|
+
};
|
|
3042
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
3043
|
+
TraderMarketPnlFilters: {
|
|
3044
|
+
/** @description Track only these trader wallet addresses. */
|
|
3045
|
+
traders?: string[];
|
|
3046
|
+
/** @description Restrict to these markets. */
|
|
3047
|
+
condition_ids?: string[];
|
|
3048
|
+
/** @description Restrict to markets in these events. */
|
|
3049
|
+
event_slugs?: string[];
|
|
3050
|
+
/** @description Only fire when per-market realized PnL ≥ this value (USD). */
|
|
3051
|
+
min_realized_pnl_usd?: number;
|
|
3052
|
+
/** @description Only fire when per-market realized PnL ≤ this value (USD). */
|
|
3053
|
+
max_realized_pnl_usd?: number;
|
|
3054
|
+
/** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
|
|
3055
|
+
min_volume_usd?: number;
|
|
3056
|
+
/** @description Only fire when total volume ≤ this value (USD). */
|
|
3057
|
+
max_volume_usd?: number;
|
|
3058
|
+
/** @description Only fire when buy volume in the market ≥ this value (USD). */
|
|
3059
|
+
min_buy_usd?: number;
|
|
3060
|
+
/** @description Only fire when sell volume in the market ≥ this value (USD). */
|
|
3061
|
+
min_sell_volume_usd?: number;
|
|
3062
|
+
/** @description Restrict to these PnL windows. */
|
|
3063
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
3064
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3065
|
+
exclude_shortterm_markets?: boolean;
|
|
3066
|
+
};
|
|
3067
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
3068
|
+
TraderEventPnlFilters: {
|
|
3069
|
+
/** @description Track only these trader wallet addresses. */
|
|
3070
|
+
traders?: string[];
|
|
3071
|
+
/** @description Restrict to these events. */
|
|
3072
|
+
event_slugs?: string[];
|
|
3073
|
+
/** @description Only fire when per-event realized PnL ≥ this value (USD). */
|
|
3074
|
+
min_realized_pnl_usd?: number;
|
|
3075
|
+
/** @description Only fire when per-event realized PnL ≤ this value (USD). */
|
|
3076
|
+
max_realized_pnl_usd?: number;
|
|
3077
|
+
/** @description Only fire when total event volume ≥ this value (USD). */
|
|
3078
|
+
min_volume_usd?: number;
|
|
3079
|
+
/** @description Only fire when total event volume ≤ this value (USD). */
|
|
3080
|
+
max_volume_usd?: number;
|
|
3081
|
+
/** @description Only fire when buy volume within the event ≥ this value (USD). */
|
|
3082
|
+
min_buy_usd?: number;
|
|
3083
|
+
/** @description Only fire when sell volume within the event ≥ this value (USD). */
|
|
3084
|
+
min_sell_volume_usd?: number;
|
|
3085
|
+
/**
|
|
3086
|
+
* Format: int64
|
|
3087
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
3088
|
+
*/
|
|
3089
|
+
min_markets_traded?: number;
|
|
3090
|
+
/** @description Restrict to these PnL windows. */
|
|
3091
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
3092
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3093
|
+
exclude_shortterm_markets?: boolean;
|
|
3094
|
+
};
|
|
3095
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
3096
|
+
MarketMetricsFilters: {
|
|
3097
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
3098
|
+
condition_ids?: string[];
|
|
3099
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
3100
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3101
|
+
/** @description Only fire when volume ≥ this value (USD). */
|
|
3102
|
+
min_volume_usd?: number;
|
|
3103
|
+
/** @description Only fire when volume ≤ this value (USD). */
|
|
3104
|
+
max_volume_usd?: number;
|
|
3105
|
+
/**
|
|
3106
|
+
* Format: int64
|
|
3107
|
+
* @description Only fire when transaction count ≥ this value.
|
|
3108
|
+
*/
|
|
3109
|
+
min_txns?: number;
|
|
3110
|
+
/**
|
|
3111
|
+
* Format: int64
|
|
3112
|
+
* @description Only fire when unique trader count ≥ this value.
|
|
3113
|
+
*/
|
|
3114
|
+
min_unique_traders?: number;
|
|
3115
|
+
/** @description Only fire when total fees ≥ this value (USD). */
|
|
3116
|
+
min_fees?: number;
|
|
3117
|
+
};
|
|
3118
|
+
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
3119
|
+
EventMetricsFilters: {
|
|
3120
|
+
/** @description Restrict to these events. Empty = all events. */
|
|
3121
|
+
event_slugs?: string[];
|
|
3122
|
+
/** @description Restrict to these aggregation windows. */
|
|
3123
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3124
|
+
/** @description Only fire when aggregated event volume ≥ this value (USD). */
|
|
3125
|
+
min_volume_usd?: number;
|
|
3126
|
+
max_volume_usd?: number;
|
|
3127
|
+
/** Format: int64 */
|
|
3128
|
+
min_txns?: number;
|
|
3129
|
+
/** Format: int64 */
|
|
3130
|
+
min_unique_traders?: number;
|
|
3131
|
+
min_fees?: number;
|
|
3132
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3133
|
+
exclude_shortterm_markets?: boolean;
|
|
3134
|
+
};
|
|
3135
|
+
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
3136
|
+
PositionMetricsFilters: {
|
|
3137
|
+
/** @description Restrict to these outcome token IDs. */
|
|
3138
|
+
position_ids?: string[];
|
|
3139
|
+
/** @description Restrict to positions within these markets. */
|
|
3140
|
+
condition_ids?: string[];
|
|
3141
|
+
/** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
|
|
3142
|
+
outcomes?: string[];
|
|
3143
|
+
/** @description Restrict to these aggregation windows. */
|
|
3144
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3145
|
+
/** @description Only fire when position volume ≥ this value (USD). */
|
|
3146
|
+
min_volume_usd?: number;
|
|
3147
|
+
max_volume_usd?: number;
|
|
3148
|
+
min_buy_usd?: number;
|
|
3149
|
+
min_sell_volume_usd?: number;
|
|
3150
|
+
/** Format: int64 */
|
|
3151
|
+
min_txns?: number;
|
|
3152
|
+
/** Format: int64 */
|
|
3153
|
+
min_unique_traders?: number;
|
|
3154
|
+
/** @description Only fire when price change % ≥ this value. */
|
|
3155
|
+
min_price_change_pct?: number;
|
|
3156
|
+
/** @description Only fire when probability change % ≥ this value. */
|
|
3157
|
+
min_probability_change_pct?: number;
|
|
3158
|
+
min_fees?: number;
|
|
3159
|
+
};
|
|
3160
|
+
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
3161
|
+
MarketVolumeMilestoneFilters: {
|
|
3162
|
+
/** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
|
|
3163
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3164
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
3165
|
+
condition_ids?: string[];
|
|
3166
|
+
/** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
|
|
3167
|
+
milestone_amounts?: number[];
|
|
3168
|
+
};
|
|
3169
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
3170
|
+
EventVolumeMilestoneFilters: {
|
|
3171
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
3172
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3173
|
+
/** @description Restrict to these events. */
|
|
3174
|
+
event_slugs?: string[];
|
|
3175
|
+
/** @description Specific USD milestones to trigger on. */
|
|
3176
|
+
milestone_amounts?: number[];
|
|
3177
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3178
|
+
exclude_shortterm_markets?: boolean;
|
|
3179
|
+
};
|
|
3180
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
3181
|
+
PositionVolumeMilestoneFilters: {
|
|
3182
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
3183
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
3184
|
+
/** @description Restrict to these outcome token IDs. */
|
|
3185
|
+
position_ids?: string[];
|
|
3186
|
+
/** @description Restrict to positions within these markets. */
|
|
3187
|
+
condition_ids?: string[];
|
|
3188
|
+
/** @description Specific USD milestones to trigger on. */
|
|
3189
|
+
milestone_amounts?: number[];
|
|
3190
|
+
};
|
|
3191
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
3192
|
+
ProbabilitySpikeFilters: {
|
|
3193
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
3194
|
+
position_ids?: string[];
|
|
3195
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
3196
|
+
condition_ids?: string[];
|
|
3197
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
3198
|
+
event_slugs?: string[];
|
|
3199
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
3200
|
+
outcomes?: string[];
|
|
3201
|
+
/** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
|
|
3202
|
+
min_probability_change_pct?: number;
|
|
3203
|
+
/**
|
|
3204
|
+
* @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
|
|
3205
|
+
* @enum {string}
|
|
3206
|
+
*/
|
|
3207
|
+
spike_direction?: "up" | "down" | "both";
|
|
3208
|
+
/** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
|
|
3209
|
+
window_secs?: number;
|
|
3210
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3211
|
+
exclude_shortterm_markets?: boolean;
|
|
3212
|
+
};
|
|
3213
|
+
/** @description Subscription filters for the `price_spike` event. */
|
|
3214
|
+
PriceSpikeFilters: {
|
|
3215
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
3216
|
+
position_ids?: string[];
|
|
3217
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
3218
|
+
condition_ids?: string[];
|
|
3219
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
3220
|
+
event_slugs?: string[];
|
|
3221
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
3222
|
+
outcomes?: string[];
|
|
3223
|
+
/** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
|
|
3224
|
+
min_price_change_pct?: number;
|
|
3225
|
+
/**
|
|
3226
|
+
* @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
|
|
3227
|
+
* @enum {string}
|
|
3228
|
+
*/
|
|
3229
|
+
spike_direction?: "up" | "down" | "both";
|
|
3230
|
+
/** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
|
|
3231
|
+
window_secs?: number;
|
|
3232
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3233
|
+
exclude_shortterm_markets?: boolean;
|
|
3234
|
+
};
|
|
3235
|
+
/** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
|
|
3236
|
+
MarketVolumeSpikeFilters: {
|
|
3237
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. The snapshot is set automatically on first data and resets after each fire. */
|
|
3238
|
+
spike_ratio: number;
|
|
3239
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
3240
|
+
window_secs?: number;
|
|
3241
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
3242
|
+
condition_ids?: string[];
|
|
3243
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
3244
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
3245
|
+
};
|
|
3246
|
+
/** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
|
|
3247
|
+
EventVolumeSpikeFilters: {
|
|
3248
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
3249
|
+
spike_ratio: number;
|
|
3250
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
3251
|
+
window_secs?: number;
|
|
3252
|
+
/** @description Restrict to these events. */
|
|
3253
|
+
event_slugs?: string[];
|
|
3254
|
+
/** @description Restrict to these aggregation windows. */
|
|
3255
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
3256
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3257
|
+
exclude_shortterm_markets?: boolean;
|
|
3258
|
+
};
|
|
3259
|
+
/** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
|
|
3260
|
+
PositionVolumeSpikeFilters: {
|
|
3261
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
3262
|
+
spike_ratio: number;
|
|
3263
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
3264
|
+
window_secs?: number;
|
|
3265
|
+
/** @description Restrict to these outcome token IDs. */
|
|
3266
|
+
position_ids?: string[];
|
|
3267
|
+
/** @description Restrict to positions within these markets. */
|
|
3268
|
+
condition_ids?: string[];
|
|
3269
|
+
/** @description Restrict to these outcome names. */
|
|
3270
|
+
outcomes?: string[];
|
|
3271
|
+
/** @description Restrict to these aggregation windows. */
|
|
3272
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
3273
|
+
};
|
|
3274
|
+
/** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
|
|
3275
|
+
CloseToBondFilters: {
|
|
3276
|
+
/** @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set. */
|
|
3277
|
+
min_probability?: number;
|
|
3278
|
+
/** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
|
|
3279
|
+
max_probability?: number;
|
|
3280
|
+
/** @description Restrict to these markets. */
|
|
3281
|
+
condition_ids?: string[];
|
|
3282
|
+
/** @description Restrict to these outcome token IDs. */
|
|
3283
|
+
position_ids?: string[];
|
|
3284
|
+
/** @description Restrict to markets in these events. */
|
|
3285
|
+
event_slugs?: string[];
|
|
3286
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
3287
|
+
outcomes?: string[];
|
|
3288
|
+
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
3289
|
+
position_outcome_indices?: number[];
|
|
3290
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3291
|
+
exclude_shortterm_markets?: boolean;
|
|
3292
|
+
} | unknown | unknown;
|
|
3293
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
3294
|
+
MarketCreatedFilters: {
|
|
3295
|
+
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
3296
|
+
tags?: string[];
|
|
3297
|
+
/** @description Restrict to markets belonging to these events. */
|
|
3298
|
+
event_slugs?: string[];
|
|
3299
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
3300
|
+
exclude_shortterm_markets?: boolean;
|
|
3301
|
+
};
|
|
3302
|
+
/** @description Subscription filters for the `oracle_events` event. All fields are optional. */
|
|
3303
|
+
OracleEventsFilters: {
|
|
3304
|
+
/** @description Restrict to these event types (case-insensitive). Empty = all. */
|
|
3305
|
+
oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
|
|
3306
|
+
/** @description Restrict to events for these condition IDs. */
|
|
3307
|
+
condition_ids?: string[];
|
|
3308
|
+
};
|
|
3309
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
3310
|
+
AssetPriceTickFilters: {
|
|
3311
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
3312
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
3313
|
+
};
|
|
3314
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
3315
|
+
AssetPriceWindowUpdateFilters: {
|
|
3316
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
3317
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
3318
|
+
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
3319
|
+
timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
|
|
3320
|
+
};
|
|
3664
3321
|
};
|
|
3665
3322
|
responses: never;
|
|
3666
3323
|
parameters: never;
|