httpcat-cli 0.3.0 → 0.3.1
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/.github/workflows/ci.yml +3 -0
- package/.github/workflows/rc-publish.yml +6 -0
- package/.github/workflows/release.yml +102 -0
- package/.github/workflows/sync-version.yml +31 -2
- package/README.md +1408 -109
- package/additions.txt +3 -0
- package/bun.lock +260 -25
- package/dist/agent/autonomous-trader.d.ts.map +1 -0
- package/dist/agent/autonomous-trader.js +362 -0
- package/dist/agent/autonomous-trader.js.map +1 -0
- package/dist/agent/ax-agent.d.ts.map +1 -1
- package/dist/agent/ax-agent.js +356 -18
- package/dist/agent/ax-agent.js.map +1 -1
- package/dist/agent/event-client.d.ts.map +1 -0
- package/dist/agent/event-client.js +82 -0
- package/dist/agent/event-client.js.map +1 -0
- package/dist/agent/log-stream.d.ts.map +1 -0
- package/dist/agent/log-stream.js +95 -0
- package/dist/agent/log-stream.js.map +1 -0
- package/dist/agent/memory/conversation-session.d.ts.map +1 -0
- package/dist/agent/memory/conversation-session.js +232 -0
- package/dist/agent/memory/conversation-session.js.map +1 -0
- package/dist/agent/memory/conversation-store.d.ts.map +1 -0
- package/dist/agent/memory/conversation-store.js +214 -0
- package/dist/agent/memory/conversation-store.js.map +1 -0
- package/dist/agent/memory/database-schema.d.ts.map +1 -0
- package/dist/agent/memory/database-schema.js +355 -0
- package/dist/agent/memory/database-schema.js.map +1 -0
- package/dist/agent/memory/decision-tracker.d.ts.map +1 -0
- package/dist/agent/memory/decision-tracker.js +274 -0
- package/dist/agent/memory/decision-tracker.js.map +1 -0
- package/dist/agent/memory/memory-manager.d.ts.map +1 -0
- package/dist/agent/memory/memory-manager.js +187 -0
- package/dist/agent/memory/memory-manager.js.map +1 -0
- package/dist/agent/memory/types.d.ts.map +1 -0
- package/dist/agent/memory/types.js +5 -0
- package/dist/agent/memory/types.js.map +1 -0
- package/dist/agent/message-formatter.d.ts.map +1 -0
- package/dist/agent/message-formatter.js +76 -0
- package/dist/agent/message-formatter.js.map +1 -0
- package/dist/agent/position-db.d.ts.map +1 -0
- package/dist/agent/position-db.js +154 -0
- package/dist/agent/position-db.js.map +1 -0
- package/dist/agent/simple-chat-ui-static.d.ts.map +1 -0
- package/dist/agent/simple-chat-ui-static.js +129 -0
- package/dist/agent/simple-chat-ui-static.js.map +1 -0
- package/dist/agent/simple-chat-ui.d.ts.map +1 -0
- package/dist/agent/simple-chat-ui.js +90 -0
- package/dist/agent/simple-chat-ui.js.map +1 -0
- package/dist/agent/tools.d.ts.map +1 -1
- package/dist/agent/tools.js +297 -4
- package/dist/agent/tools.js.map +1 -1
- package/dist/agent/ui.d.ts.map +1 -0
- package/dist/agent/ui.js +84 -0
- package/dist/agent/ui.js.map +1 -0
- package/dist/agent/unified-runtime.d.ts.map +1 -0
- package/dist/agent/unified-runtime.js +397 -0
- package/dist/agent/unified-runtime.js.map +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +272 -21
- package/dist/client.js.map +1 -1
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +187 -33
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +125 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +505 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/automation.d.ts.map +1 -0
- package/dist/commands/automation.js +346 -0
- package/dist/commands/automation.js.map +1 -0
- package/dist/commands/balances.d.ts.map +1 -1
- package/dist/commands/balances.js +226 -73
- package/dist/commands/balances.js.map +1 -1
- package/dist/commands/buy.d.ts.map +1 -1
- package/dist/commands/buy.js +149 -146
- package/dist/commands/buy.js.map +1 -1
- package/dist/commands/call.d.ts.map +1 -0
- package/dist/commands/call.js +51 -0
- package/dist/commands/call.js.map +1 -0
- package/dist/commands/cex.d.ts.map +1 -0
- package/dist/commands/cex.js +958 -0
- package/dist/commands/cex.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +169 -411
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/claim.d.ts.map +1 -1
- package/dist/commands/claim.js +313 -29
- package/dist/commands/claim.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +151 -43
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/gasless-swap.d.ts.map +1 -0
- package/dist/commands/gasless-swap.js +232 -0
- package/dist/commands/gasless-swap.js.map +1 -0
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +63 -7
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +131 -47
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/launchpad.d.ts.map +1 -0
- package/dist/commands/launchpad.js +708 -0
- package/dist/commands/launchpad.js.map +1 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +57 -23
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/market.d.ts.map +1 -0
- package/dist/commands/market.js +960 -0
- package/dist/commands/market.js.map +1 -0
- package/dist/commands/mcp-install.d.ts.map +1 -0
- package/dist/commands/mcp-install.js +387 -0
- package/dist/commands/mcp-install.js.map +1 -0
- package/dist/commands/opps.d.ts.map +1 -0
- package/dist/commands/opps.js +409 -0
- package/dist/commands/opps.js.map +1 -0
- package/dist/commands/perps.d.ts.map +1 -0
- package/dist/commands/perps.js +248 -0
- package/dist/commands/perps.js.map +1 -0
- package/dist/commands/portfolio.d.ts.map +1 -0
- package/dist/commands/portfolio.js +679 -0
- package/dist/commands/portfolio.js.map +1 -0
- package/dist/commands/positions.d.ts.map +1 -1
- package/dist/commands/positions.js +76 -47
- package/dist/commands/positions.js.map +1 -1
- package/dist/commands/predict.d.ts.map +1 -0
- package/dist/commands/predict.js +280 -0
- package/dist/commands/predict.js.map +1 -0
- package/dist/commands/predictions.d.ts.map +1 -0
- package/dist/commands/predictions.js +486 -0
- package/dist/commands/predictions.js.map +1 -0
- package/dist/commands/risk.d.ts.map +1 -0
- package/dist/commands/risk.js +225 -0
- package/dist/commands/risk.js.map +1 -0
- package/dist/commands/security.d.ts.map +1 -0
- package/dist/commands/security.js +244 -0
- package/dist/commands/security.js.map +1 -0
- package/dist/commands/sell.d.ts.map +1 -1
- package/dist/commands/sell.js +67 -34
- package/dist/commands/sell.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -0
- package/dist/commands/send.js +733 -0
- package/dist/commands/send.js.map +1 -0
- package/dist/commands/sign.d.ts.map +1 -0
- package/dist/commands/sign.js +1048 -0
- package/dist/commands/sign.js.map +1 -0
- package/dist/commands/swap.d.ts.map +1 -0
- package/dist/commands/swap.js +744 -0
- package/dist/commands/swap.js.map +1 -0
- package/dist/commands/system.d.ts.map +1 -0
- package/dist/commands/system.js +417 -0
- package/dist/commands/system.js.map +1 -0
- package/dist/commands/tools/index.d.ts.map +1 -0
- package/dist/commands/tools/index.js +2040 -0
- package/dist/commands/tools/index.js.map +1 -0
- package/dist/commands/trade.d.ts.map +1 -0
- package/dist/commands/trade.js +237 -0
- package/dist/commands/trade.js.map +1 -0
- package/dist/commands/transactions.d.ts.map +1 -1
- package/dist/commands/transactions.js +29 -17
- package/dist/commands/transactions.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +429 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +351 -40
- package/dist/config.js.map +1 -1
- package/dist/index.js +4524 -924
- package/dist/index.js.map +1 -1
- package/dist/interactive/art.d.ts.map +1 -1
- package/dist/interactive/art.js +33 -1
- package/dist/interactive/art.js.map +1 -1
- package/dist/interactive/shell.d.ts.map +1 -1
- package/dist/interactive/shell.js +467 -2652
- package/dist/interactive/shell.js.map +1 -1
- package/dist/mcp/context.d.ts.map +1 -0
- package/dist/mcp/context.js +211 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/onboarding.d.ts.map +1 -0
- package/dist/mcp/onboarding.js +266 -0
- package/dist/mcp/onboarding.js.map +1 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +222 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +51 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +4119 -169
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/types/agent-info.d.ts.map +1 -0
- package/dist/types/agent-info.js +11 -0
- package/dist/types/agent-info.js.map +1 -0
- package/dist/ui/components/ScrollableList.d.ts.map +1 -0
- package/dist/ui/components/ScrollableList.js +72 -0
- package/dist/ui/components/ScrollableList.js.map +1 -0
- package/dist/ui/components/ThemeProvider.d.ts.map +1 -0
- package/dist/ui/components/ThemeProvider.js +87 -0
- package/dist/ui/components/ThemeProvider.js.map +1 -0
- package/dist/ui/components/ThemedBox.d.ts.map +1 -0
- package/dist/ui/components/ThemedBox.js +24 -0
- package/dist/ui/components/ThemedBox.js.map +1 -0
- package/dist/ui/components/agent/ChatHeader.d.ts.map +1 -0
- package/dist/ui/components/agent/ChatHeader.js +39 -0
- package/dist/ui/components/agent/ChatHeader.js.map +1 -0
- package/dist/ui/components/agent/Header.d.ts.map +1 -0
- package/dist/ui/components/agent/Header.js +14 -0
- package/dist/ui/components/agent/Header.js.map +1 -0
- package/dist/ui/components/agent/Input.d.ts.map +1 -0
- package/dist/ui/components/agent/Input.js +23 -0
- package/dist/ui/components/agent/Input.js.map +1 -0
- package/dist/ui/components/agent/Output.d.ts.map +1 -0
- package/dist/ui/components/agent/Output.js +23 -0
- package/dist/ui/components/agent/Output.js.map +1 -0
- package/dist/ui/components/chat/TokenChatUI.d.ts.map +1 -0
- package/dist/ui/components/chat/TokenChatUI.js +133 -0
- package/dist/ui/components/chat/TokenChatUI.js.map +1 -0
- package/dist/ui/components/shell/ShellHeader.d.ts.map +1 -0
- package/dist/ui/components/shell/ShellHeader.js +31 -0
- package/dist/ui/components/shell/ShellHeader.js.map +1 -0
- package/dist/ui/components/shell/ShellInput.d.ts.map +1 -0
- package/dist/ui/components/shell/ShellInput.js +151 -0
- package/dist/ui/components/shell/ShellInput.js.map +1 -0
- package/dist/ui/components/shell/ShellOutput.d.ts.map +1 -0
- package/dist/ui/components/shell/ShellOutput.js +8 -0
- package/dist/ui/components/shell/ShellOutput.js.map +1 -0
- package/dist/ui/hooks/useChatWebSocket.d.ts.map +1 -0
- package/dist/ui/hooks/useChatWebSocket.js +76 -0
- package/dist/ui/hooks/useChatWebSocket.js.map +1 -0
- package/dist/ui/hooks/useCommandHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useCommandHistory.js +70 -0
- package/dist/ui/hooks/useCommandHistory.js.map +1 -0
- package/dist/ui/hooks/useDebounce.d.ts.map +1 -0
- package/dist/ui/hooks/useDebounce.js +17 -0
- package/dist/ui/hooks/useDebounce.js.map +1 -0
- package/dist/ui/hooks/useLogStream.d.ts.map +1 -0
- package/dist/ui/hooks/useLogStream.js +20 -0
- package/dist/ui/hooks/useLogStream.js.map +1 -0
- package/dist/ui/hooks/useVirtualScroll.d.ts.map +1 -0
- package/dist/ui/hooks/useVirtualScroll.js +70 -0
- package/dist/ui/hooks/useVirtualScroll.js.map +1 -0
- package/dist/utils/admin.d.ts.map +1 -0
- package/dist/utils/admin.js +144 -0
- package/dist/utils/admin.js.map +1 -0
- package/dist/utils/autoSetup.d.ts.map +1 -0
- package/dist/utils/autoSetup.js +252 -0
- package/dist/utils/autoSetup.js.map +1 -0
- package/dist/utils/build-constants.d.ts.map +1 -0
- package/dist/utils/build-constants.js +10 -0
- package/dist/utils/build-constants.js.map +1 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +10 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils/formatting.js +46 -9
- package/dist/utils/formatting.js.map +1 -1
- package/dist/utils/llm-cli-config.d.ts.map +1 -0
- package/dist/utils/llm-cli-config.js +963 -0
- package/dist/utils/llm-cli-config.js.map +1 -0
- package/dist/utils/llm-cli-detector.d.ts.map +1 -0
- package/dist/utils/llm-cli-detector.js +202 -0
- package/dist/utils/llm-cli-detector.js.map +1 -0
- package/dist/utils/loading.d.ts.map +1 -1
- package/dist/utils/loading.js +25 -3
- package/dist/utils/loading.js.map +1 -1
- package/dist/utils/maintenance.d.ts.map +1 -0
- package/dist/utils/maintenance.js +17 -0
- package/dist/utils/maintenance.js.map +1 -0
- package/dist/utils/mcp-config.d.ts.map +1 -0
- package/dist/utils/mcp-config.js +77 -0
- package/dist/utils/mcp-config.js.map +1 -0
- package/dist/utils/privateKeyPrompt.d.ts.map +1 -1
- package/dist/utils/privateKeyPrompt.js +308 -129
- package/dist/utils/privateKeyPrompt.js.map +1 -1
- package/dist/utils/process-cleanup.d.ts.map +1 -0
- package/dist/utils/process-cleanup.js +136 -0
- package/dist/utils/process-cleanup.js.map +1 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +56 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/rpc-helpers.d.ts.map +1 -0
- package/dist/utils/rpc-helpers.js +70 -0
- package/dist/utils/rpc-helpers.js.map +1 -0
- package/dist/utils/rpc-transport.d.ts.map +1 -0
- package/dist/utils/rpc-transport.js +87 -0
- package/dist/utils/rpc-transport.js.map +1 -0
- package/dist/utils/shell-setup.d.ts.map +1 -0
- package/dist/utils/shell-setup.js +531 -0
- package/dist/utils/shell-setup.js.map +1 -0
- package/dist/utils/status.d.ts.map +1 -1
- package/dist/utils/status.js +34 -5
- package/dist/utils/status.js.map +1 -1
- package/dist/utils/token-resolver.d.ts.map +1 -1
- package/dist/utils/token-resolver.js +51 -8
- package/dist/utils/token-resolver.js.map +1 -1
- package/dist/utils/x402-caller.d.ts.map +1 -0
- package/dist/utils/x402-caller.js +17 -0
- package/dist/utils/x402-caller.js.map +1 -0
- package/docs/README.md +28 -0
- package/docs/agent/README.md +18 -0
- package/docs/api/README.md +41 -0
- package/docs/cli/README.md +42 -0
- package/docs/guides/README.md +26 -0
- package/docs/implementation/README.md +18 -0
- package/docs/planning/README.md +19 -0
- package/docs/testing/README.md +15 -0
- package/docs/ux/README.md +16 -0
- package/issues.txt +2 -0
- package/package.json +24 -9
- package/scripts/cat-spin.sh +417 -0
- package/scripts/deprecate-rc-versions.js +58 -0
- package/scripts/inject-build-constants.js +43 -0
- package/scripts/monitor-foobar.js +117 -0
- package/swap.logs +61 -0
- package/swapping.txt +108 -0
- package/test.txt +12 -0
- package/tests/fixtures/test-data.json +16 -0
- package/Screenshot 2025-12-21 at 8.56.02/342/200/257PM.png +0 -0
package/README.md
CHANGED
|
@@ -94,19 +94,53 @@ yarn build
|
|
|
94
94
|
|
|
95
95
|
### First-Time Setup
|
|
96
96
|
|
|
97
|
-
Run `httpcat` to
|
|
97
|
+
Run `httpcat` to automatically create your wallet:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
100
|
httpcat
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
**Automatic Wallet Generation:**
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
When you first run `httpcat`, a wallet is automatically created for you:
|
|
106
|
+
|
|
107
|
+
1. **Seed Phrase Generated** - A 12-word seed phrase is generated locally on your computer
|
|
108
|
+
2. **Address Displayed** - Your wallet address is prominently displayed so you can immediately send USDC or ETH
|
|
109
|
+
3. **Security Information** - Comprehensive security messaging explains that:
|
|
110
|
+
- Your seed phrase was generated on THIS computer only
|
|
111
|
+
- It has NEVER been and will NEVER be transmitted to any server, third party, or external service
|
|
112
|
+
- All cryptographic operations happen entirely on your device
|
|
113
|
+
- Your seed phrase is stored locally at `~/.config/httpcat/config.json`
|
|
114
|
+
4. **Password Protection (Optional)** - You can set a password to encrypt your wallet, or press Enter to skip (keys are still encrypted)
|
|
115
|
+
5. **Backup Instructions** - You'll be shown your seed phrase with instructions to back it up securely
|
|
116
|
+
|
|
117
|
+
**Import Mode (Optional):**
|
|
118
|
+
|
|
119
|
+
If you want to import an existing seed phrase or private key instead of auto-generation, set the `HTTPCAT_IMPORT_MODE` environment variable:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
HTTPCAT_IMPORT_MODE=true httpcat
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This will show the traditional import options:
|
|
126
|
+
|
|
127
|
+
- Generate new wallet (seed phrase)
|
|
128
|
+
- Import existing seed phrase
|
|
129
|
+
- Import existing private key
|
|
130
|
+
|
|
131
|
+
**Configuration Options:**
|
|
132
|
+
|
|
133
|
+
After wallet setup, you'll be prompted for:
|
|
134
|
+
|
|
135
|
+
- **Network** - Network format: `eip155:84532` (Base Sepolia testnet) or `eip155:8453` (Base mainnet)
|
|
136
|
+
- **Agent URL** - The httpcat agent endpoint (default: https://agent-test.402.cat)
|
|
108
137
|
- **ASCII Art** - Enable or disable cat art
|
|
109
138
|
|
|
139
|
+
**Network Format:** Uses CAIP-2 format (`eip155:<chainId>`):
|
|
140
|
+
|
|
141
|
+
- Base Sepolia (testnet): `eip155:84532` (Chain ID: 84532)
|
|
142
|
+
- Base (mainnet): `eip155:8453` (Chain ID: 8453)
|
|
143
|
+
|
|
110
144
|
### Interactive Mode
|
|
111
145
|
|
|
112
146
|
Once configured, running `httpcat` without arguments starts an interactive shell:
|
|
@@ -119,7 +153,7 @@ $ httpcat
|
|
|
119
153
|
> ^ < Your agent for token operations
|
|
120
154
|
|
|
121
155
|
🔗 Connected to: eip155:84532 (Base Sepolia)
|
|
122
|
-
🌐 Agent: https://agent.402.cat
|
|
156
|
+
🌐 Agent: https://agent-test.402.cat
|
|
123
157
|
|
|
124
158
|
httpcat> help
|
|
125
159
|
Available Commands:
|
|
@@ -127,20 +161,26 @@ Available Commands:
|
|
|
127
161
|
create <name> <symbol> Create a new token
|
|
128
162
|
buy <id|name|symbol> <amount> Buy tokens ($0.05, $0.10, $0.20, or percentage like 50%)
|
|
129
163
|
sell <id|name|symbol> <amount|all> Sell tokens
|
|
164
|
+
swap <tokenIn> <tokenOut> <amount> Swap any token to any token (CLI only, $0.10)
|
|
130
165
|
info <id|name|symbol> Get token information
|
|
131
166
|
list [--sort mcap|created] List all tokens
|
|
132
167
|
positions [--active|--graduated] Get all your positions with comprehensive info
|
|
133
168
|
transactions [--user|--token|--type] Get transaction history
|
|
134
169
|
claim <id|name|symbol> [--execute] View/claim LP fees for graduated tokens
|
|
170
|
+
market search <query> Search cryptocurrencies (CoinGecko, FREE)
|
|
171
|
+
market coin-data <coinId> Get coin market data (CoinGecko, $0.001)
|
|
172
|
+
market chart <coinId> <days> Get price chart (CoinGecko, $0.01)
|
|
173
|
+
cex markets Get CEX.IO markets (FREE)
|
|
174
|
+
cex ticker <symbol> Get CEX.IO ticker (FREE)
|
|
175
|
+
cex balance Get CEX.IO balance ($0.001)
|
|
176
|
+
cex place-order <symbol> <type> <orderType> <amount> Place order ($0.05, HIGH RISK)
|
|
135
177
|
chat [token] Start streaming chat (optional: token symbol/name/address)
|
|
136
178
|
balances Check wallet balances (ETH, USDC, and CAT)
|
|
137
179
|
account [list|switch|add] Manage accounts
|
|
138
|
-
|
|
139
|
-
agent
|
|
140
|
-
agent --setup | cat --setup Configure API key/provider
|
|
180
|
+
cat Start interactive AI assistant chat mode
|
|
181
|
+
agent setup Configure autonomous trading agent settings
|
|
141
182
|
health Check agent health
|
|
142
183
|
config [--show|--set|--reset] Manage configuration
|
|
143
|
-
network Show current network
|
|
144
184
|
env [list|use|show|add|update] Manage environments
|
|
145
185
|
help Show this help message
|
|
146
186
|
exit Exit the shell
|
|
@@ -214,6 +254,8 @@ httpcat -q buy MTK 0.20 && echo "Success!" || echo "Failed"
|
|
|
214
254
|
|
|
215
255
|
## Commands
|
|
216
256
|
|
|
257
|
+
> **Note on Command Organization:** httpcat v0.3.0 organizes commands into logical groups (e.g., `launchpad`, `portfolio`, `trade`). Many top-level commands are still available for backward compatibility but are considered deprecated. Use the grouped commands for new scripts. See [Command Groups](#command-groups) section for the full list of organized commands.
|
|
258
|
+
|
|
217
259
|
### Create Token
|
|
218
260
|
|
|
219
261
|
Create a new token on the bonding curve.
|
|
@@ -239,6 +281,8 @@ httpcat create "My Token" "MTK" --photo ./logo.png
|
|
|
239
281
|
- `-p, --photo <url|path>` - Token photo URL or file path (supports http/https URLs, local file paths, or base64 data URLs)
|
|
240
282
|
- `-w, --website <url>` - Website URL
|
|
241
283
|
|
|
284
|
+
**Note:** If no photo is provided, a unique [Robohash](https://robohash.org/) avatar is automatically generated for your token based on the token address.
|
|
285
|
+
|
|
242
286
|
**Cost:** $0.01 USDC
|
|
243
287
|
|
|
244
288
|
### Buy Tokens
|
|
@@ -297,6 +341,8 @@ httpcat buy MTK 0.10 -r 10 -d 500
|
|
|
297
341
|
When using `-r, --repeat`, the command will:
|
|
298
342
|
|
|
299
343
|
- Execute the specified number of buys sequentially
|
|
344
|
+
- Wait for transaction confirmation between each buy
|
|
345
|
+
- Automatically retry failed transactions (up to 10 attempts with exponential backoff)
|
|
300
346
|
- Stop early if the token graduates (reaches 100% graduation progress)
|
|
301
347
|
- Stop early if you run out of funds (HTTP 402 error)
|
|
302
348
|
- Display a compact summary for each buy
|
|
@@ -328,6 +374,307 @@ httpcat sell MTK all
|
|
|
328
374
|
|
|
329
375
|
**Cost:** Dynamic based on amount (1% fee deducted from proceeds)
|
|
330
376
|
|
|
377
|
+
### Swap Tokens
|
|
378
|
+
|
|
379
|
+
Swap any ERC20 token to any other ERC20 token using pro DEX aggregation with optimal routing.
|
|
380
|
+
|
|
381
|
+
**Note:** This is a CLI-only feature, not available in the interactive shell.
|
|
382
|
+
|
|
383
|
+
**CLI:**
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
httpcat swap <tokenIn> <tokenOut> <amount>
|
|
387
|
+
httpcat swap <tokenIn> <tokenOut> <amount> --slippage <bps>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
**Parameters:**
|
|
391
|
+
|
|
392
|
+
- `tokenIn` - Token to sell (contract address)
|
|
393
|
+
- `tokenOut` - Token to buy (contract address)
|
|
394
|
+
- `amount` - Amount to sell in smallest unit (e.g., 1000000 = 1 USDC with 6 decimals)
|
|
395
|
+
|
|
396
|
+
**Options:**
|
|
397
|
+
|
|
398
|
+
- `-s, --slippage <bps>` - Slippage tolerance in basis points (default: 50 = 0.5%)
|
|
399
|
+
|
|
400
|
+
**Examples:**
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
# Swap 1 USDC for WETH with default 0.5% slippage
|
|
404
|
+
httpcat swap 0x036cbd53842c5426634e7929541ec2318f3dcf7e 0x4200000000000000000000000000000000000006 1000000
|
|
405
|
+
|
|
406
|
+
# Swap with 1% slippage tolerance
|
|
407
|
+
httpcat swap 0x036c... 0x4200... 1000000 --slippage 100
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**Options:**
|
|
411
|
+
|
|
412
|
+
- `--shielded` - Use MEV-protected swap via UniswapX Dutch auction ($1.00)
|
|
413
|
+
|
|
414
|
+
**Examples:**
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
# MEV-protected swap
|
|
418
|
+
httpcat swap USDC WETH 1.0 --shielded
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Cost:** $0.10 USDC (standard) or $1.00 USDC (shielded)
|
|
422
|
+
|
|
423
|
+
### Gasless Swap
|
|
424
|
+
|
|
425
|
+
Submit gasless swap trades that don't require gas fees.
|
|
426
|
+
|
|
427
|
+
**CLI:**
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
# Submit signed 0x gasless swap
|
|
431
|
+
httpcat gasless-submit --trade '{"order": {...}}'
|
|
432
|
+
|
|
433
|
+
# Submit via our executor
|
|
434
|
+
httpcat gasless-submit-our \
|
|
435
|
+
--token-in 0x... \
|
|
436
|
+
--token-out 0x... \
|
|
437
|
+
--total-amount 1000000 \
|
|
438
|
+
--fee-amount 10000 \
|
|
439
|
+
--taker 0x... \
|
|
440
|
+
--permit2-signature 0x... \
|
|
441
|
+
--permit-nonce 0 \
|
|
442
|
+
--permit-deadline 1234567890
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**Cost:** $0.01 USDC
|
|
446
|
+
|
|
447
|
+
### Perps (Perpetual Futures)
|
|
448
|
+
|
|
449
|
+
Trade perpetual futures across multiple venues.
|
|
450
|
+
|
|
451
|
+
**CLI:**
|
|
452
|
+
|
|
453
|
+
```bash
|
|
454
|
+
# List available markets
|
|
455
|
+
httpcat perps markets
|
|
456
|
+
|
|
457
|
+
# Onboard wallet to venues (one-time setup)
|
|
458
|
+
httpcat perps onboard
|
|
459
|
+
|
|
460
|
+
# Deposit USDC to venues
|
|
461
|
+
httpcat perps deposit 1000
|
|
462
|
+
|
|
463
|
+
# Open a position
|
|
464
|
+
httpcat perps trade ETH-USD long 100 10
|
|
465
|
+
|
|
466
|
+
# View open positions
|
|
467
|
+
httpcat perps positions
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Subcommands:**
|
|
471
|
+
|
|
472
|
+
- `markets` - Get available markets ($0.01)
|
|
473
|
+
- `onboard` - One-time wallet setup (FREE)
|
|
474
|
+
- `deposit <amount>` - Deposit USDC (FREE)
|
|
475
|
+
- `trade <market> <side> <sizeUsd> <leverage>` - Open/close positions ($0.05)
|
|
476
|
+
- `positions` - View open positions ($0.01)
|
|
477
|
+
|
|
478
|
+
**Options:**
|
|
479
|
+
|
|
480
|
+
- `--venue <name>` - Filter by venue
|
|
481
|
+
- `--wallet <address>` - Wallet address (defaults to configured wallet)
|
|
482
|
+
- `--aster-api-key <key>` - Aster API key (for positions)
|
|
483
|
+
- `--aster-api-secret <secret>` - Aster API secret (for positions)
|
|
484
|
+
|
|
485
|
+
### Predictions
|
|
486
|
+
|
|
487
|
+
Interact with prediction markets on Polymarket and Azuro.
|
|
488
|
+
|
|
489
|
+
**CLI:**
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
# Browse markets
|
|
493
|
+
httpcat predictions markets
|
|
494
|
+
|
|
495
|
+
# Get market details
|
|
496
|
+
httpcat predictions market <marketId>
|
|
497
|
+
|
|
498
|
+
# Search markets
|
|
499
|
+
httpcat predictions search "bitcoin"
|
|
500
|
+
|
|
501
|
+
# Place a bet
|
|
502
|
+
httpcat predictions bet <marketId> <outcomeId> <amountUsd>
|
|
503
|
+
|
|
504
|
+
# Detect arbitrage opportunities
|
|
505
|
+
httpcat predictions detect-arbs
|
|
506
|
+
|
|
507
|
+
# Detect sophisticated traders
|
|
508
|
+
httpcat predictions detect-insiders
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**Subcommands:**
|
|
512
|
+
|
|
513
|
+
- `markets` - Browse markets ($0.01)
|
|
514
|
+
- `market <marketId>` - Get market details ($0.01)
|
|
515
|
+
- `search <query>` - Search markets ($0.01)
|
|
516
|
+
- `bet <marketId> <outcomeId> <amountUsd>` - Place bet ($0.05)
|
|
517
|
+
- `detect-arbs` - Find arbitrage opportunities (FREE)
|
|
518
|
+
- `calculate-hedge` - Calculate optimal hedge (FREE)
|
|
519
|
+
- `execute-arb` - Execute arbitrage trade ($0.20)
|
|
520
|
+
- `detect-insiders` - Detect sophisticated traders ($5.00)
|
|
521
|
+
|
|
522
|
+
**Options:**
|
|
523
|
+
|
|
524
|
+
- `--venue <name>` - Filter by venue
|
|
525
|
+
- `--category <category>` - Filter by category
|
|
526
|
+
- `--limit <number>` - Limit results
|
|
527
|
+
- `--wallet <address>` - Wallet address (defaults to configured wallet)
|
|
528
|
+
- `--polymarket-api-key <key>` - Polymarket API key
|
|
529
|
+
- `--polymarket-api-secret <secret>` - Polymarket API secret
|
|
530
|
+
|
|
531
|
+
### Market Intelligence (CoinGecko)
|
|
532
|
+
|
|
533
|
+
Research cryptocurrencies using CoinGecko market data.
|
|
534
|
+
|
|
535
|
+
**CLI:**
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
# Search for cryptocurrencies
|
|
539
|
+
httpcat market search bitcoin
|
|
540
|
+
httpcat market search "eth" --limit 10
|
|
541
|
+
|
|
542
|
+
# Get comprehensive coin data
|
|
543
|
+
httpcat market coin-data bitcoin
|
|
544
|
+
httpcat market coin-data ethereum --currency eur --sparkline
|
|
545
|
+
|
|
546
|
+
# Get historical price charts
|
|
547
|
+
httpcat market chart bitcoin 7
|
|
548
|
+
httpcat market chart ethereum 30 --currency eur
|
|
549
|
+
httpcat market chart bitcoin max --json
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Subcommands:**
|
|
553
|
+
|
|
554
|
+
- `search <query>` - Search cryptocurrencies by name or symbol (FREE)
|
|
555
|
+
- `coin-data <coinId>` - Get comprehensive market data ($0.001)
|
|
556
|
+
- `chart <coinId> <days>` - Get historical price chart ($0.01)
|
|
557
|
+
|
|
558
|
+
**Options:**
|
|
559
|
+
|
|
560
|
+
- `--limit <number>` - Maximum search results (default: 20, max: 100)
|
|
561
|
+
- `--currency <currency>` - Currency: usd, eur, btc (default: usd)
|
|
562
|
+
- `--sparkline` - Include 7-day sparkline chart
|
|
563
|
+
- `--interval <interval>` - Chart interval: daily or hourly (auto-selected)
|
|
564
|
+
|
|
565
|
+
**Examples:**
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
# Search for Bitcoin
|
|
569
|
+
httpcat market search bitcoin
|
|
570
|
+
|
|
571
|
+
# Get Bitcoin market data with sparkline
|
|
572
|
+
httpcat market coin-data bitcoin --sparkline
|
|
573
|
+
|
|
574
|
+
# Get 7-day hourly chart
|
|
575
|
+
httpcat market chart bitcoin 7
|
|
576
|
+
|
|
577
|
+
# Get max historical data (JSON for charting)
|
|
578
|
+
httpcat market chart bitcoin max --json
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
**Note:** Use `search` to find CoinGecko coin IDs (e.g., 'bitcoin', 'ethereum') for use with `coin-data` and `chart` commands.
|
|
582
|
+
|
|
583
|
+
### CEX.IO Trading
|
|
584
|
+
|
|
585
|
+
Trade on CEX.IO exchange via CLI. Monitor positions, place orders, and view market data.
|
|
586
|
+
|
|
587
|
+
**CLI:**
|
|
588
|
+
|
|
589
|
+
```bash
|
|
590
|
+
# Get all available markets
|
|
591
|
+
httpcat cex markets
|
|
592
|
+
httpcat cex markets --base BTC
|
|
593
|
+
|
|
594
|
+
# Get ticker for a trading pair
|
|
595
|
+
httpcat cex ticker BTC/USD
|
|
596
|
+
|
|
597
|
+
# Check account balance
|
|
598
|
+
httpcat cex balance
|
|
599
|
+
httpcat cex balance --currency BTC
|
|
600
|
+
|
|
601
|
+
# View order book
|
|
602
|
+
httpcat cex orderbook BTC/USD --depth 20
|
|
603
|
+
|
|
604
|
+
# List open orders
|
|
605
|
+
httpcat cex orders
|
|
606
|
+
httpcat cex orders --symbol BTC/USD
|
|
607
|
+
|
|
608
|
+
# View order history
|
|
609
|
+
httpcat cex order-history --status completed
|
|
610
|
+
httpcat cex order-history --symbol BTC/USD --since 2024-01-01T00:00:00Z
|
|
611
|
+
|
|
612
|
+
# View trade history
|
|
613
|
+
httpcat cex trade-history --symbol BTC/USD
|
|
614
|
+
|
|
615
|
+
# Place an order (requires confirmation)
|
|
616
|
+
httpcat cex place-order BTC/USD buy limit 0.1 --price 50000
|
|
617
|
+
|
|
618
|
+
# Cancel an order
|
|
619
|
+
httpcat cex cancel-order 12345
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**Subcommands:**
|
|
623
|
+
|
|
624
|
+
- `markets` - Get all trading pairs (FREE)
|
|
625
|
+
- `ticker <symbol>` - Get ticker information (FREE)
|
|
626
|
+
- `balance` - Get account balances ($0.001)
|
|
627
|
+
- `orderbook <symbol>` - Get order book ($0.001)
|
|
628
|
+
- `orders` - Get open orders ($0.001)
|
|
629
|
+
- `order-history` - Get order history ($0.01)
|
|
630
|
+
- `trade-history` - Get trade history ($0.01)
|
|
631
|
+
- `place-order` - Place buy/sell order ($0.05) **HIGH RISK**
|
|
632
|
+
- `cancel-order <orderId>` - Cancel order ($0.01)
|
|
633
|
+
|
|
634
|
+
**Options:**
|
|
635
|
+
|
|
636
|
+
- `--base <currency>` - Filter by base currency (markets)
|
|
637
|
+
- `--quote <currency>` - Filter by quote currency (markets)
|
|
638
|
+
- `--currency <currency>` - Filter by currency (balance)
|
|
639
|
+
- `--depth <depth>` - Order book depth (default: 20, max: 100)
|
|
640
|
+
- `--symbol <symbol>` - Filter by trading pair
|
|
641
|
+
- `--status <status>` - Filter by status: completed, canceled, failed, all
|
|
642
|
+
- `--limit <limit>` - Maximum results
|
|
643
|
+
- `--since <timestamp>` - ISO timestamp filter
|
|
644
|
+
- `--until <timestamp>` - ISO timestamp filter (trade-history)
|
|
645
|
+
- `--price <price>` - Order price (required for limit/stop-limit)
|
|
646
|
+
- `--stop-price <price>` - Stop price (for stop-limit orders)
|
|
647
|
+
- `--confirm` - Skip confirmation prompt (use with caution)
|
|
648
|
+
|
|
649
|
+
**Security Notes:**
|
|
650
|
+
|
|
651
|
+
- `place-order` executes real trades - always requires confirmation unless `--confirm` flag is used
|
|
652
|
+
- Symbol formats supported: `BTC/USD`, `BTC-USD`, or `BTCUSD`
|
|
653
|
+
- Market orders execute immediately; limit orders wait for price
|
|
654
|
+
- Backend must have CEX.IO API credentials configured
|
|
655
|
+
|
|
656
|
+
**Examples:**
|
|
657
|
+
|
|
658
|
+
```bash
|
|
659
|
+
# View all BTC markets
|
|
660
|
+
httpcat cex markets --base BTC
|
|
661
|
+
|
|
662
|
+
# Get BTC/USD ticker
|
|
663
|
+
httpcat cex ticker BTC/USD
|
|
664
|
+
|
|
665
|
+
# Check your balance
|
|
666
|
+
httpcat cex balance
|
|
667
|
+
|
|
668
|
+
# View order book
|
|
669
|
+
httpcat cex orderbook BTC/USD
|
|
670
|
+
|
|
671
|
+
# Place a limit buy order (will prompt for confirmation)
|
|
672
|
+
httpcat cex place-order BTC/USD buy limit 0.1 --price 50000
|
|
673
|
+
|
|
674
|
+
# Place a market sell order
|
|
675
|
+
httpcat cex place-order ETH/USD sell market 2.0
|
|
676
|
+
```
|
|
677
|
+
|
|
331
678
|
### Token Info
|
|
332
679
|
|
|
333
680
|
Get detailed information about a token.
|
|
@@ -469,6 +816,7 @@ httpcat --json claim "My Token"
|
|
|
469
816
|
**Output:**
|
|
470
817
|
|
|
471
818
|
When viewing (without `--execute`):
|
|
819
|
+
|
|
472
820
|
- Total accumulated fees (tokens and USDC)
|
|
473
821
|
- Creator share (80%)
|
|
474
822
|
- Platform share (20%)
|
|
@@ -476,6 +824,7 @@ When viewing (without `--execute`):
|
|
|
476
824
|
- V4 position details (if applicable)
|
|
477
825
|
|
|
478
826
|
When claiming (with `--execute`):
|
|
827
|
+
|
|
479
828
|
- Transaction hash
|
|
480
829
|
- Fees claimed (tokens and USDC)
|
|
481
830
|
- Creator and platform shares distribution
|
|
@@ -515,6 +864,7 @@ httpcat --json transactions --offset 50
|
|
|
515
864
|
**Output:**
|
|
516
865
|
|
|
517
866
|
For each transaction:
|
|
867
|
+
|
|
518
868
|
- Transaction type (buy, sell, or airdrop)
|
|
519
869
|
- Status (pending, success, or failed)
|
|
520
870
|
- Token information (name, symbol, ID)
|
|
@@ -596,6 +946,7 @@ httpcat --json account
|
|
|
596
946
|
**Output:**
|
|
597
947
|
|
|
598
948
|
Account information includes:
|
|
949
|
+
|
|
599
950
|
- Account index and type (Seed-Derived or Custom)
|
|
600
951
|
- Wallet address (checksummed)
|
|
601
952
|
- ETH balance (for gas fees)
|
|
@@ -603,7 +954,7 @@ Account information includes:
|
|
|
603
954
|
- CAT balance (402CAT token)
|
|
604
955
|
- All positions (if any) with P&L
|
|
605
956
|
|
|
606
|
-
**Cost:**
|
|
957
|
+
**Cost:** $0.01 USDC (for positions data; balances are free)
|
|
607
958
|
|
|
608
959
|
**Security Note:** All accounts share the same password protection when password is enabled. Switch accounts anytime using the `--account` flag or `account switch` command.
|
|
609
960
|
|
|
@@ -625,6 +976,73 @@ httpcat health
|
|
|
625
976
|
|
|
626
977
|
**Cost:** $0.0001 USDC (or 402 response)
|
|
627
978
|
|
|
979
|
+
### Call x402 Endpoint
|
|
980
|
+
|
|
981
|
+
Call an arbitrary x402-protected HTTP endpoint with automatic payment handling. This allows you to interact with any x402-enabled API, not just the httpcat agent.
|
|
982
|
+
|
|
983
|
+
**CLI:**
|
|
984
|
+
|
|
985
|
+
```bash
|
|
986
|
+
# POST request with JSON body
|
|
987
|
+
httpcat call https://example.com/api/endpoint --method POST --body '{"key": "value"}'
|
|
988
|
+
|
|
989
|
+
# GET request
|
|
990
|
+
httpcat call https://example.com/api/endpoint --method GET
|
|
991
|
+
|
|
992
|
+
# POST with body from stdin
|
|
993
|
+
echo '{"data": "test"}' | httpcat call https://example.com/api/endpoint --body -
|
|
994
|
+
|
|
995
|
+
# With custom headers
|
|
996
|
+
httpcat call https://example.com/api/endpoint \
|
|
997
|
+
--header "X-Custom-Header: value" \
|
|
998
|
+
--header "Authorization: Bearer token"
|
|
999
|
+
```
|
|
1000
|
+
|
|
1001
|
+
**Options:**
|
|
1002
|
+
|
|
1003
|
+
- `<url>` (required) - The full URL of the x402 endpoint
|
|
1004
|
+
- `-m, --method <method>` - HTTP method: GET, POST, PUT, DELETE, or PATCH (default: POST)
|
|
1005
|
+
- `-b, --body <body>` - Request body as JSON string, or `-` to read from stdin
|
|
1006
|
+
- `-H, --header <header>` - Additional HTTP headers (format: "Key: Value"), can be specified multiple times
|
|
1007
|
+
- `-k, --private-key <key>` - Override private key (optional)
|
|
1008
|
+
|
|
1009
|
+
**Response:**
|
|
1010
|
+
|
|
1011
|
+
The command returns:
|
|
1012
|
+
|
|
1013
|
+
- HTTP status code and status text
|
|
1014
|
+
- Response headers
|
|
1015
|
+
- Response body (parsed as JSON if possible, otherwise raw text)
|
|
1016
|
+
|
|
1017
|
+
**Payment:**
|
|
1018
|
+
|
|
1019
|
+
The command automatically handles x402 payment flows. If the endpoint requires payment, the command will:
|
|
1020
|
+
|
|
1021
|
+
1. Receive a 402 Payment Required response
|
|
1022
|
+
2. Generate a payment signature
|
|
1023
|
+
3. Retry the request with the payment header
|
|
1024
|
+
4. Return the final response
|
|
1025
|
+
|
|
1026
|
+
**Cost:** Varies by endpoint (determined by the x402 endpoint you're calling)
|
|
1027
|
+
|
|
1028
|
+
**Examples:**
|
|
1029
|
+
|
|
1030
|
+
```bash
|
|
1031
|
+
# Call a paid API endpoint
|
|
1032
|
+
httpcat call https://api.example.com/compute --method POST --body '{"input": "data"}'
|
|
1033
|
+
|
|
1034
|
+
# Make a GET request
|
|
1035
|
+
httpcat call https://api.example.com/status --method GET
|
|
1036
|
+
|
|
1037
|
+
# Pipe JSON from file
|
|
1038
|
+
cat request.json | httpcat call https://api.example.com/process --body -
|
|
1039
|
+
|
|
1040
|
+
# With authentication header
|
|
1041
|
+
httpcat call https://api.example.com/protected \
|
|
1042
|
+
--header "Authorization: Bearer your-token" \
|
|
1043
|
+
--method GET
|
|
1044
|
+
```
|
|
1045
|
+
|
|
628
1046
|
### Chat
|
|
629
1047
|
|
|
630
1048
|
Start streaming chat with the httpcat community. Join general chat or token-specific discussions.
|
|
@@ -686,98 +1104,533 @@ While in a chat session, you can use these commands:
|
|
|
686
1104
|
|
|
687
1105
|
**Note:** For AI agents, consider using MCP tools (`chat_join`, `chat_send_message`, etc.) instead of CLI streaming for better integration. See [MCP Chat Tools](#chat-tools-usage-example) section.
|
|
688
1106
|
|
|
689
|
-
### Cat
|
|
1107
|
+
### Cat (Interactive AI Assistant)
|
|
690
1108
|
|
|
691
|
-
Interact with an AI-powered
|
|
1109
|
+
Interact with an AI-powered assistant that can help you with token operations, portfolio management, and more using natural language.
|
|
692
1110
|
|
|
693
1111
|
**Interactive:**
|
|
694
1112
|
|
|
695
1113
|
```bash
|
|
696
|
-
httpcat>
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
httpcat> cat --chat # Same thing
|
|
700
|
-
httpcat> agent --setup # Configure API key/provider
|
|
701
|
-
httpcat> cat --setup # Same thing
|
|
702
|
-
```
|
|
703
|
-
|
|
704
|
-
**CLI:**
|
|
705
|
-
|
|
706
|
-
```bash
|
|
707
|
-
httpcat agent "Buy 100 WOW tokens"
|
|
708
|
-
httpcat cat "What tokens do I own?"
|
|
709
|
-
httpcat agent --chat
|
|
710
|
-
httpcat cat --chat
|
|
711
|
-
httpcat agent --setup
|
|
712
|
-
httpcat cat --setup
|
|
1114
|
+
httpcat> cat
|
|
1115
|
+
# Starts interactive AI chat session
|
|
1116
|
+
# Type /exit to quit
|
|
713
1117
|
```
|
|
714
1118
|
|
|
715
1119
|
**Usage:**
|
|
716
1120
|
|
|
717
|
-
|
|
718
|
-
- `agent --chat` or `cat --chat` - Enter interactive chat mode for extended conversations
|
|
719
|
-
- `agent --setup` or `cat --setup` - Configure or reconfigure your AI provider (OpenAI or Anthropic) and API key
|
|
1121
|
+
The `cat` command starts an interactive AI assistant session where you can ask questions and give trading commands in natural language. The assistant will execute operations on your behalf.
|
|
720
1122
|
|
|
721
1123
|
**First-Time Setup:**
|
|
722
1124
|
|
|
723
|
-
Before using the cat
|
|
1125
|
+
Before using the cat command, you'll need to configure your AI provider:
|
|
724
1126
|
|
|
725
1127
|
```bash
|
|
726
|
-
httpcat
|
|
727
|
-
# or
|
|
728
|
-
httpcat> cat --setup
|
|
1128
|
+
httpcat config
|
|
729
1129
|
```
|
|
730
1130
|
|
|
731
|
-
|
|
1131
|
+
During setup, you'll be prompted to:
|
|
1132
|
+
|
|
732
1133
|
- Choose an AI provider (OpenAI or Anthropic)
|
|
733
1134
|
- Enter your API key
|
|
734
1135
|
- Select a model (defaults provided)
|
|
735
1136
|
|
|
736
1137
|
**How It Works:**
|
|
737
1138
|
|
|
738
|
-
The cat uses
|
|
1139
|
+
The cat assistant uses AI (powered by OpenAI GPT-4 or Anthropic Claude) to understand natural language requests and execute token operations on your behalf. It can:
|
|
1140
|
+
|
|
739
1141
|
- Buy and sell tokens
|
|
740
1142
|
- Check balances and positions
|
|
741
1143
|
- List tokens
|
|
742
1144
|
- Get token information
|
|
1145
|
+
- Answer questions about your portfolio
|
|
743
1146
|
- And more!
|
|
744
1147
|
|
|
745
1148
|
**Note:** The cat requires an API key from either OpenAI or Anthropic. Your API key is stored locally and encrypted, and is only sent to the LLM provider - never to any other server.
|
|
746
1149
|
|
|
1150
|
+
### Agent (Autonomous Trading)
|
|
1151
|
+
|
|
1152
|
+
Configure and run an autonomous trading agent that monitors token events and makes trading decisions based on your risk parameters.
|
|
1153
|
+
|
|
1154
|
+
**Interactive:**
|
|
1155
|
+
|
|
1156
|
+
```bash
|
|
1157
|
+
httpcat> agent setup # Configure autonomous trading settings
|
|
1158
|
+
```
|
|
1159
|
+
|
|
1160
|
+
**CLI:**
|
|
1161
|
+
|
|
1162
|
+
```bash
|
|
1163
|
+
httpcat agent setup
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
**Configuration Options:**
|
|
1167
|
+
|
|
1168
|
+
When setting up the autonomous agent, you can configure:
|
|
1169
|
+
|
|
1170
|
+
- **Max Trade Amount** - Maximum USDC per trade
|
|
1171
|
+
- **Risk Tolerance** - Conservative, moderate, or aggressive
|
|
1172
|
+
- **Token Filters** - Minimum holders, max whale percentage, min liquidity
|
|
1173
|
+
- **Trading Thresholds** - Stop loss and take profit percentages
|
|
1174
|
+
- **Auto-Execute** - Enable automatic trade execution or recommendation-only mode
|
|
1175
|
+
|
|
1176
|
+
**How It Works:**
|
|
1177
|
+
|
|
1178
|
+
The autonomous agent:
|
|
1179
|
+
|
|
1180
|
+
1. Monitors real-time token events via event stream
|
|
1181
|
+
2. Analyzes tokens based on your configured filters and risk parameters
|
|
1182
|
+
3. Makes trading decisions using AI reasoning
|
|
1183
|
+
4. Either executes trades automatically or provides recommendations (based on your settings)
|
|
1184
|
+
5. Tracks positions and maintains a decision history database
|
|
1185
|
+
|
|
1186
|
+
**Note:** The autonomous agent requires AI provider configuration (same as the `cat` command). Always start with recommendation-only mode before enabling auto-execution.
|
|
1187
|
+
|
|
747
1188
|
### Help
|
|
748
1189
|
|
|
749
1190
|
Display help information for httpcat.
|
|
750
1191
|
|
|
751
|
-
**CLI:**
|
|
1192
|
+
**CLI:**
|
|
1193
|
+
|
|
1194
|
+
```bash
|
|
1195
|
+
httpcat help
|
|
1196
|
+
httpcat --help
|
|
1197
|
+
httpcat -h
|
|
1198
|
+
```
|
|
1199
|
+
|
|
1200
|
+
All three commands show the same help output with available commands and options.
|
|
1201
|
+
|
|
1202
|
+
### Configuration
|
|
1203
|
+
|
|
1204
|
+
Manage your httpcat configuration.
|
|
1205
|
+
|
|
1206
|
+
**Interactive:**
|
|
1207
|
+
|
|
1208
|
+
```bash
|
|
1209
|
+
httpcat> config -s # Show current config
|
|
1210
|
+
httpcat> config -S network=base # Update a setting
|
|
1211
|
+
httpcat> config -r # Re-run setup wizard
|
|
1212
|
+
```
|
|
1213
|
+
|
|
1214
|
+
**CLI:**
|
|
1215
|
+
|
|
1216
|
+
```bash
|
|
1217
|
+
httpcat config # Run setup wizard
|
|
1218
|
+
httpcat config -s # Show current config (JSON)
|
|
1219
|
+
httpcat config -S network=base # Update a setting
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
### Sign
|
|
1223
|
+
|
|
1224
|
+
Cryptographic signing operations for messages, files, transactions, and structured data.
|
|
1225
|
+
|
|
1226
|
+
**Interactive:**
|
|
1227
|
+
|
|
1228
|
+
```bash
|
|
1229
|
+
httpcat> sign # Enter interactive signing mode
|
|
1230
|
+
```
|
|
1231
|
+
|
|
1232
|
+
**CLI:**
|
|
1233
|
+
|
|
1234
|
+
```bash
|
|
1235
|
+
# Sign a message (EIP-191)
|
|
1236
|
+
httpcat sign message "Hello, world!"
|
|
1237
|
+
httpcat sign message --file message.txt
|
|
1238
|
+
echo "Hello" | httpcat sign message --stdin
|
|
1239
|
+
|
|
1240
|
+
# Sign a file
|
|
1241
|
+
httpcat sign file document.pdf
|
|
1242
|
+
httpcat sign file document.pdf --hash-algorithm keccak256
|
|
1243
|
+
|
|
1244
|
+
# Sign a transaction
|
|
1245
|
+
httpcat sign transaction '{"to":"0x...","value":"1000000000000000000"}'
|
|
1246
|
+
|
|
1247
|
+
# Sign EIP-712 structured data
|
|
1248
|
+
httpcat sign eip712 --domain '{"name":"MyApp"}' --types '{}' --message '{}'
|
|
1249
|
+
|
|
1250
|
+
# Sign Permit2 authorization
|
|
1251
|
+
httpcat sign permit2 --token 0x... --amount 1000000 --spender 0x...
|
|
1252
|
+
|
|
1253
|
+
# Batch sign multiple items
|
|
1254
|
+
httpcat sign batch '{"messages":["Hello","World"],"files":["doc1.pdf","doc2.pdf"]}'
|
|
1255
|
+
|
|
1256
|
+
# Verify a signature
|
|
1257
|
+
httpcat sign verify --signature 0x... --message "Hello, world!"
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
**Subcommands:**
|
|
1261
|
+
|
|
1262
|
+
- `sign message [message]` - Sign a message using EIP-191 personal sign
|
|
1263
|
+
- `sign file <path>` - Sign a file (hash + EIP-191 signature)
|
|
1264
|
+
- `sign transaction <tx-json>` - Sign a transaction (EIP-155)
|
|
1265
|
+
- `sign eip712` - Sign EIP-712 structured data
|
|
1266
|
+
- `sign permit2` - Sign Permit2 token authorization
|
|
1267
|
+
- `sign batch <batch-json>` - Batch sign multiple messages/files
|
|
1268
|
+
- `sign verify` - Verify a signature
|
|
1269
|
+
|
|
1270
|
+
**Options:**
|
|
1271
|
+
|
|
1272
|
+
- `--file <path>` - Read message from file (message subcommand)
|
|
1273
|
+
- `--stdin` - Read message from stdin (message subcommand)
|
|
1274
|
+
- `--output <file>` - Save signature to file
|
|
1275
|
+
- `--format <hex|rsv|compact>` - Signature format (default: hex)
|
|
1276
|
+
- `--hash-algorithm <sha256|keccak256>` - Hash algorithm for files (default: sha256)
|
|
1277
|
+
- `--verify` - Verify signature after signing
|
|
1278
|
+
- `--nonce <nonce>` - Nonce for Permit2 (auto-generated if not provided)
|
|
1279
|
+
- `--deadline <timestamp>` - Deadline for Permit2 (auto-generated if not provided)
|
|
1280
|
+
|
|
1281
|
+
**Examples:**
|
|
1282
|
+
|
|
1283
|
+
```bash
|
|
1284
|
+
# Sign a message and verify
|
|
1285
|
+
httpcat sign message "Hello, world!" --verify
|
|
1286
|
+
|
|
1287
|
+
# Sign a file and save to output file
|
|
1288
|
+
httpcat sign file document.pdf --output signature.json
|
|
1289
|
+
|
|
1290
|
+
# Sign with different format
|
|
1291
|
+
httpcat sign message "Test" --format rsv
|
|
1292
|
+
|
|
1293
|
+
# Sign Permit2 with auto-generated nonce and deadline
|
|
1294
|
+
httpcat sign permit2 --token 0x... --amount 1000000 --spender 0x...
|
|
1295
|
+
|
|
1296
|
+
# Verify an EIP-712 signature
|
|
1297
|
+
httpcat sign verify --signature 0x... --message '{}' --type eip712 \
|
|
1298
|
+
--domain '{"name":"MyApp"}' --types '{}' --primary-type Message
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
**Cost:** $0.001 USDC per signature preparation (signing is done locally)
|
|
1302
|
+
|
|
1303
|
+
**Note:** Signatures are created locally using your private key. The backend only prepares the signature data; actual signing happens client-side for security.
|
|
1304
|
+
|
|
1305
|
+
## Command Groups
|
|
1306
|
+
|
|
1307
|
+
httpcat organizes commands into logical groups for better discoverability. Many commands are available both as top-level commands (for backward compatibility) and as grouped commands.
|
|
1308
|
+
|
|
1309
|
+
### Launchpad (`launchpad` or `lp`)
|
|
1310
|
+
|
|
1311
|
+
Token creation and trading on the bonding curve.
|
|
1312
|
+
|
|
1313
|
+
**Subcommands:**
|
|
1314
|
+
|
|
1315
|
+
- `launchpad create <name> <symbol>` - Create a new token ($0.01)
|
|
1316
|
+
- `launchpad buy <identifier> <amount>` - Buy tokens (amount + 1% fee)
|
|
1317
|
+
- `launchpad sell <identifier> <amount|percentage|all>` - Sell tokens (1% fee)
|
|
1318
|
+
- `launchpad list` - List all tokens ($0.0001)
|
|
1319
|
+
- `launchpad info <identifier>` - Get token information ($0.0001)
|
|
1320
|
+
- `launchpad positions` - Get all positions ($0.01)
|
|
1321
|
+
- `launchpad fees view <identifier>` - View LP fees (FREE)
|
|
1322
|
+
- `launchpad fees claim <identifier> --execute` - Claim LP fees (gas fees)
|
|
1323
|
+
|
|
1324
|
+
**Examples:**
|
|
1325
|
+
|
|
1326
|
+
```bash
|
|
1327
|
+
httpcat launchpad create "My Token" "MTK"
|
|
1328
|
+
httpcat launchpad buy MTK 0.10
|
|
1329
|
+
httpcat launchpad sell MTK 50%
|
|
1330
|
+
httpcat launchpad list --sort mcap
|
|
1331
|
+
httpcat launchpad info MTK
|
|
1332
|
+
httpcat launchpad positions --active
|
|
1333
|
+
httpcat launchpad fees view MTK
|
|
1334
|
+
httpcat launchpad fees claim MTK --execute
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
**Alias:** `lp` (e.g., `httpcat lp create "Token" "TKN"`)
|
|
1338
|
+
|
|
1339
|
+
**Note:** Top-level commands `create`, `buy`, `sell`, `list`, `info`, `positions`, and `claim` are deprecated but still work. Use the `launchpad` group for new scripts.
|
|
1340
|
+
|
|
1341
|
+
### Portfolio (`portfolio` or `pf`)
|
|
1342
|
+
|
|
1343
|
+
Portfolio management and financial data.
|
|
1344
|
+
|
|
1345
|
+
**Subcommands:**
|
|
1346
|
+
|
|
1347
|
+
- `portfolio balances` - Check wallet balances (FREE)
|
|
1348
|
+
- `portfolio positions` - Get all positions across products (FREE)
|
|
1349
|
+
- `portfolio summary` - Portfolio overview ($0.01)
|
|
1350
|
+
- `portfolio pnl` - Profit and loss analysis ($0.01)
|
|
1351
|
+
- `portfolio transactions` - Transaction history (varies)
|
|
1352
|
+
|
|
1353
|
+
**Examples:**
|
|
1354
|
+
|
|
1355
|
+
```bash
|
|
1356
|
+
httpcat portfolio balances
|
|
1357
|
+
httpcat portfolio positions --active
|
|
1358
|
+
httpcat portfolio summary
|
|
1359
|
+
httpcat portfolio pnl --timeframe 7d
|
|
1360
|
+
httpcat portfolio transactions --type buy
|
|
1361
|
+
```
|
|
1362
|
+
|
|
1363
|
+
**Alias:** `pf` (e.g., `httpcat pf balances`)
|
|
1364
|
+
|
|
1365
|
+
**Note:** Top-level `balances`, `positions`, and `transactions` commands are deprecated but still work.
|
|
1366
|
+
|
|
1367
|
+
### Trade (`trade` or `t`)
|
|
1368
|
+
|
|
1369
|
+
Trading operations including swaps, perps, and predictions.
|
|
1370
|
+
|
|
1371
|
+
**Subcommands:**
|
|
1372
|
+
|
|
1373
|
+
- `trade swap <tokenIn> <tokenOut> <amount>` - Token swap ($0.10 standard, $1.00 shielded)
|
|
1374
|
+
- `trade perps markets` - Perpetual futures markets ($0.01)
|
|
1375
|
+
- `trade perps onboard` - Onboard to perps venues (FREE)
|
|
1376
|
+
- `trade perps deposit <amount>` - Deposit to perps (FREE)
|
|
1377
|
+
- `trade perps trade <market> <side> <sizeUsd> <leverage>` - Trade perps ($0.05)
|
|
1378
|
+
- `trade perps positions` - View perps positions ($0.01)
|
|
1379
|
+
- `trade predictions markets` - Prediction markets ($0.01)
|
|
1380
|
+
- `trade predictions market <marketId>` - Market details ($0.01)
|
|
1381
|
+
- `trade predictions search <query>` - Search markets ($0.01)
|
|
1382
|
+
- `trade predictions bet <marketId> <outcomeId> <amountUsd>` - Place bet ($0.05)
|
|
1383
|
+
|
|
1384
|
+
**Examples:**
|
|
1385
|
+
|
|
1386
|
+
```bash
|
|
1387
|
+
httpcat trade swap USDC WETH 1.0
|
|
1388
|
+
httpcat trade swap USDC WETH 1.0 --shielded
|
|
1389
|
+
httpcat trade perps markets
|
|
1390
|
+
httpcat trade perps trade ETH-USD long 100 10
|
|
1391
|
+
httpcat trade predictions markets
|
|
1392
|
+
httpcat trade predictions bet polymarket:abc123 outcome1 10
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
**Alias:** `t` (e.g., `httpcat t swap USDC WETH 1.0`)
|
|
1396
|
+
|
|
1397
|
+
**Note:** The `trade` group is a container. Perps and predictions are also available as top-level commands (`httpcat perps`, `httpcat predictions`). Swaps are available as top-level `httpcat swap`.
|
|
1398
|
+
|
|
1399
|
+
### System (`system` or `sys`)
|
|
1400
|
+
|
|
1401
|
+
System operations and health checks.
|
|
1402
|
+
|
|
1403
|
+
**Subcommands:**
|
|
1404
|
+
|
|
1405
|
+
- `system health` - Check system health (FREE)
|
|
1406
|
+
- `system status` - Get system status ($0.001)
|
|
1407
|
+
- `system limits` - Display API rate limits (FREE)
|
|
1408
|
+
- `system sources` - List data sources (FREE)
|
|
1409
|
+
|
|
1410
|
+
**Examples:**
|
|
1411
|
+
|
|
1412
|
+
```bash
|
|
1413
|
+
httpcat system health
|
|
1414
|
+
httpcat system status
|
|
1415
|
+
httpcat system limits
|
|
1416
|
+
httpcat system sources
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
**Alias:** `sys` (e.g., `httpcat sys health`)
|
|
1420
|
+
|
|
1421
|
+
**Note:** Top-level `health` command is deprecated but still works.
|
|
1422
|
+
|
|
1423
|
+
### Tools (`tools`)
|
|
1424
|
+
|
|
1425
|
+
EVM development and interaction utilities.
|
|
1426
|
+
|
|
1427
|
+
**Subcommands:**
|
|
1428
|
+
|
|
1429
|
+
#### Address Utilities
|
|
1430
|
+
|
|
1431
|
+
- `tools address validate <address>` - Validate Ethereum address (FREE)
|
|
1432
|
+
- `tools address checksum <address>` - Convert to checksummed format (FREE)
|
|
1433
|
+
- `tools address derive <seed> <index>` - Derive address from seed (FREE)
|
|
1434
|
+
- `tools address balance <address>` - Get address balance (FREE)
|
|
1435
|
+
|
|
1436
|
+
#### ABI Utilities
|
|
1437
|
+
|
|
1438
|
+
- `tools abi encode <abi> <function> <args...>` - Encode function call (FREE)
|
|
1439
|
+
- `tools abi decode <abi> <function> <data>` - Decode function result (FREE)
|
|
1440
|
+
- `tools abi parse <abi>` - Parse and validate ABI (FREE)
|
|
1441
|
+
|
|
1442
|
+
#### Transaction Utilities
|
|
1443
|
+
|
|
1444
|
+
- `tools tx build <tx-json>` - Build transaction (FREE)
|
|
1445
|
+
- `tools tx encode <tx-json>` - Encode transaction (FREE)
|
|
1446
|
+
- `tools tx decode <tx-hex>` - Decode transaction (FREE)
|
|
1447
|
+
- `tools tx simulate <tx-json>` - Simulate transaction ($0.001)
|
|
1448
|
+
- `tools tx estimate-gas <tx-json>` - Estimate gas ($0.001)
|
|
1449
|
+
- `tools tx prepare <tx-json>` - Prepare transaction for signing (FREE)
|
|
1450
|
+
|
|
1451
|
+
#### Signature Utilities
|
|
1452
|
+
|
|
1453
|
+
- `tools signature eip191 <message>` - EIP-191 signature (FREE)
|
|
1454
|
+
- `tools signature eip712 <domain> <types> <message>` - EIP-712 signature (FREE)
|
|
1455
|
+
- `tools signature permit2 <token> <amount> <spender>` - Permit2 signature (FREE)
|
|
1456
|
+
|
|
1457
|
+
#### Multicall Utilities
|
|
1458
|
+
|
|
1459
|
+
- `tools multicall encode <calls-json>` - Encode multicall (FREE)
|
|
1460
|
+
- `tools multicall decode <data>` - Decode multicall result (FREE)
|
|
1461
|
+
|
|
1462
|
+
#### Nonce Utilities
|
|
1463
|
+
|
|
1464
|
+
- `tools nonce get <address>` - Get current nonce (FREE)
|
|
1465
|
+
- `tools nonce predict <address>` - Predict next nonce (FREE)
|
|
1466
|
+
|
|
1467
|
+
#### Gas Utilities
|
|
1468
|
+
|
|
1469
|
+
- `tools gas price` - Get current gas price (FREE)
|
|
1470
|
+
- `tools gas estimate <tx-json>` - Estimate gas for transaction ($0.001)
|
|
1471
|
+
- `tools gas optimize <tx-json>` - Optimize gas settings (FREE)
|
|
1472
|
+
|
|
1473
|
+
#### x402 Endpoint Call
|
|
1474
|
+
|
|
1475
|
+
- `tools call <endpoint> [options]` - Call arbitrary x402 endpoint (varies)
|
|
1476
|
+
|
|
1477
|
+
**Examples:**
|
|
1478
|
+
|
|
1479
|
+
```bash
|
|
1480
|
+
httpcat tools address validate 0x1234...
|
|
1481
|
+
httpcat tools abi encode '[{"inputs":...}]' transfer 0x... 1000
|
|
1482
|
+
httpcat tools tx build '{"to":"0x...","value":"1000000000000000000"}'
|
|
1483
|
+
httpcat tools signature eip712 '{"name":"App"}' '{}' '{"message":"Hello"}'
|
|
1484
|
+
httpcat tools gas price
|
|
1485
|
+
httpcat tools call /api/endpoint --method POST --body '{"data":"value"}'
|
|
1486
|
+
```
|
|
1487
|
+
|
|
1488
|
+
### Security (`security`)
|
|
1489
|
+
|
|
1490
|
+
Security and safety analysis tools.
|
|
1491
|
+
|
|
1492
|
+
**Subcommands:**
|
|
1493
|
+
|
|
1494
|
+
- `security token-scan <tokenAddress>` - Comprehensive token safety scan ($0.01)
|
|
1495
|
+
- `security allowances <wallet> <token>` - Check token allowances ($0.001)
|
|
1496
|
+
- `security revoke-allowance <token> <spender>` - Generate revoke transaction (FREE)
|
|
1497
|
+
|
|
1498
|
+
**Examples:**
|
|
1499
|
+
|
|
1500
|
+
```bash
|
|
1501
|
+
httpcat security token-scan 0x1234...
|
|
1502
|
+
httpcat security allowances 0x... 0x...
|
|
1503
|
+
httpcat security revoke-allowance 0x... 0x...
|
|
1504
|
+
```
|
|
1505
|
+
|
|
1506
|
+
### Risk (`risk`)
|
|
1507
|
+
|
|
1508
|
+
Risk management and policy tools.
|
|
1509
|
+
|
|
1510
|
+
**Subcommands:**
|
|
1511
|
+
|
|
1512
|
+
- `risk policy [--wallet <address>] [--set <json>]` - Get or set risk policy ($0.001)
|
|
1513
|
+
- `risk evaluate <wallet> <trade-json>` - Evaluate trade against policy ($0.001)
|
|
1514
|
+
|
|
1515
|
+
**Examples:**
|
|
1516
|
+
|
|
1517
|
+
```bash
|
|
1518
|
+
httpcat risk policy --wallet 0x...
|
|
1519
|
+
httpcat risk policy --set '{"maxPositionSize":"1000","maxLeverage":10}'
|
|
1520
|
+
httpcat risk evaluate 0x... '{"token":"0x...","amount":"100"}'
|
|
1521
|
+
```
|
|
1522
|
+
|
|
1523
|
+
### Opportunities (`opps`)
|
|
1524
|
+
|
|
1525
|
+
DeFi opportunity discovery.
|
|
1526
|
+
|
|
1527
|
+
**Subcommands:**
|
|
1528
|
+
|
|
1529
|
+
- `opps arbitrage [--min-profit <amount>]` - Discover arbitrage opportunities ($0.01)
|
|
1530
|
+
- `opps funding [--min-rate <rate>]` - Discover funding opportunities ($0.01)
|
|
1531
|
+
- `opps yield [--min-apy <apy>]` - Find yield farming opportunities ($0.01)
|
|
1532
|
+
- `opps liquidations` - Detect liquidation opportunities ($0.01)
|
|
1533
|
+
- `opps execute <opportunityId>` - Execute discovered opportunity (varies)
|
|
1534
|
+
|
|
1535
|
+
**Examples:**
|
|
1536
|
+
|
|
1537
|
+
```bash
|
|
1538
|
+
httpcat opps arbitrage --min-profit 10
|
|
1539
|
+
httpcat opps funding --min-rate 0.01
|
|
1540
|
+
httpcat opps yield --min-apy 5
|
|
1541
|
+
httpcat opps liquidations
|
|
1542
|
+
httpcat opps execute opp-123
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1545
|
+
### Automation (`automation`)
|
|
1546
|
+
|
|
1547
|
+
Automation and monitoring tools.
|
|
1548
|
+
|
|
1549
|
+
**Subcommands:**
|
|
1550
|
+
|
|
1551
|
+
- `automation alerts [--wallet <address>] [--create <json>] [--delete <alertId>]` - Manage alerts ($0.001)
|
|
1552
|
+
- `automation webhooks [--wallet <address>] [--register <url>]` - Manage webhooks ($0.001)
|
|
1553
|
+
- `automation jobs [--create <json>] [--status <jobId>]` - Manage automation jobs ($0.01)
|
|
1554
|
+
|
|
1555
|
+
**Examples:**
|
|
1556
|
+
|
|
1557
|
+
```bash
|
|
1558
|
+
httpcat automation alerts --wallet 0x...
|
|
1559
|
+
httpcat automation alerts --create '{"type":"price","condition":"above","value":"100"}'
|
|
1560
|
+
httpcat automation webhooks --register https://example.com/webhook
|
|
1561
|
+
httpcat automation jobs --create '{"type":"rebalance","schedule":"daily"}'
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
### Send (`send`)
|
|
1565
|
+
|
|
1566
|
+
Send native currency, tokens, or batch transactions.
|
|
1567
|
+
|
|
1568
|
+
**Subcommands:**
|
|
1569
|
+
|
|
1570
|
+
- `send eth <to> <amount>` - Send native ETH
|
|
1571
|
+
- `send token <token> <to> <amount>` - Send ERC20 token
|
|
1572
|
+
- `send batch <batch-json>` - Batch send multiple transactions
|
|
1573
|
+
- `send tx <tx-json>` - Send custom transaction
|
|
1574
|
+
|
|
1575
|
+
**Token Aliases:**
|
|
1576
|
+
|
|
1577
|
+
- `usdc` - USDC token
|
|
1578
|
+
- `sol` - Solana token (if on Solana network)
|
|
1579
|
+
- `wbtc` - Wrapped Bitcoin
|
|
1580
|
+
- `cbbtc` - Coinbase Bitcoin
|
|
1581
|
+
|
|
1582
|
+
**Examples:**
|
|
1583
|
+
|
|
1584
|
+
```bash
|
|
1585
|
+
httpcat send eth 0x... 0.1
|
|
1586
|
+
httpcat send token usdc 0x... 100
|
|
1587
|
+
httpcat send token 0x... 0x... 50
|
|
1588
|
+
httpcat send batch '{"native":[{"to":"0x...","amount":"0.1"}],"tokens":[]}'
|
|
1589
|
+
httpcat send tx '{"to":"0x...","value":"1000000000000000000","data":"0x..."}'
|
|
1590
|
+
```
|
|
1591
|
+
|
|
1592
|
+
### Approve (`approve`)
|
|
1593
|
+
|
|
1594
|
+
Token approval operations.
|
|
1595
|
+
|
|
1596
|
+
**Subcommands:**
|
|
1597
|
+
|
|
1598
|
+
- `approve token <token> <spender> <amount>` - Approve ERC20 token
|
|
1599
|
+
- `approve check <token> <spender>` - Check current allowance
|
|
1600
|
+
|
|
1601
|
+
**Options:**
|
|
1602
|
+
|
|
1603
|
+
- `--permit2` - Use Permit2 instead of direct ERC20 approval
|
|
1604
|
+
- `--max` - Approve maximum amount (2^256 - 1)
|
|
1605
|
+
|
|
1606
|
+
**Examples:**
|
|
752
1607
|
|
|
753
1608
|
```bash
|
|
754
|
-
httpcat
|
|
755
|
-
httpcat --
|
|
756
|
-
httpcat
|
|
1609
|
+
httpcat approve token usdc 0x... 1000
|
|
1610
|
+
httpcat approve token 0x... 0x... max --permit2
|
|
1611
|
+
httpcat approve check usdc 0x...
|
|
757
1612
|
```
|
|
758
1613
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
### Configuration
|
|
1614
|
+
### RPC (`rpc`)
|
|
762
1615
|
|
|
763
|
-
|
|
1616
|
+
JSON-RPC proxy for blockchain calls.
|
|
764
1617
|
|
|
765
|
-
**
|
|
1618
|
+
**Usage:**
|
|
766
1619
|
|
|
767
1620
|
```bash
|
|
768
|
-
httpcat
|
|
769
|
-
httpcat> config -S network=base # Update a setting
|
|
770
|
-
httpcat> config -r # Re-run setup wizard
|
|
1621
|
+
httpcat rpc --method <method> --params <json-array>
|
|
771
1622
|
```
|
|
772
1623
|
|
|
773
|
-
**
|
|
1624
|
+
**Examples:**
|
|
774
1625
|
|
|
775
1626
|
```bash
|
|
776
|
-
httpcat
|
|
777
|
-
httpcat
|
|
778
|
-
httpcat
|
|
1627
|
+
httpcat rpc --method eth_getBalance --params '["0x...","latest"]'
|
|
1628
|
+
httpcat rpc --method eth_blockNumber --params '[]'
|
|
1629
|
+
httpcat rpc --method eth_call --params '[{"to":"0x...","data":"0x..."},"latest"]'
|
|
779
1630
|
```
|
|
780
1631
|
|
|
1632
|
+
**Cost:** $0.05 USDC per request
|
|
1633
|
+
|
|
781
1634
|
### MCP Server
|
|
782
1635
|
|
|
783
1636
|
Start the Model Context Protocol server for AI assistant integration.
|
|
@@ -785,7 +1638,7 @@ Start the Model Context Protocol server for AI assistant integration.
|
|
|
785
1638
|
**CLI:**
|
|
786
1639
|
|
|
787
1640
|
```bash
|
|
788
|
-
httpcat mcp
|
|
1641
|
+
httpcat mcp start
|
|
789
1642
|
```
|
|
790
1643
|
|
|
791
1644
|
**Description:**
|
|
@@ -801,7 +1654,7 @@ Add to your MCP client config:
|
|
|
801
1654
|
"mcpServers": {
|
|
802
1655
|
"httpcat": {
|
|
803
1656
|
"command": "npx",
|
|
804
|
-
"args": ["-y", "httpcat-cli", "mcp
|
|
1657
|
+
"args": ["-y", "httpcat-cli", "mcp", "start"],
|
|
805
1658
|
"env": {
|
|
806
1659
|
"HTTPCAT_PRIVATE_KEY": "0x..." // Optional
|
|
807
1660
|
}
|
|
@@ -1024,7 +1877,7 @@ All commands with `--json` flag return structured JSON responses. The output fol
|
|
|
1024
1877
|
{
|
|
1025
1878
|
"status": "ok",
|
|
1026
1879
|
"timestamp": "2025-11-22T10:30:00.000Z",
|
|
1027
|
-
"agent": "https://agent.402.cat"
|
|
1880
|
+
"agent": "https://agent-test.402.cat"
|
|
1028
1881
|
}
|
|
1029
1882
|
```
|
|
1030
1883
|
|
|
@@ -1045,7 +1898,7 @@ All commands with `--json` flag return structured JSON responses. The output fol
|
|
|
1045
1898
|
```json
|
|
1046
1899
|
{
|
|
1047
1900
|
"name": "httpcat-cli",
|
|
1048
|
-
"version": "0.0
|
|
1901
|
+
"version": "0.3.0"
|
|
1049
1902
|
}
|
|
1050
1903
|
```
|
|
1051
1904
|
|
|
@@ -1116,18 +1969,47 @@ httpcat includes a built-in MCP server that exposes all CLI commands as MCP tool
|
|
|
1116
1969
|
**Start the MCP server:**
|
|
1117
1970
|
|
|
1118
1971
|
```bash
|
|
1119
|
-
httpcat mcp
|
|
1972
|
+
httpcat mcp start
|
|
1120
1973
|
```
|
|
1121
1974
|
|
|
1122
1975
|
**Or use npx (no installation needed):**
|
|
1123
1976
|
|
|
1124
1977
|
```bash
|
|
1125
|
-
npx httpcat-cli mcp
|
|
1978
|
+
npx httpcat-cli mcp start
|
|
1979
|
+
```
|
|
1980
|
+
|
|
1981
|
+
### Quick Installation
|
|
1982
|
+
|
|
1983
|
+
Use the automated installer to set up httpcat MCP for your LLM CLI:
|
|
1984
|
+
|
|
1985
|
+
```bash
|
|
1986
|
+
# Interactive installation (select which LLMs to configure)
|
|
1987
|
+
httpcat mcp install
|
|
1988
|
+
|
|
1989
|
+
# Install for specific LLM
|
|
1990
|
+
httpcat mcp install claude-cli
|
|
1991
|
+
|
|
1992
|
+
# Install for Cursor IDE
|
|
1993
|
+
httpcat mcp install cursor
|
|
1994
|
+
|
|
1995
|
+
# Install for Claude Desktop
|
|
1996
|
+
httpcat mcp install claude-desktop
|
|
1997
|
+
|
|
1998
|
+
# Install for all detected LLMs
|
|
1999
|
+
httpcat mcp install --all
|
|
1126
2000
|
```
|
|
1127
2001
|
|
|
1128
|
-
|
|
2002
|
+
The installer will:
|
|
2003
|
+
|
|
2004
|
+
1. Check if wallet is configured (runs onboarding if needed)
|
|
2005
|
+
2. Automatically configure your LLM CLI with MCP server
|
|
2006
|
+
3. Provide next steps and example system prompt
|
|
2007
|
+
|
|
2008
|
+
**Note**: Private key is NOT included in MCP config - the server reads from `~/.config/httpcat/config.json` automatically.
|
|
2009
|
+
|
|
2010
|
+
### Manual Configuration
|
|
1129
2011
|
|
|
1130
|
-
|
|
2012
|
+
If you prefer to configure manually, add to your MCP client config:
|
|
1131
2013
|
|
|
1132
2014
|
#### For Cursor
|
|
1133
2015
|
|
|
@@ -1138,10 +2020,7 @@ Add to your Cursor settings (`.cursor/mcp.json` or settings UI):
|
|
|
1138
2020
|
"mcpServers": {
|
|
1139
2021
|
"httpcat": {
|
|
1140
2022
|
"command": "npx",
|
|
1141
|
-
"args": ["-y", "httpcat-cli", "mcp-server"]
|
|
1142
|
-
"env": {
|
|
1143
|
-
"HTTPCAT_PRIVATE_KEY": "0x..." // Optional - can also pass via tool params
|
|
1144
|
-
}
|
|
2023
|
+
"args": ["-y", "httpcat-cli", "mcp-server"]
|
|
1145
2024
|
}
|
|
1146
2025
|
}
|
|
1147
2026
|
}
|
|
@@ -1156,10 +2035,7 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
|
|
|
1156
2035
|
"mcpServers": {
|
|
1157
2036
|
"httpcat": {
|
|
1158
2037
|
"command": "npx",
|
|
1159
|
-
"args": ["-y", "httpcat-cli", "mcp-server"]
|
|
1160
|
-
"env": {
|
|
1161
|
-
"HTTPCAT_PRIVATE_KEY": "0x..."
|
|
1162
|
-
}
|
|
2038
|
+
"args": ["-y", "httpcat-cli", "mcp-server"]
|
|
1163
2039
|
}
|
|
1164
2040
|
}
|
|
1165
2041
|
}
|
|
@@ -1174,15 +2050,14 @@ If you've installed httpcat globally:
|
|
|
1174
2050
|
"mcpServers": {
|
|
1175
2051
|
"httpcat": {
|
|
1176
2052
|
"command": "httpcat",
|
|
1177
|
-
"args": ["mcp-server"]
|
|
1178
|
-
"env": {
|
|
1179
|
-
"HTTPCAT_PRIVATE_KEY": "0x..."
|
|
1180
|
-
}
|
|
2053
|
+
"args": ["mcp-server"]
|
|
1181
2054
|
}
|
|
1182
2055
|
}
|
|
1183
2056
|
}
|
|
1184
2057
|
```
|
|
1185
2058
|
|
|
2059
|
+
**Important**: No `HTTPCAT_PRIVATE_KEY` in env - the MCP server automatically reads from `~/.config/httpcat/config.json`.
|
|
2060
|
+
|
|
1186
2061
|
### Available MCP Tools
|
|
1187
2062
|
|
|
1188
2063
|
The MCP server exposes the following tools:
|
|
@@ -1347,6 +2222,379 @@ Get recent messages from chat (polling mechanism). Returns cached messages from
|
|
|
1347
2222
|
|
|
1348
2223
|
**Note:** Messages are cached in memory as they arrive via WebSocket. Poll this tool periodically to check for new messages.
|
|
1349
2224
|
|
|
2225
|
+
#### `view_fees`
|
|
2226
|
+
|
|
2227
|
+
View accumulated LP fees for a graduated token.
|
|
2228
|
+
|
|
2229
|
+
**Parameters:**
|
|
2230
|
+
|
|
2231
|
+
- `identifier` (string, required) - Token address, name, or symbol
|
|
2232
|
+
- `callerAddress` (string, optional) - Caller address (defaults to wallet address)
|
|
2233
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2234
|
+
|
|
2235
|
+
**Returns:** Fee information including accumulated tokens and USDC, creator/platform shares, and LP lock status
|
|
2236
|
+
|
|
2237
|
+
**Cost:** Free (view only)
|
|
2238
|
+
|
|
2239
|
+
#### `claim_fees`
|
|
2240
|
+
|
|
2241
|
+
Claim accumulated LP fees for a graduated token.
|
|
2242
|
+
|
|
2243
|
+
**Parameters:**
|
|
2244
|
+
|
|
2245
|
+
- `identifier` (string, required) - Token address, name, or symbol
|
|
2246
|
+
- `callerAddress` (string, optional) - Caller address (defaults to wallet address)
|
|
2247
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2248
|
+
|
|
2249
|
+
**Returns:** Transaction hash and claimed fee amounts
|
|
2250
|
+
|
|
2251
|
+
**Cost:** Gas fees for blockchain transaction
|
|
2252
|
+
|
|
2253
|
+
#### `get_transactions`
|
|
2254
|
+
|
|
2255
|
+
Get paginated transaction history with filtering options.
|
|
2256
|
+
|
|
2257
|
+
**Parameters:**
|
|
2258
|
+
|
|
2259
|
+
- `userAddress` (string, optional) - Filter by user address (defaults to wallet address)
|
|
2260
|
+
- `tokenId` (string, optional) - Filter by token ID
|
|
2261
|
+
- `type` (string, optional) - Filter by type: "buy", "sell", or "airdrop"
|
|
2262
|
+
- `limit` (number, optional) - Number of results (default: 50, max: 100)
|
|
2263
|
+
- `offset` (number, optional) - Pagination offset (default: 0)
|
|
2264
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2265
|
+
|
|
2266
|
+
**Returns:** Array of transactions with type, status, token info, amount, fee, and timestamp
|
|
2267
|
+
|
|
2268
|
+
**Cost:** Varies based on API call
|
|
2269
|
+
|
|
2270
|
+
#### `swap_tokens`
|
|
2271
|
+
|
|
2272
|
+
Swap tokens using universal swap with best route aggregation.
|
|
2273
|
+
|
|
2274
|
+
**Parameters:**
|
|
2275
|
+
|
|
2276
|
+
- `tokenIn` (string, required) - Token to swap from (address, name, or symbol)
|
|
2277
|
+
- `tokenOut` (string, required) - Token to swap to (address, name, or symbol)
|
|
2278
|
+
- `amount` (string, required) - Amount to swap (human-readable, e.g., '100' for 100 tokens)
|
|
2279
|
+
- `slippageBps` (number, optional) - Slippage tolerance in basis points (default: 50 = 0.5%)
|
|
2280
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2281
|
+
|
|
2282
|
+
**Returns:** Swap execution details including provider, amounts, gas estimate, and transaction hash
|
|
2283
|
+
|
|
2284
|
+
**Cost:** $0.10 USDC
|
|
2285
|
+
|
|
2286
|
+
#### `shielded_swap`
|
|
2287
|
+
|
|
2288
|
+
MEV-protected swap using UniswapX Dutch auction.
|
|
2289
|
+
|
|
2290
|
+
**Parameters:**
|
|
2291
|
+
|
|
2292
|
+
- `tokenIn` (string, required) - Token to swap from (address, name, or symbol)
|
|
2293
|
+
- `tokenOut` (string, required) - Token to swap to (address, name, or symbol)
|
|
2294
|
+
- `amount` (string, required) - Amount to swap (human-readable)
|
|
2295
|
+
- `slippageBps` (number, optional) - Slippage tolerance in basis points (default: 50 = 0.5%)
|
|
2296
|
+
- `privateKey` (string, required) - Private key for signing
|
|
2297
|
+
|
|
2298
|
+
**Returns:** Shielded swap order details and submission status
|
|
2299
|
+
|
|
2300
|
+
**Cost:** $1.00 USDC
|
|
2301
|
+
|
|
2302
|
+
#### `gasless_swap_quote`
|
|
2303
|
+
|
|
2304
|
+
Get gasless swap quotes from multiple providers without paying gas.
|
|
2305
|
+
|
|
2306
|
+
**Parameters:**
|
|
2307
|
+
|
|
2308
|
+
- `tokenIn` (string, required) - Token address to swap from
|
|
2309
|
+
- `tokenOut` (string, required) - Token address to swap to
|
|
2310
|
+
- `amount` (string, required) - Amount in smallest units
|
|
2311
|
+
- `taker` (string, required) - Taker address (wallet receiving tokens)
|
|
2312
|
+
- `slippageBps` (number, optional) - Slippage tolerance in basis points
|
|
2313
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2314
|
+
|
|
2315
|
+
**Returns:** Array of quotes from different providers with prices and routes
|
|
2316
|
+
|
|
2317
|
+
**Cost:** FREE
|
|
2318
|
+
|
|
2319
|
+
#### `gasless_swap_status`
|
|
2320
|
+
|
|
2321
|
+
Check the status of a 0x gasless swap.
|
|
2322
|
+
|
|
2323
|
+
**Parameters:**
|
|
2324
|
+
|
|
2325
|
+
- `tradeHash` (string, required) - Trade hash from gasless swap
|
|
2326
|
+
- `chainId` (number, optional) - Chain ID (defaults to configured network)
|
|
2327
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2328
|
+
|
|
2329
|
+
**Returns:** Swap status including confirmation status and transaction details
|
|
2330
|
+
|
|
2331
|
+
**Cost:** FREE
|
|
2332
|
+
|
|
2333
|
+
#### `gasless_swap_submit`
|
|
2334
|
+
|
|
2335
|
+
Submit a signed 0x gasless swap trade.
|
|
2336
|
+
|
|
2337
|
+
**Parameters:**
|
|
2338
|
+
|
|
2339
|
+
- `trade` (object, required) - Signed trade object from 0x API
|
|
2340
|
+
- `chainId` (number, optional) - Chain ID
|
|
2341
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2342
|
+
|
|
2343
|
+
**Returns:** Submission status and trade hash
|
|
2344
|
+
|
|
2345
|
+
**Cost:** $0.01 USDC
|
|
2346
|
+
|
|
2347
|
+
#### `gasless_swap_submit_our`
|
|
2348
|
+
|
|
2349
|
+
Submit gasless swap using our executor.
|
|
2350
|
+
|
|
2351
|
+
**Parameters:**
|
|
2352
|
+
|
|
2353
|
+
- `tokenIn` (string, required) - Input token address
|
|
2354
|
+
- `tokenOut` (string, required) - Output token address
|
|
2355
|
+
- `totalAmount` (string, required) - Total amount in smallest units
|
|
2356
|
+
- `feeAmount` (string, required) - Fee amount in smallest units
|
|
2357
|
+
- `taker` (string, required) - Taker address
|
|
2358
|
+
- `permit2Signature` (string, required) - Permit2 signature
|
|
2359
|
+
- `permitNonce` (number, required) - Permit nonce
|
|
2360
|
+
- `permitDeadline` (number, required) - Permit deadline timestamp
|
|
2361
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2362
|
+
|
|
2363
|
+
**Returns:** Execution status and transaction details
|
|
2364
|
+
|
|
2365
|
+
**Cost:** $0.01 USDC
|
|
2366
|
+
|
|
2367
|
+
#### `perps_markets`
|
|
2368
|
+
|
|
2369
|
+
Get available perpetual futures markets across multiple venues.
|
|
2370
|
+
|
|
2371
|
+
**Parameters:**
|
|
2372
|
+
|
|
2373
|
+
- `platform` (string, optional) - Filter by platform: "hyperliquid", "avantis", or "aster"
|
|
2374
|
+
- `symbol` (string, optional) - Filter by symbol substring (e.g., "BTC")
|
|
2375
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2376
|
+
|
|
2377
|
+
**Returns:** Array of markets with price, funding rate, open interest, and max leverage
|
|
2378
|
+
|
|
2379
|
+
**Cost:** $0.01 USDC
|
|
2380
|
+
|
|
2381
|
+
#### `perps_onboard`
|
|
2382
|
+
|
|
2383
|
+
One-time setup to connect wallet to perps trading venues.
|
|
2384
|
+
|
|
2385
|
+
**Parameters:**
|
|
2386
|
+
|
|
2387
|
+
- `wallet` (string, required) - Wallet address to onboard
|
|
2388
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2389
|
+
|
|
2390
|
+
**Returns:** Setup instructions for each venue including required signatures and transactions
|
|
2391
|
+
|
|
2392
|
+
**Cost:** FREE
|
|
2393
|
+
|
|
2394
|
+
#### `perps_deposit`
|
|
2395
|
+
|
|
2396
|
+
Get deposit options for USDC to perps trading venues.
|
|
2397
|
+
|
|
2398
|
+
**Parameters:**
|
|
2399
|
+
|
|
2400
|
+
- `amount` (string, required) - USDC amount to deposit (human-readable, e.g., "100")
|
|
2401
|
+
- `wallet` (string, required) - Wallet address
|
|
2402
|
+
- `venue` (string, optional) - Preferred venue
|
|
2403
|
+
- `chain` (string, optional) - Source chain (default: "base")
|
|
2404
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2405
|
+
|
|
2406
|
+
**Returns:** Deposit options for each venue with instructions and transaction data
|
|
2407
|
+
|
|
2408
|
+
**Cost:** FREE
|
|
2409
|
+
|
|
2410
|
+
#### `perps_trade`
|
|
2411
|
+
|
|
2412
|
+
Open or close perpetual positions with auto-routing to best venue.
|
|
2413
|
+
|
|
2414
|
+
**Parameters:**
|
|
2415
|
+
|
|
2416
|
+
- `market` (string, required) - Market to trade (e.g., "BTC", "ETH", "SOL")
|
|
2417
|
+
- `side` (string, required) - "long" or "short"
|
|
2418
|
+
- `sizeUsd` (string, required) - Position size in USD (minimum $10)
|
|
2419
|
+
- `leverage` (number, required) - Leverage multiplier (1-100x)
|
|
2420
|
+
- `wallet` (string, required) - Wallet address
|
|
2421
|
+
- `orderType` (string, optional) - "market" or "limit" (default: "market")
|
|
2422
|
+
- `price` (string, optional) - Limit price for limit orders
|
|
2423
|
+
- `takeProfit` (string, optional) - Take profit price
|
|
2424
|
+
- `stopLoss` (string, optional) - Stop loss price
|
|
2425
|
+
- `reduceOnly` (boolean, optional) - Close existing position only (default: false)
|
|
2426
|
+
- `venue` (string, optional) - Force specific venue
|
|
2427
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2428
|
+
|
|
2429
|
+
**Returns:** Trade execution details including venue, entry price, liquidation price, and fees
|
|
2430
|
+
|
|
2431
|
+
**Cost:** $0.05 USDC
|
|
2432
|
+
|
|
2433
|
+
#### `perps_positions`
|
|
2434
|
+
|
|
2435
|
+
View all open perpetual positions across venues.
|
|
2436
|
+
|
|
2437
|
+
**Parameters:**
|
|
2438
|
+
|
|
2439
|
+
- `wallet` (string, required) - Wallet address
|
|
2440
|
+
- `venue` (string, optional) - Filter by venue
|
|
2441
|
+
- `asterApiKey` (string, optional) - Aster API key (required for Aster positions)
|
|
2442
|
+
- `asterApiSecret` (string, optional) - Aster API secret (required for Aster positions)
|
|
2443
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2444
|
+
|
|
2445
|
+
**Returns:** Array of open positions with unrealized P&L, margin, and portfolio summary
|
|
2446
|
+
|
|
2447
|
+
**Cost:** $0.01 USDC
|
|
2448
|
+
|
|
2449
|
+
#### `predictions_markets`
|
|
2450
|
+
|
|
2451
|
+
Browse prediction markets from Polymarket and Azuro.
|
|
2452
|
+
|
|
2453
|
+
**Parameters:**
|
|
2454
|
+
|
|
2455
|
+
- `venue` (string, optional) - Filter by "polymarket" or "azuro"
|
|
2456
|
+
- `category` (string, optional) - Category like "politics", "crypto", "sports"
|
|
2457
|
+
- `limit` (number, optional) - Max results (default: 20, max: 100)
|
|
2458
|
+
- `sort` (string, optional) - Sort by "volume", "trending", or "ending_soon"
|
|
2459
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2460
|
+
|
|
2461
|
+
**Returns:** Array of markets with outcomes, volume, and liquidity
|
|
2462
|
+
|
|
2463
|
+
**Cost:** $0.01 USDC
|
|
2464
|
+
|
|
2465
|
+
#### `predictions_market`
|
|
2466
|
+
|
|
2467
|
+
Get detailed information about a specific prediction market.
|
|
2468
|
+
|
|
2469
|
+
**Parameters:**
|
|
2470
|
+
|
|
2471
|
+
- `marketId` (string, required) - Market ID in format "venue:id" (e.g., "polymarket:abc123")
|
|
2472
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2473
|
+
|
|
2474
|
+
**Returns:** Market details with outcomes, probabilities, volume, and trading info
|
|
2475
|
+
|
|
2476
|
+
**Cost:** $0.01 USDC
|
|
2477
|
+
|
|
2478
|
+
#### `predictions_search`
|
|
2479
|
+
|
|
2480
|
+
Search prediction markets by keyword.
|
|
2481
|
+
|
|
2482
|
+
**Parameters:**
|
|
2483
|
+
|
|
2484
|
+
- `query` (string, required) - Search keyword
|
|
2485
|
+
- `venue` (string, optional) - Filter by venue
|
|
2486
|
+
- `limit` (number, optional) - Max results (default: 20, max: 50)
|
|
2487
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2488
|
+
|
|
2489
|
+
**Returns:** Matching markets with relevance scores
|
|
2490
|
+
|
|
2491
|
+
**Cost:** $0.01 USDC
|
|
2492
|
+
|
|
2493
|
+
#### `predictions_bet`
|
|
2494
|
+
|
|
2495
|
+
Place a bet on a prediction market outcome.
|
|
2496
|
+
|
|
2497
|
+
**Parameters:**
|
|
2498
|
+
|
|
2499
|
+
- `marketId` (string, required) - Market ID in "venue:id" format
|
|
2500
|
+
- `outcomeId` (string, required) - Which outcome to bet on
|
|
2501
|
+
- `amountUsd` (number, required) - Bet amount in USD
|
|
2502
|
+
- `wallet` (string, required) - Wallet address
|
|
2503
|
+
- `polymarketApiKey` (string, optional) - Polymarket CLOB API key
|
|
2504
|
+
- `polymarketApiSecret` (string, optional) - Polymarket CLOB API secret
|
|
2505
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2506
|
+
|
|
2507
|
+
**Returns:** Bet details and transaction/order information
|
|
2508
|
+
|
|
2509
|
+
**Cost:** $0.05 USDC
|
|
2510
|
+
|
|
2511
|
+
#### `predictions_detect_arbs`
|
|
2512
|
+
|
|
2513
|
+
Scan for arbitrage opportunities across prediction venues.
|
|
2514
|
+
|
|
2515
|
+
**Parameters:**
|
|
2516
|
+
|
|
2517
|
+
- `minSpreadPct` (number, optional) - Minimum spread percentage (default: 1.0%)
|
|
2518
|
+
- `venues` (array, optional) - Specific venues to scan
|
|
2519
|
+
- `cryptoOnly` (boolean, optional) - Focus on crypto markets
|
|
2520
|
+
- `maxResults` (number, optional) - Max results (default: 20)
|
|
2521
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2522
|
+
|
|
2523
|
+
**Returns:** Array of arbitrage opportunities with expected profit and execution details
|
|
2524
|
+
|
|
2525
|
+
**Cost:** FREE
|
|
2526
|
+
|
|
2527
|
+
#### `predictions_calculate_hedge`
|
|
2528
|
+
|
|
2529
|
+
Calculate optimal perpetual hedge for a prediction market position.
|
|
2530
|
+
|
|
2531
|
+
**Parameters:**
|
|
2532
|
+
|
|
2533
|
+
- `marketA` (object, required) - First market details
|
|
2534
|
+
- `marketB` (object, required) - Second market details
|
|
2535
|
+
- `positionSizeUsd` (number, required) - Position size
|
|
2536
|
+
- `currentPrice` (number, required) - Current asset price
|
|
2537
|
+
- `fundingRate8h` (number, optional) - Funding rate (default: 0.01%)
|
|
2538
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2539
|
+
|
|
2540
|
+
**Returns:** Hedge strategy with direction, size, duration, costs, and expected profit
|
|
2541
|
+
|
|
2542
|
+
**Cost:** FREE
|
|
2543
|
+
|
|
2544
|
+
#### `predictions_execute_arb`
|
|
2545
|
+
|
|
2546
|
+
Execute complete arbitrage trade with optional perpetual hedge.
|
|
2547
|
+
|
|
2548
|
+
**Parameters:**
|
|
2549
|
+
|
|
2550
|
+
- `marketA` (object, required) - First market details
|
|
2551
|
+
- `marketB` (object, required) - Second market details
|
|
2552
|
+
- `positionSizeUsd` (number, required) - Position size for each leg
|
|
2553
|
+
- `autoHedge` (boolean, optional) - Enable automatic hedge (default: true)
|
|
2554
|
+
- `maxSlippagePct` (number, optional) - Max slippage (default: 2%)
|
|
2555
|
+
- `currentPrice` (number, optional) - For hedge calculation
|
|
2556
|
+
- `wallet` (string, required) - Wallet address
|
|
2557
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2558
|
+
|
|
2559
|
+
**Returns:** Execution details for both legs, hedge info, and profit summary
|
|
2560
|
+
|
|
2561
|
+
**Cost:** $0.20 USDC
|
|
2562
|
+
|
|
2563
|
+
#### `predictions_detect_insiders`
|
|
2564
|
+
|
|
2565
|
+
Detect sophisticated traders via wallet graph analysis.
|
|
2566
|
+
|
|
2567
|
+
**Parameters:**
|
|
2568
|
+
|
|
2569
|
+
- `timeWindowMinutes` (number, optional) - Analysis time window (default: 5)
|
|
2570
|
+
- `minTrades` (number, optional) - Minimum trades (default: 5)
|
|
2571
|
+
- `minSimilarity` (number, optional) - Min Jaccard similarity (default: 0.1)
|
|
2572
|
+
- `includeCommunities` (boolean, optional) - Include copytrade clusters (default: true)
|
|
2573
|
+
- `maxResults` (number, optional) - Max results (default: 50)
|
|
2574
|
+
- `assetFilter` (string, optional) - Filter by asset like "BTC"
|
|
2575
|
+
- `trades` (array, optional) - Historical trade data
|
|
2576
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2577
|
+
|
|
2578
|
+
**Returns:** Detected arbitrageurs, market leaders, and copytrade communities
|
|
2579
|
+
|
|
2580
|
+
**Cost:** $5.00 USDC
|
|
2581
|
+
|
|
2582
|
+
#### `rpc_proxy`
|
|
2583
|
+
|
|
2584
|
+
JSON-RPC proxy for Ethereum/Base blockchain calls.
|
|
2585
|
+
|
|
2586
|
+
**Parameters:**
|
|
2587
|
+
|
|
2588
|
+
- `jsonrpc` (string, required) - JSON-RPC version (typically "2.0")
|
|
2589
|
+
- `id` (number, required) - Request ID
|
|
2590
|
+
- `method` (string, required) - RPC method (e.g., 'eth_blockNumber', 'eth_getBalance')
|
|
2591
|
+
- `params` (array, required) - Method parameters
|
|
2592
|
+
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
2593
|
+
|
|
2594
|
+
**Returns:** Standard JSON-RPC response with result or error
|
|
2595
|
+
|
|
2596
|
+
**Cost:** $0.05 USDC per request
|
|
2597
|
+
|
|
1350
2598
|
### Chat Tools Usage Example
|
|
1351
2599
|
|
|
1352
2600
|
Here's how an AI agent like Claude Code would use the chat tools:
|
|
@@ -1388,13 +2636,27 @@ const renewal = await mcp.callTool("chat_renew_lease", {
|
|
|
1388
2636
|
|
|
1389
2637
|
### Private Key Configuration
|
|
1390
2638
|
|
|
1391
|
-
Private keys
|
|
2639
|
+
Private keys are automatically read from the httpcat config file (`~/.config/httpcat/config.json`).
|
|
2640
|
+
|
|
2641
|
+
**Priority order** (if you need to override):
|
|
1392
2642
|
|
|
1393
2643
|
1. **Tool parameter** - Pass `privateKey` in each tool call (highest priority)
|
|
1394
|
-
2. **Environment variable** - Set `HTTPCAT_PRIVATE_KEY`
|
|
1395
|
-
3. **Config file** -
|
|
2644
|
+
2. **Environment variable** - Set `HTTPCAT_PRIVATE_KEY` (for backward compatibility)
|
|
2645
|
+
3. **Config file** - Default: `~/.config/httpcat/config.json` (recommended)
|
|
1396
2646
|
|
|
1397
|
-
**Security Recommendation:** Use the
|
|
2647
|
+
**Security Recommendation:** Use the config file (default). The MCP server automatically reads from it, so you don't need to pass private keys in MCP configs.
|
|
2648
|
+
|
|
2649
|
+
### Onboarding
|
|
2650
|
+
|
|
2651
|
+
If no wallet is configured when the MCP server starts, it will run an interactive onboarding flow:
|
|
2652
|
+
|
|
2653
|
+
1. **Generate new wallet** - Creates a seed phrase (recommended for new users)
|
|
2654
|
+
2. **Import seed phrase** - Import existing 12/24 word seed phrase
|
|
2655
|
+
3. **Import private key** - Import existing private key
|
|
2656
|
+
|
|
2657
|
+
The onboarding runs automatically via stdio, so it works seamlessly with LLM CLI tools.
|
|
2658
|
+
|
|
2659
|
+
See [MCP Onboarding Guide](docs/MCP_ONBOARDING.md) for detailed information.
|
|
1398
2660
|
|
|
1399
2661
|
### Example MCP Tool Usage
|
|
1400
2662
|
|
|
@@ -1438,19 +2700,47 @@ All MCP tools return structured JSON responses matching the CLI's JSON output fo
|
|
|
1438
2700
|
}
|
|
1439
2701
|
```
|
|
1440
2702
|
|
|
2703
|
+
### MCP Resources
|
|
2704
|
+
|
|
2705
|
+
The MCP server provides resources for static data:
|
|
2706
|
+
|
|
2707
|
+
- `httpcat://tokens/list` - Cached token list with market data
|
|
2708
|
+
- `httpcat://network/status` - Network status and configuration
|
|
2709
|
+
- `httpcat://ecosystem/info` - Ecosystem information and token economics
|
|
2710
|
+
|
|
2711
|
+
Resources are cached (5 minute TTL) for faster access.
|
|
2712
|
+
|
|
2713
|
+
### MCP Prompts
|
|
2714
|
+
|
|
2715
|
+
System prompts available for LLM agents:
|
|
2716
|
+
|
|
2717
|
+
- `ecosystem_context` - Comprehensive ecosystem information
|
|
2718
|
+
- `system_prompt` - Suggested system prompt for configuring agents
|
|
2719
|
+
|
|
2720
|
+
### Enhanced Tool Descriptions
|
|
2721
|
+
|
|
2722
|
+
All tools include:
|
|
2723
|
+
|
|
2724
|
+
- 💰 Cost information
|
|
2725
|
+
- 📝 Usage examples
|
|
2726
|
+
- 💡 Tips and best practices
|
|
2727
|
+
- Detailed parameter descriptions
|
|
2728
|
+
|
|
1441
2729
|
### Benefits
|
|
1442
2730
|
|
|
1443
2731
|
- **No Shell Access Required** - AI assistants can interact with httpcat without needing shell/terminal access
|
|
1444
2732
|
- **Structured Responses** - Consistent JSON output format for reliable parsing
|
|
1445
|
-
- **Secure** - Private keys
|
|
2733
|
+
- **Secure** - Private keys stored locally, never in LLM config files
|
|
2734
|
+
- **Automatic Onboarding** - Interactive setup when wallet not configured
|
|
1446
2735
|
- **Always Up-to-Date** - Using `npx` ensures you always get the latest version
|
|
1447
|
-
- **Zero Configuration** -
|
|
2736
|
+
- **Zero Configuration** - Automated installation with `mcp-install` command
|
|
2737
|
+
- **Rich Context** - Resources and prompts provide ecosystem information
|
|
1448
2738
|
|
|
1449
2739
|
## Advanced Usage
|
|
1450
2740
|
|
|
1451
2741
|
### Environment Management
|
|
1452
2742
|
|
|
1453
|
-
httpcat supports multiple environments (local, sepolia, etc.) to easily switch between different agent deployments.
|
|
2743
|
+
httpcat supports multiple environments (local, base-sepolia, etc.) to easily switch between different agent deployments.
|
|
1454
2744
|
|
|
1455
2745
|
#### List Environments
|
|
1456
2746
|
|
|
@@ -1466,8 +2756,8 @@ Shows all available environments with their agent URLs and networks.
|
|
|
1466
2756
|
# Switch to local environment
|
|
1467
2757
|
httpcat env use local
|
|
1468
2758
|
|
|
1469
|
-
# Switch to sepolia environment
|
|
1470
|
-
httpcat env use sepolia
|
|
2759
|
+
# Switch to base-sepolia environment
|
|
2760
|
+
httpcat env use base-sepolia
|
|
1471
2761
|
```
|
|
1472
2762
|
|
|
1473
2763
|
#### Show Current Environment
|
|
@@ -1501,7 +2791,7 @@ Updates an existing environment's agent URL and optionally its network.
|
|
|
1501
2791
|
#### Predefined Environments
|
|
1502
2792
|
|
|
1503
2793
|
- **local** - `http://localhost:8787` (eip155:84532)
|
|
1504
|
-
- **sepolia** - `https://agent.402.cat` (eip155:84532)
|
|
2794
|
+
- **sepolia** - `https://agent-test.402.cat` (eip155:84532)
|
|
1505
2795
|
|
|
1506
2796
|
#### Environment Priority
|
|
1507
2797
|
|
|
@@ -1585,20 +2875,20 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1585
2875
|
],
|
|
1586
2876
|
"activeAccountIndex": 0,
|
|
1587
2877
|
"network": "eip155:84532",
|
|
1588
|
-
"agentUrl": "https://agent.402.cat",
|
|
2878
|
+
"agentUrl": "https://agent-test.402.cat",
|
|
1589
2879
|
"facilitatorUrl": "https://facilitators.x402scan.com",
|
|
1590
2880
|
"defaultMaxPayment": "10.00",
|
|
1591
|
-
"environment": "sepolia",
|
|
2881
|
+
"environment": "base-sepolia",
|
|
1592
2882
|
"environments": {
|
|
1593
2883
|
"local": {
|
|
1594
2884
|
"name": "local",
|
|
1595
2885
|
"agentUrl": "http://localhost:8787",
|
|
1596
|
-
"network": "
|
|
2886
|
+
"network": "eip155:84532"
|
|
1597
2887
|
},
|
|
1598
|
-
"sepolia": {
|
|
1599
|
-
"name": "sepolia",
|
|
1600
|
-
"agentUrl": "https://agent.402.cat",
|
|
1601
|
-
"network": "
|
|
2888
|
+
"base-sepolia": {
|
|
2889
|
+
"name": "base-sepolia",
|
|
2890
|
+
"agentUrl": "https://agent-test.402.cat",
|
|
2891
|
+
"network": "eip155:84532"
|
|
1602
2892
|
}
|
|
1603
2893
|
},
|
|
1604
2894
|
"preferences": {
|
|
@@ -1610,6 +2900,20 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1610
2900
|
"provider": "openai",
|
|
1611
2901
|
"apiKey": "encrypted_key_here",
|
|
1612
2902
|
"model": "gpt-4"
|
|
2903
|
+
},
|
|
2904
|
+
"autonomousAgent": {
|
|
2905
|
+
"enabled": false,
|
|
2906
|
+
"maxTradeAmount": "10.00",
|
|
2907
|
+
"riskTolerance": "moderate",
|
|
2908
|
+
"tokenFilters": {
|
|
2909
|
+
"minHolders": 10,
|
|
2910
|
+
"maxWhalePercentage": 20,
|
|
2911
|
+
"minLiquidity": 1000
|
|
2912
|
+
},
|
|
2913
|
+
"stopLoss": 20,
|
|
2914
|
+
"takeProfit": 50,
|
|
2915
|
+
"eventStreamUrl": "wss://events.402.cat",
|
|
2916
|
+
"databasePath": "~/.config/httpcat/agent.db"
|
|
1613
2917
|
}
|
|
1614
2918
|
}
|
|
1615
2919
|
```
|
|
@@ -1618,21 +2922,26 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1618
2922
|
|
|
1619
2923
|
- **Password Protection**: Set a password during setup to encrypt your private keys and seed phrase
|
|
1620
2924
|
- **Session Management**: Configurable timeout (default: 15 minutes via `passwordTimeoutMinutes`)
|
|
2925
|
+
- After the timeout, you'll need to re-enter your password to unlock the wallet
|
|
2926
|
+
- Session tokens are managed automatically to keep your wallet secure
|
|
1621
2927
|
- **Multi-Account Support**: Manage multiple accounts (seed-derived HD wallet accounts and custom imported accounts)
|
|
1622
2928
|
- **Encrypted Storage**: Keys and seed phrases are encrypted when password is enabled
|
|
1623
2929
|
- **Account Types**:
|
|
1624
|
-
- **
|
|
1625
|
-
- **
|
|
2930
|
+
- **Account 0 (Custom)**: Imported via private key during initial setup
|
|
2931
|
+
- **Account 1+ (Seed-Derived)**: Generated from your seed phrase using BIP-32/BIP-39 HD wallet derivation
|
|
2932
|
+
- You can add unlimited seed-derived accounts using `account add`
|
|
2933
|
+
- All accounts share the same password protection
|
|
1626
2934
|
|
|
1627
2935
|
**Security Notes:**
|
|
1628
2936
|
|
|
1629
|
-
- **Without password**: Private key stored in plain text (legacy `privateKey` field, auto-migrated to encrypted format)
|
|
1630
|
-
- **With password**: Private key, seed phrase, and AI API keys are encrypted
|
|
2937
|
+
- **Without password**: Private key stored in plain text (legacy `privateKey` field, auto-migrated to encrypted format on first password setup)
|
|
2938
|
+
- **With password**: Private key, seed phrase, and AI API keys are AES-256 encrypted
|
|
2939
|
+
- **Session Timeout**: Wallet automatically locks after 15 minutes of inactivity (configurable)
|
|
1631
2940
|
- **For production use**:
|
|
1632
2941
|
- Enable password protection during setup for encryption
|
|
1633
|
-
- Use `HTTPCAT_PRIVATE_KEY` environment variable for additional security
|
|
2942
|
+
- Use `HTTPCAT_PRIVATE_KEY` environment variable for additional security in scripts
|
|
1634
2943
|
- Set restrictive file permissions: `chmod 600 ~/.config/httpcat/config.json`
|
|
1635
|
-
- Use a dedicated wallet with limited funds
|
|
2944
|
+
- Use a dedicated wallet with limited funds for trading operations
|
|
1636
2945
|
|
|
1637
2946
|
## How It Works
|
|
1638
2947
|
|
|
@@ -1706,16 +3015,6 @@ Check your config:
|
|
|
1706
3015
|
httpcat config --show
|
|
1707
3016
|
```
|
|
1708
3017
|
|
|
1709
|
-
### Check Wallet Balance
|
|
1710
|
-
|
|
1711
|
-
Use the balances command to check your wallet's ETH and USDC balances:
|
|
1712
|
-
|
|
1713
|
-
```bash
|
|
1714
|
-
httpcat balances
|
|
1715
|
-
```
|
|
1716
|
-
|
|
1717
|
-
This will show your wallet address, ETH balance (for gas fees), and USDC balance (for trading), with warnings if balances are low.
|
|
1718
|
-
|
|
1719
3018
|
## Examples
|
|
1720
3019
|
|
|
1721
3020
|
### Complete Workflow
|
|
@@ -1793,5 +3092,5 @@ MIT
|
|
|
1793
3092
|
## Support
|
|
1794
3093
|
|
|
1795
3094
|
- Report issues: https://github.com/hathbanger/httpcat-cli/issues
|
|
1796
|
-
- httpcat agent: https://agent.402.cat
|
|
3095
|
+
- httpcat agent: https://agent-test.402.cat
|
|
1797
3096
|
- x402 protocol: https://x402.org
|