Polexbot24Agent gateway
Menu
HomeBlogPoliticsAgentsNewSettingsOpen Dashboard →
Official MCP · Sandbox · OpenAPI

Native agent tools.Safe by default.

Connect MCP-compatible agents to Polexbot24 through a dedicated stdio server. Start with a no-wallet sandbox or live read-only access. Choose supervised approval controls or explicit autonomous mode, where the agent connects a dedicated wallet with its private key and starts the engine itself.

Keep credentials and trading authority deliberate. Use a dedicated limited-funds wallet. Supervised controls need an approval token; autonomous mode instead trusts the agent with the wallet key and requires no second approval. Stopping the bot does not sell existing positions.
01

Install the official MCP package

One versioned package contains the server, sandbox, and four reference agents.

Read-only by defaultAccount, balance, positions, readiness, configuration previews, state, trades, and logs.
Supervised or autonomousUse owner approval tokens, or let a trusted agent connect and start with the wallet key itself.
Automatic wallet discoveryAutonomous connect_wallet derives the deployed Polymarket developer address when it is omitted.
Managed strategies onlyThe engine evaluates entries. There is no arbitrary order-placement or market-making tool.
npm install -g https://www.polexbot24.com/downloads/polexbot24-agent-integration-1.1.0.tgz

Register polexbot24-mcp as a stdio MCP server in your MCP-compatible client. Use the client's environment-secret support rather than putting tokens in command arguments.

02

Test the complete loop without a wallet

The in-memory sandbox makes no network requests and cannot place real orders.

POLEXBOT24_SANDBOX=true polexbot24-mcp

The sandbox starts with 100 simulated pUSD, no positions, and no trade history. It supports balance, readiness, configuration preview and validation, simulated wallet login, configuration and start, state/logs, and stop.

Safe evaluation: agents can exercise the exact MCP tools and supervised or autonomous flows without credentials, deposits, RPC calls, or Polymarket activity. Sandbox responses include sandbox:true.
03

Connect live read-only access

A human establishes the account first; the agent receives only its bearer token.

Connect through Settings or the documented /api/wallet/connect exchange, then store the returned account token in your MCP client's secret environment. Connecting alone never starts trading.

{
  "mcpServers": {
    "polexbot24": {
      "command": "polexbot24-mcp",
      "env": {
        "POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
        "POLEXBOT24_TOKEN": "existing-account-bearer-token"
      }
    }
  }
}
ToolPurpose
get_accountSafe account, current configuration, recent trades, and statistics.
get_balancepUSD, USDC.e, positions value, bankroll, warnings, and restrictions.
get_bot_state · get_positionsRequested and actual engine state, freshness, and open positions.
get_trades · get_logsPersisted results, engine events, skips, and errors.
check_readinessWallet deployment, pairing, collateral, and readiness without a transaction.
preview_configValidated proposed configuration, exact diff, warnings, and previewHash; never saves.
get_public_pricesPublic crypto prices without account credentials.
04

Choose supervised or fully autonomous trading

Both modes validate configuration and wallet readiness before starting the existing engine.

Autonomous: agent connects the wallet and starts by itself

Enable POLEXBOT24_AUTONOMOUS=true. No initial bearer token or approval token is needed.

{
  "mcpServers": {
    "polexbot24": {
      "command": "polexbot24-mcp",
      "env": {
        "POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
        "POLEXBOT24_AUTONOMOUS": "true"
      }
    }
  }
}
  1. Call connect_wallet with privateKey. The optional developerAddress is derived automatically when omitted.
  2. The tool caches only the returned bearer token in memory; neither the private key nor token appears in its result.
  3. Call preview_config, then apply_config with the unchanged hash. No separate approval token is required.
  4. Make an empty-patch preview and call start_bot with its fresh hash. Start still requires a successful readiness check.
  5. Monitor state, positions, trades, and logs. Use stop_bot at any time.
The private key is the autonomous authorization. The engine retains it server-side for order signing. Use only a dedicated limited-funds wallet, and protect MCP client logs because clients may retain tool arguments. Never enable autonomous mode for an untrusted agent.

Supervised: bearer token plus owner approval

{
  "mcpServers": {
    "polexbot24": {
      "command": "polexbot24-mcp",
      "env": {
        "POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
        "POLEXBOT24_TOKEN": "existing-account-bearer-token",
        "POLEXBOT24_ENABLE_CONTROLS": "true",
        "POLEXBOT24_APPROVAL_TOKEN": "owner-created-approval-secret"
      }
    }
  }
}
  1. Call preview_config and show the owner the exact diff.
  2. Pass its previewHash and the owner-provided approval token to apply_config.
  3. For start_bot, make an empty-patch preview, then pass its hash and approval token after a fresh readiness check.
  4. Use stop_bot to disable new activity. No approval token is required for stop.
Stale previews fail closed. If configuration changes after review, its hash no longer matches and apply/start is rejected. The validator also rejects unknown fields, invalid ranges, inconsistent bands, unaffordable entries, and maxPerTrade < initialBuy.
05

Run the reference agents

Unpack the same versioned package to inspect and run working examples.

mkdir polexbot24-agent && cd polexbot24-agent
curl -fsSLO https://www.polexbot24.com/downloads/polexbot24-agent-integration-1.1.0.tgz
tar -xzf polexbot24-agent-integration-1.1.0.tgz
cd package
npm install

# Read-only account monitor
node examples/read-only-monitor.mjs --sandbox

# Read-only configuration preview
node examples/supervised-agent.mjs --sandbox

# Full simulated preview → approval → start → logs → stop
node examples/supervised-agent.mjs --sandbox --approve

# Autonomous key login → configure → start → logs → stop
node examples/autonomous-agent.mjs --sandbox

# State-change alerts; optionally set ALERT_WEBHOOK_URL
node examples/alert-agent.mjs --sandbox

The supervised and autonomous examples stop immediately after their demonstrations unless --keep-running is supplied. For a live autonomous run, set POLEXBOT24_PRIVATE_KEY in the environment and add --execute. The alert agent supports ALERT_WEBHOOK_URL, ALERT_INTERVAL_MS, and ALERT_ITERATIONS.

06

Machine discovery and documentation

Give agents structured contracts instead of asking them to scrape HTML.

ResourceAddress
OpenAPI 3.1polexbot24.com/openapi.json
LLM discoverypolexbot24.com/llms.txt
Markdown integration guidepolexbot24.com/agents.md
REST and authentication guidepolexbot24.com/agents
OAuth resource metadata/.well-known/oauth-protected-resource
Versioned integration packageDownload tarball
API behavior: always inspect ok; many failures use HTTP 200 with ok:false. Readiness can be ok:true with ready:false. botActive is only the requested flag — confirm freshness and fills through state, trades, and logs.
Copied