@alva-ai/toolkit 0.21.0 → 0.23.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -6480,6 +6480,30 @@ var AutomationResource = class {
6480
6480
  `/api/v1/automation/${encodeURIComponent(String(id))}`
6481
6481
  );
6482
6482
  }
6483
+ /** Partially update one existing automation by immutable decimal-string id. */
6484
+ async update(params) {
6485
+ this.client._requireAuth();
6486
+ const id = requireAutomationIDString(params.id);
6487
+ if (!hasAutomationUpdate(params)) {
6488
+ throw new Error(
6489
+ "automation update requires at least one field or trigger=true"
6490
+ );
6491
+ }
6492
+ return this.client._request(
6493
+ "PATCH",
6494
+ `/api/v1/automation/${encodeURIComponent(String(id))}`,
6495
+ {
6496
+ body: {
6497
+ version: params.version,
6498
+ cronjob_id: params.cronjob_id,
6499
+ description: params.description,
6500
+ changelog: params.changelog,
6501
+ agent_type: params.agent_type,
6502
+ trigger: params.trigger
6503
+ }
6504
+ }
6505
+ );
6506
+ }
6483
6507
  stop(params) {
6484
6508
  return this.client.feed.stop(params);
6485
6509
  }
@@ -6499,6 +6523,15 @@ function requireAutomationID(id) {
6499
6523
  }
6500
6524
  return id;
6501
6525
  }
6526
+ function requireAutomationIDString(id) {
6527
+ if (!/^[1-9]\d*$/.test(id)) {
6528
+ throw new Error("automation id must be a positive integer string");
6529
+ }
6530
+ return id;
6531
+ }
6532
+ function hasAutomationUpdate(params) {
6533
+ return params.version !== void 0 || params.cronjob_id !== void 0 || params.description !== void 0 || params.changelog !== void 0 || params.agent_type !== void 0 || params.trigger === true;
6534
+ }
6502
6535
 
6503
6536
  // src/resources/playbooks.ts
6504
6537
  var PLAYBOOK_VISIBILITIES = [
@@ -6506,6 +6539,7 @@ var PLAYBOOK_VISIBILITIES = [
6506
6539
  "private",
6507
6540
  "paid"
6508
6541
  ];
6542
+ var OWNED_PLAYBOOK_FILTERS = ["draft", "running", "paused"];
6509
6543
  var PlaybooksResource = class {
6510
6544
  constructor(client) {
6511
6545
  this.client = client;
@@ -6543,6 +6577,26 @@ var PlaybooksResource = class {
6543
6577
  query
6544
6578
  });
6545
6579
  }
6580
+ /**
6581
+ * List the authenticated user's OWN playbooks via GET /api/v1/playbook —
6582
+ * the owner-scoped surface that INCLUDES drafts. Unlike `listByOwner` (the
6583
+ * public discovery view, which requires at least one release and therefore
6584
+ * hides drafts), this shows work-in-progress playbooks you created but
6585
+ * never released. Requires an API key: the owner is derived from auth, not
6586
+ * a username argument. Optional `filter` narrows to draft | running |
6587
+ * paused.
6588
+ */
6589
+ async listOwn(params = {}) {
6590
+ const query = {};
6591
+ if (params.filter) query.filter = params.filter;
6592
+ if (params.limit !== void 0 && params.limit > 0) {
6593
+ query.limit = String(params.limit);
6594
+ }
6595
+ if (params.cursor) query.cursor = params.cursor;
6596
+ return await this.client._request("GET", "/api/v1/playbook", {
6597
+ query
6598
+ });
6599
+ }
6546
6600
  /**
6547
6601
  * Get one playbook by numeric id or by "owner/name" ref. Returns null when
6548
6602
  * not found / not visible / deleted.
@@ -6730,1181 +6784,721 @@ var SdkDocsResource = class {
6730
6784
  }
6731
6785
  };
6732
6786
 
6733
- // src/resources/skillTiers.ts
6787
+ // src/resources/skillEndpoints.ts
6734
6788
  var SKILL_ENDPOINT_METADATA = [
6735
6789
  {
6736
6790
  skill: "arrays-data-api-crypto-futures-data",
6737
6791
  file: "binance-perp-usdt-kline",
6738
6792
  method: "GET",
6739
- path: "/api/v1/crypto/binance/perp/usdt/kline",
6740
- tier: "public",
6741
- required_subscription_tier: "free",
6742
- access: "free_and_pro",
6743
- pro_required: false
6793
+ path: "/api/v1/crypto/binance/perp/usdt/kline"
6744
6794
  },
6745
6795
  {
6746
6796
  skill: "arrays-data-api-spot-market-price-and-volume",
6747
6797
  file: "binance-spot-usdt-kline",
6748
6798
  method: "GET",
6749
- path: "/api/v1/crypto/binance/spot/usdt/kline",
6750
- tier: "public",
6751
- required_subscription_tier: "free",
6752
- access: "free_and_pro",
6753
- pro_required: false
6799
+ path: "/api/v1/crypto/binance/spot/usdt/kline"
6754
6800
  },
6755
6801
  {
6756
6802
  skill: "arrays-data-api-crypto-metrics-and-screener",
6757
6803
  file: "fear-greed-index",
6758
6804
  method: "GET",
6759
- path: "/api/v1/crypto/fear-greed-index",
6760
- tier: "public",
6761
- required_subscription_tier: "free",
6762
- access: "free_and_pro",
6763
- pro_required: false
6805
+ path: "/api/v1/crypto/fear-greed-index"
6764
6806
  },
6765
6807
  {
6766
6808
  skill: "arrays-data-api-crypto-futures-data",
6767
6809
  file: "funding-rate",
6768
6810
  method: "GET",
6769
- path: "/api/v1/crypto/funding-rate",
6770
- tier: "public",
6771
- required_subscription_tier: "free",
6772
- access: "free_and_pro",
6773
- pro_required: false
6811
+ path: "/api/v1/crypto/funding-rate"
6774
6812
  },
6775
6813
  {
6776
6814
  skill: "arrays-data-api-crypto-futures-data",
6777
6815
  file: "hyperliquid-perp-usdc-kline",
6778
6816
  method: "GET",
6779
- path: "/api/v1/crypto/hyperliquid/perp/usdc/kline",
6780
- tier: "public",
6781
- required_subscription_tier: "free",
6782
- access: "free_and_pro",
6783
- pro_required: false
6817
+ path: "/api/v1/crypto/hyperliquid/perp/usdc/kline"
6784
6818
  },
6785
6819
  {
6786
6820
  skill: "arrays-data-api-spot-market-price-and-volume",
6787
6821
  file: "hyperliquid-spot-usdc-kline",
6788
6822
  method: "GET",
6789
- path: "/api/v1/crypto/hyperliquid/spot/usdc/kline",
6790
- tier: "public",
6791
- required_subscription_tier: "free",
6792
- access: "free_and_pro",
6793
- pro_required: false
6823
+ path: "/api/v1/crypto/hyperliquid/spot/usdc/kline"
6794
6824
  },
6795
6825
  {
6796
6826
  skill: "arrays-data-api-crypto-futures-data",
6797
6827
  file: "long-short-ratio",
6798
6828
  method: "GET",
6799
- path: "/api/v1/crypto/long-short-ratio",
6800
- tier: "public",
6801
- required_subscription_tier: "free",
6802
- access: "free_and_pro",
6803
- pro_required: false
6829
+ path: "/api/v1/crypto/long-short-ratio"
6804
6830
  },
6805
6831
  {
6806
6832
  skill: "arrays-data-api-crypto-metrics-and-screener",
6807
6833
  file: "crypto-market-cap",
6808
6834
  method: "GET",
6809
- path: "/api/v1/crypto/market-cap",
6810
- tier: "public",
6811
- required_subscription_tier: "free",
6812
- access: "free_and_pro",
6813
- pro_required: false
6835
+ path: "/api/v1/crypto/market-cap"
6814
6836
  },
6815
6837
  {
6816
6838
  skill: "arrays-data-api-crypto-metrics-and-screener",
6817
6839
  file: "market-metrics",
6818
6840
  method: "GET",
6819
- path: "/api/v1/crypto/market-metrics",
6820
- tier: "public",
6821
- required_subscription_tier: "free",
6822
- access: "free_and_pro",
6823
- pro_required: false
6841
+ path: "/api/v1/crypto/market-metrics"
6824
6842
  },
6825
6843
  {
6826
6844
  skill: "arrays-data-api-crypto-futures-data",
6827
6845
  file: "open-interest",
6828
6846
  method: "GET",
6829
- path: "/api/v1/crypto/open-interest",
6830
- tier: "public",
6831
- required_subscription_tier: "free",
6832
- access: "free_and_pro",
6833
- pro_required: false
6847
+ path: "/api/v1/crypto/open-interest"
6834
6848
  },
6835
6849
  {
6836
6850
  skill: "arrays-data-api-crypto-metrics-and-screener",
6837
6851
  file: "screener-metrics",
6838
6852
  method: "GET",
6839
- path: "/api/v1/crypto/screener/metrics",
6840
- tier: "public",
6841
- required_subscription_tier: "free",
6842
- access: "free_and_pro",
6843
- pro_required: false
6853
+ path: "/api/v1/crypto/screener/metrics"
6844
6854
  },
6845
6855
  {
6846
6856
  skill: "arrays-data-api-crypto-metrics-and-screener",
6847
6857
  file: "screener-metrics-timerange",
6848
6858
  method: "GET",
6849
- path: "/api/v1/crypto/screener/metrics/timerange",
6850
- tier: "public",
6851
- required_subscription_tier: "free",
6852
- access: "free_and_pro",
6853
- pro_required: false
6859
+ path: "/api/v1/crypto/screener/metrics/timerange"
6854
6860
  },
6855
6861
  {
6856
6862
  skill: "arrays-data-api-crypto-metrics-and-screener",
6857
6863
  file: "crypto-detail",
6858
6864
  method: "GET",
6859
- path: "/api/v1/crypto/detail",
6860
- tier: "public",
6861
- required_subscription_tier: "free",
6862
- access: "free_and_pro",
6863
- pro_required: false
6865
+ path: "/api/v1/crypto/detail"
6864
6866
  },
6865
6867
  {
6866
6868
  skill: "arrays-data-api-etf-fundamentals",
6867
6869
  file: "country-weightings",
6868
6870
  method: "GET",
6869
- path: "/api/v1/etf/country-weightings",
6870
- tier: "public",
6871
- required_subscription_tier: "free",
6872
- access: "free_and_pro",
6873
- pro_required: false
6871
+ path: "/api/v1/etf/country-weightings"
6874
6872
  },
6875
6873
  {
6876
6874
  skill: "arrays-data-api-etf-fundamentals",
6877
6875
  file: "holdings",
6878
6876
  method: "GET",
6879
- path: "/api/v1/etf/holdings",
6880
- tier: "public",
6881
- required_subscription_tier: "free",
6882
- access: "free_and_pro",
6883
- pro_required: false
6877
+ path: "/api/v1/etf/holdings"
6884
6878
  },
6885
6879
  {
6886
6880
  skill: "arrays-data-api-etf-fundamentals",
6887
6881
  file: "info",
6888
6882
  method: "GET",
6889
- path: "/api/v1/etf/info",
6890
- tier: "public",
6891
- required_subscription_tier: "free",
6892
- access: "free_and_pro",
6893
- pro_required: false
6883
+ path: "/api/v1/etf/info"
6894
6884
  },
6895
6885
  {
6896
6886
  skill: "arrays-data-api-etf-fundamentals",
6897
6887
  file: "sector-weightings",
6898
6888
  method: "GET",
6899
- path: "/api/v1/etf/sector-weightings",
6900
- tier: "public",
6901
- required_subscription_tier: "free",
6902
- access: "free_and_pro",
6903
- pro_required: false
6889
+ path: "/api/v1/etf/sector-weightings"
6904
6890
  },
6905
6891
  {
6906
6892
  skill: "arrays-data-api-macro-and-economics",
6907
6893
  file: "macro-commodity-historical",
6908
6894
  method: "GET",
6909
- path: "/api/v1/macro/commodity/historical",
6910
- tier: "public",
6911
- required_subscription_tier: "free",
6912
- access: "free_and_pro",
6913
- pro_required: false
6895
+ path: "/api/v1/macro/commodity/historical"
6914
6896
  },
6915
6897
  {
6916
6898
  skill: "arrays-data-api-macro-and-economics",
6917
6899
  file: "macro-commodity-real-time",
6918
6900
  method: "GET",
6919
- path: "/api/v1/macro/commodity/real-time",
6920
- tier: "public",
6921
- required_subscription_tier: "free",
6922
- access: "free_and_pro",
6923
- pro_required: false
6901
+ path: "/api/v1/macro/commodity/real-time"
6924
6902
  },
6925
6903
  {
6926
6904
  skill: "arrays-data-api-macro-and-economics",
6927
6905
  file: "macro-commodity-symbol-list",
6928
6906
  method: "GET",
6929
- path: "/api/v1/macro/commodity/symbols",
6930
- tier: "public",
6931
- required_subscription_tier: "free",
6932
- access: "free_and_pro",
6933
- pro_required: false
6907
+ path: "/api/v1/macro/commodity/symbols"
6934
6908
  },
6935
6909
  {
6936
6910
  skill: "arrays-data-api-macro-and-economics",
6937
6911
  file: "economic-indicators",
6938
6912
  method: "GET",
6939
- path: "/api/v1/macro/economic-indicators",
6940
- tier: "public",
6941
- required_subscription_tier: "free",
6942
- access: "free_and_pro",
6943
- pro_required: false
6913
+ path: "/api/v1/macro/economic-indicators"
6944
6914
  },
6945
6915
  {
6946
6916
  skill: "arrays-data-api-macro-and-economics",
6947
6917
  file: "macro-forex-historical",
6948
6918
  method: "GET",
6949
- path: "/api/v1/macro/forex/historical",
6950
- tier: "public",
6951
- required_subscription_tier: "free",
6952
- access: "free_and_pro",
6953
- pro_required: false
6919
+ path: "/api/v1/macro/forex/historical"
6954
6920
  },
6955
6921
  {
6956
6922
  skill: "arrays-data-api-macro-and-economics",
6957
6923
  file: "macro-forex-real-time",
6958
6924
  method: "GET",
6959
- path: "/api/v1/macro/forex/real-time",
6960
- tier: "public",
6961
- required_subscription_tier: "free",
6962
- access: "free_and_pro",
6963
- pro_required: false
6925
+ path: "/api/v1/macro/forex/real-time"
6964
6926
  },
6965
6927
  {
6966
6928
  skill: "arrays-data-api-macro-and-economics",
6967
6929
  file: "macro-forex-symbol-list",
6968
6930
  method: "GET",
6969
- path: "/api/v1/macro/forex/symbols",
6970
- tier: "public",
6971
- required_subscription_tier: "free",
6972
- access: "free_and_pro",
6973
- pro_required: false
6931
+ path: "/api/v1/macro/forex/symbols"
6974
6932
  },
6975
6933
  {
6976
6934
  skill: "arrays-data-api-macro-and-economics",
6977
6935
  file: "macro-index-historical",
6978
6936
  method: "GET",
6979
- path: "/api/v1/macro/index/historical",
6980
- tier: "public",
6981
- required_subscription_tier: "free",
6982
- access: "free_and_pro",
6983
- pro_required: false
6937
+ path: "/api/v1/macro/index/historical"
6984
6938
  },
6985
6939
  {
6986
6940
  skill: "arrays-data-api-macro-and-economics",
6987
6941
  file: "macro-index-real-time",
6988
6942
  method: "GET",
6989
- path: "/api/v1/macro/index/real-time",
6990
- tier: "public",
6991
- required_subscription_tier: "free",
6992
- access: "free_and_pro",
6993
- pro_required: false
6943
+ path: "/api/v1/macro/index/real-time"
6994
6944
  },
6995
6945
  {
6996
6946
  skill: "arrays-data-api-macro-and-economics",
6997
6947
  file: "rates",
6998
6948
  method: "GET",
6999
- path: "/api/v1/macro/treasury-rates",
7000
- tier: "public",
7001
- required_subscription_tier: "free",
7002
- access: "free_and_pro",
7003
- pro_required: false
6949
+ path: "/api/v1/macro/treasury-rates"
7004
6950
  },
7005
6951
  {
7006
6952
  skill: "arrays-data-api-equity-fundamentals",
7007
6953
  file: "company-balance-sheets",
7008
6954
  method: "GET",
7009
- path: "/api/v1/stocks/company/balance-sheets",
7010
- tier: "public",
7011
- required_subscription_tier: "free",
7012
- access: "free_and_pro",
7013
- pro_required: false
6955
+ path: "/api/v1/stocks/company/balance-sheets"
7014
6956
  },
7015
6957
  {
7016
6958
  skill: "arrays-data-api-equity-fundamentals",
7017
6959
  file: "company-cashflow-statements",
7018
6960
  method: "GET",
7019
- path: "/api/v1/stocks/company/cashflow-statements",
7020
- tier: "public",
7021
- required_subscription_tier: "free",
7022
- access: "free_and_pro",
7023
- pro_required: false
6961
+ path: "/api/v1/stocks/company/cashflow-statements"
7024
6962
  },
7025
6963
  {
7026
6964
  skill: "arrays-data-api-equity-fundamentals",
7027
6965
  file: "company-detail",
7028
6966
  method: "GET",
7029
- path: "/api/v1/stocks/company/detail",
7030
- tier: "public",
7031
- required_subscription_tier: "free",
7032
- access: "free_and_pro",
7033
- pro_required: false
6967
+ path: "/api/v1/stocks/company/detail"
7034
6968
  },
7035
6969
  {
7036
6970
  skill: "arrays-data-api-equity-fundamentals",
7037
6971
  file: "company-income-statements",
7038
6972
  method: "GET",
7039
- path: "/api/v1/stocks/company/income-statements",
7040
- tier: "public",
7041
- required_subscription_tier: "free",
7042
- access: "free_and_pro",
7043
- pro_required: false
6973
+ path: "/api/v1/stocks/company/income-statements"
7044
6974
  },
7045
6975
  {
7046
6976
  skill: "arrays-data-api-equity-fundamentals",
7047
6977
  file: "company-kpi",
7048
6978
  method: "GET",
7049
- path: "/api/v1/stocks/company/kpi",
7050
- tier: "public",
7051
- required_subscription_tier: "free",
7052
- access: "free_and_pro",
7053
- pro_required: false
6979
+ path: "/api/v1/stocks/company/kpi"
7054
6980
  },
7055
6981
  {
7056
6982
  skill: "arrays-data-api-equity-events",
7057
6983
  file: "crowdfunding-offerings",
7058
6984
  method: "GET",
7059
- path: "/api/v1/stocks/crowdfunding/offerings",
7060
- tier: "public",
7061
- required_subscription_tier: "free",
7062
- access: "free_and_pro",
7063
- pro_required: false
6985
+ path: "/api/v1/stocks/crowdfunding/offerings"
7064
6986
  },
7065
6987
  {
7066
6988
  skill: "arrays-data-api-equity-events",
7067
6989
  file: "dividends",
7068
6990
  method: "GET",
7069
- path: "/api/v1/stocks/dividends",
7070
- tier: "public",
7071
- required_subscription_tier: "free",
7072
- access: "free_and_pro",
7073
- pro_required: false
6991
+ path: "/api/v1/stocks/dividends"
7074
6992
  },
7075
6993
  {
7076
6994
  skill: "arrays-data-api-equity-events",
7077
6995
  file: "earnings-calendar",
7078
6996
  method: "GET",
7079
- path: "/api/v1/stocks/earnings-calendar",
7080
- tier: "public",
7081
- required_subscription_tier: "free",
7082
- access: "free_and_pro",
7083
- pro_required: false
6997
+ path: "/api/v1/stocks/earnings-calendar"
7084
6998
  },
7085
6999
  {
7086
7000
  skill: "arrays-data-api-equity-events",
7087
7001
  file: "equity-offering",
7088
7002
  method: "GET",
7089
- path: "/api/v1/stocks/equity-offering",
7090
- tier: "public",
7091
- required_subscription_tier: "free",
7092
- access: "free_and_pro",
7093
- pro_required: false
7003
+ path: "/api/v1/stocks/equity-offering"
7094
7004
  },
7095
7005
  {
7096
7006
  skill: "arrays-data-api-stock-metrics",
7097
7007
  file: "financial-metrics",
7098
7008
  method: "GET",
7099
- path: "/api/v1/stocks/financial-metrics",
7100
- tier: "public",
7101
- required_subscription_tier: "free",
7102
- access: "free_and_pro",
7103
- pro_required: false
7009
+ path: "/api/v1/stocks/financial-metrics"
7104
7010
  },
7105
7011
  {
7106
7012
  skill: "arrays-data-api-equity-fundamentals",
7107
7013
  file: "fiscal-dates",
7108
7014
  method: "GET",
7109
- path: "/api/v1/stocks/fiscal-dates",
7110
- tier: "public",
7111
- required_subscription_tier: "free",
7112
- access: "free_and_pro",
7113
- pro_required: false
7015
+ path: "/api/v1/stocks/fiscal-dates"
7114
7016
  },
7115
7017
  {
7116
7018
  skill: "arrays-data-api-equity-fundamentals",
7117
7019
  file: "fiscal-dates-range",
7118
7020
  method: "GET",
7119
- path: "/api/v1/stocks/fiscal-dates/range",
7120
- tier: "public",
7121
- required_subscription_tier: "free",
7122
- access: "free_and_pro",
7123
- pro_required: false
7021
+ path: "/api/v1/stocks/fiscal-dates/range"
7124
7022
  },
7125
7023
  {
7126
7024
  skill: "arrays-data-api-equity-events",
7127
7025
  file: "ipo-calendar",
7128
7026
  method: "GET",
7129
- path: "/api/v1/stocks/ipo-calendar",
7130
- tier: "public",
7131
- required_subscription_tier: "free",
7132
- access: "free_and_pro",
7133
- pro_required: false
7027
+ path: "/api/v1/stocks/ipo-calendar"
7134
7028
  },
7135
7029
  {
7136
7030
  skill: "arrays-data-api-equity-events",
7137
7031
  file: "ipo-confirmed-calendar",
7138
7032
  method: "GET",
7139
- path: "/api/v1/stocks/ipo-confirmed-calendar",
7140
- tier: "public",
7141
- required_subscription_tier: "free",
7142
- access: "free_and_pro",
7143
- pro_required: false
7033
+ path: "/api/v1/stocks/ipo-confirmed-calendar"
7144
7034
  },
7145
7035
  {
7146
7036
  skill: "arrays-data-api-spot-market-price-and-volume",
7147
7037
  file: "stocks-kline",
7148
7038
  method: "GET",
7149
- path: "/api/v1/stocks/kline",
7150
- tier: "public",
7151
- required_subscription_tier: "free",
7152
- access: "free_and_pro",
7153
- pro_required: false
7039
+ path: "/api/v1/stocks/kline"
7154
7040
  },
7155
7041
  {
7156
7042
  skill: "arrays-data-api-stock-metrics",
7157
7043
  file: "market-metrics",
7158
7044
  method: "GET",
7159
- path: "/api/v1/stocks/market-metrics",
7160
- tier: "public",
7161
- required_subscription_tier: "free",
7162
- access: "free_and_pro",
7163
- pro_required: false
7045
+ path: "/api/v1/stocks/market-metrics"
7164
7046
  },
7165
7047
  {
7166
7048
  skill: "arrays-data-api-equity-events",
7167
7049
  file: "mergers-acquisitions",
7168
7050
  method: "GET",
7169
- path: "/api/v1/stocks/mergers-acquisitions",
7170
- tier: "public",
7171
- required_subscription_tier: "free",
7172
- access: "free_and_pro",
7173
- pro_required: false
7051
+ path: "/api/v1/stocks/mergers-acquisitions"
7174
7052
  },
7175
7053
  {
7176
7054
  skill: "arrays-data-api-equity-fundamentals",
7177
7055
  file: "outstanding-shares",
7178
7056
  method: "GET",
7179
- path: "/api/v1/stocks/outstanding-shares",
7180
- tier: "public",
7181
- required_subscription_tier: "free",
7182
- access: "free_and_pro",
7183
- pro_required: false
7057
+ path: "/api/v1/stocks/outstanding-shares"
7184
7058
  },
7185
7059
  {
7186
7060
  skill: "arrays-data-api-stock-metrics",
7187
7061
  file: "ratings",
7188
7062
  method: "GET",
7189
- path: "/api/v1/stocks/ratings",
7190
- tier: "public",
7191
- required_subscription_tier: "free",
7192
- access: "free_and_pro",
7193
- pro_required: false
7063
+ path: "/api/v1/stocks/ratings"
7194
7064
  },
7195
7065
  {
7196
7066
  skill: "arrays-data-api-stock-screener",
7197
7067
  file: "basic-info-screener",
7198
7068
  method: "GET",
7199
- path: "/api/v1/stocks/screener/basic-info/{sub}",
7200
- tier: "public",
7201
- required_subscription_tier: "free",
7202
- access: "free_and_pro",
7203
- pro_required: false
7069
+ path: "/api/v1/stocks/screener/basic-info/{sub}"
7204
7070
  },
7205
7071
  {
7206
7072
  skill: "arrays-data-api-stock-screener",
7207
7073
  file: "event-screener",
7208
7074
  method: "GET",
7209
- path: "/api/v1/stocks/screener/events",
7210
- tier: "public",
7211
- required_subscription_tier: "free",
7212
- access: "free_and_pro",
7213
- pro_required: false
7075
+ path: "/api/v1/stocks/screener/events"
7214
7076
  },
7215
7077
  {
7216
7078
  skill: "arrays-data-api-stock-screener",
7217
7079
  file: "screener-financial-metrics",
7218
7080
  method: "GET",
7219
- path: "/api/v1/stocks/screener/financial-metrics",
7220
- tier: "public",
7221
- required_subscription_tier: "free",
7222
- access: "free_and_pro",
7223
- pro_required: false
7081
+ path: "/api/v1/stocks/screener/financial-metrics"
7224
7082
  },
7225
7083
  {
7226
7084
  skill: "arrays-data-api-stock-screener",
7227
7085
  file: "screener-financial-metrics-timerange",
7228
7086
  method: "GET",
7229
- path: "/api/v1/stocks/screener/financial-metrics/timerange",
7230
- tier: "public",
7231
- required_subscription_tier: "free",
7232
- access: "free_and_pro",
7233
- pro_required: false
7087
+ path: "/api/v1/stocks/screener/financial-metrics/timerange"
7234
7088
  },
7235
7089
  {
7236
7090
  skill: "arrays-data-api-stock-screener",
7237
7091
  file: "screener-technical-metrics",
7238
7092
  method: "GET",
7239
- path: "/api/v1/stocks/screener/technical-metrics",
7240
- tier: "public",
7241
- required_subscription_tier: "free",
7242
- access: "free_and_pro",
7243
- pro_required: false
7093
+ path: "/api/v1/stocks/screener/technical-metrics"
7244
7094
  },
7245
7095
  {
7246
7096
  skill: "arrays-data-api-stock-screener",
7247
7097
  file: "screener-technical-metrics-timerange",
7248
7098
  method: "GET",
7249
- path: "/api/v1/stocks/screener/technical-metrics/timerange",
7250
- tier: "public",
7251
- required_subscription_tier: "free",
7252
- access: "free_and_pro",
7253
- pro_required: false
7099
+ path: "/api/v1/stocks/screener/technical-metrics/timerange"
7254
7100
  },
7255
7101
  {
7256
7102
  skill: "arrays-data-api-equity-events",
7257
7103
  file: "sec-earnings-release",
7258
7104
  method: "GET",
7259
- path: "/api/v1/stocks/sec-earnings-release",
7260
- tier: "public",
7261
- required_subscription_tier: "free",
7262
- access: "free_and_pro",
7263
- pro_required: false
7105
+ path: "/api/v1/stocks/sec-earnings-release"
7264
7106
  },
7265
7107
  {
7266
7108
  skill: "arrays-data-api-equity-fundamentals",
7267
7109
  file: "shares-float",
7268
7110
  method: "GET",
7269
- path: "/api/v1/stocks/shares-float",
7270
- tier: "public",
7271
- required_subscription_tier: "free",
7272
- access: "free_and_pro",
7273
- pro_required: false
7111
+ path: "/api/v1/stocks/shares-float"
7274
7112
  },
7275
7113
  {
7276
7114
  skill: "arrays-data-api-equity-events",
7277
7115
  file: "splits",
7278
7116
  method: "GET",
7279
- path: "/api/v1/stocks/splits",
7280
- tier: "public",
7281
- required_subscription_tier: "free",
7282
- access: "free_and_pro",
7283
- pro_required: false
7117
+ path: "/api/v1/stocks/splits"
7284
7118
  },
7285
7119
  {
7286
7120
  skill: "arrays-data-api-crypto-exchange-flow",
7287
7121
  file: "exchange-flows",
7288
7122
  method: "GET",
7289
- path: "/api/v1/crypto/exchange-flows",
7290
- tier: "alternative",
7291
- required_subscription_tier: "pro",
7292
- access: "pro_only",
7293
- pro_required: true
7123
+ path: "/api/v1/crypto/exchange-flows"
7294
7124
  },
7295
7125
  {
7296
7126
  skill: "arrays-data-api-company-crypto-holdings",
7297
7127
  file: "crypto-holdings",
7298
7128
  method: "GET",
7299
- path: "/api/v1/crypto/holdings",
7300
- tier: "alternative",
7301
- required_subscription_tier: "pro",
7302
- access: "pro_only",
7303
- pro_required: true
7129
+ path: "/api/v1/crypto/holdings"
7304
7130
  },
7305
7131
  {
7306
7132
  skill: "arrays-data-api-crypto-metrics-and-screener",
7307
7133
  file: "metrics-inflow-cdd",
7308
7134
  method: "GET",
7309
- path: "/api/v1/crypto/metrics/inflow-cdd",
7310
- tier: "alternative",
7311
- required_subscription_tier: "pro",
7312
- access: "pro_only",
7313
- pro_required: true
7135
+ path: "/api/v1/crypto/metrics/inflow-cdd"
7314
7136
  },
7315
7137
  {
7316
7138
  skill: "arrays-data-api-crypto-metrics-and-screener",
7317
7139
  file: "metrics-leverage-ratio",
7318
7140
  method: "GET",
7319
- path: "/api/v1/crypto/metrics/leverage-ratio",
7320
- tier: "alternative",
7321
- required_subscription_tier: "pro",
7322
- access: "pro_only",
7323
- pro_required: true
7141
+ path: "/api/v1/crypto/metrics/leverage-ratio"
7324
7142
  },
7325
7143
  {
7326
7144
  skill: "arrays-data-api-crypto-metrics-and-screener",
7327
7145
  file: "metrics-miner-to-exchange",
7328
7146
  method: "GET",
7329
- path: "/api/v1/crypto/metrics/miner-to-exchange",
7330
- tier: "alternative",
7331
- required_subscription_tier: "pro",
7332
- access: "pro_only",
7333
- pro_required: true
7147
+ path: "/api/v1/crypto/metrics/miner-to-exchange"
7334
7148
  },
7335
7149
  {
7336
7150
  skill: "arrays-data-api-crypto-metrics-and-screener",
7337
7151
  file: "metrics-mvrv",
7338
7152
  method: "GET",
7339
- path: "/api/v1/crypto/metrics/mvrv",
7340
- tier: "alternative",
7341
- required_subscription_tier: "pro",
7342
- access: "pro_only",
7343
- pro_required: true
7153
+ path: "/api/v1/crypto/metrics/mvrv"
7344
7154
  },
7345
7155
  {
7346
7156
  skill: "arrays-data-api-crypto-metrics-and-screener",
7347
7157
  file: "metrics-nupl",
7348
7158
  method: "GET",
7349
- path: "/api/v1/crypto/metrics/nupl",
7350
- tier: "alternative",
7351
- required_subscription_tier: "pro",
7352
- access: "pro_only",
7353
- pro_required: true
7159
+ path: "/api/v1/crypto/metrics/nupl"
7354
7160
  },
7355
7161
  {
7356
7162
  skill: "arrays-data-api-crypto-metrics-and-screener",
7357
7163
  file: "metrics-puell-multiple",
7358
7164
  method: "GET",
7359
- path: "/api/v1/crypto/metrics/puell-multiple",
7360
- tier: "alternative",
7361
- required_subscription_tier: "pro",
7362
- access: "pro_only",
7363
- pro_required: true
7165
+ path: "/api/v1/crypto/metrics/puell-multiple"
7364
7166
  },
7365
7167
  {
7366
7168
  skill: "arrays-data-api-crypto-metrics-and-screener",
7367
7169
  file: "metrics-realized-price",
7368
7170
  method: "GET",
7369
- path: "/api/v1/crypto/metrics/realized-price",
7370
- tier: "alternative",
7371
- required_subscription_tier: "pro",
7372
- access: "pro_only",
7373
- pro_required: true
7171
+ path: "/api/v1/crypto/metrics/realized-price"
7374
7172
  },
7375
7173
  {
7376
7174
  skill: "arrays-data-api-crypto-metrics-and-screener",
7377
7175
  file: "metrics-sopr",
7378
7176
  method: "GET",
7379
- path: "/api/v1/crypto/metrics/sopr",
7380
- tier: "alternative",
7381
- required_subscription_tier: "pro",
7382
- access: "pro_only",
7383
- pro_required: true
7177
+ path: "/api/v1/crypto/metrics/sopr"
7384
7178
  },
7385
7179
  {
7386
7180
  skill: "arrays-data-api-crypto-metrics-and-screener",
7387
7181
  file: "metrics-ssr",
7388
7182
  method: "GET",
7389
- path: "/api/v1/crypto/metrics/ssr",
7390
- tier: "alternative",
7391
- required_subscription_tier: "pro",
7392
- access: "pro_only",
7393
- pro_required: true
7183
+ path: "/api/v1/crypto/metrics/ssr"
7394
7184
  },
7395
7185
  {
7396
7186
  skill: "arrays-data-api-crypto-metrics-and-screener",
7397
7187
  file: "metrics-whale-ratio",
7398
7188
  method: "GET",
7399
- path: "/api/v1/crypto/metrics/whale-ratio",
7400
- tier: "alternative",
7401
- required_subscription_tier: "pro",
7402
- access: "pro_only",
7403
- pro_required: true
7189
+ path: "/api/v1/crypto/metrics/whale-ratio"
7404
7190
  },
7405
7191
  {
7406
7192
  skill: "arrays-data-api-crypto-metrics-and-screener",
7407
7193
  file: "crypto-supply",
7408
7194
  method: "GET",
7409
- path: "/api/v1/crypto/supply",
7410
- tier: "alternative",
7411
- required_subscription_tier: "pro",
7412
- access: "pro_only",
7413
- pro_required: true
7195
+ path: "/api/v1/crypto/supply"
7414
7196
  },
7415
7197
  {
7416
7198
  skill: "arrays-data-api-crypto-futures-data",
7417
7199
  file: "taker-buy-sell-volume",
7418
7200
  method: "GET",
7419
- path: "/api/v1/crypto/taker-buy-sell-volume",
7420
- tier: "alternative",
7421
- required_subscription_tier: "pro",
7422
- access: "pro_only",
7423
- pro_required: true
7201
+ path: "/api/v1/crypto/taker-buy-sell-volume"
7424
7202
  },
7425
7203
  {
7426
7204
  skill: "arrays-data-api-crypto-metrics-and-screener",
7427
7205
  file: "unlock-events",
7428
7206
  method: "GET",
7429
- path: "/api/v1/crypto/unlock-events",
7430
- tier: "alternative",
7431
- required_subscription_tier: "pro",
7432
- access: "pro_only",
7433
- pro_required: true
7207
+ path: "/api/v1/crypto/unlock-events"
7434
7208
  },
7435
7209
  {
7436
7210
  skill: "arrays-data-api-etf-fundamentals",
7437
7211
  file: "flow",
7438
7212
  method: "GET",
7439
- path: "/api/v1/etf/flow",
7440
- tier: "alternative",
7441
- required_subscription_tier: "pro",
7442
- access: "pro_only",
7443
- pro_required: true
7213
+ path: "/api/v1/etf/flow"
7444
7214
  },
7445
7215
  {
7446
7216
  skill: "arrays-data-api-options",
7447
7217
  file: "contracts",
7448
7218
  method: "GET",
7449
- path: "/api/v1/options/contracts",
7450
- tier: "public",
7451
- required_subscription_tier: "free",
7452
- access: "free_and_pro",
7453
- pro_required: false
7219
+ path: "/api/v1/options/contracts"
7454
7220
  },
7455
7221
  {
7456
7222
  skill: "arrays-data-api-options",
7457
7223
  file: "kline",
7458
7224
  method: "GET",
7459
- path: "/api/v1/options/kline",
7460
- tier: "public",
7461
- required_subscription_tier: "free",
7462
- access: "free_and_pro",
7463
- pro_required: false
7225
+ path: "/api/v1/options/kline"
7464
7226
  },
7465
7227
  {
7466
7228
  skill: "arrays-data-api-options",
7467
7229
  file: "greeks",
7468
7230
  method: "GET",
7469
- path: "/api/v1/options/greeks",
7470
- tier: "public",
7471
- required_subscription_tier: "free",
7472
- access: "free_and_pro",
7473
- pro_required: false
7231
+ path: "/api/v1/options/greeks"
7474
7232
  },
7475
7233
  {
7476
7234
  skill: "arrays-data-api-options",
7477
7235
  file: "chain",
7478
7236
  method: "GET",
7479
- path: "/api/v1/options/chain",
7480
- tier: "public",
7481
- required_subscription_tier: "free",
7482
- access: "free_and_pro",
7483
- pro_required: false
7237
+ path: "/api/v1/options/chain"
7484
7238
  },
7485
7239
  {
7486
7240
  skill: "arrays-data-api-equity-fundamentals",
7487
7241
  file: "company-executives",
7488
7242
  method: "GET",
7489
- path: "/api/v1/stocks/company/executives",
7490
- tier: "alternative",
7491
- required_subscription_tier: "pro",
7492
- access: "pro_only",
7493
- pro_required: true
7243
+ path: "/api/v1/stocks/company/executives"
7494
7244
  },
7495
7245
  {
7496
7246
  skill: "arrays-data-api-equity-estimates-and-targets",
7497
7247
  file: "company-price-target-consensus",
7498
7248
  method: "GET",
7499
- path: "/api/v1/stocks/company/price-target-consensus",
7500
- tier: "alternative",
7501
- required_subscription_tier: "pro",
7502
- access: "pro_only",
7503
- pro_required: true
7249
+ path: "/api/v1/stocks/company/price-target-consensus"
7504
7250
  },
7505
7251
  {
7506
7252
  skill: "arrays-data-api-equity-estimates-and-targets",
7507
7253
  file: "company-price-target-news",
7508
7254
  method: "GET",
7509
- path: "/api/v1/stocks/company/price-target-news",
7510
- tier: "alternative",
7511
- required_subscription_tier: "pro",
7512
- access: "pro_only",
7513
- pro_required: true
7255
+ path: "/api/v1/stocks/company/price-target-news"
7514
7256
  },
7515
7257
  {
7516
7258
  skill: "arrays-data-api-equity-estimates-and-targets",
7517
7259
  file: "company-price-target-summary",
7518
7260
  method: "GET",
7519
- path: "/api/v1/stocks/company/price-target-summary",
7520
- tier: "alternative",
7521
- required_subscription_tier: "pro",
7522
- access: "pro_only",
7523
- pro_required: true
7261
+ path: "/api/v1/stocks/company/price-target-summary"
7524
7262
  },
7525
7263
  {
7526
7264
  skill: "arrays-data-api-equity-ownership-and-flow",
7527
7265
  file: "congress-recent-trades",
7528
7266
  method: "GET",
7529
- path: "/api/v1/stocks/congress/recent-trades",
7530
- tier: "alternative",
7531
- required_subscription_tier: "pro",
7532
- access: "pro_only",
7533
- pro_required: true
7267
+ path: "/api/v1/stocks/congress/recent-trades"
7534
7268
  },
7535
7269
  {
7536
7270
  skill: "arrays-data-api-stock-metrics",
7537
7271
  file: "darkpool",
7538
7272
  method: "GET",
7539
- path: "/api/v1/stocks/darkpool",
7540
- tier: "alternative",
7541
- required_subscription_tier: "pro",
7542
- access: "pro_only",
7543
- pro_required: true
7273
+ path: "/api/v1/stocks/darkpool"
7544
7274
  },
7545
7275
  {
7546
7276
  skill: "arrays-data-api-equity-estimates-and-targets",
7547
7277
  file: "estimates-guidance",
7548
7278
  method: "GET",
7549
- path: "/api/v1/stocks/estimates-guidance",
7550
- tier: "alternative",
7551
- required_subscription_tier: "pro",
7552
- access: "pro_only",
7553
- pro_required: true
7279
+ path: "/api/v1/stocks/estimates-guidance"
7554
7280
  },
7555
7281
  {
7556
7282
  skill: "arrays-data-api-equity-ownership-and-flow",
7557
7283
  file: "insider-transactions",
7558
7284
  method: "GET",
7559
- path: "/api/v1/stocks/insider/transactions",
7560
- tier: "alternative",
7561
- required_subscription_tier: "pro",
7562
- access: "pro_only",
7563
- pro_required: true
7285
+ path: "/api/v1/stocks/insider/transactions"
7564
7286
  },
7565
7287
  {
7566
7288
  skill: "arrays-data-api-equity-ownership-and-flow",
7567
7289
  file: "institution-holder",
7568
7290
  method: "GET",
7569
- path: "/api/v1/stocks/institution-holder",
7570
- tier: "alternative",
7571
- required_subscription_tier: "pro",
7572
- access: "pro_only",
7573
- pro_required: true
7291
+ path: "/api/v1/stocks/institution-holder"
7574
7292
  },
7575
7293
  {
7576
7294
  skill: "arrays-data-api-polymarket",
7577
7295
  file: "activity",
7578
7296
  method: "GET",
7579
- path: "polymarket:/activity",
7580
- tier: "alternative",
7581
- required_subscription_tier: "pro",
7582
- access: "pro_only",
7583
- pro_required: true
7297
+ path: "polymarket:/activity"
7584
7298
  },
7585
7299
  {
7586
7300
  skill: "arrays-data-api-polymarket",
7587
7301
  file: "book",
7588
7302
  method: "GET",
7589
- path: "polymarket:/book",
7590
- tier: "alternative",
7591
- required_subscription_tier: "pro",
7592
- access: "pro_only",
7593
- pro_required: true
7303
+ path: "polymarket:/book"
7594
7304
  },
7595
7305
  {
7596
7306
  skill: "arrays-data-api-polymarket",
7597
7307
  file: "closed-positions",
7598
7308
  method: "GET",
7599
- path: "polymarket:/closed-positions",
7600
- tier: "alternative",
7601
- required_subscription_tier: "pro",
7602
- access: "pro_only",
7603
- pro_required: true
7309
+ path: "polymarket:/closed-positions"
7604
7310
  },
7605
7311
  {
7606
7312
  skill: "arrays-data-api-polymarket",
7607
7313
  file: "events",
7608
7314
  method: "GET",
7609
- path: "polymarket:/events",
7610
- tier: "alternative",
7611
- required_subscription_tier: "pro",
7612
- access: "pro_only",
7613
- pro_required: true
7315
+ path: "polymarket:/events"
7614
7316
  },
7615
7317
  {
7616
7318
  skill: "arrays-data-api-polymarket",
7617
7319
  file: "holders",
7618
7320
  method: "GET",
7619
- path: "polymarket:/holders",
7620
- tier: "alternative",
7621
- required_subscription_tier: "pro",
7622
- access: "pro_only",
7623
- pro_required: true
7321
+ path: "polymarket:/holders"
7624
7322
  },
7625
7323
  {
7626
7324
  skill: "arrays-data-api-polymarket",
7627
7325
  file: "markets",
7628
7326
  method: "GET",
7629
- path: "polymarket:/markets",
7630
- tier: "alternative",
7631
- required_subscription_tier: "pro",
7632
- access: "pro_only",
7633
- pro_required: true
7327
+ path: "polymarket:/markets"
7634
7328
  },
7635
7329
  {
7636
7330
  skill: "arrays-data-api-polymarket",
7637
7331
  file: "midpoint",
7638
7332
  method: "GET",
7639
- path: "polymarket:/midpoint",
7640
- tier: "alternative",
7641
- required_subscription_tier: "pro",
7642
- access: "pro_only",
7643
- pro_required: true
7333
+ path: "polymarket:/midpoint"
7644
7334
  },
7645
7335
  {
7646
7336
  skill: "arrays-data-api-polymarket",
7647
7337
  file: "oi",
7648
7338
  method: "GET",
7649
- path: "polymarket:/oi",
7650
- tier: "alternative",
7651
- required_subscription_tier: "pro",
7652
- access: "pro_only",
7653
- pro_required: true
7339
+ path: "polymarket:/oi"
7654
7340
  },
7655
7341
  {
7656
7342
  skill: "arrays-data-api-polymarket",
7657
7343
  file: "positions",
7658
7344
  method: "GET",
7659
- path: "polymarket:/positions",
7660
- tier: "alternative",
7661
- required_subscription_tier: "pro",
7662
- access: "pro_only",
7663
- pro_required: true
7345
+ path: "polymarket:/positions"
7664
7346
  },
7665
7347
  {
7666
7348
  skill: "arrays-data-api-polymarket",
7667
7349
  file: "price",
7668
7350
  method: "GET",
7669
- path: "polymarket:/price",
7670
- tier: "alternative",
7671
- required_subscription_tier: "pro",
7672
- access: "pro_only",
7673
- pro_required: true
7351
+ path: "polymarket:/price"
7674
7352
  },
7675
7353
  {
7676
7354
  skill: "arrays-data-api-polymarket",
7677
7355
  file: "prices-history",
7678
7356
  method: "GET",
7679
- path: "polymarket:/prices-history",
7680
- tier: "alternative",
7681
- required_subscription_tier: "pro",
7682
- access: "pro_only",
7683
- pro_required: true
7357
+ path: "polymarket:/prices-history"
7684
7358
  },
7685
7359
  {
7686
7360
  skill: "arrays-data-api-polymarket",
7687
7361
  file: "public-search",
7688
7362
  method: "GET",
7689
- path: "polymarket:/public-search",
7690
- tier: "alternative",
7691
- required_subscription_tier: "pro",
7692
- access: "pro_only",
7693
- pro_required: true
7363
+ path: "polymarket:/public-search"
7694
7364
  },
7695
7365
  {
7696
7366
  skill: "arrays-data-api-polymarket",
7697
7367
  file: "series",
7698
7368
  method: "GET",
7699
- path: "polymarket:/series",
7700
- tier: "alternative",
7701
- required_subscription_tier: "pro",
7702
- access: "pro_only",
7703
- pro_required: true
7369
+ path: "polymarket:/series"
7704
7370
  },
7705
7371
  {
7706
7372
  skill: "arrays-data-api-polymarket",
7707
7373
  file: "sports",
7708
7374
  method: "GET",
7709
- path: "polymarket:/sports",
7710
- tier: "alternative",
7711
- required_subscription_tier: "pro",
7712
- access: "pro_only",
7713
- pro_required: true
7375
+ path: "polymarket:/sports"
7714
7376
  },
7715
7377
  {
7716
7378
  skill: "arrays-data-api-polymarket",
7717
7379
  file: "spread",
7718
7380
  method: "GET",
7719
- path: "polymarket:/spread",
7720
- tier: "alternative",
7721
- required_subscription_tier: "pro",
7722
- access: "pro_only",
7723
- pro_required: true
7381
+ path: "polymarket:/spread"
7724
7382
  },
7725
7383
  {
7726
7384
  skill: "arrays-data-api-polymarket",
7727
7385
  file: "tags",
7728
7386
  method: "GET",
7729
- path: "polymarket:/tags",
7730
- tier: "alternative",
7731
- required_subscription_tier: "pro",
7732
- access: "pro_only",
7733
- pro_required: true
7387
+ path: "polymarket:/tags"
7734
7388
  },
7735
7389
  {
7736
7390
  skill: "arrays-data-api-polymarket",
7737
7391
  file: "trades",
7738
7392
  method: "GET",
7739
- path: "polymarket:/trades",
7740
- tier: "alternative",
7741
- required_subscription_tier: "pro",
7742
- access: "pro_only",
7743
- pro_required: true
7393
+ path: "polymarket:/trades"
7744
7394
  },
7745
7395
  {
7746
7396
  skill: "arrays-data-api-polymarket",
7747
7397
  file: "value",
7748
7398
  method: "GET",
7749
- path: "polymarket:/value",
7750
- tier: "alternative",
7751
- required_subscription_tier: "pro",
7752
- access: "pro_only",
7753
- pro_required: true
7399
+ path: "polymarket:/value"
7754
7400
  },
7755
7401
  {
7756
7402
  skill: "arrays-data-api-equity-events",
7757
7403
  file: "earnings-transcript",
7758
7404
  method: "GET",
7759
- path: "/api/v1/stocks/earnings-transcript",
7760
- tier: "unstructured",
7761
- required_subscription_tier: "pro",
7762
- access: "pro_only",
7763
- pro_required: true
7405
+ path: "/api/v1/stocks/earnings-transcript"
7764
7406
  },
7765
7407
  {
7766
7408
  skill: "arrays-data-api-news",
7767
7409
  file: "market-news",
7768
7410
  method: "GET",
7769
- path: "/api/v1/stocks/market-news",
7770
- tier: "unstructured",
7771
- required_subscription_tier: "pro",
7772
- access: "pro_only",
7773
- pro_required: true
7411
+ path: "/api/v1/stocks/market-news"
7774
7412
  },
7775
7413
  {
7776
- // TODO(audit): verify tier — auto-defaulted to pro
7777
7414
  skill: "arrays-data-api-social-feeds",
7778
7415
  file: "x-by-handle",
7779
7416
  method: "GET",
7780
- path: "/api/v1/social-feeds/x/by-handle",
7781
- tier: "alternative",
7782
- required_subscription_tier: "pro",
7783
- access: "pro_only",
7784
- pro_required: true
7417
+ path: "/api/v1/social-feeds/x/by-handle"
7785
7418
  },
7786
7419
  {
7787
- // TODO(audit): verify tier — auto-defaulted to pro
7788
7420
  skill: "arrays-data-api-social-feeds",
7789
7421
  file: "x-by-url",
7790
7422
  method: "GET",
7791
- path: "/api/v1/social-feeds/x/by-url",
7792
- tier: "alternative",
7793
- required_subscription_tier: "pro",
7794
- access: "pro_only",
7795
- pro_required: true
7423
+ path: "/api/v1/social-feeds/x/by-url"
7796
7424
  },
7797
7425
  {
7798
- // TODO(audit): verify tier — auto-defaulted to pro
7799
7426
  skill: "arrays-data-api-social-feeds",
7800
7427
  file: "x-entities-handle",
7801
7428
  method: "GET",
7802
- path: "/api/v1/social-feeds/x/entities/handle/{twitter_handle}",
7803
- tier: "alternative",
7804
- required_subscription_tier: "pro",
7805
- access: "pro_only",
7806
- pro_required: true
7429
+ path: "/api/v1/social-feeds/x/entities/handle/{twitter_handle}"
7807
7430
  },
7808
7431
  {
7809
- // TODO(audit): verify tier — auto-defaulted to pro
7810
7432
  skill: "arrays-data-api-social-feeds",
7811
7433
  file: "x-entities-handles",
7812
7434
  method: "GET",
7813
- path: "/api/v1/social-feeds/x/entities/handles",
7814
- tier: "alternative",
7815
- required_subscription_tier: "pro",
7816
- access: "pro_only",
7817
- pro_required: true
7435
+ path: "/api/v1/social-feeds/x/entities/handles"
7818
7436
  },
7819
7437
  {
7820
7438
  skill: "arrays-data-api-equity-fundamentals",
7821
7439
  file: "company-detail-non-us",
7822
7440
  method: "GET",
7823
- path: "/api/v1/stocks/non-us/company/detail",
7824
- tier: "public",
7825
- required_subscription_tier: "free",
7826
- access: "free_and_pro",
7827
- pro_required: false
7441
+ path: "/api/v1/stocks/non-us/company/detail"
7828
7442
  },
7829
7443
  {
7830
7444
  skill: "arrays-data-api-social-feeds",
7831
7445
  file: "x-search",
7832
7446
  method: "GET",
7833
- path: "/api/v1/social-feeds/x/search",
7834
- tier: "alternative",
7835
- required_subscription_tier: "pro",
7836
- access: "pro_only",
7837
- pro_required: true
7447
+ path: "/api/v1/social-feeds/x/search"
7838
7448
  },
7839
7449
  {
7840
7450
  skill: "arrays-data-api-spot-market-price-and-volume",
7841
7451
  file: "stocks-non-us-kline",
7842
7452
  method: "GET",
7843
- path: "/api/v1/stocks/non-us/kline",
7844
- tier: "public",
7845
- required_subscription_tier: "free",
7846
- access: "free_and_pro",
7847
- pro_required: false
7453
+ path: "/api/v1/stocks/non-us/kline"
7848
7454
  },
7849
7455
  {
7850
7456
  skill: "arrays-data-api-semiconductor-price",
7851
7457
  file: "dram-spot-price",
7852
7458
  method: "GET",
7853
- path: "/api/v1/other/semiconductor/dram-spot-price",
7854
- tier: "alternative",
7855
- required_subscription_tier: "pro",
7856
- access: "pro_only",
7857
- pro_required: true
7459
+ path: "/api/v1/other/semiconductor/dram-spot-price"
7858
7460
  },
7859
7461
  {
7860
7462
  skill: "arrays-data-api-semiconductor-price",
7861
7463
  file: "dram-contract-price",
7862
7464
  method: "GET",
7863
- path: "/api/v1/other/semiconductor/dram-contract-price",
7864
- tier: "alternative",
7865
- required_subscription_tier: "pro",
7866
- access: "pro_only",
7867
- pro_required: true
7465
+ path: "/api/v1/other/semiconductor/dram-contract-price"
7868
7466
  },
7869
7467
  {
7870
7468
  skill: "arrays-data-api-semiconductor-price",
7871
7469
  file: "nand-flash-spot-price",
7872
7470
  method: "GET",
7873
- path: "/api/v1/other/semiconductor/nand-flash-spot-price",
7874
- tier: "alternative",
7875
- required_subscription_tier: "pro",
7876
- access: "pro_only",
7877
- pro_required: true
7471
+ path: "/api/v1/other/semiconductor/nand-flash-spot-price"
7878
7472
  },
7879
7473
  {
7880
7474
  skill: "arrays-data-api-semiconductor-price",
7881
7475
  file: "nand-flash-contract-price",
7882
7476
  method: "GET",
7883
- path: "/api/v1/other/semiconductor/nand-flash-contract-price",
7884
- tier: "alternative",
7885
- required_subscription_tier: "pro",
7886
- access: "pro_only",
7887
- pro_required: true
7477
+ path: "/api/v1/other/semiconductor/nand-flash-contract-price"
7888
7478
  },
7889
7479
  {
7890
7480
  skill: "arrays-data-api-semiconductor-price",
7891
7481
  file: "memory-card-price",
7892
7482
  method: "GET",
7893
- path: "/api/v1/other/semiconductor/memory-card-price",
7894
- tier: "alternative",
7895
- required_subscription_tier: "pro",
7896
- access: "pro_only",
7897
- pro_required: true
7483
+ path: "/api/v1/other/semiconductor/memory-card-price"
7898
7484
  },
7899
7485
  {
7900
7486
  skill: "arrays-data-api-semiconductor-price",
7901
7487
  file: "dxi-index",
7902
7488
  method: "GET",
7903
- path: "/api/v1/other/semiconductor/dxi-index",
7904
- tier: "alternative",
7905
- required_subscription_tier: "pro",
7906
- access: "pro_only",
7907
- pro_required: true
7489
+ path: "/api/v1/other/semiconductor/dxi-index"
7490
+ },
7491
+ {
7492
+ skill: "arrays-data-api-equity-ownership-and-flow",
7493
+ file: "short-interest",
7494
+ method: "GET",
7495
+ path: "/api/v1/stocks/short-interest"
7496
+ },
7497
+ {
7498
+ skill: "arrays-data-api-social-feeds",
7499
+ file: "x-handles",
7500
+ method: "POST",
7501
+ path: "/api/v1/social-feeds/x/handles"
7908
7502
  }
7909
7503
  ];
7910
7504
  function getSkillEndpointMetadata(skill, file) {
@@ -7979,24 +7573,9 @@ var DataSkillsResource = class {
7979
7573
  }
7980
7574
  };
7981
7575
  function metadataSummaryForSkill(skill) {
7982
- const endpointMetadata = listSkillEndpointMetadata(skill);
7983
- if (endpointMetadata.length === 0) {
7984
- return {};
7985
- }
7986
- const counts = {};
7987
- let proCount = 0;
7988
- for (const endpoint of endpointMetadata) {
7989
- counts[endpoint.tier] = (counts[endpoint.tier] ?? 0) + 1;
7990
- if (endpoint.pro_required) proCount += 1;
7991
- }
7992
- return {
7993
- endpoint_tier_counts: counts,
7994
- metadata: {
7995
- endpoint_count: endpointMetadata.length,
7996
- endpoint_tier_counts: counts,
7997
- pro_count: proCount
7998
- }
7999
- };
7576
+ const endpointCount = listSkillEndpointMetadata(skill).length;
7577
+ if (endpointCount === 0) return {};
7578
+ return { metadata: { endpoint_count: endpointCount } };
8000
7579
  }
8001
7580
 
8002
7581
  // src/resources/playbookSkills.ts
@@ -8880,6 +8459,319 @@ var CreditsResource = class {
8880
8459
  }
8881
8460
  };
8882
8461
 
8462
+ // src/resources/markets.ts
8463
+ var FISCAL_QUARTERS = [
8464
+ "Q1",
8465
+ "Q2",
8466
+ "Q3",
8467
+ "Q4"
8468
+ ];
8469
+ var EARNINGS_EVENTS = [
8470
+ "latest-completed",
8471
+ "next-confirmed"
8472
+ ];
8473
+ var NARRATIVE_QUERY = `
8474
+ query ToolkitCompanyNarrative($ticker: String!) {
8475
+ market {
8476
+ entity(input: { ticker: $ticker, kind: STOCK }) {
8477
+ ticker
8478
+ companyInsight {
8479
+ asOf
8480
+ generatedAtMs
8481
+ narrative
8482
+ peers
8483
+ }
8484
+ companyInsightHistory {
8485
+ snapshots {
8486
+ asOf
8487
+ generatedAtMs
8488
+ narrative
8489
+ }
8490
+ changeLog {
8491
+ asOf
8492
+ generatedAtMs
8493
+ narrativeChangeLog
8494
+ }
8495
+ }
8496
+ }
8497
+ }
8498
+ }
8499
+ `.trim();
8500
+ var EARNINGS_CATALOG_QUERY = `
8501
+ query ToolkitCompanyEarningsCatalog($ticker: String!) {
8502
+ market {
8503
+ entity(input: { ticker: $ticker, kind: STOCK }) {
8504
+ ticker
8505
+ earningsPeriods {
8506
+ unresolvedEventCount
8507
+ defaultPeriod {
8508
+ fiscalYear
8509
+ fiscalQuarter
8510
+ label
8511
+ fiscalDateEnding
8512
+ earningsDate
8513
+ session
8514
+ status
8515
+ isDefault
8516
+ }
8517
+ periods {
8518
+ fiscalYear
8519
+ fiscalQuarter
8520
+ label
8521
+ fiscalDateEnding
8522
+ earningsDate
8523
+ session
8524
+ status
8525
+ isDefault
8526
+ }
8527
+ }
8528
+ }
8529
+ }
8530
+ }
8531
+ `.trim();
8532
+ var EARNINGS_QUERY = `
8533
+ query ToolkitCompanyEarnings($ticker: String!, $input: CompanyEarningsInput) {
8534
+ market {
8535
+ entity(input: { ticker: $ticker, kind: STOCK }) {
8536
+ ticker
8537
+ earnings(input: $input) {
8538
+ period {
8539
+ fiscalYear
8540
+ fiscalQuarter
8541
+ label
8542
+ fiscalDateEnding
8543
+ earningsDate
8544
+ session
8545
+ status
8546
+ isDefault
8547
+ }
8548
+ preEarningsAnalysis {
8549
+ status
8550
+ asOf
8551
+ summary
8552
+ whatWouldChangeView
8553
+ mainQuestion
8554
+ investorFocus
8555
+ consensusAndGuidance
8556
+ stockSetup
8557
+ eventRisk
8558
+ whatWouldDriveUpside
8559
+ bullCase
8560
+ baseCase
8561
+ bearCase
8562
+ keyAsymmetry
8563
+ consensusN
8564
+ consensusObservedAt
8565
+ }
8566
+ earningsRelease {
8567
+ status
8568
+ releaseDate
8569
+ url
8570
+ }
8571
+ earningsTranscript {
8572
+ status
8573
+ date
8574
+ publishedAtMs
8575
+ sections {
8576
+ name
8577
+ entries {
8578
+ speaker
8579
+ title
8580
+ content
8581
+ }
8582
+ }
8583
+ }
8584
+ postEarningsSummary {
8585
+ status
8586
+ asOf
8587
+ reportedCurrency
8588
+ evidenceState
8589
+ openingQuote
8590
+ openingQuoteSpeaker
8591
+ openingQuoteTitle
8592
+ openingQuoteNote
8593
+ buriedSignals
8594
+ whatYouShouldKnow
8595
+ consensusN
8596
+ consensusObservedAt
8597
+ }
8598
+ }
8599
+ }
8600
+ }
8601
+ }
8602
+ `.trim();
8603
+ function graphQLErrorMessage2(errors) {
8604
+ const messages = errors.map(
8605
+ (error) => typeof error.message === "string" && error.message ? error.message : void 0
8606
+ ).filter((message) => Boolean(message));
8607
+ return messages.length > 0 ? messages.join("; ") : "GraphQL request failed";
8608
+ }
8609
+ function normalizedTicker(ticker) {
8610
+ const normalized = ticker.trim().toUpperCase();
8611
+ if (!normalized) {
8612
+ throw new AlvaError("INVALID_ARGUMENT", "ticker is required", 400);
8613
+ }
8614
+ return normalized;
8615
+ }
8616
+ var MarketsResource = class {
8617
+ constructor(client) {
8618
+ this.client = client;
8619
+ }
8620
+ client;
8621
+ async narrative(ticker) {
8622
+ this.client._requireAuth();
8623
+ const requestedTicker = normalizedTicker(ticker);
8624
+ const data = await this.graphql(NARRATIVE_QUERY, {
8625
+ ticker: requestedTicker
8626
+ });
8627
+ const entity = data.market?.entity;
8628
+ if (!entity) {
8629
+ throw this.notFound(requestedTicker);
8630
+ }
8631
+ return {
8632
+ ticker: entity.ticker,
8633
+ current: entity.companyInsight,
8634
+ history: entity.companyInsightHistory
8635
+ };
8636
+ }
8637
+ async earningsPeriods(ticker) {
8638
+ this.client._requireAuth();
8639
+ const requestedTicker = normalizedTicker(ticker);
8640
+ const data = await this.graphql(
8641
+ EARNINGS_CATALOG_QUERY,
8642
+ { ticker: requestedTicker }
8643
+ );
8644
+ const entity = data.market?.entity;
8645
+ if (!entity) {
8646
+ throw this.notFound(requestedTicker);
8647
+ }
8648
+ if (!entity.earningsPeriods) {
8649
+ throw new AlvaError(
8650
+ "MARKETS_EARNINGS_NOT_COVERED",
8651
+ `No earnings periods are available for ${entity.ticker}`,
8652
+ 404,
8653
+ { ticker: entity.ticker }
8654
+ );
8655
+ }
8656
+ return entity.earningsPeriods;
8657
+ }
8658
+ async earnings(params) {
8659
+ this.client._requireAuth();
8660
+ const ticker = normalizedTicker(params.ticker);
8661
+ const requestedEvent = params.event;
8662
+ const requestedFiscalYear = params.fiscalYear;
8663
+ const requestedFiscalQuarter = params.fiscalQuarter;
8664
+ const hasExplicitPeriod = requestedFiscalYear !== void 0 || requestedFiscalQuarter !== void 0;
8665
+ if (requestedEvent !== void 0 && hasExplicitPeriod) {
8666
+ throw new AlvaError(
8667
+ "INVALID_ARGUMENT",
8668
+ "event cannot be combined with fiscalYear or fiscalQuarter",
8669
+ 400
8670
+ );
8671
+ }
8672
+ if (requestedFiscalYear === void 0 !== (requestedFiscalQuarter === void 0)) {
8673
+ throw new AlvaError(
8674
+ "INVALID_ARGUMENT",
8675
+ "fiscalYear and fiscalQuarter must be provided together",
8676
+ 400
8677
+ );
8678
+ }
8679
+ if (requestedEvent !== void 0 && !EARNINGS_EVENTS.includes(requestedEvent)) {
8680
+ throw new AlvaError(
8681
+ "INVALID_ARGUMENT",
8682
+ `Unknown earnings event selector: ${requestedEvent}`,
8683
+ 400
8684
+ );
8685
+ }
8686
+ if (requestedFiscalYear !== void 0 && (!Number.isInteger(requestedFiscalYear) || requestedFiscalYear < 1900 || requestedFiscalYear > 9999)) {
8687
+ throw new AlvaError(
8688
+ "INVALID_ARGUMENT",
8689
+ "fiscalYear must be an integer between 1900 and 9999",
8690
+ 400
8691
+ );
8692
+ }
8693
+ if (requestedFiscalQuarter !== void 0 && !FISCAL_QUARTERS.includes(requestedFiscalQuarter)) {
8694
+ throw new AlvaError(
8695
+ "INVALID_ARGUMENT",
8696
+ "fiscalQuarter must be Q1, Q2, Q3, or Q4",
8697
+ 400
8698
+ );
8699
+ }
8700
+ let fiscalYear;
8701
+ let fiscalQuarter;
8702
+ if (requestedFiscalYear !== void 0 && requestedFiscalQuarter !== void 0) {
8703
+ fiscalYear = requestedFiscalYear;
8704
+ fiscalQuarter = requestedFiscalQuarter;
8705
+ } else {
8706
+ const event = requestedEvent ?? "latest-completed";
8707
+ const catalog = await this.earningsPeriods(ticker);
8708
+ const period = this.selectPeriod(catalog, event, ticker);
8709
+ fiscalYear = period.fiscalYear;
8710
+ fiscalQuarter = period.fiscalQuarter;
8711
+ }
8712
+ const data = await this.graphql(EARNINGS_QUERY, {
8713
+ ticker,
8714
+ input: { fiscalYear, fiscalQuarter }
8715
+ });
8716
+ const entity = data.market?.entity;
8717
+ if (!entity) {
8718
+ throw this.notFound(ticker);
8719
+ }
8720
+ if (!entity.earnings) {
8721
+ throw new AlvaError(
8722
+ "MARKETS_EARNINGS_NOT_COVERED",
8723
+ `No earnings content is available for ${entity.ticker} FY${fiscalYear} ${fiscalQuarter}`,
8724
+ 404,
8725
+ { ticker: entity.ticker, fiscalYear, fiscalQuarter }
8726
+ );
8727
+ }
8728
+ return { ticker: entity.ticker, ...entity.earnings };
8729
+ }
8730
+ selectPeriod(catalog, event, ticker) {
8731
+ if (event === "latest-completed") {
8732
+ if (catalog.defaultPeriod) return catalog.defaultPeriod;
8733
+ } else {
8734
+ const upcoming = catalog.periods.filter((period) => period.status === "UPCOMING").sort((a, b) => a.earningsDate.localeCompare(b.earningsDate));
8735
+ if (upcoming.length > 0) return upcoming[0];
8736
+ }
8737
+ throw new AlvaError(
8738
+ "MARKETS_EARNINGS_EVENT_NOT_FOUND",
8739
+ `No ${event} earnings event is available for ${ticker}`,
8740
+ 404,
8741
+ { ticker, event }
8742
+ );
8743
+ }
8744
+ notFound(ticker) {
8745
+ return new AlvaError(
8746
+ "MARKETS_ENTITY_NOT_FOUND",
8747
+ `No stock entity was found for ${ticker}`,
8748
+ 404,
8749
+ { ticker }
8750
+ );
8751
+ }
8752
+ async graphql(query, variables) {
8753
+ const response = await this.client._request("POST", "/query", {
8754
+ body: { query, variables }
8755
+ });
8756
+ if (response.errors && response.errors.length > 0) {
8757
+ throw new AlvaError(
8758
+ "GRAPHQL_ERROR",
8759
+ graphQLErrorMessage2(response.errors),
8760
+ 400,
8761
+ { errors: response.errors }
8762
+ );
8763
+ }
8764
+ if (!response.data) {
8765
+ throw new AlvaError(
8766
+ "GRAPHQL_EMPTY_RESPONSE",
8767
+ "GraphQL response did not include data",
8768
+ 502
8769
+ );
8770
+ }
8771
+ return response.data;
8772
+ }
8773
+ };
8774
+
8883
8775
  // src/client.ts
8884
8776
  var DEFAULT_BASE_URL = "https://api-llm.prd.alva.ai";
8885
8777
  var DEFAULT_ARRAYS_BASE_URL = "https://data-tools.prd.space.id";
@@ -8987,6 +8879,7 @@ var AlvaClient = class {
8987
8879
  _feedback;
8988
8880
  _functions;
8989
8881
  _credits;
8882
+ _markets;
8990
8883
  constructor(config) {
8991
8884
  this.baseUrl = config.baseUrl ?? DEFAULT_BASE_URL;
8992
8885
  this.arraysBaseUrl = config.arraysBaseUrl ?? DEFAULT_ARRAYS_BASE_URL;
@@ -9081,6 +8974,9 @@ var AlvaClient = class {
9081
8974
  get credits() {
9082
8975
  return this._credits ??= new CreditsResource(this);
9083
8976
  }
8977
+ get markets() {
8978
+ return this._markets ??= new MarketsResource(this);
8979
+ }
9084
8980
  _requireAuth() {
9085
8981
  if (!this.pbsvToken && !this.viewer_token && !this.apiKey) {
9086
8982
  throw new AlvaError(
@@ -9541,7 +9437,19 @@ var COMMAND_DEFINITIONS = [
9541
9437
  "description",
9542
9438
  "changelog",
9543
9439
  "agent-type"
9544
- ]
9440
+ ],
9441
+ booleans: ["skip-auto-trigger"]
9442
+ }),
9443
+ command("automation update", {
9444
+ values: [
9445
+ "id",
9446
+ "version",
9447
+ "cronjob-id",
9448
+ "description",
9449
+ "changelog",
9450
+ "agent-type"
9451
+ ],
9452
+ booleans: ["trigger"]
9545
9453
  }),
9546
9454
  command("automation stop", { values: ["id"] }),
9547
9455
  command("automation resume", { values: ["id"] }),
@@ -9564,7 +9472,11 @@ var COMMAND_DEFINITIONS = [
9564
9472
  }),
9565
9473
  command("playbooks list", {
9566
9474
  values: ["owner", "limit", "cursor"],
9567
- booleans: ["json"]
9475
+ booleans: ["json", "all"]
9476
+ }),
9477
+ command("playbooks mine", {
9478
+ values: ["filter", "limit", "cursor"],
9479
+ booleans: ["json", "all"]
9568
9480
  }),
9569
9481
  command("functions allowance"),
9570
9482
  command("functions allowance get", { values: ["playbook-id"] }),
@@ -9600,7 +9512,8 @@ var COMMAND_DEFINITIONS = [
9600
9512
  "description",
9601
9513
  "changelog",
9602
9514
  "agent-type"
9603
- ]
9515
+ ],
9516
+ booleans: ["skip-auto-trigger"]
9604
9517
  }),
9605
9518
  command("release playbook-draft", {
9606
9519
  values: [
@@ -9773,6 +9686,10 @@ var COMMAND_DEFINITIONS = [
9773
9686
  command("portfolio activities", {
9774
9687
  values: ["account-id", "limit", "page-token"]
9775
9688
  }),
9689
+ command("markets narrative", { values: ["ticker"] }),
9690
+ command("markets earnings", {
9691
+ values: ["ticker", "event", "fiscal-year", "fiscal-quarter"]
9692
+ }),
9776
9693
  command("trading accounts"),
9777
9694
  command("trading portfolio", { values: ["account-id"] }),
9778
9695
  command("trading orders", {
@@ -10419,35 +10336,13 @@ async function handleAuthLoginNoBrowser(args, deps) {
10419
10336
  }
10420
10337
 
10421
10338
  // src/cli/dataSkillsFormat.ts
10422
- var TIER_ORDER = [
10423
- "public",
10424
- "alternative",
10425
- "unstructured"
10426
- ];
10427
- function formatTierCounts(counts) {
10428
- if (!counts) return "";
10429
- const parts = [];
10430
- for (const tier of TIER_ORDER) {
10431
- const n = counts[tier];
10432
- if (n) parts.push(`${tier}=${n}`);
10433
- }
10434
- return parts.join(" ");
10435
- }
10436
10339
  function formatSkillsList(payload) {
10437
10340
  const skills = payload.skills ?? [];
10438
10341
  if (skills.length === 0) return "(no skills)\n";
10439
10342
  const lines = [`${skills.length} skill(s):`, ""];
10440
10343
  for (const s of skills) {
10441
- const meta = s.metadata;
10442
- let tag = "";
10443
- if (meta) {
10444
- const parts = [`${meta.endpoint_count} endpoints`];
10445
- const tiers = formatTierCounts(meta.endpoint_tier_counts);
10446
- if (tiers) parts.push(tiers);
10447
- if (meta.pro_count > 0) parts.push(`${meta.pro_count} pro`);
10448
- tag = `[${parts.join("; ")}]`;
10449
- }
10450
- lines.push(`\u2022 ${s.name}${tag ? ` ${tag}` : ""}`);
10344
+ const tag = s.metadata ? ` [${s.metadata.endpoint_count} endpoints]` : "";
10345
+ lines.push(`\u2022 ${s.name}${tag}`);
10451
10346
  if (s.description) lines.push(` ${s.description}`);
10452
10347
  lines.push("");
10453
10348
  }
@@ -10455,52 +10350,37 @@ function formatSkillsList(payload) {
10455
10350
  }
10456
10351
  function formatEndpointMetadataTable(endpoints) {
10457
10352
  if (endpoints.length === 0) return "";
10458
- const rows = endpoints.map((e) => ({
10459
- method: e.method,
10460
- path: e.path,
10461
- file: e.file,
10462
- tier: e.tier,
10463
- access: e.pro_required ? "pro" : "free"
10353
+ const rows = endpoints.map((endpoint) => ({
10354
+ method: endpoint.method,
10355
+ path: endpoint.path,
10356
+ file: endpoint.file
10464
10357
  }));
10465
- const headers = ["METHOD", "PATH", "FILE", "TIER", "ACCESS"];
10466
- const widths = headers.map((h, i) => {
10467
- const key = ["method", "path", "file", "tier", "access"][i];
10468
- return Math.max(h.length, ...rows.map((r) => String(r[key]).length));
10469
- });
10470
- const pad = (s, w) => s + " ".repeat(Math.max(0, w - s.length));
10471
- const lines = [
10472
- headers.map((h, i) => pad(h, widths[i])).join(" "),
10473
- widths.map((w) => "-".repeat(w)).join(" "),
10474
- ...rows.map(
10475
- (r) => [r.method, r.path, r.file, r.tier, r.access].map((v, i) => pad(String(v), widths[i])).join(" ")
10358
+ const headers = ["METHOD", "PATH", "FILE"];
10359
+ const keys = ["method", "path", "file"];
10360
+ const widths = headers.map(
10361
+ (header, index) => Math.max(
10362
+ header.length,
10363
+ ...rows.map((row) => String(row[keys[index]]).length)
10476
10364
  )
10477
- ];
10478
- return lines.join("\n");
10479
- }
10480
- function formatSingleEndpointMetadata(meta) {
10481
- if (!meta) return "";
10365
+ );
10366
+ const pad = (value, width) => value + " ".repeat(Math.max(0, width - value.length));
10482
10367
  return [
10483
- "Endpoint metadata:",
10484
- ` ${meta.method} ${meta.path}`,
10485
- ` file: ${meta.file}`,
10486
- ` tier: ${meta.tier}`,
10487
- ` access: ${meta.pro_required ? "pro only" : "free and pro"} (requires ${meta.required_subscription_tier})`
10368
+ headers.map((header, index) => pad(header, widths[index])).join(" "),
10369
+ widths.map((width) => "-".repeat(width)).join(" "),
10370
+ ...rows.map(
10371
+ (row) => keys.map((key, index) => pad(String(row[key]), widths[index])).join(" ")
10372
+ )
10488
10373
  ].join("\n");
10489
10374
  }
10490
- function isEndpointMetadata(m) {
10491
- return !!m && typeof m === "object" && "path" in m && "method" in m;
10375
+ function isEndpointMetadata(metadata) {
10376
+ return !!metadata && typeof metadata === "object" && "path" in metadata && "method" in metadata;
10492
10377
  }
10493
10378
  function formatSkillSummary(doc) {
10494
10379
  const sections = [];
10495
10380
  sections.push(`# ${doc.name}`);
10496
10381
  if (doc.description) sections.push(doc.description);
10497
10382
  if (doc.metadata && !isEndpointMetadata(doc.metadata)) {
10498
- const m = doc.metadata;
10499
- const parts = [`${m.endpoint_count} endpoints`];
10500
- const counts = formatTierCounts(m.endpoint_tier_counts);
10501
- if (counts) parts.push(counts);
10502
- if (m.pro_count > 0) parts.push(`${m.pro_count} pro`);
10503
- sections.push(`(${parts.join("; ")})`);
10383
+ sections.push(`(${doc.metadata.endpoint_count} endpoints)`);
10504
10384
  }
10505
10385
  sections.push("---");
10506
10386
  sections.push((doc.content ?? "").trimEnd());
@@ -10515,7 +10395,13 @@ function formatSkillEndpoint(doc) {
10515
10395
  sections.push(`# ${doc.name}`);
10516
10396
  if (doc.description) sections.push(doc.description);
10517
10397
  if (isEndpointMetadata(doc.metadata)) {
10518
- sections.push(formatSingleEndpointMetadata(doc.metadata));
10398
+ sections.push(
10399
+ [
10400
+ "Endpoint metadata:",
10401
+ ` ${doc.metadata.method} ${doc.metadata.path}`,
10402
+ ` file: ${doc.metadata.file}`
10403
+ ].join("\n")
10404
+ );
10519
10405
  }
10520
10406
  sections.push("---");
10521
10407
  sections.push((doc.content ?? "").trimEnd());
@@ -10620,6 +10506,25 @@ function discoveryItemLines(item, webOrigin) {
10620
10506
  out.push("");
10621
10507
  return out;
10622
10508
  }
10509
+ function formatOwnedPlaybookList(items, opts = {}) {
10510
+ if (!items || items.length === 0) return "(no playbooks)\n";
10511
+ const lines = [`${items.length} playbook(s):`, ""];
10512
+ for (const item of items) {
10513
+ const title = item.display_name || item.name || item.id;
10514
+ const visibility = item.visibility ? ` [${item.visibility}]` : "";
10515
+ lines.push(`\u2022 ${title}${visibility}`);
10516
+ if (item.name && item.name !== title) lines.push(` ${item.name}`);
10517
+ lines.push(` id: ${item.id}`);
10518
+ lines.push("");
10519
+ }
10520
+ if (opts.hasNext && !opts.all) {
10521
+ lines.push(
10522
+ "(more results \u2014 pass --cursor <last item cursor>, or --all for every page)",
10523
+ ""
10524
+ );
10525
+ }
10526
+ return lines.join("\n");
10527
+ }
10623
10528
 
10624
10529
  // src/cli/productFormat.ts
10625
10530
  function formatAutomationList(result) {
@@ -14071,7 +13976,7 @@ ${formatReport(report, "human")}
14071
13976
  }
14072
13977
 
14073
13978
  // src/cli/dispatch.ts
14074
- var CLI_VERSION = true ? "0.21.0" : "dev";
13979
+ var CLI_VERSION = true ? "0.23.0-beta.0" : "dev";
14075
13980
  var DEFAULT_RUN_TIMEOUT_MS = 6e5;
14076
13981
  var RUN_TIMEOUT_ENV = "ALVA_RUN_TIMEOUT_MS";
14077
13982
  var GLOBAL_VALUE_FLAGS = Object.entries(GLOBAL_FLAG_DEFINITIONS).filter(([, kind]) => kind === "value").map(([name]) => `--${name}`);
@@ -14117,7 +14022,7 @@ Commands:
14117
14022
  service-account Restricted run-as identities (create, list, delete, grant, revoke)
14118
14023
  release Feed and playbook releases (feed, playbook-draft, playbook)
14119
14024
  lint Design-system lint (playbook)
14120
- automation Automation management (list, inspect, publish, stop, resume, delete)
14025
+ automation Automation management (list, inspect, publish, update, stop, resume, delete)
14121
14026
  alert Alert management (list, follows, enable, disable, history, preferences, enable-session-completed, disable-session-completed)
14122
14027
  feed Legacy automation alias (list, stop, resume, delete, set-visibility)
14123
14028
  playbooks Playbook discovery (trending, get, list) and visibility
@@ -14134,6 +14039,7 @@ Commands:
14134
14039
  subscriptions Playbook follows and feed alert subscriptions
14135
14040
  remix Save playbook remix lineage
14136
14041
  portfolio Connected-account portfolio (accounts, summary, activities)
14042
+ markets Company narrative and earnings context (narrative, earnings)
14137
14043
  trading Trading operations (accounts, portfolio, orders, subscriptions, equity-history, risk-rules, subscribe, unsubscribe, execute, update-risk-rules)
14138
14044
  broker Agentic order execution \u2014 venue-native passthrough to trex (accounts, quote, order, balance, positions, ...; run 'alva broker describe')
14139
14045
  auth Authentication (login)
@@ -14304,12 +14210,13 @@ Path conventions:
14304
14210
  Quote tilde paths to prevent shell expansion: --path "~/data" (not --path ~/data).
14305
14211
 
14306
14212
  Time series reads:
14307
- Paths under feed data directories support virtual suffixes:
14308
- @last/{n} Last N data points (chronological order)
14309
- @range/{start}..{end} Between timestamps (RFC 3339 or Unix ms)
14310
- @range/{duration} Recent data within duration (e.g. 7d, 1h)
14311
- @count Data point count
14312
- @now Latest single data point
14213
+ Feed data directories are synth mounts. Their supported read suffixes are:
14214
+ @last/{n} Last N data points (chronological order)
14215
+ @range/{start_ms}..{end_ms} Between Unix millisecond timestamps
14216
+ @before/{timestamp_ms}/{limit} Up to limit points before a Unix millisecond timestamp
14217
+ @after/{timestamp_ms}/{limit} Up to limit points after a Unix millisecond timestamp
14218
+ @count Data point count
14219
+ RFC 3339, Unix-second timestamps, @range/{duration}, and @now are not supported.
14313
14220
 
14314
14221
  Grant/revoke subjects:
14315
14222
  special:user:* Public (anyone, including unauthenticated)
@@ -14537,7 +14444,8 @@ commands called "feeds"; ids are currently the same underlying feed ids.
14537
14444
  Subcommands:
14538
14445
  list List automations owned by the caller
14539
14446
  inspect Inspect one automation and show its flow config path when available
14540
- publish Publish/register an automation after deploying its cronjob
14447
+ publish First-publish/register a new automation after deploying its cronjob
14448
+ update Partially update an existing automation by numeric id
14541
14449
  stop Stop an automation's producer cronjob
14542
14450
  resume Resume a stopped automation's producer cronjob
14543
14451
  delete Soft-delete an automation
@@ -14556,15 +14464,33 @@ Publish flags:
14556
14464
  --description <text> Automation description
14557
14465
  --changelog <text> Per-major changelog summary
14558
14466
  --agent-type <type> Agent kind that produces this automation, e.g. "alpi"
14467
+ --skip-auto-trigger Suppress the default first producer run. Publishing
14468
+ still creates the owner's alert binding.
14469
+
14470
+ Publish behavior:
14471
+ A new automation creates an ACTIVE owner alert binding, then triggers its
14472
+ first producer run unless --skip-auto-trigger is present. Use the flag when
14473
+ you will route the binding or trigger the producer explicitly afterward.
14474
+
14475
+ Update flags:
14476
+ --id <automation_id> Existing automation id (required)
14477
+ --version <version> New semantic version; omitted preserves the current one
14478
+ --cronjob-id <id> Replacement producer; omitted preserves the current one
14479
+ --description <text> Replace description; explicit empty string clears it
14480
+ --changelog <text> Replace per-major changelog; explicit empty clears it
14481
+ --agent-type <type> Replace agent kind; explicit empty clears it
14482
+ --trigger Trigger one run after the update commits
14559
14483
 
14560
14484
  Lifecycle flags:
14561
- --id <automation_id> Numeric automation id (required for inspect/stop/resume/delete)
14485
+ --id <automation_id> Numeric automation id (required for inspect/update/stop/resume/delete)
14562
14486
 
14563
14487
  Examples:
14564
14488
  alva automation list
14565
14489
  alva automation list --status all --limit 20
14566
14490
  alva automation inspect --id 42
14567
14491
  alva automation publish --name btc-ema --version 1.0.0 --cronjob-id 42
14492
+ alva automation update --id 42 --description "Updated BTC EMA"
14493
+ alva automation update --id 42 --version 2.0.0 --trigger
14568
14494
  alva automation stop --id 42
14569
14495
  alva automation resume --id 42
14570
14496
  alva automation delete --id 42`,
@@ -14674,7 +14600,8 @@ Find and resolve playbooks with an agent-friendly response shape.
14674
14600
  Subcommands:
14675
14601
  trending List trending playbooks
14676
14602
  get Resolve playbooks by id(s) or "owner/name" ref
14677
- list List a user's playbooks by owner username
14603
+ list List a user's public (released) playbooks by owner username
14604
+ mine List YOUR OWN playbooks incl. drafts (requires auth)
14678
14605
  set-visibility Set a playbook's visibility (requires auth)
14679
14606
 
14680
14607
  Get flags:
@@ -14685,8 +14612,16 @@ Get flags:
14685
14612
 
14686
14613
  List flags:
14687
14614
  --owner <username> Owner username (required)
14688
- --limit <n> Max results per page
14615
+ --limit <n> Max results per page (default one page of ~50)
14616
+ --cursor <cursor> Pagination cursor from previous response
14617
+ --all Fetch every page (auto-paginate); without it a
14618
+ single page is returned \u2014 check has_next
14619
+
14620
+ Mine flags (your own playbooks, drafts included):
14621
+ --filter <f> draft | running | paused (optional; omit for all)
14622
+ --limit <n> Max results per page (default one page of ~50)
14689
14623
  --cursor <cursor> Pagination cursor from previous response
14624
+ --all Fetch every page (auto-paginate)
14690
14625
 
14691
14626
  Trending flags:
14692
14627
  --keyword <text> Search text
@@ -14726,7 +14661,8 @@ Examples:
14726
14661
  alva playbooks trending --keyword scanner --tags macro,ai --sort recent --limit 5
14727
14662
  alva playbooks get --ids 8009,8010
14728
14663
  alva playbooks get --ref alice/btc-dashboard
14729
- alva playbooks list --owner alice
14664
+ alva playbooks list --owner alice --all
14665
+ alva playbooks mine --filter draft
14730
14666
  alva playbooks set-visibility --name my-scanner --visibility private
14731
14667
  alva playbooks set-visibility --name my-scanner --visibility public`,
14732
14668
  functions: `Usage: alva functions <subcommand> [options]
@@ -14820,6 +14756,13 @@ Feed flags:
14820
14756
  --agent-type <type> Agent kind that produces this feed, e.g. "alpi".
14821
14757
  Marks the feed as an agent feed with an editable
14822
14758
  prompt (AGENTS.md). Omit for a regular feed.
14759
+ --skip-auto-trigger Suppress the default first producer run. Releasing
14760
+ still creates the owner's alert binding.
14761
+
14762
+ Feed release behavior:
14763
+ A new feed creates an ACTIVE owner alert binding, then triggers its first
14764
+ producer run unless --skip-auto-trigger is present. Use the flag when you
14765
+ will route the binding or trigger the producer explicitly afterward.
14823
14766
 
14824
14767
  Playbook-draft flags:
14825
14768
  --name <name> URL-safe playbook name, unique per user (required)
@@ -14944,8 +14887,8 @@ public \u2014 no Alva credentials required.
14944
14887
 
14945
14888
  Subcommands:
14946
14889
  list List all available data skills
14947
- summary <skill> Get the endpoints table for a skill, plus local tier metadata
14948
- endpoint <skill> <file> Get full documentation and local tier metadata for a specific endpoint
14890
+ summary <skill> Get the endpoints table for a skill
14891
+ endpoint <skill> <file> Get full documentation for a specific endpoint
14949
14892
 
14950
14893
  Flags:
14951
14894
  --json Emit raw JSON instead of the readable rendering (for scripting / jq)
@@ -15178,6 +15121,33 @@ Examples:
15178
15121
  alva portfolio accounts
15179
15122
  alva portfolio summary --account-id trex:123
15180
15123
  alva portfolio activities --account-id snaptrade:456 --limit 20`,
15124
+ markets: `Usage: alva markets <subcommand> [options]
15125
+
15126
+ Read the Markets backend's canonical company context. The Toolkit resolves
15127
+ earnings events through the backend period catalog; it does not construct ALFS
15128
+ owners, feed slugs, versions, or paths.
15129
+
15130
+ Subcommands:
15131
+ narrative Get the current narrative, history, and narrative change log
15132
+ earnings Get Pre, Release, Transcript, and Post for one fiscal event
15133
+
15134
+ Narrative flags:
15135
+ --ticker <symbol> Stock ticker (required)
15136
+
15137
+ Earnings flags:
15138
+ --ticker <symbol> Stock ticker (required)
15139
+ --event <selector> latest-completed (default) or next-confirmed
15140
+ --fiscal-year <year> Explicit fiscal year; requires --fiscal-quarter
15141
+ --fiscal-quarter <Q1..Q4> Explicit fiscal quarter; requires --fiscal-year
15142
+
15143
+ Do not combine --event with --fiscal-year/--fiscal-quarter. These commands read
15144
+ the current backend view; historical query-as-of gating is not supported yet.
15145
+
15146
+ Examples:
15147
+ alva markets narrative --ticker AAPL
15148
+ alva markets earnings --ticker AAPL
15149
+ alva markets earnings --ticker AAPL --event next-confirmed
15150
+ alva markets earnings --ticker AAPL --fiscal-year 2026 --fiscal-quarter Q3`,
15181
15151
  trading: `Usage: alva trading <subcommand> [options]
15182
15152
 
15183
15153
  Manage trading accounts, portfolios, orders, subscriptions, and risk rules.
@@ -15535,9 +15505,37 @@ function feedReleaseParams(flags, command2) {
15535
15505
  view_json: jsonParse(flags["view-json"]),
15536
15506
  description: flags["description"],
15537
15507
  changelog: flags["changelog"],
15538
- agent_type: flags["agent-type"]
15508
+ agent_type: flags["agent-type"],
15509
+ skip_auto_trigger: boolFlag(flags["skip-auto-trigger"])
15539
15510
  };
15540
15511
  }
15512
+ function automationUpdateParams(flags) {
15513
+ const command2 = "automation update";
15514
+ const cronjobID = flags["cronjob-id"] === void 0 ? void 0 : optionalBoundedIntegerFlag(
15515
+ flags,
15516
+ "cronjob-id",
15517
+ command2,
15518
+ 1,
15519
+ Number.MAX_SAFE_INTEGER
15520
+ );
15521
+ const trigger = boolFlag(flags["trigger"]);
15522
+ const params = {
15523
+ id: requirePositiveIntegerStringFlag(flags, "id", command2),
15524
+ version: flags["version"],
15525
+ cronjob_id: cronjobID,
15526
+ description: flags["description"],
15527
+ changelog: flags["changelog"],
15528
+ agent_type: flags["agent-type"],
15529
+ trigger: trigger === true ? true : void 0
15530
+ };
15531
+ if (params.version === void 0 && params.cronjob_id === void 0 && params.description === void 0 && params.changelog === void 0 && params.agent_type === void 0 && params.trigger !== true) {
15532
+ throw new CliUsageError(
15533
+ "automation update requires at least one field or --trigger",
15534
+ "automation"
15535
+ );
15536
+ }
15537
+ return params;
15538
+ }
15541
15539
  function trendingPlaybooksSort(val) {
15542
15540
  if (val === void 0) return void 0;
15543
15541
  const normalized = val.trim().toUpperCase();
@@ -15557,6 +15555,17 @@ function playbookVisibility(val) {
15557
15555
  "playbooks"
15558
15556
  );
15559
15557
  }
15558
+ function ownedPlaybookFilter(val) {
15559
+ if (val === void 0 || val === "") return void 0;
15560
+ const normalized = val.trim().toLowerCase();
15561
+ if (OWNED_PLAYBOOK_FILTERS.includes(normalized)) {
15562
+ return normalized;
15563
+ }
15564
+ throw new CliUsageError(
15565
+ `--filter must be one of ${OWNED_PLAYBOOK_FILTERS.join(", ")} for 'playbooks mine', got '${val}'`,
15566
+ "playbooks"
15567
+ );
15568
+ }
15560
15569
  function feedVisibility(val) {
15561
15570
  const normalized = val.trim().toLowerCase();
15562
15571
  if (normalized === "public" || normalized === "private") {
@@ -16394,6 +16403,8 @@ async function dispatch(client, args, meta, deps) {
16394
16403
  return client.automation.publish(
16395
16404
  feedReleaseParams(flags, "automation publish")
16396
16405
  );
16406
+ case "update":
16407
+ return client.automation.update(automationUpdateParams(flags));
16397
16408
  case "stop":
16398
16409
  return client.automation.stop({
16399
16410
  id: requireNumericFlag(flags, "id", "automation stop")
@@ -16474,15 +16485,71 @@ async function dispatch(client, args, meta, deps) {
16474
16485
  );
16475
16486
  }
16476
16487
  case "list": {
16488
+ const owner = requireFlag(flags, "owner", "playbooks list");
16489
+ const limit = num(flags["limit"]);
16490
+ if (boolFlag(flags["all"]) ?? false) {
16491
+ const first = await client.playbooks.listByOwner({
16492
+ owner,
16493
+ limit,
16494
+ cursor: flags["cursor"]
16495
+ });
16496
+ const items = first.items;
16497
+ let hasNext = first.has_next;
16498
+ let cursor = first.next_cursor;
16499
+ while (hasNext && cursor) {
16500
+ const page = await client.playbooks.listByOwner({
16501
+ owner,
16502
+ limit,
16503
+ cursor
16504
+ });
16505
+ items.push(...page.items);
16506
+ hasNext = page.has_next;
16507
+ cursor = page.next_cursor;
16508
+ }
16509
+ return asJson ? { items, has_next: false } : formatPlaybookList(items, webOrigin);
16510
+ }
16477
16511
  const result = await client.playbooks.listByOwner({
16478
- owner: requireFlag(flags, "owner", "playbooks list"),
16479
- limit: num(flags["limit"]),
16512
+ owner,
16513
+ limit,
16480
16514
  cursor: flags["cursor"]
16481
16515
  });
16482
16516
  return asJson ? result : formatPlaybookList(result.items, webOrigin, {
16483
16517
  hasNext: result.has_next
16484
16518
  });
16485
16519
  }
16520
+ case "mine": {
16521
+ const filter = ownedPlaybookFilter(flags["filter"]);
16522
+ const limit = num(flags["limit"]);
16523
+ if (boolFlag(flags["all"]) ?? false) {
16524
+ const first = await client.playbooks.listOwn({
16525
+ filter,
16526
+ limit,
16527
+ cursor: flags["cursor"]
16528
+ });
16529
+ const items = first.playbooks;
16530
+ let hasNext = first.has_next;
16531
+ let cursor = items.length ? items[items.length - 1].cursor : void 0;
16532
+ while (hasNext && cursor) {
16533
+ const page = await client.playbooks.listOwn({
16534
+ filter,
16535
+ limit,
16536
+ cursor
16537
+ });
16538
+ items.push(...page.playbooks);
16539
+ hasNext = page.has_next;
16540
+ cursor = page.playbooks.length ? page.playbooks[page.playbooks.length - 1].cursor : void 0;
16541
+ }
16542
+ return asJson ? { playbooks: items, has_next: false } : formatOwnedPlaybookList(items, { all: true });
16543
+ }
16544
+ const result = await client.playbooks.listOwn({
16545
+ filter,
16546
+ limit,
16547
+ cursor: flags["cursor"]
16548
+ });
16549
+ return asJson ? result : formatOwnedPlaybookList(result.playbooks, {
16550
+ hasNext: result.has_next
16551
+ });
16552
+ }
16486
16553
  default:
16487
16554
  throw new CliUsageError(
16488
16555
  `Unknown subcommand: playbooks ${subcommand}`,
@@ -17292,6 +17359,67 @@ async function dispatch(client, args, meta, deps) {
17292
17359
  );
17293
17360
  }
17294
17361
  }
17362
+ case "markets": {
17363
+ if (!subcommand)
17364
+ throw new CliUsageError("Missing subcommand for markets", "markets");
17365
+ const ticker = requireFlag(flags, "ticker", `markets ${subcommand}`);
17366
+ switch (subcommand) {
17367
+ case "narrative":
17368
+ return client.markets.narrative(ticker);
17369
+ case "earnings": {
17370
+ const event = flags["event"];
17371
+ const fiscalYear = optionalBoundedIntegerFlag(
17372
+ flags,
17373
+ "fiscal-year",
17374
+ "markets earnings",
17375
+ 1900,
17376
+ 9999
17377
+ );
17378
+ const fiscalQuarter = flags["fiscal-quarter"]?.toUpperCase();
17379
+ const hasExplicitPeriod = fiscalYear !== void 0 || fiscalQuarter !== void 0;
17380
+ if (event !== void 0 && hasExplicitPeriod) {
17381
+ throw new CliUsageError(
17382
+ "--event cannot be combined with --fiscal-year or --fiscal-quarter for 'markets earnings'",
17383
+ "markets"
17384
+ );
17385
+ }
17386
+ if (fiscalYear === void 0 !== (fiscalQuarter === void 0)) {
17387
+ throw new CliUsageError(
17388
+ "--fiscal-year and --fiscal-quarter must be provided together for 'markets earnings'",
17389
+ "markets"
17390
+ );
17391
+ }
17392
+ if (event !== void 0 && event !== "latest-completed" && event !== "next-confirmed") {
17393
+ throw new CliUsageError(
17394
+ "--event must be 'latest-completed' or 'next-confirmed' for 'markets earnings'",
17395
+ "markets"
17396
+ );
17397
+ }
17398
+ if (fiscalQuarter !== void 0 && !["Q1", "Q2", "Q3", "Q4"].includes(fiscalQuarter)) {
17399
+ throw new CliUsageError(
17400
+ "--fiscal-quarter must be Q1, Q2, Q3, or Q4 for 'markets earnings'",
17401
+ "markets"
17402
+ );
17403
+ }
17404
+ if (fiscalYear !== void 0 && fiscalQuarter !== void 0) {
17405
+ return client.markets.earnings({
17406
+ ticker,
17407
+ fiscalYear,
17408
+ fiscalQuarter
17409
+ });
17410
+ }
17411
+ return client.markets.earnings({
17412
+ ticker,
17413
+ event
17414
+ });
17415
+ }
17416
+ default:
17417
+ throw new CliUsageError(
17418
+ `Unknown subcommand: markets ${subcommand}`,
17419
+ "markets"
17420
+ );
17421
+ }
17422
+ }
17295
17423
  case "trading": {
17296
17424
  if (!subcommand)
17297
17425
  throw new CliUsageError("Missing subcommand for trading", "trading");