Complete API reference for AI agents (OpenClaw, Clawdbot, ElizaOS) and automated mining. Compatible with any HTTP-capable agent framework.
API keys give full control over your mining account and real funds. Anyone with your API key can:
Never share your API key publicly. Treat it like a password. Revoke compromised keys immediately.
But hey, that's also what makes it fun! 🤖 Your AI agent can mine 24/7 autonomously.
Go to Settings → API Keys → Create Key. Copy it immediately — you won't see it again!
export REFINORE_API_URL="https://automine.refinore.com/api" export REFINORE_API_KEY="rsk_your_key_here"
Every account has an embedded Solana wallet. Discover it via the API:
curl "$REFINORE_API_URL/account/me" \
-H "x-api-key: $REFINORE_API_KEY"
# Response includes:
# {
# "wallet_address": "HVDr...hEdb",
# "deposit_instructions": {
# "network": "Solana",
# "address": "HVDr...hEdb",
# "supported_tokens": ["SOL", "USDC", "ORE", "stORE", "SKR"],
# "note": "stORE means the current mint. Legacy stORE is send/unshield-only for migration at https://ore.com/stake.",
# "minimum_sol_for_gas": "0.005 SOL"
# }
# }Send SOL or USDC to the wallet address above. You need at least 0.005 SOL for gas fees and some mining collateral (e.g., 0.01+ SOL).
curl -X POST "$REFINORE_API_URL/mining/start" \
-H "x-api-key: $REFINORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "YOUR_WALLET_ADDRESS",
"sol_amount": 0.01,
"num_squares": 15,
"mining_token": "SOL",
"risk_tolerance": "less-risky"
}'All authenticated endpoints require the x-api-key header:
curl "$REFINORE_API_URL/endpoint" \ -H "x-api-key: rsk_your_key_here"
Keys use the rsk_ prefix and are SHA-256 hashed server-side. API keys never expire. Max 5 keys per account. Revoke in Settings → API Keys if compromised.
Alternative: Authorization: Bearer <jwt_token> (Privy JWT — used by the web dashboard).
https://automine.refinore.com/api/account/meGet your account info including wallet address, email, and deposit instructions. Essential for agents to discover where to send funds.
Response:
{
"privy_user_id": "did:privy:abc123",
"email": "user@example.com",
"wallet_address": "HVDr...hEdb",
"wallet_chain": "solana",
"wallet_type": "embedded",
"created_at": "2026-01-15T10:00:00Z",
"deposit_instructions": {
"network": "Solana",
"address": "HVDr...hEdb",
"supported_tokens": ["SOL", "USDC", "ORE", "stORE", "SKR"],
"minimum_sol_for_gas": "0.005 SOL",
"note": "stORE means the current mint. Legacy stORE is send/unshield-only for migration at https://ore.com/stake."
}
}/mining/startStart a new mining session. Use the wallet address from /account/me.
Request Body:
{
"wallet_address": "YOUR_WALLET_ADDRESS",
"sol_amount": 0.005,
"num_squares": 25,
"tile_selection_mode": "optimal",
"risk_tolerance": "less-risky",
"mining_token": "SOL",
"auto_restart": true,
"frequency": "every_round"
}tile_selection_mode: optimal | random | custom | odd | even | hot | cold
custom_tiles: Array of tile indices 0-24 (0-indexed: tile 1 in UI = index 0, tile 25 = index 24). Required when mode is custom.
mining_token: SOL | USDC | ORE | stORE | SKR
risk_tolerance: degen | risky | less-risky | positive-ev
Legacy values high, medium, low are auto-mapped to risky, less-risky, positive-ev.
/mining/start(with custom tiles)Start mining with specific tile IDs (0-24)
{
"wallet_address": "YOUR_WALLET",
"sol_amount": 0.005,
"num_squares": 5,
"tile_selection_mode": "custom",
"custom_tiles": [0, 6, 12, 18, 24],
"mining_token": "SOL"
}/mining/session/editLive-edit an active manual mining session between rounds. Only send the fields you want to change — everything else stays the same. Changes take effect on the next deployment.
{
"sol_amount": 0.01,
"num_squares": 20,
"tile_selection_mode": "hot",
"risk_tolerance": "risky"
}For strategy-based sessions, use PATCH /auto-strategies/:id/live instead.
/mining/stopStop the active mining session
/mining/sessionGet active session status, stats, and current round info
/mining/session-rounds?session_id=UUIDGet round-by-round results for a session
/mining/history?limit=20Get historical mining sessions
/mining/last-configGet last mining configuration (useful for auto-restart)
/mining/round/:roundNumberGet details for a specific round by number (includes your deployment and win/loss status)
/mining/reload-sessionReload/restart a mining session with existing config
{ "session_id": "uuid-here" }/wallet/balances?wallet=WALLET_ADDRESSGet all token balances for a wallet: SOL, ORE, USDC, current stORE, legacy stORE, SKR
💡 Tip: Use /account/me first to get the wallet address, then pass it here.
Response:
{
"sol": 2.345,
"ore": 12.7,
"store": 5.0,
"legacyStore": 0.25,
"usdc": 50.0,
"skr": 0.0
}/wallet/sendSend SOL, ORE, USDC, stORE, or legacy stORE from the user's linked wallet. JWT, API key, and OAuth rsk_ grants can all call it.from must be a linked Solana wallet.to must be another linked Solana wallet or an address on the confirmed send allowlist. Sends have no default amount cap. `from` must be a linked Solana wallet, and `to` must be a linked wallet or a JWT-confirmed allowlist address. `WALLET_SEND_CAP_*` applies only when that variable is set. Every caller is limited to 5 sends per minute.
{
"from": "YOUR_WALLET",
"to": "DESTINATION_WALLET",
"amount": 0.1,
"token": "SOL"
}/wallet/send-allowlistConfirm or remove destinations that API keys and OAuth grants may send to. These routes accept a Privy user session only. API keys and OAuth grants receive 403. Adding an address in Settings → API Keys is the user's confirmation. The in-app Send button still asks the wallet to sign.
{ "address": "DESTINATION_WALLET", "label": "Treasury" }/wallet/claim-sol/wallet/claim-oreClaim to the authenticated user's primary wallet. An empty body is enough. Identity fields wallet_address, wallet, walletAddress, accountAddress, privyUserId, and privy_user_id are ignored. A destination field such as to is rejected. JWT, API key, and OAuth grants can call these routes.
/rewards?wallet=WALLET_ADDRESSGet mining rewards summary: unclaimed SOL, unrefined ORE, bonus refined ORE
Round responses expose the exact distribution_mask, tile_distribution, solo_tile_indices, split_tile_indices, and winning_tile_type. Tile indices are 0-based (0-24). Distribution fields are null before the split/solo cutover at round 349213.
/rounds/currentGet current round info: round number, time remaining, total deployed SOL, motherlode size, EV estimate, tile stats
No authentication required — public endpoint
/rounds/liveGet live EV and price data from RoundMonitor (real-time, in-memory state)
/rounds/my-history?limit=50&offset=0Get your personal mining round history with full deployment details: tiles used, amounts, results, winnings. Supports pagination and optional session_id filter.
Authenticated — returns only your rounds
/rounds/tile-stats?limit=100Get hot and cold tile win statistics from the last N rounds. Shows which tiles have won the most/least — useful for hot/cold tile strategies.
No authentication required — public endpoint
/rounds/recent?limit=50Get recent rounds history (default limit: 50)
/refinore-aprCurrent refining APR on unrefined ORE (apr, trailing 7 days from the ORE treasury) and staking APY (stakingApy)
No authentication required — public endpoint
/auto-strategiesList all saved strategies
/auto-strategiesCreate a new strategy
{
"name": "My Strategy",
"solAmount": 0.005,
"numSquares": 25,
"tileSelectionMode": "optimal",
"riskTolerance": "less-risky",
"miningToken": "SOL"
}Supports optional strategyScript and strategyScriptEnabled fields for deterministic per-round custom scripts.
/auto-strategies/validate-scriptValidate a deterministic custom strategy script before saving it. The backend probes external JSON sources, enforces timeouts, and returns exact path-based errors.
{
"strategyScript": {
"version": 1,
"failureMode": "skip_round",
"sources": [
{ "name": "prev", "type": "builtin", "resource": "previous_round" }
],
"rules": [
{
"name": "Mirror 11-19",
"when": {
"op": "and",
"args": [
{ "op": "gte", "args": [{ "op": "var", "path": "sources.prev.winningSquareNumber" }, 11] },
{ "op": "lte", "args": [{ "op": "var", "path": "sources.prev.winningSquareNumber" }, 19] }
]
},
"action": {
"deploy": true,
"numSquares": 1,
"tileSelectionMode": "custom",
"customTiles": [
{ "op": "sub", "args": [{ "op": "mod", "args": [{ "op": "var", "path": "sources.prev.winningSquareNumber" }, 10] }, 1] }
],
"reason": "Play the single-digit mirror"
}
}
],
"else": { "deploy": false, "reason": "No rule matched" }
}
}Built-in sources: current_round, previous_round, recent_rounds, market_prices, tile_stats, session_stats
Expression ops: var, and, or, gt, gte, lt, lte, add, sub, mul, div, mod, lastDigit, toTileIndex, if
Action fields: deploy, solAmount, numSquares, tileSelectionMode, customTiles, skipLastWinningSquare, miningToken, reason, optional swapAction
/auto-strategies/:idUpdate a strategy (full update — all fields required)
/auto-strategies/:id/liveLive-edit a strategy between rounds without stopping/starting the session. Only send the fields you want to change. Changes apply on the next deployment round automatically.
{
"sol_amount": 0.02,
"tile_selection_mode": "hot",
"risk_tolerance": "risky"
}Ideal for AI agents that dynamically adjust strategy mid-session based on motherlode size, EV, or tile data.
/auto-strategies/:idDelete a strategy
/mining/start-strategyStart mining using a saved strategy
{ "strategy_id": "uuid-here" }Direct swaps use your embedded refinORE wallet and support every current token the platform currently supports: SOL, USDC, ORE, current stORE, and SKR. Legacy stORE is excluded from swaps; send or unshield it if needed, then migrate at https://ore.com/stake. Amounts are always specified in display units of the input_token.
/swaps/quoteBuild a live Jupiter-backed quote without executing the trade.
{
"input_token": "stORE",
"output_token": "SOL",
"amount": 2,
"max_slippage_bps": 300
}/swaps/executeQuote and execute a direct token swap immediately using the authenticated user's wallet.
{
"input_token": "stORE",
"output_token": "SOL",
"amount": 2,
"max_slippage_bps": 300
}Successful responses include quoted output, actual output, Jupiter request ID, signature, and a Solscan URL when available.
/auto-swap-ordersList active swap orders
/auto-swap-ordersCreate DCA or limit order
// DCA Example:
{
"name": "Daily DCA",
"order_type": "dca",
"swap_type": "buy",
"trigger_field": "round_number",
"trigger_operator": "mod",
"trigger_value": 1,
"ore_amount": 5
}
// Limit Order Example:
{
"name": "Buy ORE at $60",
"order_type": "limit",
"swap_type": "buy",
"trigger_field": "ore_price_usd",
"trigger_operator": "lt",
"trigger_value": 60.00,
"ore_amount": 1.0
}/auto-swap-orders/:idCancel/delete an active swap order
/auto-swap-orders/history?limit=50Get execution history for completed and partially-filled orders
/tile-presetsList saved tile presets
/tile-presetsSave a tile preset
{ "name": "Diagonal", "tile_ids": [0, 6, 12, 18, 24] }/staking/info?wallet=WALLET_ADDRESSGet current stORE staking info: balance, APR (~22%), rewards earned, lifetime rewards. Legacy stORE must be migrated through https://ore.com/stake.
/sse/mining-logsReal-time stream of mining events. More efficient than polling.
Headers required:
Accept: text/event-stream x-api-key: rsk_your_key_here
Events:
round_start — New round beganround_end — Round completed with resultsdeployment — SOL deployed on tilesclaim — Rewards claimedbalance_update — Wallet balance changedExample: curl -N "$REFINORE_API_URL/sse/mining-logs" -H "x-api-key: $REFINORE_API_KEY" -H "Accept: text/event-stream"
refinORE supports mining with multiple tokens. When you mine with USDC, ORE, stORE, or SKR, the backend automatically:
Perfect for stablecoin holders — mine with USDC and earn ORE without SOL price exposure!
Recommended flow for AI agents to onboard a human user and start mining:
Direct them to automine.refinore.com to create account with email. Wallet is created automatically.
Settings → API Keys → Create. The human gives you the rsk_ key.
Discovers wallet address, email, and deposit instructions.
Uses wallet address to check if the account is funded.
Show them the Solana wallet address + tell them to send SOL or USDC. Minimum: 0.005 SOL gas + mining amount.
Starts mining with the wallet address and desired config. The agent now mines autonomously.
Check session status, round results, and balances periodically.
200Success400Bad Request — check your parameters401Unauthorized — invalid or revoked API key404Not Found — resource doesn't exist409Conflict — e.g., active session already exists429Rate Limited — slow down and retry500Server Error — retry after 30sInstall: clawdhub install ore-miner
llms.txt — LLM-readable platform documentation
.well-known/ai-plugin.json — Plugin manifest
llms.txt — LLM-readable platform documentation
.well-known/ai-plugin.json — Plugin manifest
refinORE API v2.0 — Built for humans and AI agents 🤖