clodds 1.2.8 → 1.3.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.
Files changed (232) hide show
  1. package/dist/skills/bundled/acp/SKILL.md +188 -0
  2. package/dist/skills/bundled/acp/index.d.ts +0 -3
  3. package/dist/skills/bundled/acp/index.js +1 -1
  4. package/dist/skills/bundled/acp/index.js.map +1 -1
  5. package/dist/skills/bundled/agentbets/SKILL.md +19 -0
  6. package/dist/skills/bundled/ai-strategy/SKILL.md +111 -0
  7. package/dist/skills/bundled/ai-strategy/index.js +1 -1
  8. package/dist/skills/bundled/ai-strategy/index.js.map +1 -1
  9. package/dist/skills/bundled/alerts/SKILL.md +87 -0
  10. package/dist/skills/bundled/analytics/SKILL.md +252 -0
  11. package/dist/skills/bundled/analytics/index.js +2 -2
  12. package/dist/skills/bundled/analytics/index.js.map +1 -1
  13. package/dist/skills/bundled/arbitrage/SKILL.md +287 -0
  14. package/dist/skills/bundled/auto-reply/SKILL.md +285 -0
  15. package/dist/skills/bundled/auto-reply/index.js +2 -2
  16. package/dist/skills/bundled/auto-reply/index.js.map +1 -1
  17. package/dist/skills/bundled/automation/SKILL.md +242 -0
  18. package/dist/skills/bundled/automation/index.js +2 -2
  19. package/dist/skills/bundled/automation/index.js.map +1 -1
  20. package/dist/skills/bundled/backtest/SKILL.md +225 -0
  21. package/dist/skills/bundled/bags/SKILL.md +131 -0
  22. package/dist/skills/bundled/bankr/SKILL.md +114 -0
  23. package/dist/skills/bundled/betfair/SKILL.md +113 -0
  24. package/dist/skills/bundled/binance-futures/SKILL.md +84 -0
  25. package/dist/skills/bundled/binance-futures/index.d.ts +0 -3
  26. package/dist/skills/bundled/binance-futures/index.js +1 -2
  27. package/dist/skills/bundled/binance-futures/index.js.map +1 -1
  28. package/dist/skills/bundled/botchan/SKILL.md +66 -0
  29. package/dist/skills/bundled/botchan/index.d.ts +0 -3
  30. package/dist/skills/bundled/botchan/index.js +0 -1
  31. package/dist/skills/bundled/botchan/index.js.map +1 -1
  32. package/dist/skills/bundled/bridge/SKILL.md +215 -0
  33. package/dist/skills/bundled/bybit-futures/SKILL.md +84 -0
  34. package/dist/skills/bundled/bybit-futures/index.d.ts +0 -3
  35. package/dist/skills/bundled/bybit-futures/index.js +0 -1
  36. package/dist/skills/bundled/bybit-futures/index.js.map +1 -1
  37. package/dist/skills/bundled/clanker/SKILL.md +125 -0
  38. package/dist/skills/bundled/clanker/index.d.ts +0 -3
  39. package/dist/skills/bundled/clanker/index.js +0 -1
  40. package/dist/skills/bundled/clanker/index.js.map +1 -1
  41. package/dist/skills/bundled/copy-trading/SKILL.md +285 -0
  42. package/dist/skills/bundled/copy-trading/index.js +2 -2
  43. package/dist/skills/bundled/copy-trading/index.js.map +1 -1
  44. package/dist/skills/bundled/copy-trading-solana/SKILL.md +66 -0
  45. package/dist/skills/bundled/credentials/SKILL.md +261 -0
  46. package/dist/skills/bundled/crypto-hft/SKILL.md +121 -0
  47. package/dist/skills/bundled/dca/SKILL.md +27 -0
  48. package/dist/skills/bundled/dex/SKILL.md +87 -0
  49. package/dist/skills/bundled/dex/index.d.ts +36 -0
  50. package/dist/skills/bundled/dex/index.js +537 -0
  51. package/dist/skills/bundled/dex/index.js.map +1 -0
  52. package/dist/skills/bundled/divergence/SKILL.md +83 -0
  53. package/dist/skills/bundled/doctor/SKILL.md +267 -0
  54. package/dist/skills/bundled/doctor/index.js +2 -8
  55. package/dist/skills/bundled/doctor/index.js.map +1 -1
  56. package/dist/skills/bundled/drift/SKILL.md +53 -0
  57. package/dist/skills/bundled/drift-sdk/SKILL.md +103 -0
  58. package/dist/skills/bundled/drift-sdk/index.d.ts +0 -3
  59. package/dist/skills/bundled/drift-sdk/index.js +0 -1
  60. package/dist/skills/bundled/drift-sdk/index.js.map +1 -1
  61. package/dist/skills/bundled/edge/SKILL.md +84 -0
  62. package/dist/skills/bundled/embeddings/SKILL.md +244 -0
  63. package/dist/skills/bundled/endaoment/SKILL.md +65 -0
  64. package/dist/skills/bundled/endaoment/index.d.ts +0 -3
  65. package/dist/skills/bundled/endaoment/index.js +0 -1
  66. package/dist/skills/bundled/endaoment/index.js.map +1 -1
  67. package/dist/skills/bundled/ens/SKILL.md +63 -0
  68. package/dist/skills/bundled/ens/index.d.ts +0 -3
  69. package/dist/skills/bundled/ens/index.js +0 -1
  70. package/dist/skills/bundled/ens/index.js.map +1 -1
  71. package/dist/skills/bundled/erc8004/SKILL.md +79 -0
  72. package/dist/skills/bundled/erc8004/index.d.ts +0 -3
  73. package/dist/skills/bundled/erc8004/index.js +0 -1
  74. package/dist/skills/bundled/erc8004/index.js.map +1 -1
  75. package/dist/skills/bundled/execution/SKILL.md +278 -0
  76. package/dist/skills/bundled/farcaster/SKILL.md +80 -0
  77. package/dist/skills/bundled/features/SKILL.md +20 -0
  78. package/dist/skills/bundled/feeds/SKILL.md +288 -0
  79. package/dist/skills/bundled/harden/SKILL.md +74 -0
  80. package/dist/skills/bundled/history/SKILL.md +257 -0
  81. package/dist/skills/bundled/hyperliquid/SKILL.md +200 -0
  82. package/dist/skills/bundled/hyperliquid/index.d.ts +0 -3
  83. package/dist/skills/bundled/hyperliquid/index.js +0 -1
  84. package/dist/skills/bundled/hyperliquid/index.js.map +1 -1
  85. package/dist/skills/bundled/identity/SKILL.md +228 -0
  86. package/dist/skills/bundled/identity/index.js +2 -2
  87. package/dist/skills/bundled/identity/index.js.map +1 -1
  88. package/dist/skills/bundled/integrations/SKILL.md +321 -0
  89. package/dist/skills/bundled/integrations/index.js +2 -2
  90. package/dist/skills/bundled/integrations/index.js.map +1 -1
  91. package/dist/skills/bundled/jupiter/SKILL.md +163 -0
  92. package/dist/skills/bundled/kamino/SKILL.md +69 -0
  93. package/dist/skills/bundled/ledger/SKILL.md +20 -0
  94. package/dist/skills/bundled/lighter/SKILL.md +83 -0
  95. package/dist/skills/bundled/lighter/index.d.ts +0 -3
  96. package/dist/skills/bundled/lighter/index.js +0 -1
  97. package/dist/skills/bundled/lighter/index.js.map +1 -1
  98. package/dist/skills/bundled/marginfi/SKILL.md +62 -0
  99. package/dist/skills/bundled/market-index/SKILL.md +242 -0
  100. package/dist/skills/bundled/market-index/index.js +1 -3
  101. package/dist/skills/bundled/market-index/index.js.map +1 -1
  102. package/dist/skills/bundled/markets/SKILL.md +49 -0
  103. package/dist/skills/bundled/mcp/SKILL.md +235 -0
  104. package/dist/skills/bundled/mcp/index.js +1 -3
  105. package/dist/skills/bundled/mcp/index.js.map +1 -1
  106. package/dist/skills/bundled/memory/SKILL.md +209 -0
  107. package/dist/skills/bundled/metaculus/SKILL.md +62 -0
  108. package/dist/skills/bundled/meteora/SKILL.md +28 -0
  109. package/dist/skills/bundled/meteora-dbc/SKILL.md +25 -0
  110. package/dist/skills/bundled/metrics/SKILL.md +338 -0
  111. package/dist/skills/bundled/mev/SKILL.md +239 -0
  112. package/dist/skills/bundled/mev/index.js +2 -2
  113. package/dist/skills/bundled/mev/index.js.map +1 -1
  114. package/dist/skills/bundled/mexc-futures/SKILL.md +86 -0
  115. package/dist/skills/bundled/mexc-futures/index.d.ts +0 -3
  116. package/dist/skills/bundled/mexc-futures/index.js +0 -1
  117. package/dist/skills/bundled/mexc-futures/index.js.map +1 -1
  118. package/dist/skills/bundled/mm/SKILL.md +142 -0
  119. package/dist/skills/bundled/monitoring/SKILL.md +249 -0
  120. package/dist/skills/bundled/news/SKILL.md +95 -0
  121. package/dist/skills/bundled/onchainkit/SKILL.md +83 -0
  122. package/dist/skills/bundled/opinion/SKILL.md +87 -0
  123. package/dist/skills/bundled/opportunity/SKILL.md +308 -0
  124. package/dist/skills/bundled/orca/SKILL.md +28 -0
  125. package/dist/skills/bundled/pairing/SKILL.md +275 -0
  126. package/dist/skills/bundled/pancakeswap/SKILL.md +93 -0
  127. package/dist/skills/bundled/pancakeswap/index.d.ts +0 -3
  128. package/dist/skills/bundled/pancakeswap/index.js +0 -1
  129. package/dist/skills/bundled/pancakeswap/index.js.map +1 -1
  130. package/dist/skills/bundled/percolator/SKILL.md +22 -0
  131. package/dist/skills/bundled/permissions/SKILL.md +269 -0
  132. package/dist/skills/bundled/permissions/index.js +2 -2
  133. package/dist/skills/bundled/permissions/index.js.map +1 -1
  134. package/dist/skills/bundled/plugins/SKILL.md +263 -0
  135. package/dist/skills/bundled/plugins/index.js +2 -2
  136. package/dist/skills/bundled/plugins/index.js.map +1 -1
  137. package/dist/skills/bundled/portfolio/SKILL.md +161 -0
  138. package/dist/skills/bundled/portfolio/index.js +1 -1
  139. package/dist/skills/bundled/portfolio/index.js.map +1 -1
  140. package/dist/skills/bundled/portfolio-sync/SKILL.md +466 -0
  141. package/dist/skills/bundled/positions/SKILL.md +262 -0
  142. package/dist/skills/bundled/predictfun/SKILL.md +109 -0
  143. package/dist/skills/bundled/predictfun/index.js +1 -1
  144. package/dist/skills/bundled/predictfun/index.js.map +1 -1
  145. package/dist/skills/bundled/predictit/SKILL.md +66 -0
  146. package/dist/skills/bundled/presence/SKILL.md +217 -0
  147. package/dist/skills/bundled/presence/index.js +2 -2
  148. package/dist/skills/bundled/presence/index.js.map +1 -1
  149. package/dist/skills/bundled/processes/SKILL.md +254 -0
  150. package/dist/skills/bundled/pump-swarm/SKILL.md +309 -0
  151. package/dist/skills/bundled/pumpfun/SKILL.md +145 -0
  152. package/dist/skills/bundled/pumpfun/index.d.ts +8 -1
  153. package/dist/skills/bundled/pumpfun/index.js +221 -11
  154. package/dist/skills/bundled/pumpfun/index.js.map +1 -1
  155. package/dist/skills/bundled/qmd/SKILL.md +129 -0
  156. package/dist/skills/bundled/qrcoin/SKILL.md +60 -0
  157. package/dist/skills/bundled/qrcoin/index.d.ts +0 -3
  158. package/dist/skills/bundled/qrcoin/index.js +0 -1
  159. package/dist/skills/bundled/qrcoin/index.js.map +1 -1
  160. package/dist/skills/bundled/raydium/SKILL.md +198 -0
  161. package/dist/skills/bundled/remote/SKILL.md +201 -0
  162. package/dist/skills/bundled/research/SKILL.md +83 -0
  163. package/dist/skills/bundled/research/index.js +2 -2
  164. package/dist/skills/bundled/research/index.js.map +1 -1
  165. package/dist/skills/bundled/risk/SKILL.md +323 -0
  166. package/dist/skills/bundled/router/SKILL.md +233 -0
  167. package/dist/skills/bundled/routing/SKILL.md +258 -0
  168. package/dist/skills/bundled/sandbox/SKILL.md +257 -0
  169. package/dist/skills/bundled/search-config/SKILL.md +257 -0
  170. package/dist/skills/bundled/search-config/index.js +2 -2
  171. package/dist/skills/bundled/search-config/index.js.map +1 -1
  172. package/dist/skills/bundled/sessions/SKILL.md +251 -0
  173. package/dist/skills/bundled/sessions/index.js +1 -1
  174. package/dist/skills/bundled/sessions/index.js.map +1 -1
  175. package/dist/skills/bundled/setup/SKILL.md +53 -0
  176. package/dist/skills/bundled/shield/SKILL.md +21 -0
  177. package/dist/skills/bundled/signals/SKILL.md +106 -0
  178. package/dist/skills/bundled/signals/index.d.ts +0 -3
  179. package/dist/skills/bundled/signals/index.js +3 -4
  180. package/dist/skills/bundled/signals/index.js.map +1 -1
  181. package/dist/skills/bundled/sizing/SKILL.md +238 -0
  182. package/dist/skills/bundled/slippage/SKILL.md +306 -0
  183. package/dist/skills/bundled/smarkets/SKILL.md +107 -0
  184. package/dist/skills/bundled/solend/SKILL.md +63 -0
  185. package/dist/skills/bundled/strategy/SKILL.md +266 -0
  186. package/dist/skills/bundled/streaming/SKILL.md +150 -0
  187. package/dist/skills/bundled/streaming/index.js +2 -2
  188. package/dist/skills/bundled/streaming/index.js.map +1 -1
  189. package/dist/skills/bundled/tailscale/SKILL.md +249 -0
  190. package/dist/skills/bundled/tailscale/index.js +2 -2
  191. package/dist/skills/bundled/tailscale/index.js.map +1 -1
  192. package/dist/skills/bundled/ticks/SKILL.md +61 -0
  193. package/dist/skills/bundled/token-security/SKILL.md +18 -0
  194. package/dist/skills/bundled/trading-evm/SKILL.md +329 -0
  195. package/dist/skills/bundled/trading-futures/SKILL.md +865 -0
  196. package/dist/skills/bundled/trading-kalshi/SKILL.md +629 -0
  197. package/dist/skills/bundled/trading-manifold/SKILL.md +387 -0
  198. package/dist/skills/bundled/trading-polymarket/SKILL.md +1080 -0
  199. package/dist/skills/bundled/trading-solana/SKILL.md +418 -0
  200. package/dist/skills/bundled/trading-system/SKILL.md +290 -0
  201. package/dist/skills/bundled/triggers/SKILL.md +433 -0
  202. package/dist/skills/bundled/tts/SKILL.md +220 -0
  203. package/dist/skills/bundled/tweet-ideas/SKILL.md +77 -0
  204. package/dist/skills/bundled/usage/SKILL.md +239 -0
  205. package/dist/skills/bundled/usage/index.js +2 -2
  206. package/dist/skills/bundled/usage/index.js.map +1 -1
  207. package/dist/skills/bundled/veil/SKILL.md +76 -0
  208. package/dist/skills/bundled/veil/index.d.ts +0 -3
  209. package/dist/skills/bundled/veil/index.js +0 -1
  210. package/dist/skills/bundled/veil/index.js.map +1 -1
  211. package/dist/skills/bundled/verify/SKILL.md +199 -0
  212. package/dist/skills/bundled/verify/index.d.ts +0 -3
  213. package/dist/skills/bundled/verify/index.js +0 -1
  214. package/dist/skills/bundled/verify/index.js.map +1 -1
  215. package/dist/skills/bundled/virtuals/SKILL.md +82 -0
  216. package/dist/skills/bundled/voice/SKILL.md +217 -0
  217. package/dist/skills/bundled/voice/index.js +2 -2
  218. package/dist/skills/bundled/voice/index.js.map +1 -1
  219. package/dist/skills/bundled/weather/SKILL.md +80 -0
  220. package/dist/skills/bundled/webhooks/SKILL.md +297 -0
  221. package/dist/skills/bundled/webhooks/index.js +2 -2
  222. package/dist/skills/bundled/webhooks/index.js.map +1 -1
  223. package/dist/skills/bundled/whale-tracking/SKILL.md +287 -0
  224. package/dist/skills/bundled/whale-tracking/index.js +2 -2
  225. package/dist/skills/bundled/whale-tracking/index.js.map +1 -1
  226. package/dist/skills/bundled/yoink/SKILL.md +54 -0
  227. package/dist/skills/bundled/yoink/index.d.ts +0 -3
  228. package/dist/skills/bundled/yoink/index.js +0 -1
  229. package/dist/skills/bundled/yoink/index.js.map +1 -1
  230. package/dist/skills/executor.js +5 -3
  231. package/dist/skills/executor.js.map +1 -1
  232. package/package.json +2 -2
@@ -0,0 +1,261 @@
1
+ ---
2
+ name: credentials
3
+ description: "Secure credential management for trading platforms"
4
+ emoji: "🔐"
5
+ ---
6
+
7
+ # Credentials - Complete API Reference
8
+
9
+ Securely store and manage API credentials for trading platforms with AES-256-GCM encryption.
10
+
11
+ ---
12
+
13
+ ## Chat Commands
14
+
15
+ ### Add Credentials
16
+
17
+ ```
18
+ /creds add polymarket Interactive setup
19
+ /creds add kalshi --key abc --secret xyz Direct setup
20
+ /creds add binance Add Binance API
21
+ /creds add hyperliquid Add wallet key
22
+ ```
23
+
24
+ ### View Credentials
25
+
26
+ ```
27
+ /creds list List configured platforms
28
+ /creds status Check credential health
29
+ /creds test polymarket Test API connection
30
+ ```
31
+
32
+ ### Remove Credentials
33
+
34
+ ```
35
+ /creds remove polymarket Remove platform creds
36
+ /creds clear Clear all (careful!)
37
+ ```
38
+
39
+ ### Auth Status
40
+
41
+ ```
42
+ /auth status Overall auth status
43
+ /auth refresh kalshi Refresh tokens
44
+ /auth cooldown View cooldown status
45
+ ```
46
+
47
+ ---
48
+
49
+ ## TypeScript API Reference
50
+
51
+ ### Create Credentials Manager
52
+
53
+ ```typescript
54
+ import { createCredentialsManager } from 'clodds/credentials';
55
+
56
+ const creds = createCredentialsManager({
57
+ // Encryption key (required)
58
+ encryptionKey: process.env.CREDENTIALS_KEY,
59
+
60
+ // Storage backend
61
+ storage: 'sqlite', // 'sqlite' | 'postgres'
62
+ dbPath: './credentials.db',
63
+
64
+ // Cooldown settings
65
+ cooldownMinutes: 15,
66
+ maxFailures: 3,
67
+ });
68
+ ```
69
+
70
+ ### Set Credentials
71
+
72
+ ```typescript
73
+ // Polymarket (API + signing key)
74
+ await creds.setCredentials({
75
+ userId: 'user-123',
76
+ platform: 'polymarket',
77
+ credentials: {
78
+ apiKey: 'pk_...',
79
+ apiSecret: 'sk_...',
80
+ privateKey: '0x...', // For order signing
81
+ funderAddress: '0x...',
82
+ },
83
+ });
84
+
85
+ // Kalshi (API key)
86
+ await creds.setCredentials({
87
+ userId: 'user-123',
88
+ platform: 'kalshi',
89
+ credentials: {
90
+ email: 'user@example.com',
91
+ apiKey: 'key_...',
92
+ },
93
+ });
94
+
95
+ // Binance Futures
96
+ await creds.setCredentials({
97
+ userId: 'user-123',
98
+ platform: 'binance',
99
+ credentials: {
100
+ apiKey: 'abc...',
101
+ apiSecret: 'xyz...',
102
+ },
103
+ });
104
+
105
+ // Hyperliquid (wallet)
106
+ await creds.setCredentials({
107
+ userId: 'user-123',
108
+ platform: 'hyperliquid',
109
+ credentials: {
110
+ privateKey: '0x...',
111
+ walletAddress: '0x...',
112
+ },
113
+ });
114
+ ```
115
+
116
+ ### Get Credentials
117
+
118
+ ```typescript
119
+ // Get for specific platform
120
+ const polymarketCreds = await creds.getCredentials({
121
+ userId: 'user-123',
122
+ platform: 'polymarket',
123
+ });
124
+
125
+ if (polymarketCreds) {
126
+ console.log(`API Key: ${polymarketCreds.apiKey}`);
127
+ // Credentials are decrypted on retrieval
128
+ }
129
+
130
+ // List user's configured platforms
131
+ const platforms = await creds.listUserPlatforms('user-123');
132
+ console.log(`Configured: ${platforms.join(', ')}`);
133
+ ```
134
+
135
+ ### Delete Credentials
136
+
137
+ ```typescript
138
+ // Remove single platform
139
+ await creds.deleteCredentials({
140
+ userId: 'user-123',
141
+ platform: 'kalshi',
142
+ });
143
+
144
+ // Remove all for user
145
+ await creds.deleteAllCredentials('user-123');
146
+ ```
147
+
148
+ ### Test Credentials
149
+
150
+ ```typescript
151
+ // Test API connection
152
+ const result = await creds.testCredentials({
153
+ userId: 'user-123',
154
+ platform: 'polymarket',
155
+ });
156
+
157
+ if (result.success) {
158
+ console.log(`✓ Connected to ${result.platform}`);
159
+ console.log(` Balance: $${result.balance}`);
160
+ } else {
161
+ console.log(`✗ Failed: ${result.error}`);
162
+ }
163
+ ```
164
+
165
+ ### Cooldown Management
166
+
167
+ ```typescript
168
+ // Mark failed auth attempt
169
+ await creds.markFailure({
170
+ userId: 'user-123',
171
+ platform: 'kalshi',
172
+ error: 'Invalid API key',
173
+ });
174
+
175
+ // Check if in cooldown
176
+ const inCooldown = await creds.isInCooldown({
177
+ userId: 'user-123',
178
+ platform: 'kalshi',
179
+ });
180
+
181
+ if (inCooldown) {
182
+ const remaining = await creds.getCooldownRemaining({
183
+ userId: 'user-123',
184
+ platform: 'kalshi',
185
+ });
186
+ console.log(`Cooldown: ${remaining} minutes remaining`);
187
+ }
188
+
189
+ // Mark successful auth (resets failures)
190
+ await creds.markSuccess({
191
+ userId: 'user-123',
192
+ platform: 'kalshi',
193
+ });
194
+ ```
195
+
196
+ ### Build Trading Context
197
+
198
+ ```typescript
199
+ // Get ready-to-use trading context
200
+ const context = await creds.buildTradingContext({
201
+ userId: 'user-123',
202
+ platform: 'polymarket',
203
+ });
204
+
205
+ // Context includes authenticated client
206
+ await context.client.getBalance();
207
+ await context.client.placeOrder({ ... });
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Supported Platforms
213
+
214
+ | Platform | Credentials Required |
215
+ |----------|---------------------|
216
+ | **Polymarket** | API key, secret, private key, funder address |
217
+ | **Kalshi** | Email, API key |
218
+ | **Betfair** | App key, session token |
219
+ | **Smarkets** | API key |
220
+ | **Binance** | API key, secret |
221
+ | **Bybit** | API key, secret |
222
+ | **Hyperliquid** | Private key, wallet address |
223
+ | **MEXC** | API key, secret |
224
+
225
+ ---
226
+
227
+ ## Security Features
228
+
229
+ | Feature | Description |
230
+ |---------|-------------|
231
+ | **AES-256-GCM** | Military-grade encryption at rest |
232
+ | **Per-user keys** | Isolated credential storage |
233
+ | **Cooldown** | Rate limits on failed attempts |
234
+ | **No logging** | Secrets never logged |
235
+ | **Memory wipe** | Credentials cleared from memory after use |
236
+
237
+ ---
238
+
239
+ ## Environment Variables
240
+
241
+ ```bash
242
+ # Required encryption key (generate with: openssl rand -hex 32)
243
+ CREDENTIALS_KEY=your-64-char-hex-key
244
+
245
+ # Optional: per-platform keys
246
+ POLYMARKET_API_KEY=pk_...
247
+ POLYMARKET_API_SECRET=sk_...
248
+ POLYMARKET_PRIVATE_KEY=0x...
249
+ KALSHI_EMAIL=user@example.com
250
+ KALSHI_API_KEY=key_...
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Best Practices
256
+
257
+ 1. **Strong encryption key** — Use `openssl rand -hex 32`
258
+ 2. **Rotate keys regularly** — Update API keys periodically
259
+ 3. **Test after adding** — Always verify credentials work
260
+ 4. **Minimal permissions** — Use read-only keys when possible
261
+ 5. **Backup securely** — Keep encrypted backups offline
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: crypto-hft
3
+ description: "Trade 15-minute crypto binary markets on Polymarket with 4 automated strategies"
4
+ commands:
5
+ - /crypto-hft
6
+ - /hft
7
+ gates:
8
+ envs:
9
+ - POLY_PRIVATE_KEY
10
+ - POLY_FUNDER_ADDRESS
11
+ - POLY_API_KEY
12
+ - POLY_API_SECRET
13
+ - POLY_API_PASSPHRASE
14
+ ---
15
+
16
+ # Crypto HFT - 15-Minute Market Trading
17
+
18
+ Trade Polymarket's 15-minute crypto binary markets (BTC, ETH, SOL, XRP) with 4 automated strategies. Each round lasts 15 minutes with UP/DOWN token pairs that settle at 0 or 1.
19
+
20
+ Starts in **dry-run mode** by default (no real orders).
21
+
22
+ ## Quick Start
23
+
24
+ ```
25
+ /crypto-hft start # Start dry-run on BTC,ETH,SOL,XRP
26
+ /crypto-hft start BTC,ETH --dry-run # Specific assets, dry run
27
+ /crypto-hft start --preset scalper # Use a built-in preset
28
+ /crypto-hft status # Check stats + open positions
29
+ /crypto-hft stop # Stop and show summary
30
+ ```
31
+
32
+ For live trading, set Polymarket env vars and omit `--dry-run`:
33
+ ```bash
34
+ export POLY_PRIVATE_KEY="..."
35
+ export POLY_FUNDER_ADDRESS="..."
36
+ export POLY_API_KEY="..."
37
+ export POLY_API_SECRET="..."
38
+ export POLY_API_PASSPHRASE="..."
39
+ ```
40
+
41
+ ## Commands
42
+
43
+ ### Start / Stop
44
+ ```
45
+ /crypto-hft start [ASSETS] [--size N] [--dry-run] [--preset NAME]
46
+ /crypto-hft stop
47
+ ```
48
+
49
+ ### Monitor
50
+ ```
51
+ /crypto-hft status Stats, round info, open positions
52
+ /crypto-hft positions Last 20 closed trades with PnL
53
+ /crypto-hft markets Active 15-min markets from Gamma API
54
+ /crypto-hft round Current round slot and timing
55
+ ```
56
+
57
+ ### Configure (while running)
58
+ ```
59
+ /crypto-hft config Show current config
60
+ /crypto-hft config --tp 15 --sl 12 Set take-profit/stop-loss %
61
+ /crypto-hft config --size 30 --max-pos 4 Set trade size and max positions
62
+ /crypto-hft config --ratchet on --trailing off Toggle exit features
63
+ /crypto-hft config --max-loss 100 Set daily loss limit
64
+ ```
65
+
66
+ ### Strategy Control
67
+ ```
68
+ /crypto-hft enable momentum Enable a strategy
69
+ /crypto-hft disable expiry_fade Disable a strategy
70
+ ```
71
+
72
+ ### Presets
73
+ ```
74
+ /crypto-hft preset list Show all presets
75
+ /crypto-hft preset save my_config Save current config as preset
76
+ /crypto-hft preset load scalper Load a preset (into running engine or for next start)
77
+ /crypto-hft preset delete my_config Delete a saved preset
78
+ ```
79
+
80
+ ## Strategies
81
+
82
+ | Strategy | Entry Condition | Order Mode | Best For |
83
+ |----------|----------------|------------|----------|
84
+ | **momentum** | Spot price moved, poly lagging | maker_then_taker | Catching delayed reactions |
85
+ | **mean_reversion** | Token mispriced, spot calm | maker (0% fee) | Range-bound markets |
86
+ | **penny_clipper** | Oscillating in zone, price below mean | maker (0% fee) | Tight spread scalping |
87
+ | **expiry_fade** | Near expiry, skewed pricing, flat spot | taker (speed) | Late-round mean reversion |
88
+
89
+ ## Built-in Presets
90
+
91
+ | Preset | Size | Strategies | Risk |
92
+ |--------|------|-----------|------|
93
+ | **conservative** | $10 | mean_reversion, penny_clipper | Low - dry run, tight stops |
94
+ | **aggressive** | $50 | All 4 | High - live, wide stops |
95
+ | **scalper** | $20 | penny_clipper only | Medium - ratchet on |
96
+ | **momentum_only** | $30 | momentum only | Medium - ratchet + trailing |
97
+
98
+ ## Exit Logic
99
+
100
+ Positions are monitored every 500ms with 9 exit types (in priority order):
101
+
102
+ 1. **Force exit** - < 30s before market expiry
103
+ 2. **Take profit** - PnL >= TP% (default 15%)
104
+ 3. **Stop loss** - PnL <= -SL% (default 12%)
105
+ 4. **Ratchet floor** - Progressive giveback from confirmed high-water mark
106
+ 5. **Trailing stop** - Tightens as expiry approaches
107
+ 6. **Depth collapse** - Orderbook depth dropped 60%+ while price dropping
108
+ 7. **Stale profit** - Profitable but bid unchanged for 7s
109
+ 8. **Stagnant profit** - At +3% for 13s with no progress
110
+ 9. **Time exit** - Approaching minimum time left
111
+
112
+ ## Architecture
113
+
114
+ ```
115
+ Binance WS (spot) --> CryptoFeed --> Strategy Evaluators --> Entry Signals
116
+ Gamma API ---------> MarketScanner --> Round Detection |
117
+ v
118
+ Poly Orderbook ----> OBI/Spread/Depth --> Exit Checks --> ExecutionService
119
+ |
120
+ PositionManager (ratchet, trailing, depth collapse)
121
+ ```
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: dca
3
+ description: "Dollar-cost averaging across all platforms"
4
+ command: dca
5
+ emoji: "📊"
6
+ ---
7
+
8
+ # DCA (Dollar-Cost Averaging)
9
+
10
+ Spread orders over time across multiple platforms including Polymarket, Kalshi, PumpFun, Hyperliquid, Binance Futures, Bybit, MEXC, Drift, Opinion.trade, Predict.fun, Orca, Raydium, Virtuals, and Jupiter.
11
+
12
+ ## Commands
13
+
14
+ ```
15
+ /dca poly <token-id> <total-$> --per <$> --every <interval> Polymarket DCA
16
+ /dca kalshi <ticker> <total-$> --per <$> --every <interval> Kalshi DCA
17
+ /dca pump <mint> <total-SOL> --per <SOL> --every <interval> PumpFun DCA
18
+ /dca hl <coin> <total-$> --per <$> --every <interval> Hyperliquid DCA
19
+ /dca bf <symbol> <total-$> --per <$> --every <interval> Binance Futures DCA
20
+ /dca bb <symbol> <total-$> --per <$> --every <interval> Bybit DCA
21
+ /dca list List active DCA orders
22
+ /dca info <id> Show order details
23
+ /dca pause <id> Pause DCA order
24
+ /dca resume <id> Resume DCA order
25
+ /dca cancel <id> Cancel DCA order
26
+ /dca help Show all commands
27
+ ```
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: dex
3
+ description: "Cross-chain DEX market intelligence - trending tokens, gainers, losers, volume, stats across all chains and protocols"
4
+ command: dex
5
+ emoji: "📊"
6
+ ---
7
+
8
+ # DEX Market Intelligence
9
+
10
+ Cross-chain, cross-DEX market data powered by DexScreener. No API key needed. Works across Solana, Ethereum, BSC, Base, Arbitrum, and 10+ more chains.
11
+
12
+ **Use this skill when users ask about:**
13
+ - What's trending, what's hot, what's pumping on any chain or DEX
14
+ - Top gainers or losers (24h or right now)
15
+ - Token volume, liquidity, price changes, transaction counts
16
+ - Market data for any token on any chain
17
+ - Comparing tokens across different DEXes
18
+ - Virtuals Protocol, Clanker, Aerodrome, PumpSwap, Raydium, Uniswap, PancakeSwap tokens
19
+ - "What's the most active token right now?"
20
+ - "Show me the top movers on Base/Ethereum/Solana"
21
+
22
+ ## Discovery Commands
23
+
24
+ ```
25
+ /dex trending [filter] Top tokens by 24h volume
26
+ /dex gainers [filter] Top 24h price gainers
27
+ /dex losers [filter] Top 24h price losers
28
+ /dex hot [filter] Most active right now (1h transactions)
29
+ /dex new [filter] Newest token profiles
30
+ /dex boosted DexScreener trending/boosted tokens
31
+ ```
32
+
33
+ **Filter** can be a chain OR a specific DEX/protocol:
34
+
35
+ | Filter | What it covers |
36
+ |--------|---------------|
37
+ | `solana` / `sol` | All Solana DEXes |
38
+ | `ethereum` / `eth` | All Ethereum DEXes |
39
+ | `bsc` / `bnb` | All BSC DEXes |
40
+ | `base` | All Base chain DEXes |
41
+ | `arbitrum` / `arb` | All Arbitrum DEXes |
42
+ | `pumpfun` / `pump` | Pump.fun tokens only |
43
+ | `pumpswap` | PumpSwap AMM tokens |
44
+ | `raydium` | Raydium tokens |
45
+ | `orca` | Orca tokens |
46
+ | `meteora` | Meteora tokens |
47
+ | `virtuals` | Virtuals Protocol (Base) |
48
+ | `clanker` | Clanker tokens (Base) |
49
+ | `aerodrome` | Aerodrome DEX (Base) |
50
+ | `uniswap` | Uniswap (Ethereum) |
51
+ | `pancakeswap` | PancakeSwap (BSC) |
52
+
53
+ **Examples:**
54
+ ```
55
+ /dex trending solana What's hot on Solana?
56
+ /dex trending pumpfun Top pump.fun tokens by volume
57
+ /dex gainers virtuals Virtuals Protocol top gainers
58
+ /dex losers ethereum What dumped on Ethereum?
59
+ /dex hot base Most active on Base right now
60
+ /dex trending Top across ALL chains
61
+ ```
62
+
63
+ ## Token Data Commands
64
+
65
+ ```
66
+ /dex token <address> [chain] Full stats: price, volume, liquidity, txns, price changes
67
+ /dex pairs <address> [chain] All trading pairs for a token
68
+ /dex search <query> Search any token across all chains
69
+ ```
70
+
71
+ **Examples:**
72
+ ```
73
+ /dex token EPjFW...Dt1v solana
74
+ /dex search PEPE
75
+ /dex pairs 0x1234... eth
76
+ ```
77
+
78
+ ## Data Available Per Token
79
+
80
+ - Price (USD and native)
81
+ - Market cap / FDV
82
+ - Liquidity (USD)
83
+ - Volume: 5m, 1h, 6h, 24h
84
+ - Price change: 5m, 1h, 6h, 24h
85
+ - Transaction counts: buys vs sells at each timeframe
86
+ - DEX / pool info
87
+ - All trading pairs
@@ -0,0 +1,36 @@
1
+ /**
2
+ * DEX Market Intelligence Skill - Cross-chain, cross-DEX market data
3
+ *
4
+ * Powered by DexScreener (free, no API key required).
5
+ * Works across all chains: Solana, Ethereum, BSC, Base, Arbitrum, etc.
6
+ *
7
+ * Commands:
8
+ *
9
+ * DISCOVERY:
10
+ * /dex trending [chain] - Top tokens by 24h volume
11
+ * /dex gainers [chain] - Top 24h price gainers
12
+ * /dex losers [chain] - Top 24h price losers
13
+ * /dex hot [chain] - Most active right now (1h transactions)
14
+ * /dex new [chain] - Newest token profiles
15
+ * /dex boosted - DexScreener trending/boosted tokens
16
+ *
17
+ * TOKEN DATA:
18
+ * /dex token <address> [chain] - Full token stats (price, vol, liq, txns)
19
+ * /dex pairs <address> [chain] - All trading pairs for a token
20
+ * /dex search <query> - Search any token across all chains
21
+ *
22
+ * FILTERS (chain OR protocol):
23
+ * Chains: solana, ethereum, bsc, base, arbitrum, polygon, avalanche, optimism, sui, aptos, ton
24
+ * Solana DEXes: pumpfun, pumpswap, raydium, orca, meteora
25
+ * Base protocols: virtuals, clanker, aerodrome
26
+ * Ethereum: uniswap, sushiswap, curve
27
+ * BSC: pancakeswap
28
+ */
29
+ export declare function execute(args: string): Promise<string>;
30
+ declare const _default: {
31
+ name: string;
32
+ description: string;
33
+ commands: string[];
34
+ handle: typeof execute;
35
+ };
36
+ export default _default;