Place order
curl --request POST \
--url https://engine.dojifunded.com/v1/order \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "BTC-USD",
"quantity": 0.05,
"price": 62500,
"trigger_price": 123,
"flags": {
"post_only": true,
"reduce_only": true,
"trigger_on_index": true,
"trigger_on_mark": true
},
"client_id": "my-bot:strategy-A:1234",
"parent_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://engine.dojifunded.com/v1/order"
payload = {
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "BTC-USD",
"quantity": 0.05,
"price": 62500,
"trigger_price": 123,
"flags": {
"post_only": True,
"reduce_only": True,
"trigger_on_index": True,
"trigger_on_mark": True
},
"client_id": "my-bot:strategy-A:1234",
"parent_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"X-API-Secret": "<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>',
'X-API-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
symbol: 'BTC-USD',
quantity: 0.05,
price: 62500,
trigger_price: 123,
flags: {
post_only: true,
reduce_only: true,
trigger_on_index: true,
trigger_on_mark: true
},
client_id: 'my-bot:strategy-A:1234',
parent_order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
position_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://engine.dojifunded.com/v1/order', 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://engine.dojifunded.com/v1/order",
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([
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'symbol' => 'BTC-USD',
'quantity' => 0.05,
'price' => 62500,
'trigger_price' => 123,
'flags' => [
'post_only' => true,
'reduce_only' => true,
'trigger_on_index' => true,
'trigger_on_mark' => true
],
'client_id' => 'my-bot:strategy-A:1234',
'parent_order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-Secret: <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://engine.dojifunded.com/v1/order"
payload := strings.NewReader("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<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://engine.dojifunded.com/v1/order")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://engine.dojifunded.com/v1/order")
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["X-API-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "OPEN",
"symbol": "<string>",
"side": "BUY",
"kind": "MARKET",
"quantity": 123,
"price": 123,
"client_id": "<string>"
},
"trades": [
{
"id": "<string>",
"symbol": "<string>",
"side": "BUY",
"quantity": 123,
"price": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
],
"violations": [
{
"rule": "<string>",
"severity": "<string>",
"message": "<string>"
}
]
}{
"error": "unauthorized"
}Orders
Place order
Single endpoint for all order types (market, limit, stop, take-profit) across all venues. Requires the TRADE permission scope.
Risk-rule rejections come back with HTTP 200 but a non-empty violations array. The order is not placed when violations are present, so check this field in every response.
Always set a stable client_id per trading intent. If a request times out or returns a 5xx error, retry with the same client_id and the engine returns the original result without placing a duplicate order.
POST
/
order
Place order
curl --request POST \
--url https://engine.dojifunded.com/v1/order \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "BTC-USD",
"quantity": 0.05,
"price": 62500,
"trigger_price": 123,
"flags": {
"post_only": true,
"reduce_only": true,
"trigger_on_index": true,
"trigger_on_mark": true
},
"client_id": "my-bot:strategy-A:1234",
"parent_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://engine.dojifunded.com/v1/order"
payload = {
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "BTC-USD",
"quantity": 0.05,
"price": 62500,
"trigger_price": 123,
"flags": {
"post_only": True,
"reduce_only": True,
"trigger_on_index": True,
"trigger_on_mark": True
},
"client_id": "my-bot:strategy-A:1234",
"parent_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"X-API-Secret": "<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>',
'X-API-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
symbol: 'BTC-USD',
quantity: 0.05,
price: 62500,
trigger_price: 123,
flags: {
post_only: true,
reduce_only: true,
trigger_on_index: true,
trigger_on_mark: true
},
client_id: 'my-bot:strategy-A:1234',
parent_order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
position_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://engine.dojifunded.com/v1/order', 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://engine.dojifunded.com/v1/order",
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([
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'symbol' => 'BTC-USD',
'quantity' => 0.05,
'price' => 62500,
'trigger_price' => 123,
'flags' => [
'post_only' => true,
'reduce_only' => true,
'trigger_on_index' => true,
'trigger_on_mark' => true
],
'client_id' => 'my-bot:strategy-A:1234',
'parent_order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'position_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-Secret: <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://engine.dojifunded.com/v1/order"
payload := strings.NewReader("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<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://engine.dojifunded.com/v1/order")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://engine.dojifunded.com/v1/order")
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["X-API-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbol\": \"BTC-USD\",\n \"quantity\": 0.05,\n \"price\": 62500,\n \"trigger_price\": 123,\n \"flags\": {\n \"post_only\": true,\n \"reduce_only\": true,\n \"trigger_on_index\": true,\n \"trigger_on_mark\": true\n },\n \"client_id\": \"my-bot:strategy-A:1234\",\n \"parent_order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"position_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "OPEN",
"symbol": "<string>",
"side": "BUY",
"kind": "MARKET",
"quantity": 123,
"price": 123,
"client_id": "<string>"
},
"trades": [
{
"id": "<string>",
"symbol": "<string>",
"side": "BUY",
"quantity": 123,
"price": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
],
"violations": [
{
"rule": "<string>",
"severity": "<string>",
"message": "<string>"
}
]
}{
"error": "unauthorized"
}Authorizations
Body
application/json
Response
Order result. Check violations before assuming success.

