@0xinsider/sdk 0.31.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -8
- package/dist/client.d.ts +271 -151
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +295 -145
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +6 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +13 -5
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/pagination.d.ts +3 -3
- package/dist/pagination.js +2 -2
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +3 -3
- package/dist/provenance.js.map +1 -1
- package/dist/schema.d.ts +1501 -211
- package/dist/schema.d.ts.map +1 -1
- package/dist/webhooks.d.ts +8 -60
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js.map +1 -1
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -30,7 +30,9 @@ import { RETRY_AFTER_CEILING_MS, retryAfterSeconds, sleepUnlessAborted, } from "
|
|
|
30
30
|
* `scripts/check-sdk-openapi-drift.mjs`, which also checks every row's kind
|
|
31
31
|
* against the spec. Do not add a row without a matching spec operation, and
|
|
32
32
|
* do not remove a spec operation without removing its row. A redirect-only
|
|
33
|
-
* operation belongs in `REDIRECT_OPERATIONS` below, not here
|
|
33
|
+
* operation belongs in `REDIRECT_OPERATIONS` below, not here, and a
|
|
34
|
+
* deprecated alias this client no longer wraps belongs in
|
|
35
|
+
* `UNSUPPORTED_OPERATIONS` (#29350).
|
|
34
36
|
*/
|
|
35
37
|
export const API_CLIENT_OPERATIONS = [
|
|
36
38
|
{
|
|
@@ -159,6 +161,30 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
159
161
|
operationId: "listTrendingWallets",
|
|
160
162
|
auth: "bearer",
|
|
161
163
|
},
|
|
164
|
+
{
|
|
165
|
+
method: "GET",
|
|
166
|
+
path: "/api/v1/leaderboard/leagues",
|
|
167
|
+
operationId: "listLeaderboardLeagues",
|
|
168
|
+
auth: "bearer",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
method: "GET",
|
|
172
|
+
path: "/api/v1/leaderboard/sports/{sport}",
|
|
173
|
+
operationId: "getSportLeaderboard",
|
|
174
|
+
auth: "bearer",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
method: "GET",
|
|
178
|
+
path: "/api/v1/leaderboard/categories",
|
|
179
|
+
operationId: "listCategoryLeaders",
|
|
180
|
+
auth: "bearer",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: "/api/v1/leaderboard/categories/{slug}",
|
|
185
|
+
operationId: "getCategoryLeaderboard",
|
|
186
|
+
auth: "bearer",
|
|
187
|
+
},
|
|
162
188
|
{
|
|
163
189
|
method: "GET",
|
|
164
190
|
path: "/api/v1/edge-hunter",
|
|
@@ -179,56 +205,56 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
179
205
|
},
|
|
180
206
|
{
|
|
181
207
|
method: "GET",
|
|
182
|
-
path: "/api/v1/
|
|
183
|
-
operationId: "
|
|
208
|
+
path: "/api/v1/games/{event_slug}/markets",
|
|
209
|
+
operationId: "listGameMarkets",
|
|
184
210
|
auth: "bearer",
|
|
185
211
|
},
|
|
186
212
|
{
|
|
187
213
|
method: "GET",
|
|
188
|
-
path: "/api/v1/
|
|
189
|
-
operationId: "
|
|
214
|
+
path: "/api/v1/games/{event_slug}/sharp-money",
|
|
215
|
+
operationId: "getGameSharpMoney",
|
|
190
216
|
auth: "bearer",
|
|
191
217
|
},
|
|
192
218
|
{
|
|
193
219
|
method: "GET",
|
|
194
|
-
path: "/api/v1/
|
|
195
|
-
operationId: "
|
|
220
|
+
path: "/api/v1/games/{event_slug}/trades",
|
|
221
|
+
operationId: "listGameTrades",
|
|
196
222
|
auth: "bearer",
|
|
197
223
|
},
|
|
198
224
|
{
|
|
199
225
|
method: "GET",
|
|
200
|
-
path: "/api/v1/
|
|
201
|
-
operationId: "
|
|
226
|
+
path: "/api/v1/games/{event_slug}/holders",
|
|
227
|
+
operationId: "getGameHolders",
|
|
202
228
|
auth: "bearer",
|
|
203
229
|
},
|
|
204
230
|
{
|
|
205
231
|
method: "GET",
|
|
206
|
-
path: "/api/v1/large-trades
|
|
207
|
-
operationId: "
|
|
232
|
+
path: "/api/v1/large-trades",
|
|
233
|
+
operationId: "listLargeTrades",
|
|
208
234
|
auth: "bearer",
|
|
209
235
|
},
|
|
210
236
|
{
|
|
211
237
|
method: "GET",
|
|
212
|
-
path: "/api/v1/
|
|
213
|
-
operationId: "
|
|
238
|
+
path: "/api/v1/large-trades/history",
|
|
239
|
+
operationId: "listLargeTradeHistory",
|
|
214
240
|
auth: "bearer",
|
|
215
241
|
},
|
|
216
242
|
{
|
|
217
243
|
method: "GET",
|
|
218
|
-
path: "/api/v1/
|
|
219
|
-
operationId: "
|
|
244
|
+
path: "/api/v1/large-trades/{id}/counterparties/executions",
|
|
245
|
+
operationId: "listLargeTradeCounterpartyExecutions",
|
|
220
246
|
auth: "bearer",
|
|
221
247
|
},
|
|
222
248
|
{
|
|
223
249
|
method: "GET",
|
|
224
|
-
path: "/api/v1/
|
|
225
|
-
operationId: "
|
|
250
|
+
path: "/api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers",
|
|
251
|
+
operationId: "listLargeTradeCounterpartyMakers",
|
|
226
252
|
auth: "bearer",
|
|
227
253
|
},
|
|
228
254
|
{
|
|
229
255
|
method: "GET",
|
|
230
|
-
path: "/api/v1/
|
|
231
|
-
operationId: "
|
|
256
|
+
path: "/api/v1/large-trades/{id}",
|
|
257
|
+
operationId: "getLargeTrade",
|
|
232
258
|
auth: "bearer",
|
|
233
259
|
},
|
|
234
260
|
{
|
|
@@ -237,12 +263,6 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
237
263
|
operationId: "searchContent",
|
|
238
264
|
auth: "bearer",
|
|
239
265
|
},
|
|
240
|
-
{
|
|
241
|
-
method: "GET",
|
|
242
|
-
path: "/api/v1/whale-trades/{id}",
|
|
243
|
-
operationId: "getWhaleTrade",
|
|
244
|
-
auth: "bearer",
|
|
245
|
-
},
|
|
246
266
|
{
|
|
247
267
|
method: "GET",
|
|
248
268
|
path: "/api/v1/leaderboard",
|
|
@@ -261,12 +281,6 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
261
281
|
operationId: "exploreMarkets",
|
|
262
282
|
auth: "bearer",
|
|
263
283
|
},
|
|
264
|
-
{
|
|
265
|
-
method: "GET",
|
|
266
|
-
path: "/api/v1/markets/smart-money-flows",
|
|
267
|
-
operationId: "listSmartMoneyFlows",
|
|
268
|
-
auth: "bearer",
|
|
269
|
-
},
|
|
270
284
|
{
|
|
271
285
|
method: "GET",
|
|
272
286
|
path: "/api/v1/markets/sharp-money-flows",
|
|
@@ -279,12 +293,6 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
279
293
|
operationId: "getCoverage",
|
|
280
294
|
auth: "none",
|
|
281
295
|
},
|
|
282
|
-
{
|
|
283
|
-
method: "GET",
|
|
284
|
-
path: "/api/v1/platforms",
|
|
285
|
-
operationId: "getPlatforms",
|
|
286
|
-
auth: "none",
|
|
287
|
-
},
|
|
288
296
|
{
|
|
289
297
|
method: "GET",
|
|
290
298
|
path: "/api/v1/market/{condition_id}/holders",
|
|
@@ -293,14 +301,14 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
293
301
|
},
|
|
294
302
|
{
|
|
295
303
|
method: "GET",
|
|
296
|
-
path: "/api/v1/market/{condition_id}/
|
|
297
|
-
operationId: "
|
|
304
|
+
path: "/api/v1/market/{condition_id}/top-holders",
|
|
305
|
+
operationId: "getMarketTopHolders",
|
|
298
306
|
auth: "bearer",
|
|
299
307
|
},
|
|
300
308
|
{
|
|
301
309
|
method: "GET",
|
|
302
|
-
path: "/api/v1/market/{condition_id}/
|
|
303
|
-
operationId: "
|
|
310
|
+
path: "/api/v1/market/{condition_id}/flow",
|
|
311
|
+
operationId: "getMarketFlow",
|
|
304
312
|
auth: "bearer",
|
|
305
313
|
},
|
|
306
314
|
{
|
|
@@ -309,12 +317,6 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
309
317
|
operationId: "batchGetMarketFlow",
|
|
310
318
|
auth: "bearer",
|
|
311
319
|
},
|
|
312
|
-
{
|
|
313
|
-
method: "POST",
|
|
314
|
-
path: "/api/v1/markets/intel/batch",
|
|
315
|
-
operationId: "batchGetMarketIntel",
|
|
316
|
-
auth: "bearer",
|
|
317
|
-
},
|
|
318
320
|
{
|
|
319
321
|
method: "GET",
|
|
320
322
|
path: "/api/v1/market/{condition_id}/snapshot",
|
|
@@ -336,30 +338,20 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
336
338
|
},
|
|
337
339
|
{
|
|
338
340
|
method: "GET",
|
|
339
|
-
path: "/api/v1/
|
|
340
|
-
operationId: "
|
|
341
|
-
auth: "bearer",
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
method: "GET",
|
|
345
|
-
path: "/api/v1/suspicious-trades/{id}",
|
|
346
|
-
operationId: "getSuspiciousTrade",
|
|
341
|
+
path: "/api/v1/market/{condition_id}/wallets-in-out",
|
|
342
|
+
operationId: "getMarketWalletsInOut",
|
|
347
343
|
auth: "bearer",
|
|
348
344
|
},
|
|
349
|
-
// Deprecated aliases (#16301). Both paths stay live with no retirement
|
|
350
|
-
// date; responses carry Deprecation and a Link rel="successor-version".
|
|
351
|
-
// `/api/v1/insider-radar/{id}` also keeps answering `object: "radar_flag"`,
|
|
352
|
-
// so these entries are what an existing integration must keep exercising.
|
|
353
345
|
{
|
|
354
346
|
method: "GET",
|
|
355
|
-
path: "/api/v1/
|
|
356
|
-
operationId: "
|
|
347
|
+
path: "/api/v1/suspicious-trades",
|
|
348
|
+
operationId: "listSuspiciousTrades",
|
|
357
349
|
auth: "bearer",
|
|
358
350
|
},
|
|
359
351
|
{
|
|
360
352
|
method: "GET",
|
|
361
|
-
path: "/api/v1/
|
|
362
|
-
operationId: "
|
|
353
|
+
path: "/api/v1/suspicious-trades/{id}",
|
|
354
|
+
operationId: "getSuspiciousTrade",
|
|
363
355
|
auth: "bearer",
|
|
364
356
|
},
|
|
365
357
|
{
|
|
@@ -502,6 +494,12 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
502
494
|
operationId: "getMonthlyReportSnapshot",
|
|
503
495
|
auth: "bearer",
|
|
504
496
|
},
|
|
497
|
+
{
|
|
498
|
+
method: "GET",
|
|
499
|
+
path: "/api/v1/reports/resolutions",
|
|
500
|
+
operationId: "getResolutionReport",
|
|
501
|
+
auth: "bearer",
|
|
502
|
+
},
|
|
505
503
|
{
|
|
506
504
|
method: "GET",
|
|
507
505
|
path: "/api/v1/trader/{address}/export",
|
|
@@ -526,6 +524,12 @@ export const API_CLIENT_OPERATIONS = [
|
|
|
526
524
|
operationId: "getPickOfTheDayArchive",
|
|
527
525
|
auth: "bearer",
|
|
528
526
|
},
|
|
527
|
+
{
|
|
528
|
+
method: "GET",
|
|
529
|
+
path: "/api/v1/pick-of-the-day/stats",
|
|
530
|
+
operationId: "getPickOfTheDayStats",
|
|
531
|
+
auth: "bearer",
|
|
532
|
+
},
|
|
529
533
|
{
|
|
530
534
|
method: "GET",
|
|
531
535
|
path: "/api/v1/pick-of-the-day/ledger",
|
|
@@ -578,9 +582,78 @@ export const REDIRECT_OPERATIONS = [
|
|
|
578
582
|
/**
|
|
579
583
|
* Published operations this client deliberately does not wrap, with the
|
|
580
584
|
* reason. The drift check requires every remaining spec operation to be
|
|
581
|
-
* accounted for here, so "unsupported" is always a stated decision.
|
|
585
|
+
* accounted for here, so "unsupported" is always a stated decision. An
|
|
586
|
+
* operation that still answers 200 may appear here only while the spec marks
|
|
587
|
+
* it `deprecated`: 0.32.0 dropped the September rename aliases (#29350), whose
|
|
588
|
+
* paths stay live until their 2027-02-01 sunset (#29351).
|
|
582
589
|
*/
|
|
583
590
|
export const UNSUPPORTED_OPERATIONS = [
|
|
591
|
+
{
|
|
592
|
+
method: "GET",
|
|
593
|
+
path: "/api/v1/whale-trades",
|
|
594
|
+
operationId: "listWhaleTrades",
|
|
595
|
+
reason: "Deprecated alias (#16304), sunset 2027-02-01: use listLargeTrades().",
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
method: "GET",
|
|
599
|
+
path: "/api/v1/whale-trades/history",
|
|
600
|
+
operationId: "listWhaleTradeHistory",
|
|
601
|
+
reason: "Deprecated alias (#16304), sunset 2027-02-01: use listLargeTradeHistory().",
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
method: "GET",
|
|
605
|
+
path: "/api/v1/whale-trades/{id}",
|
|
606
|
+
operationId: "getWhaleTrade",
|
|
607
|
+
reason: "Deprecated alias (#16304), sunset 2027-02-01: use getLargeTrade().",
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
method: "GET",
|
|
611
|
+
path: "/api/v1/whale-trades/{id}/counterparties/executions",
|
|
612
|
+
operationId: "listWhaleTradeCounterpartyExecutions",
|
|
613
|
+
reason: 'Deprecated alias (#16304), sunset 2027-02-01: use call("listLargeTradeCounterpartyExecutions").',
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
method: "GET",
|
|
617
|
+
path: "/api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers",
|
|
618
|
+
operationId: "listWhaleTradeCounterpartyMakers",
|
|
619
|
+
reason: 'Deprecated alias (#16304), sunset 2027-02-01: use call("listLargeTradeCounterpartyMakers").',
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
method: "GET",
|
|
623
|
+
path: "/api/v1/markets/smart-money-flows",
|
|
624
|
+
operationId: "listSmartMoneyFlows",
|
|
625
|
+
reason: "Deprecated alias (#16308), sunset 2027-02-01: use listSharpMoneyFlows().",
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
method: "GET",
|
|
629
|
+
path: "/api/v1/platforms",
|
|
630
|
+
operationId: "getPlatforms",
|
|
631
|
+
reason: "Deprecated alias (#16315), sunset 2027-02-01: use getCoverage().",
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
method: "GET",
|
|
635
|
+
path: "/api/v1/market/{condition_id}/intel",
|
|
636
|
+
operationId: "getMarketIntel",
|
|
637
|
+
reason: "Deprecated alias (#16312), sunset 2027-02-01: use getMarketFlow().",
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
method: "POST",
|
|
641
|
+
path: "/api/v1/markets/intel/batch",
|
|
642
|
+
operationId: "batchGetMarketIntel",
|
|
643
|
+
reason: "Deprecated alias (#16312), sunset 2027-02-01: use batchGetMarketFlow().",
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
method: "GET",
|
|
647
|
+
path: "/api/v1/insider-radar",
|
|
648
|
+
operationId: "listInsiderRadar",
|
|
649
|
+
reason: "Deprecated alias (#16301), sunset 2027-02-01: use listSuspiciousTrades().",
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
method: "GET",
|
|
653
|
+
path: "/api/v1/insider-radar/{id}",
|
|
654
|
+
operationId: "getInsiderRadarFlag",
|
|
655
|
+
reason: "Deprecated alias (#16301), sunset 2027-02-01: use getSuspiciousTrade().",
|
|
656
|
+
},
|
|
584
657
|
{
|
|
585
658
|
method: "GET",
|
|
586
659
|
path: "/api/v1/sports/pre-game-sides",
|
|
@@ -636,8 +709,7 @@ export const IDEMPOTENT_WRITE_OPERATIONS = [
|
|
|
636
709
|
];
|
|
637
710
|
/**
|
|
638
711
|
* POST operations that read and never write (#16182): the batch lookups.
|
|
639
|
-
* `POST /api/v1/traders/batch` and `POST /api/v1/markets/flow/batch`
|
|
640
|
-
* deprecated alias `POST /api/v1/markets/intel/batch`) resolve
|
|
712
|
+
* `POST /api/v1/traders/batch` and `POST /api/v1/markets/flow/batch` resolve
|
|
641
713
|
* their inputs and store nothing (`backend/src/api_v1/handlers/batch.rs`), so
|
|
642
714
|
* a repeat cannot duplicate a side effect. Each attempt is one request
|
|
643
715
|
* against the account's quota and one reservation of batch item units, which
|
|
@@ -647,7 +719,6 @@ export const IDEMPOTENT_WRITE_OPERATIONS = [
|
|
|
647
719
|
export const READ_ONLY_POST_OPERATIONS = [
|
|
648
720
|
"batchGetTraders",
|
|
649
721
|
"batchGetMarketFlow",
|
|
650
|
-
"batchGetMarketIntel",
|
|
651
722
|
];
|
|
652
723
|
/**
|
|
653
724
|
* Writes whose repeat converges on the state the first one reached, so a
|
|
@@ -1107,20 +1178,10 @@ function filenameFromDisposition(disposition) {
|
|
|
1107
1178
|
}
|
|
1108
1179
|
/** `GET /api/v1/leaderboard` -> parameters -> strategy (`web/public/api/v1/openapi.json`). */
|
|
1109
1180
|
export const LEADERBOARD_STRATEGIES = [
|
|
1110
|
-
"accumulator",
|
|
1111
|
-
"algo_trader",
|
|
1112
|
-
"arbitrageur",
|
|
1113
1181
|
"category_focused",
|
|
1114
|
-
"directional",
|
|
1115
1182
|
"diversified",
|
|
1116
|
-
"event_driven",
|
|
1117
1183
|
"high_activity",
|
|
1118
|
-
"market_maker",
|
|
1119
1184
|
"mixed",
|
|
1120
|
-
"momentum",
|
|
1121
|
-
"scalper",
|
|
1122
|
-
"speculator",
|
|
1123
|
-
"swing_trader",
|
|
1124
1185
|
"two_sided",
|
|
1125
1186
|
"unclassified",
|
|
1126
1187
|
];
|
|
@@ -1693,20 +1754,43 @@ export class OxinsiderApiClient {
|
|
|
1693
1754
|
batchGetMarketFlow(body, options = {}) {
|
|
1694
1755
|
return this.call("batchGetMarketFlow", { ...options, body });
|
|
1695
1756
|
}
|
|
1696
|
-
/**
|
|
1697
|
-
* @deprecated Use {@link batchGetMarketFlow} (#16312); calls the deprecated
|
|
1698
|
-
* `POST /api/v1/markets/intel/batch`, whose envelope keeps
|
|
1699
|
-
* `object: "market_intel_batch"`.
|
|
1700
|
-
*/
|
|
1701
|
-
batchGetMarketIntel(body, options = {}) {
|
|
1702
|
-
return this.call("batchGetMarketIntel", { ...options, body });
|
|
1703
|
-
}
|
|
1704
1757
|
listLeaderboard(params = {}, options = {}) {
|
|
1705
1758
|
return this.list("listLeaderboard", { ...options, query: params });
|
|
1706
1759
|
}
|
|
1707
1760
|
listTrendingWallets(params = {}, options = {}) {
|
|
1708
1761
|
return this.list("listTrendingWallets", { ...options, query: params });
|
|
1709
1762
|
}
|
|
1763
|
+
/** List the leagues that have their own skill leaderboard (single-object envelope). */
|
|
1764
|
+
listLeaderboardLeagues(options = {}) {
|
|
1765
|
+
return this.call("listLeaderboardLeagues", options);
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* Fetch one sport's skill leaderboard, or with `league` one league's
|
|
1769
|
+
* (single-object envelope). `sport` is a slug such as `soccer`; the leagues
|
|
1770
|
+
* come from {@link listLeaderboardLeagues}.
|
|
1771
|
+
*/
|
|
1772
|
+
getSportLeaderboard(sport, params = {}, options = {}) {
|
|
1773
|
+
return this.call("getSportLeaderboard", { ...options, path: { sport }, query: params });
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* Every sports and esports category's top three edge leaders, by category
|
|
1777
|
+
* and then rank (one list page, not paginated): the categories index on the
|
|
1778
|
+
* site. Same row shape as {@link getCategoryLeaderboard}.
|
|
1779
|
+
*/
|
|
1780
|
+
listCategoryLeaders(options = {}) {
|
|
1781
|
+
return this.list("listCategoryLeaders", options);
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* One page of a category's edge leaderboard: wallets ranked by the 95% lower
|
|
1785
|
+
* bound of their edge over the price they paid in the category. `slug` is a
|
|
1786
|
+
* category such as `soccer` or `esports`; `params.active_within` (`all` |
|
|
1787
|
+
* `7d` | `30d` | `90d`), `params.min_events`, `params.limit` and
|
|
1788
|
+
* `params.cursor` (the previous page's opaque `next_cursor`). `total` counts
|
|
1789
|
+
* the listed wallets across every page.
|
|
1790
|
+
*/
|
|
1791
|
+
getCategoryLeaderboard(slug, params = {}, options = {}) {
|
|
1792
|
+
return this.list("getCategoryLeaderboard", { ...options, path: { slug }, query: params });
|
|
1793
|
+
}
|
|
1710
1794
|
listLargeTrades(params = {}, options = {}) {
|
|
1711
1795
|
return this.list("listLargeTrades", { ...options, query: params });
|
|
1712
1796
|
}
|
|
@@ -1723,14 +1807,6 @@ export class OxinsiderApiClient {
|
|
|
1723
1807
|
listLargeTradeHistory(params = {}, options = {}) {
|
|
1724
1808
|
return this.list("listLargeTradeHistory", { ...options, query: params });
|
|
1725
1809
|
}
|
|
1726
|
-
/** @deprecated Use {@link listLargeTrades} (#16304); calls the deprecated `/api/v1/whale-trades`. */
|
|
1727
|
-
listWhaleTrades(params = {}, options = {}) {
|
|
1728
|
-
return this.list("listWhaleTrades", { ...options, query: params });
|
|
1729
|
-
}
|
|
1730
|
-
/** @deprecated Use {@link listLargeTradeHistory} (#16304); calls the deprecated `/api/v1/whale-trades/history`. */
|
|
1731
|
-
listWhaleTradeHistory(params = {}, options = {}) {
|
|
1732
|
-
return this.list("listWhaleTradeHistory", { ...options, query: params });
|
|
1733
|
-
}
|
|
1734
1810
|
listPositions(params = {}, options = {}) {
|
|
1735
1811
|
return this.list("listPositions", { ...options, query: params });
|
|
1736
1812
|
}
|
|
@@ -1744,19 +1820,15 @@ export class OxinsiderApiClient {
|
|
|
1744
1820
|
listSharpMoneyFlows(params = {}, options = {}) {
|
|
1745
1821
|
return this.list("listSharpMoneyFlows", { ...options, query: params });
|
|
1746
1822
|
}
|
|
1747
|
-
/**
|
|
1748
|
-
* @deprecated Use {@link listSharpMoneyFlows} (#16308). Kept live; it calls
|
|
1749
|
-
* the deprecated `/api/v1/markets/smart-money-flows`, whose responses carry
|
|
1750
|
-
* `Deprecation` and a `Link rel="successor-version"`.
|
|
1751
|
-
*/
|
|
1752
|
-
listSmartMoneyFlows(params = {}, options = {}) {
|
|
1753
|
-
return this.list("listSmartMoneyFlows", { ...options, query: params });
|
|
1754
|
-
}
|
|
1755
1823
|
/**
|
|
1756
1824
|
* List covered games: both sides with their provider ids and live scores, the
|
|
1757
|
-
* UTC kickoff, the provider's own status, and
|
|
1758
|
-
*
|
|
1759
|
-
* `
|
|
1825
|
+
* UTC kickoff, the provider's own status, and the winner markets (the
|
|
1826
|
+
* moneyline, or a soccer game's three 1X2 legs) with their condition ids and
|
|
1827
|
+
* outcome token ids; `listGameMarkets` lists the rest. Ordered by kickoff, then by
|
|
1828
|
+
* `event_slug`, with unscheduled games last. Pass `window: "now"` for what is
|
|
1829
|
+
* on now (games in play, plus any game whose kickoff was at most 3 hours ago
|
|
1830
|
+
* or is still to come); the default, `"all"`, is the whole catalog, which can
|
|
1831
|
+
* start with games weeks old. An unknown `sport` or `status`
|
|
1760
1832
|
* returns an empty page rather than an error, and the response's `coverage`
|
|
1761
1833
|
* names what this deployment serves.
|
|
1762
1834
|
*/
|
|
@@ -1770,6 +1842,73 @@ export class OxinsiderApiClient {
|
|
|
1770
1842
|
getGame(eventSlug, options = {}) {
|
|
1771
1843
|
return this.call("getGame", { ...options, path: { event_slug: eventSlug } });
|
|
1772
1844
|
}
|
|
1845
|
+
/**
|
|
1846
|
+
* List every stored market of one game's `event_slug` and of its child
|
|
1847
|
+
* events: spreads, totals, team totals, period lines and player props, each
|
|
1848
|
+
* with its `condition_id`, `sports_market_type`, typed `line` and outcome
|
|
1849
|
+
* token ids. `families` counts every market type the event holds.
|
|
1850
|
+
* `expand: ["sharp_money"]` adds each row's per-line sharp-money split.
|
|
1851
|
+
*/
|
|
1852
|
+
listGameMarkets(eventSlug, params = {}, options = {}) {
|
|
1853
|
+
return this.list("listGameMarkets", {
|
|
1854
|
+
...options,
|
|
1855
|
+
path: { event_slug: eventSlug },
|
|
1856
|
+
query: params,
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Read where the graded money sits on one whole game: S, A and B grade USD per
|
|
1861
|
+
* outcome summed across the game's markets, each outcome's share, the leader,
|
|
1862
|
+
* wallet counts by grade and the backend's verdict. Every aggregate field is
|
|
1863
|
+
* `null` unless `status` is `computed`. A game still computing answers 503
|
|
1864
|
+
* `read_model_warming` with `Retry-After`, which the client's retries honour.
|
|
1865
|
+
* Pro and Max.
|
|
1866
|
+
*/
|
|
1867
|
+
getGameSharpMoney(eventSlug, options = {}) {
|
|
1868
|
+
return this.call("getGameSharpMoney", { ...options, path: { event_slug: eventSlug } });
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* List a game's newest fills across every market in it, newest first and
|
|
1872
|
+
* live: the moneyline, spreads, totals and every prop. The list does not
|
|
1873
|
+
* page (`has_more` is always `false`); deduplicate on `id`. This method
|
|
1874
|
+
* throws on a 304, so poll with {@link listGameTradesConditional} and
|
|
1875
|
+
* `If-None-Match`; it returns the typed `not_modified` result instead.
|
|
1876
|
+
* `source_stale` is `true` while the game's refresh runs. A 503
|
|
1877
|
+
* `read_model_warming` means the first read is still running.
|
|
1878
|
+
*/
|
|
1879
|
+
listGameTrades(eventSlug, params = {}, options = {}) {
|
|
1880
|
+
return this.list("listGameTrades", {
|
|
1881
|
+
...options,
|
|
1882
|
+
path: { event_slug: eventSlug },
|
|
1883
|
+
query: params,
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1886
|
+
/**
|
|
1887
|
+
* Typed conditional-read variant of {@link listGameTrades}, for polling.
|
|
1888
|
+
* Returns the list envelope on 200 or the typed `not_modified` result on
|
|
1889
|
+
* 304, where {@link listGameTrades} throws on a 304. Send the last `ETag`
|
|
1890
|
+
* as the `If-None-Match` header in `options.headers`.
|
|
1891
|
+
*/
|
|
1892
|
+
listGameTradesConditional(eventSlug, params = {}, options = {}) {
|
|
1893
|
+
return this.call("listGameTrades", {
|
|
1894
|
+
...options,
|
|
1895
|
+
path: { event_slug: eventSlug },
|
|
1896
|
+
query: params,
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* The graded holders of up to 25 of one game's markets in one request
|
|
1901
|
+
* (`GET /api/v1/games/{event_slug}/holders`): each item is
|
|
1902
|
+
* {@link getMarketHolders} for one market, unfiltered and cut to `limit`.
|
|
1903
|
+
* Batch envelope, so `meta` is the batch's own.
|
|
1904
|
+
*/
|
|
1905
|
+
getGameHolders(eventSlug, params, options = {}) {
|
|
1906
|
+
return this.call("getGameHolders", {
|
|
1907
|
+
...options,
|
|
1908
|
+
path: { event_slug: eventSlug },
|
|
1909
|
+
query: params,
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1773
1912
|
searchMarkets(q, options = {}) {
|
|
1774
1913
|
const { query, ...request } = options;
|
|
1775
1914
|
return this.list("searchMarkets", { ...request, query: { ...query, q } });
|
|
@@ -1788,17 +1927,6 @@ export class OxinsiderApiClient {
|
|
|
1788
1927
|
path: { condition_id: conditionId },
|
|
1789
1928
|
});
|
|
1790
1929
|
}
|
|
1791
|
-
/**
|
|
1792
|
-
* @deprecated Use {@link getMarketFlow} (#16312); calls the deprecated
|
|
1793
|
-
* `GET /api/v1/market/{condition_id}/intel`, whose envelope keeps
|
|
1794
|
-
* `object: "market_intel"`.
|
|
1795
|
-
*/
|
|
1796
|
-
getMarketIntel(conditionId, options = {}) {
|
|
1797
|
-
return this.call("getMarketIntel", {
|
|
1798
|
-
...options,
|
|
1799
|
-
path: { condition_id: conditionId },
|
|
1800
|
-
});
|
|
1801
|
-
}
|
|
1802
1930
|
getMarketSnapshot(conditionId, options = {}) {
|
|
1803
1931
|
return this.call("getMarketSnapshot", {
|
|
1804
1932
|
...options,
|
|
@@ -1809,7 +1937,7 @@ export class OxinsiderApiClient {
|
|
|
1809
1937
|
* One page of a market's graded (S/A/B) holder roster from a complete
|
|
1810
1938
|
* provider holder scan: the list a Pick of the Day shows, for any market.
|
|
1811
1939
|
* `params.outcome` (`yes` | `no` | `all`), `params.min_grade` (`S` | `A` |
|
|
1812
|
-
* `B`), `params.limit` and `params.cursor` (`
|
|
1940
|
+
* `B`), `params.limit` and `params.cursor` (the previous page's opaque `next_cursor`). The page carries
|
|
1813
1941
|
* the `market`, `scan` and roster `totals` beside `data`; `total` is the
|
|
1814
1942
|
* count matching the filters across every page.
|
|
1815
1943
|
*/
|
|
@@ -1820,6 +1948,21 @@ export class OxinsiderApiClient {
|
|
|
1820
1948
|
query: params,
|
|
1821
1949
|
});
|
|
1822
1950
|
}
|
|
1951
|
+
/**
|
|
1952
|
+
* A market's largest holders on each outcome, every grade from S to F and
|
|
1953
|
+
* ungraded wallets included: the event page's Top holders table (#32238).
|
|
1954
|
+
* `params.limit` is holders per outcome (1-100). `data.yes` and `data.no`
|
|
1955
|
+
* are largest `shares` first; `data.totals` covers the whole sample, at
|
|
1956
|
+
* most 100 per outcome. For the complete S/A/B roster use
|
|
1957
|
+
* `getMarketHolders`.
|
|
1958
|
+
*/
|
|
1959
|
+
getMarketTopHolders(conditionId, params = {}, options = {}) {
|
|
1960
|
+
return this.call("getMarketTopHolders", {
|
|
1961
|
+
...options,
|
|
1962
|
+
path: { condition_id: conditionId },
|
|
1963
|
+
query: params,
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1823
1966
|
/**
|
|
1824
1967
|
* Fetch bucketed OHLC candles for a market's outcome tokens.
|
|
1825
1968
|
* Resolution defaults to the server default; pass `params.resolution` as
|
|
@@ -1834,6 +1977,19 @@ export class OxinsiderApiClient {
|
|
|
1834
1977
|
query: params,
|
|
1835
1978
|
});
|
|
1836
1979
|
}
|
|
1980
|
+
/**
|
|
1981
|
+
* Fetch one market's net buyers and net sellers over the last 24 hours
|
|
1982
|
+
* (the default) or 7 days: the window totals and the top 25 wallets on each
|
|
1983
|
+
* side, live, as the market page's wallets in/out panel shows a Pro viewer.
|
|
1984
|
+
* Pass `params.window` as `"24h"` or `"7d"`.
|
|
1985
|
+
*/
|
|
1986
|
+
getMarketWalletsInOut(conditionId, params = {}, options = {}) {
|
|
1987
|
+
return this.call("getMarketWalletsInOut", {
|
|
1988
|
+
...options,
|
|
1989
|
+
path: { condition_id: conditionId },
|
|
1990
|
+
query: params,
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1837
1993
|
/**
|
|
1838
1994
|
* Fetch one suspicious trade by raw `whale_alerts.id` or the `rf_`-prefixed
|
|
1839
1995
|
* id list responses emit. The envelope's `object` is `"suspicious_trade"`.
|
|
@@ -1845,31 +2001,9 @@ export class OxinsiderApiClient {
|
|
|
1845
2001
|
listSuspiciousTrades(params = {}, options = {}) {
|
|
1846
2002
|
return this.list("listSuspiciousTrades", { ...options, query: params });
|
|
1847
2003
|
}
|
|
1848
|
-
/**
|
|
1849
|
-
* @deprecated Use `getSuspiciousTrade()`; renamed in #16301. This method
|
|
1850
|
-
* keeps calling the deprecated `GET /api/v1/insider-radar/{id}`, which stays
|
|
1851
|
-
* live with no retirement date and still answers `object: "radar_flag"`, so
|
|
1852
|
-
* an integration branching on that envelope keeps working.
|
|
1853
|
-
*/
|
|
1854
|
-
getInsiderRadarFlag(id, options = {}) {
|
|
1855
|
-
return this.call("getInsiderRadarFlag", { ...options, path: { id } });
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* @deprecated Use `listSuspiciousTrades()`; renamed in #16301. This method
|
|
1859
|
-
* keeps calling the deprecated `GET /api/v1/insider-radar`, which stays live
|
|
1860
|
-
* with no retirement date and answers with `Deprecation` plus a `Link
|
|
1861
|
-
* rel="successor-version"` header.
|
|
1862
|
-
*/
|
|
1863
|
-
listInsiderRadar(params = {}, options = {}) {
|
|
1864
|
-
return this.list("listInsiderRadar", { ...options, query: params });
|
|
1865
|
-
}
|
|
1866
2004
|
getLargeTrade(id, options = {}) {
|
|
1867
2005
|
return this.call("getLargeTrade", { ...options, path: { id } });
|
|
1868
2006
|
}
|
|
1869
|
-
/** @deprecated Use {@link getLargeTrade} (#16304); calls the deprecated `/api/v1/whale-trades/{id}`. */
|
|
1870
|
-
getWhaleTrade(id, options = {}) {
|
|
1871
|
-
return this.call("getWhaleTrade", { ...options, path: { id } });
|
|
1872
|
-
}
|
|
1873
2007
|
// --- Exports ---
|
|
1874
2008
|
/**
|
|
1875
2009
|
* Cancel a submitted export (`POST /api/v1/trader/{address}/export/cancel`, #16254).
|
|
@@ -1957,13 +2091,6 @@ export class OxinsiderApiClient {
|
|
|
1957
2091
|
getCoverage(options = {}) {
|
|
1958
2092
|
return this.call("getCoverage", options);
|
|
1959
2093
|
}
|
|
1960
|
-
/**
|
|
1961
|
-
* @deprecated Use {@link getCoverage} (#16315); calls the deprecated
|
|
1962
|
-
* `GET /api/v1/platforms`, which serves the same body.
|
|
1963
|
-
*/
|
|
1964
|
-
getPlatforms(options = {}) {
|
|
1965
|
-
return this.call("getPlatforms", options);
|
|
1966
|
-
}
|
|
1967
2094
|
getAccountIdentity(options = {}) {
|
|
1968
2095
|
return this.call("getAccountIdentity", options);
|
|
1969
2096
|
}
|
|
@@ -2006,10 +2133,33 @@ export class OxinsiderApiClient {
|
|
|
2006
2133
|
getPickOfTheDay(options = {}) {
|
|
2007
2134
|
return this.call("getPickOfTheDay", options);
|
|
2008
2135
|
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Fetch a past product day's Pick of the Day slate (single-object envelope),
|
|
2138
|
+
* gated by the key's tier the same way the dated web page is. `date` is a
|
|
2139
|
+
* product day in America/New_York, `YYYY-MM-DD`; today's date is the same
|
|
2140
|
+
* read as `getPickOfTheDay`. A past day with no published pick throws the
|
|
2141
|
+
* 404 `not_found` with `error.param` `date`, which a retry cannot change;
|
|
2142
|
+
* a date after today throws the 400 `bad_request`.
|
|
2143
|
+
*/
|
|
2144
|
+
getPickOfTheDayForDate(date, options = {}) {
|
|
2145
|
+
return this.call("getPickOfTheDay", { ...options, query: { date } });
|
|
2146
|
+
}
|
|
2009
2147
|
/** Fetch the Pick of the Day archive with hit-rate (single-object envelope). */
|
|
2010
2148
|
getPickOfTheDayArchive(options = {}) {
|
|
2011
2149
|
return this.call("getPickOfTheDayArchive", options);
|
|
2012
2150
|
}
|
|
2151
|
+
/** Fetch the Pick of the Day track-record breakdown the stats page shows (single-object envelope). */
|
|
2152
|
+
getPickOfTheDayStats(options = {}) {
|
|
2153
|
+
return this.call("getPickOfTheDayStats", options);
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Fetch one UTC day's resolution report (single-object envelope): how often
|
|
2157
|
+
* the profitable wallets' side won on the day's resolved sports and esports
|
|
2158
|
+
* markets. `view: "totals"` drops the per-market list.
|
|
2159
|
+
*/
|
|
2160
|
+
getResolutionReport(date, params = {}, options = {}) {
|
|
2161
|
+
return this.call("getResolutionReport", { ...options, query: { ...params, date } });
|
|
2162
|
+
}
|
|
2013
2163
|
/**
|
|
2014
2164
|
* Fetch the Pick of the Day commitment ledger (single-object envelope).
|
|
2015
2165
|
*
|