curl --request POST \
--url https://api.limitless.exchange/orders \
--header 'Content-Type: application/json' \
--header 'lmts-api-key: <api-key>' \
--data '
{
"order": {
"salt": "1778155025318314496",
"maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"feeRateBps": 0,
"side": 0,
"signature": "0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b",
"signatureType": 2,
"taker": "0x0000000000000000000000000000000000000000",
"expiration": "0",
"price": 0.75
},
"ownerId": 12345,
"orderType": "GTC",
"marketSlug": "biden-vs-trump-2024",
"postOnly": true,
"clientOrderId": "client-order-001",
"onBehalfOf": 12345,
"timestamp": 1735689600000,
"recvWindow": 1500,
"stpPolicy": "cancel_maker"
}
'import requests
url = "https://api.limitless.exchange/orders"
payload = {
"order": {
"salt": "1778155025318314496",
"maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"feeRateBps": 0,
"side": 0,
"signature": "0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b",
"signatureType": 2,
"taker": "0x0000000000000000000000000000000000000000",
"expiration": "0",
"price": 0.75
},
"ownerId": 12345,
"orderType": "GTC",
"marketSlug": "biden-vs-trump-2024",
"postOnly": True,
"clientOrderId": "client-order-001",
"onBehalfOf": 12345,
"timestamp": 1735689600000,
"recvWindow": 1500,
"stpPolicy": "cancel_maker"
}
headers = {
"lmts-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lmts-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order: {
salt: '1778155025318314496',
maker: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
signer: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenId: '19633204485790857949828516737993423758628930235371629943999544859324645414627',
makerAmount: 5000000,
takerAmount: 10000000,
nonce: 0,
feeRateBps: 0,
side: 0,
signature: '0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b',
signatureType: 2,
taker: '0x0000000000000000000000000000000000000000',
expiration: '0',
price: 0.75
},
ownerId: 12345,
orderType: 'GTC',
marketSlug: 'biden-vs-trump-2024',
postOnly: true,
clientOrderId: 'client-order-001',
onBehalfOf: 12345,
timestamp: 1735689600000,
recvWindow: 1500,
stpPolicy: 'cancel_maker'
})
};
fetch('https://api.limitless.exchange/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.limitless.exchange/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([
'order' => [
'salt' => '1778155025318314496',
'maker' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'signer' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'tokenId' => '19633204485790857949828516737993423758628930235371629943999544859324645414627',
'makerAmount' => 5000000,
'takerAmount' => 10000000,
'nonce' => 0,
'feeRateBps' => 0,
'side' => 0,
'signature' => '0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b',
'signatureType' => 2,
'taker' => '0x0000000000000000000000000000000000000000',
'expiration' => '0',
'price' => 0.75
],
'ownerId' => 12345,
'orderType' => 'GTC',
'marketSlug' => 'biden-vs-trump-2024',
'postOnly' => true,
'clientOrderId' => 'client-order-001',
'onBehalfOf' => 12345,
'timestamp' => 1735689600000,
'recvWindow' => 1500,
'stpPolicy' => 'cancel_maker'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lmts-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.limitless.exchange/orders"
payload := strings.NewReader("{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lmts-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.limitless.exchange/orders")
.header("lmts-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lmts-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"salt": "1778155025318314496",
"maker": "<string>",
"signer": "<string>",
"tokenId": "<string>",
"signatureType": 0,
"signature": "<string>",
"orderType": "GTC",
"side": 0,
"marketId": "<string>",
"ownerId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"market": {
"id": 7348,
"slug": "btc-up-or-down-1-hour",
"title": "BTC Up or Down - Hourly",
"status": "FUNDED",
"yesPositionId": "11514974713064423461...",
"noPositionId": "14525308260861904048...",
"group": {
"id": 42,
"slug": "btc-price-markets",
"title": "BTC Price Markets"
}
},
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"owner": {
"id": 123,
"account": "<string>",
"client": "<string>",
"tradeWalletOption": "eoa",
"smartWallet": "<string>",
"username": "<string>",
"displayName": "<string>",
"pfpUrl": "<string>",
"socialUrl": "<string>",
"rankName": "<string>",
"points": 123,
"referredUsersCount": 123,
"isTop100": true,
"leaderboardPosition": 123
},
"taker": "<string>",
"expiration": "2023-11-07T05:31:56Z",
"feeRateBps": 123,
"price": 0.75
},
"execution": {
"matched": true,
"settlementStatus": "MINED",
"feeRateBps": 25,
"effectiveFeeBps": 26,
"totalsRaw": {
"contractsGross": "1000000",
"contractsFee": "1000",
"contractsNet": "999000",
"usdGross": "500000",
"usdFee": "500",
"usdNet": "499500"
},
"reason": "settlement transaction reverted",
"eligibleAt": "2026-06-08T10:15:30.000Z",
"tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",
"txHash": "0xabc123",
"clientOrderId": "client-order-001",
"stpMakerCancels": [
"4aa706dd-6c57-4f3c-945a-99818dfd95f1"
]
},
"makerMatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matchedSize": "1000000",
"fillPrice": "0.55",
"fillCost": "550000",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"maker": "<string>",
"price": "0.55",
"side": 0,
"tokenId": "<string>",
"owner": {
"id": 123,
"account": "<string>",
"client": "<string>",
"tradeWalletOption": "eoa",
"smartWallet": "<string>",
"username": "<string>",
"displayName": "<string>",
"pfpUrl": "<string>",
"socialUrl": "<string>",
"points": 0,
"referredUsersCount": 0
}
}
}
]
}{
"message": [
{
"field": "orderIds",
"message": "orderIds should not be empty"
}
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Create Order
Creates a buy/sell order for prediction market positions. Requires signed order data.
curl --request POST \
--url https://api.limitless.exchange/orders \
--header 'Content-Type: application/json' \
--header 'lmts-api-key: <api-key>' \
--data '
{
"order": {
"salt": "1778155025318314496",
"maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"feeRateBps": 0,
"side": 0,
"signature": "0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b",
"signatureType": 2,
"taker": "0x0000000000000000000000000000000000000000",
"expiration": "0",
"price": 0.75
},
"ownerId": 12345,
"orderType": "GTC",
"marketSlug": "biden-vs-trump-2024",
"postOnly": true,
"clientOrderId": "client-order-001",
"onBehalfOf": 12345,
"timestamp": 1735689600000,
"recvWindow": 1500,
"stpPolicy": "cancel_maker"
}
'import requests
url = "https://api.limitless.exchange/orders"
payload = {
"order": {
"salt": "1778155025318314496",
"maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"feeRateBps": 0,
"side": 0,
"signature": "0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b",
"signatureType": 2,
"taker": "0x0000000000000000000000000000000000000000",
"expiration": "0",
"price": 0.75
},
"ownerId": 12345,
"orderType": "GTC",
"marketSlug": "biden-vs-trump-2024",
"postOnly": True,
"clientOrderId": "client-order-001",
"onBehalfOf": 12345,
"timestamp": 1735689600000,
"recvWindow": 1500,
"stpPolicy": "cancel_maker"
}
headers = {
"lmts-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lmts-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order: {
salt: '1778155025318314496',
maker: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
signer: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenId: '19633204485790857949828516737993423758628930235371629943999544859324645414627',
makerAmount: 5000000,
takerAmount: 10000000,
nonce: 0,
feeRateBps: 0,
side: 0,
signature: '0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b',
signatureType: 2,
taker: '0x0000000000000000000000000000000000000000',
expiration: '0',
price: 0.75
},
ownerId: 12345,
orderType: 'GTC',
marketSlug: 'biden-vs-trump-2024',
postOnly: true,
clientOrderId: 'client-order-001',
onBehalfOf: 12345,
timestamp: 1735689600000,
recvWindow: 1500,
stpPolicy: 'cancel_maker'
})
};
fetch('https://api.limitless.exchange/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.limitless.exchange/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([
'order' => [
'salt' => '1778155025318314496',
'maker' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'signer' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'tokenId' => '19633204485790857949828516737993423758628930235371629943999544859324645414627',
'makerAmount' => 5000000,
'takerAmount' => 10000000,
'nonce' => 0,
'feeRateBps' => 0,
'side' => 0,
'signature' => '0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b',
'signatureType' => 2,
'taker' => '0x0000000000000000000000000000000000000000',
'expiration' => '0',
'price' => 0.75
],
'ownerId' => 12345,
'orderType' => 'GTC',
'marketSlug' => 'biden-vs-trump-2024',
'postOnly' => true,
'clientOrderId' => 'client-order-001',
'onBehalfOf' => 12345,
'timestamp' => 1735689600000,
'recvWindow' => 1500,
'stpPolicy' => 'cancel_maker'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lmts-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.limitless.exchange/orders"
payload := strings.NewReader("{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lmts-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.limitless.exchange/orders")
.header("lmts-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lmts-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"salt\": \"1778155025318314496\",\n \"maker\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"signer\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenId\": \"19633204485790857949828516737993423758628930235371629943999544859324645414627\",\n \"makerAmount\": 5000000,\n \"takerAmount\": 10000000,\n \"nonce\": 0,\n \"feeRateBps\": 0,\n \"side\": 0,\n \"signature\": \"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b\",\n \"signatureType\": 2,\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"expiration\": \"0\",\n \"price\": 0.75\n },\n \"ownerId\": 12345,\n \"orderType\": \"GTC\",\n \"marketSlug\": \"biden-vs-trump-2024\",\n \"postOnly\": true,\n \"clientOrderId\": \"client-order-001\",\n \"onBehalfOf\": 12345,\n \"timestamp\": 1735689600000,\n \"recvWindow\": 1500,\n \"stpPolicy\": \"cancel_maker\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"salt": "1778155025318314496",
"maker": "<string>",
"signer": "<string>",
"tokenId": "<string>",
"signatureType": 0,
"signature": "<string>",
"orderType": "GTC",
"side": 0,
"marketId": "<string>",
"ownerId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"market": {
"id": 7348,
"slug": "btc-up-or-down-1-hour",
"title": "BTC Up or Down - Hourly",
"status": "FUNDED",
"yesPositionId": "11514974713064423461...",
"noPositionId": "14525308260861904048...",
"group": {
"id": 42,
"slug": "btc-price-markets",
"title": "BTC Price Markets"
}
},
"makerAmount": 5000000,
"takerAmount": 10000000,
"nonce": 0,
"owner": {
"id": 123,
"account": "<string>",
"client": "<string>",
"tradeWalletOption": "eoa",
"smartWallet": "<string>",
"username": "<string>",
"displayName": "<string>",
"pfpUrl": "<string>",
"socialUrl": "<string>",
"rankName": "<string>",
"points": 123,
"referredUsersCount": 123,
"isTop100": true,
"leaderboardPosition": 123
},
"taker": "<string>",
"expiration": "2023-11-07T05:31:56Z",
"feeRateBps": 123,
"price": 0.75
},
"execution": {
"matched": true,
"settlementStatus": "MINED",
"feeRateBps": 25,
"effectiveFeeBps": 26,
"totalsRaw": {
"contractsGross": "1000000",
"contractsFee": "1000",
"contractsNet": "999000",
"usdGross": "500000",
"usdFee": "500",
"usdNet": "499500"
},
"reason": "settlement transaction reverted",
"eligibleAt": "2026-06-08T10:15:30.000Z",
"tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",
"txHash": "0xabc123",
"clientOrderId": "client-order-001",
"stpMakerCancels": [
"4aa706dd-6c57-4f3c-945a-99818dfd95f1"
]
},
"makerMatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matchedSize": "1000000",
"fillPrice": "0.55",
"fillCost": "550000",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"maker": "<string>",
"price": "0.55",
"side": 0,
"tokenId": "<string>",
"owner": {
"id": 123,
"account": "<string>",
"client": "<string>",
"tradeWalletOption": "eoa",
"smartWallet": "<string>",
"username": "<string>",
"displayName": "<string>",
"pfpUrl": "<string>",
"socialUrl": "<string>",
"points": 0,
"referredUsersCount": 0
}
}
}
]
}{
"message": [
{
"field": "orderIds",
"message": "orderIds should not be empty"
}
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>"
}- Fetch market data via Get Market Details to get venue and token IDs
- Sign the order using EIP-712 with
venue.exchangeasverifyingContract - Ensure you have token approvals set up
post_only, only orders with postOnly: true are accepted. In cancel_only or disabled, new orders return 425 Too Early with a trading-mode code. Check Maintenance Mode before sending orders.Authentication
Use a scoped API token with HMAC signing and thetrading scope.
Signed order rules
For client-signed orders,signature and signatureType are both required. They must either both be present or both be omitted. Omission is accepted only for delegated server signing with an HMAC token carrying delegated_signing.
nonce is required and must be the numeric value 0. expiration may be omitted; omission is signed as zero. If supplied, it must represent zero, for example "0". Non-zero expiration is not supported.
Amounts are integer raw units with 6 decimals. makerAmount must be at least 100 raw units. For GTC and FAK orders, price is required, must be between 0.01 and 0.99, and may have at most three decimal places. The collateral equation must be exact. price × contracts must be an integer raw-unit amount, without rounding.
| Type | BUY amounts | SELL amounts | Price |
|---|---|---|---|
GTC / FAK | makerAmount = price × contracts; takerAmount = contracts | makerAmount = contracts; takerAmount = price × contracts | Required |
FOK | makerAmount = maximum collateral to spend; takerAmount = 1 | makerAmount = shares to sell; takerAmount = 1 | Must be omitted |
postOnly is supported only for GTC orders.
Optional fields
| Field | Type | Description |
|---|---|---|
clientOrderId | string | Optional uniqueness and deduplication key. The submitted value may contain at most 128 characters; it is then trimmed and must not be blank. Reuse returns 409 Conflict; the API does not replay the earlier response. |
onBehalfOf | number | Profile ID of the sub-account to place the order for. Requires a scoped API token with trading scope and a partner relationship with the target profile. The maker and signer in the order must match the sub-account’s wallet address. |
postOnly | boolean | GTC orders only. When true, the order is rejected if it would immediately match. Guarantees the order rests on the book as a maker order. Default false. |
timestamp | number | Optional client-stamped Unix time in milliseconds for receive-window checks. Top-level request field; not part of the signed order. |
recvWindow | number | Optional maximum accepted order age in milliseconds, up to 10000. If omitted, the API default applies. Top-level request field; not part of the signed order. |
stpPolicy | string | Self-trade prevention policy. Values: cancel_maker, cancel_taker, cancel_both. Default cancel_maker. Top-level request field; not part of the signed order. |
Receive window
POST /orders supports optional receive-window controls for clients that want freshness checks on order submission. Send these fields at the top level of the request body, next to order, orderType, and marketSlug; never put them inside the EIP-712 signed order object.
{
"order": {
"...": "signed order fields"
},
"orderType": "GTC",
"marketSlug": "btc-100k",
"timestamp": 1779870000000,
"recvWindow": 1500
}
| Field | Description |
|---|---|
timestamp | Client order creation time as Unix milliseconds. Send it with a nonzero effective recvWindow to enforce client-to-server freshness. If omitted while a window applies, the server uses its receive time. |
recvWindow | Maximum accepted age, in milliseconds, between the effective timestamp and server receive time, up to 10000. If omitted, the API default applies. A timestamp alone has no freshness effect when the effective window is zero. |
425 Too Early. Do not retry the same signed payload after a receive-window 425; build and sign a fresh order. If the 425 body has a trading-mode code, refresh maintenance status instead.Self-trade prevention
POST /orders can reject or cancel orders that would match against your own resting order on the same token.
{
"order": {
"...": "signed order fields"
},
"orderType": "GTC",
"marketSlug": "btc-100k",
"stpPolicy": "cancel_taker"
}
| Policy | Result |
|---|---|
cancel_maker | Default. Cancel your conflicting resting order and continue with the incoming order. |
cancel_taker | Reject the incoming order before it self-trades. |
cancel_both | Cancel your conflicting resting order and reject the incoming order. |
cancel_maker, matching continues against the remaining non-self liquidity, and limit orders still never execute past their limit price.
Outcomes on the placement response:
- A rejected taker (
cancel_taker/cancel_both) returnssettlementStatus: "CANCELED"withreason: "STP_TAKER_REJECTED". - A
cancel_makertaker lists the cancelled resting order IDs instpMakerCancelsand keeps its normal status (UNMATCHEDwhen nothing else fills it); noreasonis set.
stpPolicy is a top-level request field. Do not include it inside the EIP-712 signed order object.execution object on the response. See TypeScript, Python, Rust, and Go.ownerId come from? It is the id field returned by GET /profiles/me or GET /profiles/{address}. For partner sub-accounts, it is the profileId returned by POST /profiles/partner-accounts, or recovered with GET /profiles/partner-accounts.ownerId must match the profile that owns the order (see Programmatic API — EOA flow):- Partner EOA + signed order +
onBehalfOf: set bothonBehalfOfandownerIdto the sub-account’sprofileId.order.makerandorder.signermust match that sub-account’s wallet. A mismatchedownerIdreturns400with the message"Profile ID does not match the order owner". - Delegated signing (unsigned
order,delegated_signingscope, server wallet sub-account): send the target profile ID as bothonBehalfOfandownerId. The server normalizesownerIdto that target when it signs. Omit the client signature per Delegated signing below. - Trading as yourself (no
onBehalfOf):ownerIdis your own profile id (the SDK often fills this after fetching your profile). Signer does not match - you should use embedded address for smart wallet: your profile is in smart-wallet trading mode, which self-signed API orders can’t satisfy. Switch to EOA mode. See Trading wallet mode.
Delegated signing
Partners place orders for a managed sub-account by setting bodyonBehalfOf to its profile ID. A client-signed order requires trading; the target must belong to the authenticated partner.
With both trading and delegated_signing, partners may instead omit both signature and signatureType. The request must still include the target profile ID as both onBehalfOf and ownerId. The server signs using a Privy server wallet linked to that profile, replaces maker and signer with that wallet address, and normalizes ownerId to the target. See Authentication.
Execution response
The response includes anexecution object with settlement details:
| Field | Type | Description |
|---|---|---|
matched | boolean | Whether the order was matched immediately |
settlementStatus | string | UNMATCHED, MATCHED, MINED, CONFIRMED, RETRYING, FAILED, DELAYED, or CANCELED |
reason | string | Free-form terminal detail. For example, STP_TAKER_REJECTED accompanies an STP-cancelled taker; settlement or recovery failures can return other text with FAILED. |
eligibleAt | string | ISO-8601 time the order is released to the matching engine. Present only when settlementStatus is DELAYED (taker delay). |
tradeEventId | string | Trade event ID (present when matched) |
txHash | string | On-chain transaction hash (present when mined) |
stpMakerCancels | string[] | Resting order IDs cancelled by self-trade prevention (present when cancel_maker / cancel_both cancelled one or more of your resting orders) |
feeRateBps | number | Fee rate in basis points |
effectiveFeeBps | number | Effective fee rate after rebates |
totalsRaw | object | Raw execution totals (contractsGross, contractsFee, contractsNet, usdGross, usdFee, usdNet) |
DELAYED (taker delay). Some markets apply a short hold to marketable (taker) orders before the matching engine fills them. On such a market, a marketable order’s response returns immediately with settlementStatus: "DELAYED", matched: false, zero totalsRaw, and an eligibleAt timestamp. It does not block until the trade is mined. Track the outcome over subscribe_order_events (provisional MATCHED → terminal MINED / FAILED), correlating by clientOrderId / tradeEventId. postOnly orders are never delayed.Errors
| Status | Meaning |
|---|---|
400 | Structural validation, invalid signature/owner/token/amounts, insufficient balance or allowance, unavailable/resolved/expired market, delegated-signing failure, or matching-engine rejection. Validation failures use a message array; business failures usually use a string. Missing markets and profiles are normalized to 400 on this endpoint. |
401 | Authentication failed. |
403 | The HMAC token lacks trading, or onBehalfOf is not an authorized partner target. |
409 | clientOrderId or the signed order hash already exists or is being processed. |
425 | Receive-window rejection or a maintenance trading mode that blocks creation. Receive-window bodies contain a message; maintenance bodies contain a trading-mode code. |
500 | Unexpected order-creation failure. |
Authorizations
Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.
Body
Order creation data including signature and order parameters
Order details including signature and amounts
- Option 1
- Option 2
Show child attributes
Show child attributes
Required profile ID of the order owner. For delegated signing, send the target profile ID as both ownerId and onBehalfOf.
12345
Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)
FAK, FOK, GTC "GTC"
Market identifier slug
"biden-vs-trump-2024"
Reject the order if it would match immediately. Supported only for GTC orders.
true
Optional owner-scoped uniqueness and deduplication key. The submitted value is limited to 128 characters, then trimmed; blank values are rejected. Reuse returns 409 rather than replaying an earlier response.
128"client-order-001"
Managed profile ID for partner placement. Requires trading and a partner relationship; unsigned delegated placement also requires delegated_signing.
x >= 112345
Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.
x >= 01735689600000
Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, the server applies a 2000 ms default receive window. Top-level request field; not part of the EIP-712 signed order payload.
1 <= x <= 100001500
Self-trade prevention policy. If omitted, defaults to cancel_maker. Top-level request field; not part of the EIP-712 signed order payload.
cancel_both, cancel_maker, cancel_taker "cancel_maker"
Response
Order accepted. It may be resting, delayed, matched, settled, canceled by STP, or accepted with a settlement failure reported in execution.