Repository navigation
Expand file tree
/
Copy pathpostman_collection.json
More file actions
188 lines (188 loc) · 8.56 KB
/
Copy pathpostman_collection.json
File metadata and controls
188 lines (188 loc) · 8.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"info": {
"_postman_id": "insidepoly-api",
"name": "InsidePoly API",
"description": "API collection for InsidePoly backend — insider trading detection on Polymarket.\n\nBase URL: http://localhost:8000\nWebSocket: Socket.IO namespace at /stats",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Health",
"item": [
{
"name": "Health Check",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/healthcheck",
"host": ["{{BASE_URL}}"],
"path": ["healthcheck"]
},
"description": "Returns server uptime, timestamp, and WebSocket stream stats (active subscription counts)."
},
"response": []
}
]
},
{
"name": "Wallets",
"item": [
{
"name": "Get Leaderboard",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/wallets?limit=20&offset=0",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "wallets"],
"query": [
{
"key": "limit",
"value": "20",
"description": "1–100, default 100"
},
{
"key": "offset",
"value": "0",
"description": "default 0"
},
{
"key": "tier",
"value": "",
"description": "Filter by tier: normal | watchlist | suspicious | flagged",
"disabled": true
}
]
},
"description": "Paginated leaderboard from the wallets table, ordered by current_score DESC. Optionally filter by score_tier. Returns Wallet[]."
},
"response": []
},
{
"name": "Get Wallet Detail",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/wallets/{{WALLET_ADDRESS}}",
"host": ["{{BASE_URL}}"],
"path": [
"api",
"v1",
"wallets",
"{{WALLET_ADDRESS}}"
]
},
"description": "Returns a WalletDetail record: all signal scores, current_score, score_tier, plus trade_count (total lifetime trades) and market_count (distinct markets ever traded). Returns 404 if wallet not found."
},
"response": []
},
{
"name": "Get Wallet Score History",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/wallets/{{WALLET_ADDRESS}}/history?limit=20&offset=0",
"host": ["{{BASE_URL}}"],
"path": [
"api",
"v1",
"wallets",
"{{WALLET_ADDRESS}}",
"history"
],
"query": [
{
"key": "limit",
"value": "20",
"description": "1–100, default 100"
},
{
"key": "offset",
"value": "0",
"description": "default 0"
}
]
},
"description": "Score history rows from wallet_scores_history table, ordered by recorded_at DESC. Used for sparkline charting in the UI."
},
"response": []
},
{
"name": "Get Wallet Trades",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/wallets/{{WALLET_ADDRESS}}/trades?limit=20&offset=0",
"host": ["{{BASE_URL}}"],
"path": [
"api",
"v1",
"wallets",
"{{WALLET_ADDRESS}}",
"trades"
],
"query": [
{
"key": "limit",
"value": "20",
"description": "1–100, default 100"
},
{
"key": "offset",
"value": "0",
"description": "default 0"
}
]
},
"description": "Recent trades for this wallet, ordered by filled_at DESC. Returns TradeWithMarket[] — each trade includes market_question (joined from markets table via LEFT JOIN, null if market not yet synced)."
},
"response": []
}
]
},
{
"name": "WebSocket",
"item": [
{
"name": "Stats Broadcast (/stats)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{WS_URL}}/stats",
"host": ["{{WS_URL}}"],
"path": ["stats"]
},
"description": "Socket.IO namespace at /stats. Use Postman's Socket.IO request type (not HTTP GET — this entry is for documentation only).\n\nConnect to: http://localhost:8000/stats\n\nClient events:\n emit('subscribe') → server emits 'subscribed' { success: true }\n emit('unsubscribe') → server emits 'unsubscribed' { success: true }\n\nServer events:\n 'data' — WalletStats snapshot broadcast to all subscribers on interval:\n {\n total_wallets, normal, watchlist, suspicious, flagged,\n conc_25, conc_15, conc_5, conc_0,\n mkt_25, mkt_15, mkt_5, mkt_0,\n size_25, size_15, size_5, size_0,\n timing_25, timing_15, timing_5, timing_0,\n age_25, age_15, age_5, age_0, age_null,\n all_max\n }\n\nInterval starts on first subscriber connect, stops when all subscribers disconnect."
},
"response": []
}
]
}
],
"variable": [
{
"key": "BASE_URL",
"value": "http://localhost:8000",
"type": "string",
"description": "Backend API server"
},
{
"key": "WS_URL",
"value": "http://localhost:8000",
"type": "string",
"description": "Same host — Socket.IO uses HTTP upgrade"
},
{
"key": "WALLET_ADDRESS",
"value": "0xee50a31c3f5a7c77824b12a941a54388a2827ed6",
"type": "string",
"description": "Known insider wallet (Google d4vd market) — good for testing"
}
]
}