API Reference
Rules
Trading rules and automation configuration
List Rules
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Query Parameters
enabled_only?boolean
Only return enabled rules
Default
falseResponse Body
application/json
application/json
curl -X GET "https://loading/api/rules"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Create Rule
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Request Body
application/json
name*string
Rule name
Length
1 <= length <= 255description?|
Rule description
rule_type*string
Type of rule
Value in
"price_alert" | "portfolio_rebalance" | "stop_loss" | "take_profit" | "custom"conditions*
Rule conditions/triggers
actions*
Actions to execute when rule triggers
enabled?boolean
Whether rule is active
Default
trueResponse Body
application/json
application/json
curl -X POST "https://loading/api/rules" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "rule_type": "price_alert", "conditions": {}, "actions": {} }'{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Delete Rule
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
rule_id*string
Response Body
application/json
application/json
curl -X DELETE "https://loading/api/rules/string"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Update Rule
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
rule_id*string
Request Body
application/json
name?|
Rule name
description?|
Rule description
conditions?|
Rule conditions/triggers
actions?|
Actions to execute
enabled?|
Whether rule is active
Response Body
application/json
application/json
curl -X PUT "https://loading/api/rules/string" \ -H "Content-Type: application/json" \ -d '{}'{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Execute Rule
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
rule_id*string
Response Body
application/json
application/json
curl -X POST "https://loading/api/rules/string/execute"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}