{
  "manifest_version": "1.0.0",
  "template": {
    "id": "21848498-7630-4122-8c9c-23f4bdc00544",
    "slug": "kingdomedge-bot-template",
    "name": "kingdomedge-bot-template",
    "description": "Self-hosted trading bot. TradingView signals -> Alpaca bracket orders.",
    "url": "https://railway.com/deploy/kingdomedge-bot-template",
    "upstream": {
      "repo_url": "https://github.com/markjramos2009/kingdomedge-bot-template"
    }
  },
  "services": [
    {
      "name": "kingdomedge-bot-template",
      "source": {
        "repo": "https://github.com/markjramos2009/kingdomedge-bot-template"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "ALPACA_PAPER",
      "service": "kingdomedge-bot-template",
      "description": "Set \"true\" for paper trading (recommended for the first 30 days). Set \"false\" for live trading. Only switch to live after you've watched the bot's bracket behavior in paper for at least a month and you trust the structure.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ALPACA_API_KEY",
      "service": "kingdomedge-bot-template",
      "description": "Your Alpaca paper API key (starts with PK). Get from app.alpaca.markets -> API Keys -> Generate New Keys. The API key shows in plaintext; the secret only shows ONCE - save both immediately in a password manager.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WEBHOOK_SECRET",
      "service": "kingdomedge-bot-template",
      "description": "32-character random string. Generate locally with: openssl rand -hex 32 (Mac/Linux) or PowerShell -join ((48..57)+(65..90)+(97..122) | Get-Random -Count 32 | %{[char]$_}). Save in a password manager. Paste the SAME secret into your TradingView alert's webhook JSON message under the \"secret\" field.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ALPACA_API_SECRET",
      "service": "kingdomedge-bot-template",
      "description": "Your Alpaca paper API secret. Save in a password manager - Alpaca only displays it once at generation. Pair with ALPACA_API_KEY above.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "QUANTITY_OVERRIDE",
      "service": "kingdomedge-bot-template",
      "description": "Shares/contracts per trade. Recommended: 1 for the first 2 weeks of live trading so you can observe the bracket structure on small size before sizing up. Leave at 1 if unsure.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kingdomedge-bot-template"
      }
    },
    "cli": "railway deploy --template kingdomedge-bot-template",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "21848498-7630-4122-8c9c-23f4bdc00544",
            "serializedConfig": {
              "services": {
                "a2c83468-4a58-4884-b6b8-fead1a56db04": {
                  "icon": "https://devicons.railway.app/python",
                  "name": "kingdomedge-bot-template",
                  "source": {
                    "repo": "markjramos2009/kingdomedge-bot-template",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "SENTRY_DSN": {
                      "isOptional": true,
                      "description": "Optional Sentry DSN for error tracking. Skip if you don't have a Sentry account. Get yours at sentry.io -> your project -> Settings -> Client Keys (DSN).",
                      "defaultValue": ""
                    },
                    "ALPACA_PAPER": {
                      "isOptional": true,
                      "description": "Set \"true\" for paper trading (recommended for the first 30 days). Set \"false\" for live trading. Only switch to live after you've watched the bot's bracket behavior in paper for at least a month and you trust the structure.",
                      "defaultValue": "true"
                    },
                    "ALPACA_API_KEY": {
                      "isOptional": false,
                      "description": "Your Alpaca paper API key (starts with PK). Get from app.alpaca.markets -> API Keys -> Generate New Keys. The API key shows in plaintext; the secret only shows ONCE - save both immediately in a password manager.",
                      "defaultValue": "{{ALPACA_API_KEY}}"
                    },
                    "WEBHOOK_SECRET": {
                      "isOptional": false,
                      "description": "32-character random string. Generate locally with: openssl rand -hex 32 (Mac/Linux) or PowerShell -join ((48..57)+(65..90)+(97..122) | Get-Random -Count 32 | %{[char]$_}). Save in a password manager. Paste the SAME secret into your TradingView alert's webhook JSON message under the \"secret\" field.",
                      "defaultValue": "{{WEBHOOK_SECRET}}"
                    },
                    "ALPACA_API_SECRET": {
                      "isOptional": false,
                      "description": "Your Alpaca paper API secret. Save in a password manager - Alpaca only displays it once at generation. Pair with ALPACA_API_KEY above.",
                      "defaultValue": "{{ALPACA_API_SECRET}}"
                    },
                    "QUANTITY_OVERRIDE": {
                      "isOptional": true,
                      "description": "Shares/contracts per trade. Recommended: 1 for the first 2 weeks of live trading so you can observe the bracket structure on small size before sizing up. Leave at 1 if unsure.",
                      "defaultValue": "1"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T10:13:13.639Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_1607d187e86f4339b062",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 92,
    "typical_build_seconds": 20,
    "typical_start_seconds": 10,
    "slowest_service": "kingdomedge-bot-template"
  }
}
