Skip to main content
POST
/
v2
/
strategies
curl --request POST \
  --url 'https://api.glider.fi/v2/strategies' \
  --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": {
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "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,
      "thresholdUsd": "5.00"
    },
    "isPublic": false,
    "createdAt": "2026-03-31T12:00:00.000Z"
  }
}
Creates a strategy from a flat list of asset allocations with a rebalance schedule and optional swap preferences. The server converts allocations into the internal block tree, generates all block IDs, and validates the result before persisting.
  • Auth: x-api-key header (required)
  • Scope: strategies:write
Asset IDs use CAIP-19 format (e.g., eip155:1/erc20:0xa0b8...). Allocation weights are string percentages that must sum to 100. The request version field controls the request format — currently only 1. Schedule and preferences are stored separately and can be updated independently via PUT /v2/strategies/:id/schedule and PUT /v2/strategies/:id/preferences. Common error responses:
  • 400 when the request body or allocation is invalid
  • 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' \
  --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": {
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "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,
      "thresholdUsd": "5.00"
    },
    "isPublic": false,
    "createdAt": "2026-03-31T12:00:00.000Z"
  }
}