Check trades
curl --request POST \
--url https://api.abacuslabs.ai/v1/trades/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trades": [
{
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"quantity": 123,
"lots": [
"<string>"
]
}
],
"accounts": [
{}
],
"account_id": "<string>",
"account": {},
"snapshot_id": "<string>",
"policy": {
"goal": "<string>",
"benchmark": "<string>",
"tracking_error": 123,
"max_volatility": 1,
"tax": {
"max_tax": 123,
"max_gain": 1,
"rates": {}
},
"cash": {
"min": 1,
"max": 1,
"invest": true
},
"keep": [
"<string>"
],
"exclude": [
"<string>"
],
"buy_only": [
"<string>"
],
"positions": {},
"sectors": {},
"max_names": 2,
"max_position": 0.5,
"trading": {
"whole_shares": true,
"min_trade": 1,
"max_trades": 2,
"max_turnover": 0.5,
"no_sells": true
},
"theme": "<string>",
"trades": [
{}
],
"monitor": {
"webhook": "<string>",
"secret": "<string>",
"harvest": true,
"drift": 0.5,
"rule_break": true
},
"exclude_themes": [
"<string>"
]
},
"max_credits": 1,
"constraints": {},
"tax_rates": {},
"wash_sale_policy": "same_index",
"benchmark": "<string>",
"detail": "compact"
}
'import requests
url = "https://api.abacuslabs.ai/v1/trades/check"
payload = {
"trades": [
{
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"quantity": 123,
"lots": ["<string>"]
}
],
"accounts": [{}],
"account_id": "<string>",
"account": {},
"snapshot_id": "<string>",
"policy": {
"goal": "<string>",
"benchmark": "<string>",
"tracking_error": 123,
"max_volatility": 1,
"tax": {
"max_tax": 123,
"max_gain": 1,
"rates": {}
},
"cash": {
"min": 1,
"max": 1,
"invest": True
},
"keep": ["<string>"],
"exclude": ["<string>"],
"buy_only": ["<string>"],
"positions": {},
"sectors": {},
"max_names": 2,
"max_position": 0.5,
"trading": {
"whole_shares": True,
"min_trade": 1,
"max_trades": 2,
"max_turnover": 0.5,
"no_sells": True
},
"theme": "<string>",
"trades": [{}],
"monitor": {
"webhook": "<string>",
"secret": "<string>",
"harvest": True,
"drift": 0.5,
"rule_break": True
},
"exclude_themes": ["<string>"]
},
"max_credits": 1,
"constraints": {},
"tax_rates": {},
"wash_sale_policy": "same_index",
"benchmark": "<string>",
"detail": "compact"
}
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({
trades: [
{
symbol: '<string>',
side: '<string>',
qty: 123,
quantity: 123,
lots: ['<string>']
}
],
accounts: [{}],
account_id: '<string>',
account: {},
snapshot_id: '<string>',
policy: {
goal: '<string>',
benchmark: '<string>',
tracking_error: 123,
max_volatility: 1,
tax: {max_tax: 123, max_gain: 1, rates: {}},
cash: {min: 1, max: 1, invest: true},
keep: ['<string>'],
exclude: ['<string>'],
buy_only: ['<string>'],
positions: {},
sectors: {},
max_names: 2,
max_position: 0.5,
trading: {
whole_shares: true,
min_trade: 1,
max_trades: 2,
max_turnover: 0.5,
no_sells: true
},
theme: '<string>',
trades: [{}],
monitor: {
webhook: '<string>',
secret: '<string>',
harvest: true,
drift: 0.5,
rule_break: true
},
exclude_themes: ['<string>']
},
max_credits: 1,
constraints: {},
tax_rates: {},
wash_sale_policy: 'same_index',
benchmark: '<string>',
detail: 'compact'
})
};
fetch('https://api.abacuslabs.ai/v1/trades/check', 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://api.abacuslabs.ai/v1/trades/check",
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([
'trades' => [
[
'symbol' => '<string>',
'side' => '<string>',
'qty' => 123,
'quantity' => 123,
'lots' => [
'<string>'
]
]
],
'accounts' => [
[
]
],
'account_id' => '<string>',
'account' => [
],
'snapshot_id' => '<string>',
'policy' => [
'goal' => '<string>',
'benchmark' => '<string>',
'tracking_error' => 123,
'max_volatility' => 1,
'tax' => [
'max_tax' => 123,
'max_gain' => 1,
'rates' => [
]
],
'cash' => [
'min' => 1,
'max' => 1,
'invest' => true
],
'keep' => [
'<string>'
],
'exclude' => [
'<string>'
],
'buy_only' => [
'<string>'
],
'positions' => [
],
'sectors' => [
],
'max_names' => 2,
'max_position' => 0.5,
'trading' => [
'whole_shares' => true,
'min_trade' => 1,
'max_trades' => 2,
'max_turnover' => 0.5,
'no_sells' => true
],
'theme' => '<string>',
'trades' => [
[
]
],
'monitor' => [
'webhook' => '<string>',
'secret' => '<string>',
'harvest' => true,
'drift' => 0.5,
'rule_break' => true
],
'exclude_themes' => [
'<string>'
]
],
'max_credits' => 1,
'constraints' => [
],
'tax_rates' => [
],
'wash_sale_policy' => 'same_index',
'benchmark' => '<string>',
'detail' => 'compact'
]),
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://api.abacuslabs.ai/v1/trades/check"
payload := strings.NewReader("{\n \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\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://api.abacuslabs.ai/v1/trades/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacuslabs.ai/v1/trades/check")
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 \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Trade checks
Check trades
status pass (the list is legal as sent), repaired (the returned option is the nearest legal list; violations name what was wrong), or rejected (nothing survives repair). Always 200: a failing check is an answer, not an error.
POST
/
trades
/
check
Check trades
curl --request POST \
--url https://api.abacuslabs.ai/v1/trades/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trades": [
{
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"quantity": 123,
"lots": [
"<string>"
]
}
],
"accounts": [
{}
],
"account_id": "<string>",
"account": {},
"snapshot_id": "<string>",
"policy": {
"goal": "<string>",
"benchmark": "<string>",
"tracking_error": 123,
"max_volatility": 1,
"tax": {
"max_tax": 123,
"max_gain": 1,
"rates": {}
},
"cash": {
"min": 1,
"max": 1,
"invest": true
},
"keep": [
"<string>"
],
"exclude": [
"<string>"
],
"buy_only": [
"<string>"
],
"positions": {},
"sectors": {},
"max_names": 2,
"max_position": 0.5,
"trading": {
"whole_shares": true,
"min_trade": 1,
"max_trades": 2,
"max_turnover": 0.5,
"no_sells": true
},
"theme": "<string>",
"trades": [
{}
],
"monitor": {
"webhook": "<string>",
"secret": "<string>",
"harvest": true,
"drift": 0.5,
"rule_break": true
},
"exclude_themes": [
"<string>"
]
},
"max_credits": 1,
"constraints": {},
"tax_rates": {},
"wash_sale_policy": "same_index",
"benchmark": "<string>",
"detail": "compact"
}
'import requests
url = "https://api.abacuslabs.ai/v1/trades/check"
payload = {
"trades": [
{
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"quantity": 123,
"lots": ["<string>"]
}
],
"accounts": [{}],
"account_id": "<string>",
"account": {},
"snapshot_id": "<string>",
"policy": {
"goal": "<string>",
"benchmark": "<string>",
"tracking_error": 123,
"max_volatility": 1,
"tax": {
"max_tax": 123,
"max_gain": 1,
"rates": {}
},
"cash": {
"min": 1,
"max": 1,
"invest": True
},
"keep": ["<string>"],
"exclude": ["<string>"],
"buy_only": ["<string>"],
"positions": {},
"sectors": {},
"max_names": 2,
"max_position": 0.5,
"trading": {
"whole_shares": True,
"min_trade": 1,
"max_trades": 2,
"max_turnover": 0.5,
"no_sells": True
},
"theme": "<string>",
"trades": [{}],
"monitor": {
"webhook": "<string>",
"secret": "<string>",
"harvest": True,
"drift": 0.5,
"rule_break": True
},
"exclude_themes": ["<string>"]
},
"max_credits": 1,
"constraints": {},
"tax_rates": {},
"wash_sale_policy": "same_index",
"benchmark": "<string>",
"detail": "compact"
}
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({
trades: [
{
symbol: '<string>',
side: '<string>',
qty: 123,
quantity: 123,
lots: ['<string>']
}
],
accounts: [{}],
account_id: '<string>',
account: {},
snapshot_id: '<string>',
policy: {
goal: '<string>',
benchmark: '<string>',
tracking_error: 123,
max_volatility: 1,
tax: {max_tax: 123, max_gain: 1, rates: {}},
cash: {min: 1, max: 1, invest: true},
keep: ['<string>'],
exclude: ['<string>'],
buy_only: ['<string>'],
positions: {},
sectors: {},
max_names: 2,
max_position: 0.5,
trading: {
whole_shares: true,
min_trade: 1,
max_trades: 2,
max_turnover: 0.5,
no_sells: true
},
theme: '<string>',
trades: [{}],
monitor: {
webhook: '<string>',
secret: '<string>',
harvest: true,
drift: 0.5,
rule_break: true
},
exclude_themes: ['<string>']
},
max_credits: 1,
constraints: {},
tax_rates: {},
wash_sale_policy: 'same_index',
benchmark: '<string>',
detail: 'compact'
})
};
fetch('https://api.abacuslabs.ai/v1/trades/check', 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://api.abacuslabs.ai/v1/trades/check",
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([
'trades' => [
[
'symbol' => '<string>',
'side' => '<string>',
'qty' => 123,
'quantity' => 123,
'lots' => [
'<string>'
]
]
],
'accounts' => [
[
]
],
'account_id' => '<string>',
'account' => [
],
'snapshot_id' => '<string>',
'policy' => [
'goal' => '<string>',
'benchmark' => '<string>',
'tracking_error' => 123,
'max_volatility' => 1,
'tax' => [
'max_tax' => 123,
'max_gain' => 1,
'rates' => [
]
],
'cash' => [
'min' => 1,
'max' => 1,
'invest' => true
],
'keep' => [
'<string>'
],
'exclude' => [
'<string>'
],
'buy_only' => [
'<string>'
],
'positions' => [
],
'sectors' => [
],
'max_names' => 2,
'max_position' => 0.5,
'trading' => [
'whole_shares' => true,
'min_trade' => 1,
'max_trades' => 2,
'max_turnover' => 0.5,
'no_sells' => true
],
'theme' => '<string>',
'trades' => [
[
]
],
'monitor' => [
'webhook' => '<string>',
'secret' => '<string>',
'harvest' => true,
'drift' => 0.5,
'rule_break' => true
],
'exclude_themes' => [
'<string>'
]
],
'max_credits' => 1,
'constraints' => [
],
'tax_rates' => [
],
'wash_sale_policy' => 'same_index',
'benchmark' => '<string>',
'detail' => 'compact'
]),
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://api.abacuslabs.ai/v1/trades/check"
payload := strings.NewReader("{\n \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\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://api.abacuslabs.ai/v1/trades/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacuslabs.ai/v1/trades/check")
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 \"trades\": [\n {\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"quantity\": 123,\n \"lots\": [\n \"<string>\"\n ]\n }\n ],\n \"accounts\": [\n {}\n ],\n \"account_id\": \"<string>\",\n \"account\": {},\n \"snapshot_id\": \"<string>\",\n \"policy\": {\n \"goal\": \"<string>\",\n \"benchmark\": \"<string>\",\n \"tracking_error\": 123,\n \"max_volatility\": 1,\n \"tax\": {\n \"max_tax\": 123,\n \"max_gain\": 1,\n \"rates\": {}\n },\n \"cash\": {\n \"min\": 1,\n \"max\": 1,\n \"invest\": true\n },\n \"keep\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ],\n \"buy_only\": [\n \"<string>\"\n ],\n \"positions\": {},\n \"sectors\": {},\n \"max_names\": 2,\n \"max_position\": 0.5,\n \"trading\": {\n \"whole_shares\": true,\n \"min_trade\": 1,\n \"max_trades\": 2,\n \"max_turnover\": 0.5,\n \"no_sells\": true\n },\n \"theme\": \"<string>\",\n \"trades\": [\n {}\n ],\n \"monitor\": {\n \"webhook\": \"<string>\",\n \"secret\": \"<string>\",\n \"harvest\": true,\n \"drift\": 0.5,\n \"rule_break\": true\n },\n \"exclude_themes\": [\n \"<string>\"\n ]\n },\n \"max_credits\": 1,\n \"constraints\": {},\n \"tax_rates\": {},\n \"wash_sale_policy\": \"same_index\",\n \"benchmark\": \"<string>\",\n \"detail\": \"compact\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
An API key: abacus_sk_test_... (sandbox, from POST /v1/keys) or abacus_sk_live_... (from https://app.abacuslabs.ai)
Headers
Body
application/json
Drafted trades to check against the account's rules and repair.
Response
Successful Response