Skip to main content
POST
newOrderWebhook

Body

application/json
strategy_id
string
required

AlphaInsider strategy identifier.

stock_id
string
required

AlphaInsider stock identifier, or SYMBOL:EXCHANGE in requests.

action
enum<string>
required

Order actions. Action "buy" is the same as "long", "sell" is the same as "short", "close" is the same as "flat". For TradingView webhooks, use {{strategy.market_position}} to supply the strategy action. See TradingView strategy alert guide for full list of automated actions.

Available options:
buy,
long,
sell,
short,
close,
flat
api_token
string<JWT>
required

User API token with newOrder permission.

leverage
number
default:1

Leverage to trade at. Defaults to 1 if not set.

Required range: 0 <= x <= 2Must be a multiple of 0.01
pyramiding
integer

Number of entry steps used to reach the chosen leverage. The target exposure added by one step is leverage / pyramiding, measured as a multiple of the strategy's portfolio value.

For example, leverage: 2 and pyramiding: 4 give a step size of 2 / 4 = 0.5, or 50% of the portfolio value. Starting from no position, with each prior step filled, successive same-direction alerts target 0.5x, 1x, 1.5x, and 2x exposure (50%, 100%, 150%, and 200%). These are target levels; fees, sizing reserves, and market changes affect the resulting position.

AlphaInsider determines the current step from the filled holdings when each alert arrives, so an accepted but unfilled alert does not advance the position. At full leverage, further same-direction alerts rebalance toward the full target. An opposite-direction alert reverses to the first step on the new side: in the example, a long position becomes a 0.5x short target. "close"/"flat" or leverage: 0 closes the strategy's positions. Without pyramiding, each alert goes directly to the full leverage target or closes the position. Send leverage and pyramiding; AlphaInsider calculates the order sizes.

Required range: 1 <= x <= 100
slippage
number
default:0.002

Slippage fraction used in sizing reserves for allocation-generated market orders. Defaults to 0.002. It does not set a limit price.

Required range: 0 <= x <= 0.05Must be a multiple of 0.001

Response

Request was successful.

success
boolean

True when the request succeeded.

response
object

Endpoint-specific response payload, or an error message when success is false.