Types

The exact shape of every object agent code passes to or receives from the manager, generated from the engine source that the validator compiles against. The Manager API explains what each field means where it is not obvious.

Two kinds of entries:

  • In scope: the name exists in agent code. Use it in annotations (const pending: readonly Order[] = manager.getPendingOrders();), never import or redeclare it. Where the name in code differs from the declaration, the entry says so (Interval is written StseInterval, because Interval is Luxon's class in agent code).
  • Shape only: the shape of a value you receive, but not a name you can write. Let TypeScript infer it (const positions = manager.getPositions();), or declare your own interface with the fields you need.

Reading the declarations: a field marked ? may be absent; readonly arrays cannot be mutated (copy with [...array]); a union of string literals lists every accepted value.

Candles and intervals

Candle

In scope as Candle.

interface Candle {
  openTime: number;
  closeTime: number;
  open: number;
  high: number;
  low: number;
  close: number;
  volume: number;
}

Interval

In scope as StseInterval (declared as Interval).

type Interval = number | 'week' | 'month';

OpenedCandle

In scope as OpenedCandle.

type OpenedCandle = Pick<Candle, "openTime" | "open">;

Orders

CreateOrder

In scope as CreateOrder.

interface CreateOrder {
  readonly type: 'MARKET' | 'LIMIT' | 'MARKET_TRIGGER';
  readonly symbol: string;
  readonly position: Position;
  readonly qty?: number;
  readonly amount?: number;
  readonly amountCurrency?: string;
  readonly priceOverride?: number | undefined;
  readonly limitPrice?: number | undefined;
  readonly triggerPrice?: number | undefined;
  readonly inhibitAutoInvest?: boolean;
  readonly inhibitReduceCapital?: boolean;
  readonly inhibitMargin?: boolean;
  readonly positionCapitalOverride?: number | undefined;
  readonly crumbsOrder?: boolean | undefined;
  readonly seedOrder?: boolean | undefined;
}

Order

In scope as Order.

interface Order extends CreateOrder {
  readonly _id: string;
  readonly model: string;
  readonly realSymbol: string;
  readonly sizingQuoteSymbol?: string;
  readonly createdTime: number;
  qty: number;
  executedTime?: number;
  filledQty?: number | undefined;
  price?: number | undefined;
  priceAfterSlippage?: number | undefined;
  slippageWorstPrice?: number | undefined;
  slippageError?: boolean | undefined;
  capitalWithoutFees?: number;
  capital?: number;
  canceledTime?: number;
  cancelCause?: OrderCancelCause | undefined;
  cancelMessage?: string | undefined;
  evolutiveQty: number;
  evolutiveCapital: number;
}

OrderCancelCause

Shape only: not a name in agent code, let TypeScript infer it.

type OrderCancelCause = 'insufficientMargin' | 'noLivePrice';

Trades

AmountPositionSize

In scope as AmountPositionSize.

interface AmountPositionSize {
  type: 'amount';
  amount: number;
}

Exit

In scope as Exit.

interface Exit {
  time: number;
  delta: number;
  cause: string;
  waitingEnterOrder?: boolean | undefined;
  price?: number | undefined;
  orderQty?: number | undefined;
  filledQty?: number | undefined;
  orderId?: string | undefined;
  orderPending?: boolean | undefined;
  priceWithSlippage?: number | undefined;
  orderCapitalWithoutFees?: number | undefined;
  orderCapital?: number | undefined;
  earnings?: number | undefined;
  inhibitFinish?: boolean | undefined;
}

LeaveSignal

In scope as LeaveSignal.

interface LeaveSignal {
  readonly cause: string;
  readonly delta?: number | undefined;
  readonly price?: number | undefined;
  readonly inhibitFinish?: boolean | undefined;
}

PositionSize

In scope as PositionSize.

type PositionSize = ProportionPositionSize | RiskPositionSize | AmountPositionSize | QtyPositionSize;

ProportionPositionSize

In scope as ProportionPositionSize.

interface ProportionPositionSize {
  type: 'proportion';
  proportion: number;
}

QtyPositionSize

In scope as QtyPositionSize.

interface QtyPositionSize {
  type: 'qty';
  qty: number;
}

RiskPositionSize

In scope as RiskPositionSize.

interface RiskPositionSize {
  type: 'risk';
  risk: number;
}

Slippage

In scope as Slippage.

interface Slippage {
  readonly name: string;
  readonly error?: boolean | undefined;
  readonly slippage: number;
  readonly riskSlippage: number;
}

Trade

In scope as Trade.

interface Trade {
  readonly _id: string;
  readonly model: string;
  readonly symbol: string;
  readonly realSymbol: string;
  readonly enterTime: number;
  readonly enterPrice: number;
  readonly position: Position;
  readonly qty: number;
  filledQty: number;
  enterOrderId?: string | undefined;
  enterOrderPending: boolean;
  enterPriceWithSlippage?: number | undefined;
  enterOrderCapitalWithoutFees?: number | undefined;
  enterOrderCapital?: number | undefined;
  readonly type: 'MARKET' | 'LIMIT' | 'MARKET_TRIGGER';
  readonly price?: number | undefined;
  finished: boolean;
  finishTime?: number;
  readonly exitHistory: Exit[];
  stoploss?: Stoploss | undefined;
  stoploss2?: Stoploss | undefined;
  stoploss3?: Stoploss | undefined;
  stoploss4?: Stoploss | undefined;
  takeprofit?: Takeprofit | undefined;
  takeprofit2?: Takeprofit | undefined;
  takeprofit3?: Takeprofit | undefined;
  takeprofit4?: Takeprofit | undefined;
  highestPrice?: number;
  lowestPrice?: number;
  intelligence: {
    readonly stoplossDistance: number;
    readonly positionRatio: number;
    readonly positionSize: number;
    readonly contractSize?: number | undefined;
    slippageHistory?: Slippage[] | undefined;
    earnings: number;
    capital: number;
    drawdown?: number | undefined;
  };
  readonly statistics: {
    rewardRisk: number;
  };
  endStatistics?: {
    readonly result: 'win' | 'loss';
    readonly duration: number;
  };
  expectancy?: {
    readonly full?: number | undefined;
    readonly t21?: number | undefined;
    readonly t50?: number | undefined;
    readonly t100?: number | undefined;
    readonly t200?: number | undefined;
    readonly d10?: number | undefined;
    readonly d30?: number | undefined;
    readonly d90?: number | undefined;
  };
  latent?: {
    readonly time: number;
    readonly earnings: number;
    readonly profit?: number | undefined;
    readonly rewardRisk?: number | undefined;
  } | undefined;
  gotham?: boolean | undefined;
  gothamTime?: number | undefined;
  piggy?: boolean | undefined;
  ricky?: boolean | undefined;
  comment?: string | undefined;
  lastUpdate?: number | undefined;
}

V2EnterSignal

In scope as V2EnterSignal.

interface V2EnterSignal {
  symbol: string;
  position: Position;
  type: 'MARKET' | 'LIMIT' | 'MARKET_TRIGGER';
  price?: number | undefined;
  positionSize: PositionSize;
  stoploss?: StoplossRequest | Stoploss | undefined;
  stoploss2?: StoplossRequest | Stoploss | undefined;
  stoploss3?: StoplossRequest | Stoploss | undefined;
  stoploss4?: StoplossRequest | Stoploss | undefined;
  takeprofit?: TakeprofitRequest | Takeprofit | undefined;
  takeprofit2?: TakeprofitRequest | Takeprofit | undefined;
  takeprofit3?: TakeprofitRequest | Takeprofit | undefined;
  takeprofit4?: TakeprofitRequest | Takeprofit | undefined;
  comment?: string | undefined;
}

Stop-losses and take-profits

FixedStoploss

In scope as FixedStoploss.

interface FixedStoploss {
  readonly type: 'fixed';
  readonly initial: number;
  absolute: number;
  readonly delta?: number | undefined;
  disengaged?: boolean;
}

FixedStoplossRequest

In scope as FixedStoplossRequest.

interface FixedStoplossRequest {
  readonly type: 'fixed';
  readonly value: number;
  readonly delta?: number | undefined;
}

FixedTakeprofit

In scope as FixedTakeprofit.

interface FixedTakeprofit extends FixedTakeprofitRequest {
  disengaged?: boolean;
}

FixedTakeprofitRequest

In scope as FixedTakeprofitRequest.

interface FixedTakeprofitRequest {
  readonly type: 'fixed';
  readonly value: number;
  readonly delta?: number | undefined;
}

SpecialStoploss

In scope as SpecialStoploss.

interface SpecialStoploss {
  type: 'special';
  readonly initial: number;
  absolute: number;
  readonly delta?: number | undefined;
  disengaged?: boolean;
}

SpecialStoplossRequest

In scope as SpecialStoplossRequest.

interface SpecialStoplossRequest {
  readonly type: 'special';
  readonly value: number;
  readonly delta?: number | undefined;
}

Stoploss

In scope as Stoploss.

type Stoploss = FixedStoploss | TrailingStoploss | SpecialStoploss;

StoplossKey

In scope as StoplossKey.

type StoplossKey = 'stoploss' | 'stoploss2' | 'stoploss3' | 'stoploss4';

StoplossRequest

In scope as StoplossRequest.

type StoplossRequest = FixedStoplossRequest | SpecialStoplossRequest | TrailingStoplossRequest;

Takeprofit

In scope as Takeprofit.

type Takeprofit = FixedTakeprofit | TriggerTakeprofit | TrailingTakeprofit;

TakeprofitKey

In scope as TakeprofitKey.

type TakeprofitKey = 'takeprofit' | 'takeprofit2' | 'takeprofit3' | 'takeprofit4';

TakeprofitRequest

In scope as TakeprofitRequest.

type TakeprofitRequest = FixedTakeprofitRequest | TriggerTakeprofitRequest | TrailingTakeprofitRequest;

TrailingStoploss

In scope as TrailingStoploss.

interface TrailingStoploss {
  readonly type: 'trailing';
  readonly initial: number;
  absolute: number;
  readonly delta?: number | undefined;
  disengaged?: boolean;
}

TrailingStoplossRequest

In scope as TrailingStoplossRequest.

interface TrailingStoplossRequest {
  readonly type: 'trailing';
  readonly value: number;
  readonly delta?: number | undefined;
}

TrailingTakeprofit

In scope as TrailingTakeprofit.

interface TrailingTakeprofit extends TrailingTakeprofitRequest {
  absolute?: number;
  disengaged?: boolean;
}

TrailingTakeprofitRequest

In scope as TrailingTakeprofitRequest.

interface TrailingTakeprofitRequest {
  readonly type: 'trailing';
  readonly trigger: number;
  readonly relative: number;
  readonly delta?: number | undefined;
}

TriggerTakeprofit

In scope as TriggerTakeprofit.

interface TriggerTakeprofit extends TriggerTakeprofitRequest {
  triggered?: boolean;
  disengaged?: boolean;
}

TriggerTakeprofitRequest

In scope as TriggerTakeprofitRequest.

interface TriggerTakeprofitRequest {
  readonly type: 'trigger';
  readonly trigger: number;
  readonly value: number;
  readonly delta?: number | undefined;
}

Positions and account

BalanceView

Shape only: not a name in agent code, let TypeScript infer it.

interface BalanceView {
  asset: string;
  total: number;
  available?: number;
  reserved?: number;
  borrowed?: number;
}

HoldingView

Shape only: not a name in agent code, let TypeScript infer it.

interface HoldingView {
  holding: string;
  asset?: string;
  name: string;
  quantity?: number;
  valuation?: MoneyView;
  averageUnitPrice?: MoneyView;
  reportedUnitValue?: MoneyView;
  pnl?: MoneyView;
  pnlRatio?: number;
  assetClass?: string;
  valuationSource: 'provider' | 'market';
}

LatentData

In scope as LatentData.

interface LatentData {
  readonly wallet: string;
  readonly time: number;
  readonly date: Date;
  readonly invested: number;
  readonly capital: number;
  readonly earnings: number;
  readonly sum: number;
  readonly ratio: number;
  readonly exposition: number;
  readonly ricky: number;
}

MoneyView

Shape only: not a name in agent code, let TypeScript infer it.

interface MoneyView {
  amount: number;
  currency: string;
}

OpenPosition

Shape only: not a name in agent code, let TypeScript infer it.

interface OpenPosition {
  symbol: string;
  ticker?: string | undefined;
  name?: string | undefined;
  qty: number;
  value: number;
  pnl: number;
}

Position

In scope as Position.

type Position = 'buy' | 'sell';

Run metrics

CapitalMetrics

In scope as CapitalMetrics.

interface CapitalMetrics {
  maxCapital: number | undefined;
  drawdown: number | undefined;
  maxDrawdown: number | undefined;
  avgDrawdown: number | undefined;
  performance: number | undefined;
  performanceMaxDrawdownRatio: number | undefined;
  cagr: number | undefined;
  cagrMaxDrawdownRatio: number | undefined;
  cagrAvgDrawdownRatio: number | undefined;
  sharpe: number | undefined;
  sortino: number | undefined;
}

LatentMetrics

In scope as LatentMetrics.

interface LatentMetrics {
  timeInMarket: number | undefined;
  maxExposition: number | undefined;
}

Metrics

In scope as Metrics.

interface Metrics {
  orderMetrics: OrderMetrics;
  tradeMetrics: TradeMetrics;
  capitalMetrics: CapitalMetrics;
  swapFeesMetrics: SwapFeesMetrics;
  latentMetrics: LatentMetrics;
  latentCapitalMetrics: CapitalMetrics;
  pareto?: number | undefined;
}

ModelMetrics

In scope as ModelMetrics.

interface ModelMetrics {
  orderMetrics: OrderMetrics;
  tradeMetrics: TradeMetrics;
  pareto?: number | undefined;
}

OrderMetrics

In scope as OrderMetrics.

interface OrderMetrics {
  orders: number;
  volume: number;
  orderFees: number;
}

SwapFeesMetrics

In scope as SwapFeesMetrics.

interface SwapFeesMetrics {
  total: number;
  gains: number;
  losses: number;
}

TradeMetrics

In scope as TradeMetrics.

interface TradeMetrics {
  trades: number;
  yearlyTrades: number | undefined;
  avgTradeDuration: number | undefined;
  wins: number;
  maxConsecutiveWins: number;
  losses: number;
  maxConsecutiveLosses: number;
  winrate: number | undefined;
  evR: number;
  maxEvR: number;
  evRDrawdown: number;
  maxEvRDrawdown: number;
  expectancy: number | undefined;
  t21Expectancy: number | undefined;
  t50Expectancy: number | undefined;
  t100Expectancy: number | undefined;
  t200Expectancy: number | undefined;
  d10Expectancy: number | undefined;
  d30Expectancy: number | undefined;
  d90Expectancy: number | undefined;
  sqn: number | undefined;
  rewardRiskRatio: number | undefined;
  profitFactor: number | undefined;
  avgPositionRatio: number | undefined;
  avgStoplossDistance: number | undefined;
  avgSlippage: number | undefined;
  avgSlippageR: number | undefined;
  longs: number;
  longProportion: number | undefined;
  shorts: number;
  shortProportion: number | undefined;
  fees: number;
}

WalletMetrics

In scope as WalletMetrics.

interface WalletMetrics {
  capitalMetrics: CapitalMetrics;
  swapFeesMetrics: SwapFeesMetrics;
  latentMetrics: LatentMetrics;
  latentCapitalMetrics: CapitalMetrics;
}

State

Status

In scope as Status.

type Status = object;

StatusBag

Shape only: not a name in agent code, let TypeScript infer it.

type StatusBag = Record<string, unknown>;

Symbols and assets

ResolveAssetsRequest

In scope as ResolveAssetsRequest.

interface ResolveAssetsRequest {
  tickers: string[];
  category?: string;
}

ResolvedAsset

In scope as ResolvedAsset.

interface ResolvedAsset {
  ticker: string;
  name: string | null;
  class: string | null;
  tradingKey: string | null;
}

SymbolMetadata

In scope as SymbolMetadata.

interface SymbolMetadata {
  readonly symbol: string;
  readonly tickSize: number;
  readonly pipSize?: number | undefined;
  readonly pointSize?: number | undefined;
  readonly contractSize?: number | undefined;
  readonly lotSize?: number | undefined;
  readonly timeZone?: string | undefined;
  readonly quoteAssetSymbol?: string | undefined;
  readonly ticker?: string | undefined;
  readonly name?: string | undefined;
}

News and messages

BaseNewsRequest

In scope as BaseNewsRequest.

interface BaseNewsRequest {
  matchPrompt: string;
}

Message

Shape only: not a name in agent code, let TypeScript infer it.

interface Message {
  content: string;
  author: string;
  url: string;
  publishedAt: number;
  media: MessageMedia[];
}

MessageMedia

Shape only: not a name in agent code, let TypeScript infer it.

interface MessageMedia {
  id: string;
  kind: 'photo' | 'video_thumbnail';
}

MessageRequest

Shape only: not a name in agent code, let TypeScript infer it.

type MessageRequest = XMessageRequest | TelegramMessageRequest;

News

In scope as News.

interface News {
  content: string;
}

NewsRequest

In scope as NewsRequest.

type NewsRequest = XNewsRequest;

NewsResult

Shape only: not a name in agent code, let TypeScript infer it.

interface NewsResult {
  id: string;
  title: string;
  summary: string;
  url: string;
  source: string;
  publishedAt: number;
  score: number;
  instruments?: string[];
  industries?: string[];
  countries?: string[];
}

SearchNewsOptions

Shape only: not a name in agent code, let TypeScript infer it.

interface SearchNewsOptions {
  limit?: number;
  since?: number;
  until?: number;
  instruments?: string[];
  industries?: string[];
  countries?: string[];
  source?: string;
  minScore?: number;
}

TelegramMessageRequest

Shape only: not a name in agent code, let TypeScript infer it.

interface TelegramMessageRequest {
  source: 'telegram';
  channel: string;
}

XMessageRequest

Shape only: not a name in agent code, let TypeScript infer it.

interface XMessageRequest {
  source: 'x';
  handle: string;
}

XNewsRequest

In scope as XNewsRequest.

interface XNewsRequest extends BaseNewsRequest {
  source: 'x';
  handle?: string;
}

Alternative data

AltDataPoint

In scope as AltDataPoint.

interface AltDataPoint<T> {
  time: number;
  value: T;
}

Fundamental and macro data

PieuvreDataType

In scope as PieuvreDataType.

type PieuvreDataType = 'observation' | 'event' | 'snapshot' | 'composite';

PieuvreEvent

In scope as PieuvreEvent.

interface PieuvreEvent {
  deliveryId?: string;
  sentAt?: number;
  sourceId: string;
  dataType: PieuvreDataType;
  summary: string;
  value?: number;
  severity?: PieuvreSeverity;
  timestamp: number;
  eventType?: string;
  ticker?: string;
  previousTimestamp?: number;
  payload?: Record<string, unknown>;
}

PieuvreEventRequest

In scope as PieuvreEventRequest.

interface PieuvreEventRequest {
  matchPrompt: string;
  sourceIds?: string[];
  composites?: string[];
  minSeverity?: PieuvreSeverity;
  titleContains?: string;
}

PieuvreMetric

In scope as PieuvreMetric.

interface PieuvreMetric {
  sourceId: string;
  periodType?: string;
  value: number;
  unit?: string;
  period?: string;
  asOf: number;
}

PieuvreMetricQuery

In scope as PieuvreMetricQuery.

interface PieuvreMetricQuery {
  sourceId?: string;
  periodType?: string;
  entity?: string;
  period?: string;
  asOf?: number;
}

PieuvreRankedEntity

In scope as PieuvreRankedEntity.

interface PieuvreRankedEntity {
  sourceId?: string;
  periodType?: string;
  period?: string;
  unit?: string;
  asOf?: number;
  sampleCount?: number;
  ticker: string;
  name?: string;
  type?: string;
  figi?: string;
  isin?: string;
  value: number;
  rank: number;
  snaptradeSymbol: string | null;
  backtestSymbol: string | null;
}

PieuvreRankRequest

In scope as PieuvreRankRequest.

interface PieuvreRankRequest {
  sourceId?: string;
  periodType?: string;
  metric: PieuvreMetricName;
  universe?: string;
  country?: string;
  region?: string;
  sector?: string;
  industry?: string;
  type?: string;
  order?: 'asc' | 'desc';
  limit?: number;
  mode?: 'latest' | 'min' | 'max' | 'avg' | 'sum';
  from?: number;
  to?: number;
  asOf?: number;
}

PieuvreSeriesPoint

In scope as PieuvreSeriesPoint.

interface PieuvreSeriesPoint {
  time: number;
  value: number;
}

PieuvreSeriesQuery

In scope as PieuvreSeriesQuery.

interface PieuvreSeriesQuery {
  from?: number;
  to?: number;
  limit?: number;
  resolution?: 'raw' | 'daily' | 'weekly';
}

PieuvreSeverity

In scope as PieuvreSeverity.

type PieuvreSeverity = 'low' | 'medium' | 'high' | 'critical';

PieuvreUpcomingRequest

In scope as PieuvreUpcomingRequest.

interface PieuvreUpcomingRequest {
  withinMs?: number;
  sourceIds?: string[];
  minSeverity?: PieuvreSeverity;
  eventTypes?: string[];
  tickers?: string[];
  limit?: number;
}

Every name in scope

This block uses every type name marked "in scope" above. It is compiled by the validator in Obside's test suite, which proves each of those names exists in agent code.

type InScopeTypes = [AltDataPoint<number>, AmountPositionSize, BaseNewsRequest, Candle, CapitalMetrics, CreateOrder, Exit, FixedStoploss, FixedStoplossRequest, FixedTakeprofit, FixedTakeprofitRequest, LatentData, LatentMetrics, LeaveSignal, Metrics, ModelMetrics, News, NewsRequest, OpenedCandle, Order, OrderMetrics, PieuvreDataType, PieuvreEvent, PieuvreEventRequest, PieuvreMetric, PieuvreMetricQuery, PieuvreRankRequest, PieuvreRankedEntity, PieuvreSeriesPoint, PieuvreSeriesQuery, PieuvreSeverity, PieuvreUpcomingRequest, Position, PositionSize, ProportionPositionSize, QtyPositionSize, ResolveAssetsRequest, ResolvedAsset, RiskPositionSize, Slippage, SpecialStoploss, SpecialStoplossRequest, Status, Stoploss, StoplossKey, StoplossRequest, StseInterval, SwapFeesMetrics, SymbolMetadata, Takeprofit, TakeprofitKey, TakeprofitRequest, Trade, TradeMetrics, TrailingStoploss, TrailingStoplossRequest, TrailingTakeprofit, TrailingTakeprofitRequest, TriggerTakeprofit, TriggerTakeprofitRequest, V2EnterSignal, WalletMetrics, XNewsRequest];
const inScopeTypeCount: InScopeTypes['length'] = 63;
manager.debugLog(inScopeTypeCount);

The "shape only" names are refused if you write them (TypeScript reports "Cannot find name"):

type ShapeOnlyTypes = [BalanceView, HoldingView, Message, MessageMedia, MessageRequest, MoneyView, NewsResult, OpenPosition, OrderCancelCause, SearchNewsOptions, StatusBag, TelegramMessageRequest, XMessageRequest];
manager.debugLog('refused');

Metric names

getPieuvreRank({ metric }) accepts exactly these 470 names (the PieuvreMetricName type), and they are the names getPieuvreMetric(concept, …) understands. Any other string is refused by the validator.

200_day_ma, 50_day_ma, 52_week_high, 52_week_low, account_payables, accounts_payable, accounts_payables, accounts_receivable, accounts_receivables, accrued_expenses, accumulated_amortization, accumulated_depreciation, accumulated_other_comprehensive_income, accumulated_other_comprehensive_income_loss, acquisitions_net, additional_paid_in_capital, altman_z_score, analyst_buy, analyst_buy_count, analyst_earnings_estimate_avg_current_q, analyst_earnings_estimate_avg_current_y, analyst_earnings_estimate_avg_next_1q, analyst_earnings_estimate_avg_next_1y, analyst_earnings_estimate_growth_current_q, analyst_earnings_estimate_growth_current_y, analyst_earnings_estimate_growth_next_1q, analyst_earnings_estimate_growth_next_1y, analyst_earnings_estimate_high_current_q, analyst_earnings_estimate_high_current_y, analyst_earnings_estimate_high_next_1q, analyst_earnings_estimate_high_next_1y, analyst_earnings_estimate_low_current_q, analyst_earnings_estimate_low_current_y, analyst_earnings_estimate_low_next_1q, analyst_earnings_estimate_low_next_1y, analyst_earnings_estimate_number_of_analysts_current_q, analyst_earnings_estimate_number_of_analysts_current_y, analyst_earnings_estimate_number_of_analysts_next_1q, analyst_earnings_estimate_number_of_analysts_next_1y, analyst_earnings_estimate_year_ago_eps_current_q, analyst_earnings_estimate_year_ago_eps_current_y, analyst_earnings_estimate_year_ago_eps_next_1q, analyst_earnings_estimate_year_ago_eps_next_1y, analyst_eps_revisions_down_last30days_current_q, analyst_eps_revisions_down_last30days_current_y, analyst_eps_revisions_down_last30days_next_1q, analyst_eps_revisions_down_last30days_next_1y, analyst_eps_revisions_down_last7days_current_q, analyst_eps_revisions_down_last7days_current_y, analyst_eps_revisions_down_last7days_next_1q, analyst_eps_revisions_down_last7days_next_1y, analyst_eps_revisions_up_last30days_current_q, analyst_eps_revisions_up_last30days_current_y, analyst_eps_revisions_up_last30days_next_1q, analyst_eps_revisions_up_last30days_next_1y, analyst_eps_revisions_up_last7days_current_q, analyst_eps_revisions_up_last7days_current_y, analyst_eps_revisions_up_last7days_next_1q, analyst_eps_revisions_up_last7days_next_1y, analyst_eps_trend30days_ago_current_q, analyst_eps_trend30days_ago_current_y, analyst_eps_trend30days_ago_next_1q, analyst_eps_trend30days_ago_next_1y, analyst_eps_trend60days_ago_current_q, analyst_eps_trend60days_ago_current_y, analyst_eps_trend60days_ago_next_1q, analyst_eps_trend60days_ago_next_1y, analyst_eps_trend7days_ago_current_q, analyst_eps_trend7days_ago_current_y, analyst_eps_trend7days_ago_next_1q, analyst_eps_trend7days_ago_next_1y, analyst_eps_trend90days_ago_current_q, analyst_eps_trend90days_ago_current_y, analyst_eps_trend90days_ago_next_1q, analyst_eps_trend90days_ago_next_1y, analyst_eps_trend_current_current_q, analyst_eps_trend_current_current_y, analyst_eps_trend_current_next_1q, analyst_eps_trend_current_next_1y, analyst_growth_current_q, analyst_growth_current_y, analyst_growth_next_1q, analyst_growth_next_1y, analyst_hold, analyst_hold_count, analyst_net_bullish_count, analyst_rating, analyst_revenue_estimate_avg_current_q, analyst_revenue_estimate_avg_current_y, analyst_revenue_estimate_avg_next_1q, analyst_revenue_estimate_avg_next_1y, analyst_revenue_estimate_growth_current_q, analyst_revenue_estimate_growth_current_y, analyst_revenue_estimate_growth_next_1q, analyst_revenue_estimate_growth_next_1y, analyst_revenue_estimate_high_current_q, analyst_revenue_estimate_high_current_y, analyst_revenue_estimate_high_next_1q, analyst_revenue_estimate_high_next_1y, analyst_revenue_estimate_low_current_q, analyst_revenue_estimate_low_current_y, analyst_revenue_estimate_low_next_1q, analyst_revenue_estimate_low_next_1y, analyst_revenue_estimate_number_of_analysts_current_q, analyst_revenue_estimate_number_of_analysts_current_y, analyst_revenue_estimate_number_of_analysts_next_1q, analyst_revenue_estimate_number_of_analysts_next_1y, analyst_revenue_estimate_year_ago_revenue_current_q, analyst_revenue_estimate_year_ago_revenue_current_y, analyst_revenue_estimate_year_ago_revenue_next_1q, analyst_revenue_estimate_year_ago_revenue_next_1y, analyst_sell, analyst_sell_count, analyst_strong_buy, analyst_strong_buy_count, analyst_strong_sell, analyst_strong_sell_count, begin_period_cash_flow, beta, book_value, book_value_per_share, bottom_line_net_income, capex, capital_expenditure, capital_expenditures, capital_lease_obligations, capital_lease_obligations_current, capital_lease_obligations_non_current, capital_stock, capital_surpluse, cash, cash_and_cash_equivalents, cash_and_cash_equivalents_changes, cash_and_equivalents, cash_and_short_term_investments, cash_at_beginning_of_period, cash_at_end_of_period, cash_equivalents, cash_flows_other_operating, cash_per_share, cash_ratio, change_in_cash, change_in_working_capital, change_receivables, change_to_account_receivables, change_to_inventory, change_to_liabilities, change_to_netincome, change_to_operating_activities, circulating_supply, common_dividends, common_dividends_paid, common_stock, common_stock_issuance, common_stock_repurchase, common_stock_repurchased, common_stock_shares_outstanding, common_stock_total_equity, congress_buy_disclosures_90d, congress_buy_disclosures_filed_30d, congress_distinct_buyers_90d, congress_distinct_buyers_filed_30d, congress_net_buy_pressure_90d, congress_net_buy_pressure_filed_30d, cost_and_expenses, cost_of_revenue, current_deferred_revenue, current_ratio, debt_to_assets, debt_to_capital, debt_to_equity, deferred_income_tax, deferred_long_term_asset_charges, deferred_long_term_liab, deferred_revenue, deferred_revenue_non_current, deferred_tax_liabilities_non_current, deferred_taxes, depreciation, depreciation_and_amortization, diluted_eps_ttm, discontinued_operations, dividend_per_share, dividend_share, dividend_yield, dividends_paid, earning_assets, earnings_yield, ebit, ebit_margin, ebitda, ebitda_margin, effect_of_accounting_charges, effect_of_forex_changes_on_cash, effective_tax_rate, end_cash_position, end_period_cash_flow, enterprise_value, enterprise_value_revenue, eps, eps_actual, eps_basic, eps_difference, eps_diluted, eps_estimate, eps_estimate_current_quarter, eps_estimate_current_year, eps_estimate_next_quarter, eps_estimate_next_year, estimated_ebit_avg, estimated_ebit_high, estimated_ebit_low, estimated_ebitda_avg, estimated_ebitda_high, estimated_ebitda_low, estimated_eps_avg, estimated_eps_high, estimated_eps_low, estimated_net_income_avg, estimated_net_income_high, estimated_net_income_low, estimated_revenue_avg, estimated_revenue_high, estimated_revenue_low, estimated_sga_expense_avg, estimated_sga_expense_high, estimated_sga_expense_low, etf_average_duration, etf_average_maturity, etf_distribution_yield, etf_expense_ratio, etf_holdings_count, etf_total_assets, ev_to_ebitda, ev_to_free_cash_flow, ev_to_sales, exchange_rate_changes, extraordinary_items, fails_to_deliver_notional, fails_to_deliver_shares, financial_leverage, financing_cash_flow, fiscal_year, float_shares, forward_pe, free_cash_flow, free_cash_flow_per_share, free_cash_flow_yield, free_float_percent, fully_diluted_valuation, general_and_administrative_expenses, good_will, goodwill, goodwill_and_intangible_assets, gross_margin, gross_profit, gross_profit_ttm, growth_score, income_before_tax, income_tax, income_tax_expense, income_tax_paid, income_taxes_paid, intangible_assets, interest_coverage, interest_expense, interest_income, interest_paid, inventory, investing_cash_flow, investments, investments_and_advances, investments_in_property_plant_and_equipment, issuance_of_capital_stock, last_dividend, liabilities_and_stockholders_equity, long_term_debt, long_term_debt_issuance, long_term_debt_payments, long_term_debt_total, long_term_investments, long_term_net_debt_issuance, market_cap, market_cap_rank, market_capitalization_mln, market_dominance, max_supply, minority_interest, minority_interests, negative_goodwill, net_acquisitions, net_borrowings, net_cash_provided_by_financing_activities, net_cash_provided_by_investing_activities, net_cash_provided_by_operating_activities, net_change_in_cash, net_common_stock_issuance, net_debt, net_debt_issuance, net_debt_to_ebitda, net_dividends_paid, net_income, net_income_applicable_to_common_shares, net_income_continuous_operations, net_income_deductions, net_income_from_continuing_operations, net_income_from_continuing_ops, net_income_from_discontinued_operations, net_income_per_share, net_interest_income, net_invested_capital, net_margin, net_preferred_stock_issuance, net_receivables, net_stock_issuance, net_tangible_assets, net_working_capital, non_current_assets_total, non_current_liabilities_other, non_current_liabilities_total, non_currrent_assets_other, non_operating_income_excluding_interest, non_operating_income_net_other, non_recurring, noncontrolling_interest_in_consolidated_entity, operating_cash_flow, operating_cash_flow_per_share, operating_expenses, operating_income, operating_margin, other_adjustments_to_net_income, other_assets, other_cashflows_from_financing_activities, other_cashflows_from_investing_activities, other_current_assets, other_current_liab, other_current_liabilities, other_expenses, other_financing_activities, other_income_expense, other_investing_activities, other_items, other_liab, other_liabilities, other_non_cash_items, other_non_current_assets, other_non_current_liabilities, other_operating_expenses, other_payables, other_receivables, other_short_term_investments, other_stockholder_equity, other_total_stockholders_equity, other_working_capital, payout_ratio, pe_ratio, peg_ratio, percent_insiders, percent_institutions, piotroski_score, preferred_dividends_paid, preferred_stock, preferred_stock_and_other_adjustments, preferred_stock_dividends, preferred_stock_redeemable, preferred_stock_total_equity, prepaid_assets, prepaids, pretax_income, price, price_target_1m, price_target_1y, price_target_3m, price_target_average, price_target_high, price_target_low, price_target_median, price_to_book, price_to_free_cash_flow, price_to_operating_cash_flow, price_to_sales, property_plant_and_equipment_gross, property_plant_and_equipment_net, property_plant_equipment, property_plant_equipment_net, purchase_of_investments, purchases_of_investments, quality_score, quarterly_earnings_growth_yoy, quarterly_revenue_growth_yoy, quick_ratio, reconciled_depreciation, research_and_development, research_and_development_expenses, research_development, restricted_cash, retained_earnings, retained_earnings_total_equity, return_on_assets, return_on_capital_employed, return_on_equity, return_on_invested_capital, revenue, revenue_per_share, revenue_per_share_ttm, rnd_expense, sale_of_investments, sale_purchase_of_stock, sales_maturities_of_investments, selling_and_marketing_expenses, selling_general_administrative, selling_general_and_administrative, selling_general_and_administrative_expenses, sga_expense, shares_float, shares_outstanding, shares_outstanding_basic, shares_outstanding_diluted, shares_short, shares_short_prior_month, short_long_term_debt, short_long_term_debt_total, short_percent, short_percent_float, short_percent_outstanding, short_ratio, short_term_debt, short_term_debt_issuance, short_term_investments, short_term_net_debt_issuance, stock_based_compensation, stock_compensation, stock_repurchases, stockholders_equity, surprise_percent, tax_assets, tax_payable, tax_payables, tax_provision, temporary_equity_redeemable_noncontrolling_interests, total_assets, total_cash_from_financing_activities, total_cash_from_operating_activities, total_cashflows_from_investing_activities, total_current_assets, total_current_liabilities, total_debt, total_equity, total_investments, total_liab, total_liabilities, total_liabilities_and_total_equity, total_non_current_assets, total_non_current_liabilities, total_operating_expenses, total_other_income_expense_net, total_other_income_expenses_net, total_payables, total_permanent_equity, total_revenue, total_stockholder_equity, total_stockholders_equity, total_supply, treasury_stock, value_score, volume_avg, wall_street_target_price, warrants, weighted_average_shs_out, weighted_average_shs_out_dil

Metrics returned as fractions

These come back as fractions, not percentages: a 20% margin is 0.20. Compare against 0.20, never 20.

dividend_yield, payout_ratio, effective_tax_rate, earnings_yield, free_cash_flow_yield, gross_margin, operating_margin, net_margin, ebit_margin, ebitda_margin, return_on_assets, return_on_equity, return_on_invested_capital, return_on_capital_employed, market_dominance

Browse the documentation