getPositions
curl --request GET \
--url https://alphainsider.com/api/getPositionsconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getPositions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getPositions"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getPositions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/getPositions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"position_id": "PAiBXHzE10Fa4ioITCXbX",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "liability",
"price": "1.000000000000000",
"amount": "-0.932626292686600",
"total": "-0.932626292686600",
"updated_at": "2024-07-18T20:14:44.660Z",
"created_at": "2024-07-18T20:14:44.660Z",
"stock_id": "ubfhvYUsgvMIuJPwr76My",
"figi_composite": null,
"symbol": "USD",
"name": "US Dollar",
"sector": "Unallocated",
"security": "",
"exchange": "ALPHAINSIDER",
"stock": "USD",
"peg": "USD",
"provider": "alphainsider",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {},
"stock_status": "active",
"bid": "1.000000000000000",
"ask": "1.000000000000000",
"last": "1.000000000000000"
},
{
"position_id": "XoLx1OyDdRBr_yq4JHJdB",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "asset",
"price": "2996.940000000000000",
"amount": "0.000647643919923",
"total": "1.940949969374036",
"updated_at": "2024-07-18T20:14:44.660Z",
"created_at": "2024-05-08T19:51:06.230Z",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"figi_composite": null,
"symbol": "ETH-USD",
"name": "Ethereum",
"sector": "Cryptocurrencies",
"security": "cryptocurrency",
"exchange": "COINBASE",
"stock": "ETH-USD",
"peg": "USD",
"provider": "coinbase",
"slippage": "0.000000000000000",
"fee": "0.002500000000000",
"links": {
"trading_view": "https://www.tradingview.com/symbols/ETHUSD/?exchange=COINBASE",
"yahoo_finance": "https://finance.yahoo.com/quote/ETH-USD",
"coin_marketcap": "https://coinmarketcap.com/currencies/ethereum/",
"google_finance": "https://www.google.com/finance/quote/ETH-USD"
},
"stock_status": "active",
"bid": "2633.09",
"ask": "2633.09",
"last": "2633.09"
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Trades
getPositions
Get strategy positions.
GET
/
getPositions
getPositions
curl --request GET \
--url https://alphainsider.com/api/getPositionsconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getPositions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getPositions"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getPositions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/getPositions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"position_id": "PAiBXHzE10Fa4ioITCXbX",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "liability",
"price": "1.000000000000000",
"amount": "-0.932626292686600",
"total": "-0.932626292686600",
"updated_at": "2024-07-18T20:14:44.660Z",
"created_at": "2024-07-18T20:14:44.660Z",
"stock_id": "ubfhvYUsgvMIuJPwr76My",
"figi_composite": null,
"symbol": "USD",
"name": "US Dollar",
"sector": "Unallocated",
"security": "",
"exchange": "ALPHAINSIDER",
"stock": "USD",
"peg": "USD",
"provider": "alphainsider",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {},
"stock_status": "active",
"bid": "1.000000000000000",
"ask": "1.000000000000000",
"last": "1.000000000000000"
},
{
"position_id": "XoLx1OyDdRBr_yq4JHJdB",
"strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
"type": "asset",
"price": "2996.940000000000000",
"amount": "0.000647643919923",
"total": "1.940949969374036",
"updated_at": "2024-07-18T20:14:44.660Z",
"created_at": "2024-05-08T19:51:06.230Z",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"figi_composite": null,
"symbol": "ETH-USD",
"name": "Ethereum",
"sector": "Cryptocurrencies",
"security": "cryptocurrency",
"exchange": "COINBASE",
"stock": "ETH-USD",
"peg": "USD",
"provider": "coinbase",
"slippage": "0.000000000000000",
"fee": "0.002500000000000",
"links": {
"trading_view": "https://www.tradingview.com/symbols/ETHUSD/?exchange=COINBASE",
"yahoo_finance": "https://finance.yahoo.com/quote/ETH-USD",
"coin_marketcap": "https://coinmarketcap.com/currencies/ethereum/",
"google_finance": "https://www.google.com/finance/quote/ETH-USD"
},
"stock_status": "active",
"bid": "2633.09",
"ask": "2633.09",
"last": "2633.09"
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Query Parameters
AlphaInsider strategy identifier.
⌘I