updateStrategyCalculation
curl --request POST \
--url https://alphainsider.com/api/updateStrategyCalculation \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy_id": "<string>",
"input_value": 123,
"input_date": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy_id: '<string>', input_value: 123, input_date: '2023-11-07T05:31:56Z'})
};
fetch('https://alphainsider.com/api/updateStrategyCalculation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/updateStrategyCalculation"
payload = {
"strategy_id": "<string>",
"input_value": 123,
"input_date": "2023-11-07T05:31:56Z"
}
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/updateStrategyCalculation",
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>',
'input_value' => 123,
'input_date' => '2023-11-07T05:31:56Z'
]),
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/updateStrategyCalculation"
payload := strings.NewReader("{\n \"strategy_id\": \"<string>\",\n \"input_value\": 123,\n \"input_date\": \"2023-11-07T05:31:56Z\"\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": {
"strategy_id": "WuRnay0CF3P1oPRSdogj5",
"strategy_owner": "user_1",
"type": "cryptocurrency",
"private": false,
"strategy_value": "1.262810315036981",
"invoice_id": null,
"end_date": null,
"subscription_id": "AHjZ3_-QwEyO--eLt-P6r",
"user_id": "user_2",
"product_id": "1bRPI9xQHhE23KpAXViKW",
"input_value": "1000.000000000000000",
"input_date": "2024-10-22T20:00:00.000Z",
"input_multiplier": "791.884567375200223",
"notifications": [],
"renew": true,
"status": "active",
"updated_at": "2024-10-22T20:50:54.838Z",
"created_at": "2024-09-18T13:33:59.750Z"
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Subscriptions
updateStrategyCalculation
Update relative strategy calculations.
POST
/
updateStrategyCalculation
updateStrategyCalculation
curl --request POST \
--url https://alphainsider.com/api/updateStrategyCalculation \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy_id": "<string>",
"input_value": 123,
"input_date": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy_id: '<string>', input_value: 123, input_date: '2023-11-07T05:31:56Z'})
};
fetch('https://alphainsider.com/api/updateStrategyCalculation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/updateStrategyCalculation"
payload = {
"strategy_id": "<string>",
"input_value": 123,
"input_date": "2023-11-07T05:31:56Z"
}
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/updateStrategyCalculation",
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>',
'input_value' => 123,
'input_date' => '2023-11-07T05:31:56Z'
]),
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/updateStrategyCalculation"
payload := strings.NewReader("{\n \"strategy_id\": \"<string>\",\n \"input_value\": 123,\n \"input_date\": \"2023-11-07T05:31:56Z\"\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": {
"strategy_id": "WuRnay0CF3P1oPRSdogj5",
"strategy_owner": "user_1",
"type": "cryptocurrency",
"private": false,
"strategy_value": "1.262810315036981",
"invoice_id": null,
"end_date": null,
"subscription_id": "AHjZ3_-QwEyO--eLt-P6r",
"user_id": "user_2",
"product_id": "1bRPI9xQHhE23KpAXViKW",
"input_value": "1000.000000000000000",
"input_date": "2024-10-22T20:00:00.000Z",
"input_multiplier": "791.884567375200223",
"notifications": [],
"renew": true,
"status": "active",
"updated_at": "2024-10-22T20:50:54.838Z",
"created_at": "2024-09-18T13:33:59.750Z"
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Body
application/json
⌘I