Skip to main content
AlphaInsider stores strategy values and quantities in normalized units. Use this guide to convert API responses for display and prepare order inputs. AlphaInsider calculates the multiplier, order capacity, and trade execution results for you.

Core model

AlphaInsider strategies use normalized internal values:
  • strategy_value measures the strategy’s normalized portfolio value.
  • Position amount and order amount/total are strategy-normalized units.
  • price, bid, ask, last, and stop/limit prices are real market prices.
  • input_multiplier converts strategy-normalized units into the user’s display units.
  • Fetch input_multiplier from GET /getStrategySubscriptions.
  • Preview a subscriber calculation with GET /getStrategyCalculation; save it with POST /updateStrategyCalculation. Supply strategy_id, input_value, and input_date, then use the returned multiplier.
  • API numeric values may arrive as strings. Convert before doing math.
Convert strategy_value, position amount, and order total before showing them as dollars or shares.

Missing multiplier

Strategy owners have an input_multiplier. If yours is missing, refresh the subscription/calculation context before displaying values or sizing fixed orders.Subscribers may have input_multiplier: null. When it is missing:
  • Do not silently treat it as 1.
  • Show clearly labeled percentages derived from strategy_value, or supply input_value and input_date for a calculation.
  • Do not size a fixed newOrder from user-visible shares/USD until a multiplier exists.

Display formulas

Use these formulas when showing positions, cash, shares, crypto, or portfolio values to a user.Use bid for long assets, ask for short liabilities, and 1 for cash.For example, a normalized quantity of 0.0125 with a multiplier of 4000 represents 50 shares. A normalized portfolio value of 3 represents $12,000. The multiplier must be positive, and percentage calculations require a nonzero denominator. If a required value is missing or invalid, leave that calculation unavailable.The portfolio percentage describes its value relative to the normalized starting value. A strategy_value of 1.2 means 120% of that baseline, or a 20% gain from a baseline of 1.

Order endpoint choice

Check GET /getMaxOrderSize before large or leveraged fixed orders. Its quantity and cash limits use the same normalized units as order inputs. A returned cash capacity of 2 with a multiplier of 4000 represents $8,000 before reserves for fees and slippage.

newOrder

newOrder accepts exactly one of amount or total.
  • amount is strategy-normalized shares or crypto units.
  • total is strategy-normalized cash.
  • If the user gives a share or crypto count, send amount = user_visible_amount / input_multiplier.
  • If the user gives a USD amount, send total = user_visible_dollars / input_multiplier.
  • Do not use newOrder with user-visible shares/USD when input_multiplier is missing.
Open order responses from getOrders, newOrder, newOrderAllocations, newOrderWebhook, and wsOrders include order_dependencies as prerequisite order IDs. [] means no outstanding prerequisite.An amount order fixes the quantity received on a buy or removed on a sell. A total order fixes the cash spent on a buy or received on a sell. Fees affect the other side: buying an exact quantity costs more than quantity times price, while selling an exact quantity returns less. Prices and stop prices stay in market-price units.Limit orders require price; stop-market orders require stop_price; stop-limit and OCO orders require both. An accepted order is open and may wait for a price trigger, a prerequisite, or an open market. Check positions and trade activity before treating it as completed. Cancelling a prerequisite releases dependent orders, so check the remaining orders after a cancellation.

newOrderAllocations

Use newOrderAllocations when the user wants target portfolio percents instead of exact shares/USD.Before submitting allocation-generated orders, this endpoint cancels any existing open orders for the strategy.
  • Send target percents as documented in OpenAPI.
  • Do not apply input_multiplier.
  • Do not send order_dependencies in the request.
  • Allocation-generated increase orders may depend on reduce orders; read returned order_dependencies before assuming an order can fill immediately.
  • Send the complete desired position set. Omitted positions close; an empty list closes all positions. Fractions such as 0.25 mean 25%.

Webhooks and streams

newOrderWebhook is for signal-style actions and uses api_token in the body. It does not need multiplier math. By default each alert goes fully in or out of the position at leverage; the optional pyramiding integer splits entry into steps across same-direction alerts. AlphaInsider calculates each step’s order size.Before submitting a new order, newOrderWebhook cancels any existing open orders for the strategy.For live displays, subscribe to:
  • wsStrategyValue:<strategy_id> for live strategy_value.
  • wsPositions:<strategy_id> for position changes.
  • wsOrders:<strategy_id> for open order changes and order_dependencies.
Refresh subscription/calculation context after strategy resets before displaying normalized values.Fixed, allocation, and webhook orders share the order limit. If a submission times out, check the current orders, positions, and timeline before trying again. An order’s absence from the open-order list alone does not establish whether it filled.