curl --request POST \
  --url 'https://api.glider.fi/v1/portfolio/port_abc123/rebalance/schedule/start' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: your_api_key_here' \
  --data '{
    "runRebalanceImmediately": true,
    "initializeScheduleAutomatically": true,
    "interval": 21600000
  }'
{
  "success": true,
  "data": {
    "portfolioId": "port_abc123",
    "rebalanceScheduleId": "sched_abc123",
    "status": "started",
    "message": "Portfolio automation started successfully",
    "runRebalanceImmediately": true,
    "isAutomated": true,
    "intervalMs": 21600000
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T13:45:12.345Z"
}

The Portfolio Automation endpoints allow you to start, pause, resume, and manage automated rebalancing of portfolios.

Start Portfolio Automation

Starts automated rebalancing for a portfolio.

portfolioId
string
required

The unique identifier of the portfolio

runRebalanceImmediately
boolean
default:"false"

Whether to run an initial rebalance immediately after starting

initializeScheduleAutomatically
boolean
default:"true"

Set to false for manual-only rebalancing without a schedule

interval
number
default:"21600000"

Rebalance interval in milliseconds (default: 6 hours)

Pause Portfolio Automation

Pauses automated rebalancing for a portfolio.

portfolioId
string
required

The unique identifier of the portfolio

reason
string

Optional reason for pausing

Resume Portfolio Automation

Resumes previously paused automated rebalancing for a portfolio.

portfolioId
string
required

The unique identifier of the portfolio

reason
string

Optional reason for resuming

Manually Trigger Rebalance

Manually triggers a portfolio rebalance.

portfolioId
string
required

The unique identifier of the portfolio

skipScheduleValidation
boolean
default:"false"

Set to true to trigger a rebalance even if no schedule exists

Check Automation Status

Checks the status of portfolio automation.

portfolioId
string
required

The unique identifier of the portfolio

Check Rebalance Status

Checks the status of portfolio rebalancing.

portfolioId
string
required

The unique identifier of the portfolio

limit
number
default:"5"

Number of recent workflows to return

Check Specific Rebalance Execution

Gets detailed information about a specific rebalance execution.

portfolioId
string
required

The unique identifier of the portfolio

workflowId
string
required

The ID of the rebalance workflow execution

Update Schedule Interval

Updates the rebalance schedule interval for a portfolio.

portfolioId
string
required

The unique identifier of the portfolio

interval
object
required

The new interval settings

interval.every
number
required

Interval in milliseconds (min: 1 hour, max: 1 year)

interval.offset
number
default:"0"

Offset from start time in milliseconds