newBot
curl --request POST \
--url https://alphainsider.com/api/newBot \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"broker_keys": {
"live": true,
"bitfinex_key": "<string>",
"bitfinex_secret": "<string>",
"binance_key": "<string>",
"binance_secret": "<string>",
"alpaca_key": "<string>",
"alpaca_secret": "<string>",
"hyperliquid_key": "<string>",
"hyperliquid_secret": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
broker_keys: {
live: true,
bitfinex_key: '<string>',
bitfinex_secret: '<string>',
binance_key: '<string>',
binance_secret: '<string>',
alpaca_key: '<string>',
alpaca_secret: '<string>',
hyperliquid_key: '<string>',
hyperliquid_secret: '<string>'
}
})
};
fetch('https://alphainsider.com/api/newBot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/newBot"
payload = { "broker_keys": {
"live": True,
"bitfinex_key": "<string>",
"bitfinex_secret": "<string>",
"binance_key": "<string>",
"binance_secret": "<string>",
"alpaca_key": "<string>",
"alpaca_secret": "<string>",
"hyperliquid_key": "<string>",
"hyperliquid_secret": "<string>"
} }
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/newBot",
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([
'broker_keys' => [
'live' => true,
'bitfinex_key' => '<string>',
'bitfinex_secret' => '<string>',
'binance_key' => '<string>',
'binance_secret' => '<string>',
'alpaca_key' => '<string>',
'alpaca_secret' => '<string>',
'hyperliquid_key' => '<string>',
'hyperliquid_secret' => '<string>'
]
]),
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/newBot"
payload := strings.NewReader("{\n \"broker_keys\": {\n \"live\": true,\n \"bitfinex_key\": \"<string>\",\n \"bitfinex_secret\": \"<string>\",\n \"binance_key\": \"<string>\",\n \"binance_secret\": \"<string>\",\n \"alpaca_key\": \"<string>\",\n \"alpaca_secret\": \"<string>\",\n \"hyperliquid_key\": \"<string>\",\n \"hyperliquid_secret\": \"<string>\"\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": {
"bot_id": "h_zZfeqsX9o8hgB8DVc0P",
"user_id": "user_1",
"leverage": "2.000000000000000",
"slippage": "0.005000000000000",
"rebalance_on_start": true,
"close_on_stop": true,
"broker": "alpaca",
"type": "stock",
"live": false,
"account_id": "AAABBBCCC",
"status": "off",
"notifications": [],
"updated_at": "2024-10-23T14:36:02.484Z",
"created_at": "2024-10-23T14:36:02.484Z"
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Bots
newBot
Create new bot.
POST
/
newBot
newBot
curl --request POST \
--url https://alphainsider.com/api/newBot \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"broker_keys": {
"live": true,
"bitfinex_key": "<string>",
"bitfinex_secret": "<string>",
"binance_key": "<string>",
"binance_secret": "<string>",
"alpaca_key": "<string>",
"alpaca_secret": "<string>",
"hyperliquid_key": "<string>",
"hyperliquid_secret": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
broker_keys: {
live: true,
bitfinex_key: '<string>',
bitfinex_secret: '<string>',
binance_key: '<string>',
binance_secret: '<string>',
alpaca_key: '<string>',
alpaca_secret: '<string>',
hyperliquid_key: '<string>',
hyperliquid_secret: '<string>'
}
})
};
fetch('https://alphainsider.com/api/newBot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/newBot"
payload = { "broker_keys": {
"live": True,
"bitfinex_key": "<string>",
"bitfinex_secret": "<string>",
"binance_key": "<string>",
"binance_secret": "<string>",
"alpaca_key": "<string>",
"alpaca_secret": "<string>",
"hyperliquid_key": "<string>",
"hyperliquid_secret": "<string>"
} }
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/newBot",
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([
'broker_keys' => [
'live' => true,
'bitfinex_key' => '<string>',
'bitfinex_secret' => '<string>',
'binance_key' => '<string>',
'binance_secret' => '<string>',
'alpaca_key' => '<string>',
'alpaca_secret' => '<string>',
'hyperliquid_key' => '<string>',
'hyperliquid_secret' => '<string>'
]
]),
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/newBot"
payload := strings.NewReader("{\n \"broker_keys\": {\n \"live\": true,\n \"bitfinex_key\": \"<string>\",\n \"bitfinex_secret\": \"<string>\",\n \"binance_key\": \"<string>\",\n \"binance_secret\": \"<string>\",\n \"alpaca_key\": \"<string>\",\n \"alpaca_secret\": \"<string>\",\n \"hyperliquid_key\": \"<string>\",\n \"hyperliquid_secret\": \"<string>\"\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": {
"bot_id": "h_zZfeqsX9o8hgB8DVc0P",
"user_id": "user_1",
"leverage": "2.000000000000000",
"slippage": "0.005000000000000",
"rebalance_on_start": true,
"close_on_stop": true,
"broker": "alpaca",
"type": "stock",
"live": false,
"account_id": "AAABBBCCC",
"status": "off",
"notifications": [],
"updated_at": "2024-10-23T14:36:02.484Z",
"created_at": "2024-10-23T14:36:02.484Z"
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Body
application/json
⌘I