From abstract-skills
Integrates Myriad Protocol prediction markets on Abstract: REST API for market data, prices, portfolios; polkamarkets-js SDK for trading shares and claiming winnings; referralBuy for builder revenue.
How this skill is triggered — by the user, by Claude, or both
Slash command
/abstract-skills:myriad-on-abstractThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Myriad Protocol is a prediction market platform live on Abstract (and Linea, BNB Chain). Integrate it to show market data, let users trade outcome shares, and earn revenue from buy volume.
Myriad Protocol is a prediction market platform live on Abstract (and Linea, BNB Chain). Integrate it to show market data, let users trade outcome shares, and earn revenue from buy volume.
| Layer | Tool | Use For |
|---|---|---|
| Read-only data | REST API V2 | Market listings, prices, charts, portfolio, events |
| Trading | polkamarkets-js SDK | Buy/sell shares, claim winnings, ERC-20 approvals |
| Revenue | referralBuy + builder code | Earn distributor fee (typically 1%) on buy volume |
Base URL: https://api-v2.myriadprotocol.com/
Auth: x-api-key: <your_api_key> (or ?api_key=<your_api_key>)
Rate limit: 50 req/s per IP/key
Contact the Myriad team to obtain an API key.
// 1. Fetch open markets on Abstract
const res = await fetch(
"https://api-v2.myriadprotocol.com/markets?network_id=2741&state=open&sort=volume_24h&limit=10",
{ headers: { "x-api-key": "<your_api_key>" } }
);
const { data: markets } = await res.json();
// 2. Get a buy quote for a specific outcome
const quote = await fetch("https://api-v2.myriadprotocol.com/markets/quote", {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": "<your_api_key>" },
body: JSON.stringify({
market_id: 164,
outcome_id: 0,
network_id: 2741,
action: "buy",
value: 100,
slippage: 0.01,
}),
});
// Returns: shares, price_before, price_after, calldata, fees
// 3. Execute via SDK (see references/sdk.md) or send calldata directly
const claim = await fetch("https://api-v2.myriadprotocol.com/markets/claim", {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": "<your_api_key>" },
body: JSON.stringify({ market_id: 164, network_id: 2741 }),
});
// Returns: action ("claim_winnings" | "claim_voided"), outcome_id, calldata
| Task | Use |
|---|---|
| Display market listings, prices, charts | API — GET /markets |
| Show user portfolio / positions | API — GET /users/:address/portfolio |
| Get trade quotes + calldata | API — POST /markets/quote |
| Execute trades from a backend/agent | SDK — pm.buy() / pm.sell() |
| Execute trades from a dapp with wallet | API calldata + wallet sendTransaction |
| Earn revenue on buy volume | SDK — pm.referralBuy() with builder code |
| Claim winnings after resolution | SDK — pm.claimWinnings() or API calldata |
| Contract | Mainnet | Testnet |
|---|---|---|
| PredictionMarket | 0x3e0F5F8F5Fb043aBFA475C0308417Bf72c463289 | 0x6c44Abf72085E5e71EeB7C951E3079073B1E7312 |
| PredictionMarketQuerier | 0x1d5773Cd0dC74744C1F7a19afEeECfFE64f233Ff | 0xa30c60107f9011dd49fc9e04ebe15963064eecc1 |
| Token | Mainnet | Testnet |
|---|---|---|
| USDC.e | 0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1 | 0x8820c84FD53663C2e2EA26e7a4c2b79dCc479765 |
| PENGU | 0x9eBe3A824Ca958e4b3Da772D2065518F009CBa62 | 0x6ccDDCf494182a3A237ac3f33A303a57961FaF55 |
| PTS | 0x0b07cf011b6e2b7e0803b892d97f751659940f23 | 0x6cC39C1149aed1fdbf6b11Fd60C18b96446cBc96 |
Builders earn the distributor_fee (typically 1%) on eligible buy trades by using referralBuy with a whitelisted builder code. Must apply for whitelisting with the Myriad team.
See references/revenue-sharing.md for full integration details.
erc20.approve() for the PredictionMarket contract before any buy/sellvalue only — the amount of the collateral token to spend (not shares)value or shares — provide exactly one, not bothreferralBuy works on any market — calling it without a whitelisted code is safe, it just won't earn revenuenetwork_id is required on most API calls — use 2741 for Abstract mainnet, 11124 for testnetdecimals() before formatting amounts| Topic | Where to look |
|---|---|
| Full REST API reference | references/api-v2.md |
| polkamarkets-js SDK | references/sdk.md |
| Revenue sharing integration | references/revenue-sharing.md |
| All contract addresses (multi-chain) | references/contracts.md |
npx claudepluginhub abstract-foundation/abstract-skillsTrades Myriad prediction markets on BNB Chain: discover live markets, buy/sell positions, monitor portfolio, claim winnings. Run as CLI or MCP server for multi-agent workflows.
Trade on Polymarket prediction markets on Polygon: browse markets, check wallet/CLOB balances, buy/sell YES/NO shares with safety gates. Uses Node.js scripts, WDK vault, and auto-setup.
Interacts with Polymarket prediction markets to search events, check odds, place USDC.e bets on Polygon, and manage positions.