@moonpay/cli 1.44.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XKO4SZAC.js → chunk-4HXJP6SQ.js} +1 -1
- package/dist/{chunk-BVKE6RQA.js → chunk-6MWBPOPK.js} +3 -3
- package/dist/{chunk-OCE3NV3D.js → chunk-G43DZOVW.js} +1 -1
- package/dist/{chunk-U6OVJRBI.js → chunk-TH42US2S.js} +2 -2
- package/dist/{client-QJRZJ5JU.js → client-ARRCZ4JB.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{ledger-NN34AOBM.js → ledger-42XETTBK.js} +2 -2
- package/dist/{mcp-IHSBIXER.js → mcp-RDNLKSAY.js} +1 -1
- package/dist/{store-LEPUG5XZ.js → store-NBA4B7YS.js} +1 -1
- package/package.json +1 -1
- package/skills/moonpay-discover-tokens/SKILL.md +2 -2
- package/skills/moonpay-kalshi/SKILL.md +139 -0
- package/skills/moonpay-missions/SKILL.md +194 -74
- package/skills/moonpay-polymarket/SKILL.md +140 -0
- package/skills/moonpay-prediction-market/SKILL.md +42 -133
|
@@ -1,154 +1,274 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moonpay-missions
|
|
3
|
-
description: A
|
|
4
|
-
tags: [setup]
|
|
3
|
+
description: A guided walkthrough showing every MoonPay CLI capability end-to-end, in the order a real user would touch them — fund with USDC (zero-fee stablecoins), swap into a private-company prestock, build an index fund, bridge cross-chain, settle a Kalshi prediction-market position, and check out from a Shopify store. Use when the user is new or says "get started", "show me what you can do", or "run the missions".
|
|
4
|
+
tags: [setup, demo]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# MoonPay Missions
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Guided walkthrough that exercises every MoonPay CLI capability against the user's real wallet. Each mission proposes one thing, executes when the user agrees, gives a 1-2 sentence take, then proposes the next.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This is the **showcase** — when someone says "what can you do?", run this. Skip with "skip"; jump ahead with "next" or "go".
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Conduct rules
|
|
14
|
+
|
|
15
|
+
- **Be concise.** Short responses. No walls of text.
|
|
16
|
+
- **No preamble.** Don't say "Let me do X" — just do it. Action first, brief summary after.
|
|
17
|
+
- **Handle errors gracefully.** If something fails, say "Let's skip ahead" and propose the next mission.
|
|
18
|
+
- **Don't ask for confirmation** before running `moonpay` commands — just execute. Exception: anything that costs real money the user hasn't already agreed to.
|
|
19
|
+
- **Show and explain.** Before each `moonpay` command, say in one short sentence what you're about to run and why. After it runs, point out the one or two key fields in the output.
|
|
20
|
+
- **Cheat codes allowed.** Pre-verified token addresses and market IDs are in this file. Still *run* the discovery command — but use the known values when picking from results, don't stall comparing options.
|
|
21
|
+
|
|
22
|
+
## Wallet to use
|
|
23
|
+
|
|
24
|
+
Default to the **funded-sol** wallet for everything unless the user says otherwise.
|
|
25
|
+
|
|
26
|
+
| | |
|
|
27
|
+
|---|---|
|
|
28
|
+
| Wallet name | `funded-sol` |
|
|
29
|
+
| Solana | `GmmrYv28CQhKjJsPcpHZuspfJSKcDwGdECeYdiDLfW12` |
|
|
30
|
+
|
|
31
|
+
Other addresses are visible via `mp wallet retrieve --wallet funded-sol`.
|
|
32
|
+
|
|
33
|
+
## Pre-flight (silent — run before Mission 1)
|
|
14
34
|
|
|
15
35
|
```bash
|
|
16
36
|
mp user retrieve
|
|
17
37
|
mp wallet list
|
|
18
38
|
```
|
|
19
39
|
|
|
20
|
-
If
|
|
40
|
+
Confirm the user is authed and `funded-sol` exists. If not, fall back to whatever wallet the user has. If they have none, run `mp wallet create --name "main"` and use that. Don't narrate this step — just do it and roll into Mission 1.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Mission 1 — Fund the wallet with USDC (zero-fee stablecoins)
|
|
45
|
+
|
|
46
|
+
**Propose:** "Want me to top up your wallet with some USDC? Heads-up — MoonPay just made stablecoin onramps zero-fee, so $50 fiat in is $50 USDC out. No spread, no card fee."
|
|
47
|
+
|
|
48
|
+
**Why this is the lead:** the zero-fee stablecoin pitch is the strongest thing MoonPay ships right now. Everything downstream (swap, prediction markets, commerce) works against the USDC we just funded.
|
|
49
|
+
|
|
50
|
+
**On yes:**
|
|
21
51
|
|
|
22
52
|
```bash
|
|
23
|
-
mp wallet
|
|
53
|
+
mp buy --token usdc --amount 50 --wallet GmmrYv28CQhKjJsPcpHZuspfJSKcDwGdECeYdiDLfW12 --email <user-email>
|
|
24
54
|
```
|
|
25
55
|
|
|
26
|
-
|
|
56
|
+
This returns a checkout URL. Open it (the desktop app intercepts the click; in CLI use `open "<url>"`).
|
|
57
|
+
|
|
58
|
+
**Summary:** "Checkout's open — fiat → USDC, zero-fee onramp. Once the order settles, $50 USDC lands on Solana." Mention that the user can check `mp token balance list --wallet funded-sol --chain solana` after the checkout completes to confirm.
|
|
59
|
+
|
|
60
|
+
**Next:** "Now that you've got USDC, want me to put some of it into Anthropic? It's trading as a prestock on Solana right now."
|
|
61
|
+
|
|
62
|
+
---
|
|
27
63
|
|
|
28
|
-
## Mission 2:
|
|
64
|
+
## Mission 2 — PreStock: Swap USDC → ANTHRP
|
|
29
65
|
|
|
30
|
-
**
|
|
66
|
+
**On yes:**
|
|
67
|
+
|
|
68
|
+
Step 1 — Discover:
|
|
31
69
|
|
|
32
70
|
```bash
|
|
33
|
-
mp token
|
|
71
|
+
mp token search --query "anthropic" --chain solana
|
|
34
72
|
```
|
|
35
73
|
|
|
36
|
-
|
|
74
|
+
Confirm `Anthropic PreStocks` (symbol `ANTHRP`) at `Pren1FvFX6J3E4kXhJuCiAD5aDmGEb7qJRncwA8Lkhw`. Add ONE sentence on what a prestock is — tokenized exposure to a private company pre-IPO, tradable 24/7 on Solana.
|
|
75
|
+
|
|
76
|
+
Step 2 — Swap USDC → ANTHRP:
|
|
37
77
|
|
|
38
78
|
```bash
|
|
39
|
-
mp token
|
|
40
|
-
|
|
79
|
+
mp token swap \
|
|
80
|
+
--wallet funded-sol --chain solana \
|
|
81
|
+
--from-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
|
|
82
|
+
--to-token Pren1FvFX6J3E4kXhJuCiAD5aDmGEb7qJRncwA8Lkhw \
|
|
83
|
+
--from-amount 5
|
|
41
84
|
```
|
|
42
85
|
|
|
43
|
-
|
|
86
|
+
(`EPjFWdd5...` = USDC on Solana.)
|
|
87
|
+
|
|
88
|
+
**Summary:** "Just bought Anthropic pre-IPO from the terminal — one search, one swap, fractional private-company exposure on Solana. The CLI built the route, signed locally (key never left this machine), and broadcast."
|
|
89
|
+
|
|
90
|
+
**Next:** "If one prestock is cool, a whole basket is cooler — want me to build you the Elon Musk index fund?"
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Mission 3 — The Elon Musk Index Fund
|
|
44
95
|
|
|
45
|
-
|
|
96
|
+
**Trigger:** The user might also kick this off verbatim ("hey claude build the elon musk index fund"). When they do, just build it — $5 each into SpaceX, Neuralink, and TSLA. Don't stall on amount or composition.
|
|
46
97
|
|
|
47
|
-
**
|
|
98
|
+
**Propose (if not user-triggered):** "Want me to build you the Elon Musk index fund? SpaceX and Neuralink prestocks plus Tesla xStock — $5 into each, $15 total. Two private companies pre-IPO, one public stock, all on Solana."
|
|
99
|
+
|
|
100
|
+
**On yes:**
|
|
101
|
+
|
|
102
|
+
Step 1 — Discover (run all three in parallel):
|
|
48
103
|
|
|
49
104
|
```bash
|
|
50
|
-
mp token
|
|
51
|
-
mp token
|
|
52
|
-
mp
|
|
105
|
+
mp token search --query "spacex" --chain solana
|
|
106
|
+
mp token search --query "neuralink" --chain solana
|
|
107
|
+
mp token search --query "tesla" --chain solana
|
|
53
108
|
```
|
|
54
109
|
|
|
55
|
-
|
|
110
|
+
Step 2 — Identify from results (cheat codes for picking):
|
|
56
111
|
|
|
57
|
-
|
|
112
|
+
| Asset | Symbol | Mint |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| SpaceX PreStock | SPACEX | `PreANxuXjsy2pvisWWMNB6YaJNzr7681wJJr2rHsfTh` |
|
|
115
|
+
| Neuralink PreStocks | NEURALINK | `PrekqLJvJ3qVdXmBGDiexvwUTF4rLFDa6HWS4HJbw9S` |
|
|
116
|
+
| Tesla xStock | TSLAx | `XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB` |
|
|
58
117
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Pick a small swap based on what the wallet holds:
|
|
118
|
+
Step 3 — Swap $5 USDC into each (run all three in parallel):
|
|
62
119
|
|
|
63
120
|
```bash
|
|
64
|
-
mp token swap \
|
|
65
|
-
--
|
|
66
|
-
--
|
|
67
|
-
|
|
68
|
-
|
|
121
|
+
mp token swap --wallet funded-sol --chain solana \
|
|
122
|
+
--from-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
|
|
123
|
+
--to-token PreANxuXjsy2pvisWWMNB6YaJNzr7681wJJr2rHsfTh --from-amount 5
|
|
124
|
+
```
|
|
125
|
+
```bash
|
|
126
|
+
mp token swap --wallet funded-sol --chain solana \
|
|
127
|
+
--from-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
|
|
128
|
+
--to-token PrekqLJvJ3qVdXmBGDiexvwUTF4rLFDa6HWS4HJbw9S --from-amount 5
|
|
129
|
+
```
|
|
130
|
+
```bash
|
|
131
|
+
mp token swap --wallet funded-sol --chain solana \
|
|
132
|
+
--from-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
|
|
133
|
+
--to-token XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB --from-amount 5
|
|
69
134
|
```
|
|
70
135
|
|
|
71
|
-
|
|
136
|
+
**Summary:** "Elon Musk index fund is live — $15 AUM, three holdings, one prompt. Two private companies pre-IPO and a public stock, all settled on Solana. Vanguard could never."
|
|
137
|
+
|
|
138
|
+
**Next:** "Want to move some money cross-chain? I can bridge USDC from Solana to TON in one command."
|
|
72
139
|
|
|
73
|
-
|
|
74
|
-
- **`mp token swap`** — same chain, different tokens (e.g. SOL → USDC)
|
|
75
|
-
- **`mp token bridge`** — cross chain (e.g. ETH on Ethereum → USDC on Polygon)
|
|
76
|
-
- **`mp token transfer`** — same chain, same token, different wallet (e.g. send USDC to a friend)
|
|
140
|
+
---
|
|
77
141
|
|
|
78
|
-
## Mission
|
|
142
|
+
## Mission 4 — Cross-chain bridge: Solana → TON
|
|
79
143
|
|
|
80
|
-
**
|
|
144
|
+
**On yes:**
|
|
81
145
|
|
|
82
146
|
```bash
|
|
83
|
-
mp
|
|
147
|
+
mp token bridge \
|
|
148
|
+
--from-wallet funded-sol \
|
|
149
|
+
--from-chain solana --from-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
|
|
150
|
+
--from-amount 2 \
|
|
151
|
+
--to-chain ton --to-token EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs
|
|
84
152
|
```
|
|
85
153
|
|
|
86
|
-
|
|
154
|
+
(`EPjFWdd5...` = USDC on Solana. `EQCxE6mU...` = USDT on TON.)
|
|
155
|
+
|
|
156
|
+
**Summary:** "Solana → TON, signed locally, bridged cross-chain. USDC out, USDT on TON in. The CLI handled the route + the swap on the destination."
|
|
157
|
+
|
|
158
|
+
**Next:** "NBA playoffs are heating up — want me to check Kalshi for the title?"
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Mission 5 — Prediction markets: Kalshi NBA
|
|
87
163
|
|
|
88
|
-
|
|
164
|
+
**On yes:**
|
|
89
165
|
|
|
90
|
-
|
|
166
|
+
Step 1 — Search:
|
|
91
167
|
|
|
92
168
|
```bash
|
|
93
|
-
mp
|
|
169
|
+
mp prediction-market market search --provider kalshi --query "NBA"
|
|
94
170
|
```
|
|
95
171
|
|
|
96
|
-
|
|
172
|
+
Step 2 — Look at the `KXNBA-26` series ("Pro Basketball Champion — 2026"). Find sub-markets with `acceptingOrders: true` and real `bestAsk` prices. Pick one with a story — a heavy favorite (OKC, Boston) for clean execution, or a value underdog if the spread looks juicy.
|
|
97
173
|
|
|
98
|
-
|
|
174
|
+
Step 3 — Quick take on the market — implied probability, whether the price looks fair.
|
|
99
175
|
|
|
100
|
-
|
|
176
|
+
Step 4 — Then: "Want me to grab some shares?"
|
|
101
177
|
|
|
102
178
|
```bash
|
|
103
|
-
mp
|
|
179
|
+
mp prediction-market position buy \
|
|
180
|
+
--provider kalshi \
|
|
181
|
+
--tokenId <yes-tokenId> \
|
|
182
|
+
--price <bestAsk> \
|
|
183
|
+
--size <shares> \
|
|
184
|
+
--wallet funded-sol
|
|
104
185
|
```
|
|
105
186
|
|
|
106
|
-
|
|
187
|
+
⚠️ Kalshi settles in USD on Solana — no Polygon gas needed. `size * price` must be ≥ $1.
|
|
107
188
|
|
|
108
|
-
|
|
189
|
+
**Summary:** "Done — NBA title position placed from the terminal. No browser, no signup form, no second account."
|
|
109
190
|
|
|
110
|
-
**
|
|
191
|
+
**Next:** "One more — want me to buy you something from a Shopify store with crypto?"
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Mission 6 — Headless commerce: buy a shirt with USDC
|
|
196
|
+
|
|
197
|
+
**On yes:**
|
|
198
|
+
|
|
199
|
+
Step 1 — Search products:
|
|
111
200
|
|
|
112
201
|
```bash
|
|
113
|
-
mp
|
|
202
|
+
mp commerce product search --store shop.hel.io --query ""
|
|
114
203
|
```
|
|
115
204
|
|
|
116
|
-
|
|
205
|
+
Step 2 — Find "Helio Classic BLACK" ($0.10), variant ID: `gid://shopify/ProductVariant/55220565016953`.
|
|
206
|
+
|
|
207
|
+
Step 3 — Add to cart and checkout with funded-sol wallet:
|
|
117
208
|
|
|
118
209
|
```bash
|
|
119
|
-
mp
|
|
210
|
+
mp commerce cart add --variantId <variant-id> --quantity 1
|
|
211
|
+
mp commerce checkout --wallet funded-sol
|
|
120
212
|
```
|
|
121
213
|
|
|
122
|
-
|
|
214
|
+
**Summary:** "Just bought you a physical shirt for 10 cents with Solana Pay — fully headless, no browser, no checkout page."
|
|
123
215
|
|
|
124
|
-
|
|
216
|
+
**Closing line:** "That's funding with zero-fee USDC, prestocks, an index fund built in parallel, cross-chain bridging, prediction markets, and headless commerce — all one CLI, one AI, natural language."
|
|
217
|
+
|
|
218
|
+
---
|
|
125
219
|
|
|
126
|
-
|
|
220
|
+
## Optional Mission 7 — Virtual Account: EUR onramp + payment link
|
|
221
|
+
|
|
222
|
+
Use this if the user wants to see the open-banking side, or if they say "show me the EUR thing" / "fiat onramp."
|
|
223
|
+
|
|
224
|
+
**On yes:**
|
|
225
|
+
|
|
226
|
+
Step 1 — Create the EUR onramp:
|
|
127
227
|
|
|
128
228
|
```bash
|
|
129
|
-
|
|
130
|
-
|
|
229
|
+
mp virtual-account onramp create \
|
|
230
|
+
--name "Demo EUR Onramp" \
|
|
231
|
+
--fiat EUR \
|
|
232
|
+
--stablecoin EURC \
|
|
233
|
+
--wallet N39jn2g1tA7dmdyyoHt9yiQegQoVhnfQzq1ZzuZRF9e \
|
|
234
|
+
--chain solana
|
|
235
|
+
```
|
|
131
236
|
|
|
132
|
-
|
|
133
|
-
mp skill retrieve --name moonpay-prediction-market
|
|
237
|
+
⚠️ Use uppercase `EUR` and `EURC`. The wallet `N39jn2g1tA7dmdyyoHt9yiQegQoVhnfQzq1ZzuZRF9e` should already be registered on the user's virtual account; if not, run `mp virtual-account wallet add` first.
|
|
134
238
|
|
|
135
|
-
|
|
136
|
-
|
|
239
|
+
Step 2 — Create a payment link from the onramp ID returned in step 1:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
mp virtual-account onramp payment create --onrampId <id> --amount 10 --fiat EUR
|
|
137
243
|
```
|
|
138
244
|
|
|
139
|
-
|
|
245
|
+
Step 3 — Open the `paymentLink` URL.
|
|
246
|
+
|
|
247
|
+
**Summary:** "Live open-banking payment link — EUR goes in, EURC comes out on Solana."
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Recap (after the last mission, or whenever the user says "recap")
|
|
252
|
+
|
|
253
|
+
You just exercised the full MoonPay surface end-to-end:
|
|
254
|
+
|
|
255
|
+
- **1. Fund** — fiat → USDC via zero-fee stablecoin onramp
|
|
256
|
+
- **2. Prestock** — Anthropic pre-IPO from one swap
|
|
257
|
+
- **3. Index fund** — three-asset basket built in parallel
|
|
258
|
+
- **4. Bridge** — USDC Solana → USDT TON
|
|
259
|
+
- **5. Prediction markets** — Kalshi NBA position settled in USD
|
|
260
|
+
- **6. Commerce** — headless Shopify checkout with crypto
|
|
261
|
+
|
|
262
|
+
Plus optional Mission 7: virtual-account EUR onramp + payment link.
|
|
263
|
+
|
|
264
|
+
One CLI, one chat, one wallet. Real money, real chains.
|
|
265
|
+
|
|
266
|
+
## Skip / next / start commands
|
|
140
267
|
|
|
141
|
-
|
|
268
|
+
- **"skip"** → move to the next mission immediately, skip the summary.
|
|
269
|
+
- **"next"** / **"go"** / **"start"** → propose the next mission as if mid-flow.
|
|
270
|
+
- **"recap"** → run the recap above.
|
|
142
271
|
|
|
143
|
-
|
|
144
|
-
- Set up a multi-chain HD wallet (encrypted, OS keychain secured)
|
|
145
|
-
- Searched and analyzed tokens
|
|
146
|
-
- Checked portfolio across Solana, Ethereum, Bitcoin
|
|
147
|
-
- Executed a swap (built, signed locally, broadcast)
|
|
148
|
-
- Generated a fiat buy link
|
|
149
|
-
- Signed a message for verification
|
|
150
|
-
- Explored virtual accounts
|
|
151
|
-
- Browsed prediction markets
|
|
152
|
-
- Discovered and installed skills
|
|
272
|
+
## Tone
|
|
153
273
|
|
|
154
|
-
|
|
274
|
+
Casual, confident, like a capable assistant who knows what's available. Not robotic, not overly formal, no slides. The whole point is to feel like a normal day-to-day chat that happens to settle real money on real chains.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-polymarket
|
|
3
|
+
description: Trade on Polymarket — search markets, buy/sell outcome shares, track positions and PnL. Polymarket runs on Polygon and settles in USDC.e. Use when the user names Polymarket explicitly, or wants politics, crypto, news, or general-events markets (Polymarket's strength).
|
|
4
|
+
tags: [trading, prediction-market, polymarket]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Polymarket
|
|
8
|
+
|
|
9
|
+
The largest prediction-market venue. Settles on Polygon in USDC.e. Strong on **politics, news, crypto, and general events**.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
1. Authenticate: `mp login --email <email>` then `mp verify --email <email> --code <code>`
|
|
14
|
+
2. EVM wallet (any chain): `mp wallet list` (or create with `mp wallet create --name "main"`). The same EVM address works for Polygon.
|
|
15
|
+
3. Register the wallet with Polymarket (one-time):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
mp prediction-market user create --provider polymarket --wallet <evm-address>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
4. Fund the Polygon wallet with USDC.e and a tiny amount of POL for gas. Use **moonpay-fund-polymarket** for the recommended path.
|
|
22
|
+
|
|
23
|
+
## Browse and research
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Search by keyword
|
|
27
|
+
mp prediction-market market search --provider polymarket --query "bitcoin" --limit 10
|
|
28
|
+
|
|
29
|
+
# Trending (by 24h volume, min $150k)
|
|
30
|
+
mp prediction-market market trending list --provider polymarket --limit 10
|
|
31
|
+
|
|
32
|
+
# Browse tags / categories
|
|
33
|
+
mp prediction-market market tag list --provider polymarket
|
|
34
|
+
|
|
35
|
+
# Filter by tag
|
|
36
|
+
mp prediction-market market search --provider polymarket --query "*" --tagIds "crypto,politics"
|
|
37
|
+
|
|
38
|
+
# Full event details (every market under the event, all outcomes + prices)
|
|
39
|
+
mp prediction-market market event retrieve --provider polymarket --slug <event-slug>
|
|
40
|
+
|
|
41
|
+
# Live price for a single outcome token
|
|
42
|
+
mp prediction-market market price retrieve --provider polymarket --tokenId <token-id>
|
|
43
|
+
|
|
44
|
+
# Price history for an outcome
|
|
45
|
+
mp prediction-market market price-history list --provider polymarket --tokenId <token-id> --interval 1w
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Buy / sell
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Buy YES shares
|
|
52
|
+
mp prediction-market position buy \
|
|
53
|
+
--wallet main \
|
|
54
|
+
--provider polymarket \
|
|
55
|
+
--tokenId <outcome-token-id> \
|
|
56
|
+
--price 0.65 \
|
|
57
|
+
--size 100
|
|
58
|
+
|
|
59
|
+
# Sell shares
|
|
60
|
+
mp prediction-market position sell \
|
|
61
|
+
--wallet main \
|
|
62
|
+
--provider polymarket \
|
|
63
|
+
--tokenId <outcome-token-id> \
|
|
64
|
+
--price 0.70 \
|
|
65
|
+
--size 50
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Concepts:**
|
|
69
|
+
- `tokenId` comes from `outcomeTokens[].tokenId` in market search results.
|
|
70
|
+
- `price` is 0-1 (e.g., 0.65 = 65¢ per share, implies 65% probability).
|
|
71
|
+
- `size` is the share count.
|
|
72
|
+
- Cost = price × size (so 0.65 × 100 = $65 USDC.e).
|
|
73
|
+
- If the outcome resolves YES, each share pays $1 → profit = (1 − price) × size.
|
|
74
|
+
- `negRisk` markets use a different settlement framework — the CLI handles this automatically.
|
|
75
|
+
|
|
76
|
+
## Track + close positions
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
mp prediction-market position list --provider polymarket --wallet <address>
|
|
80
|
+
mp prediction-market position list --provider polymarket --wallet <address> --status closed
|
|
81
|
+
mp prediction-market pnl retrieve --provider polymarket --wallet <address>
|
|
82
|
+
mp prediction-market trade list --provider polymarket --wallet <address>
|
|
83
|
+
mp prediction-market activity list --provider polymarket --wallet <address>
|
|
84
|
+
|
|
85
|
+
# Redeem winning shares after a market resolves
|
|
86
|
+
mp prediction-market position redeem --provider polymarket --wallet main --tokenId <token-id>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Example flow
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# 1. Find
|
|
93
|
+
mp prediction-market market search --provider polymarket --query "bitcoin 200k"
|
|
94
|
+
|
|
95
|
+
# 2. Drill into the event
|
|
96
|
+
mp prediction-market market event retrieve --provider polymarket --slug <slug-from-search>
|
|
97
|
+
|
|
98
|
+
# 3. Sanity-check the chart
|
|
99
|
+
mp prediction-market market price-history list --provider polymarket --tokenId <yes-token-id> --interval 1w
|
|
100
|
+
|
|
101
|
+
# 4. Buy 50 YES at 40¢
|
|
102
|
+
mp prediction-market position buy --wallet main --provider polymarket --tokenId <yes-token-id> --price 0.40 --size 50
|
|
103
|
+
|
|
104
|
+
# 5. Confirm
|
|
105
|
+
mp prediction-market position list --provider polymarket --wallet <address>
|
|
106
|
+
|
|
107
|
+
# 6. Exit later at 60¢
|
|
108
|
+
mp prediction-market position sell --wallet main --provider polymarket --tokenId <yes-token-id> --price 0.60 --size 50
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Price-history intervals
|
|
112
|
+
|
|
113
|
+
| Interval | Range |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `1hr` | Last hour |
|
|
116
|
+
| `1d` | Last day |
|
|
117
|
+
| `1w` | Last week |
|
|
118
|
+
| `1m` | Last month |
|
|
119
|
+
| `max` | All time |
|
|
120
|
+
|
|
121
|
+
## Tips
|
|
122
|
+
|
|
123
|
+
- Use `mp --json prediction-market ...` for programmatic output (the `--json` flag is global, BEFORE the subcommand).
|
|
124
|
+
- Markets with higher volume have tighter spreads — check the `volume24h` field.
|
|
125
|
+
- Verify `acceptingOrders: true` before trading; closed markets reject orders.
|
|
126
|
+
- Polymarket = Polygon = USDC.e. NOT regular USDC. Bridging USDC → USDC.e is a separate step.
|
|
127
|
+
- A few cents of POL is enough for hundreds of trades.
|
|
128
|
+
|
|
129
|
+
## When to choose Polymarket vs Kalshi
|
|
130
|
+
|
|
131
|
+
- **Polymarket** — politics, crypto, news, world events. Largest catalog, deepest liquidity.
|
|
132
|
+
- **Kalshi** — sports, economic indicators, US-regulated events. Settles in regular USDC on Solana, no bridging required.
|
|
133
|
+
|
|
134
|
+
## Related skills
|
|
135
|
+
|
|
136
|
+
- **moonpay-kalshi** — sports + US-regulated markets on Solana
|
|
137
|
+
- **moonpay-fund-polymarket** — fund USDC.e + POL on Polygon
|
|
138
|
+
- **moonpay-check-wallet** — check Polygon balances
|
|
139
|
+
- **moonpay-swap-tokens** — bridge USDC → USDC.e on Polygon
|
|
140
|
+
- **moonpay-trading-automation** — automate prediction-market strategies
|