{
  "manifest_version": "1.0.0",
  "template": {
    "id": "bd9dbb36-10ef-4834-b67f-342c9ddab315",
    "slug": "polymarket-bot",
    "name": "Polymarket Bot [Updated Sep '26]",
    "description": "Polymarket Copy-Trading Bot — Self-Hosted | Buy & Sell with Auto Cashout",
    "url": "https://railway.com/deploy/polymarket-bot",
    "upstream": {
      "repo_url": "https://github.com/shruti060701/polymarket-bot-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "polymarket-bot",
      "source": {
        "repo": "https://github.com/shruti060701/polymarket-bot-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DEBUG",
      "service": "polymarket-bot",
      "description": "Verbose logs.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DRY_RUN",
      "service": "polymarket-bot",
      "description": "Simulate orders without sending them. Confirm your config works before setting to false.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "COPY_SIDE",
      "service": "polymarket-bot",
      "description": "BUY | SELL | BOTH.",
      "secret": false,
      "strategy": "default",
      "default": "BOTH"
    },
    {
      "key": "COPY_RATIO",
      "service": "polymarket-bot",
      "description": "Percent multiplier for percent strategies (0.1 = 10%).",
      "secret": false,
      "strategy": "default",
      "default": "0.1"
    },
    {
      "key": "STATE_FILE",
      "service": "polymarket-bot",
      "description": "Persists processed trades/redemptions to the volume across restarts.",
      "secret": false,
      "strategy": "default",
      "default": "/data/state.json"
    },
    {
      "key": "AUTO_REDEEM",
      "service": "polymarket-bot",
      "description": "Auto-cashout when a market resolves. Requires RPC_URL + Builder credentials below when true. Defaulting to false here (reference defaults to true) to reduce required fields for a first deploy.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PRIVATE_KEY",
      "service": "polymarket-bot",
      "description": "Magic EOA private key used to sign orders. Get it from reveal.magic.link/polymarket.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RELAYER_URL",
      "service": "polymarket-bot",
      "description": "Polymarket relayer endpoint.",
      "secret": false,
      "strategy": "default",
      "default": "https://relayer-v2.polymarket.com"
    },
    {
      "key": "COPY_TRADERS",
      "service": "polymarket-bot",
      "description": "Comma-separated trader addresses to copy.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "COPY_STRATEGY",
      "service": "polymarket-bot",
      "description": "PERCENT_USD | PERCENT_SHARES | FIXED_USD | FIXED_SHARES.",
      "secret": false,
      "strategy": "default",
      "default": "PERCENT_USD"
    },
    {
      "key": "MAX_TRADE_USD",
      "service": "polymarket-bot",
      "description": "Maximum USD per trade.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "MIN_TRADE_USD",
      "service": "polymarket-bot",
      "description": "Minimum USD per trade.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "SIGNATURE_TYPE",
      "service": "polymarket-bot",
      "description": "1=Polymarket proxy (Magic, recommended default), 0=EOA, 2=Gnosis Safe.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "FIXED_TRADE_USD",
      "service": "polymarket-bot",
      "description": "Fixed USD per trade when COPY_STRATEGY=FIXED_USD.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "PROFILE_ADDRESS",
      "service": "polymarket-bot",
      "description": "Polymarket profile/proxy address visible in your account.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RELAYER_TX_TYPE",
      "service": "polymarket-bot",
      "description": "PROXY (default) or SAFE.",
      "secret": false,
      "strategy": "default",
      "default": "PROXY"
    },
    {
      "key": "NPM_CONFIG_LOGLEVEL",
      "service": "polymarket-bot",
      "description": "Suppresses npm warnings during build.",
      "secret": false,
      "strategy": "default",
      "default": "error"
    },
    {
      "key": "MAX_DAILY_VOLUME_USD",
      "service": "polymarket-bot",
      "description": "Daily USD cap for buys.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "MAX_POSITION_SIZE_USD",
      "service": "polymarket-bot",
      "description": "Per-position USD cap for buys.",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "RAILPACK_NODE_VERSION",
      "service": "polymarket-bot",
      "description": "Forces Node 22 (some dependencies warn/fail below Node 20.10).",
      "secret": false,
      "strategy": "default",
      "default": "22"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "polymarket-bot"
      }
    },
    "cli": "railway deploy --template polymarket-bot",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "bd9dbb36-10ef-4834-b67f-342c9ddab315",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "f9c780f7-2db2-4c2e-9f9e-d9074c3504a7": {
                  "icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRRhJDmjdIHCfIPN3UJqgVO7_naqmlkX1gHEeavn2pSpQ&s=10",
                  "name": "polymarket-bot",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/shruti060701/polymarket-bot-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "DEBUG": {
                      "isOptional": false,
                      "description": "Verbose logs.",
                      "defaultValue": "true"
                    },
                    "DRY_RUN": {
                      "isOptional": false,
                      "description": "Simulate orders without sending them. Confirm your config works before setting to false.",
                      "defaultValue": "true"
                    },
                    "COPY_SIDE": {
                      "isOptional": false,
                      "description": "BUY | SELL | BOTH.",
                      "defaultValue": "BOTH"
                    },
                    "COPY_RATIO": {
                      "isOptional": false,
                      "description": "Percent multiplier for percent strategies (0.1 = 10%).",
                      "defaultValue": "0.1"
                    },
                    "STATE_FILE": {
                      "isOptional": false,
                      "description": "Persists processed trades/redemptions to the volume across restarts.",
                      "defaultValue": "/data/state.json"
                    },
                    "AUTO_REDEEM": {
                      "isOptional": false,
                      "description": "Auto-cashout when a market resolves. Requires RPC_URL + Builder credentials below when true. Defaulting to false here (reference defaults to true) to reduce required fields for a first deploy.",
                      "defaultValue": "false"
                    },
                    "PRIVATE_KEY": {
                      "isOptional": false,
                      "description": "Magic EOA private key used to sign orders. Get it from reveal.magic.link/polymarket.",
                      "defaultValue": "{{PRIVATE_KEY}}"
                    },
                    "RELAYER_URL": {
                      "isOptional": false,
                      "description": "Polymarket relayer endpoint.",
                      "defaultValue": "https://relayer-v2.polymarket.com"
                    },
                    "COPY_TRADERS": {
                      "isOptional": false,
                      "description": "Comma-separated trader addresses to copy.",
                      "defaultValue": "{{COPY_TRADERS}}"
                    },
                    "COPY_STRATEGY": {
                      "isOptional": false,
                      "description": "PERCENT_USD | PERCENT_SHARES | FIXED_USD | FIXED_SHARES.",
                      "defaultValue": "PERCENT_USD"
                    },
                    "MAX_TRADE_USD": {
                      "isOptional": false,
                      "description": "Maximum USD per trade.",
                      "defaultValue": "10"
                    },
                    "MIN_TRADE_USD": {
                      "isOptional": false,
                      "description": "Minimum USD per trade.",
                      "defaultValue": "1"
                    },
                    "SIGNATURE_TYPE": {
                      "isOptional": false,
                      "description": "1=Polymarket proxy (Magic, recommended default), 0=EOA, 2=Gnosis Safe.",
                      "defaultValue": "1"
                    },
                    "FIXED_TRADE_USD": {
                      "isOptional": false,
                      "description": "Fixed USD per trade when COPY_STRATEGY=FIXED_USD.",
                      "defaultValue": "10"
                    },
                    "PROFILE_ADDRESS": {
                      "isOptional": false,
                      "description": "Polymarket profile/proxy address visible in your account.",
                      "defaultValue": "{{PROFILE_ADDRESS}}"
                    },
                    "RELAYER_TX_TYPE": {
                      "isOptional": false,
                      "description": "PROXY (default) or SAFE.",
                      "defaultValue": "PROXY"
                    },
                    "NPM_CONFIG_LOGLEVEL": {
                      "isOptional": false,
                      "description": "Suppresses npm warnings during build.",
                      "defaultValue": "error"
                    },
                    "MAX_DAILY_VOLUME_USD": {
                      "isOptional": false,
                      "description": "Daily USD cap for buys.",
                      "defaultValue": "10"
                    },
                    "MAX_POSITION_SIZE_USD": {
                      "isOptional": false,
                      "description": "Per-position USD cap for buys.",
                      "defaultValue": "20"
                    },
                    "RAILPACK_NODE_VERSION": {
                      "isOptional": false,
                      "description": "Forces Node 22 (some dependencies warn/fail below Node 20.10).",
                      "defaultValue": "22"
                    }
                  },
                  "volumeMounts": {
                    "f9c780f7-2db2-4c2e-9f9e-d9074c3504a7": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0"
}
