Skip to main content
POST
/
v2
/
strategies
/
validate
curl --request POST \
  --url 'https://api.glider.fi/v2/strategies/validate' \
  --header 'x-api-key: gldr_sk_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "allocation": {
      "assets": [
        { "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "weight": "60" },
        { "assetId": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7", "weight": "40" }
      ]
    },
    "schedule": {
      "type": "interval",
      "frequency": "daily"
    },
    "preferences": {
      "swap": {
        "slippageBps": 300,
        "priceImpactBps": 300,
        "thresholdUsd": "5.00"
      }
    }
  }'
{
  "success": true,
  "data": {
    "valid": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.glider.fi/llms.txt

Use this file to discover all available pages before exploring further.

A side-effect-free dry-run of POST /v2/strategies. Useful for pre-flight checks before submitting a create request — for example, to enable or disable a submit button, surface inline form errors, or preview which assets in an allocation would be rejected. The endpoint accepts the same request body as Create Strategy and runs the same validation gates in the same order:
  1. Asset validation — every assetId must be recognized and not blocked.
  2. Structural validation — CAIP-19 parsing, weight sum (must total 100), no duplicate assets, and allocation shape.
A 200 response is a faithful predictor of a Create Strategy success at the moment the call is made. Asset availability can change between the validate and create calls, so a passing dry-run is not a guarantee — clients should still handle a 400 from the actual create.
  • Auth: x-api-key header (required)
  • Scope: strategies:write
Common error responses:
  • 400 when the asset gate or allocation validation fails
  • 401 when x-api-key header is missing or the key is invalid
  • 403 when the API key lacks the strategies:write scope
  • 500 on unexpected server errors
curl --request POST \
  --url 'https://api.glider.fi/v2/strategies/validate' \
  --header 'x-api-key: gldr_sk_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "allocation": {
      "assets": [
        { "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "weight": "60" },
        { "assetId": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7", "weight": "40" }
      ]
    },
    "schedule": {
      "type": "interval",
      "frequency": "daily"
    },
    "preferences": {
      "swap": {
        "slippageBps": 300,
        "priceImpactBps": 300,
        "thresholdUsd": "5.00"
      }
    }
  }'
{
  "success": true,
  "data": {
    "valid": true
  }
}