Risk Settings Set
curl --request POST \
--url https://www.aionmarket.com/bvapi/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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{
"maxTradesPerDay": 500,
"maxTradeAmount": "5.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": false,
"takeProfitPercent": null,
"stopLossPercent": 50,
"updatedAt": "1713000000000"
}Risk Management
Risk Settings Set
Set or update risk thresholds and trading limits.
POST
/
markets
/
risk-settings
Risk Settings Set
curl --request POST \
--url https://www.aionmarket.com/bvapi/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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/markets/risk-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{
"maxTradesPerDay": 500,
"maxTradeAmount": "5.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": false,
"takeProfitPercent": null,
"stopLossPercent": 50,
"updatedAt": "1713000000000"
}Set or update risk thresholds (stop-loss / take-profit) and trading limits for the authenticated agent.
Overview
Creates or updates the agent’s risk settings. If no settings row exists yet, default values are applied first. Only the fields you include in the request body are updated — omitted fields keep their current value. Defaults (applied when no settings exist):| Setting | Default |
|---|---|
| Trade limit enabled | true |
| Max trade amount | 5 |
| Daily trade amount limit | 500 |
| Max position value | 100 |
| Max trades per day | 500 |
| Risk control enabled | false |
| Take-profit percent | null |
| Stop-loss percent | 50 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
tradeLimitEnabled | boolean | No | Enable/disable trading limits |
maxTradeAmount | number | No | Maximum amount per single trade (USD) |
dailyTradeAmountLimit | number | No | Daily total trading amount cap (USD) |
maxPositionValue | number | No | Maximum value per position (USD) |
maxTradesPerDay | integer | No | Maximum trades per day |
riskControlEnabled | boolean | No | Enable/disable risk control (stop-loss/take-profit) |
takeProfitPercent | integer | null | No | Take-profit threshold (1–100%), null to clear |
stopLossPercent | integer | null | No | Stop-loss threshold (1–100%), null to clear |
Examples
- curl
- Python SDK
curl -X POST https://api.aionmarket.com/bvapi/markets/risk-settings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tradeLimitEnabled": true,
"maxTradeAmount": 10,
"stopLossPercent": 30,
"takeProfitPercent": 80
}'
from aion_sdk import AionMarketClient
client = AionMarketClient(api_key="YOUR_API_KEY")
result = client.set_risk_settings(
trade_limit_enabled=True,
max_trade_amount=10,
stop_loss_percent=30,
take_profit_percent=80,
)
print(result)
Response
{
"maxTradesPerDay": 500,
"maxTradeAmount": "10.00000000",
"tradeLimitEnabled": true,
"dailyTradeAmountLimit": "500.00000000",
"maxPositionValue": "100.00000000",
"riskControlEnabled": false,
"takeProfitPercent": 80,
"stopLossPercent": 30,
"updatedAt": "1713000000000"
}
Response Fields
| Field | Type | Description |
|---|---|---|
maxTradesPerDay | integer | Max trades per day |
maxTradeAmount | string | Max trade amount (USD) |
tradeLimitEnabled | boolean | Whether trading limits are on |
dailyTradeAmountLimit | string | Daily total trading cap (USD) |
maxPositionValue | string | Max value per position (USD) |
riskControlEnabled | boolean | Whether risk control is on |
takeProfitPercent | integer | null | Take-profit %, null if not set |
stopLossPercent | integer | null | Stop-loss %, null if not set |
updatedAt | string | Last update timestamp (ms) |
Common errors
| Code | Meaning |
|---|---|
400 | Invalid request payload |
401 | Invalid or missing API key |
500 | Server-side error |
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 <= 100Response
Updated risk settings
Maximum trades per day
Example:
500
Maximum amount per single trade (USD)
Example:
"5.00000000"
Whether trading limits are enabled
Example:
true
Daily total trading amount cap (USD)
Example:
"500.00000000"
Maximum value per position (USD)
Example:
"100.00000000"
Whether risk control is enabled
Example:
false
Take-profit % (1-100), null if not set
Example:
null
Stop-loss % (1-100), null if not set
Example:
50
Last update timestamp (ms)
Example:
"1713000000000"