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 '{
    "version": 1,
    "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": {
      "slippageBps": 300,
      "priceImpactBps": 300,
      "thresholdUsd": "5.00"
    }
  }'
{
  "success": true,
  "data": {
    "valid": true
  }
}
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 two validation gates in the same order:
  1. Asset gate — every assetId must not be on the global blocklist, and must either be present in our asset table or be recognized by the upstream market data provider.
  2. Structural validation — CAIP-19 parsing, weight sum (must total 100), no duplicate assets, and the deep block-tree validator the engine uses.
A 200 response is a faithful predictor of a Create Strategy success at the moment the call is made. State on the blocklist or assets table 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 '{
    "version": 1,
    "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": {
      "slippageBps": 300,
      "priceImpactBps": 300,
      "thresholdUsd": "5.00"
    }
  }'
{
  "success": true,
  "data": {
    "valid": true
  }
}