
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@flipcoin/plugin-elizaos
Advanced tools
ElizaOS plugin for FlipCoin prediction markets on Base.
Gives any ElizaOS agent the ability to:
Built-in risk guardrails: max trade size, daily spend limits, price impact checks, and idempotent trade execution.
# From npm (when published)
npm install @flipcoin/plugin-elizaos
# From GitHub
npm install github:flipcoin-fun/eliza-plugin-flipcoin
import { flipcoinPlugin } from "@flipcoin/plugin-elizaos";
// Add to your ElizaOS character config
const character = {
// ...
plugins: [flipcoinPlugin],
settings: {
FLIPCOIN_API_KEY: "fc_agent_live_...", // Required
FLIPCOIN_AUTO_SIGN: "true", // Enable autonomous execution
FLIPCOIN_MAX_TRADE_USDC: "50", // Max per trade (default: $50)
FLIPCOIN_MAX_DAILY_USDC: "200", // Max daily spend (default: $200)
},
};
What you need depends on what your agent will do:
| Goal | What's required |
|---|---|
| Read markets & quotes | API key only |
| Trial market (free) | API key + auto_sign setup |
| Buy shares | API key + Vault deposit + auto_sign |
| Sell shares | All of the above + ShareToken approval |
Verify it works:
curl -s https://www.flipcoin.fun/api/agent/ping \
-H "Authorization: Bearer fc_agent_live_..."
# → { "ok": true, "agentId": "...", ... }
Just want to read markets? You're done — skip to Configuration.
Your agent trades from a VaultV2 balance, not your wallet balance directly. Two on-chain transactions are needed from the owner wallet:
USDC.approve(VaultV2, amount) — allow VaultV2 to spend your USDCVaultV2.deposit(amount) — transfer USDC into the Vault ledgerEasier option: Use the "Add Funds" button on the Agents page or Settings page — it handles approve + deposit in one flow.
Minimum deposits by tier:
| Tier | Deposit | Use case |
|---|---|---|
| Trial | $0 (platform-funded) | First market free via Trial Program |
| Low | $35 | Small markets |
| Medium | $139 | Standard markets |
| High | $693 | High-liquidity markets |
Contract addresses (Base Sepolia):
0xf60a8672FB18f66Ed21b2EaB872188A2b75a74330xf2355D5AcB84e964A1564f1Db16a1a0571c4C71AFor your agent to trade without manual wallet signatures, you need a session key with on-chain delegation:
DelegationRegistry.setDelegation() transaction in your walletDelegationRegistry address (Base Sepolia): 0x945f3848D818FD4Fbc399cB13B647E4c89e744aa
Trial market shortcut: With auto_sign enabled, you can create your first market for free — no Vault deposit needed. See Trial Program.
Before selling shares, the owner wallet must approve the operator contracts to transfer ERC-1155 tokens. These are one-time transactions:
ShareToken.setApprovalForAll(backstopRouterAddress, true)ShareToken.setApprovalForAll(exchangeAddress, true)Get contract addresses from the config endpoint:
curl -s https://www.flipcoin.fun/api/agent/config \
-H "Authorization: Bearer $API_KEY" | jq '.contracts'
If approval is missing, the API returns SHARE_TOKEN_NOT_APPROVED with the exact contract and function to call.
| Error | Cause | Fix |
|---|---|---|
UNAUTHORIZED | Invalid or missing API key | Check FLIPCOIN_API_KEY value |
INSUFFICIENT_VAULT_BALANCE | Not enough USDC in Vault | Deposit via UI or contract |
DELEGATION_NOT_CONFIRMED | Session key not confirmed in DB | Complete setDelegation() tx, then confirm in UI |
NOT_DELEGATED | Session key not registered on-chain | Call setDelegation() on DelegationRegistry |
SHARE_TOKEN_NOT_APPROVED | Missing ERC-1155 approval for sells | Call setApprovalForAll() from owner wallet |
INTENT_EXPIRED | Too much time between intent and relay | Plugin handles this automatically; check network latency |
ORACLE_MISMATCH | Market uses a different oracle than expected | Retry or check market details |
| Setting | Required | Default | Description |
|---|---|---|---|
FLIPCOIN_API_KEY | Yes | — | Agent API key from FlipCoin |
FLIPCOIN_AUTO_SIGN | No | false | Enable server-side signing for autonomous trades |
FLIPCOIN_MAX_TRADE_USDC | No | 50 | Maximum single trade size in USDC |
FLIPCOIN_MAX_DAILY_USDC | No | 200 | Maximum daily spend in USDC |
FLIPCOIN_BASE_URL | No | https://www.flipcoin.fun | API base URL |
| Action | Description |
|---|---|
LIST_MARKETS | Browse open prediction markets with filters |
GET_MARKET | Get detailed info about a specific market |
GET_QUOTE | Preview a trade without executing |
BUY_YES | Buy YES shares on a market |
BUY_NO | Buy NO shares on a market |
SELL_YES | Sell YES shares |
SELL_NO | Sell NO shares |
| Provider | Description |
|---|---|
flipcoin-markets | Top open markets injected into agent context |
flipcoin-portfolio | Vault balance and top positions summary |
flipcoin-capabilities | What the agent can do, trade limits, daily budget |
Agent message
→ shouldTrade evaluator (soft gate: budget, capabilities)
→ Action handler (e.g. BUY_YES)
→ MarketService.getQuote() (preview)
→ PolicyService.assertCanTrade() (hard gate: limits, impact, market status)
→ TradingService.executeTrade() (intent → relay → receipt)
→ Idempotency journal (dedup within 10s window)
→ PolicyService.recordSpend()
→ TradeReceipt returned to agent
pip install flipcoinnpm install
npm run build # Build with tsup
npm test # Run tests (vitest)
npm run dev # Watch mode
MIT
FAQs
ElizaOS plugin for FlipCoin prediction markets on Base
We found that @flipcoin/plugin-elizaos demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.