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 '{
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "spec": {
      "version": 1,
      "allocations": [
        { "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "weight": "60" },
        { "assetId": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7", "weight": "40" }
      ],
      "tradingSettings": {
        "type": "threshold",
        "triggerPercentage": 5
      }
    }
  }'
{
  "success": true,
  "data": {
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "version": 1,
    "isPublic": false,
    "canMirror": true,
    "canFork": false,
    "createdAt": "2026-03-31T12:00:00.000Z"
  }
}
Creates a strategy from a flat list of asset allocations. 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. Common error responses:
  • 400 when the request body or spec 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 '{
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "spec": {
      "version": 1,
      "allocations": [
        { "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "weight": "60" },
        { "assetId": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7", "weight": "40" }
      ],
      "tradingSettings": {
        "type": "threshold",
        "triggerPercentage": 5
      }
    }
  }'
{
  "success": true,
  "data": {
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "name": "Balanced Growth",
    "description": "Multi-chain balanced allocation strategy",
    "version": 1,
    "isPublic": false,
    "canMirror": true,
    "canFork": false,
    "createdAt": "2026-03-31T12:00:00.000Z"
  }
}