curl --request POST \
--url https://alphainsider.com/api/newOrderAllocations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy_id": "<string>",
"allocations": [
{
"stock_id": "<string>",
"percent": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy_id: '<string>', allocations: [{stock_id: '<string>', percent: 1}]})
};
fetch('https://alphainsider.com/api/newOrderAllocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/newOrderAllocations"
payload = {
"strategy_id": "<string>",
"allocations": [
{
"stock_id": "<string>",
"percent": 1
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/newOrderAllocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy_id' => '<string>',
'allocations' => [
[
'stock_id' => '<string>',
'percent' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/newOrderAllocations"
payload := strings.NewReader("{\n \"strategy_id\": \"<string>\",\n \"allocations\": [\n {\n \"stock_id\": \"<string>\",\n \"percent\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"order_id": "l0-nlN5HEe3UdIutvYcDU",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "market",
"action": "buy",
"stop_price": null,
"price": null,
"amount": null,
"total": "1.246293514070567",
"created_at": "2026-01-27T21:12:58.215Z",
"stock_id": "6128jONlulvgURhFwmIb2",
"figi_composite": "BBG000BDTBL9",
"symbol": "SPY",
"name": "SPDR S&P 500 ETF Trust",
"sector": "Exchange Traded Fund",
"security": "stock",
"exchange": "ARCX",
"stock": "SPY",
"peg": "USD",
"provider": "massive",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {
"finviz": "https://www.finviz.com/quote.ashx?t=SPY",
"trading_view": "https://www.tradingview.com/symbols/AMEX-SPY/",
"yahoo_finance": "https://finance.yahoo.com/quote/SPY",
"google_finance": "https://www.google.com/finance/quote/SPY:NYSEARCA"
},
"stock_status": "active",
"bid": "695.42",
"ask": "695.49",
"last": "695.54",
"order_dependencies": []
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}newOrderAllocations
Cancel existing open strategy orders, then create market orders toward the complete target allocation list. Omitted positions close; an empty list closes all positions. Fees and slippage reserves can make resulting exposure differ from the requested percentages.
curl --request POST \
--url https://alphainsider.com/api/newOrderAllocations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy_id": "<string>",
"allocations": [
{
"stock_id": "<string>",
"percent": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy_id: '<string>', allocations: [{stock_id: '<string>', percent: 1}]})
};
fetch('https://alphainsider.com/api/newOrderAllocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/newOrderAllocations"
payload = {
"strategy_id": "<string>",
"allocations": [
{
"stock_id": "<string>",
"percent": 1
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/newOrderAllocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy_id' => '<string>',
'allocations' => [
[
'stock_id' => '<string>',
'percent' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/newOrderAllocations"
payload := strings.NewReader("{\n \"strategy_id\": \"<string>\",\n \"allocations\": [\n {\n \"stock_id\": \"<string>\",\n \"percent\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"order_id": "l0-nlN5HEe3UdIutvYcDU",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "market",
"action": "buy",
"stop_price": null,
"price": null,
"amount": null,
"total": "1.246293514070567",
"created_at": "2026-01-27T21:12:58.215Z",
"stock_id": "6128jONlulvgURhFwmIb2",
"figi_composite": "BBG000BDTBL9",
"symbol": "SPY",
"name": "SPDR S&P 500 ETF Trust",
"sector": "Exchange Traded Fund",
"security": "stock",
"exchange": "ARCX",
"stock": "SPY",
"peg": "USD",
"provider": "massive",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {
"finviz": "https://www.finviz.com/quote.ashx?t=SPY",
"trading_view": "https://www.tradingview.com/symbols/AMEX-SPY/",
"yahoo_finance": "https://finance.yahoo.com/quote/SPY",
"google_finance": "https://www.google.com/finance/quote/SPY:NYSEARCA"
},
"stock_status": "active",
"bid": "695.42",
"ask": "695.49",
"last": "695.54",
"order_dependencies": []
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Body
AlphaInsider strategy identifier.
The allocations array represents the strategy's complete desired position set: any current position omitted from the array is closed, and an empty array closes every position.
Show child attributes
Show child attributes
Slippage fraction reserved when sizing allocation-generated market orders, from 0 to 0.05 (5%). The default 0.002 means 0.2%. This limit is separate from the allocation limit of 2 (200%). Slippage does not set a limit price.
AlphaInsider applies the following conservative sizing buffer internally. BuyingPower = strategy_value * 2; all value amounts use the same normalized portfolio units. fee and Slippage are fractions, not percentages from 0 to 100.
MaxOrderTotal = BuyingPower * 2allows for a full position reversal.ConservativeFeeTotal = MaxOrderTotal * (fee * 2)reserves the collateral cost of fees (stocks: 0%; crypto: 0.25%).ConservativeSlippageTotal = MaxOrderTotal * Slippagereserves cash for price movement.FinalBuyingPower = BuyingPower - ConservativeFeeTotal - ConservativeSlippageTotalis the buying power used to size the targets.
For example, on a display scale where the portfolio is worth $5,000, BuyingPower is $10,000 and MaxOrderTotal is $20,000. With a crypto fee of 0.0025 and slippage of 0.002, the fee reserve is $100 and the slippage reserve is $40, leaving FinalBuyingPower of $9,860. This buffer reduces the sized exposure below the requested target; it is not the final execution price or cash cost. Submit your intended allocation fractions and slippage setting; AlphaInsider applies the buffer automatically.
0 <= x <= 0.05Must be a multiple of 0.001