@structbuild/sdk 0.5.1 → 0.5.3
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/generated/polymarket.d.ts +89 -17
- package/dist/generated/webhooks.d.ts +1043 -742
- package/dist/generated/ws-alerts.d.ts +1047 -740
- package/dist/generated/ws.d.ts +775 -110
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +3 -3
- package/dist/namespaces/builders.d.ts +2 -1
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -684,111 +684,192 @@ export interface components {
|
|
|
684
684
|
slug?: string | null;
|
|
685
685
|
event_slug?: string | null;
|
|
686
686
|
};
|
|
687
|
-
/** @description
|
|
687
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
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. */
|
|
688
693
|
AssetPriceTickPayload: {
|
|
694
|
+
/** @description Asset symbol */
|
|
695
|
+
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
689
696
|
/**
|
|
690
|
-
*
|
|
691
|
-
* @
|
|
697
|
+
* Format: double
|
|
698
|
+
* @description Current price from the Chainlink feed
|
|
692
699
|
*/
|
|
693
|
-
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
694
|
-
/** @description Current asset price in USD from the Chainlink feed */
|
|
695
700
|
price: number;
|
|
696
701
|
/**
|
|
697
702
|
* Format: int64
|
|
698
|
-
* @description Tick timestamp (milliseconds since
|
|
703
|
+
* @description Tick timestamp as reported by the WebSocket feed (milliseconds since epoch)
|
|
699
704
|
*/
|
|
700
705
|
timestamp_ms: number;
|
|
701
706
|
};
|
|
702
|
-
/** @description
|
|
707
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
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. */
|
|
703
715
|
AssetPriceWindowUpdatePayload: {
|
|
704
|
-
/**
|
|
705
|
-
|
|
706
|
-
|
|
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";
|
|
716
|
+
/** @description Asset symbol */
|
|
717
|
+
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
718
|
+
/** @description Time-window variant */
|
|
719
|
+
variant: components["schemas"]["AssetPriceWindowVariant"];
|
|
714
720
|
/**
|
|
715
721
|
* Format: int64
|
|
716
|
-
* @description Window start timestamp (milliseconds since
|
|
722
|
+
* @description Window start timestamp (milliseconds since epoch)
|
|
717
723
|
*/
|
|
718
724
|
start_time: number;
|
|
719
725
|
/**
|
|
720
726
|
* Format: int64
|
|
721
|
-
* @description Window end timestamp (milliseconds since
|
|
727
|
+
* @description Window end timestamp (milliseconds since epoch)
|
|
722
728
|
*/
|
|
723
729
|
end_time: number;
|
|
724
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Format: double
|
|
732
|
+
* @description Opening price at start_time
|
|
733
|
+
*/
|
|
725
734
|
open_price: number;
|
|
726
|
-
/**
|
|
735
|
+
/**
|
|
736
|
+
* Format: double
|
|
737
|
+
* @description Closing price at end_time (0.0 on an "open" update — not yet available)
|
|
738
|
+
*/
|
|
727
739
|
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: {
|
|
728
763
|
/**
|
|
729
|
-
*
|
|
730
|
-
* @
|
|
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
|
+
/**
|
|
769
|
+
* Format: double
|
|
770
|
+
* @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO).
|
|
731
771
|
*/
|
|
732
|
-
|
|
772
|
+
max_probability?: number | null;
|
|
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;
|
|
733
785
|
};
|
|
734
|
-
/** @description
|
|
786
|
+
/** @description Close-to-bond webhook payload */
|
|
735
787
|
CloseToBondPayload: {
|
|
736
|
-
/** @description
|
|
788
|
+
/** @description Trader address (the limit-order maker) */
|
|
737
789
|
trader: string;
|
|
738
|
-
/** @description
|
|
790
|
+
/** @description Taker address (the order filler — often the exchange contract) */
|
|
739
791
|
taker: string;
|
|
740
|
-
/** @description
|
|
792
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
741
793
|
position_id: string;
|
|
742
|
-
/** @description
|
|
794
|
+
/** @description Condition ID (parent market) */
|
|
743
795
|
condition_id?: string | null;
|
|
744
796
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
745
797
|
outcome?: string | null;
|
|
746
|
-
/**
|
|
798
|
+
/**
|
|
799
|
+
* Format: int32
|
|
800
|
+
* @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
|
|
801
|
+
*/
|
|
747
802
|
outcome_index?: number | null;
|
|
803
|
+
/** @description Market question */
|
|
748
804
|
question?: string | null;
|
|
805
|
+
/** @description Market slug */
|
|
749
806
|
market_slug?: string | null;
|
|
807
|
+
/** @description Event slug */
|
|
750
808
|
event_slug?: string | null;
|
|
809
|
+
/** @description Trade ID */
|
|
751
810
|
trade_id: string;
|
|
752
811
|
/** @description Transaction hash */
|
|
753
812
|
hash: string;
|
|
754
|
-
/**
|
|
813
|
+
/**
|
|
814
|
+
* Format: int64
|
|
815
|
+
* @description Block number
|
|
816
|
+
*/
|
|
755
817
|
block: number;
|
|
756
818
|
/**
|
|
757
819
|
* Format: int64
|
|
758
|
-
* @description Unix seconds
|
|
820
|
+
* @description Confirmed timestamp (Unix seconds)
|
|
759
821
|
*/
|
|
760
822
|
confirmed_at: number;
|
|
761
|
-
/**
|
|
823
|
+
/**
|
|
824
|
+
* Format: double
|
|
825
|
+
* @description USD size of the trade
|
|
826
|
+
*/
|
|
762
827
|
amount_usd: number;
|
|
828
|
+
/**
|
|
829
|
+
* Format: double
|
|
830
|
+
* @description Outcome shares traded
|
|
831
|
+
*/
|
|
763
832
|
shares_amount: number;
|
|
764
|
-
/**
|
|
833
|
+
/**
|
|
834
|
+
* Format: double
|
|
835
|
+
* @description Fee paid (USD)
|
|
836
|
+
*/
|
|
765
837
|
fee: number;
|
|
766
|
-
/** @
|
|
767
|
-
side:
|
|
768
|
-
/**
|
|
838
|
+
/** @description Trade side ("Buy" or "Sell") */
|
|
839
|
+
side: string;
|
|
840
|
+
/**
|
|
841
|
+
* Format: double
|
|
842
|
+
* @description Price per share (0.0–1.0) — the value that triggered the notification
|
|
843
|
+
*/
|
|
769
844
|
price: number;
|
|
770
|
-
/**
|
|
845
|
+
/**
|
|
846
|
+
* Format: double
|
|
847
|
+
* @description Implied probability of the outcome (0.0–1.0)
|
|
848
|
+
*/
|
|
771
849
|
probability?: number | null;
|
|
850
|
+
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
851
|
+
bond_side: string;
|
|
772
852
|
/**
|
|
773
|
-
*
|
|
774
|
-
* @
|
|
853
|
+
* Format: double
|
|
854
|
+
* @description The probability threshold from the subscriber's filter that was breached
|
|
775
855
|
*/
|
|
776
|
-
bond_side: "high" | "low";
|
|
777
|
-
/** @description The probability threshold from the subscription filter that was breached */
|
|
778
856
|
threshold: number;
|
|
779
857
|
};
|
|
780
858
|
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
781
859
|
ConditionMetricsPayload: {
|
|
782
860
|
/** @description Market condition ID */
|
|
783
861
|
condition_id?: string | null;
|
|
862
|
+
/** @description Aggregation window */
|
|
863
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
784
864
|
/**
|
|
785
|
-
*
|
|
786
|
-
* @
|
|
865
|
+
* Format: double
|
|
866
|
+
* @description Total trading volume in USD for this timeframe
|
|
787
867
|
*/
|
|
788
|
-
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
789
|
-
/** @description Total trading volume in USD for this timeframe */
|
|
790
868
|
volume_usd?: number | null;
|
|
791
|
-
/**
|
|
869
|
+
/**
|
|
870
|
+
* Format: double
|
|
871
|
+
* @description Total fees collected in USD
|
|
872
|
+
*/
|
|
792
873
|
fees?: number | null;
|
|
793
874
|
/**
|
|
794
875
|
* Format: int64
|
|
@@ -870,18 +951,43 @@ export interface components {
|
|
|
870
951
|
slug?: string | null;
|
|
871
952
|
event_slug?: string | null;
|
|
872
953
|
};
|
|
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
|
+
};
|
|
873
976
|
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
874
977
|
EventMetricsPayload: {
|
|
875
978
|
/** @description Event slug */
|
|
876
979
|
event_slug?: string | null;
|
|
980
|
+
/** @description Aggregation window */
|
|
981
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
877
982
|
/**
|
|
878
|
-
*
|
|
879
|
-
* @
|
|
983
|
+
* Format: double
|
|
984
|
+
* @description Total aggregated volume across all markets in the event (USD)
|
|
880
985
|
*/
|
|
881
|
-
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
882
|
-
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
883
986
|
volume_usd?: number | null;
|
|
884
|
-
/**
|
|
987
|
+
/**
|
|
988
|
+
* Format: double
|
|
989
|
+
* @description Total fees collected in USD
|
|
990
|
+
*/
|
|
885
991
|
fees?: number | null;
|
|
886
992
|
/**
|
|
887
993
|
* Format: int64
|
|
@@ -894,21 +1000,13 @@ export interface components {
|
|
|
894
1000
|
*/
|
|
895
1001
|
unique_traders?: number | null;
|
|
896
1002
|
};
|
|
897
|
-
/** @description
|
|
1003
|
+
/** @description Event PnL webhook payload (Arc-optimized) */
|
|
898
1004
|
EventPnlPayload: {
|
|
899
|
-
/** @description Trader wallet address (lowercase) */
|
|
900
1005
|
trader?: string | null;
|
|
901
|
-
/** @description Event slug */
|
|
902
1006
|
event_slug?: string | null;
|
|
903
|
-
/**
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
*/
|
|
907
|
-
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
908
|
-
/**
|
|
909
|
-
* Format: int64
|
|
910
|
-
* @description Number of distinct markets traded in this event
|
|
911
|
-
*/
|
|
1007
|
+
/** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
|
|
1008
|
+
timeframe: string;
|
|
1009
|
+
/** Format: int64 */
|
|
912
1010
|
markets_traded?: number | null;
|
|
913
1011
|
/** Format: int64 */
|
|
914
1012
|
outcomes_traded?: number | null;
|
|
@@ -920,44 +1018,58 @@ export interface components {
|
|
|
920
1018
|
total_redemptions?: number | null;
|
|
921
1019
|
/** Format: int64 */
|
|
922
1020
|
total_merges?: number | null;
|
|
923
|
-
/**
|
|
1021
|
+
/** Format: double */
|
|
924
1022
|
total_volume_usd?: number | null;
|
|
1023
|
+
/** Format: double */
|
|
925
1024
|
buy_usd?: number | null;
|
|
1025
|
+
/** Format: double */
|
|
926
1026
|
sell_usd?: number | null;
|
|
1027
|
+
/** Format: double */
|
|
927
1028
|
redemption_usd?: number | null;
|
|
1029
|
+
/** Format: double */
|
|
928
1030
|
merge_usd?: number | null;
|
|
929
|
-
/**
|
|
1031
|
+
/** Format: double */
|
|
930
1032
|
realized_pnl_usd?: number | null;
|
|
931
1033
|
/** Format: int64 */
|
|
932
1034
|
winning_markets?: number | null;
|
|
933
1035
|
/** Format: int64 */
|
|
934
1036
|
losing_markets?: number | null;
|
|
1037
|
+
/** Format: double */
|
|
935
1038
|
total_fees?: number | null;
|
|
936
|
-
/**
|
|
937
|
-
* Format: int64
|
|
938
|
-
* @description Unix seconds
|
|
939
|
-
*/
|
|
1039
|
+
/** Format: int64 */
|
|
940
1040
|
first_trade_at?: number | null;
|
|
941
|
-
/**
|
|
942
|
-
* Format: int64
|
|
943
|
-
* @description Unix seconds
|
|
944
|
-
*/
|
|
1041
|
+
/** Format: int64 */
|
|
945
1042
|
last_trade_at?: number | null;
|
|
946
1043
|
};
|
|
947
|
-
/** @description
|
|
1044
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
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 */
|
|
948
1056
|
EventVolumeMilestonePayload: {
|
|
949
|
-
/** @description Event slug */
|
|
950
1057
|
event_slug: string;
|
|
1058
|
+
timeframe: string;
|
|
951
1059
|
/**
|
|
952
|
-
*
|
|
953
|
-
* @
|
|
1060
|
+
* Format: double
|
|
1061
|
+
* @description Milestone amount reached (USD)
|
|
954
1062
|
*/
|
|
955
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
956
|
-
/** @description The USD milestone amount that was crossed */
|
|
957
1063
|
milestone_usd: number;
|
|
958
|
-
/**
|
|
1064
|
+
/**
|
|
1065
|
+
* Format: double
|
|
1066
|
+
* @description Current volume (USD) that triggered the milestone
|
|
1067
|
+
*/
|
|
959
1068
|
current_volume_usd: number;
|
|
960
|
-
/**
|
|
1069
|
+
/**
|
|
1070
|
+
* Format: double
|
|
1071
|
+
* @description Total fees collected in this timeframe
|
|
1072
|
+
*/
|
|
961
1073
|
fees: number;
|
|
962
1074
|
/**
|
|
963
1075
|
* Format: int64
|
|
@@ -965,25 +1077,60 @@ export interface components {
|
|
|
965
1077
|
*/
|
|
966
1078
|
txns: number;
|
|
967
1079
|
};
|
|
968
|
-
/** @description
|
|
1080
|
+
/** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
|
|
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 */
|
|
969
1100
|
EventVolumeSpikePayload: {
|
|
970
|
-
/** @description Event slug */
|
|
971
1101
|
event_slug: string;
|
|
1102
|
+
event_title?: string | null;
|
|
1103
|
+
image_url?: string | null;
|
|
1104
|
+
timeframe: string;
|
|
972
1105
|
/**
|
|
973
|
-
*
|
|
974
|
-
* @
|
|
1106
|
+
* Format: double
|
|
1107
|
+
* @description Current aggregated event volume at the time of the spike (USD)
|
|
975
1108
|
*/
|
|
976
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
977
|
-
/** @description Current aggregated event volume at time of the spike (USD) */
|
|
978
1109
|
current_volume_usd: number;
|
|
979
|
-
/**
|
|
1110
|
+
/**
|
|
1111
|
+
* Format: double
|
|
1112
|
+
* @description Volume at the snapshot baseline (USD)
|
|
1113
|
+
*/
|
|
980
1114
|
snapshot_volume_usd: number;
|
|
981
|
-
/**
|
|
1115
|
+
/**
|
|
1116
|
+
* Format: double
|
|
1117
|
+
* @description New volume since the snapshot that triggered this notification (USD)
|
|
1118
|
+
*/
|
|
982
1119
|
delta_volume_usd: number;
|
|
983
|
-
/**
|
|
1120
|
+
/**
|
|
1121
|
+
* Format: double
|
|
1122
|
+
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
1123
|
+
*/
|
|
984
1124
|
spike_pct: number;
|
|
985
|
-
/**
|
|
1125
|
+
/**
|
|
1126
|
+
* Format: int64
|
|
1127
|
+
* @description Total transactions in this timeframe
|
|
1128
|
+
*/
|
|
986
1129
|
txns: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* Format: double
|
|
1132
|
+
* @description Total fees in this timeframe
|
|
1133
|
+
*/
|
|
987
1134
|
fees: number;
|
|
988
1135
|
};
|
|
989
1136
|
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
@@ -998,7 +1145,10 @@ export interface components {
|
|
|
998
1145
|
condition_id?: string | null;
|
|
999
1146
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1000
1147
|
outcome?: string | null;
|
|
1001
|
-
/**
|
|
1148
|
+
/**
|
|
1149
|
+
* Format: int32
|
|
1150
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1151
|
+
*/
|
|
1002
1152
|
outcome_index?: number | null;
|
|
1003
1153
|
/** @description Market question text */
|
|
1004
1154
|
question?: string | null;
|
|
@@ -1020,148 +1170,128 @@ export interface components {
|
|
|
1020
1170
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1021
1171
|
*/
|
|
1022
1172
|
confirmed_at: number;
|
|
1023
|
-
/**
|
|
1173
|
+
/**
|
|
1174
|
+
* Format: double
|
|
1175
|
+
* @description USD size of the trade (6 decimal places)
|
|
1176
|
+
*/
|
|
1024
1177
|
amount_usd: number;
|
|
1025
|
-
/** @description Outcome shares traded (6 decimal places) */
|
|
1026
|
-
shares_amount: number;
|
|
1027
|
-
/** @description Fee paid in USD (6 decimal places) */
|
|
1028
|
-
fee: number;
|
|
1029
1178
|
/**
|
|
1030
|
-
*
|
|
1031
|
-
* @
|
|
1179
|
+
* Format: double
|
|
1180
|
+
* @description Outcome shares traded (6 decimal places)
|
|
1032
1181
|
*/
|
|
1033
|
-
|
|
1034
|
-
/** @description Outcome token price (0.0–1.0) */
|
|
1035
|
-
price: number;
|
|
1182
|
+
shares_amount: number;
|
|
1036
1183
|
/**
|
|
1037
|
-
*
|
|
1038
|
-
* @
|
|
1184
|
+
* Format: double
|
|
1185
|
+
* @description Fee paid in USD (6 decimal places)
|
|
1039
1186
|
*/
|
|
1040
|
-
|
|
1187
|
+
fee: number;
|
|
1188
|
+
/** @description Trade direction */
|
|
1189
|
+
side: "Buy" | "Sell";
|
|
1041
1190
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* @
|
|
1191
|
+
* Format: double
|
|
1192
|
+
* @description Outcome token price (0.0–1.0)
|
|
1044
1193
|
*/
|
|
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) */
|
|
1045
1198
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1046
1199
|
};
|
|
1047
|
-
/** @description
|
|
1200
|
+
/** @description Global PnL webhook payload (Arc-optimized) */
|
|
1048
1201
|
GlobalPnlPayload: {
|
|
1049
|
-
/** @description Trader wallet address (lowercase) */
|
|
1050
1202
|
trader?: string | null;
|
|
1051
|
-
/**
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
*/
|
|
1055
|
-
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
1056
|
-
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
1203
|
+
/** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
|
|
1204
|
+
timeframe: string;
|
|
1205
|
+
/** Format: double */
|
|
1057
1206
|
realized_pnl_usd?: number | null;
|
|
1058
|
-
/**
|
|
1059
|
-
* Format: int64
|
|
1060
|
-
* @description Number of distinct events traded
|
|
1061
|
-
*/
|
|
1207
|
+
/** Format: int64 */
|
|
1062
1208
|
events_traded?: number | null;
|
|
1063
|
-
/**
|
|
1064
|
-
* Format: int64
|
|
1065
|
-
* @description Number of distinct markets traded
|
|
1066
|
-
*/
|
|
1209
|
+
/** Format: int64 */
|
|
1067
1210
|
markets_traded?: number | null;
|
|
1068
|
-
/**
|
|
1069
|
-
* Format: int64
|
|
1070
|
-
* @description Total buy transactions
|
|
1071
|
-
*/
|
|
1211
|
+
/** Format: int64 */
|
|
1072
1212
|
total_buys?: number | null;
|
|
1073
|
-
/**
|
|
1074
|
-
* Format: int64
|
|
1075
|
-
* @description Total sell transactions
|
|
1076
|
-
*/
|
|
1213
|
+
/** Format: int64 */
|
|
1077
1214
|
total_sells?: number | null;
|
|
1078
|
-
/**
|
|
1079
|
-
* Format: int64
|
|
1080
|
-
* @description Total redemption transactions
|
|
1081
|
-
*/
|
|
1215
|
+
/** Format: int64 */
|
|
1082
1216
|
total_redemptions?: number | null;
|
|
1083
|
-
/**
|
|
1084
|
-
* Format: int64
|
|
1085
|
-
* @description Total merge transactions
|
|
1086
|
-
*/
|
|
1217
|
+
/** Format: int64 */
|
|
1087
1218
|
total_merges?: number | null;
|
|
1088
|
-
/**
|
|
1219
|
+
/** Format: double */
|
|
1089
1220
|
total_volume_usd?: number | null;
|
|
1090
|
-
/**
|
|
1221
|
+
/** Format: double */
|
|
1091
1222
|
buy_volume_usd?: number | null;
|
|
1092
|
-
/**
|
|
1223
|
+
/** Format: double */
|
|
1093
1224
|
sell_volume_usd?: number | null;
|
|
1094
|
-
/**
|
|
1225
|
+
/** Format: double */
|
|
1095
1226
|
redemption_volume_usd?: number | null;
|
|
1096
|
-
/**
|
|
1227
|
+
/** Format: double */
|
|
1097
1228
|
merge_volume_usd?: number | null;
|
|
1098
|
-
/**
|
|
1099
|
-
* Format: int64
|
|
1100
|
-
* @description Number of markets where trader realised a profit
|
|
1101
|
-
*/
|
|
1229
|
+
/** Format: int64 */
|
|
1102
1230
|
markets_won?: number | null;
|
|
1103
|
-
/**
|
|
1104
|
-
* Format: int64
|
|
1105
|
-
* @description Number of markets where trader realised a loss
|
|
1106
|
-
*/
|
|
1231
|
+
/** Format: int64 */
|
|
1107
1232
|
markets_lost?: number | null;
|
|
1108
|
-
/**
|
|
1233
|
+
/** Format: double */
|
|
1109
1234
|
market_win_rate_pct?: number | null;
|
|
1110
|
-
/**
|
|
1235
|
+
/** Format: double */
|
|
1111
1236
|
avg_pnl_per_market?: number | null;
|
|
1112
|
-
/**
|
|
1237
|
+
/** Format: double */
|
|
1113
1238
|
avg_pnl_per_trade?: number | null;
|
|
1114
|
-
/**
|
|
1239
|
+
/** Format: double */
|
|
1115
1240
|
avg_hold_time_seconds?: number | null;
|
|
1116
|
-
/**
|
|
1241
|
+
/** Format: double */
|
|
1117
1242
|
total_fees?: number | null;
|
|
1118
|
-
/**
|
|
1243
|
+
/** Format: double */
|
|
1119
1244
|
best_trade_pnl_usd?: number | null;
|
|
1120
|
-
/** @description Condition ID of the best trade */
|
|
1121
1245
|
best_trade_condition_id?: string | null;
|
|
1122
|
-
/**
|
|
1123
|
-
* Format: int64
|
|
1124
|
-
* @description Timestamp of the first trade (Unix seconds)
|
|
1125
|
-
*/
|
|
1246
|
+
/** Format: int64 */
|
|
1126
1247
|
first_trade_at?: number | null;
|
|
1127
|
-
/**
|
|
1128
|
-
* Format: int64
|
|
1129
|
-
* @description Timestamp of the most recent trade (Unix seconds)
|
|
1130
|
-
*/
|
|
1248
|
+
/** Format: int64 */
|
|
1131
1249
|
last_trade_at?: number | null;
|
|
1132
1250
|
};
|
|
1133
1251
|
/** @description Response for GET /v1/webhook/events */
|
|
1134
1252
|
ListEventsResponse: {
|
|
1135
1253
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
1136
1254
|
};
|
|
1137
|
-
/** @description
|
|
1255
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
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` */
|
|
1138
1265
|
MarketCreatedOutcome: {
|
|
1139
|
-
/**
|
|
1266
|
+
/**
|
|
1267
|
+
* Format: int32
|
|
1268
|
+
* @description Outcome index (0 = Yes, 1 = No)
|
|
1269
|
+
*/
|
|
1140
1270
|
index: number;
|
|
1141
1271
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1142
1272
|
name: string;
|
|
1143
|
-
/** @description
|
|
1273
|
+
/** @description ERC1155 position token ID */
|
|
1144
1274
|
position_id: string;
|
|
1145
1275
|
};
|
|
1146
|
-
/** @description
|
|
1276
|
+
/** @description Market created webhook payload — mirrors `NewMarketPayload` field-for-field */
|
|
1147
1277
|
MarketCreatedPayload: {
|
|
1148
1278
|
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
1149
1279
|
condition_id: string;
|
|
1150
1280
|
/** @description Market slug */
|
|
1151
1281
|
market_slug: string;
|
|
1152
|
-
/** @description
|
|
1282
|
+
/** @description Event slug (parent event) */
|
|
1153
1283
|
event_slug?: string | null;
|
|
1154
|
-
/** @description
|
|
1284
|
+
/** @description Event ID */
|
|
1155
1285
|
event_id?: string | null;
|
|
1156
|
-
/** @description
|
|
1286
|
+
/** @description Event title */
|
|
1157
1287
|
event_title?: string | null;
|
|
1158
|
-
/** @description Series slug
|
|
1288
|
+
/** @description Series slug */
|
|
1159
1289
|
series_slug?: string | null;
|
|
1160
|
-
/** @description
|
|
1290
|
+
/** @description Outcomes with their position IDs, index, and name */
|
|
1161
1291
|
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
1162
|
-
/** @description
|
|
1292
|
+
/** @description Market question */
|
|
1163
1293
|
question: string;
|
|
1164
|
-
/** @description
|
|
1294
|
+
/** @description Market title (short display name) */
|
|
1165
1295
|
title?: string | null;
|
|
1166
1296
|
/** @description Market description */
|
|
1167
1297
|
description: string;
|
|
@@ -1174,23 +1304,46 @@ export interface components {
|
|
|
1174
1304
|
/** @description Whether this is a neg-risk market */
|
|
1175
1305
|
neg_risk: boolean;
|
|
1176
1306
|
};
|
|
1177
|
-
/** @description
|
|
1178
|
-
|
|
1179
|
-
/** @description
|
|
1180
|
-
|
|
1181
|
-
/** @description
|
|
1182
|
-
|
|
1183
|
-
/** @description Parent event slug */
|
|
1184
|
-
event_slug?: string | null;
|
|
1307
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
1308
|
+
MarketMetricsFilters: {
|
|
1309
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1310
|
+
condition_ids?: string[] | null;
|
|
1311
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1312
|
+
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
1185
1313
|
/**
|
|
1186
|
-
*
|
|
1187
|
-
* @
|
|
1314
|
+
* Format: double
|
|
1315
|
+
* @description Only fire when volume ≥ this value (USD).
|
|
1188
1316
|
*/
|
|
1189
|
-
|
|
1317
|
+
min_volume_usd?: number | null;
|
|
1318
|
+
/**
|
|
1319
|
+
* Format: double
|
|
1320
|
+
* @description Only fire when volume ≤ this value (USD).
|
|
1321
|
+
*/
|
|
1322
|
+
max_volume_usd?: number | null;
|
|
1190
1323
|
/**
|
|
1191
1324
|
* Format: int64
|
|
1192
|
-
* @description
|
|
1325
|
+
* @description Only fire when transaction count ≥ this value.
|
|
1193
1326
|
*/
|
|
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 */
|
|
1194
1347
|
outcomes_traded?: number | null;
|
|
1195
1348
|
/** Format: int64 */
|
|
1196
1349
|
total_buys?: number | null;
|
|
@@ -1200,59 +1353,95 @@ export interface components {
|
|
|
1200
1353
|
total_redemptions?: number | null;
|
|
1201
1354
|
/** Format: int64 */
|
|
1202
1355
|
total_merges?: number | null;
|
|
1203
|
-
/**
|
|
1356
|
+
/** Format: double */
|
|
1204
1357
|
buy_usd?: number | null;
|
|
1205
|
-
/**
|
|
1358
|
+
/** Format: double */
|
|
1206
1359
|
sell_usd?: number | null;
|
|
1207
|
-
/**
|
|
1360
|
+
/** Format: double */
|
|
1208
1361
|
redemption_usd?: number | null;
|
|
1209
|
-
/**
|
|
1362
|
+
/** Format: double */
|
|
1210
1363
|
merge_usd?: number | null;
|
|
1211
|
-
/**
|
|
1364
|
+
/** Format: double */
|
|
1212
1365
|
realized_pnl_usd?: number | null;
|
|
1213
|
-
/**
|
|
1214
|
-
* Format: int64
|
|
1215
|
-
* @description Number of outcomes with positive PnL
|
|
1216
|
-
*/
|
|
1366
|
+
/** Format: int64 */
|
|
1217
1367
|
winning_outcomes?: number | null;
|
|
1218
|
-
/**
|
|
1368
|
+
/** Format: double */
|
|
1219
1369
|
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: {
|
|
1220
1386
|
/**
|
|
1221
|
-
* Format:
|
|
1222
|
-
* @description
|
|
1387
|
+
* Format: double
|
|
1388
|
+
* @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.
|
|
1223
1389
|
*/
|
|
1224
|
-
|
|
1390
|
+
spike_ratio: number;
|
|
1225
1391
|
/**
|
|
1226
1392
|
* Format: int64
|
|
1227
|
-
* @description
|
|
1393
|
+
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
1228
1394
|
*/
|
|
1229
|
-
|
|
1395
|
+
window_secs?: number | null;
|
|
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;
|
|
1230
1400
|
};
|
|
1231
|
-
/** @description
|
|
1401
|
+
/** @description Market volume spike webhook payload */
|
|
1232
1402
|
MarketVolumeSpikePayload: {
|
|
1233
|
-
/** @description Market condition ID */
|
|
1234
1403
|
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;
|
|
1235
1409
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
* @
|
|
1410
|
+
* Format: double
|
|
1411
|
+
* @description Current window volume at the time of the spike (USD)
|
|
1238
1412
|
*/
|
|
1239
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1240
|
-
/** @description Current volume at the time of the spike (USD) */
|
|
1241
1413
|
current_volume_usd: number;
|
|
1242
|
-
/**
|
|
1414
|
+
/**
|
|
1415
|
+
* Format: double
|
|
1416
|
+
* @description Volume at the snapshot baseline (USD)
|
|
1417
|
+
*/
|
|
1243
1418
|
snapshot_volume_usd: number;
|
|
1244
|
-
/**
|
|
1419
|
+
/**
|
|
1420
|
+
* Format: double
|
|
1421
|
+
* @description New volume since the snapshot that triggered this notification (USD)
|
|
1422
|
+
*/
|
|
1245
1423
|
delta_volume_usd: number;
|
|
1246
|
-
/**
|
|
1424
|
+
/**
|
|
1425
|
+
* Format: double
|
|
1426
|
+
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
1427
|
+
*/
|
|
1247
1428
|
spike_pct: number;
|
|
1248
1429
|
/**
|
|
1249
1430
|
* Format: int64
|
|
1250
1431
|
* @description Total transactions in this timeframe
|
|
1251
1432
|
*/
|
|
1252
1433
|
txns: number;
|
|
1253
|
-
/**
|
|
1434
|
+
/**
|
|
1435
|
+
* Format: double
|
|
1436
|
+
* @description Total fees in this timeframe
|
|
1437
|
+
*/
|
|
1254
1438
|
fees: number;
|
|
1255
1439
|
};
|
|
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";
|
|
1256
1445
|
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
1257
1446
|
NegRiskOutcomeReportedEvent: {
|
|
1258
1447
|
id: string;
|
|
@@ -1287,7 +1476,10 @@ export interface components {
|
|
|
1287
1476
|
condition_id?: string | null;
|
|
1288
1477
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1289
1478
|
outcome?: string | null;
|
|
1290
|
-
/**
|
|
1479
|
+
/**
|
|
1480
|
+
* Format: int32
|
|
1481
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1482
|
+
*/
|
|
1291
1483
|
outcome_index?: number | null;
|
|
1292
1484
|
/** @description Market question text */
|
|
1293
1485
|
question?: string | null;
|
|
@@ -1309,32 +1501,44 @@ export interface components {
|
|
|
1309
1501
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1310
1502
|
*/
|
|
1311
1503
|
confirmed_at: number;
|
|
1312
|
-
/**
|
|
1504
|
+
/**
|
|
1505
|
+
* Format: double
|
|
1506
|
+
* @description USD size of the trade (6 decimal places)
|
|
1507
|
+
*/
|
|
1313
1508
|
amount_usd: number;
|
|
1314
|
-
/**
|
|
1509
|
+
/**
|
|
1510
|
+
* Format: double
|
|
1511
|
+
* @description Outcome shares traded (6 decimal places)
|
|
1512
|
+
*/
|
|
1315
1513
|
shares_amount: number;
|
|
1316
|
-
/** @description Fee paid in USD (6 decimal places) */
|
|
1317
|
-
fee: number;
|
|
1318
1514
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
* @
|
|
1515
|
+
* Format: double
|
|
1516
|
+
* @description Fee paid in USD (6 decimal places)
|
|
1321
1517
|
*/
|
|
1518
|
+
fee: number;
|
|
1519
|
+
/** @description Trade direction */
|
|
1322
1520
|
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;
|
|
1327
1521
|
/**
|
|
1328
|
-
*
|
|
1329
|
-
* @
|
|
1522
|
+
* Format: double
|
|
1523
|
+
* @description Outcome token price (0.0–1.0)
|
|
1330
1524
|
*/
|
|
1331
|
-
|
|
1525
|
+
price: number;
|
|
1332
1526
|
/**
|
|
1333
|
-
*
|
|
1334
|
-
* @
|
|
1527
|
+
* Format: double
|
|
1528
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
1335
1529
|
*/
|
|
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) */
|
|
1336
1534
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1337
1535
|
};
|
|
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";
|
|
1338
1542
|
/** @description Payload delivered on every order-filled trade */
|
|
1339
1543
|
NewTradePayload: {
|
|
1340
1544
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
@@ -1347,7 +1551,10 @@ export interface components {
|
|
|
1347
1551
|
condition_id?: string | null;
|
|
1348
1552
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1349
1553
|
outcome?: string | null;
|
|
1350
|
-
/**
|
|
1554
|
+
/**
|
|
1555
|
+
* Format: int32
|
|
1556
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1557
|
+
*/
|
|
1351
1558
|
outcome_index?: number | null;
|
|
1352
1559
|
/** @description Market question text */
|
|
1353
1560
|
question?: string | null;
|
|
@@ -1369,32 +1576,43 @@ export interface components {
|
|
|
1369
1576
|
* @description Block confirmation timestamp (Unix seconds)
|
|
1370
1577
|
*/
|
|
1371
1578
|
confirmed_at: number;
|
|
1372
|
-
/**
|
|
1579
|
+
/**
|
|
1580
|
+
* Format: double
|
|
1581
|
+
* @description USD size of the trade (6 decimal places)
|
|
1582
|
+
*/
|
|
1373
1583
|
amount_usd: number;
|
|
1374
|
-
/**
|
|
1584
|
+
/**
|
|
1585
|
+
* Format: double
|
|
1586
|
+
* @description Outcome shares traded (6 decimal places)
|
|
1587
|
+
*/
|
|
1375
1588
|
shares_amount: number;
|
|
1376
|
-
/** @description Fee paid in USD (6 decimal places) */
|
|
1377
|
-
fee: number;
|
|
1378
1589
|
/**
|
|
1379
|
-
*
|
|
1380
|
-
* @
|
|
1590
|
+
* Format: double
|
|
1591
|
+
* @description Fee paid in USD (6 decimal places)
|
|
1381
1592
|
*/
|
|
1593
|
+
fee: number;
|
|
1594
|
+
/** @description Trade direction */
|
|
1382
1595
|
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;
|
|
1387
1596
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
* @
|
|
1597
|
+
* Format: double
|
|
1598
|
+
* @description Outcome token price (0.0–1.0)
|
|
1390
1599
|
*/
|
|
1391
|
-
|
|
1600
|
+
price: number;
|
|
1392
1601
|
/**
|
|
1393
|
-
*
|
|
1394
|
-
* @
|
|
1602
|
+
* Format: double
|
|
1603
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
1395
1604
|
*/
|
|
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) */
|
|
1396
1609
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1397
1610
|
};
|
|
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";
|
|
1398
1616
|
/**
|
|
1399
1617
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
1400
1618
|
* and only includes fields relevant to each type.
|
|
@@ -1451,6 +1669,18 @@ export interface components {
|
|
|
1451
1669
|
/** @enum {string} */
|
|
1452
1670
|
event_type: "NegRiskOutcomeReported";
|
|
1453
1671
|
});
|
|
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";
|
|
1454
1684
|
/**
|
|
1455
1685
|
* @description PnL timeframe enum for webhook filtering
|
|
1456
1686
|
* @enum {string}
|
|
@@ -1477,7 +1707,7 @@ export interface components {
|
|
|
1477
1707
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
1478
1708
|
* - 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
|
|
1479
1709
|
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
1480
|
-
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1710
|
+
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1481
1711
|
* - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1482
1712
|
* - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
1483
1713
|
* - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
@@ -1648,6 +1878,44 @@ export interface components {
|
|
|
1648
1878
|
*/
|
|
1649
1879
|
oracle_event_types?: string[];
|
|
1650
1880
|
};
|
|
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
|
+
};
|
|
1651
1919
|
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1652
1920
|
PositionMetricsPayload: {
|
|
1653
1921
|
/** @description ERC-1155 outcome token ID */
|
|
@@ -1655,22 +1923,31 @@ export interface components {
|
|
|
1655
1923
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1656
1924
|
outcome?: string | null;
|
|
1657
1925
|
/**
|
|
1658
|
-
* Format:
|
|
1926
|
+
* Format: int32
|
|
1659
1927
|
* @description Outcome index
|
|
1660
1928
|
*/
|
|
1661
1929
|
outcome_index?: number | null;
|
|
1930
|
+
/** @description Aggregation window */
|
|
1931
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
1662
1932
|
/**
|
|
1663
|
-
*
|
|
1664
|
-
* @
|
|
1933
|
+
* Format: double
|
|
1934
|
+
* @description Total trading volume in USD
|
|
1665
1935
|
*/
|
|
1666
|
-
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
1667
|
-
/** @description Total trading volume in USD */
|
|
1668
1936
|
volume_usd?: number | null;
|
|
1669
|
-
/**
|
|
1937
|
+
/**
|
|
1938
|
+
* Format: double
|
|
1939
|
+
* @description Buy volume in USD
|
|
1940
|
+
*/
|
|
1670
1941
|
buy_volume_usd?: number | null;
|
|
1671
|
-
/**
|
|
1942
|
+
/**
|
|
1943
|
+
* Format: double
|
|
1944
|
+
* @description Sell volume in USD
|
|
1945
|
+
*/
|
|
1672
1946
|
sell_volume_usd?: number | null;
|
|
1673
|
-
/**
|
|
1947
|
+
/**
|
|
1948
|
+
* Format: double
|
|
1949
|
+
* @description Total fees in USD
|
|
1950
|
+
*/
|
|
1674
1951
|
fees?: number | null;
|
|
1675
1952
|
/** Format: int64 */
|
|
1676
1953
|
txns?: number | null;
|
|
@@ -1680,127 +1957,251 @@ export interface components {
|
|
|
1680
1957
|
sells?: number | null;
|
|
1681
1958
|
/** Format: int64 */
|
|
1682
1959
|
unique_traders?: number | null;
|
|
1960
|
+
/** Format: double */
|
|
1683
1961
|
price_open?: number | null;
|
|
1962
|
+
/** Format: double */
|
|
1684
1963
|
price_close?: number | null;
|
|
1964
|
+
/** Format: double */
|
|
1685
1965
|
price_high?: number | null;
|
|
1966
|
+
/** Format: double */
|
|
1686
1967
|
price_low?: number | null;
|
|
1968
|
+
/** Format: double */
|
|
1687
1969
|
probability_open?: number | null;
|
|
1970
|
+
/** Format: double */
|
|
1688
1971
|
probability_close?: number | null;
|
|
1972
|
+
/** Format: double */
|
|
1689
1973
|
probability_high?: number | null;
|
|
1974
|
+
/** Format: double */
|
|
1690
1975
|
probability_low?: number | null;
|
|
1691
1976
|
};
|
|
1692
|
-
/** @description
|
|
1977
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
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 Specific USD milestones to trigger on. */
|
|
1986
|
+
milestone_amounts?: number[] | null;
|
|
1987
|
+
};
|
|
1988
|
+
/** @description Position volume milestone webhook payload */
|
|
1693
1989
|
PositionVolumeMilestonePayload: {
|
|
1694
|
-
/** @description Parent market condition ID */
|
|
1695
1990
|
condition_id?: string | null;
|
|
1696
|
-
/** @description ERC-1155 outcome token ID */
|
|
1697
1991
|
position_id: string;
|
|
1698
|
-
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1699
1992
|
outcome?: string | null;
|
|
1700
|
-
/**
|
|
1701
|
-
* Format: int16
|
|
1702
|
-
* @description Outcome index
|
|
1703
|
-
*/
|
|
1993
|
+
/** Format: int32 */
|
|
1704
1994
|
outcome_index?: number | null;
|
|
1995
|
+
timeframe: string;
|
|
1705
1996
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
* @
|
|
1997
|
+
* Format: double
|
|
1998
|
+
* @description Milestone amount reached (USD)
|
|
1708
1999
|
*/
|
|
1709
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1710
|
-
/** @description The USD milestone amount that was crossed */
|
|
1711
2000
|
milestone_usd: number;
|
|
1712
|
-
/**
|
|
2001
|
+
/**
|
|
2002
|
+
* Format: double
|
|
2003
|
+
* @description Current volume (USD) that triggered the milestone
|
|
2004
|
+
*/
|
|
1713
2005
|
current_volume_usd: number;
|
|
1714
|
-
/**
|
|
2006
|
+
/**
|
|
2007
|
+
* Format: double
|
|
2008
|
+
* @description Buy volume (USD)
|
|
2009
|
+
*/
|
|
1715
2010
|
buy_volume_usd: number;
|
|
1716
|
-
/**
|
|
2011
|
+
/**
|
|
2012
|
+
* Format: double
|
|
2013
|
+
* @description Sell volume (USD)
|
|
2014
|
+
*/
|
|
1717
2015
|
sell_volume_usd: number;
|
|
1718
|
-
/**
|
|
2016
|
+
/**
|
|
2017
|
+
* Format: double
|
|
2018
|
+
* @description Total fees collected in this timeframe
|
|
2019
|
+
*/
|
|
1719
2020
|
fees: number;
|
|
1720
|
-
/**
|
|
2021
|
+
/**
|
|
2022
|
+
* Format: int64
|
|
2023
|
+
* @description Total transactions in this timeframe
|
|
2024
|
+
*/
|
|
1721
2025
|
txns: number;
|
|
1722
|
-
/**
|
|
2026
|
+
/**
|
|
2027
|
+
* Format: int64
|
|
2028
|
+
* @description Buy transactions
|
|
2029
|
+
*/
|
|
1723
2030
|
buys: number;
|
|
1724
|
-
/**
|
|
2031
|
+
/**
|
|
2032
|
+
* Format: int64
|
|
2033
|
+
* @description Sell transactions
|
|
2034
|
+
*/
|
|
1725
2035
|
sells: number;
|
|
1726
2036
|
};
|
|
1727
|
-
/** @description
|
|
2037
|
+
/** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
|
|
2038
|
+
PositionVolumeSpikeFilters: {
|
|
2039
|
+
/**
|
|
2040
|
+
* Format: double
|
|
2041
|
+
* @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
|
|
2042
|
+
*/
|
|
2043
|
+
spike_ratio: number;
|
|
2044
|
+
/**
|
|
2045
|
+
* Format: int64
|
|
2046
|
+
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
2047
|
+
*/
|
|
2048
|
+
window_secs?: number | null;
|
|
2049
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2050
|
+
position_ids?: string[] | null;
|
|
2051
|
+
/** @description Restrict to positions within these markets. */
|
|
2052
|
+
condition_ids?: string[] | null;
|
|
2053
|
+
/** @description Restrict to these outcome names. */
|
|
2054
|
+
outcomes?: string[] | null;
|
|
2055
|
+
/** @description Restrict to these aggregation windows. */
|
|
2056
|
+
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
2057
|
+
};
|
|
2058
|
+
/** @description Position volume spike webhook payload */
|
|
1728
2059
|
PositionVolumeSpikePayload: {
|
|
1729
|
-
/** @description ERC-1155 outcome token ID */
|
|
1730
2060
|
position_id: string;
|
|
1731
|
-
/** @description Parent market condition ID */
|
|
1732
2061
|
condition_id: string;
|
|
1733
|
-
|
|
2062
|
+
question?: string | null;
|
|
2063
|
+
market_slug?: string | null;
|
|
2064
|
+
event_slug?: string | null;
|
|
2065
|
+
image_url?: string | null;
|
|
1734
2066
|
outcome?: string | null;
|
|
1735
|
-
/** Format:
|
|
2067
|
+
/** Format: int32 */
|
|
1736
2068
|
outcome_index?: number | null;
|
|
2069
|
+
timeframe: string;
|
|
1737
2070
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
* @
|
|
2071
|
+
* Format: double
|
|
2072
|
+
* @description Current position volume at the time of the spike (USD)
|
|
1740
2073
|
*/
|
|
1741
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1742
|
-
/** @description Current position volume at the time of the spike (USD) */
|
|
1743
2074
|
current_volume_usd: number;
|
|
1744
|
-
/**
|
|
2075
|
+
/**
|
|
2076
|
+
* Format: double
|
|
2077
|
+
* @description Volume at the snapshot baseline (USD)
|
|
2078
|
+
*/
|
|
1745
2079
|
snapshot_volume_usd: number;
|
|
1746
|
-
/**
|
|
2080
|
+
/**
|
|
2081
|
+
* Format: double
|
|
2082
|
+
* @description New volume since the snapshot that triggered this notification (USD)
|
|
2083
|
+
*/
|
|
1747
2084
|
delta_volume_usd: number;
|
|
1748
|
-
/**
|
|
2085
|
+
/**
|
|
2086
|
+
* Format: double
|
|
2087
|
+
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
2088
|
+
*/
|
|
1749
2089
|
spike_pct: number;
|
|
1750
|
-
/**
|
|
2090
|
+
/**
|
|
2091
|
+
* Format: int64
|
|
2092
|
+
* @description Total transactions in this timeframe
|
|
2093
|
+
*/
|
|
1751
2094
|
txns: number;
|
|
2095
|
+
/**
|
|
2096
|
+
* Format: double
|
|
2097
|
+
* @description Total fees in this timeframe
|
|
2098
|
+
*/
|
|
1752
2099
|
fees: number;
|
|
1753
2100
|
};
|
|
2101
|
+
/** @description Subscription filters for the `price_spike` event. */
|
|
2102
|
+
PriceSpikeFilters: {
|
|
2103
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2104
|
+
position_ids?: string[] | null;
|
|
2105
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2106
|
+
condition_ids?: string[] | null;
|
|
2107
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
2108
|
+
event_slugs?: string[] | null;
|
|
2109
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
2110
|
+
outcomes?: string[] | null;
|
|
2111
|
+
/**
|
|
2112
|
+
* Format: double
|
|
2113
|
+
* @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
|
|
2114
|
+
*/
|
|
2115
|
+
min_price_change_pct?: number | null;
|
|
2116
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
2117
|
+
/**
|
|
2118
|
+
* Format: int64
|
|
2119
|
+
* @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.
|
|
2120
|
+
*/
|
|
2121
|
+
window_secs?: number | null;
|
|
2122
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2123
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2124
|
+
};
|
|
2125
|
+
/** @description Position price spike webhook payload */
|
|
1754
2126
|
PriceSpikePayload: {
|
|
1755
|
-
/** @description Outcome token ID */
|
|
1756
2127
|
position_id: string;
|
|
1757
|
-
/** @description Market condition ID */
|
|
1758
2128
|
condition_id?: string | null;
|
|
1759
|
-
|
|
2129
|
+
question?: string | null;
|
|
2130
|
+
market_slug?: string | null;
|
|
1760
2131
|
event_slug?: string | null;
|
|
1761
|
-
|
|
2132
|
+
image_url?: string | null;
|
|
1762
2133
|
outcome?: string | null;
|
|
2134
|
+
/** Format: int32 */
|
|
2135
|
+
outcome_index?: number | null;
|
|
1763
2136
|
/**
|
|
1764
|
-
* Format:
|
|
1765
|
-
* @description
|
|
2137
|
+
* Format: double
|
|
2138
|
+
* @description Price at the start of the observation window (the baseline snapshot)
|
|
1766
2139
|
*/
|
|
1767
|
-
outcome_index?: number | null;
|
|
1768
|
-
/** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1769
2140
|
previous_price: number;
|
|
1770
|
-
/**
|
|
2141
|
+
/**
|
|
2142
|
+
* Format: double
|
|
2143
|
+
* @description Current price that triggered the spike
|
|
2144
|
+
*/
|
|
1771
2145
|
current_price: number;
|
|
2146
|
+
/** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
|
|
2147
|
+
spike_direction: string;
|
|
1772
2148
|
/**
|
|
1773
|
-
*
|
|
1774
|
-
* @
|
|
2149
|
+
* Format: double
|
|
2150
|
+
* @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
|
|
1775
2151
|
*/
|
|
1776
|
-
spike_direction: "up" | "down";
|
|
1777
|
-
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1778
2152
|
spike_pct: number;
|
|
1779
2153
|
};
|
|
2154
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
2155
|
+
ProbabilitySpikeFilters: {
|
|
2156
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2157
|
+
position_ids?: string[] | null;
|
|
2158
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2159
|
+
condition_ids?: string[] | null;
|
|
2160
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
2161
|
+
event_slugs?: string[] | null;
|
|
2162
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
2163
|
+
outcomes?: string[] | null;
|
|
2164
|
+
/**
|
|
2165
|
+
* Format: double
|
|
2166
|
+
* @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
|
|
2167
|
+
*/
|
|
2168
|
+
min_probability_change_pct?: number | null;
|
|
2169
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
2170
|
+
/**
|
|
2171
|
+
* Format: int64
|
|
2172
|
+
* @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.
|
|
2173
|
+
*/
|
|
2174
|
+
window_secs?: number | null;
|
|
2175
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2176
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2177
|
+
};
|
|
2178
|
+
/** @description Position probability spike webhook payload */
|
|
1780
2179
|
ProbabilitySpikePayload: {
|
|
1781
|
-
/** @description Outcome token ID */
|
|
1782
2180
|
position_id: string;
|
|
1783
|
-
/** @description Market condition ID */
|
|
1784
2181
|
condition_id?: string | null;
|
|
1785
|
-
|
|
2182
|
+
question?: string | null;
|
|
2183
|
+
market_slug?: string | null;
|
|
1786
2184
|
event_slug?: string | null;
|
|
1787
|
-
|
|
2185
|
+
image_url?: string | null;
|
|
1788
2186
|
outcome?: string | null;
|
|
2187
|
+
/** Format: int32 */
|
|
2188
|
+
outcome_index?: number | null;
|
|
1789
2189
|
/**
|
|
1790
|
-
* Format:
|
|
1791
|
-
* @description
|
|
2190
|
+
* Format: double
|
|
2191
|
+
* @description Probability at the start of the observation window (the baseline snapshot)
|
|
1792
2192
|
*/
|
|
1793
|
-
outcome_index?: number | null;
|
|
1794
|
-
/** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1795
2193
|
previous_probability: number;
|
|
1796
|
-
/**
|
|
2194
|
+
/**
|
|
2195
|
+
* Format: double
|
|
2196
|
+
* @description Current probability that triggered the spike
|
|
2197
|
+
*/
|
|
1797
2198
|
current_probability: number;
|
|
2199
|
+
/** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
|
|
2200
|
+
spike_direction: string;
|
|
1798
2201
|
/**
|
|
1799
|
-
*
|
|
1800
|
-
* @
|
|
2202
|
+
* Format: double
|
|
2203
|
+
* @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
|
|
1801
2204
|
*/
|
|
1802
|
-
spike_direction: "up" | "down";
|
|
1803
|
-
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1804
2205
|
spike_pct: number;
|
|
1805
2206
|
};
|
|
1806
2207
|
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
@@ -2092,6 +2493,290 @@ export interface components {
|
|
|
2092
2493
|
* @enum {string}
|
|
2093
2494
|
*/
|
|
2094
2495
|
SpikeDirection: "up" | "down" | "both";
|
|
2496
|
+
/**
|
|
2497
|
+
* @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
|
|
2498
|
+
* full set of typed prediction-trade variants.
|
|
2499
|
+
* @enum {string}
|
|
2500
|
+
*/
|
|
2501
|
+
TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
|
|
2502
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
2503
|
+
TraderEventPnlFilters: {
|
|
2504
|
+
/** @description Track only these trader wallet addresses. */
|
|
2505
|
+
traders?: string[] | null;
|
|
2506
|
+
/** @description Restrict to these events. */
|
|
2507
|
+
event_slugs?: string[] | null;
|
|
2508
|
+
/**
|
|
2509
|
+
* Format: double
|
|
2510
|
+
* @description Only fire when per-event realized PnL ≥ this value (USD).
|
|
2511
|
+
*/
|
|
2512
|
+
min_realized_pnl_usd?: number | null;
|
|
2513
|
+
/**
|
|
2514
|
+
* Format: double
|
|
2515
|
+
* @description Only fire when per-event realized PnL ≤ this value (USD).
|
|
2516
|
+
*/
|
|
2517
|
+
max_realized_pnl_usd?: number | null;
|
|
2518
|
+
/**
|
|
2519
|
+
* Format: double
|
|
2520
|
+
* @description Only fire when total event volume ≥ this value (USD).
|
|
2521
|
+
*/
|
|
2522
|
+
min_volume_usd?: number | null;
|
|
2523
|
+
/**
|
|
2524
|
+
* Format: double
|
|
2525
|
+
* @description Only fire when total event volume ≤ this value (USD).
|
|
2526
|
+
*/
|
|
2527
|
+
max_volume_usd?: number | null;
|
|
2528
|
+
/**
|
|
2529
|
+
* Format: double
|
|
2530
|
+
* @description Only fire when buy volume within the event ≥ this value (USD).
|
|
2531
|
+
*/
|
|
2532
|
+
min_buy_usd?: number | null;
|
|
2533
|
+
/**
|
|
2534
|
+
* Format: double
|
|
2535
|
+
* @description Only fire when sell volume within the event ≥ this value (USD).
|
|
2536
|
+
*/
|
|
2537
|
+
min_sell_volume_usd?: number | null;
|
|
2538
|
+
/**
|
|
2539
|
+
* Format: int64
|
|
2540
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
2541
|
+
*/
|
|
2542
|
+
min_markets_traded?: number | null;
|
|
2543
|
+
/** @description Restrict to these PnL windows. */
|
|
2544
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2545
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2546
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2547
|
+
};
|
|
2548
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
2549
|
+
TraderFirstTradeFilters: {
|
|
2550
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
2551
|
+
wallet_addresses?: string[] | null;
|
|
2552
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
2553
|
+
condition_ids?: string[] | null;
|
|
2554
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
2555
|
+
event_slugs?: string[] | null;
|
|
2556
|
+
/**
|
|
2557
|
+
* Format: double
|
|
2558
|
+
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2559
|
+
*/
|
|
2560
|
+
min_usd_value?: number | null;
|
|
2561
|
+
/**
|
|
2562
|
+
* Format: double
|
|
2563
|
+
* @description Only fire when the outcome probability is ≥ this value.
|
|
2564
|
+
*/
|
|
2565
|
+
min_probability?: number | null;
|
|
2566
|
+
/**
|
|
2567
|
+
* Format: double
|
|
2568
|
+
* @description Only fire when the outcome probability is ≤ this value.
|
|
2569
|
+
*/
|
|
2570
|
+
max_probability?: number | null;
|
|
2571
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2572
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2573
|
+
};
|
|
2574
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
2575
|
+
TraderGlobalPnlFilters: {
|
|
2576
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
2577
|
+
traders?: string[] | null;
|
|
2578
|
+
/**
|
|
2579
|
+
* Format: double
|
|
2580
|
+
* @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
|
|
2581
|
+
*/
|
|
2582
|
+
min_realized_pnl_usd?: number | null;
|
|
2583
|
+
/**
|
|
2584
|
+
* Format: double
|
|
2585
|
+
* @description Only fire when realized PnL ≤ this value (USD).
|
|
2586
|
+
*/
|
|
2587
|
+
max_realized_pnl_usd?: number | null;
|
|
2588
|
+
/**
|
|
2589
|
+
* Format: double
|
|
2590
|
+
* @description Only fire when total trading volume ≥ this value (USD).
|
|
2591
|
+
*/
|
|
2592
|
+
min_volume_usd?: number | null;
|
|
2593
|
+
/**
|
|
2594
|
+
* Format: double
|
|
2595
|
+
* @description Only fire when total trading volume ≤ this value (USD).
|
|
2596
|
+
*/
|
|
2597
|
+
max_volume_usd?: number | null;
|
|
2598
|
+
/**
|
|
2599
|
+
* Format: double
|
|
2600
|
+
* @description Only fire when buy volume ≥ this value (USD).
|
|
2601
|
+
*/
|
|
2602
|
+
min_buy_usd?: number | null;
|
|
2603
|
+
/**
|
|
2604
|
+
* Format: double
|
|
2605
|
+
* @description Only fire when sell volume ≥ this value (USD).
|
|
2606
|
+
*/
|
|
2607
|
+
min_sell_volume_usd?: number | null;
|
|
2608
|
+
/**
|
|
2609
|
+
* Format: double
|
|
2610
|
+
* @description Only fire when market win rate ≥ this percentage (0.0–100.0).
|
|
2611
|
+
*/
|
|
2612
|
+
min_win_rate?: number | null;
|
|
2613
|
+
/**
|
|
2614
|
+
* Format: int64
|
|
2615
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
2616
|
+
*/
|
|
2617
|
+
min_markets_traded?: number | null;
|
|
2618
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
2619
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2620
|
+
};
|
|
2621
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
2622
|
+
TraderMarketPnlFilters: {
|
|
2623
|
+
/** @description Track only these trader wallet addresses. */
|
|
2624
|
+
traders?: string[] | null;
|
|
2625
|
+
/** @description Restrict to these markets. */
|
|
2626
|
+
condition_ids?: string[] | null;
|
|
2627
|
+
/** @description Restrict to markets in these events. */
|
|
2628
|
+
event_slugs?: string[] | null;
|
|
2629
|
+
/**
|
|
2630
|
+
* Format: double
|
|
2631
|
+
* @description Only fire when per-market realized PnL ≥ this value (USD).
|
|
2632
|
+
*/
|
|
2633
|
+
min_realized_pnl_usd?: number | null;
|
|
2634
|
+
/**
|
|
2635
|
+
* Format: double
|
|
2636
|
+
* @description Only fire when per-market realized PnL ≤ this value (USD).
|
|
2637
|
+
*/
|
|
2638
|
+
max_realized_pnl_usd?: number | null;
|
|
2639
|
+
/**
|
|
2640
|
+
* Format: double
|
|
2641
|
+
* @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
|
|
2642
|
+
*/
|
|
2643
|
+
min_volume_usd?: number | null;
|
|
2644
|
+
/**
|
|
2645
|
+
* Format: double
|
|
2646
|
+
* @description Only fire when total volume ≤ this value (USD).
|
|
2647
|
+
*/
|
|
2648
|
+
max_volume_usd?: number | null;
|
|
2649
|
+
/**
|
|
2650
|
+
* Format: double
|
|
2651
|
+
* @description Only fire when buy volume in the market ≥ this value (USD).
|
|
2652
|
+
*/
|
|
2653
|
+
min_buy_usd?: number | null;
|
|
2654
|
+
/**
|
|
2655
|
+
* Format: double
|
|
2656
|
+
* @description Only fire when sell volume in the market ≥ this value (USD).
|
|
2657
|
+
*/
|
|
2658
|
+
min_sell_volume_usd?: number | null;
|
|
2659
|
+
/** @description Restrict to these PnL windows. */
|
|
2660
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2661
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2662
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2663
|
+
};
|
|
2664
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
2665
|
+
TraderNewMarketFilters: {
|
|
2666
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
2667
|
+
wallet_addresses?: string[] | null;
|
|
2668
|
+
/** @description Restrict to these markets. */
|
|
2669
|
+
condition_ids?: string[] | null;
|
|
2670
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2671
|
+
event_slugs?: string[] | null;
|
|
2672
|
+
/**
|
|
2673
|
+
* Format: double
|
|
2674
|
+
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2675
|
+
*/
|
|
2676
|
+
min_usd_value?: number | null;
|
|
2677
|
+
/**
|
|
2678
|
+
* Format: double
|
|
2679
|
+
* @description Only fire when the outcome probability is ≥ this value.
|
|
2680
|
+
*/
|
|
2681
|
+
min_probability?: number | null;
|
|
2682
|
+
/**
|
|
2683
|
+
* Format: double
|
|
2684
|
+
* @description Only fire when the outcome probability is ≤ this value.
|
|
2685
|
+
*/
|
|
2686
|
+
max_probability?: number | null;
|
|
2687
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2688
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2689
|
+
};
|
|
2690
|
+
/** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
|
|
2691
|
+
TraderNewTradeFilters: {
|
|
2692
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2693
|
+
wallet_addresses?: string[] | null;
|
|
2694
|
+
/** @description Restrict to these markets. */
|
|
2695
|
+
condition_ids?: string[] | null;
|
|
2696
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2697
|
+
event_slugs?: string[] | null;
|
|
2698
|
+
/**
|
|
2699
|
+
* Format: double
|
|
2700
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2701
|
+
* @default 0
|
|
2702
|
+
*/
|
|
2703
|
+
min_usd_value: number | null;
|
|
2704
|
+
/**
|
|
2705
|
+
* Format: double
|
|
2706
|
+
* @description Only fire when outcome probability is ≥ this value.
|
|
2707
|
+
*/
|
|
2708
|
+
min_probability?: number | null;
|
|
2709
|
+
/**
|
|
2710
|
+
* Format: double
|
|
2711
|
+
* @description Only fire when outcome probability is ≤ this value.
|
|
2712
|
+
*/
|
|
2713
|
+
max_probability?: number | null;
|
|
2714
|
+
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
2715
|
+
trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
|
|
2716
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2717
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2718
|
+
};
|
|
2719
|
+
/**
|
|
2720
|
+
* @description Subscription filters for the `trader_trade_event` event. All fields are optional.
|
|
2721
|
+
* `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
|
|
2722
|
+
* exclude `PositionsConverted`, because conversion events do not currently carry
|
|
2723
|
+
* `event_slug` in the typed webhook payload.
|
|
2724
|
+
*/
|
|
2725
|
+
TraderTradeEventFilters: {
|
|
2726
|
+
/** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
|
|
2727
|
+
wallet_addresses?: string[] | null;
|
|
2728
|
+
/** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
|
|
2729
|
+
condition_ids?: string[] | null;
|
|
2730
|
+
/** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
|
|
2731
|
+
event_slugs?: string[] | null;
|
|
2732
|
+
/**
|
|
2733
|
+
* Format: double
|
|
2734
|
+
* @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
|
|
2735
|
+
* @default 0
|
|
2736
|
+
*/
|
|
2737
|
+
min_usd_value: number | null;
|
|
2738
|
+
/**
|
|
2739
|
+
* Format: double
|
|
2740
|
+
* @description Only fire when event probability is ≥ this value. Events without probability data do not match.
|
|
2741
|
+
*/
|
|
2742
|
+
min_probability?: number | null;
|
|
2743
|
+
/**
|
|
2744
|
+
* Format: double
|
|
2745
|
+
* @description Only fire when event probability is ≤ this value. Events without probability data do not match.
|
|
2746
|
+
*/
|
|
2747
|
+
max_probability?: number | null;
|
|
2748
|
+
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
2749
|
+
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;
|
|
2750
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
2751
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2752
|
+
};
|
|
2753
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
2754
|
+
TraderWhaleTradeFilters: {
|
|
2755
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2756
|
+
wallet_addresses?: string[] | null;
|
|
2757
|
+
/** @description Restrict to these markets. */
|
|
2758
|
+
condition_ids?: string[] | null;
|
|
2759
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2760
|
+
event_slugs?: string[] | null;
|
|
2761
|
+
/**
|
|
2762
|
+
* Format: double
|
|
2763
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2764
|
+
* @default 0
|
|
2765
|
+
*/
|
|
2766
|
+
min_usd_value: number | null;
|
|
2767
|
+
/**
|
|
2768
|
+
* Format: double
|
|
2769
|
+
* @description Only fire when outcome probability is ≥ this value.
|
|
2770
|
+
*/
|
|
2771
|
+
min_probability?: number | null;
|
|
2772
|
+
/**
|
|
2773
|
+
* Format: double
|
|
2774
|
+
* @description Only fire when outcome probability is ≤ this value.
|
|
2775
|
+
*/
|
|
2776
|
+
max_probability?: number | null;
|
|
2777
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2778
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2779
|
+
};
|
|
2095
2780
|
/** @description Request body for updating a webhook */
|
|
2096
2781
|
UpdateWebhookRequestBody: {
|
|
2097
2782
|
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
@@ -2104,20 +2789,24 @@ export interface components {
|
|
|
2104
2789
|
/** @description Description/name */
|
|
2105
2790
|
description?: string | null;
|
|
2106
2791
|
};
|
|
2107
|
-
/** @description
|
|
2792
|
+
/** @description Volume milestone webhook payload */
|
|
2108
2793
|
VolumeMilestonePayload: {
|
|
2109
|
-
/** @description Market condition ID */
|
|
2110
2794
|
condition_id: string;
|
|
2795
|
+
timeframe: string;
|
|
2111
2796
|
/**
|
|
2112
|
-
*
|
|
2113
|
-
* @
|
|
2797
|
+
* Format: double
|
|
2798
|
+
* @description Milestone amount reached (USD)
|
|
2114
2799
|
*/
|
|
2115
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
2116
|
-
/** @description The USD milestone amount that was crossed */
|
|
2117
2800
|
milestone_usd: number;
|
|
2118
|
-
/**
|
|
2801
|
+
/**
|
|
2802
|
+
* Format: double
|
|
2803
|
+
* @description Current volume (USD) that triggered the milestone
|
|
2804
|
+
*/
|
|
2119
2805
|
current_volume_usd: number;
|
|
2120
|
-
/**
|
|
2806
|
+
/**
|
|
2807
|
+
* Format: double
|
|
2808
|
+
* @description Total fees collected in this timeframe
|
|
2809
|
+
*/
|
|
2121
2810
|
fees: number;
|
|
2122
2811
|
/**
|
|
2123
2812
|
* Format: int64
|
|
@@ -2125,6 +2814,12 @@ export interface components {
|
|
|
2125
2814
|
*/
|
|
2126
2815
|
txns: number;
|
|
2127
2816
|
};
|
|
2817
|
+
/**
|
|
2818
|
+
* @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
|
|
2819
|
+
* in addition to the metric set.
|
|
2820
|
+
* @enum {string}
|
|
2821
|
+
*/
|
|
2822
|
+
VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
2128
2823
|
/**
|
|
2129
2824
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
2130
2825
|
* @enum {string}
|
|
@@ -2367,7 +3062,10 @@ export interface components {
|
|
|
2367
3062
|
condition_id?: string | null;
|
|
2368
3063
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
2369
3064
|
outcome?: string | null;
|
|
2370
|
-
/**
|
|
3065
|
+
/**
|
|
3066
|
+
* Format: int32
|
|
3067
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
3068
|
+
*/
|
|
2371
3069
|
outcome_index?: number | null;
|
|
2372
3070
|
/** @description Market question text */
|
|
2373
3071
|
question?: string | null;
|
|
@@ -2389,30 +3087,36 @@ export interface components {
|
|
|
2389
3087
|
* @description Block confirmation timestamp (Unix seconds)
|
|
2390
3088
|
*/
|
|
2391
3089
|
confirmed_at: number;
|
|
2392
|
-
/**
|
|
3090
|
+
/**
|
|
3091
|
+
* Format: double
|
|
3092
|
+
* @description USD size of the trade (6 decimal places)
|
|
3093
|
+
*/
|
|
2393
3094
|
amount_usd: number;
|
|
2394
|
-
/**
|
|
3095
|
+
/**
|
|
3096
|
+
* Format: double
|
|
3097
|
+
* @description Outcome shares traded (6 decimal places)
|
|
3098
|
+
*/
|
|
2395
3099
|
shares_amount: number;
|
|
2396
|
-
/** @description Fee paid in USD (6 decimal places) */
|
|
2397
|
-
fee: number;
|
|
2398
3100
|
/**
|
|
2399
|
-
*
|
|
2400
|
-
* @
|
|
3101
|
+
* Format: double
|
|
3102
|
+
* @description Fee paid in USD (6 decimal places)
|
|
2401
3103
|
*/
|
|
3104
|
+
fee: number;
|
|
3105
|
+
/** @description Trade direction */
|
|
2402
3106
|
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;
|
|
2407
3107
|
/**
|
|
2408
|
-
*
|
|
2409
|
-
* @
|
|
3108
|
+
* Format: double
|
|
3109
|
+
* @description Outcome token price (0.0–1.0)
|
|
2410
3110
|
*/
|
|
2411
|
-
|
|
3111
|
+
price: number;
|
|
2412
3112
|
/**
|
|
2413
|
-
*
|
|
2414
|
-
* @
|
|
3113
|
+
* Format: double
|
|
3114
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
2415
3115
|
*/
|
|
3116
|
+
probability?: number | null;
|
|
3117
|
+
/** @description Exchange contract that processed the trade */
|
|
3118
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
3119
|
+
/** @description Trade type (webhook events only fire on order fills) */
|
|
2416
3120
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
2417
3121
|
};
|
|
2418
3122
|
/** @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. */
|
|
@@ -2915,409 +3619,6 @@ export interface components {
|
|
|
2915
3619
|
/** @enum {string} */
|
|
2916
3620
|
trade_type: "Approval";
|
|
2917
3621
|
};
|
|
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
|
-
};
|
|
3321
3622
|
};
|
|
3322
3623
|
responses: never;
|
|
3323
3624
|
parameters: never;
|