curl --request POST \
--url https://clob.polymarket.com/order \
--header 'Content-Type: application/json' \
--header 'POLY_ADDRESS: <api-key>' \
--header 'POLY_API_KEY: <api-key>' \
--header 'POLY_PASSPHRASE: <api-key>' \
--header 'POLY_SIGNATURE: <api-key>' \
--header 'POLY_TIMESTAMP: <api-key>' \
--data '
{
"order": {
"maker": "0x1234567890123456789012345678901234567890",
"signer": "0x1234567890123456789012345678901234567890",
"tokenId": "0xabc123def456...",
"makerAmount": "100000000",
"takerAmount": "200000000",
"side": "BUY",
"expiration": "1735689600",
"timestamp": "1735689600000",
"metadata": "",
"builder": "0x0000000000000000000000000000000000000000000000000000000000000000",
"signature": "0x1234abcd...",
"salt": 1234567890,
"signatureType": 0
},
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"orderType": "GTC",
"deferExec": false,
"postOnly": false
}
'import requests
url = "https://clob.polymarket.com/order"
payload = {
"order": {
"maker": "0x1234567890123456789012345678901234567890",
"signer": "0x1234567890123456789012345678901234567890",
"tokenId": "0xabc123def456...",
"makerAmount": "100000000",
"takerAmount": "200000000",
"side": "BUY",
"expiration": "1735689600",
"timestamp": "1735689600000",
"metadata": "",
"builder": "0x0000000000000000000000000000000000000000000000000000000000000000",
"signature": "0x1234abcd...",
"salt": 1234567890,
"signatureType": 0
},
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"orderType": "GTC",
"deferExec": False,
"postOnly": False
}
headers = {
"POLY_API_KEY": "<api-key>",
"POLY_ADDRESS": "<api-key>",
"POLY_SIGNATURE": "<api-key>",
"POLY_PASSPHRASE": "<api-key>",
"POLY_TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
POLY_API_KEY: '<api-key>',
POLY_ADDRESS: '<api-key>',
POLY_SIGNATURE: '<api-key>',
POLY_PASSPHRASE: '<api-key>',
POLY_TIMESTAMP: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order: {
maker: '0x1234567890123456789012345678901234567890',
signer: '0x1234567890123456789012345678901234567890',
tokenId: '0xabc123def456...',
makerAmount: '100000000',
takerAmount: '200000000',
side: 'BUY',
expiration: '1735689600',
timestamp: '1735689600000',
metadata: '',
builder: '0x0000000000000000000000000000000000000000000000000000000000000000',
signature: '0x1234abcd...',
salt: 1234567890,
signatureType: 0
},
owner: 'f4f247b7-4ac7-ff29-a152-04fda0a8755a',
orderType: 'GTC',
deferExec: false,
postOnly: false
})
};
fetch('https://clob.polymarket.com/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://clob.polymarket.com/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([
'order' => [
'maker' => '0x1234567890123456789012345678901234567890',
'signer' => '0x1234567890123456789012345678901234567890',
'tokenId' => '0xabc123def456...',
'makerAmount' => '100000000',
'takerAmount' => '200000000',
'side' => 'BUY',
'expiration' => '1735689600',
'timestamp' => '1735689600000',
'metadata' => '',
'builder' => '0x0000000000000000000000000000000000000000000000000000000000000000',
'signature' => '0x1234abcd...',
'salt' => 1234567890,
'signatureType' => 0
],
'owner' => 'f4f247b7-4ac7-ff29-a152-04fda0a8755a',
'orderType' => 'GTC',
'deferExec' => false,
'postOnly' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"POLY_ADDRESS: <api-key>",
"POLY_API_KEY: <api-key>",
"POLY_PASSPHRASE: <api-key>",
"POLY_SIGNATURE: <api-key>",
"POLY_TIMESTAMP: <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://clob.polymarket.com/order"
payload := strings.NewReader("{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("POLY_API_KEY", "<api-key>")
req.Header.Add("POLY_ADDRESS", "<api-key>")
req.Header.Add("POLY_SIGNATURE", "<api-key>")
req.Header.Add("POLY_PASSPHRASE", "<api-key>")
req.Header.Add("POLY_TIMESTAMP", "<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://clob.polymarket.com/order")
.header("POLY_API_KEY", "<api-key>")
.header("POLY_ADDRESS", "<api-key>")
.header("POLY_SIGNATURE", "<api-key>")
.header("POLY_PASSPHRASE", "<api-key>")
.header("POLY_TIMESTAMP", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["POLY_API_KEY"] = '<api-key>'
request["POLY_ADDRESS"] = '<api-key>'
request["POLY_SIGNATURE"] = '<api-key>'
request["POLY_PASSPHRASE"] = '<api-key>'
request["POLY_TIMESTAMP"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderID": "0xabcdef1234567890abcdef1234567890abcdef12",
"status": "live",
"makingAmount": "100000000",
"takingAmount": "200000000",
"errorMsg": ""
}Post a new order
Creates a new order in the order book
curl --request POST \
--url https://clob.polymarket.com/order \
--header 'Content-Type: application/json' \
--header 'POLY_ADDRESS: <api-key>' \
--header 'POLY_API_KEY: <api-key>' \
--header 'POLY_PASSPHRASE: <api-key>' \
--header 'POLY_SIGNATURE: <api-key>' \
--header 'POLY_TIMESTAMP: <api-key>' \
--data '
{
"order": {
"maker": "0x1234567890123456789012345678901234567890",
"signer": "0x1234567890123456789012345678901234567890",
"tokenId": "0xabc123def456...",
"makerAmount": "100000000",
"takerAmount": "200000000",
"side": "BUY",
"expiration": "1735689600",
"timestamp": "1735689600000",
"metadata": "",
"builder": "0x0000000000000000000000000000000000000000000000000000000000000000",
"signature": "0x1234abcd...",
"salt": 1234567890,
"signatureType": 0
},
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"orderType": "GTC",
"deferExec": false,
"postOnly": false
}
'import requests
url = "https://clob.polymarket.com/order"
payload = {
"order": {
"maker": "0x1234567890123456789012345678901234567890",
"signer": "0x1234567890123456789012345678901234567890",
"tokenId": "0xabc123def456...",
"makerAmount": "100000000",
"takerAmount": "200000000",
"side": "BUY",
"expiration": "1735689600",
"timestamp": "1735689600000",
"metadata": "",
"builder": "0x0000000000000000000000000000000000000000000000000000000000000000",
"signature": "0x1234abcd...",
"salt": 1234567890,
"signatureType": 0
},
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"orderType": "GTC",
"deferExec": False,
"postOnly": False
}
headers = {
"POLY_API_KEY": "<api-key>",
"POLY_ADDRESS": "<api-key>",
"POLY_SIGNATURE": "<api-key>",
"POLY_PASSPHRASE": "<api-key>",
"POLY_TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
POLY_API_KEY: '<api-key>',
POLY_ADDRESS: '<api-key>',
POLY_SIGNATURE: '<api-key>',
POLY_PASSPHRASE: '<api-key>',
POLY_TIMESTAMP: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order: {
maker: '0x1234567890123456789012345678901234567890',
signer: '0x1234567890123456789012345678901234567890',
tokenId: '0xabc123def456...',
makerAmount: '100000000',
takerAmount: '200000000',
side: 'BUY',
expiration: '1735689600',
timestamp: '1735689600000',
metadata: '',
builder: '0x0000000000000000000000000000000000000000000000000000000000000000',
signature: '0x1234abcd...',
salt: 1234567890,
signatureType: 0
},
owner: 'f4f247b7-4ac7-ff29-a152-04fda0a8755a',
orderType: 'GTC',
deferExec: false,
postOnly: false
})
};
fetch('https://clob.polymarket.com/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://clob.polymarket.com/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([
'order' => [
'maker' => '0x1234567890123456789012345678901234567890',
'signer' => '0x1234567890123456789012345678901234567890',
'tokenId' => '0xabc123def456...',
'makerAmount' => '100000000',
'takerAmount' => '200000000',
'side' => 'BUY',
'expiration' => '1735689600',
'timestamp' => '1735689600000',
'metadata' => '',
'builder' => '0x0000000000000000000000000000000000000000000000000000000000000000',
'signature' => '0x1234abcd...',
'salt' => 1234567890,
'signatureType' => 0
],
'owner' => 'f4f247b7-4ac7-ff29-a152-04fda0a8755a',
'orderType' => 'GTC',
'deferExec' => false,
'postOnly' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"POLY_ADDRESS: <api-key>",
"POLY_API_KEY: <api-key>",
"POLY_PASSPHRASE: <api-key>",
"POLY_SIGNATURE: <api-key>",
"POLY_TIMESTAMP: <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://clob.polymarket.com/order"
payload := strings.NewReader("{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("POLY_API_KEY", "<api-key>")
req.Header.Add("POLY_ADDRESS", "<api-key>")
req.Header.Add("POLY_SIGNATURE", "<api-key>")
req.Header.Add("POLY_PASSPHRASE", "<api-key>")
req.Header.Add("POLY_TIMESTAMP", "<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://clob.polymarket.com/order")
.header("POLY_API_KEY", "<api-key>")
.header("POLY_ADDRESS", "<api-key>")
.header("POLY_SIGNATURE", "<api-key>")
.header("POLY_PASSPHRASE", "<api-key>")
.header("POLY_TIMESTAMP", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["POLY_API_KEY"] = '<api-key>'
request["POLY_ADDRESS"] = '<api-key>'
request["POLY_SIGNATURE"] = '<api-key>'
request["POLY_PASSPHRASE"] = '<api-key>'
request["POLY_TIMESTAMP"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"maker\": \"0x1234567890123456789012345678901234567890\",\n \"signer\": \"0x1234567890123456789012345678901234567890\",\n \"tokenId\": \"0xabc123def456...\",\n \"makerAmount\": \"100000000\",\n \"takerAmount\": \"200000000\",\n \"side\": \"BUY\",\n \"expiration\": \"1735689600\",\n \"timestamp\": \"1735689600000\",\n \"metadata\": \"\",\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"signature\": \"0x1234abcd...\",\n \"salt\": 1234567890,\n \"signatureType\": 0\n },\n \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",\n \"orderType\": \"GTC\",\n \"deferExec\": false,\n \"postOnly\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderID": "0xabcdef1234567890abcdef1234567890abcdef12",
"status": "live",
"makingAmount": "100000000",
"takingAmount": "200000000",
"errorMsg": ""
}Authorizations
Your API key
Ethereum address associated with the API key
HMAC signature of the request
API key passphrase
Unix timestamp of the request
Body
Order payload submitted to the CLOB API. In CLOB V2, expiration remains in
the POST /order wire body for GTD/order-expiry handling, but it is not part
of the EIP-712 signed order struct.
Show child attributes
Show child attributes
UUID of the API key owner
"f4f247b7-4ac7-ff29-a152-04fda0a8755a"
Time in force
GTC, FOK, GTD, FAK Whether to defer execution
Whether the order must rest on the book and not match immediately. Only supported for GTC and GTD orders.
Response
Order successfully processed
Whether the order was successfully processed
true
Unique identifier for the order (order hash)
"0xabcdef1234567890abcdef1234567890abcdef12"
Status of the order after processing
live, matched, delayed Amount the maker is providing in fixed-math with 6 decimals
"100000000"
Amount the taker is providing in fixed-math with 6 decimals
"200000000"
Array of transaction hashes (present when status is 'matched')
[
"0x1234567890abcdef1234567890abcdef12345678"
]Array of trade IDs (present when status is 'matched')
Error message (empty on success)
""
Was this page helpful?