Create Executor
curl --request POST \
--url http://localhost:8000/executors/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Create a position executor with triple barrier",
"summary": "Position Executor",
"value": {
"account_name": "master_account",
"executor_config": {
"amount": "0.01",
"connector_name": "binance_perpetual",
"leverage": 10,
"side": "BUY",
"trading_pair": "BTC-USDT",
"triple_barrier_config": {
"stop_loss": "0.02",
"take_profit": "0.04",
"time_limit": 3600
},
"type": "position_executor"
}
}
}
'import requests
url = "http://localhost:8000/executors/"
payload = {
"description": "Create a position executor with triple barrier",
"summary": "Position Executor",
"value": {
"account_name": "master_account",
"executor_config": {
"amount": "0.01",
"connector_name": "binance_perpetual",
"leverage": 10,
"side": "BUY",
"trading_pair": "BTC-USDT",
"triple_barrier_config": {
"stop_loss": "0.02",
"take_profit": "0.04",
"time_limit": 3600
},
"type": "position_executor"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Create a position executor with triple barrier',
summary: 'Position Executor',
value: {
account_name: 'master_account',
executor_config: {
amount: '0.01',
connector_name: 'binance_perpetual',
leverage: 10,
side: 'BUY',
trading_pair: 'BTC-USDT',
triple_barrier_config: {stop_loss: '0.02', take_profit: '0.04', time_limit: 3600},
type: 'position_executor'
}
}
})
};
fetch('http://localhost:8000/executors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/executors/",
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([
'description' => 'Create a position executor with triple barrier',
'summary' => 'Position Executor',
'value' => [
'account_name' => 'master_account',
'executor_config' => [
'amount' => '0.01',
'connector_name' => 'binance_perpetual',
'leverage' => 10,
'side' => 'BUY',
'trading_pair' => 'BTC-USDT',
'triple_barrier_config' => [
'stop_loss' => '0.02',
'take_profit' => '0.04',
'time_limit' => 3600
],
'type' => 'position_executor'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8000/executors/"
payload := strings.NewReader("{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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("http://localhost:8000/executors/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/executors/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"executor_id": "<string>",
"executor_type": "<string>",
"connector_name": "<string>",
"trading_pair": "<string>",
"status": "<string>",
"created_at": "<string>",
"controller_id": "main"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Executors
Create Executor
Create and start a new executor.
Supported executor types:
- position_executor: Single position with triple barrier (stop loss, take profit, time limit)
- grid_executor: Grid trading with multiple levels
- dca_executor: Dollar-cost averaging with multiple entry points
- twap_executor: Time-weighted average price execution
- arbitrage_executor: Cross-exchange arbitrage
- xemm_executor: Cross-exchange market making
- order_executor: Simple order execution
- lp_executor: Liquidity provider position on CLMM DEXs (Meteora, Raydium, etc.)
The executor_config must include:
type: One of the executor types aboveconnector_name: Exchange connector (e.g., “binance”, “binance_perpetual”)trading_pair: Trading pair (e.g., “BTC-USDT”)- Additional type-specific configuration (see /executors/types//config for details)
Returns the created executor ID and initial status.
POST
/
executors
/
Create Executor
curl --request POST \
--url http://localhost:8000/executors/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Create a position executor with triple barrier",
"summary": "Position Executor",
"value": {
"account_name": "master_account",
"executor_config": {
"amount": "0.01",
"connector_name": "binance_perpetual",
"leverage": 10,
"side": "BUY",
"trading_pair": "BTC-USDT",
"triple_barrier_config": {
"stop_loss": "0.02",
"take_profit": "0.04",
"time_limit": 3600
},
"type": "position_executor"
}
}
}
'import requests
url = "http://localhost:8000/executors/"
payload = {
"description": "Create a position executor with triple barrier",
"summary": "Position Executor",
"value": {
"account_name": "master_account",
"executor_config": {
"amount": "0.01",
"connector_name": "binance_perpetual",
"leverage": 10,
"side": "BUY",
"trading_pair": "BTC-USDT",
"triple_barrier_config": {
"stop_loss": "0.02",
"take_profit": "0.04",
"time_limit": 3600
},
"type": "position_executor"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Create a position executor with triple barrier',
summary: 'Position Executor',
value: {
account_name: 'master_account',
executor_config: {
amount: '0.01',
connector_name: 'binance_perpetual',
leverage: 10,
side: 'BUY',
trading_pair: 'BTC-USDT',
triple_barrier_config: {stop_loss: '0.02', take_profit: '0.04', time_limit: 3600},
type: 'position_executor'
}
}
})
};
fetch('http://localhost:8000/executors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/executors/",
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([
'description' => 'Create a position executor with triple barrier',
'summary' => 'Position Executor',
'value' => [
'account_name' => 'master_account',
'executor_config' => [
'amount' => '0.01',
'connector_name' => 'binance_perpetual',
'leverage' => 10,
'side' => 'BUY',
'trading_pair' => 'BTC-USDT',
'triple_barrier_config' => [
'stop_loss' => '0.02',
'take_profit' => '0.04',
'time_limit' => 3600
],
'type' => 'position_executor'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8000/executors/"
payload := strings.NewReader("{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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("http://localhost:8000/executors/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/executors/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Create a position executor with triple barrier\",\n \"summary\": \"Position Executor\",\n \"value\": {\n \"account_name\": \"master_account\",\n \"executor_config\": {\n \"amount\": \"0.01\",\n \"connector_name\": \"binance_perpetual\",\n \"leverage\": 10,\n \"side\": \"BUY\",\n \"trading_pair\": \"BTC-USDT\",\n \"triple_barrier_config\": {\n \"stop_loss\": \"0.02\",\n \"take_profit\": \"0.04\",\n \"time_limit\": 3600\n },\n \"type\": \"position_executor\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"executor_id": "<string>",
"executor_type": "<string>",
"connector_name": "<string>",
"trading_pair": "<string>",
"status": "<string>",
"created_at": "<string>",
"controller_id": "main"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Request to create a new executor.
Executor configuration. Must include 'type' field and executor-specific parameters.
Account name to use (defaults to master_account)
Controller ID that owns this executor (for per-agent isolation)
Response
Successful Response
Response after creating an executor.
Unique executor identifier
Type of executor created
Connector name
Trading pair
Initial status
Creation timestamp (ISO format)
Controller that owns this executor
Was this page helpful?

