curl --request POST \
--url https://api.agg.market/execution/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"venueMarketOutcomeId": "<string>",
"externalId": "<string>",
"maxSpend": 1,
"sellShares": 1,
"slipCapBps": 1
}
'import requests
url = "https://api.agg.market/execution/orders"
payload = {
"venueMarketOutcomeId": "<string>",
"externalId": "<string>",
"maxSpend": 1,
"sellShares": 1,
"slipCapBps": 1
}
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
venueMarketOutcomeId: '<string>',
externalId: '<string>',
maxSpend: 1,
sellShares: 1,
slipCapBps: 1
})
};
fetch('https://api.agg.market/execution/orders', 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.agg.market/execution/orders",
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([
'venueMarketOutcomeId' => '<string>',
'externalId' => '<string>',
'maxSpend' => 1,
'sellShares' => 1,
'slipCapBps' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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.agg.market/execution/orders"
payload := strings.NewReader("{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/execution/orders")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}"
response = http.request(request)
puts response.read_body{
"orderId": "<string>",
"externalId": "<string>",
"venue": "kalshi",
"status": "pending",
"quoteId": "<string>",
"quotedPriceRaw": "<string>",
"quotedCostRaw": "<string>",
"quotedSharesRaw": "<string>"
}{
"message": "<string>",
"code": "quote_not_found"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Place an order directly
Places a market order on a single named venue without a prior quote. The route is priced and funded server-side and always produces exactly one order. externalId is required and unique within your app — two different users of the same app cannot share one — so retrying a timed-out request with the same value returns 409 instead of trading twice.
curl --request POST \
--url https://api.agg.market/execution/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"venueMarketOutcomeId": "<string>",
"externalId": "<string>",
"maxSpend": 1,
"sellShares": 1,
"slipCapBps": 1
}
'import requests
url = "https://api.agg.market/execution/orders"
payload = {
"venueMarketOutcomeId": "<string>",
"externalId": "<string>",
"maxSpend": 1,
"sellShares": 1,
"slipCapBps": 1
}
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
venueMarketOutcomeId: '<string>',
externalId: '<string>',
maxSpend: 1,
sellShares: 1,
slipCapBps: 1
})
};
fetch('https://api.agg.market/execution/orders', 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.agg.market/execution/orders",
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([
'venueMarketOutcomeId' => '<string>',
'externalId' => '<string>',
'maxSpend' => 1,
'sellShares' => 1,
'slipCapBps' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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.agg.market/execution/orders"
payload := strings.NewReader("{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/execution/orders")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"venueMarketOutcomeId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"maxSpend\": 1,\n \"sellShares\": 1,\n \"slipCapBps\": 1\n}"
response = http.request(request)
puts response.read_body{
"orderId": "<string>",
"externalId": "<string>",
"venue": "kalshi",
"status": "pending",
"quoteId": "<string>",
"quotedPriceRaw": "<string>",
"quotedCostRaw": "<string>",
"quotedSharesRaw": "<string>"
}{
"message": "<string>",
"code": "quote_not_found"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
JWT access token returned by POST /auth/verify. Required for user-tier routes.
Body
The venue to trade on. Singular by design — this endpoint never splits an order.
kalshi, polymarket, limitless, opinion, predict, probable, myriad, hyperliquid, novig The outcome to trade. May be the outcome on another venue: it is resolved through matched-outcome links to the equivalent outcome on venue. Passing the id that already lives on venue is the unambiguous form.
1Trade direction. sell closes an existing position on venue.
buy, sell Idempotency key. Your own id for this trade — required, and unique within your app: two different users of the same app cannot share one. A repeat is rejected with 409 rather than trading twice, so it is safe to retry a request that timed out using the same value.
1 - 36Buy only. Maximum all-in USD spend, inclusive of app fee.
x > 0Sell only. Number of contracts to sell.
x > 0Slippage cap in basis points. Defaults to 500 (5%) when omitted. On sells set this explicitly: sellShares bounds the shares sold, not the proceeds.
x >= 0Response
200
The single order this call created.
Echoed back so a webhook or socket event can be tied to this response.
The venue the order was placed on.
kalshi, polymarket, limitless, opinion, predict, probable, myriad, hyperliquid, novig Always pending: the order is accepted and queued for execution, not yet filled. Poll GET /execution/orders or listen for order events for the terminal state.
pending Server-minted quote backing this order. Useful for support, not required.
Quoted price, decimal string (e.g. "0.53"). null if the order row does not carry a quoted price — the order is still live; re-fetch it from GET /execution/orders rather than treating this as zero.
Quoted cost, 6-decimal atomic USDC. null under the same conditions as quotedPriceRaw.
Quoted shares, 6-decimal atomic. null under the same conditions as quotedPriceRaw.