curl --request POST \
--url https://pmperp.com-polybet-q05.com/v1/trade/orders \
--header 'Content-Type: application/json' \
--data '
{
"op": {
"type": "createOrders",
"args": [
{
"iid": 1,
"buy": true,
"qty": "10.00",
"p": "100.00",
"po": false,
"ro": false,
"c": "550e8400e29b41d4a716446655440000",
"tr": {
"market": true,
"trp": "110.00"
}
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
'import requests
url = "https://pmperp.com-polybet-q05.com/v1/trade/orders"
payload = {
"op": {
"type": "createOrders",
"args": [
{
"iid": 1,
"buy": True,
"qty": "10.00",
"p": "100.00",
"po": False,
"ro": False,
"c": "550e8400e29b41d4a716446655440000",
"tr": {
"market": True,
"trp": "110.00"
}
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
op: {
type: 'createOrders',
args: [
{
iid: 1,
buy: true,
qty: '10.00',
p: '100.00',
po: false,
ro: false,
c: '550e8400e29b41d4a716446655440000',
tr: {market: true, trp: '110.00'}
}
]
},
sig: '0x1234567890...',
salt: 1234567890,
ts: 1767225600000,
exp: 1767225600000
})
};
fetch('https://pmperp.com-polybet-q05.com/v1/trade/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://pmperp.com-polybet-q05.com/v1/trade/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([
'op' => [
'type' => 'createOrders',
'args' => [
[
'iid' => 1,
'buy' => true,
'qty' => '10.00',
'p' => '100.00',
'po' => false,
'ro' => false,
'c' => '550e8400e29b41d4a716446655440000',
'tr' => [
'market' => true,
'trp' => '110.00'
]
]
]
],
'sig' => '0x1234567890...',
'salt' => 1234567890,
'ts' => 1767225600000,
'exp' => 1767225600000
]),
CURLOPT_HTTPHEADER => [
"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 := "https://pmperp.com-polybet-q05.com/v1/trade/orders"
payload := strings.NewReader("{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
req, _ := http.NewRequest("POST", url, payload)
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://pmperp.com-polybet-q05.com/v1/trade/orders")
.header("Content-Type", "application/json")
.body("{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pmperp.com-polybet-q05.com/v1/trade/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}"
response = http.request(request)
puts response.read_body[
{
"status": "ok",
"oid": 1234567890,
"coid": "550e8400e29b41d4a716446655440000",
"builder": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
"fee_rate": "0.001"
}
}
]{
"status": "err",
"error": "insufficient_margin"
}{
"status": "err",
"error": "insufficient_margin"
}{
"status": "err",
"error": "insufficient_margin"
}Create Orders
Create new orders. Requires proxy signature, see proxy signing.
curl --request POST \
--url https://pmperp.com-polybet-q05.com/v1/trade/orders \
--header 'Content-Type: application/json' \
--data '
{
"op": {
"type": "createOrders",
"args": [
{
"iid": 1,
"buy": true,
"qty": "10.00",
"p": "100.00",
"po": false,
"ro": false,
"c": "550e8400e29b41d4a716446655440000",
"tr": {
"market": true,
"trp": "110.00"
}
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
'import requests
url = "https://pmperp.com-polybet-q05.com/v1/trade/orders"
payload = {
"op": {
"type": "createOrders",
"args": [
{
"iid": 1,
"buy": True,
"qty": "10.00",
"p": "100.00",
"po": False,
"ro": False,
"c": "550e8400e29b41d4a716446655440000",
"tr": {
"market": True,
"trp": "110.00"
}
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
op: {
type: 'createOrders',
args: [
{
iid: 1,
buy: true,
qty: '10.00',
p: '100.00',
po: false,
ro: false,
c: '550e8400e29b41d4a716446655440000',
tr: {market: true, trp: '110.00'}
}
]
},
sig: '0x1234567890...',
salt: 1234567890,
ts: 1767225600000,
exp: 1767225600000
})
};
fetch('https://pmperp.com-polybet-q05.com/v1/trade/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://pmperp.com-polybet-q05.com/v1/trade/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([
'op' => [
'type' => 'createOrders',
'args' => [
[
'iid' => 1,
'buy' => true,
'qty' => '10.00',
'p' => '100.00',
'po' => false,
'ro' => false,
'c' => '550e8400e29b41d4a716446655440000',
'tr' => [
'market' => true,
'trp' => '110.00'
]
]
]
],
'sig' => '0x1234567890...',
'salt' => 1234567890,
'ts' => 1767225600000,
'exp' => 1767225600000
]),
CURLOPT_HTTPHEADER => [
"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 := "https://pmperp.com-polybet-q05.com/v1/trade/orders"
payload := strings.NewReader("{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
req, _ := http.NewRequest("POST", url, payload)
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://pmperp.com-polybet-q05.com/v1/trade/orders")
.header("Content-Type", "application/json")
.body("{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pmperp.com-polybet-q05.com/v1/trade/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": {\n \"type\": \"createOrders\",\n \"args\": [\n {\n \"iid\": 1,\n \"buy\": true,\n \"qty\": \"10.00\",\n \"p\": \"100.00\",\n \"po\": false,\n \"ro\": false,\n \"c\": \"550e8400e29b41d4a716446655440000\",\n \"tr\": {\n \"market\": true,\n \"trp\": \"110.00\"\n }\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}"
response = http.request(request)
puts response.read_body[
{
"status": "ok",
"oid": 1234567890,
"coid": "550e8400e29b41d4a716446655440000",
"builder": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
"fee_rate": "0.001"
}
}
]{
"status": "err",
"error": "insufficient_margin"
}{
"status": "err",
"error": "insufficient_margin"
}{
"status": "err",
"error": "insufficient_margin"
}Body
Order request.
Show child attributes
Show child attributes
Signature in hex format
"0x1234567890..."
Salt
1234567890
Request timestamp. Unix milliseconds for most operations; Unix seconds for withdrawals (must match the on-chain EIP-712 struct verified against block.timestamp).
1767225600000
Command-processing deadline in Unix milliseconds, not an order auto-cancel time; the server caps it at now + 5 s, clamps larger values to that cap, and uses that 5 s default when omitted. Values at or before the server's clock are rejected with HTTP 400 (command expired).
1767225600000
Response
Order ACK response. Order result should be fetched using the get orders endpoint.
- Option 1
- Option 2
ok Order ID
1234567890
Echoed only when the request carried a client_order_id.
32^[0-9a-f]{32}$"550e8400e29b41d4a716446655440000"
Saved builder terms. Address is the registered Perps account, and fee_rate is an additional fraction of executed notional. Terms survive approval revocation for existing orders.
Show child attributes
Show child attributes
Was this page helpful?