- REST API:
https://alphainsider.com/api - WebSocket:
wss://alphainsider.com/ws - OpenAPI: https://api.alphainsider.com/openapi.yaml
- Trading calculations: Trading guide
Bot model
Strategies use normalized values. A bot’s broker balance, cash, and positions use real account units, so they do not needinput_multiplier conversion. Strategy positions nested inside bot allocation responses still use normalized units.Rebalancing affects the connected broker account: it cancels existing open broker orders and can close holdings outside the bot’s targets. Consider the account’s existing positions before starting or changing an active bot.
Lifecycle
Create a bot withnewBot, set its complete strategy allocation list with updateBotAllocations, review its settings, and call startBot. The bot must be off, have valid broker access and configured allocations, and meet account limits. Starting requires at least $2,000 for stocks or $100 for crypto in the broker account.New bots start off with leverage 2, slippage 0.005 (0.5%), rebalance_on_start: true, and close_on_stop: true. Review these settings through getBots. updateBotSettings saves changes; start/stop request overrides apply only to that call. Use updateBotNotifications to choose activity notifications.Changing allocations or leverage on an active bot can schedule a rebalance. Start, stop, and reset requests can finish before broker execution does. Check
getBots or wsBotStatus:<bot_id> for off, scheduled_rebalance, rebalancing, on, scheduled_close, closing, or stopping.Allocation rules
updateBotAllocations replaces the complete allocation list. Each entry has a unique strategy_id and a percent fraction from 0 to 1, in increments of 0.0001. For example, 0.25 means 25%. The sum cannot exceed 1, even when the bot uses leverage. Each strategy needs an active subscription and must match the bot’s stock or crypto type; positive allocations require a positive strategy value.For a $10,000 portfolio, an allocation of 0.25 represents a $2,500 budget. Broker buying power, leverage, strategy positions, fees, and overlapping holdings affect the resulting exposure. Unallocated budget does not directly predict the broker’s cash balance.Allocation weights change with strategy performance and leverage. getBotAllocations returns the adjusted weights. When editing one allocation, review all current weights and submit the full intended target list using valid input increments. Copying the response back unchanged can fail because response percentages can have more precision than update inputs accept. An empty list removes every allocation and can cause an active bot to close holdings during rebalancing.Broker keys
Keep broker credentials out of messages, logs, and source control. Send only the fields for the selected broker.- Lighter uses an Ethereum L1 wallet address in
lighter_keyand the private API key for the selected main account or sub-account inlighter_secret. AlphaInsider resolves the account and API-key indexes; the returnedaccount_idis the internal account index. - Hyperliquid accepts a master-account or sub-account address with or without its displayed
HL:prefix. updateBotBrokerKeysrotates credentials for the same broker account and paper/live mode. Create a new bot to change the broker, account, or mode.
getBotInfo.broker_status before starting or restarting. This field describes broker access; execution status comes from getBots or wsBotStatus.Monitoring
Check both HTTP status and the response’s
success flag. After a timeout, inspect the bot’s current state before repeating a change. See WebSockets for stream subscriptions and Limits for account limits.