@surf-ai/sdk 1.0.0-alpha.9 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/db/index.d.cts +21 -13
- package/dist/db/index.d.ts +21 -13
- package/dist/server/index.cjs +44 -51
- package/dist/server/index.d.cts +349 -293
- package/dist/server/index.d.ts +349 -293
- package/dist/server/index.js +44 -51
- package/package.json +3 -2
package/dist/server/index.d.cts
CHANGED
|
@@ -177,11 +177,11 @@ interface ExchangeLongShortRatioParams {
|
|
|
177
177
|
pair: string;
|
|
178
178
|
/** Data interval — @default '1h' */
|
|
179
179
|
interval?: '1h' | '4h' | '1d';
|
|
180
|
-
/** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601).
|
|
180
|
+
/** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Binance only retains the last 30 days of data; other exchanges may have different limits. */
|
|
181
181
|
from?: string;
|
|
182
182
|
/** Max number of records. For longer history, paginate using the last returned timestamp as the next from value. — @default '50' */
|
|
183
183
|
limit?: number;
|
|
184
|
-
/** Exchange identifier — @default '
|
|
184
|
+
/** Exchange identifier — @default 'binance' */
|
|
185
185
|
exchange?: 'binance' | 'okx' | 'bybit' | 'bitget';
|
|
186
186
|
}
|
|
187
187
|
interface ExchangeMarketsItem {
|
|
@@ -865,7 +865,7 @@ interface OnchainGasPriceParams {
|
|
|
865
865
|
interface OnchainStructuredQueryItem {
|
|
866
866
|
}
|
|
867
867
|
interface OnchainStructuredQueryParams {
|
|
868
|
-
/** Columns to return. Omit to return all columns.
|
|
868
|
+
/** Columns to return. Omit to return all columns. */
|
|
869
869
|
fields?: unknown;
|
|
870
870
|
/** WHERE conditions (ANDed together) */
|
|
871
871
|
filters?: OnchainStructuredQueryParamsFiltersItem[];
|
|
@@ -875,7 +875,7 @@ interface OnchainStructuredQueryParams {
|
|
|
875
875
|
offset?: number;
|
|
876
876
|
/** ORDER BY clauses */
|
|
877
877
|
sort?: OnchainStructuredQueryParamsSortItem[];
|
|
878
|
-
/** Fully-qualified table name like `agent.
|
|
878
|
+
/** Fully-qualified table name like `agent.ethereum_yields_daily`. Use GET /v1/onchain/schema for available tables. */
|
|
879
879
|
source: string;
|
|
880
880
|
}
|
|
881
881
|
interface OnchainStructuredQueryParamsFiltersItem {
|
|
@@ -913,7 +913,7 @@ interface OnchainSqlItem {
|
|
|
913
913
|
interface OnchainSqlParams {
|
|
914
914
|
/** Maximum number of rows to return — @default '1000' */
|
|
915
915
|
max_rows?: number;
|
|
916
|
-
/** SQL query to execute against the blockchain data warehouse */
|
|
916
|
+
/** SQL query to execute against the blockchain data warehouse. Use GET /v1/onchain/schema for available tables and columns. */
|
|
917
917
|
sql: string;
|
|
918
918
|
}
|
|
919
919
|
interface OnchainTxItem {
|
|
@@ -1006,28 +1006,153 @@ interface OnchainYieldRankingParams {
|
|
|
1006
1006
|
/** Pagination offset — @default '0' */
|
|
1007
1007
|
offset?: number;
|
|
1008
1008
|
}
|
|
1009
|
-
interface
|
|
1010
|
-
/**
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
|
|
1014
|
-
|
|
1009
|
+
interface PredictionMarketAnalyticsData {
|
|
1010
|
+
/** Daily volume/OI time series by platform. When category is omitted, values are summed across all categories. */
|
|
1011
|
+
category_trends: PredictionMarketAnalyticsDataCategoryTrendsItem[];
|
|
1012
|
+
/** Per-market momentum signals sorted by sort_by */
|
|
1013
|
+
momentum_markets: PredictionMarketAnalyticsDataMomentumMarketsItem[];
|
|
1014
|
+
momentum_summary: PredictionMarketAnalyticsDataMomentumSummary;
|
|
1015
|
+
/** Top markets by open interest (within category, or globally when category is omitted) */
|
|
1016
|
+
top_markets: PredictionMarketAnalyticsDataTopMarketsItem[];
|
|
1017
|
+
}
|
|
1018
|
+
interface PredictionMarketAnalyticsDataCategoryTrendsItem {
|
|
1019
|
+
/** Number of active markets */
|
|
1020
|
+
market_count: number;
|
|
1021
|
+
/** Cumulative open interest (USD) */
|
|
1015
1022
|
open_interest_usd: number;
|
|
1016
|
-
/**
|
|
1023
|
+
/** Polymarket or Kalshi */
|
|
1017
1024
|
source: string;
|
|
1018
|
-
/**
|
|
1019
|
-
subcategory: string;
|
|
1020
|
-
/** Unix timestamp in seconds (midnight UTC for the trading day) */
|
|
1025
|
+
/** Day start Unix timestamp */
|
|
1021
1026
|
timestamp: number;
|
|
1027
|
+
/** Daily notional volume (USD) */
|
|
1028
|
+
volume_usd: number;
|
|
1022
1029
|
}
|
|
1023
|
-
interface
|
|
1024
|
-
/**
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1030
|
+
interface PredictionMarketAnalyticsDataMomentumMarketsItem {
|
|
1031
|
+
/** Surf-curated category */
|
|
1032
|
+
category: string;
|
|
1033
|
+
/** Polymarket condition ID */
|
|
1034
|
+
condition_id: string;
|
|
1035
|
+
/** Latest YES price (0-1) */
|
|
1036
|
+
latest_price: number;
|
|
1037
|
+
/** 7-day open interest change (USD) */
|
|
1038
|
+
oi_change_7d: number;
|
|
1039
|
+
/** 7-day price change */
|
|
1040
|
+
price_change_7d: number;
|
|
1041
|
+
/** CONFIRMING_UP, CONFIRMING_DOWN, DIVERGING_UP, DIVERGING_DOWN, or NEUTRAL */
|
|
1042
|
+
price_momentum: string;
|
|
1043
|
+
/** Market question text */
|
|
1044
|
+
question: string;
|
|
1045
|
+
/** BULLISH, BEARISH, or NEUTRAL */
|
|
1046
|
+
smart_money_direction: string;
|
|
1047
|
+
/** Number of smart wallets with positions */
|
|
1048
|
+
smart_wallets_involved: number;
|
|
1049
|
+
/** Surf-curated subcategory */
|
|
1050
|
+
subcategory?: string;
|
|
1051
|
+
/** 7-day volume (USD) */
|
|
1052
|
+
volume_7d: number;
|
|
1053
|
+
/** INCREASING, STABLE, or DECREASING */
|
|
1054
|
+
volume_direction: string;
|
|
1055
|
+
/** Net whale flow (USD) last 24h */
|
|
1056
|
+
whale_flow_net_1d: number;
|
|
1057
|
+
/** Net whale flow (USD) last 7 days */
|
|
1058
|
+
whale_flow_net_7d: number;
|
|
1059
|
+
}
|
|
1060
|
+
interface PredictionMarketAnalyticsDataMomentumSummary {
|
|
1061
|
+
/** Price down + volume up */
|
|
1062
|
+
confirming_down: number;
|
|
1063
|
+
/** Price up + volume up */
|
|
1064
|
+
confirming_up: number;
|
|
1065
|
+
/** Price down + volume down */
|
|
1066
|
+
diverging_down: number;
|
|
1067
|
+
/** Price up + volume down */
|
|
1068
|
+
diverging_up: number;
|
|
1069
|
+
/** No clear momentum */
|
|
1070
|
+
neutral: number;
|
|
1071
|
+
/** Total active markets (in category, or globally when category is omitted) */
|
|
1072
|
+
total_active: number;
|
|
1073
|
+
/** Markets with decreasing volume */
|
|
1074
|
+
volume_decreasing: number;
|
|
1075
|
+
/** Markets with increasing volume */
|
|
1076
|
+
volume_increasing: number;
|
|
1077
|
+
}
|
|
1078
|
+
interface PredictionMarketAnalyticsDataTopMarketsItem {
|
|
1079
|
+
/** Surf-curated category */
|
|
1080
|
+
category: string;
|
|
1081
|
+
/** Polymarket condition ID */
|
|
1082
|
+
condition_id?: string;
|
|
1083
|
+
/** Days until market end date */
|
|
1084
|
+
days_to_resolution?: number;
|
|
1085
|
+
/** YES-side probability (0-1) from realtime price store */
|
|
1086
|
+
latest_price?: number;
|
|
1087
|
+
/** Direct link to market */
|
|
1088
|
+
market_link?: string;
|
|
1089
|
+
/** Kalshi market ticker */
|
|
1090
|
+
market_ticker?: string;
|
|
1091
|
+
/** Matching market ID on the other platform */
|
|
1092
|
+
matched_counterpart?: string;
|
|
1093
|
+
/** Current open interest (USD) */
|
|
1094
|
+
open_interest_usd: number;
|
|
1095
|
+
/** polymarket or kalshi */
|
|
1096
|
+
platform: string;
|
|
1097
|
+
/** Market question text */
|
|
1098
|
+
question: string;
|
|
1099
|
+
/** BULLISH, BEARISH, or NEUTRAL (Polymarket only) */
|
|
1100
|
+
smart_money_direction?: string;
|
|
1101
|
+
/** Market status */
|
|
1102
|
+
status: string;
|
|
1103
|
+
/** Surf-curated subcategory */
|
|
1104
|
+
subcategory?: string;
|
|
1105
|
+
/** Number of trades last 7 days */
|
|
1106
|
+
trade_count_7d: number;
|
|
1107
|
+
/** Notional volume last 24h (USD) */
|
|
1108
|
+
volume_1d: number;
|
|
1109
|
+
/** Notional volume last 30 days (USD) */
|
|
1110
|
+
volume_30d: number;
|
|
1111
|
+
/** Notional volume last 7 days (USD) */
|
|
1112
|
+
volume_7d: number;
|
|
1113
|
+
}
|
|
1114
|
+
interface PredictionMarketAnalyticsParams {
|
|
1115
|
+
/** Category to analyze. Omit to get platform-wide totals across all categories. */
|
|
1027
1116
|
category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports';
|
|
1028
|
-
/**
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1117
|
+
/** Filter to one platform */
|
|
1118
|
+
platform?: 'polymarket' | 'kalshi';
|
|
1119
|
+
/** Time range for category trends — @default '30d' */
|
|
1120
|
+
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
1121
|
+
/** Number of top markets to include — @default '10' */
|
|
1122
|
+
top_n?: number;
|
|
1123
|
+
/** Sort field for momentum markets — @default 'volume_7d' */
|
|
1124
|
+
sort_by?: 'volume_7d' | 'whale_flow_net_7d' | 'price_change_7d' | 'oi_change_7d';
|
|
1125
|
+
/** Sort direction — @default 'desc' */
|
|
1126
|
+
order?: 'asc' | 'desc';
|
|
1127
|
+
/** Limit for momentum markets list — @default '20' */
|
|
1128
|
+
limit?: number;
|
|
1129
|
+
/** Pagination offset for momentum markets — @default '0' */
|
|
1130
|
+
offset?: number;
|
|
1131
|
+
}
|
|
1132
|
+
interface PredictionMarketCorrelationsItem {
|
|
1133
|
+
/** Shared category */
|
|
1134
|
+
category: string;
|
|
1135
|
+
/** 30-day Pearson correlation coefficient */
|
|
1136
|
+
correlation: number;
|
|
1137
|
+
/** First market condition ID */
|
|
1138
|
+
market_a_condition_id: string;
|
|
1139
|
+
/** First market question */
|
|
1140
|
+
market_a_question?: string;
|
|
1141
|
+
/** Second market condition ID */
|
|
1142
|
+
market_b_condition_id: string;
|
|
1143
|
+
/** Second market question */
|
|
1144
|
+
market_b_question?: string;
|
|
1145
|
+
/** Number of trading days with data for both markets */
|
|
1146
|
+
overlapping_days: number;
|
|
1147
|
+
}
|
|
1148
|
+
interface PredictionMarketCorrelationsParams {
|
|
1149
|
+
/** Category (correlations are within-category only) */
|
|
1150
|
+
category: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports';
|
|
1151
|
+
/** Filter to pairs involving this market */
|
|
1152
|
+
condition_id?: string;
|
|
1153
|
+
/** Minimum absolute correlation — @default '0.5' */
|
|
1154
|
+
min_correlation?: number;
|
|
1155
|
+
/** Results per page — @default '20' */
|
|
1031
1156
|
limit?: number;
|
|
1032
1157
|
/** Pagination offset — @default '0' */
|
|
1033
1158
|
offset?: number;
|
|
@@ -1079,8 +1204,8 @@ interface KalshiEventsItemMarketsItem {
|
|
|
1079
1204
|
total_volume: number;
|
|
1080
1205
|
}
|
|
1081
1206
|
interface KalshiEventsParams {
|
|
1082
|
-
/** Event ticker identifier */
|
|
1083
|
-
event_ticker
|
|
1207
|
+
/** Event ticker identifier. When omitted, returns top active events by volume. Use GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1208
|
+
event_ticker?: string;
|
|
1084
1209
|
/** Results per page — @default '20' */
|
|
1085
1210
|
limit?: number;
|
|
1086
1211
|
/** Pagination offset — @default '0' */
|
|
@@ -1121,8 +1246,8 @@ interface KalshiMarketsItem {
|
|
|
1121
1246
|
total_volume: number;
|
|
1122
1247
|
}
|
|
1123
1248
|
interface KalshiMarketsParams {
|
|
1124
|
-
/** Market ticker identifier */
|
|
1125
|
-
market_ticker
|
|
1249
|
+
/** Market ticker identifier. When omitted, returns top active markets by volume. Use GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1250
|
+
market_ticker?: string;
|
|
1126
1251
|
/** Results per page — @default '20' */
|
|
1127
1252
|
limit?: number;
|
|
1128
1253
|
/** Pagination offset — @default '0' */
|
|
@@ -1135,11 +1260,25 @@ interface KalshiOpenInterestItem {
|
|
|
1135
1260
|
timestamp: number;
|
|
1136
1261
|
}
|
|
1137
1262
|
interface KalshiOpenInterestParams {
|
|
1138
|
-
/** Market ticker identifier */
|
|
1263
|
+
/** Market ticker identifier. Use GET /v1/prediction-market/kalshi/markets or GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1139
1264
|
ticker: string;
|
|
1140
1265
|
/** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y` — @default '30d' */
|
|
1141
1266
|
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
1142
1267
|
}
|
|
1268
|
+
interface KalshiOrderbooksItem {
|
|
1269
|
+
}
|
|
1270
|
+
interface KalshiOrderbooksParams {
|
|
1271
|
+
/** Kalshi market ticker */
|
|
1272
|
+
ticker: string;
|
|
1273
|
+
/** Start time in Unix milliseconds. 0 means 7 days ago. */
|
|
1274
|
+
start_time?: number;
|
|
1275
|
+
/** End time in Unix milliseconds. 0 means current time. */
|
|
1276
|
+
end_time?: number;
|
|
1277
|
+
/** Maximum number of snapshots to return — @default '100' */
|
|
1278
|
+
limit?: number;
|
|
1279
|
+
/** Base64 cursor for pagination */
|
|
1280
|
+
pagination_key?: string;
|
|
1281
|
+
}
|
|
1143
1282
|
interface KalshiPricesItem {
|
|
1144
1283
|
/** Highest price as probability (0-1) */
|
|
1145
1284
|
high: number;
|
|
@@ -1165,61 +1304,13 @@ interface KalshiPricesItemSideB {
|
|
|
1165
1304
|
price: number;
|
|
1166
1305
|
}
|
|
1167
1306
|
interface KalshiPricesParams {
|
|
1168
|
-
/** Market ticker identifier */
|
|
1307
|
+
/** Market ticker identifier. Use GET /v1/prediction-market/kalshi/markets or GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1169
1308
|
ticker: string;
|
|
1170
1309
|
/** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y`. Ignored when `interval=latest`. — @default '30d' */
|
|
1171
1310
|
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
1172
1311
|
/** Data interval: `1h` for hourly, `1d` for daily OHLC, `latest` for real-time price from trades — @default '1d' */
|
|
1173
1312
|
interval?: '1h' | '1d' | 'latest';
|
|
1174
1313
|
}
|
|
1175
|
-
interface KalshiRankingItem {
|
|
1176
|
-
/** Surf curated market category */
|
|
1177
|
-
category?: string;
|
|
1178
|
-
/** Market close time (Unix seconds) */
|
|
1179
|
-
close_time?: number;
|
|
1180
|
-
/** Market end time (Unix seconds) */
|
|
1181
|
-
end_time?: number;
|
|
1182
|
-
/** Parent event ticker */
|
|
1183
|
-
event_ticker: string;
|
|
1184
|
-
/** Event title */
|
|
1185
|
-
event_title?: string;
|
|
1186
|
-
/** Previous day open interest from daily report */
|
|
1187
|
-
last_day_open_interest: number;
|
|
1188
|
-
/** Unique market ticker identifier */
|
|
1189
|
-
market_ticker: string;
|
|
1190
|
-
/** Last day notional trading volume in USD (each contract = $1) */
|
|
1191
|
-
notional_volume_usd: number;
|
|
1192
|
-
/** Open interest (contracts) */
|
|
1193
|
-
open_interest: number;
|
|
1194
|
-
/** Payout type */
|
|
1195
|
-
payout_type: string;
|
|
1196
|
-
/** Market result if resolved */
|
|
1197
|
-
result?: string;
|
|
1198
|
-
/** Market start time (Unix seconds) */
|
|
1199
|
-
start_time?: number;
|
|
1200
|
-
/** Market status */
|
|
1201
|
-
status: string;
|
|
1202
|
-
/** Surf curated market subcategory */
|
|
1203
|
-
subcategory?: string;
|
|
1204
|
-
/** Market title */
|
|
1205
|
-
title: string;
|
|
1206
|
-
/** Total trading volume (contracts) */
|
|
1207
|
-
total_volume: number;
|
|
1208
|
-
}
|
|
1209
|
-
interface KalshiRankingParams {
|
|
1210
|
-
/** Field to sort results by — @default 'notional_volume_usd' */
|
|
1211
|
-
sort_by?: 'notional_volume_usd' | 'open_interest';
|
|
1212
|
-
/** Sort order — @default 'desc' */
|
|
1213
|
-
order?: 'asc' | 'desc';
|
|
1214
|
-
/** Market status filter: `active`, `closed`, `determined`, `disputed`, `finalized`, `inactive`, or `initialized` — @default 'active' */
|
|
1215
|
-
status?: 'active' | 'closed' | 'determined' | 'disputed' | 'finalized' | 'inactive' | 'initialized';
|
|
1216
|
-
/** Filter by category */
|
|
1217
|
-
category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
|
|
1218
|
-
/** Results per page — @default '20' */
|
|
1219
|
-
limit?: number;
|
|
1220
|
-
/** Pagination offset — @default '0' */
|
|
1221
|
-
offset?: number;
|
|
1222
|
-
}
|
|
1223
1314
|
interface KalshiTradesItem {
|
|
1224
1315
|
/** Unique market ticker identifier */
|
|
1225
1316
|
market_ticker: string;
|
|
@@ -1237,7 +1328,7 @@ interface KalshiTradesItem {
|
|
|
1237
1328
|
yes_price: number;
|
|
1238
1329
|
}
|
|
1239
1330
|
interface KalshiTradesParams {
|
|
1240
|
-
/** Market ticker identifier */
|
|
1331
|
+
/** Market ticker identifier. Use GET /v1/prediction-market/kalshi/markets or GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1241
1332
|
ticker: string;
|
|
1242
1333
|
/** Filter by taker side: `yes` or `no` */
|
|
1243
1334
|
taker_side?: 'yes' | 'no';
|
|
@@ -1263,7 +1354,7 @@ interface KalshiVolumesItem {
|
|
|
1263
1354
|
timestamp: number;
|
|
1264
1355
|
}
|
|
1265
1356
|
interface KalshiVolumesParams {
|
|
1266
|
-
/** Market ticker identifier */
|
|
1357
|
+
/** Market ticker identifier. Use GET /v1/prediction-market/kalshi/markets or GET /v1/search/kalshi?q={keyword} to discover valid tickers. */
|
|
1267
1358
|
ticker: string;
|
|
1268
1359
|
/** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y` — @default '30d' */
|
|
1269
1360
|
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
@@ -1292,61 +1383,21 @@ interface MatchingMarketDailyParams {
|
|
|
1292
1383
|
/** Pagination offset — @default '0' */
|
|
1293
1384
|
offset?: number;
|
|
1294
1385
|
}
|
|
1295
|
-
interface MatchingMarketFindItem {
|
|
1296
|
-
/** Market category */
|
|
1297
|
-
category: string;
|
|
1298
|
-
/** Match confidence score (75-100) */
|
|
1299
|
-
confidence: number;
|
|
1300
|
-
kalshi: MatchingMarketFindItemKalshi;
|
|
1301
|
-
/** Match type: exact or related */
|
|
1302
|
-
match_type: string;
|
|
1303
|
-
polymarket: MatchingMarketFindItemPolymarket;
|
|
1304
|
-
}
|
|
1305
|
-
interface MatchingMarketFindItemKalshi {
|
|
1306
|
-
/** Kalshi event ticker */
|
|
1307
|
-
event_ticker: string;
|
|
1308
|
-
/** Kalshi market ticker */
|
|
1309
|
-
market_ticker: string;
|
|
1310
|
-
/** Open interest in contracts */
|
|
1311
|
-
open_interest: number;
|
|
1312
|
-
/** Market status */
|
|
1313
|
-
status: string;
|
|
1314
|
-
/** Market title */
|
|
1315
|
-
title: string;
|
|
1316
|
-
/** Total volume in contracts */
|
|
1317
|
-
volume_contracts: number;
|
|
1318
|
-
}
|
|
1319
|
-
interface MatchingMarketFindItemPolymarket {
|
|
1320
|
-
/** Polymarket condition identifier */
|
|
1321
|
-
condition_id: string;
|
|
1322
|
-
/** Event slug identifier */
|
|
1323
|
-
event_slug: string;
|
|
1324
|
-
/** Whether the market is currently active */
|
|
1325
|
-
is_active: boolean;
|
|
1326
|
-
/** Market question text */
|
|
1327
|
-
question: string;
|
|
1328
|
-
/** Total trading volume (USD) */
|
|
1329
|
-
volume_usd: number;
|
|
1330
|
-
}
|
|
1331
|
-
interface MatchingMarketFindParams {
|
|
1332
|
-
/** Polymarket condition ID to find match for */
|
|
1333
|
-
polymarket_condition_id?: string;
|
|
1334
|
-
/** Kalshi market ticker to find match for */
|
|
1335
|
-
kalshi_market_ticker?: string;
|
|
1336
|
-
/** Maximum rows to return — @default '20' */
|
|
1337
|
-
limit?: number;
|
|
1338
|
-
/** Pagination offset — @default '0' */
|
|
1339
|
-
offset?: number;
|
|
1340
|
-
}
|
|
1341
1386
|
interface MatchingMarketPairsItem {
|
|
1342
1387
|
/** Market category */
|
|
1343
1388
|
category: string;
|
|
1344
1389
|
/** Match confidence score (75-100) */
|
|
1345
1390
|
confidence: number;
|
|
1346
1391
|
kalshi: MatchingMarketPairsItemKalshi;
|
|
1392
|
+
/** Kalshi YES-side probability (0-1) */
|
|
1393
|
+
kalshi_price?: number;
|
|
1347
1394
|
/** Match type: exact or related */
|
|
1348
1395
|
match_type: string;
|
|
1349
1396
|
polymarket: MatchingMarketPairsItemPolymarket;
|
|
1397
|
+
/** Polymarket YES-side probability (0-1) */
|
|
1398
|
+
polymarket_price?: number;
|
|
1399
|
+
/** Absolute spread as percentage */
|
|
1400
|
+
spread_pct?: number;
|
|
1350
1401
|
}
|
|
1351
1402
|
interface MatchingMarketPairsItemKalshi {
|
|
1352
1403
|
/** Kalshi event ticker */
|
|
@@ -1383,8 +1434,12 @@ interface MatchingMarketPairsParams {
|
|
|
1383
1434
|
active_only?: boolean;
|
|
1384
1435
|
/** Minimum confidence score (0-100) — @default '0' */
|
|
1385
1436
|
min_confidence?: number;
|
|
1437
|
+
/** Find match for this Polymarket market */
|
|
1438
|
+
polymarket_condition_id?: string;
|
|
1439
|
+
/** Find match for this Kalshi market */
|
|
1440
|
+
kalshi_market_ticker?: string;
|
|
1386
1441
|
/** Sort field — @default 'confidence' */
|
|
1387
|
-
sort_by?: 'confidence' | 'polymarket_volume' | 'kalshi_volume';
|
|
1442
|
+
sort_by?: 'confidence' | 'polymarket_volume' | 'kalshi_volume' | 'spread_pct';
|
|
1388
1443
|
/** Sort order — @default 'desc' */
|
|
1389
1444
|
order?: 'asc' | 'desc';
|
|
1390
1445
|
/** Maximum rows to return — @default '20' */
|
|
@@ -1392,36 +1447,6 @@ interface MatchingMarketPairsParams {
|
|
|
1392
1447
|
/** Pagination offset — @default '0' */
|
|
1393
1448
|
offset?: number;
|
|
1394
1449
|
}
|
|
1395
|
-
interface PolymarketActivityItem {
|
|
1396
|
-
/** Market condition identifier */
|
|
1397
|
-
condition_id: string;
|
|
1398
|
-
/** Outcome label */
|
|
1399
|
-
outcome: string;
|
|
1400
|
-
/** Trade price (0-1) */
|
|
1401
|
-
price: number;
|
|
1402
|
-
/** Trade side */
|
|
1403
|
-
side: string;
|
|
1404
|
-
/** Trade size in shares */
|
|
1405
|
-
size: number;
|
|
1406
|
-
/** Activity Unix timestamp in seconds */
|
|
1407
|
-
timestamp: number;
|
|
1408
|
-
/** Market title */
|
|
1409
|
-
title: string;
|
|
1410
|
-
/** Transaction hash */
|
|
1411
|
-
transaction_hash: string;
|
|
1412
|
-
/** Activity type such as `buy`, `sell`, or `redeem` */
|
|
1413
|
-
type: string;
|
|
1414
|
-
/** Trade size in USDC */
|
|
1415
|
-
usdc_size: number;
|
|
1416
|
-
}
|
|
1417
|
-
interface PolymarketActivityParams {
|
|
1418
|
-
/** Polymarket proxy wallet address */
|
|
1419
|
-
address: string;
|
|
1420
|
-
/** Results per page — @default '50' */
|
|
1421
|
-
limit?: number;
|
|
1422
|
-
/** Pagination offset — @default '0' */
|
|
1423
|
-
offset?: number;
|
|
1424
|
-
}
|
|
1425
1450
|
interface PolymarketEventsItem {
|
|
1426
1451
|
/** Surf curated event category */
|
|
1427
1452
|
category?: string;
|
|
@@ -1522,6 +1547,34 @@ interface PolymarketEventsParams {
|
|
|
1522
1547
|
/** Pagination offset — @default '0' */
|
|
1523
1548
|
offset?: number;
|
|
1524
1549
|
}
|
|
1550
|
+
interface PolymarketLeaderboardItem {
|
|
1551
|
+
/** Wallet address */
|
|
1552
|
+
address: string;
|
|
1553
|
+
/** Realized PnL (USD) */
|
|
1554
|
+
pnl: number;
|
|
1555
|
+
/** Total positions */
|
|
1556
|
+
positions: number;
|
|
1557
|
+
/** Number of losing positions */
|
|
1558
|
+
positions_lost: number;
|
|
1559
|
+
/** Number of open positions */
|
|
1560
|
+
positions_open: number;
|
|
1561
|
+
/** Number of winning positions */
|
|
1562
|
+
positions_won: number;
|
|
1563
|
+
/** Total number of trades */
|
|
1564
|
+
trade_count: number;
|
|
1565
|
+
/** Total trading volume (USD) */
|
|
1566
|
+
volume: number;
|
|
1567
|
+
}
|
|
1568
|
+
interface PolymarketLeaderboardParams {
|
|
1569
|
+
/** Ranking metric — @default 'pnl' */
|
|
1570
|
+
sort_by?: 'pnl' | 'volume' | 'trade_count';
|
|
1571
|
+
/** Sort direction — @default 'desc' */
|
|
1572
|
+
order?: 'asc' | 'desc';
|
|
1573
|
+
/** Results per page — @default '20' */
|
|
1574
|
+
limit?: number;
|
|
1575
|
+
/** Pagination offset — @default '0' */
|
|
1576
|
+
offset?: number;
|
|
1577
|
+
}
|
|
1525
1578
|
interface PolymarketMarketsItem {
|
|
1526
1579
|
/** Surf curated market category */
|
|
1527
1580
|
category?: string;
|
|
@@ -1606,6 +1659,20 @@ interface PolymarketOpenInterestParams {
|
|
|
1606
1659
|
/** Predefined time range — @default '30d' */
|
|
1607
1660
|
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
1608
1661
|
}
|
|
1662
|
+
interface PolymarketOrderbooksItem {
|
|
1663
|
+
}
|
|
1664
|
+
interface PolymarketOrderbooksParams {
|
|
1665
|
+
/** Token identifier */
|
|
1666
|
+
token_id: string;
|
|
1667
|
+
/** Start time in Unix milliseconds. 0 means 7 days ago. */
|
|
1668
|
+
start_time?: number;
|
|
1669
|
+
/** End time in Unix milliseconds. 0 means current time. */
|
|
1670
|
+
end_time?: number;
|
|
1671
|
+
/** Maximum number of snapshots to return — @default '100' */
|
|
1672
|
+
limit?: number;
|
|
1673
|
+
/** Base64 cursor for pagination */
|
|
1674
|
+
pagination_key?: string;
|
|
1675
|
+
}
|
|
1609
1676
|
interface PolymarketPositionsItem {
|
|
1610
1677
|
/** Average entry price (0-1) */
|
|
1611
1678
|
avg_price: number;
|
|
@@ -1636,6 +1703,16 @@ interface PolymarketPositionsParams {
|
|
|
1636
1703
|
/** Pagination offset — @default '0' */
|
|
1637
1704
|
offset?: number;
|
|
1638
1705
|
}
|
|
1706
|
+
interface PolymarketPriceOhlcvItem {
|
|
1707
|
+
}
|
|
1708
|
+
interface PolymarketPriceOhlcvParams {
|
|
1709
|
+
/** Start time (Unix seconds). 0 means no lower bound. */
|
|
1710
|
+
start_time?: number;
|
|
1711
|
+
/** End time (Unix seconds). 0 means current time. */
|
|
1712
|
+
end_time?: number;
|
|
1713
|
+
/** Candle interval in minutes: 1=1min, 60=1hour, 1440=1day — @default '60' */
|
|
1714
|
+
interval?: number;
|
|
1715
|
+
}
|
|
1639
1716
|
interface PolymarketPricesItem {
|
|
1640
1717
|
side_a?: PolymarketPricesItemSideA;
|
|
1641
1718
|
side_b?: PolymarketPricesItemSideB;
|
|
@@ -1666,83 +1743,41 @@ interface PolymarketPricesParams {
|
|
|
1666
1743
|
/** Aggregation interval: `1h` (hourly), `1d` (daily), or `latest` (most recent snapshot) — @default '1d' */
|
|
1667
1744
|
interval?: '1h' | '1d' | 'latest';
|
|
1668
1745
|
}
|
|
1669
|
-
interface
|
|
1670
|
-
/** Surf curated market category */
|
|
1671
|
-
category?: string;
|
|
1672
|
-
/** Unique condition identifier */
|
|
1673
|
-
condition_id: string;
|
|
1674
|
-
/** Market end time (Unix seconds) */
|
|
1675
|
-
end_time?: number;
|
|
1676
|
-
/** Notional trading volume (USD) */
|
|
1677
|
-
notional_volume_usd: number;
|
|
1678
|
-
/** Current open interest (USD) */
|
|
1679
|
-
open_interest_usd: number;
|
|
1680
|
-
/** Link to Polymarket page */
|
|
1681
|
-
polymarket_link?: string;
|
|
1682
|
-
/** Market question text */
|
|
1683
|
-
question: string;
|
|
1684
|
-
/** Market status */
|
|
1685
|
-
status: string;
|
|
1686
|
-
/** Surf curated market subcategory */
|
|
1687
|
-
subcategory?: string;
|
|
1688
|
-
/** Market tags */
|
|
1689
|
-
tags?: unknown;
|
|
1746
|
+
interface PolymarketSmartMoneyItem {
|
|
1690
1747
|
}
|
|
1691
|
-
interface
|
|
1692
|
-
/**
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1748
|
+
interface PolymarketSmartMoneyParams {
|
|
1749
|
+
/** positioning = aggregate smart wallet direction per market; trades = individual $10K+ trades with wallet metadata — @default 'positioning' */
|
|
1750
|
+
view?: 'positioning' | 'trades';
|
|
1751
|
+
/** Filter to a specific market (omit to browse all) */
|
|
1752
|
+
condition_id?: string;
|
|
1753
|
+
/** Filter by category */
|
|
1754
|
+
category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports';
|
|
1755
|
+
/** Filter by net smart money direction (only for view=positioning) */
|
|
1756
|
+
direction?: 'bullish' | 'bearish' | 'neutral';
|
|
1757
|
+
/** Trade size tier filter (only for view=trades) */
|
|
1758
|
+
whale_tier?: 'whale' | 'large' | 'mega';
|
|
1759
|
+
/** Start time as Unix seconds or date string (only for view=trades) */
|
|
1760
|
+
from?: string;
|
|
1761
|
+
/** End time as Unix seconds or date string (only for view=trades) */
|
|
1762
|
+
to?: string;
|
|
1763
|
+
/** Sort field — @default 'smart_wallets_involved' */
|
|
1764
|
+
sort_by?: 'smart_wallets_involved' | 'smart_buy_volume_usd' | 'smart_sell_volume_usd' | 'amount_usd' | 'block_time';
|
|
1765
|
+
/** Sort direction — @default 'desc' */
|
|
1695
1766
|
order?: 'asc' | 'desc';
|
|
1696
|
-
/** Market status filter: `active`, `finalized`, `ended`, `initialized`, or `closed` — @default 'active' */
|
|
1697
|
-
status?: 'active' | 'finalized' | 'ended' | 'initialized' | 'closed';
|
|
1698
|
-
/** Filter by Surf-curated category */
|
|
1699
|
-
category?: 'crypto' | 'culture' | 'early_polymarket_trades' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
|
|
1700
|
-
/** Filter markets ending within this window from now: `24h`, `3d`, `7d`, `14d`, or `30d` */
|
|
1701
|
-
end_before?: '24h' | '3d' | '7d' | '14d' | '30d';
|
|
1702
1767
|
/** Results per page — @default '20' */
|
|
1703
1768
|
limit?: number;
|
|
1704
1769
|
/** Pagination offset — @default '0' */
|
|
1705
1770
|
offset?: number;
|
|
1706
1771
|
}
|
|
1707
1772
|
interface PolymarketTradesItem {
|
|
1708
|
-
/** Trade amount in USD */
|
|
1709
|
-
amount_usd: number;
|
|
1710
|
-
/** Block number */
|
|
1711
|
-
block_number: number;
|
|
1712
|
-
/** Trade Unix timestamp in seconds */
|
|
1713
|
-
block_time: number;
|
|
1714
|
-
/** Market condition identifier */
|
|
1715
|
-
condition_id: string;
|
|
1716
|
-
/** Event log index */
|
|
1717
|
-
evt_index: number;
|
|
1718
|
-
/** Exchange contract address */
|
|
1719
|
-
exchange_address: string;
|
|
1720
|
-
/** Fee amount in USD */
|
|
1721
|
-
fee_usd: number;
|
|
1722
|
-
/** Maker wallet address */
|
|
1723
|
-
maker_address: string;
|
|
1724
|
-
/** Whether this is a negative risk trade */
|
|
1725
|
-
neg_risk: boolean;
|
|
1726
|
-
/** Outcome label such as `Yes` or `No` */
|
|
1727
|
-
outcome_label: string;
|
|
1728
|
-
/** Outcome token identifier */
|
|
1729
|
-
outcome_token_id: string;
|
|
1730
|
-
/** Trade price (0-1) */
|
|
1731
|
-
price: number;
|
|
1732
|
-
/** Market question text */
|
|
1733
|
-
question: string;
|
|
1734
|
-
/** Number of shares traded */
|
|
1735
|
-
shares: number;
|
|
1736
|
-
/** Taker wallet address */
|
|
1737
|
-
taker_address: string;
|
|
1738
|
-
/** Transaction hash */
|
|
1739
|
-
tx_hash: string;
|
|
1740
1773
|
}
|
|
1741
1774
|
interface PolymarketTradesParams {
|
|
1742
1775
|
/** Market condition identifier */
|
|
1743
1776
|
condition_id?: string;
|
|
1744
1777
|
/** Wallet address — returns trades where the address is maker or taker */
|
|
1745
1778
|
address?: string;
|
|
1779
|
+
/** Filter by activity type: `trade` (default, spot trades only), `redemption` (splits/merges/redemptions), or `all` (all activity). Use `redemption` or `all` to get non-trade wallet activity; `address` is required for these types. — @default 'trade' */
|
|
1780
|
+
type?: 'trade' | 'redemption' | 'all';
|
|
1746
1781
|
/** Filter by outcome label: `Yes` or `No` */
|
|
1747
1782
|
outcome_label?: 'Yes' | 'No';
|
|
1748
1783
|
/** Minimum trade amount in USD */
|
|
@@ -1758,21 +1793,43 @@ interface PolymarketTradesParams {
|
|
|
1758
1793
|
/** Pagination offset — @default '0' */
|
|
1759
1794
|
offset?: number;
|
|
1760
1795
|
}
|
|
1796
|
+
interface PolymarketVolumeSplitItem {
|
|
1797
|
+
}
|
|
1798
|
+
interface PolymarketVolumeSplitParams {
|
|
1799
|
+
/** Time granularity for volume aggregation — @default 'hour' */
|
|
1800
|
+
granularity?: 'hour' | 'day' | 'week';
|
|
1801
|
+
/** Start time (Unix seconds). 0 means no lower bound. */
|
|
1802
|
+
start_time?: number;
|
|
1803
|
+
/** End time (Unix seconds). 0 means current time. */
|
|
1804
|
+
end_time?: number;
|
|
1805
|
+
}
|
|
1761
1806
|
interface PolymarketVolumesItem {
|
|
1807
|
+
/** Buy-side volume (USD), available when using granularity param */
|
|
1808
|
+
buy_volume?: number;
|
|
1762
1809
|
/** Notional trading volume in USD */
|
|
1763
1810
|
notional_volume_usd: number;
|
|
1811
|
+
/** Sell-side volume (USD), available when using granularity param */
|
|
1812
|
+
sell_volume?: number;
|
|
1764
1813
|
/** Interval start Unix timestamp in seconds */
|
|
1765
1814
|
timestamp: number;
|
|
1766
1815
|
/** Number of trades */
|
|
1767
1816
|
trade_count: number;
|
|
1768
1817
|
}
|
|
1769
1818
|
interface PolymarketVolumesParams {
|
|
1770
|
-
/** Market condition identifier */
|
|
1771
|
-
condition_id
|
|
1819
|
+
/** Market condition identifier (required if token_id not provided) */
|
|
1820
|
+
condition_id?: string;
|
|
1821
|
+
/** Token ID (alternative identifier, resolved to condition_id internally) */
|
|
1822
|
+
token_id?: string;
|
|
1772
1823
|
/** Predefined time range — @default '30d' */
|
|
1773
1824
|
time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
|
|
1774
1825
|
/** Aggregation interval: `1h` (hourly) or `1d` (daily) — @default '1d' */
|
|
1775
1826
|
interval?: '1h' | '1d';
|
|
1827
|
+
/** Aggregation granularity (alternative to interval). When provided, queries daily table with buy/sell volume breakdown. */
|
|
1828
|
+
granularity?: 'day' | 'week' | 'month' | 'year' | 'all';
|
|
1829
|
+
/** Start time as Unix seconds (alternative to time_range) */
|
|
1830
|
+
start_time?: number;
|
|
1831
|
+
/** End time as Unix seconds (alternative to time_range) */
|
|
1832
|
+
end_time?: number;
|
|
1776
1833
|
}
|
|
1777
1834
|
interface ProjectDefiMetricsItem {
|
|
1778
1835
|
/** Unix timestamp in seconds for this data point */
|
|
@@ -2346,6 +2403,66 @@ interface SearchPolymarketParams {
|
|
|
2346
2403
|
/** Pagination offset — @default '0' */
|
|
2347
2404
|
offset?: number;
|
|
2348
2405
|
}
|
|
2406
|
+
interface SearchPredictionMarketItem {
|
|
2407
|
+
/** Surf-curated category */
|
|
2408
|
+
category: string;
|
|
2409
|
+
/** Polymarket condition ID */
|
|
2410
|
+
condition_id?: string;
|
|
2411
|
+
/** Days until market end date */
|
|
2412
|
+
days_to_resolution?: number;
|
|
2413
|
+
/** YES-side probability (0-1) from realtime price store */
|
|
2414
|
+
latest_price?: number;
|
|
2415
|
+
/** Direct link to market */
|
|
2416
|
+
market_link?: string;
|
|
2417
|
+
/** Kalshi market ticker */
|
|
2418
|
+
market_ticker?: string;
|
|
2419
|
+
/** Matching market ID on the other platform */
|
|
2420
|
+
matched_counterpart?: string;
|
|
2421
|
+
/** Current open interest (USD) */
|
|
2422
|
+
open_interest_usd: number;
|
|
2423
|
+
/** polymarket or kalshi */
|
|
2424
|
+
platform: string;
|
|
2425
|
+
/** Market question text */
|
|
2426
|
+
question: string;
|
|
2427
|
+
/** BULLISH, BEARISH, or NEUTRAL (Polymarket only) */
|
|
2428
|
+
smart_money_direction?: string;
|
|
2429
|
+
/** Market status */
|
|
2430
|
+
status: string;
|
|
2431
|
+
/** Surf-curated subcategory */
|
|
2432
|
+
subcategory?: string;
|
|
2433
|
+
/** Number of trades last 7 days */
|
|
2434
|
+
trade_count_7d: number;
|
|
2435
|
+
/** Notional volume last 24h (USD) */
|
|
2436
|
+
volume_1d: number;
|
|
2437
|
+
/** Notional volume last 30 days (USD) */
|
|
2438
|
+
volume_30d: number;
|
|
2439
|
+
/** Notional volume last 7 days (USD) */
|
|
2440
|
+
volume_7d: number;
|
|
2441
|
+
}
|
|
2442
|
+
interface SearchPredictionMarketParams {
|
|
2443
|
+
/** Polymarket condition ID for single-market lookup */
|
|
2444
|
+
condition_id?: string;
|
|
2445
|
+
/** Kalshi market ticker for single-market lookup */
|
|
2446
|
+
market_ticker?: string;
|
|
2447
|
+
/** Filter by platform (omit for both) */
|
|
2448
|
+
platform?: 'polymarket' | 'kalshi';
|
|
2449
|
+
/** Filter by Surf-curated category */
|
|
2450
|
+
category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports';
|
|
2451
|
+
/** Market status filter — @default 'active' */
|
|
2452
|
+
status?: 'active' | 'closed' | 'finalized';
|
|
2453
|
+
/** Sort field — @default 'volume_7d' */
|
|
2454
|
+
sort_by?: 'volume_1d' | 'volume_7d' | 'volume_30d' | 'open_interest' | 'trade_count_7d' | 'days_to_resolution';
|
|
2455
|
+
/** Sort direction — @default 'desc' */
|
|
2456
|
+
order?: 'asc' | 'desc';
|
|
2457
|
+
/** Filter by smart money direction (Polymarket only) */
|
|
2458
|
+
smart_money?: 'bullish' | 'bearish';
|
|
2459
|
+
/** Search markets by keyword in question/title */
|
|
2460
|
+
q?: string;
|
|
2461
|
+
/** Results per page — @default '20' */
|
|
2462
|
+
limit?: number;
|
|
2463
|
+
/** Pagination offset — @default '0' */
|
|
2464
|
+
offset?: number;
|
|
2465
|
+
}
|
|
2349
2466
|
interface SearchProjectItem {
|
|
2350
2467
|
/** Chains the project operates on */
|
|
2351
2468
|
chains?: unknown;
|
|
@@ -3391,64 +3508,6 @@ interface WebFetchParams {
|
|
|
3391
3508
|
/** Request timeout in milliseconds — @default '30000' */
|
|
3392
3509
|
timeout?: number;
|
|
3393
3510
|
}
|
|
3394
|
-
interface V2KalshiOrderbooksItem {
|
|
3395
|
-
}
|
|
3396
|
-
interface V2KalshiOrderbooksParams {
|
|
3397
|
-
/** Kalshi market ticker */
|
|
3398
|
-
ticker: string;
|
|
3399
|
-
/** Start time in Unix milliseconds. 0 means 7 days ago. */
|
|
3400
|
-
start_time?: number;
|
|
3401
|
-
/** End time in Unix milliseconds. 0 means current time. */
|
|
3402
|
-
end_time?: number;
|
|
3403
|
-
/** Maximum number of snapshots to return — @default '100' */
|
|
3404
|
-
limit?: number;
|
|
3405
|
-
/** Base64 cursor for pagination */
|
|
3406
|
-
pagination_key?: string;
|
|
3407
|
-
}
|
|
3408
|
-
interface V2PolymarketCandlesticksItem {
|
|
3409
|
-
}
|
|
3410
|
-
interface V2PolymarketCandlesticksParams {
|
|
3411
|
-
/** Start time (Unix seconds). 0 means no lower bound. */
|
|
3412
|
-
start_time?: number;
|
|
3413
|
-
/** End time (Unix seconds). 0 means current time. */
|
|
3414
|
-
end_time?: number;
|
|
3415
|
-
/** Candle interval in minutes: 1=1min, 60=1hour, 1440=1day — @default '60' */
|
|
3416
|
-
interval?: number;
|
|
3417
|
-
}
|
|
3418
|
-
interface V2PolymarketVolumeTimeseriesItem {
|
|
3419
|
-
}
|
|
3420
|
-
interface V2PolymarketVolumeTimeseriesParams {
|
|
3421
|
-
/** Time granularity for aggregation — @default 'day' */
|
|
3422
|
-
granularity?: 'day' | 'week' | 'month' | 'year' | 'all';
|
|
3423
|
-
/** Start time (Unix seconds). 0 means no lower bound. */
|
|
3424
|
-
start_time?: number;
|
|
3425
|
-
/** End time (Unix seconds). 0 means current time. */
|
|
3426
|
-
end_time?: number;
|
|
3427
|
-
}
|
|
3428
|
-
interface V2PolymarketOrderbooksItem {
|
|
3429
|
-
}
|
|
3430
|
-
interface V2PolymarketOrderbooksParams {
|
|
3431
|
-
/** Token identifier */
|
|
3432
|
-
token_id: string;
|
|
3433
|
-
/** Start time in Unix milliseconds. 0 means 7 days ago. */
|
|
3434
|
-
start_time?: number;
|
|
3435
|
-
/** End time in Unix milliseconds. 0 means current time. */
|
|
3436
|
-
end_time?: number;
|
|
3437
|
-
/** Maximum number of snapshots to return — @default '100' */
|
|
3438
|
-
limit?: number;
|
|
3439
|
-
/** Base64 cursor for pagination */
|
|
3440
|
-
pagination_key?: string;
|
|
3441
|
-
}
|
|
3442
|
-
interface V2PolymarketVolumeChartItem {
|
|
3443
|
-
}
|
|
3444
|
-
interface V2PolymarketVolumeChartParams {
|
|
3445
|
-
/** Time granularity for volume aggregation — @default 'hour' */
|
|
3446
|
-
granularity?: 'hour' | 'day' | 'week';
|
|
3447
|
-
/** Start time (Unix seconds). 0 means no lower bound. */
|
|
3448
|
-
start_time?: number;
|
|
3449
|
-
/** End time (Unix seconds). 0 means current time. */
|
|
3450
|
-
end_time?: number;
|
|
3451
|
-
}
|
|
3452
3511
|
|
|
3453
3512
|
/**
|
|
3454
3513
|
* 1.0 data API client.
|
|
@@ -3485,11 +3544,11 @@ declare const dataApi: {
|
|
|
3485
3544
|
ranking: (params: FundRankingParams) => Promise<ApiResponse<FundRankingItem>>;
|
|
3486
3545
|
};
|
|
3487
3546
|
kalshi: {
|
|
3488
|
-
events: (params
|
|
3489
|
-
markets: (params
|
|
3547
|
+
events: (params?: KalshiEventsParams) => Promise<ApiResponse<KalshiEventsItem>>;
|
|
3548
|
+
markets: (params?: KalshiMarketsParams) => Promise<ApiResponse<KalshiMarketsItem>>;
|
|
3490
3549
|
open_interest: (params: KalshiOpenInterestParams) => Promise<ApiResponse<KalshiOpenInterestItem>>;
|
|
3550
|
+
orderbooks: (params: KalshiOrderbooksParams) => Promise<ApiResponse<KalshiOrderbooksItem>>;
|
|
3491
3551
|
prices: (params: KalshiPricesParams) => Promise<ApiResponse<KalshiPricesItem>>;
|
|
3492
|
-
ranking: (params?: KalshiRankingParams) => Promise<ApiResponse<KalshiRankingItem>>;
|
|
3493
3552
|
trades: (params: KalshiTradesParams) => Promise<ApiResponse<KalshiTradesItem>>;
|
|
3494
3553
|
volumes: (params: KalshiVolumesParams) => Promise<ApiResponse<KalshiVolumesItem>>;
|
|
3495
3554
|
};
|
|
@@ -3508,7 +3567,6 @@ declare const dataApi: {
|
|
|
3508
3567
|
};
|
|
3509
3568
|
matching: {
|
|
3510
3569
|
market_daily: (params: MatchingMarketDailyParams) => Promise<ApiResponse<MatchingMarketDailyItem>>;
|
|
3511
|
-
market_find: (params?: MatchingMarketFindParams) => Promise<ApiResponse<MatchingMarketFindItem>>;
|
|
3512
3570
|
market_pairs: (params?: MatchingMarketPairsParams) => Promise<ApiResponse<MatchingMarketPairsItem>>;
|
|
3513
3571
|
};
|
|
3514
3572
|
news: {
|
|
@@ -3525,18 +3583,22 @@ declare const dataApi: {
|
|
|
3525
3583
|
yield_ranking: (params?: OnchainYieldRankingParams) => Promise<ApiResponse<OnchainYieldRankingItem>>;
|
|
3526
3584
|
};
|
|
3527
3585
|
polymarket: {
|
|
3528
|
-
activity: (params: PolymarketActivityParams) => Promise<ApiResponse<PolymarketActivityItem>>;
|
|
3529
3586
|
events: (params: PolymarketEventsParams) => Promise<ApiResponse<PolymarketEventsItem>>;
|
|
3587
|
+
leaderboard: (params?: PolymarketLeaderboardParams) => Promise<ApiResponse<PolymarketLeaderboardItem>>;
|
|
3530
3588
|
markets: (params: PolymarketMarketsParams) => Promise<ApiResponse<PolymarketMarketsItem>>;
|
|
3531
3589
|
open_interest: (params: PolymarketOpenInterestParams) => Promise<ApiResponse<PolymarketOpenInterestItem>>;
|
|
3590
|
+
orderbooks: (params: PolymarketOrderbooksParams) => Promise<ApiResponse<PolymarketOrderbooksItem>>;
|
|
3532
3591
|
positions: (params: PolymarketPositionsParams) => Promise<ApiResponse<PolymarketPositionsItem>>;
|
|
3592
|
+
price_ohlcv: (params?: PolymarketPriceOhlcvParams) => Promise<ApiResponse<PolymarketPriceOhlcvItem>>;
|
|
3533
3593
|
prices: (params: PolymarketPricesParams) => Promise<ApiResponse<PolymarketPricesItem>>;
|
|
3534
|
-
|
|
3594
|
+
smart_money: (params?: PolymarketSmartMoneyParams) => Promise<ApiResponse<PolymarketSmartMoneyItem>>;
|
|
3535
3595
|
trades: (params?: PolymarketTradesParams) => Promise<ApiResponse<PolymarketTradesItem>>;
|
|
3536
|
-
|
|
3596
|
+
volume_split: (params?: PolymarketVolumeSplitParams) => Promise<ApiResponse<PolymarketVolumeSplitItem>>;
|
|
3597
|
+
volumes: (params?: PolymarketVolumesParams) => Promise<ApiResponse<PolymarketVolumesItem>>;
|
|
3537
3598
|
};
|
|
3538
3599
|
prediction_market: {
|
|
3539
|
-
|
|
3600
|
+
analytics: (params?: PredictionMarketAnalyticsParams) => Promise<ApiObjectResponse<PredictionMarketAnalyticsData>>;
|
|
3601
|
+
correlations: (params: PredictionMarketCorrelationsParams) => Promise<ApiResponse<PredictionMarketCorrelationsItem>>;
|
|
3540
3602
|
};
|
|
3541
3603
|
project: {
|
|
3542
3604
|
defi_metrics: (params: ProjectDefiMetricsParams) => Promise<ApiResponse<ProjectDefiMetricsItem>>;
|
|
@@ -3550,6 +3612,7 @@ declare const dataApi: {
|
|
|
3550
3612
|
kalshi: (params?: SearchKalshiParams) => Promise<ApiResponse<SearchKalshiItem>>;
|
|
3551
3613
|
news: (params: SearchNewsParams) => Promise<ApiResponse<SearchNewsItem>>;
|
|
3552
3614
|
polymarket: (params?: SearchPolymarketParams) => Promise<ApiResponse<SearchPolymarketItem>>;
|
|
3615
|
+
prediction_market: (params?: SearchPredictionMarketParams) => Promise<ApiResponse<SearchPredictionMarketItem>>;
|
|
3553
3616
|
project: (params: SearchProjectParams) => Promise<ApiResponse<SearchProjectItem>>;
|
|
3554
3617
|
social_people: (params: SearchSocialPeopleParams) => Promise<ApiCursorResponse<SearchSocialPeopleItem>>;
|
|
3555
3618
|
social_posts: (params: SearchSocialPostsParams) => Promise<ApiCursorResponse<SearchSocialPostsItem>>;
|
|
@@ -3575,13 +3638,6 @@ declare const dataApi: {
|
|
|
3575
3638
|
tokenomics: (params?: TokenTokenomicsParams) => Promise<ApiResponse<TokenTokenomicsItem>>;
|
|
3576
3639
|
transfers: (params: TokenTransfersParams) => Promise<ApiResponse<TokenTransfersItem>>;
|
|
3577
3640
|
};
|
|
3578
|
-
v2: {
|
|
3579
|
-
kalshi_orderbooks: (params: V2KalshiOrderbooksParams) => Promise<ApiResponse<V2KalshiOrderbooksItem>>;
|
|
3580
|
-
polymarket_candlesticks: (params?: V2PolymarketCandlesticksParams) => Promise<ApiResponse<V2PolymarketCandlesticksItem>>;
|
|
3581
|
-
polymarket_volume_timeseries: (params?: V2PolymarketVolumeTimeseriesParams) => Promise<ApiResponse<V2PolymarketVolumeTimeseriesItem>>;
|
|
3582
|
-
polymarket_orderbooks: (params: V2PolymarketOrderbooksParams) => Promise<ApiResponse<V2PolymarketOrderbooksItem>>;
|
|
3583
|
-
polymarket_volume_chart: (params?: V2PolymarketVolumeChartParams) => Promise<ApiResponse<V2PolymarketVolumeChartItem>>;
|
|
3584
|
-
};
|
|
3585
3641
|
wallet: {
|
|
3586
3642
|
detail: (params: WalletDetailParams) => Promise<ApiObjectResponse<WalletDetailData>>;
|
|
3587
3643
|
history: (params: WalletHistoryParams) => Promise<ApiResponse<WalletHistoryItem>>;
|