getBotInfo
curl --request GET \
--url https://alphainsider.com/api/getBotInfo \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getBotInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getBotInfo"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getBotInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/getBotInfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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",
"broker": "alpaca",
"type": "stock",
"live": false,
"account_id": "AAABBBCCC",
"broker_status": "valid",
"broker_details": {
"margin_type": "reg_t",
"value": "93003.68",
"buying_power": "186007.36",
"min_total": "1",
"max_leverage": "2",
"initial_buying_power_percent": "0.95",
"positions": [
{
"broker_stock_id": "COIN",
"amount": "105.16414",
"bid": "338",
"ask": "356.99"
},
{
"broker_stock_id": "INTC",
"amount": "-617.19069",
"bid": "34.08",
"ask": "0"
},
{
"broker_stock_id": "PLTR",
"amount": "156.39204",
"bid": "179.7",
"ask": "179.76"
},
{
"broker_stock_id": "TSLA",
"amount": "12.45853",
"bid": "405.26",
"ask": "0"
},
{
"broker_stock_id": "XYZ",
"amount": "348.94207",
"bid": "73.28",
"ask": "76.81"
}
]
}
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Bots
getBotInfo
Get bot info.
GET
/
getBotInfo
getBotInfo
curl --request GET \
--url https://alphainsider.com/api/getBotInfo \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getBotInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getBotInfo"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getBotInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/getBotInfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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",
"broker": "alpaca",
"type": "stock",
"live": false,
"account_id": "AAABBBCCC",
"broker_status": "valid",
"broker_details": {
"margin_type": "reg_t",
"value": "93003.68",
"buying_power": "186007.36",
"min_total": "1",
"max_leverage": "2",
"initial_buying_power_percent": "0.95",
"positions": [
{
"broker_stock_id": "COIN",
"amount": "105.16414",
"bid": "338",
"ask": "356.99"
},
{
"broker_stock_id": "INTC",
"amount": "-617.19069",
"bid": "34.08",
"ask": "0"
},
{
"broker_stock_id": "PLTR",
"amount": "156.39204",
"bid": "179.7",
"ask": "179.76"
},
{
"broker_stock_id": "TSLA",
"amount": "12.45853",
"bid": "405.26",
"ask": "0"
},
{
"broker_stock_id": "XYZ",
"amount": "348.94207",
"bid": "73.28",
"ask": "76.81"
}
]
}
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Query Parameters
AlphaInsider bot identifier.
⌘I