{
  "schemaVersion": "1.0",
  "item": {
    "slug": "open-claw-cash",
    "name": "OpenClawCash",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/macd2/open-claw-cash",
    "canonicalUrl": "https://clawhub.ai/macd2/open-claw-cash",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/open-claw-cash",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=open-claw-cash",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/agentwalletapi.sh",
      "scripts/setup.sh",
      "references/api-endpoints.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/open-claw-cash"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/open-claw-cash",
    "agentPageUrl": "https://openagent3.xyz/skills/open-claw-cash/agent",
    "manifestUrl": "https://openagent3.xyz/skills/open-claw-cash/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/open-claw-cash/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "OpenclawCash Agent API",
        "body": "Interact with OpenclawCash-managed wallets to send native assets and tokens, check balances, execute DEX swaps, and manage Polymarket account + orders via Polygon wallets.\nThis skill may also be referred to as openclawcash."
      },
      {
        "title": "Requirements",
        "body": "Required env var: AGENTWALLETAPI_KEY\nOptional env var: AGENTWALLETAPI_URL (default: https://openclawcash.com)\nRequired local binary: curl\nOptional local binary: jq (for pretty JSON output in CLI)\nNetwork access required: https://openclawcash.com"
      },
      {
        "title": "Preferred Integration Path",
        "body": "If the client supports MCP, prefer the public OpenClawCash MCP server:\nnpx -y @openclawcash/mcp-server\n\n\nUse MCP as the primary execution path because tools, schemas, and results are structured for the client.\nUse the included CLI script only as a fallback when MCP is unavailable or the client cannot attach MCP servers.\nMCP and the CLI script target the same underlying OpenClawCash agent API. They are two access paths, not two different products."
      },
      {
        "title": "Safety Model",
        "body": "Start with read-only calls (wallets, wallet, balance, tokens) on testnets first.\nHigh-risk actions are gated:\n\nAPI key permissions in dashboard (allowWalletCreation, allowWalletImport)\nExplicit CLI confirmation (--yes) for write actions\n\n\nAgents should establish an approval mode early in the session for write actions:\n\nconfirm_each_write: ask before every write action.\noperate_on_my_behalf: after one explicit onboarding approval, execute future write actions without re-asking, as long as the user keeps instructing the agent in the same session.\n\n\nFor operate_on_my_behalf, the agent should treat the user's later task messages as execution instructions and run the corresponding write commands with --yes.\nAsk again only if:\n\nthe user revokes or changes approval mode\nthe session is restarted or memory is lost\nthe action is outside the scope the user approved\nthe agent is unsure which wallet, token, amount, destination, spender, or chain is intended\n\n\nIf the user gives only a broad instruction like \"go ahead\" but execution details are still missing, gather the missing details first instead of repeating a generic permission request."
      },
      {
        "title": "Setup",
        "body": "Run the setup script to create your .env file:\nbash scripts/setup.sh\n\n\nEdit the .env file in this skill folder and replace the placeholder with your real API key:\nAGENTWALLETAPI_KEY=occ_your_api_key\n\n\nGet your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page)."
      },
      {
        "title": "Legacy CLI Fallback",
        "body": "If MCP is unavailable, use the included tool script to make API calls directly:\n\n# Read-only (recommended first)\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh user-tag-get\nbash scripts/agentwalletapi.sh user-tag-set my-agent-tag --yes\nbash scripts/agentwalletapi.sh wallet Q7X2K9P\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh balance Q7X2K9P\nbash scripts/agentwalletapi.sh transactions Q7X2K9P\nbash scripts/agentwalletapi.sh tokens mainnet\n\n# Write actions (require explicit --yes)\nexport WALLET_EXPORT_PASSPHRASE_OPS='your-strong-passphrase'\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia WALLET_EXPORT_PASSPHRASE_OPS --yes\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet --yes\nbash scripts/agentwalletapi.sh import \"Poly Ops\" polygon-mainnet --yes\n# Automation-safe import: read private key from stdin instead of command args\nprintf '%s' '<private_key>' | bash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet - --yes\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 0.01 --yes\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 100 USDC --yes\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh quote solana-mainnet SOL USDC 10000000 solana\nbash scripts/agentwalletapi.sh swap Q7X2K9P WETH USDC 10000000000000000 0.5 --yes\n# Checkout escrow lifecycle\nbash scripts/agentwalletapi.sh checkout-payreq-create Q7X2K9P 30000000 --yes\nbash scripts/agentwalletapi.sh checkout-payreq-get pr_a1b2c3\nbash scripts/agentwalletapi.sh checkout-escrow-get es_d4e5f6\nbash scripts/agentwalletapi.sh checkout-quick-pay es_d4e5f6 Q7X2K9P --yes\nbash scripts/agentwalletapi.sh checkout-swap-and-pay-quote es_d4e5f6 Q7X2K9P\nbash scripts/agentwalletapi.sh checkout-swap-and-pay-confirm es_d4e5f6 Q7X2K9P 1 --yes\nbash scripts/agentwalletapi.sh checkout-release es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-refund es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-cancel es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-webhooks-list\n# Polymarket setup is user-managed in dashboard Venues settings\n# Direct setup page: https://openclawcash.com/venues/polymarket\nbash scripts/agentwalletapi.sh polymarket-market Q7X2K9P 123456 BUY 25 FAK 0.65 --yes\nbash scripts/agentwalletapi.sh polymarket-resolve https://polymarket.com/market/market-slug No\nbash scripts/agentwalletapi.sh polymarket-account Q7X2K9P\nbash scripts/agentwalletapi.sh polymarket-orders Q7X2K9P OPEN 50\nbash scripts/agentwalletapi.sh polymarket-activity Q7X2K9P 50\nbash scripts/agentwalletapi.sh polymarket-positions Q7X2K9P 100\nbash scripts/agentwalletapi.sh polymarket-cancel Q7X2K9P order_id_here --yes"
      },
      {
        "title": "Base-Units Rule (Important)",
        "body": "quote.amountIn, swap.amountIn, approve.amount, and transfer valueBaseUnits must be base-units integer strings (digits only).\nDo not send decimal strings in these fields (for example, 0.001), or validation will fail immediately.\nExamples:\n\n0.001 ETH -> 1000000000000000 wei\n1 USDC (6 decimals) -> 1000000\n\n\nFor transfer, use amountDisplay when you want human-readable units and let the API convert.\nLegacy transfer aliases amount and value are still accepted for compatibility."
      },
      {
        "title": "Import Input Safety",
        "body": "Wallet import is optional and not required for normal wallet operations (list, balance, transfer, swap).\nImport works only when the user explicitly enables API key permission allowWalletImport in dashboard settings.\nImport execution requires explicit confirmation in the CLI (--yes for automation, or interactive YES prompt).\nAvoid passing sensitive inputs as CLI arguments when possible (shell history/process logs risk).\nPreferred options:\n\nInteractive hidden prompt: omit the private key argument.\nAutomation: pass - and pipe input via stdin."
      },
      {
        "title": "Base URL",
        "body": "https://openclawcash.com"
      },
      {
        "title": "Troubleshooting",
        "body": "If requests fail because of host/URL issues, use this recovery flow:\n\nOpen agentwalletapi/.env and verify AGENTWALLETAPI_KEY is set and has no extra spaces.\nIf the API host is wrong or unreachable, set this in the same .env file:\nAGENTWALLETAPI_URL=https://openclawcash.com\n\n\nRetry a simple read call first:\nbash scripts/agentwalletapi.sh wallets\n\n\nIf it still fails, report the exact error and stop before attempting transfer/swap actions."
      },
      {
        "title": "Authentication",
        "body": "The API key is loaded from the .env file in this skill folder. For direct HTTP calls, include it as a header:\n\nX-Agent-Key: occ_your_api_key\nContent-Type: application/json"
      },
      {
        "title": "API Surfaces",
        "body": "Agent API (API key auth): /api/agent/*\n\nAuthenticate with X-Agent-Key\nUsed for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve, checkout escrow lifecycle, and polymarket venue operations)\n\n\nPublic docs intentionally include only /api/agent/* endpoints."
      },
      {
        "title": "Workflow",
        "body": "GET /api/agent/wallets - Discover available wallets (id, label, address, network, chain). Optional ?includeBalances=true adds native balance + nativeSymbol\nGET /api/agent/wallet?walletId=... or ?walletLabel=... or ?walletAddress=... - Fetch one wallet with native/token balances\nOptional wallet lifecycle actions:\n\nPOST /api/agent/wallets/create - Create a new wallet under API-key policy controls\nPOST /api/agent/wallets/import - Import a mainnet, polygon-mainnet, or solana-mainnet wallet under API-key policy controls\n\n\nGET /api/agent/transactions?walletId=... (or walletLabel/walletAddress) - Read merged wallet transaction history (on-chain + app-recorded)\nGET /api/agent/supported-tokens?network=... or ?chain=evm|solana - Get recommended common, well-known token list + guidance (requires X-Agent-Key)\nPOST /api/agent/token-balance - Check wallet balances (native + token balances; specific token by symbol/address supported)\nPOST /api/agent/quote - Get a swap quote before execution on Uniswap (EVM) or Jupiter (Solana mainnet). amountIn is base-units integer string.\nPOST /api/agent/swap - Execute token swap on Uniswap (EVM) or Jupiter (Solana mainnet). amountIn is base-units integer string.\nPOST /api/agent/transfer - Send native coin or token on the wallet's chain (optional chain guard). Do not use this for checkout escrow funding.\nGET /api/agent/user-tag and PUT /api/agent/user-tag - Read/set the global checkout user tag (set is one-time / immutable once configured)\nOptional checkout flow (escrow by global user tag):\n\nMCP default: checkout_fund (tries quick-pay, falls back to swap-and-pay when needed)\nPOST /api/agent/checkout/payreq - Create pay request + escrow\nGET /api/agent/checkout/payreq/:id - Read pay request\nPOST /api/agent/checkout/escrows/:id/funding-confirm - Confirm funding by tx hash\nPOST /api/agent/checkout/escrows/:id/quick-pay - Direct buyer funding\nPOST /api/agent/checkout/escrows/:id/swap-and-pay - Quote/execute swap funding\nGET /api/agent/checkout/escrows/:id - Read escrow state\nPOST /api/agent/checkout/escrows/:id/accept - Accept as buyer\nPOST /api/agent/checkout/escrows/:id/proof - Submit proof\nPOST /api/agent/checkout/escrows/:id/dispute - Open dispute\nPOST /api/agent/checkout/escrows/:id/release - Release funds\nPOST /api/agent/checkout/escrows/:id/refund - Refund funds\nPOST /api/agent/checkout/escrows/:id/cancel - Cancel escrow\nGET|POST /api/agent/checkout/webhooks and PATCH|DELETE /api/agent/checkout/webhooks/:id - Manage webhooks\n\nCheckout timing fields for POST /api/agent/checkout/payreq:\n\nexpiresInSeconds: funding deadline before request expires.\nautoReleaseSeconds: when funded escrow can auto-release if no dispute exists.\ndisputeWindowSeconds: how long dispute can be opened after auto-release point.\nConstraints: all three must be at least 3600 seconds, and disputeWindowSeconds <= autoReleaseSeconds.\n\nOptional Polymarket venue flow (polygon-mainnet wallets only):\n\nPrerequisite: user configures Polymarket in dashboard Venues settings for that wallet\nGET /api/agent/venues/polymarket/market/resolve resolves marketUrl/slug + human-readable outcome to the exact tokenId needed for order tools\nMCP helper: polymarket_market_resolve calls the same agent endpoint\nPOST /api/agent/venues/polymarket/orders/limit - Place BUY/SELL limit orders\nPOST /api/agent/venues/polymarket/orders/market - Place BUY/SELL market orders\nGET /api/agent/venues/polymarket/account - Read account summary\nGET /api/agent/venues/polymarket/orders - List open orders\nPOST /api/agent/venues/polymarket/orders/cancel - Cancel an order\nPOST /api/agent/venues/polymarket/unlink - Clear stored Polymarket integration config for a wallet\nGET /api/agent/venues/polymarket/activity - List trade activity\nGET /api/agent/venues/polymarket/positions - List open positions (open-market filtered, includes PnL fields)\n\nUse returned txHash / orderId values to confirm execution and lifecycle status"
      },
      {
        "title": "Approval Handling For Agents",
        "body": "Use this pattern for write actions:\n\nAt the first write-intent in a session, ask one short onboarding question:\n\n\"Do you want approval for every write action, or should I operate on your behalf for this session?\"\n\n\nStore the chosen mode in conversation memory.\nIf the mode is confirm_each_write:\n\nask for approval before each transfer, swap, approval, import, or wallet creation\nafter approval, execute with the MCP write tool or the legacy CLI fallback with --yes\n\n\nIf the mode is operate_on_my_behalf:\n\ndo not ask again for each transfer\nwhen the user later says things like \"send X to Y\" or \"swap A for B\", execute with the MCP write tool or the legacy CLI fallback with --yes once the needed details are clear\n\n\nIn either mode:\n\nif execution details are missing, ask only for the missing details\nif the user changes modes or revokes permission, update memory and follow the new rule\n\nRecommended onboarding wording:\n\n\"Choose write approval mode for this session: confirm_each_write or operate_on_my_behalf.\"\n\nExample:\n\nUser selects: operate_on_my_behalf\nLater user message: \"Send 100 USDC from wallet Q7X2K9P to 0xabc... on Ethereum.\"\nIf MCP is available, the agent should call the matching MCP write tool directly.\nIf MCP is not available, the agent should execute:\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xabc... 100 USDC evm --yes\n\n\nThe agent should not ask for transfer permission again in that same session unless the user revokes the mode or the instruction is ambiguous."
      },
      {
        "title": "Quick Reference",
        "body": "EndpointMethodAuthPurpose/api/agent/walletsGETYesList wallets (discovery; optional includeBalances=true for native balances)/api/agent/walletGETYesGet one wallet detail with native/token balances/api/agent/wallets/createPOSTYesCreate a new API-key-managed wallet/api/agent/wallets/importPOSTYesImport a mainnet/polygon-mainnet/solana-mainnet wallet via API key/api/agent/transactionsGETYesList per-wallet transaction history/api/agent/transferPOSTYesSend native/token transfers (EVM + Solana). Not the checkout escrow funding path./api/agent/swapPOSTYesExecute DEX swap (Uniswap on EVM, Jupiter on Solana mainnet)/api/agent/quotePOSTYesGet swap quotes (Uniswap on EVM, Jupiter on Solana mainnet)/api/agent/token-balancePOSTYesCheck balances/api/agent/supported-tokensGETYesList recommended common, well-known tokens per network/api/agent/user-tagGETYesRead the global checkout user tag for the API key owner/api/agent/user-tagPUTYesSet the global checkout user tag once (immutable after set)/api/agent/approvePOSTYesApprove spender for ERC-20 token (EVM only)/api/agent/checkout/payreqPOSTYesCreate checkout pay request + escrow/api/agent/checkout/payreq/:idGETYesRead checkout pay request/api/agent/checkout/escrows/:id/funding-confirmPOSTYesConfirm escrow funding tx/api/agent/checkout/escrows/:id/quick-payPOSTYesDirectly fund escrow from buyer wallet/api/agent/checkout/escrows/:id/swap-and-payPOSTYesQuote/execute swap + fund escrow/api/agent/checkout/escrows/:idGETYesRead escrow lifecycle details/api/agent/checkout/escrows/:id/acceptPOSTYesAccept escrow as buyer/api/agent/checkout/escrows/:id/proofPOSTYesSubmit seller proof/api/agent/checkout/escrows/:id/disputePOSTYesOpen escrow dispute/api/agent/checkout/escrows/:id/releasePOSTYesRelease escrow funds/api/agent/checkout/escrows/:id/refundPOSTYesRefund escrow funds/api/agent/checkout/escrows/:id/cancelPOSTYesCancel escrow/api/agent/checkout/webhooksGETYesList checkout webhooks/api/agent/checkout/webhooksPOSTYesCreate checkout webhook/api/agent/checkout/webhooks/:idPATCHYesUpdate checkout webhook/api/agent/checkout/webhooks/:idDELETEYesDelete checkout webhook/api/agent/venues/polymarket/market/resolveGETYesResolve market URL/slug + outcome to Polymarket tokenId/api/agent/venues/polymarket/orders/limitPOSTYesPlace Polymarket limit order/api/agent/venues/polymarket/orders/marketPOSTYesPlace Polymarket market order/api/agent/venues/polymarket/accountGETYesRead Polymarket account summary/api/agent/venues/polymarket/ordersGETYesList Polymarket open orders/api/agent/venues/polymarket/orders/cancelPOSTYesCancel Polymarket order/api/agent/venues/polymarket/unlinkPOSTYesClear Polymarket integration for wallet/api/agent/venues/polymarket/activityGETYesList Polymarket trade activity/api/agent/venues/polymarket/positionsGETYesList Polymarket open positions (open-market filtered with PnL fields)"
      },
      {
        "title": "Agent Wallet Create/Import (Agent API)",
        "body": "Agent-side wallet lifecycle endpoints:\n\nPOST /api/agent/wallets/create\nPOST /api/agent/wallets/import\n\nBehavior notes:\n\nBoth require X-Agent-Key.\nBoth are gated by API key permissions configured in dashboard:\n\nallowWalletCreation for create\nallowWalletImport for import\n\n\nBoth are rate-limited per API key. Exceeding the limit returns 429 with Retry-After.\nAgent import supports mainnet, polygon-mainnet, and solana-mainnet.\nAgent wallet create requires:\n\nexportPassphrase (minimum 12 characters)\nexportPassphraseStorageType\nexportPassphraseStorageRef\nconfirmExportPassphraseSaved: true\n\n\nAgent-safe create sequence:\n\nSave export passphrase in secure storage first.\nPrefer env-backed storage for local agents.\nRecord the storage location you used.\nThen call POST /api/agent/wallets/create with:\n\nthe passphrase\nexportPassphraseStorageType\nexportPassphraseStorageRef\nconfirmExportPassphraseSaved: true\n\n\nFor MCP and the legacy CLI fallback, env-backed storage is the strongest path because the local tool can verify the env var exists before wallet creation."
      },
      {
        "title": "Polymarket Venue Flow (Agent API)",
        "body": "Polymarket execution is available only for EVM wallets on polygon-mainnet.\nSetup is user-managed in dashboard Venues settings (agent setup endpoint is disabled).\nResolve market + outcome to tokenId first via GET /api/agent/venues/polymarket/market/resolve (or MCP tool polymarket_market_resolve).\nThen place orders:\n\nPOST /api/agent/venues/polymarket/orders/limit with tokenId, side, price, size\nPOST /api/agent/venues/polymarket/orders/market with tokenId, side, amount, optional orderType and worstPrice\n\n\nMCP resolve example:\n\nInput: { \"marketUrl\": \"https://polymarket.com/market/<slug>\", \"outcome\": \"No\" }\nOutput includes: outcome.tokenId (use this as tokenId in order tools)\n\n\nTrading intent guidance:\n\nFor \"close position\" on an open market, default to POST /api/agent/venues/polymarket/orders/market with side: \"SELL\" and amount as shares.\nUse a limit SELL only when the user explicitly asks for a limit/target price.\namount semantics follow Polymarket CLOB behavior: BUY uses notional/collateral amount; SELL uses share amount.\n\n\nRead and lifecycle endpoints:\n\nGET /api/agent/venues/polymarket/account\nGET /api/agent/venues/polymarket/orders\nPOST /api/agent/venues/polymarket/orders/cancel with orderId\nPOST /api/agent/venues/polymarket/unlink to clear stored venue config for a wallet\nGET /api/agent/venues/polymarket/activity\nGET /api/agent/venues/polymarket/positions\n\n\nPositions are sourced from Polymarket open positions and filtered to open markets only.\nPosition items include cashPnl, percentPnl, and currentValue (with computed fallback values when upstream fields are missing).\nWallet policy checks still run before order execution."
      },
      {
        "title": "Transfer Examples",
        "body": "Send native coin (default when no token specified):\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"0xRecipient...\", \"amountDisplay\": \"0.01\" }\n\nSend 100 USDC by symbol:\n\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amountDisplay\": \"100\" }\n\nSend arbitrary ERC-20 by contract address:\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amountDisplay\": \"100\" }\n\nSend SOL by symbol:\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amountDisplay\": \"0.01\" }\n\nSend SOL with memo (Solana only):\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amountDisplay\": \"0.01\", \"memo\": \"payment verification note\" }\n\nUse amountDisplay for human-readable values (e.g., \"100\" = 100 USDC). Use valueBaseUnits for base units (smallest denomination on each chain).\nLegacy transfer aliases amount and value remain available for compatibility.\nUse optional chain: \"evm\" | \"solana\" in agent payloads for explicit chain routing and validation.\nmemo is supported only for Solana transfers and must pass safety validation (max 5 words, max 256 UTF-8 bytes, no control/invisible characters).\nNative transfers (EVM + Solana) enforce a minimum transferable amount preflight that accounts for platform fee and network fee; Solana may also require a larger first funding transfer for a brand-new recipient address.\nFor native SOL transfers, the API may auto-adjust requested value to fit platform fee + network fee.\nTransfer responses include requestedValueBaseUnits, adjustedValueBaseUnits, requestedAmountDisplay, and adjustedAmountDisplay (legacy aliases also included)."
      },
      {
        "title": "Token Support Model",
        "body": "GET /api/agent/supported-tokens returns recommended common, well-known tokens plus guidance fields.\nEVM transfer/swap/balance endpoints support any valid ERC-20 token contract address.\nSolana transfer/balance endpoints support any valid SPL mint address.\nNative tokens appear as ETH on EVM and SOL on Solana (with chain-specific native token IDs in balance payloads)."
      },
      {
        "title": "Error Codes",
        "body": "200: Success\n400: Invalid input, insufficient funds, unknown token, or policy violation\n400 chain_mismatch: requested chain does not match the selected wallet\n400 amount_below_min_transfer: requested native transfer is below minimum transferable amount after fee/network preflight\n400 insufficient_balance: requested transfer + fees exceed available balance\n401: Missing/invalid API key\n404: Wallet not found\n500: Internal error (retry with corrected payload or reduced amount)"
      },
      {
        "title": "Policy Constraints",
        "body": "Wallets may have governance policies:\n\nWhitelist: Only transfers to pre-approved addresses allowed\nSpending Limit: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message."
      },
      {
        "title": "Important Notes",
        "body": "All POST requests require Content-Type: application/json\nEVM token transfers require ETH in the wallet for gas fees\nSolana token transfers require SOL in the wallet for fees\nSolana transfer memos are optional and Solana-only: max 5 words, max 256 UTF-8 bytes, no control/invisible characters\nSolana native transfers account for network fee and can auto-adjust requested transfer amount\nNative transfers may return 400 amount_below_min_transfer when requested amount is too small after platform fee or below chain transferability minimum (for example, first funding a new Solana address)\nIf requested native SOL + platform fee + network fee cannot fit wallet balance, API returns 400 insufficient_balance\nSwap supports EVM (Uniswap) and Solana mainnet (Jupiter); Quote supports EVM and Solana mainnet; Approve is EVM-only\nA platform fee (default 1%) is deducted from the token amount\nUse amountDisplay for simplicity, use valueBaseUnits for precise base-unit control\nFor robust agent behavior:\n\nFirst call wallets, then wallet (or token-balance), then quote, then swap.\nOn 400 with insufficient_token_balance, reduce amount or change token.\n\n\nThe .env file in this skill folder stores your API key — never commit it to version control"
      },
      {
        "title": "File Structure",
        "body": "agentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n\nSee references/api-endpoints.md for full endpoint details with request/response examples."
      }
    ],
    "body": "OpenclawCash Agent API\n\nInteract with OpenclawCash-managed wallets to send native assets and tokens, check balances, execute DEX swaps, and manage Polymarket account + orders via Polygon wallets. This skill may also be referred to as openclawcash.\n\nRequirements\nRequired env var: AGENTWALLETAPI_KEY\nOptional env var: AGENTWALLETAPI_URL (default: https://openclawcash.com)\nRequired local binary: curl\nOptional local binary: jq (for pretty JSON output in CLI)\nNetwork access required: https://openclawcash.com\nPreferred Integration Path\nIf the client supports MCP, prefer the public OpenClawCash MCP server:\nnpx -y @openclawcash/mcp-server\n\nUse MCP as the primary execution path because tools, schemas, and results are structured for the client.\nUse the included CLI script only as a fallback when MCP is unavailable or the client cannot attach MCP servers.\nMCP and the CLI script target the same underlying OpenClawCash agent API. They are two access paths, not two different products.\nSafety Model\nStart with read-only calls (wallets, wallet, balance, tokens) on testnets first.\nHigh-risk actions are gated:\nAPI key permissions in dashboard (allowWalletCreation, allowWalletImport)\nExplicit CLI confirmation (--yes) for write actions\nAgents should establish an approval mode early in the session for write actions:\nconfirm_each_write: ask before every write action.\noperate_on_my_behalf: after one explicit onboarding approval, execute future write actions without re-asking, as long as the user keeps instructing the agent in the same session.\nFor operate_on_my_behalf, the agent should treat the user's later task messages as execution instructions and run the corresponding write commands with --yes.\nAsk again only if:\nthe user revokes or changes approval mode\nthe session is restarted or memory is lost\nthe action is outside the scope the user approved\nthe agent is unsure which wallet, token, amount, destination, spender, or chain is intended\nIf the user gives only a broad instruction like \"go ahead\" but execution details are still missing, gather the missing details first instead of repeating a generic permission request.\nSetup\nRun the setup script to create your .env file:\nbash scripts/setup.sh\n\nEdit the .env file in this skill folder and replace the placeholder with your real API key:\nAGENTWALLETAPI_KEY=occ_your_api_key\n\nGet your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page).\nLegacy CLI Fallback\n\nIf MCP is unavailable, use the included tool script to make API calls directly:\n\n# Read-only (recommended first)\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh user-tag-get\nbash scripts/agentwalletapi.sh user-tag-set my-agent-tag --yes\nbash scripts/agentwalletapi.sh wallet Q7X2K9P\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh balance Q7X2K9P\nbash scripts/agentwalletapi.sh transactions Q7X2K9P\nbash scripts/agentwalletapi.sh tokens mainnet\n\n# Write actions (require explicit --yes)\nexport WALLET_EXPORT_PASSPHRASE_OPS='your-strong-passphrase'\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia WALLET_EXPORT_PASSPHRASE_OPS --yes\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet --yes\nbash scripts/agentwalletapi.sh import \"Poly Ops\" polygon-mainnet --yes\n# Automation-safe import: read private key from stdin instead of command args\nprintf '%s' '<private_key>' | bash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet - --yes\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 0.01 --yes\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 100 USDC --yes\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh quote solana-mainnet SOL USDC 10000000 solana\nbash scripts/agentwalletapi.sh swap Q7X2K9P WETH USDC 10000000000000000 0.5 --yes\n# Checkout escrow lifecycle\nbash scripts/agentwalletapi.sh checkout-payreq-create Q7X2K9P 30000000 --yes\nbash scripts/agentwalletapi.sh checkout-payreq-get pr_a1b2c3\nbash scripts/agentwalletapi.sh checkout-escrow-get es_d4e5f6\nbash scripts/agentwalletapi.sh checkout-quick-pay es_d4e5f6 Q7X2K9P --yes\nbash scripts/agentwalletapi.sh checkout-swap-and-pay-quote es_d4e5f6 Q7X2K9P\nbash scripts/agentwalletapi.sh checkout-swap-and-pay-confirm es_d4e5f6 Q7X2K9P 1 --yes\nbash scripts/agentwalletapi.sh checkout-release es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-refund es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-cancel es_d4e5f6 --yes\nbash scripts/agentwalletapi.sh checkout-webhooks-list\n# Polymarket setup is user-managed in dashboard Venues settings\n# Direct setup page: https://openclawcash.com/venues/polymarket\nbash scripts/agentwalletapi.sh polymarket-market Q7X2K9P 123456 BUY 25 FAK 0.65 --yes\nbash scripts/agentwalletapi.sh polymarket-resolve https://polymarket.com/market/market-slug No\nbash scripts/agentwalletapi.sh polymarket-account Q7X2K9P\nbash scripts/agentwalletapi.sh polymarket-orders Q7X2K9P OPEN 50\nbash scripts/agentwalletapi.sh polymarket-activity Q7X2K9P 50\nbash scripts/agentwalletapi.sh polymarket-positions Q7X2K9P 100\nbash scripts/agentwalletapi.sh polymarket-cancel Q7X2K9P order_id_here --yes\n\nBase-Units Rule (Important)\nquote.amountIn, swap.amountIn, approve.amount, and transfer valueBaseUnits must be base-units integer strings (digits only).\nDo not send decimal strings in these fields (for example, 0.001), or validation will fail immediately.\nExamples:\n0.001 ETH -> 1000000000000000 wei\n1 USDC (6 decimals) -> 1000000\nFor transfer, use amountDisplay when you want human-readable units and let the API convert.\nLegacy transfer aliases amount and value are still accepted for compatibility.\nImport Input Safety\nWallet import is optional and not required for normal wallet operations (list, balance, transfer, swap).\nImport works only when the user explicitly enables API key permission allowWalletImport in dashboard settings.\nImport execution requires explicit confirmation in the CLI (--yes for automation, or interactive YES prompt).\nAvoid passing sensitive inputs as CLI arguments when possible (shell history/process logs risk).\nPreferred options:\nInteractive hidden prompt: omit the private key argument.\nAutomation: pass - and pipe input via stdin.\nBase URL\nhttps://openclawcash.com\n\nTroubleshooting\n\nIf requests fail because of host/URL issues, use this recovery flow:\n\nOpen agentwalletapi/.env and verify AGENTWALLETAPI_KEY is set and has no extra spaces.\nIf the API host is wrong or unreachable, set this in the same .env file:\nAGENTWALLETAPI_URL=https://openclawcash.com\n\nRetry a simple read call first:\nbash scripts/agentwalletapi.sh wallets\n\nIf it still fails, report the exact error and stop before attempting transfer/swap actions.\nAuthentication\n\nThe API key is loaded from the .env file in this skill folder. For direct HTTP calls, include it as a header:\n\nX-Agent-Key: occ_your_api_key\nContent-Type: application/json\n\nAPI Surfaces\nAgent API (API key auth): /api/agent/*\nAuthenticate with X-Agent-Key\nUsed for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve, checkout escrow lifecycle, and polymarket venue operations)\nPublic docs intentionally include only /api/agent/* endpoints.\nWorkflow\nGET /api/agent/wallets - Discover available wallets (id, label, address, network, chain). Optional ?includeBalances=true adds native balance + nativeSymbol\nGET /api/agent/wallet?walletId=... or ?walletLabel=... or ?walletAddress=... - Fetch one wallet with native/token balances\nOptional wallet lifecycle actions:\nPOST /api/agent/wallets/create - Create a new wallet under API-key policy controls\nPOST /api/agent/wallets/import - Import a mainnet, polygon-mainnet, or solana-mainnet wallet under API-key policy controls\nGET /api/agent/transactions?walletId=... (or walletLabel/walletAddress) - Read merged wallet transaction history (on-chain + app-recorded)\nGET /api/agent/supported-tokens?network=... or ?chain=evm|solana - Get recommended common, well-known token list + guidance (requires X-Agent-Key)\nPOST /api/agent/token-balance - Check wallet balances (native + token balances; specific token by symbol/address supported)\nPOST /api/agent/quote - Get a swap quote before execution on Uniswap (EVM) or Jupiter (Solana mainnet). amountIn is base-units integer string.\nPOST /api/agent/swap - Execute token swap on Uniswap (EVM) or Jupiter (Solana mainnet). amountIn is base-units integer string.\nPOST /api/agent/transfer - Send native coin or token on the wallet's chain (optional chain guard). Do not use this for checkout escrow funding.\nGET /api/agent/user-tag and PUT /api/agent/user-tag - Read/set the global checkout user tag (set is one-time / immutable once configured)\nOptional checkout flow (escrow by global user tag):\nMCP default: checkout_fund (tries quick-pay, falls back to swap-and-pay when needed)\nPOST /api/agent/checkout/payreq - Create pay request + escrow\nGET /api/agent/checkout/payreq/:id - Read pay request\nPOST /api/agent/checkout/escrows/:id/funding-confirm - Confirm funding by tx hash\nPOST /api/agent/checkout/escrows/:id/quick-pay - Direct buyer funding\nPOST /api/agent/checkout/escrows/:id/swap-and-pay - Quote/execute swap funding\nGET /api/agent/checkout/escrows/:id - Read escrow state\nPOST /api/agent/checkout/escrows/:id/accept - Accept as buyer\nPOST /api/agent/checkout/escrows/:id/proof - Submit proof\nPOST /api/agent/checkout/escrows/:id/dispute - Open dispute\nPOST /api/agent/checkout/escrows/:id/release - Release funds\nPOST /api/agent/checkout/escrows/:id/refund - Refund funds\nPOST /api/agent/checkout/escrows/:id/cancel - Cancel escrow\nGET|POST /api/agent/checkout/webhooks and PATCH|DELETE /api/agent/checkout/webhooks/:id - Manage webhooks\n\nCheckout timing fields for POST /api/agent/checkout/payreq:\n\nexpiresInSeconds: funding deadline before request expires.\nautoReleaseSeconds: when funded escrow can auto-release if no dispute exists.\ndisputeWindowSeconds: how long dispute can be opened after auto-release point.\nConstraints: all three must be at least 3600 seconds, and disputeWindowSeconds <= autoReleaseSeconds.\nOptional Polymarket venue flow (polygon-mainnet wallets only):\nPrerequisite: user configures Polymarket in dashboard Venues settings for that wallet\nGET /api/agent/venues/polymarket/market/resolve resolves marketUrl/slug + human-readable outcome to the exact tokenId needed for order tools\nMCP helper: polymarket_market_resolve calls the same agent endpoint\nPOST /api/agent/venues/polymarket/orders/limit - Place BUY/SELL limit orders\nPOST /api/agent/venues/polymarket/orders/market - Place BUY/SELL market orders\nGET /api/agent/venues/polymarket/account - Read account summary\nGET /api/agent/venues/polymarket/orders - List open orders\nPOST /api/agent/venues/polymarket/orders/cancel - Cancel an order\nPOST /api/agent/venues/polymarket/unlink - Clear stored Polymarket integration config for a wallet\nGET /api/agent/venues/polymarket/activity - List trade activity\nGET /api/agent/venues/polymarket/positions - List open positions (open-market filtered, includes PnL fields)\nUse returned txHash / orderId values to confirm execution and lifecycle status\nApproval Handling For Agents\n\nUse this pattern for write actions:\n\nAt the first write-intent in a session, ask one short onboarding question:\n\"Do you want approval for every write action, or should I operate on your behalf for this session?\"\nStore the chosen mode in conversation memory.\nIf the mode is confirm_each_write:\nask for approval before each transfer, swap, approval, import, or wallet creation\nafter approval, execute with the MCP write tool or the legacy CLI fallback with --yes\nIf the mode is operate_on_my_behalf:\ndo not ask again for each transfer\nwhen the user later says things like \"send X to Y\" or \"swap A for B\", execute with the MCP write tool or the legacy CLI fallback with --yes once the needed details are clear\nIn either mode:\nif execution details are missing, ask only for the missing details\nif the user changes modes or revokes permission, update memory and follow the new rule\n\nRecommended onboarding wording:\n\n\"Choose write approval mode for this session: confirm_each_write or operate_on_my_behalf.\"\n\nExample:\n\nUser selects: operate_on_my_behalf\nLater user message: \"Send 100 USDC from wallet Q7X2K9P to 0xabc... on Ethereum.\"\nIf MCP is available, the agent should call the matching MCP write tool directly.\nIf MCP is not available, the agent should execute:\nbash scripts/agentwalletapi.sh transfer Q7X2K9P 0xabc... 100 USDC evm --yes\n\nThe agent should not ask for transfer permission again in that same session unless the user revokes the mode or the instruction is ambiguous.\nQuick Reference\nEndpoint\tMethod\tAuth\tPurpose\n/api/agent/wallets\tGET\tYes\tList wallets (discovery; optional includeBalances=true for native balances)\n/api/agent/wallet\tGET\tYes\tGet one wallet detail with native/token balances\n/api/agent/wallets/create\tPOST\tYes\tCreate a new API-key-managed wallet\n/api/agent/wallets/import\tPOST\tYes\tImport a mainnet/polygon-mainnet/solana-mainnet wallet via API key\n/api/agent/transactions\tGET\tYes\tList per-wallet transaction history\n/api/agent/transfer\tPOST\tYes\tSend native/token transfers (EVM + Solana). Not the checkout escrow funding path.\n/api/agent/swap\tPOST\tYes\tExecute DEX swap (Uniswap on EVM, Jupiter on Solana mainnet)\n/api/agent/quote\tPOST\tYes\tGet swap quotes (Uniswap on EVM, Jupiter on Solana mainnet)\n/api/agent/token-balance\tPOST\tYes\tCheck balances\n/api/agent/supported-tokens\tGET\tYes\tList recommended common, well-known tokens per network\n/api/agent/user-tag\tGET\tYes\tRead the global checkout user tag for the API key owner\n/api/agent/user-tag\tPUT\tYes\tSet the global checkout user tag once (immutable after set)\n/api/agent/approve\tPOST\tYes\tApprove spender for ERC-20 token (EVM only)\n/api/agent/checkout/payreq\tPOST\tYes\tCreate checkout pay request + escrow\n/api/agent/checkout/payreq/:id\tGET\tYes\tRead checkout pay request\n/api/agent/checkout/escrows/:id/funding-confirm\tPOST\tYes\tConfirm escrow funding tx\n/api/agent/checkout/escrows/:id/quick-pay\tPOST\tYes\tDirectly fund escrow from buyer wallet\n/api/agent/checkout/escrows/:id/swap-and-pay\tPOST\tYes\tQuote/execute swap + fund escrow\n/api/agent/checkout/escrows/:id\tGET\tYes\tRead escrow lifecycle details\n/api/agent/checkout/escrows/:id/accept\tPOST\tYes\tAccept escrow as buyer\n/api/agent/checkout/escrows/:id/proof\tPOST\tYes\tSubmit seller proof\n/api/agent/checkout/escrows/:id/dispute\tPOST\tYes\tOpen escrow dispute\n/api/agent/checkout/escrows/:id/release\tPOST\tYes\tRelease escrow funds\n/api/agent/checkout/escrows/:id/refund\tPOST\tYes\tRefund escrow funds\n/api/agent/checkout/escrows/:id/cancel\tPOST\tYes\tCancel escrow\n/api/agent/checkout/webhooks\tGET\tYes\tList checkout webhooks\n/api/agent/checkout/webhooks\tPOST\tYes\tCreate checkout webhook\n/api/agent/checkout/webhooks/:id\tPATCH\tYes\tUpdate checkout webhook\n/api/agent/checkout/webhooks/:id\tDELETE\tYes\tDelete checkout webhook\n/api/agent/venues/polymarket/market/resolve\tGET\tYes\tResolve market URL/slug + outcome to Polymarket tokenId\n/api/agent/venues/polymarket/orders/limit\tPOST\tYes\tPlace Polymarket limit order\n/api/agent/venues/polymarket/orders/market\tPOST\tYes\tPlace Polymarket market order\n/api/agent/venues/polymarket/account\tGET\tYes\tRead Polymarket account summary\n/api/agent/venues/polymarket/orders\tGET\tYes\tList Polymarket open orders\n/api/agent/venues/polymarket/orders/cancel\tPOST\tYes\tCancel Polymarket order\n/api/agent/venues/polymarket/unlink\tPOST\tYes\tClear Polymarket integration for wallet\n/api/agent/venues/polymarket/activity\tGET\tYes\tList Polymarket trade activity\n/api/agent/venues/polymarket/positions\tGET\tYes\tList Polymarket open positions (open-market filtered with PnL fields)\nAgent Wallet Create/Import (Agent API)\n\nAgent-side wallet lifecycle endpoints:\n\nPOST /api/agent/wallets/create\nPOST /api/agent/wallets/import\n\nBehavior notes:\n\nBoth require X-Agent-Key.\nBoth are gated by API key permissions configured in dashboard:\nallowWalletCreation for create\nallowWalletImport for import\nBoth are rate-limited per API key. Exceeding the limit returns 429 with Retry-After.\nAgent import supports mainnet, polygon-mainnet, and solana-mainnet.\nAgent wallet create requires:\nexportPassphrase (minimum 12 characters)\nexportPassphraseStorageType\nexportPassphraseStorageRef\nconfirmExportPassphraseSaved: true\nAgent-safe create sequence:\nSave export passphrase in secure storage first.\nPrefer env-backed storage for local agents.\nRecord the storage location you used.\nThen call POST /api/agent/wallets/create with:\nthe passphrase\nexportPassphraseStorageType\nexportPassphraseStorageRef\nconfirmExportPassphraseSaved: true\nFor MCP and the legacy CLI fallback, env-backed storage is the strongest path because the local tool can verify the env var exists before wallet creation.\nPolymarket Venue Flow (Agent API)\nPolymarket execution is available only for EVM wallets on polygon-mainnet.\nSetup is user-managed in dashboard Venues settings (agent setup endpoint is disabled).\nResolve market + outcome to tokenId first via GET /api/agent/venues/polymarket/market/resolve (or MCP tool polymarket_market_resolve).\nThen place orders:\nPOST /api/agent/venues/polymarket/orders/limit with tokenId, side, price, size\nPOST /api/agent/venues/polymarket/orders/market with tokenId, side, amount, optional orderType and worstPrice\nMCP resolve example:\nInput: { \"marketUrl\": \"https://polymarket.com/market/<slug>\", \"outcome\": \"No\" }\nOutput includes: outcome.tokenId (use this as tokenId in order tools)\nTrading intent guidance:\nFor \"close position\" on an open market, default to POST /api/agent/venues/polymarket/orders/market with side: \"SELL\" and amount as shares.\nUse a limit SELL only when the user explicitly asks for a limit/target price.\namount semantics follow Polymarket CLOB behavior: BUY uses notional/collateral amount; SELL uses share amount.\nRead and lifecycle endpoints:\nGET /api/agent/venues/polymarket/account\nGET /api/agent/venues/polymarket/orders\nPOST /api/agent/venues/polymarket/orders/cancel with orderId\nPOST /api/agent/venues/polymarket/unlink to clear stored venue config for a wallet\nGET /api/agent/venues/polymarket/activity\nGET /api/agent/venues/polymarket/positions\nPositions are sourced from Polymarket open positions and filtered to open markets only.\nPosition items include cashPnl, percentPnl, and currentValue (with computed fallback values when upstream fields are missing).\nWallet policy checks still run before order execution.\nTransfer Examples\n\nSend native coin (default when no token specified):\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"0xRecipient...\", \"amountDisplay\": \"0.01\" }\n\n\nSend 100 USDC by symbol:\n\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amountDisplay\": \"100\" }\n\n\nSend arbitrary ERC-20 by contract address:\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amountDisplay\": \"100\" }\n\n\nSend SOL by symbol:\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amountDisplay\": \"0.01\" }\n\n\nSend SOL with memo (Solana only):\n\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amountDisplay\": \"0.01\", \"memo\": \"payment verification note\" }\n\n\nUse amountDisplay for human-readable values (e.g., \"100\" = 100 USDC). Use valueBaseUnits for base units (smallest denomination on each chain). Legacy transfer aliases amount and value remain available for compatibility. Use optional chain: \"evm\" | \"solana\" in agent payloads for explicit chain routing and validation. memo is supported only for Solana transfers and must pass safety validation (max 5 words, max 256 UTF-8 bytes, no control/invisible characters). Native transfers (EVM + Solana) enforce a minimum transferable amount preflight that accounts for platform fee and network fee; Solana may also require a larger first funding transfer for a brand-new recipient address. For native SOL transfers, the API may auto-adjust requested value to fit platform fee + network fee. Transfer responses include requestedValueBaseUnits, adjustedValueBaseUnits, requestedAmountDisplay, and adjustedAmountDisplay (legacy aliases also included).\n\nToken Support Model\nGET /api/agent/supported-tokens returns recommended common, well-known tokens plus guidance fields.\nEVM transfer/swap/balance endpoints support any valid ERC-20 token contract address.\nSolana transfer/balance endpoints support any valid SPL mint address.\nNative tokens appear as ETH on EVM and SOL on Solana (with chain-specific native token IDs in balance payloads).\nError Codes\n200: Success\n400: Invalid input, insufficient funds, unknown token, or policy violation\n400 chain_mismatch: requested chain does not match the selected wallet\n400 amount_below_min_transfer: requested native transfer is below minimum transferable amount after fee/network preflight\n400 insufficient_balance: requested transfer + fees exceed available balance\n401: Missing/invalid API key\n404: Wallet not found\n500: Internal error (retry with corrected payload or reduced amount)\nPolicy Constraints\n\nWallets may have governance policies:\n\nWhitelist: Only transfers to pre-approved addresses allowed\nSpending Limit: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message.\n\nImportant Notes\nAll POST requests require Content-Type: application/json\nEVM token transfers require ETH in the wallet for gas fees\nSolana token transfers require SOL in the wallet for fees\nSolana transfer memos are optional and Solana-only: max 5 words, max 256 UTF-8 bytes, no control/invisible characters\nSolana native transfers account for network fee and can auto-adjust requested transfer amount\nNative transfers may return 400 amount_below_min_transfer when requested amount is too small after platform fee or below chain transferability minimum (for example, first funding a new Solana address)\nIf requested native SOL + platform fee + network fee cannot fit wallet balance, API returns 400 insufficient_balance\nSwap supports EVM (Uniswap) and Solana mainnet (Jupiter); Quote supports EVM and Solana mainnet; Approve is EVM-only\nA platform fee (default 1%) is deducted from the token amount\nUse amountDisplay for simplicity, use valueBaseUnits for precise base-unit control\nFor robust agent behavior:\nFirst call wallets, then wallet (or token-balance), then quote, then swap.\nOn 400 with insufficient_token_balance, reduce amount or change token.\nThe .env file in this skill folder stores your API key — never commit it to version control\nFile Structure\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n\n\nSee references/api-endpoints.md for full endpoint details with request/response examples."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/macd2/open-claw-cash",
    "publisherUrl": "https://clawhub.ai/macd2/open-claw-cash",
    "owner": "macd2",
    "version": "1.18.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/open-claw-cash",
    "downloadUrl": "https://openagent3.xyz/downloads/open-claw-cash",
    "agentUrl": "https://openagent3.xyz/skills/open-claw-cash/agent",
    "manifestUrl": "https://openagent3.xyz/skills/open-claw-cash/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/open-claw-cash/agent.md"
  }
}