Command Reference#
All commands follow the pattern seesaw <group> <command> [options]. By default, output is JSON wrapped in a standard envelope. Use --human for human-readable output.
JSON Envelope Format#
Every JSON response uses this envelope:
{
"success": true,
"data": { ... },
"error": null,
"meta": {
"command": "market get",
"duration_ms": 142,
"slot": 312456789,
"signature": "5Uj..."
}
}
The slot and signature fields are present only for commands that submit transactions.
config#
Protocol configuration and CLI settings.
config get#
Fetch and decode the on-chain config account.
| Option | Description |
|---|---|
| (none) | Uses resolved RPC endpoint |
seesaw config get
{
"success": true,
"data": {
"address": "CfgXx...",
"authority": "Auth1...",
"treasury": "Treas...",
"defaultSettlementMint": "EPjFW...",
"takerFeeBps": 200,
"makerRebateBps": 0,
"tickSizeBps": 100,
"maxOrdersPerUser": 32,
"marketsCreated": 1547,
"version": 1
},
"error": null,
"meta": { "command": "config get", "duration_ms": 89 }
}
config init-file#
Create default config file at ~/.seesaw/config.yaml.
| Option | Description |
|---|---|
| (none) | Creates config with default values |
seesaw config init-file
{
"success": true,
"data": {
"path": "/Users/you/.seesaw/config.yaml"
},
"error": null,
"meta": { "command": "config init-file", "duration_ms": 2 }
}
config show#
Show current resolved configuration (file + env + flags merged).
| Option | Description |
|---|---|
| (none) | Displays merged config |
seesaw config show
{
"success": true,
"data": {
"rpc_url": "https://api.mainnet-beta.solana.com",
"keypair": "/Users/you/.config/solana/id.json",
"api_url": "https://api.seesaw.markets",
"output": "json",
"config_file": "/Users/you/.seesaw/config.yaml"
},
"error": null,
"meta": { "command": "config show", "duration_ms": 1 }
}
market#
Market lifecycle commands.
market get#
Fetch and decode a market account, including orderbook summary.
| Option | Description |
|---|---|
<address> | Market account address (positional argument) |
seesaw market get Mkt1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"address": "Mkt1abc123def456ghi789jkl012mno345pqr678stu",
"marketId": "112640",
"state": "TRADING",
"outcome": "NONE",
"pythFeedId": "ef0d8b6f...",
"tStart": "2026-03-04T12:00:00.000Z",
"tEnd": "2026-03-04T12:15:00.000Z",
"startPrice": "14250000000",
"endPrice": "0",
"totalYesShares": "5000000",
"totalNoShares": "5000000",
"totalCollateral": "5000000",
"totalVolume": "12000000",
"totalTrades": 24,
"totalPositions": 8,
"creator": "Cre8or...",
"orderbook": {
"bestBid": 4800,
"bestAsk": 5200,
"spread": 400,
"bidLevels": 3,
"askLevels": 4
}
},
"error": null,
"meta": { "command": "market get", "duration_ms": 156 }
}
market create#
Create a new prediction market.
| Option | Required | Description |
|---|---|---|
--pyth-feed <address> | Yes | Pyth price feed account address |
--pyth-feed-id <hex> | Yes | Pyth price feed ID (32 bytes hex) |
--settlement-mint <address> | Yes | Settlement token mint address |
--duration <seconds> | No | Market duration in seconds (default: 900) |
--max-confidence-ratio <bps> | No | Max confidence ratio in basis points (default: 0) |
seesaw market create \
--pyth-feed Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD \
--pyth-feed-id ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d \
--settlement-mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
--duration 900
{
"success": true,
"data": {
"market": "Mkt1abc...",
"orderbook": "OB1abc...",
"vault": "Vlt1abc...",
"marketId": "112640"
},
"error": null,
"meta": {
"command": "market create",
"duration_ms": 1250,
"signature": "5UjR4w...",
"slot": 312456789
}
}
market snapshot#
Record end price snapshot from the Pyth oracle.
| Option | Required | Description |
|---|---|---|
--market-id <id> | Yes | Market epoch ID |
--pyth-feed <address> | Yes | Pyth price feed account |
--pyth-feed-id <hex> | Yes | Pyth feed ID (32 bytes hex) |
--creator <address> | Yes | Market creator address |
--duration <seconds> | No | Market duration in seconds (default: 900) |
seesaw market snapshot \
--market-id 112640 \
--pyth-feed Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD \
--pyth-feed-id ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d \
--creator Cre8orAddr123456789abcdefghijklmnopqrstuv
{
"success": true,
"data": {
"market": "Mkt1abc..."
},
"error": null,
"meta": {
"command": "market snapshot",
"duration_ms": 980,
"signature": "3kPq1x...",
"slot": 312456800
}
}
market resolve#
Resolve market outcome from price snapshots.
| Option | Required | Description |
|---|---|---|
--market-id <id> | Yes | Market epoch ID |
--pyth-feed-id <hex> | Yes | Pyth feed ID (32 bytes hex) |
--creator <address> | Yes | Market creator address |
--duration <seconds> | No | Market duration in seconds (default: 900) |
seesaw market resolve \
--market-id 112640 \
--pyth-feed-id ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d \
--creator Cre8orAddr123456789abcdefghijklmnopqrstuv
{
"success": true,
"data": {
"market": "Mkt1abc..."
},
"error": null,
"meta": {
"command": "market resolve",
"duration_ms": 870,
"signature": "2yNm8v...",
"slot": 312456810
}
}
market expire#
Expire a market if no resolution occurs within 24 hours of market end.
| Option | Required | Description |
|---|---|---|
--market-id <id> | Yes | Market epoch ID |
--pyth-feed-id <hex> | Yes | Pyth feed ID (32 bytes hex) |
--creator <address> | Yes | Market creator address |
--duration <seconds> | No | Market duration in seconds (default: 900) |
seesaw market expire \
--market-id 112640 \
--pyth-feed-id ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d \
--creator Cre8orAddr123456789abcdefghijklmnopqrstuv
{
"success": true,
"data": {
"market": "Mkt1abc..."
},
"error": null,
"meta": {
"command": "market expire",
"duration_ms": 910,
"signature": "4fRt2p...",
"slot": 312456820
}
}
market force-close#
Force-close a position on a resolved or expired market. This is a permissionless operation that anyone can call to settle a position and reclaim associated account rent.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--position-owner <address> | Yes | Position owner address |
--user-usdc-ata <address> | Yes | Position owner's USDC token account |
--settlement-mint <address> | Yes | Settlement mint address |
seesaw market force-close \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--position-owner User1abc123def456ghi789jkl012mno345pqr678s \
--user-usdc-ata ATA1abc123def456ghi789jkl012mno345pqr678stu \
--settlement-mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
{
"success": true,
"data": {
"market": "Mkt1abc...",
"position": "Pos1abc...",
"vault": "Vlt1abc..."
},
"error": null,
"meta": {
"command": "market force-close",
"duration_ms": 1100,
"signature": "7hYt3q...",
"slot": 312456830
}
}
market close#
Close a market account and reclaim rent to the creator. All positions must be settled first.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--creator <address> | Yes | Market creator address |
seesaw market close \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--creator Cre8orAddr123456789abcdefghijklmnopqrstuv
{
"success": true,
"data": {
"market": "Mkt1abc..."
},
"error": null,
"meta": {
"command": "market close",
"duration_ms": 850,
"signature": "9pWx4r...",
"slot": 312456840
}
}
order#
Order management commands.
order place#
Place a limit order on the order book.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--side <side> | Yes | Order side: buy-yes, sell-yes, buy-no, sell-no |
--price <bps> | Yes | Price in basis points [1-9999] |
--quantity <amount> | Yes | Number of shares (in base units) |
--token-account <address> | Yes | User's settlement token account |
--order-type <type> | No | Order type: limit, post-only, ioc (default: limit) |
seesaw order place \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--side buy-yes \
--price 5000 \
--quantity 1000000 \
--token-account ATA1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"market": "Mkt1abc...",
"orderbook": "OB1abc...",
"position": "Pos1abc..."
},
"error": null,
"meta": {
"command": "order place",
"duration_ms": 1050,
"signature": "6nKm5s...",
"slot": 312456850
}
}
order cancel#
Cancel an existing order.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--order-id <id> | Yes | Order ID to cancel |
--token-account <address> | Yes | User's settlement token account |
seesaw order cancel \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--order-id 42 \
--token-account ATA1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"market": "Mkt1abc...",
"orderbook": "OB1abc...",
"position": "Pos1abc...",
"cancelledOrderId": "42"
},
"error": null,
"meta": {
"command": "order cancel",
"duration_ms": 920,
"signature": "8wLp6t...",
"slot": 312456860
}
}
order list#
List orders on a market's order book. Optionally filter by owner.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--owner <address> | No | Filter by owner address |
# List aggregated orderbook
seesaw order list --market Mkt1abc123def456ghi789jkl012mno345pqr678stu
# List orders for a specific owner
seesaw order list \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--owner User1abc123def456ghi789jkl012mno345pqr678s
Aggregated orderbook output:
{
"success": true,
"data": {
"bids": [
{ "price": 4800, "quantity": "500000", "orders": 3 },
{ "price": 4700, "quantity": "250000", "orders": 1 }
],
"asks": [
{ "price": 5200, "quantity": "300000", "orders": 2 },
{ "price": 5500, "quantity": "1000000", "orders": 5 }
]
},
"error": null,
"meta": { "command": "order list", "duration_ms": 120 }
}
Filtered by owner:
{
"success": true,
"data": [
{
"orderId": "42",
"owner": "User1abc...",
"priceBps": 4800,
"quantity": "100000",
"originalQuantity": "200000",
"side": 0,
"isActive": true
}
],
"error": null,
"meta": { "command": "order list", "duration_ms": 115 }
}
position#
Position management commands.
position get#
Fetch and decode a position account.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--user <address> | No | User address (defaults to wallet) |
seesaw position get --market Mkt1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"address": "Pos1abc...",
"market": "Mkt1abc...",
"owner": "User1abc...",
"yesShares": "500000",
"noShares": "0",
"lockedYesShares": "100000",
"lockedNoShares": "0",
"collateralDeposited": "500000",
"collateralLocked": "100000",
"payout": "0",
"totalBought": "500000",
"totalSold": "0",
"totalFeesPaid": "10000",
"totalRebatesEarned": "0",
"orderCount": 2,
"settled": false
},
"error": null,
"meta": { "command": "position get", "duration_ms": 98 }
}
position mint#
Mint YES/NO share pairs by depositing settlement tokens (USDC).
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--amount <lamports> | Yes | Amount in base units |
--token-account <address> | Yes | User's settlement token account |
seesaw position mint \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--amount 1000000 \
--token-account ATA1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"market": "Mkt1abc...",
"position": "Pos1abc...",
"amount": "1000000"
},
"error": null,
"meta": {
"command": "position mint",
"duration_ms": 1080,
"signature": "4rNx7u...",
"slot": 312456870
}
}
position redeem#
Redeem winning shares for settlement tokens after market resolution.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--amount <lamports> | Yes | Amount to redeem in base units |
--token-type <type> | Yes | Token type: yes or no |
--token-account <address> | Yes | User's settlement token account |
seesaw position redeem \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--amount 500000 \
--token-type yes \
--token-account ATA1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"market": "Mkt1abc...",
"position": "Pos1abc...",
"amount": "500000",
"tokenType": "yes"
},
"error": null,
"meta": {
"command": "position redeem",
"duration_ms": 1020,
"signature": "1mTy8v...",
"slot": 312456880
}
}
position withdraw#
Withdraw internal position shares as SPL tokens. This converts internal share tracking to actual SPL token ownership.
| Option | Required | Description |
|---|---|---|
--market <address> | Yes | Market account address |
--amount <lamports> | Yes | Amount to withdraw in base units |
--token-type <type> | Yes | Token type: yes or no |
--token-account <address> | Yes | User's token account for the withdrawn type |
seesaw position withdraw \
--market Mkt1abc123def456ghi789jkl012mno345pqr678stu \
--amount 200000 \
--token-type yes \
--token-account YesATA1abc123def456ghi789jkl012mno345pqr678
{
"success": true,
"data": {
"market": "Mkt1abc...",
"position": "Pos1abc...",
"amount": "200000",
"tokenType": "yes"
},
"error": null,
"meta": {
"command": "position withdraw",
"duration_ms": 990,
"signature": "5kHz9w...",
"slot": 312456890
}
}
admin#
Protocol admin commands. These require the protocol authority keypair.
admin init#
Initialize protocol configuration. This is a one-time operation.
| Option | Required | Description |
|---|---|---|
--treasury <address> | Yes | Treasury address |
--settlement-mint <address> | Yes | Default settlement mint address |
--taker-fee <bps> | No | Taker fee in basis points (default: 30) |
--maker-rebate <bps> | No | Maker rebate in basis points (default: 0) |
--tick-size <bps> | No | Tick size in basis points (default: 100) |
seesaw admin init \
--treasury TreasuryAddr123456789abcdefghijklmnopqrst \
--settlement-mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
{
"success": true,
"data": {
"config": "CfgXx..."
},
"error": null,
"meta": {
"command": "admin init",
"duration_ms": 1200,
"signature": "2bGk0x...",
"slot": 312456900
}
}
admin pause#
Pause all protocol trading activity. No new orders or markets can be created while paused.
| Option | Description |
|---|---|
| (none) | Uses authority keypair |
seesaw admin pause
{
"success": true,
"data": {
"config": "CfgXx...",
"paused": true
},
"error": null,
"meta": {
"command": "admin pause",
"duration_ms": 890,
"signature": "3cHl1y...",
"slot": 312456910
}
}
admin unpause#
Resume protocol trading activity.
| Option | Description |
|---|---|
| (none) | Uses authority keypair |
seesaw admin unpause
{
"success": true,
"data": {
"config": "CfgXx...",
"paused": false
},
"error": null,
"meta": {
"command": "admin unpause",
"duration_ms": 870,
"signature": "4dIm2z...",
"slot": 312456920
}
}
admin update-fees#
Update protocol fee configuration. The sum of --protocol-fee and --creator-fee must equal --taker-fee.
| Option | Required | Description |
|---|---|---|
--taker-fee <bps> | Yes | Total taker fee in basis points (max 500) |
--protocol-fee <bps> | Yes | Protocol portion of taker fee in basis points |
--creator-fee <bps> | Yes | Creator portion of taker fee in basis points |
seesaw admin update-fees \
--taker-fee 200 \
--protocol-fee 150 \
--creator-fee 50
{
"success": true,
"data": {
"config": "CfgXx...",
"takerFeeBps": 200,
"protocolFeeBps": 150,
"creatorFeeBps": 50
},
"error": null,
"meta": {
"command": "admin update-fees",
"duration_ms": 910,
"signature": "5eJn3a...",
"slot": 312456930
}
}
admin update-tick-size#
Update the order book tick size (minimum price increment).
| Option | Required | Description |
|---|---|---|
--tick-size <bps> | Yes | New tick size in basis points (1-1000) |
seesaw admin update-tick-size --tick-size 50
{
"success": true,
"data": {
"config": "CfgXx...",
"tickSizeBps": 50
},
"error": null,
"meta": {
"command": "admin update-tick-size",
"duration_ms": 880,
"signature": "6fKo4b...",
"slot": 312456940
}
}
api#
Indexer API commands. These query the Seesaw indexer for aggregated protocol data. No keypair is required for public endpoints.
api markets#
List all markets from the indexer.
| Option | Description |
|---|---|
| (none) | Fetches all markets |
seesaw api markets
{
"success": true,
"data": [
{
"id": "Mkt1abc...",
"pair": "SOL/USD",
"state": "TRADING",
"yesPrice": 0.52,
"noPrice": 0.48,
"volume": 15200.5,
"timeRemaining": "8m 32s"
}
],
"error": null,
"meta": { "command": "api markets", "duration_ms": 210 }
}
api market#
Get detailed market info from the indexer.
| Option | Description |
|---|---|
<id> | Market ID (positional argument) |
seesaw api market Mkt1abc123def456ghi789jkl012mno345pqr678stu
{
"success": true,
"data": {
"id": "Mkt1abc...",
"pair": "SOL/USD",
"state": "TRADING",
"startPrice": 142.5,
"currentPrice": 143.1,
"yesPrice": 0.62,
"noPrice": 0.38,
"volume": 15200.5,
"totalTrades": 48,
"totalPositions": 12,
"timeRemaining": "8m 32s",
"createdAt": "2026-03-04T12:00:00.000Z"
},
"error": null,
"meta": { "command": "api market", "duration_ms": 180 }
}
api leaderboard#
Get the leaderboard from the indexer.
| Option | Required | Description |
|---|---|---|
--period <period> | No | Time period: daily, weekly, monthly, all_time (default: weekly) |
--metric <metric> | No | Sort metric: pnl, volume, winRate, trades (default: pnl) |
seesaw api leaderboard --period weekly --metric pnl
{
"success": true,
"data": [
{
"rank": 1,
"address": "Top1abc...",
"stats": {
"totalPnl": 4250.0,
"winRate": 0.72,
"totalTrades": 156,
"totalVolume": 52000.0
}
}
],
"error": null,
"meta": { "command": "api leaderboard", "duration_ms": 195 }
}
api stats#
Get protocol-wide statistics from the indexer.
| Option | Description |
|---|---|
| (none) | Fetches global protocol stats |
seesaw api stats
{
"success": true,
"data": {
"totalMarkets": 15470,
"totalVolume": 2450000.0,
"totalTrades": 89200,
"activeMarkets": 12,
"totalUsers": 3400
},
"error": null,
"meta": { "command": "api stats", "duration_ms": 150 }
}
api stats-personal#
Get personal trading statistics. Requires authentication.
| Option | Required | Description |
|---|---|---|
--token <jwt> | No | Auth token (or set SEESAW_API_TOKEN env var) |
seesaw api stats-personal --token eyJhbGci...
{
"success": true,
"data": {
"totalPnl": 1250.0,
"winRate": 0.65,
"totalTrades": 42,
"totalVolume": 8500.0,
"marketsParticipated": 28
},
"error": null,
"meta": { "command": "api stats-personal", "duration_ms": 175 }
}
api achievements#
Get user achievements. Requires authentication.
| Option | Required | Description |
|---|---|---|
--token <jwt> | No | Auth token (or set SEESAW_API_TOKEN env var) |
seesaw api achievements --token eyJhbGci...
{
"success": true,
"data": [
{
"id": "first_trade",
"name": "First Trade",
"description": "Place your first order",
"unlockedAt": "2026-02-15T09:30:00.000Z"
},
{
"id": "winning_streak_5",
"name": "Hot Streak",
"description": "Win 5 markets in a row",
"unlockedAt": null
}
],
"error": null,
"meta": { "command": "api achievements", "duration_ms": 160 }
}
api copy-trading-leaders#
Get copy-trading leaders from the indexer.
| Option | Description |
|---|---|
| (none) | Fetches top copy-trading leaders |
seesaw api copy-trading-leaders
{
"success": true,
"data": [
{
"address": "Lead1abc...",
"followers": 24,
"pnl": 8500.0,
"winRate": 0.78,
"totalTrades": 312
}
],
"error": null,
"meta": { "command": "api copy-trading-leaders", "duration_ms": 190 }
}
api compliance-check#
Run a compliance check on a wallet address. Requires authentication.
| Option | Required | Description |
|---|---|---|
--address <address> | Yes | Wallet address to check |
--token <jwt> | No | Auth token (or set SEESAW_API_TOKEN env var) |
seesaw api compliance-check \
--address User1abc123def456ghi789jkl012mno345pqr678s \
--token eyJhbGci...
{
"success": true,
"data": {
"address": "User1abc...",
"compliant": true,
"restricted": false,
"checkedAt": "2026-03-04T12:05:00.000Z"
},
"error": null,
"meta": { "command": "api compliance-check", "duration_ms": 320 }
}