Submit intent
Submits a create, replace, or cancel command for a trading account. An API key needs the organization intent edit permission; a signed-in user needs the admin role in the organization its access token is scoped to. The named trading account must belong to that organization. Every create is evaluated against the organization’s trading controls before it is accepted; a create against a live account additionally requires the live-trading entitlement. Replace and cancel commands skip controls evaluation. A refusal at either gate is recorded and readable through /v1/intents/rejections.
curl --request POST \
--url https://api.anthid.com/v1/intents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"client_reference_id": "order-20260805-001",
"command": {
"payload": {
"order_side": "BUY",
"route_strategy": "SMART",
"spec": {
"Limit": {
"price": "215.50",
"quantity": "10",
"time_in_force": "DAY"
}
},
"symbol": "AAPL"
},
"type": "CREATE"
},
"trading_account_id": "550e8400-e29b-41d4-a716-446655440000"
}
'import requests
url = "https://api.anthid.com/v1/intents"
payload = {
"client_reference_id": "order-20260805-001",
"command": {
"payload": {
"order_side": "BUY",
"route_strategy": "SMART",
"spec": { "Limit": {
"price": "215.50",
"quantity": "10",
"time_in_force": "DAY"
} },
"symbol": "AAPL"
},
"type": "CREATE"
},
"trading_account_id": "550e8400-e29b-41d4-a716-446655440000"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_reference_id: 'order-20260805-001',
command: {
payload: {
order_side: 'BUY',
route_strategy: 'SMART',
spec: {Limit: {price: '215.50', quantity: '10', time_in_force: 'DAY'}},
symbol: 'AAPL'
},
type: 'CREATE'
},
trading_account_id: '550e8400-e29b-41d4-a716-446655440000'
})
};
fetch('https://api.anthid.com/v1/intents', 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.anthid.com/v1/intents",
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([
'client_reference_id' => 'order-20260805-001',
'command' => [
'payload' => [
'order_side' => 'BUY',
'route_strategy' => 'SMART',
'spec' => [
'Limit' => [
'price' => '215.50',
'quantity' => '10',
'time_in_force' => 'DAY'
]
],
'symbol' => 'AAPL'
],
'type' => 'CREATE'
],
'trading_account_id' => '550e8400-e29b-41d4-a716-446655440000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.anthid.com/v1/intents"
payload := strings.NewReader("{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.anthid.com/v1/intents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anthid.com/v1/intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "550e8400-e29b-41d4-a716-446655440111"
}"<string>""<string>""<string>""<string>""<string>""<string>"Authorizations
Headers
Client-supplied key recorded against every action this request produces. Recorded for attribution; not yet enforced for replay protection.
Body
Trading account and command to submit
Requested intent operation and its payload.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Trading account that should execute the intent.
Carried in the body rather than the path: submission is a command against the caller's organization, and the account it targets is part of the command.
Optional caller-provided correlation ID for downstream reconciliation.
Response
Intent accepted
curl --request POST \
--url https://api.anthid.com/v1/intents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"client_reference_id": "order-20260805-001",
"command": {
"payload": {
"order_side": "BUY",
"route_strategy": "SMART",
"spec": {
"Limit": {
"price": "215.50",
"quantity": "10",
"time_in_force": "DAY"
}
},
"symbol": "AAPL"
},
"type": "CREATE"
},
"trading_account_id": "550e8400-e29b-41d4-a716-446655440000"
}
'import requests
url = "https://api.anthid.com/v1/intents"
payload = {
"client_reference_id": "order-20260805-001",
"command": {
"payload": {
"order_side": "BUY",
"route_strategy": "SMART",
"spec": { "Limit": {
"price": "215.50",
"quantity": "10",
"time_in_force": "DAY"
} },
"symbol": "AAPL"
},
"type": "CREATE"
},
"trading_account_id": "550e8400-e29b-41d4-a716-446655440000"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_reference_id: 'order-20260805-001',
command: {
payload: {
order_side: 'BUY',
route_strategy: 'SMART',
spec: {Limit: {price: '215.50', quantity: '10', time_in_force: 'DAY'}},
symbol: 'AAPL'
},
type: 'CREATE'
},
trading_account_id: '550e8400-e29b-41d4-a716-446655440000'
})
};
fetch('https://api.anthid.com/v1/intents', 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.anthid.com/v1/intents",
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([
'client_reference_id' => 'order-20260805-001',
'command' => [
'payload' => [
'order_side' => 'BUY',
'route_strategy' => 'SMART',
'spec' => [
'Limit' => [
'price' => '215.50',
'quantity' => '10',
'time_in_force' => 'DAY'
]
],
'symbol' => 'AAPL'
],
'type' => 'CREATE'
],
'trading_account_id' => '550e8400-e29b-41d4-a716-446655440000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.anthid.com/v1/intents"
payload := strings.NewReader("{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.anthid.com/v1/intents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anthid.com/v1/intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_reference_id\": \"order-20260805-001\",\n \"command\": {\n \"payload\": {\n \"order_side\": \"BUY\",\n \"route_strategy\": \"SMART\",\n \"spec\": {\n \"Limit\": {\n \"price\": \"215.50\",\n \"quantity\": \"10\",\n \"time_in_force\": \"DAY\"\n }\n },\n \"symbol\": \"AAPL\"\n },\n \"type\": \"CREATE\"\n },\n \"trading_account_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "550e8400-e29b-41d4-a716-446655440111"
}"<string>""<string>""<string>""<string>""<string>""<string>"