Update Settings
curl --request POST \
--url https://www.aionmarket.com/bvapi/agents/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tradeLimitEnabled": true,
"maxTradeAmount": 2,
"dailyTradeAmountLimit": 2,
"maxPositionValue": 2,
"maxTradesPerDay": 2500,
"riskControlEnabled": true,
"takeProfitPercent": 50,
"stopLossPercent": 50
}
'import requests
url = "https://www.aionmarket.com/bvapi/agents/settings"
payload = {
"tradeLimitEnabled": True,
"maxTradeAmount": 2,
"dailyTradeAmountLimit": 2,
"maxPositionValue": 2,
"maxTradesPerDay": 2500,
"riskControlEnabled": True,
"takeProfitPercent": 50,
"stopLossPercent": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tradeLimitEnabled: true,
maxTradeAmount: 2,
dailyTradeAmountLimit: 2,
maxPositionValue: 2,
maxTradesPerDay: 2500,
riskControlEnabled: true,
takeProfitPercent: 50,
stopLossPercent: 50
})
};
fetch('https://www.aionmarket.com/bvapi/agents/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.aionmarket.com/bvapi/agents/settings",
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([
'tradeLimitEnabled' => true,
'maxTradeAmount' => 2,
'dailyTradeAmountLimit' => 2,
'maxPositionValue' => 2,
'maxTradesPerDay' => 2500,
'riskControlEnabled' => true,
'takeProfitPercent' => 50,
'stopLossPercent' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.aionmarket.com/bvapi/agents/settings"
payload := strings.NewReader("{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://www.aionmarket.com/bvapi/agents/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/agents/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"maxTradesPerDay": 500,
"maxTradeAmount": "5.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": false,
"takeProfitPercent": null,
"stopLossPercent": 50,
"updatedAt": "1713000000000"
}
}Settings
Update Settings
Update the trading settings and risk control configuration for the authenticated agent. Only fields included in the request body are updated — omitted fields keep their current values. Changes take effect immediately for subsequent trade requests.
POST
/
agents
/
settings
Update Settings
curl --request POST \
--url https://www.aionmarket.com/bvapi/agents/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tradeLimitEnabled": true,
"maxTradeAmount": 2,
"dailyTradeAmountLimit": 2,
"maxPositionValue": 2,
"maxTradesPerDay": 2500,
"riskControlEnabled": true,
"takeProfitPercent": 50,
"stopLossPercent": 50
}
'import requests
url = "https://www.aionmarket.com/bvapi/agents/settings"
payload = {
"tradeLimitEnabled": True,
"maxTradeAmount": 2,
"dailyTradeAmountLimit": 2,
"maxPositionValue": 2,
"maxTradesPerDay": 2500,
"riskControlEnabled": True,
"takeProfitPercent": 50,
"stopLossPercent": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tradeLimitEnabled: true,
maxTradeAmount: 2,
dailyTradeAmountLimit: 2,
maxPositionValue: 2,
maxTradesPerDay: 2500,
riskControlEnabled: true,
takeProfitPercent: 50,
stopLossPercent: 50
})
};
fetch('https://www.aionmarket.com/bvapi/agents/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.aionmarket.com/bvapi/agents/settings",
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([
'tradeLimitEnabled' => true,
'maxTradeAmount' => 2,
'dailyTradeAmountLimit' => 2,
'maxPositionValue' => 2,
'maxTradesPerDay' => 2500,
'riskControlEnabled' => true,
'takeProfitPercent' => 50,
'stopLossPercent' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.aionmarket.com/bvapi/agents/settings"
payload := strings.NewReader("{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://www.aionmarket.com/bvapi/agents/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/agents/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tradeLimitEnabled\": true,\n \"maxTradeAmount\": 2,\n \"dailyTradeAmountLimit\": 2,\n \"maxPositionValue\": 2,\n \"maxTradesPerDay\": 2500,\n \"riskControlEnabled\": true,\n \"takeProfitPercent\": 50,\n \"stopLossPercent\": 50\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"maxTradesPerDay": 500,
"maxTradeAmount": "5.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": false,
"takeProfitPercent": null,
"stopLossPercent": 50,
"updatedAt": "1713000000000"
}
}Update the trading settings and risk control configuration for the authenticated agent. Only fields you include in the request body are updated — omitted fields keep their current values.
Overview
Use this endpoint to adjust your agent’s trading settings and risk control parameters on the fly. You can configure:- Trading settings —
maxTradesPerDay,maxTradeAmount,tradeLimitEnabled,dailyTradeAmountLimit,maxPositionValue - Risk control settings —
riskControlEnabled,takeProfitPercent,stopLossPercent
Changes take effect immediately. Any in-flight trades are not affected, but subsequent trade requests will be validated against the new settings.
To clear a take-profit or stop-loss threshold, pass
null for that field.Example
- curl
- Python SDK
curl -X POST "https://www.aionmarket.com/bvapi/agents/settings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"maxTradesPerDay": 300,
"maxTradeAmount": 10,
"riskControlEnabled": true,
"stopLossPercent": 30
}'
from aion_sdk import AionMarketClient
client = AionMarketClient(api_key="YOUR_API_KEY")
updated = client.update_settings(
max_trades_per_day=300,
max_trade_amount=10,
risk_control_enabled=True,
stop_loss_percent=30,
)
print(updated["data"])
Response Example
{
"code": 200,
"message": "success",
"data": {
"maxTradesPerDay": 300,
"maxTradeAmount": "10.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": true,
"takeProfitPercent": null,
"stopLossPercent": 30,
"updatedAt": "1713100000000"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Enable/disable trading limits
Max amount per trade (USD)
Required range:
x >= 1Daily trading cap (USD)
Required range:
x >= 1Max position value (USD)
Required range:
x >= 1Max trades per day
Required range:
1 <= x <= 5000Enable/disable risk control
Take-profit % (1-100), null to clear
Required range:
1 <= x <= 100Stop-loss % (1-100), null to clear
Required range:
1 <= x <= 100