pandora-cli-skills 1.1.59 → 1.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/README_FOR_SHARING.md +15 -1
- package/SKILL.md +25 -7
- package/cli/lib/agent_contract_registry.cjs +2554 -0
- package/cli/lib/arb_command_service.cjs +15 -1
- package/cli/lib/command_router.cjs +3 -0
- package/cli/lib/contract_error_decoder.cjs +26 -3
- package/cli/lib/error_recovery_service.cjs +5 -0
- package/cli/lib/indexer_client.cjs +51 -7
- package/cli/lib/market_admin_service.cjs +197 -60
- package/cli/lib/mcp_tool_registry.cjs +64 -338
- package/cli/lib/mirror_handlers/sync.cjs +3 -0
- package/cli/lib/mirror_service.cjs +6 -6
- package/cli/lib/mirror_sync/execution.cjs +141 -11
- package/cli/lib/pandora_deploy_service.cjs +196 -29
- package/cli/lib/parsers/core_command_flags.cjs +55 -7
- package/cli/lib/parsers/mirror_deploy_flags.cjs +106 -4
- package/cli/lib/parsers/mirror_go_flags.cjs +123 -2
- package/cli/lib/parsers/sports_flags.cjs +102 -5
- package/cli/lib/parsers/trade_flags.cjs +49 -3
- package/cli/lib/scan_command_service.cjs +2 -1
- package/cli/lib/schema_command_service.cjs +230 -413
- package/cli/lib/sports_creation_service.cjs +4 -1
- package/cli/lib/trade_command_service.cjs +100 -23
- package/cli/lib/trade_market_type_service.cjs +90 -0
- package/cli/pandora.cjs +767 -237
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,11 @@ pandora --output json trade --dry-run \
|
|
|
46
46
|
--market-address 0x... --side yes --amount-usdc 10 \
|
|
47
47
|
--fork --fork-rpc-url http://127.0.0.1:8545
|
|
48
48
|
|
|
49
|
+
# Dry-run a sell quote / exit path
|
|
50
|
+
pandora --output json sell --dry-run \
|
|
51
|
+
--market-address 0x... --side no --shares 25 \
|
|
52
|
+
--fork --fork-rpc-url http://127.0.0.1:8545
|
|
53
|
+
|
|
49
54
|
# NDJSON stream
|
|
50
55
|
pandora stream prices --indexer-url https://pandoraindexer.up.railway.app/ --interval-ms 1000
|
|
51
56
|
```
|
|
@@ -73,16 +78,6 @@ pandora --output json lifecycle status --id <lifecycle-id>
|
|
|
73
78
|
pandora --output json lifecycle resolve --id <lifecycle-id> --confirm
|
|
74
79
|
```
|
|
75
80
|
|
|
76
|
-
### Mega Analytics Page (Dune Panels)
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# starts local page at http://127.0.0.1:8787
|
|
80
|
-
npm run analytics:mega
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
- Panel registry source: `analytics/dune/panel_registry.json`
|
|
84
|
-
- Dashboard creation script reuses this registry: `scripts/create_pandora_dashboard.js`
|
|
85
|
-
|
|
86
81
|
## Risk Controls
|
|
87
82
|
|
|
88
83
|
- Inspect/engage panic lock:
|
|
@@ -115,6 +110,9 @@ npm run analytics:mega
|
|
|
115
110
|
## Command Surface
|
|
116
111
|
|
|
117
112
|
- `pandora markets list|get`
|
|
113
|
+
- `pandora scan`
|
|
114
|
+
- `scan` is the canonical enriched discovery workflow.
|
|
115
|
+
- `markets scan` remains a backward-compatible alias.
|
|
118
116
|
- `pandora sports books list`
|
|
119
117
|
- `pandora sports events list|live`
|
|
120
118
|
- `pandora sports odds snapshot|bulk`
|
|
@@ -125,11 +123,14 @@ npm run analytics:mega
|
|
|
125
123
|
- `pandora lifecycle start|status|resolve`
|
|
126
124
|
- `pandora quote`
|
|
127
125
|
- `pandora trade`
|
|
126
|
+
- `pandora sell`
|
|
128
127
|
- `pandora claim --market-address <address>|--all --dry-run|--execute`
|
|
129
128
|
- `pandora history`
|
|
130
129
|
- `pandora export`
|
|
130
|
+
- `pandora arb scan --output ndjson|json`
|
|
131
131
|
- `pandora arbitrage`
|
|
132
|
-
- `
|
|
132
|
+
- `arb scan` is the canonical arbitrage workflow.
|
|
133
|
+
- `arbitrage` remains a bounded one-shot compatibility wrapper.
|
|
133
134
|
- `pandora odds record|history`
|
|
134
135
|
- `pandora autopilot run|once`
|
|
135
136
|
- `pandora mirror browse|plan|deploy|verify|lp-explain|hedge-calc|simulate|go|sync|status|close`
|
package/README_FOR_SHARING.md
CHANGED
|
@@ -101,6 +101,7 @@ Prerequisite: Node.js `>=18`.
|
|
|
101
101
|
- Read-only indexer commands (GraphQL-backed):
|
|
102
102
|
- `pandora markets list|get`
|
|
103
103
|
- `pandora scan`
|
|
104
|
+
- `scan` is the canonical enriched discovery flow; `markets scan` remains an alias.
|
|
104
105
|
- `pandora quote`
|
|
105
106
|
- `pandora portfolio`
|
|
106
107
|
- `pandora watch`
|
|
@@ -117,8 +118,10 @@ Prerequisite: Node.js `>=18`.
|
|
|
117
118
|
- `pandora stream events` (reactive event feed in NDJSON)
|
|
118
119
|
- Phase 2 trading helpers:
|
|
119
120
|
- `pandora quote --market-address <0x...> --side yes|no --amount-usdc <amount>`
|
|
121
|
+
- `pandora quote --market-address <0x...> --side yes|no --mode sell --shares <amount>`
|
|
120
122
|
- `pandora trade --dry-run --market-address <0x...> --side yes|no --amount-usdc <amount> [--max-amount-usdc <amount>] [--min-probability-pct <0-100>] [--max-probability-pct <0-100>]`
|
|
121
123
|
- `pandora trade --execute ...` performs allowance check, conditional USDC approve, then `buy`.
|
|
124
|
+
- `pandora sell --dry-run|--execute --market-address <0x...> --side yes|no --shares <amount> [--min-amount-out-raw <uint>]`
|
|
122
125
|
- Phase 3 wallet analytics:
|
|
123
126
|
- `pandora portfolio --wallet <0x...> [--chain-id <id>] [--limit <n>] [--include-events|--no-events]`
|
|
124
127
|
- `pandora watch --wallet <0x...> --iterations 10 --interval-ms 5000`
|
|
@@ -126,6 +129,7 @@ Prerequisite: Node.js `>=18`.
|
|
|
126
129
|
- Phase 4 intelligence and automation:
|
|
127
130
|
- `pandora history --wallet <0x...> --limit 50`
|
|
128
131
|
- `pandora export --wallet <0x...> --format csv --year 2026 --out ./trades-2026.csv`
|
|
132
|
+
- `pandora arb scan --source polymarket --output json --iterations 1 --min-spread-pct 3`
|
|
129
133
|
- `pandora arbitrage --venues pandora,polymarket --min-spread-pct 3`
|
|
130
134
|
- `pandora autopilot run|once ...`
|
|
131
135
|
- `pandora mirror browse|plan|deploy|verify|lp-explain|hedge-calc|simulate|go|sync|status|close ...`
|
|
@@ -179,6 +183,7 @@ Prerequisite: Node.js `>=18`.
|
|
|
179
183
|
### Fork runtime support
|
|
180
184
|
- Supported families:
|
|
181
185
|
- `trade`
|
|
186
|
+
- `sell`
|
|
182
187
|
- `resolve`
|
|
183
188
|
- `claim`
|
|
184
189
|
- `lp`
|
|
@@ -201,6 +206,9 @@ Prerequisite: Node.js `>=18`.
|
|
|
201
206
|
Mirror advanced flags (for operator tuning):
|
|
202
207
|
- `--sync-interval-ms <ms>` on `mirror go` to control auto-sync tick cadence.
|
|
203
208
|
- `--oracle <address>` / `--factory <address>` on `mirror deploy` and `mirror go` for explicit contract overrides.
|
|
209
|
+
- `--rules "<text>"` on `mirror deploy` for direct rules override without a plan file.
|
|
210
|
+
- `--distribution-yes-pct <0-100>` / `--distribution-no-pct <0-100>` on `mirror deploy|go` as percentage alternatives to raw 1e9 part hints.
|
|
211
|
+
- `--max-imbalance <n>` now accepts the full uint24 range, including `0` for "no guard".
|
|
204
212
|
- `--polymarket-gamma-mock-url <url>` on `mirror browse|plan|verify|go|sync|status` for deterministic mock-source testing.
|
|
205
213
|
- `--polymarket-tag-id <id>` / `--polymarket-tag-ids <csv>` on `mirror browse` (aliases: `--sport-tag-id`, `--sport-tag-ids`) to query sports-tagged Gamma events.
|
|
206
214
|
- `--no-stream` on `mirror sync` to disable per-tick stdout line streaming in run mode.
|
|
@@ -220,6 +228,7 @@ Mirror advanced flags (for operator tuning):
|
|
|
220
228
|
- `pandora watch --wallet <0x...> --iterations 3 --interval-ms 1000 --alert-net-liquidity-below -100`
|
|
221
229
|
- `pandora history --wallet <0x...> --limit 50`
|
|
222
230
|
- `pandora export --wallet <0x...> --format csv --out ./trades.csv`
|
|
231
|
+
- `pandora arb scan --source polymarket --output json --iterations 1 --min-spread-pct 2 --min-tvl 50`
|
|
223
232
|
- `pandora arbitrage --venues pandora,polymarket --min-spread-pct 2 --cross-venue-only --with-rules --include-similarity`
|
|
224
233
|
- `pandora autopilot once --market-address <0x...> --side no --amount-usdc 10 --trigger-yes-below 15 --paper`
|
|
225
234
|
- `pandora mirror browse --polymarket-tag-id 82 --min-yes-pct 20 --max-yes-pct 80 --min-volume-24h 100000 --limit 10`
|
|
@@ -258,19 +267,23 @@ Mirror advanced flags (for operator tuning):
|
|
|
258
267
|
|
|
259
268
|
## Phase 2 JSON contracts
|
|
260
269
|
- `quote`:
|
|
261
|
-
- envelope is `ok=true`, `command="quote"`, with `data.marketAddress`, `data.side`, `data.
|
|
270
|
+
- envelope is `ok=true`, `command="quote"`, with `data.marketAddress`, `data.side`, `data.mode`, either `data.amountUsdc` (buy) or `data.amount` (sell), plus `data.odds`, `data.quoteAvailable`, and `data.estimate` (or `null` when unavailable).
|
|
262
271
|
- `trade --dry-run`:
|
|
263
272
|
- envelope is `ok=true`, `command="trade"`, with `data.mode="dry-run"`, `data.quote`, `data.selectedProbabilityPct`, `data.riskGuards`, and `data.executionPlan.steps`.
|
|
264
273
|
- `trade --execute`:
|
|
265
274
|
- envelope is `ok=true`, `command="trade"`, with tx metadata (`approveTxHash` optional, `buyTxHash` required on success) plus `selectedProbabilityPct` and `riskGuards`.
|
|
275
|
+
- `sell --dry-run|--execute`:
|
|
276
|
+
- envelope is `ok=true`, `command="sell"`, with `data.action="sell"`, sell-aware quote/tx metadata, and `minAmountOutRaw` instead of buy-side minimum-share semantics.
|
|
266
277
|
|
|
267
278
|
## Phase 2 limitations
|
|
268
279
|
- `trade` auto-detects market type and uses the correct buy signature:
|
|
269
280
|
- PariMutuel: `buy(bool,uint256,uint256)`
|
|
270
281
|
- AMM: `buy(bool,uint256,uint256,uint256)` (deadline-aware)
|
|
282
|
+
- `sell` is AMM-only and uses `sell(bool,uint112,uint256,uint256)`.
|
|
271
283
|
- `minSharesOut` protection defaults to raw `0` unless explicitly set with `--min-shares-out-raw`.
|
|
272
284
|
- If indexer odds are unavailable, `quote` still returns a structured payload with `quoteAvailable=false`.
|
|
273
285
|
- `trade --execute` blocks unquoted execution by default unless `--min-shares-out-raw` or `--allow-unquoted-execute` is provided.
|
|
286
|
+
- `sell --execute` blocks unquoted execution by default unless `--min-amount-out-raw` or `--allow-unquoted-execute` is provided.
|
|
274
287
|
|
|
275
288
|
## Phase 3 JSON contracts
|
|
276
289
|
- `portfolio`:
|
|
@@ -295,6 +308,7 @@ Mirror advanced flags (for operator tuning):
|
|
|
295
308
|
- envelope is `ok=true`, `command="export"`, with `data.format`, `data.columns`, `data.count`, optional `data.outPath`, and materialized `data.content`.
|
|
296
309
|
- `arbitrage`:
|
|
297
310
|
- envelope is `ok=true`, `command="arbitrage"`, with `data.parameters`, `data.sources`, and `data.opportunities[]`.
|
|
311
|
+
- use `arb scan` as the canonical arbitrage interface; `arbitrage` is the compatibility one-shot wrapper.
|
|
298
312
|
- agent-focused flags:
|
|
299
313
|
- `--cross-venue-only` (default) prevents same-venue duplicate-market noise.
|
|
300
314
|
- `--allow-same-venue` re-enables same-venue matching.
|
package/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pandora-cli-skills
|
|
3
3
|
summary: Canonical skill and operator guide for Pandora CLI including mirror, polymarket, resolve, and LP flows.
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.61
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pandora CLI & Skills
|
|
@@ -43,7 +43,7 @@ npm link
|
|
|
43
43
|
- Guided setup command: `pandora setup`
|
|
44
44
|
- Phase 1 discovery command: `pandora scan`
|
|
45
45
|
- Phase 1 lifecycle filters: `pandora markets list --active|--resolved|--expiring-soon`
|
|
46
|
-
- Phase 2 trading commands: `pandora quote`, `pandora trade`
|
|
46
|
+
- Phase 2 trading commands: `pandora quote`, `pandora trade`, `pandora sell`
|
|
47
47
|
- Phase 2 risk guardrails: `--max-amount-usdc`, `--min-probability-pct`, `--max-probability-pct`
|
|
48
48
|
- Phase 3 analytics command: `pandora portfolio`
|
|
49
49
|
- Phase 3 monitoring command: `pandora watch`
|
|
@@ -52,6 +52,7 @@ npm link
|
|
|
52
52
|
- Phase 4 commands:
|
|
53
53
|
- `pandora history`
|
|
54
54
|
- `pandora export`
|
|
55
|
+
- `pandora arb scan`
|
|
55
56
|
- `pandora arbitrage`
|
|
56
57
|
- `pandora autopilot run|once`
|
|
57
58
|
- `pandora mirror browse|plan|deploy|verify|lp-explain|hedge-calc|simulate|go|sync|status|close`
|
|
@@ -83,6 +84,15 @@ npm link
|
|
|
83
84
|
- Current risk-counter semantics:
|
|
84
85
|
- `max_position_usd` guards per-operation notional.
|
|
85
86
|
- `max_daily_loss_usd` is enforced as daily live notional (`counters.liveNotionalUsdc`).
|
|
87
|
+
|
|
88
|
+
## Canonical command paths
|
|
89
|
+
- Market discovery:
|
|
90
|
+
- `pandora scan` is the canonical enriched discovery flow.
|
|
91
|
+
- `pandora markets scan` remains a backward-compatible alias.
|
|
92
|
+
- `pandora markets list` is the raw indexer browse surface.
|
|
93
|
+
- Arbitrage:
|
|
94
|
+
- `pandora arb scan` is the canonical arbitrage flow for bounded JSON or streaming NDJSON scans.
|
|
95
|
+
- `pandora arbitrage` remains a backward-compatible one-shot wrapper over the same cross-venue engine.
|
|
86
96
|
- `max_open_markets` is enforced as daily live operation count (`counters.liveOps`).
|
|
87
97
|
|
|
88
98
|
## Quant ABM baseline (module contract)
|
|
@@ -132,11 +142,14 @@ pandora [--output table|json] positions list [--wallet <address>] [--market-addr
|
|
|
132
142
|
pandora [--output table|json] portfolio --wallet <address> [--chain-id <id>] [--limit <n>] [--include-events|--no-events] [--with-lp] [--rpc-url <url>]
|
|
133
143
|
pandora [--output table|json] watch [--wallet <address>] [--market-address <address>] [--side yes|no] [--amount-usdc <amount>] [--iterations <n>] [--interval-ms <ms>] [--chain-id <id>] [--include-events|--no-events] [--yes-pct <0-100>] [--alert-yes-below <0-100>] [--alert-yes-above <0-100>] [--alert-net-liquidity-below <amount>] [--alert-net-liquidity-above <amount>] [--fail-on-alert] [--track-brier] [--brier-source <name>] [--brier-file <path>] [--group-by source|market|competition]
|
|
134
144
|
pandora [--output table|json] scan [--limit <n>] [--after <cursor>] [--before <cursor>] [--order-by <field>] [--order-direction asc|desc] [--chain-id <id>] [--creator <address>] [--poll-address <address>] [--market-type <type>] [--where-json <json>] [--active|--resolved|--expiring-soon] [--expiring-hours <n>] [--expand]
|
|
135
|
-
pandora [--output table|json]
|
|
145
|
+
pandora [--output table|json] markets scan [scan flags] # backward-compatible alias of scan
|
|
146
|
+
pandora [--output table|json] quote [--indexer-url <url>] [--timeout-ms <ms>] --market-address <address> --side yes|no [--mode buy|sell] --amount-usdc <amount>|--shares <amount>|--amounts <csv> [--yes-pct <0-100>] [--slippage-bps <0-10000>]
|
|
136
147
|
pandora [--output table|json] trade [--indexer-url <url>] [--timeout-ms <ms>] [--dotenv-path <path>] [--skip-dotenv] --market-address <address> --side yes|no --amount-usdc <amount> --dry-run|--execute [--yes-pct <0-100>] [--slippage-bps <0-10000>] [--min-shares-out-raw <uint>] [--max-amount-usdc <amount>] [--min-probability-pct <0-100>] [--max-probability-pct <0-100>] [--allow-unquoted-execute] [--fork] [--fork-rpc-url <url>] [--fork-chain-id <id>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--usdc <address>]
|
|
148
|
+
pandora [--output table|json] sell [--indexer-url <url>] [--timeout-ms <ms>] [--dotenv-path <path>] [--skip-dotenv] --market-address <address> --side yes|no --shares <amount>|--amount <amount> --dry-run|--execute [--yes-pct <0-100>] [--slippage-bps <0-10000>] [--min-amount-out-raw <uint>] [--allow-unquoted-execute] [--fork] [--fork-rpc-url <url>] [--fork-chain-id <id>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--usdc <address>]
|
|
137
149
|
pandora [--output table|json] claim [--dotenv-path <path>] [--skip-dotenv] --market-address <address>|--all [--wallet <address>] --dry-run|--execute [--fork] [--fork-rpc-url <url>] [--fork-chain-id <id>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--indexer-url <url>] [--timeout-ms <ms>]
|
|
138
150
|
pandora [--output table|json] history --wallet <address> [--chain-id <id>] [--market-address <address>] [--side yes|no|both] [--status all|open|won|lost|closed] [--limit <n>] [--after <cursor>] [--before <cursor>] [--order-by timestamp|pnl|entry-price|mark-price] [--order-direction asc|desc] [--include-seed]
|
|
139
151
|
pandora [--output table|json] export --wallet <address> --format csv|json [--chain-id <id>] [--year <yyyy>] [--from <unix>] [--to <unix>] [--out <path>]
|
|
152
|
+
pandora arb scan [--source pandora|polymarket] [--markets <csv>] --output ndjson|json [--min-net-spread-pct <n>] [--fee-pct-per-leg <n>] [--slippage-pct-per-leg <n>] [--amount-usdc <n>] [--combinatorial] [--max-bundle-size <n>] [--iterations <n>] [--interval-ms <ms>]
|
|
140
153
|
pandora [--output table|json] arbitrage [--chain-id <id>] [--venues pandora,polymarket] [--limit <n>] [--min-spread-pct <n>] [--min-liquidity-usdc <n>] [--max-close-diff-hours <n>] [--similarity-threshold <0-1>] [--cross-venue-only|--allow-same-venue] [--with-rules] [--include-similarity] [--question-contains <text>] [--polymarket-host <url>] [--polymarket-mock-url <url>]
|
|
141
154
|
pandora [--output table|json] autopilot run|once --market-address <address> --side yes|no --amount-usdc <amount> [--trigger-yes-below <0-100>] [--trigger-yes-above <0-100>] [--paper|--execute-live] [--interval-ms <ms>] [--cooldown-ms <ms>] [--max-amount-usdc <amount>] [--max-open-exposure-usdc <amount>] [--max-trades-per-day <n>] [--state-file <path>] [--kill-switch-file <path>] [--webhook-url <url>] [--telegram-bot-token <token>] [--telegram-chat-id <id>] [--discord-webhook-url <url>]
|
|
142
155
|
pandora [--output table|json] mirror browse|plan|deploy|verify|lp-explain|hedge-calc|simulate|go|sync|status|close ...
|
|
@@ -162,12 +175,12 @@ Mirror subcommand detail:
|
|
|
162
175
|
```text
|
|
163
176
|
browse --min-yes-pct <n> --max-yes-pct <n> --min-volume-24h <n> [--closes-after <date>] [--closes-before <date>] [--question-contains <text>] [--limit <n>] [--chain-id <id>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>]
|
|
164
177
|
plan --source polymarket --polymarket-market-id <id>|--polymarket-slug <slug> [--chain-id <id>] [--target-slippage-bps <n>] [--turnover-target <n>] [--depth-slippage-bps <n>] [--safety-multiplier <n>] [--min-liquidity-usdc <n>] [--max-liquidity-usdc <n>] [--with-rules] [--include-similarity] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>]
|
|
165
|
-
deploy --plan-file <path>|--polymarket-market-id <id>|--polymarket-slug <slug> --dry-run|--execute [--liquidity-usdc <n>] [--fee-tier <500-50000>] [--max-imbalance <n>] [--arbiter <address>] [--category <n>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--oracle <address>] [--factory <address>] [--usdc <address>] [--distribution-yes <parts>] [--distribution-no <parts>] [--sources <url...>] [--min-close-lead-seconds <n>] [--manifest-file <path>] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>]
|
|
178
|
+
deploy --plan-file <path>|--polymarket-market-id <id>|--polymarket-slug <slug> --dry-run|--execute [--liquidity-usdc <n>] [--fee-tier <500-50000>] [--max-imbalance <n>] [--arbiter <address>] [--category <n>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--oracle <address>] [--factory <address>] [--usdc <address>] [--distribution-yes <parts>] [--distribution-no <parts>] [--distribution-yes-pct <0-100>] [--distribution-no-pct <0-100>] [--rules <text>] [--sources <url...>] [--min-close-lead-seconds <n>] [--manifest-file <path>] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>]
|
|
166
179
|
verify --pandora-market-address <address>|--market-address <address> --polymarket-market-id <id>|--polymarket-slug <slug> [--trust-deploy] [--manifest-file <path>] [--include-similarity] [--with-rules] [--allow-rule-mismatch] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>]
|
|
167
180
|
lp-explain --liquidity-usdc <n> [--source-yes-pct <0-100>] [--distribution-yes <parts>] [--distribution-no <parts>]
|
|
168
181
|
hedge-calc [--reserve-yes-usdc <n> --reserve-no-usdc <n>] [--excess-yes-usdc <n>] [--excess-no-usdc <n>] [--polymarket-yes-pct <0-100>] [--hedge-ratio <n>] [--hedge-cost-bps <n>] [--volume-scenarios <csv>] [--pandora-market-address <address>|--market-address <address> --polymarket-market-id <id>|--polymarket-slug <slug>] [--trust-deploy] [--manifest-file <path>]
|
|
169
182
|
simulate --liquidity-usdc <n> [--source-yes-pct <0-100>] [--target-yes-pct <0-100>] [--distribution-yes <parts>] [--distribution-no <parts>] [--fee-tier <500-50000>] [--volume-scenarios <csv>] [--hedge-ratio <n>] [--hedge-cost-bps <n>] [--polymarket-yes-pct <0-100>]
|
|
170
|
-
go --polymarket-market-id <id>|--polymarket-slug <slug> [--liquidity-usdc <n>] [--fee-tier <500-50000>] [--max-imbalance <n>] [--arbiter <address>] [--category <n>] [--paper|--dry-run|--execute-live|--execute] [--auto-sync] [--sync-once] [--sync-interval-ms <ms>] [--hedge-ratio <n>] [--no-hedge] [--max-rebalance-usdc <n>] [--max-hedge-usdc <n>] [--max-open-exposure-usdc <n>] [--max-trades-per-day <n>] [--cooldown-ms <ms>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--funder <address>] [--usdc <address>] [--oracle <address>] [--factory <address>] [--sources <url...>] [--manifest-file <path>] [--trust-deploy] [--skip-gate] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>] [--with-rules] [--include-similarity] [--min-close-lead-seconds <n>]
|
|
183
|
+
go --polymarket-market-id <id>|--polymarket-slug <slug> [--liquidity-usdc <n>] [--fee-tier <500-50000>] [--max-imbalance <n>] [--arbiter <address>] [--category <n>] [--paper|--dry-run|--execute-live|--execute] [--auto-sync] [--sync-once] [--sync-interval-ms <ms>] [--hedge-ratio <n>] [--no-hedge] [--max-rebalance-usdc <n>] [--max-hedge-usdc <n>] [--max-open-exposure-usdc <n>] [--max-trades-per-day <n>] [--cooldown-ms <ms>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--funder <address>] [--usdc <address>] [--oracle <address>] [--factory <address>] [--distribution-yes-pct <0-100>] [--distribution-no-pct <0-100>] [--sources <url...>] [--manifest-file <path>] [--trust-deploy] [--skip-gate] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>] [--with-rules] [--include-similarity] [--min-close-lead-seconds <n>]
|
|
171
184
|
sync run|once|start --pandora-market-address <address>|--market-address <address> --polymarket-market-id <id>|--polymarket-slug <slug> [--paper|--dry-run|--execute-live|--execute] [--private-key <hex>] [--funder <address>] [--usdc <address>] [--trust-deploy] [--manifest-file <path>] [--skip-gate] [--daemon] [--stream|--no-stream] [--interval-ms <ms>] [--drift-trigger-bps <n>] [--hedge-trigger-usdc <n>] [--hedge-ratio <n>] [--no-hedge] [--max-rebalance-usdc <n>] [--max-hedge-usdc <n>] [--max-open-exposure-usdc <n>] [--max-trades-per-day <n>] [--cooldown-ms <ms>] [--depth-slippage-bps <n>] [--min-time-to-close-sec <n>] [--iterations <n>] [--state-file <path>] [--kill-switch-file <path>] [--chain-id <id>] [--rpc-url <url>] [--polymarket-host <url>] [--polymarket-gamma-url <url>] [--polymarket-gamma-mock-url <url>] [--polymarket-mock-url <url>] [--webhook-url <url>] [--telegram-bot-token <token>] [--telegram-chat-id <id>] [--discord-webhook-url <url>]
|
|
172
185
|
status --state-file <path>|--strategy-hash <hash> [--with-live] [--pandora-market-address <address>|--market-address <address>] [--polymarket-market-id <id>|--polymarket-slug <slug>]
|
|
173
186
|
close --pandora-market-address <address>|--market-address <address> --polymarket-market-id <id>|--polymarket-slug <slug>|--all --dry-run|--execute [--wallet <address>] [--chain-id <id>] [--rpc-url <url>] [--private-key <hex>] [--indexer-url <url>] [--timeout-ms <ms>]
|
|
@@ -354,19 +367,23 @@ pandora --output json schema
|
|
|
354
367
|
|
|
355
368
|
## Phase 2 JSON contracts
|
|
356
369
|
- `quote`:
|
|
357
|
-
- envelope is `ok=true`, `command="quote"`, with `data.marketAddress`, `data.side`, `data.
|
|
370
|
+
- envelope is `ok=true`, `command="quote"`, with `data.marketAddress`, `data.side`, `data.mode`, either `data.amountUsdc` (buy) or `data.amount` (sell), plus `data.odds`, `data.quoteAvailable`, and `data.estimate` (or `null`).
|
|
358
371
|
- `trade --dry-run`:
|
|
359
372
|
- envelope is `ok=true`, `command="trade"`, with `data.mode="dry-run"`, `data.quote`, `data.selectedProbabilityPct`, `data.riskGuards`, and `data.executionPlan.steps`.
|
|
360
373
|
- `trade --execute`:
|
|
361
374
|
- envelope is `ok=true`, `command="trade"`, with tx metadata (`approveTxHash` optional, `buyTxHash` required on success) plus `selectedProbabilityPct` and `riskGuards`.
|
|
375
|
+
- `sell --dry-run|--execute`:
|
|
376
|
+
- envelope is `ok=true`, `command="sell"`, with `data.action="sell"`, sell-aware quote/tx metadata, and `minAmountOutRaw` instead of buy-side minimum-share semantics.
|
|
362
377
|
|
|
363
378
|
## Phase 2 limitations
|
|
364
379
|
- `trade` auto-detects market type and uses the correct buy signature:
|
|
365
380
|
- PariMutuel: `buy(bool,uint256,uint256)`
|
|
366
381
|
- AMM: `buy(bool,uint256,uint256,uint256)` (deadline-aware)
|
|
382
|
+
- `sell` is AMM-only and uses `sell(bool,uint112,uint256,uint256)`.
|
|
367
383
|
- `--min-shares-out-raw` is the explicit slippage guard input for on-chain execution.
|
|
368
384
|
- If indexer odds are unavailable, `quote` still returns structured output with `quoteAvailable=false`.
|
|
369
385
|
- `trade --execute` blocks unquoted execution by default unless `--min-shares-out-raw` or `--allow-unquoted-execute` is provided.
|
|
386
|
+
- `sell --execute` blocks unquoted execution by default unless `--min-amount-out-raw` or `--allow-unquoted-execute` is provided.
|
|
370
387
|
|
|
371
388
|
## Phase 3 JSON contracts
|
|
372
389
|
- `portfolio`:
|
|
@@ -467,7 +484,7 @@ Mode aliases:
|
|
|
467
484
|
Common compatibility aliases:
|
|
468
485
|
- `--env-file` = `--dotenv-path`
|
|
469
486
|
- `--no-env-file` = `--skip-dotenv`
|
|
470
|
-
- `--amount` = `--amount-usdc`
|
|
487
|
+
- `--amount` = `--amount-usdc` on buy-side trade/watch/autopilot paths, and share input on `sell`.
|
|
471
488
|
- `--market-id` = `--condition-id` (polymarket trade)
|
|
472
489
|
- `--force-gate` = `--skip-gate` (deprecated; use `--skip-gate`)
|
|
473
490
|
|
|
@@ -475,6 +492,7 @@ Common compatibility aliases:
|
|
|
475
492
|
- Distribution inputs use parts-per-billion (ppb):
|
|
476
493
|
- `--distribution-yes 580000000` means YES seed weight = `58%`.
|
|
477
494
|
- `--distribution-no 420000000` means NO seed weight = `42%`.
|
|
495
|
+
- `--distribution-yes-pct 58 --distribution-no-pct 42` is the percentage alias form on supported deploy/create paths.
|
|
478
496
|
- Constraint: `distributionYes + distributionNo = 1_000_000_000`.
|
|
479
497
|
|
|
480
498
|
## Error code guide
|