ClickAPIs
Examples · How often does SPY close higher?

Examples / Basics

How often does SPY close higher?

Level 1 · BasicsPOST/v1/trader-stats

What it answers

Trader statistics count how a symbol actually trades: the share of up days, weeks, months and years, the size of a typical up and down day, the biggest moves, the longest winning and losing streaks, and whether volume is heavier on up or down days.

Request

Input POST /v1/trader-stats
{
  "symbol": "SPY",
  "start_date": "2010-01-01"
}
Open in playground

Response

Output 200 OK
{
  "ok": true,
  "data": {
    "symbol": "SPY",
    "start": "2010-01-04",
    "end": "2026-11-12",
    "bars": {
      "count": 4241,
      "up": 2336,
      "down": 1887,
      "flat": 18,
      "win_rate": 0.550813,
      "avg_return": 0.000575,
      "avg_up_move": 0.007027,
      "avg_down_move": -0.007408,
      "median_up_move": 0.005135,
      "median_down_move": -0.00456,
      "payoff_ratio": 0.94861,
      "largest_up": {
        "date": "2025-04-09",
        "return": 0.105025
      },
      "largest_down": {
        "date": "2020-03-16",
        "return": -0.109409
      },
      "longest_winning_streak": {
        "length": 14,
        "start": "2010-02-26",
        "end": "2010-03-17"
      },
      "longest_losing_streak": {
        "length": 8,
        "start": "2018-12-13",
        "end": "2018-12-24"
      },
      "current_streak": -1
    },
    "weeks": {
      "count": 879,
      "positive": 514,
      "positive_pct": 0.584755,
      "avg_return": 0.002733,
      "median_return": 0.00382,
      "best": {
        "period_end": "2020-04-09",
        "return": 0.12093
      },
      "worst": {
        "period_end": "2020-03-20",
        "return": -0.145458
      }
    },
    "months": {
      "count": 202,
      "positive": 138,
      "positive_pct": 0.683168,
      "avg_return": 0.012017,
      "median_return": 0.016484,
      "best": {
        "period_end": "2020-04-30",
        "return": 0.126978
      },
      "worst": {
        "period_end": "2020-03-31",
        "return": -0.124861
      }
    },
    "years": {
      "count": 16,
      "positive": 14,
      "positive_pct": 0.875,
      "avg_return": 0.146504,
      "median_return": 0.168552,
      "best": {
        "period_end": "2013-12-31",
        "return": 0.323017
      },
      "worst": {
        "period_end": "2022-12-30",
        "return": -0.181737
      }
    },
    "volume": {
      "up_volume_total": 231105026336.0,
      "down_volume_total": 220199665117.0,
      "up_down_volume_ratio": 1.049525,
      "avg_volume_up_bars": 98931946.0,
      "avg_volume_down_bars": 116692986.0,
      "avg_volume_ratio": 0.847797
    },
    "by_year": [
      {
        "year": 2026,
        "return": 0.115018,
        "bars": 218,
        "up": 110,
        "down": 108,
        "win_rate": 0.504587,
        "best_bar": 0.029079,
        "worst_bar": -0.044092,
        "volatility": 0.140096,
        "partial": true
      },
      {
        "year": 2025,
        "return": 0.177207,
        "bars": 250,
        "up": 143,
        "down": 107,
        "win_rate": 0.572,
        "best_bar": 0.105025,
        "worst_bar": -0.058535,
        "volatility": 0.194349,
        "partial": false
      },
      {
        "year": 2024,
        "return": 0.248851,
        "bars": 252,
        "up": 148,
        "down": 103,
        "win_rate": 0.587302,
        "best_bar": 0.024863,
        "worst_bar": -0.029808,
        "volatility": 0.125366,
        "partial": false
      },
      {
        "year": 2023,
        "return": 0.261724,
        "bars": 250,
        "up": 140,
        "down": 109,
        "win_rate": 0.56,
        "best_bar": 0.022935,
        "worst_bar": -0.020055,
        "volatility": 0.130421,
        "partial": false
      },
      {
        "year": 2022,
        "return": -0.181737,
        "bars": 251,
        "up": 109,
        "down": 141,
        "win_rate": 0.434263,
        "best_bar": 0.054953,
        "worst_bar": -0.043483,
        "volatility": 0.241804,
        "partial": false
      },
      "… 9 more items …",
      {
        "year": 2012,
        "return": 0.159897,
        "bars": 250,
        "up": 136,
        "down": 111,
        "win_rate": 0.544,
        "best_bar": 0.024964,
        "worst_bar": -0.025149,
        "volatility": 0.127031,
        "partial": false
      },
      {
        "year": 2011,
        "return": 0.018809,
        "bars": 252,
        "up": 136,
        "down": 116,
        "win_rate": 0.539683,
        "best_bar": 0.046504,
        "worst_bar": -0.065055,
        "volatility": 0.229558,
        "partial": false
      },
      {
        "year": 2010,
        "return": 0.131473,
        "bars": 251,
        "up": 145,
        "down": 104,
        "win_rate": 0.577689,
        "best_bar": 0.044015,
        "worst_bar": -0.037846,
        "volatility": 0.178386,
        "partial": true
      }
    ],
    "notes": [
      "A bar is up when its close is above the previous close; flat bars count as neither.",
      "Week, month and year returns run from the last close of one calendar period to the last close of the next; the first period is dropped and the latest may be in progress.",
      "current_streak: consecutive up (+) or down (-) closes ending at the latest bar."
    ],
    "interval": "1day"
  },
  "meta": {
    "op": "trader-stats",
    "units": 2,
    "cost_usd": 0.0,
    "billing": "internal",
    "free_call": false,
    "free_calls_left": 0,
    "balance_usd": 5.0,
    "ms": 10,
    "interval": "1day",
    "data_as_of": "2026-11-12",
    "partial_last_bar": false
  }
}

How to read it

bars.win_rate is the share of days that closed higher; weeks, months and years give the same for longer periods. payoff_ratio compares the average up day with the average down day. volume.avg_volume_ratio below 1 means down days trade heavier. by_year lists every year, newest first.

Parameters and limits: Trader statistics reference. Analytics, not advice.