Skip to content

Commit 9a39f6d

Browse files
v15.1.0 (#51)
1 parent d070d53 commit 9a39f6d

File tree

9 files changed

+6031
-8
lines changed

9 files changed

+6031
-8
lines changed

.coverage

-32 KB
Binary file not shown.

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Solana Agent Kit provides a growing library of plugins that enhance your Solana
2222
* Jupiter Holdings - Get token holdings with USD values for any wallet
2323
* Jupiter Shield - Get security warnings and risk information for tokens
2424
* Jupiter Token Search - Search for tokens by symbol, name, or address
25+
* DFlow Prediction - Trade prediction markets with safety scoring and quality filters
26+
* Privy DFlow Prediction - Trade prediction markets with Privy delegated wallets
2527
* Privy Transfer - Transfer tokens using Privy delegated wallets with sponsored transactions
2628
* Privy Ultra - Swap tokens using Jupiter Ultra with Privy delegated wallets
2729
* Privy Trigger - Create and manage limit orders with Privy delegated wallets
@@ -506,6 +508,113 @@ config = {
506508
- `wallets` - List of embedded wallets with address, chain_type, and delegation status
507509
- `has_wallet` - Boolean indicating if the user has at least one wallet
508510

511+
### DFlow Prediction Market
512+
513+
This plugin enables Solana Agent to discover and trade prediction markets on Solana via DFlow's Prediction Market API. It includes safety-first features to help users avoid scams.
514+
515+
⚠️ **PREDICTION MARKET RISKS:**
516+
Unlike token swaps, prediction markets carry unique risks that cannot be fully detected:
517+
- **Insider trading**: Market creators may have privileged information
518+
- **Resolution risk**: Markets may resolve unfairly or not at all
519+
- **Liquidity traps**: You may not be able to exit your position
520+
521+
This tool applies safety filters and provides warnings, but cannot guarantee market legitimacy. Only bet what you can afford to lose. Prefer established series (major elections, sports).
522+
523+
```python
524+
config = {
525+
"tools": {
526+
"dflow_prediction": {
527+
"private_key": "my-private-key", # Required for trading - base58 string
528+
"rpc_url": "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY", # Required for trading
529+
530+
# Optional - Platform fee collection
531+
"platform_fee_bps": 50, # Fee in basis points (0.5%)
532+
"fee_account": "your-usdc-token-account", # Account to receive fees
533+
534+
# Optional - Quality filters (defaults shown)
535+
"min_volume_usd": 1000, # Minimum market volume
536+
"min_liquidity_usd": 500, # Minimum market liquidity
537+
"include_risky": False, # Show low-quality markets (with warnings)
538+
},
539+
},
540+
}
541+
```
542+
543+
**Features:**
544+
- **Safety Scoring**: Every market gets a safety score (HIGH/MEDIUM/LOW) with warnings
545+
- **Quality Filters**: Low-volume and low-liquidity markets filtered by default
546+
- **Risk Warnings**: Clear warnings about unverified series, new markets, unclear rules
547+
- **Blocking Execution**: Async orders poll internally so agent gets single response
548+
- **Platform Fees**: Collect fees on all trades via Jupiter Referral Program
549+
550+
**Actions:**
551+
552+
Discovery:
553+
- `search` - Search markets by text query (e.g., "trump", "bitcoin")
554+
- `list_events` - List prediction events with filters (status, sort, series)
555+
- `get_event` - Get specific event details with safety score
556+
- `list_markets` - List prediction markets with filters
557+
- `get_market` - Get market details including YES/NO token mints
558+
559+
Trading:
560+
- `buy` - Buy YES or NO outcome tokens with USDC
561+
- `sell` - Sell outcome tokens back to USDC
562+
- `positions` - Get hints for checking prediction market positions
563+
564+
**Safety Scores:**
565+
- **HIGH** (PROCEED): Established market, good volume/liquidity, verified series
566+
- **MEDIUM** (CAUTION): Some warnings (moderate volume, young market)
567+
- **LOW** (AVOID): Multiple red flags (low volume, unclear rules, unknown series)
568+
569+
**Example - Search and Buy:**
570+
```
571+
User: "Search for prediction markets about the 2028 election"
572+
Agent uses dflow_prediction action="search" query="2028 election"
573+
574+
User: "Buy $10 of YES on Kamala Harris winning"
575+
Agent uses dflow_prediction action="buy" market_id="PRES-2028-DEM-HARRIS" side="YES" amount=10
576+
```
577+
578+
### Privy DFlow Prediction
579+
580+
This plugin enables Solana Agent to discover and trade prediction markets on Solana via DFlow's Prediction Market API using Privy delegated wallets. Same features as DFlow Prediction but for Privy embedded wallet users.
581+
582+
```python
583+
config = {
584+
"tools": {
585+
"privy_dflow_prediction": {
586+
"app_id": "your-privy-app-id", # Required - your Privy application ID
587+
"app_secret": "your-privy-app-secret", # Required - your Privy application secret
588+
"signing_key": "wallet-auth:your-signing-key", # Required - your Privy wallet authorization signing key
589+
"rpc_url": "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY", # Required for trading
590+
591+
# Optional - Platform fee collection
592+
"platform_fee_bps": 50, # Fee in basis points (0.5%)
593+
"fee_account": "your-usdc-token-account", # Account to receive fees
594+
595+
# Optional - Quality filters (defaults shown)
596+
"min_volume_usd": 1000, # Minimum market volume
597+
"min_liquidity_usd": 500, # Minimum market liquidity
598+
"include_risky": False, # Show low-quality markets (with warnings)
599+
600+
# Optional - Gasless transactions
601+
"payer_private_key": "payer-private-key", # For sponsored transactions
602+
},
603+
},
604+
}
605+
```
606+
607+
**Features:**
608+
- Same safety scoring and quality filters as DFlow Prediction
609+
- **Privy Delegated Wallets**: Seamless user experience with embedded wallets
610+
- **Gasless Transactions**: Optionally sponsor gas fees for users via `payer_private_key`
611+
612+
**Actions:** Same as DFlow Prediction (search, list_events, get_event, list_markets, get_market, buy, sell, positions)
613+
614+
**Parameters:**
615+
- All DFlow Prediction parameters plus:
616+
- `privy_user_id` (required for trading) - Privy user ID (did:privy:xxx format)
617+
509618
### Rugcheck
510619

511620
This plugin enables Solana Agent to check if a token is a rug.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "sakit"
3-
version = "15.0.0"
3+
version = "15.1.0"
44
description = "Solana Agent Kit"
55
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
66
license = "MIT"

0 commit comments

Comments
 (0)