Modify Orders COID
curl --request PATCH \
--url https://api.perpetuals.polymarket.com/v1/trade/orders-coid \
--header 'Content-Type: application/json' \
--data '
{
"op": {
"type": "modifyOrdersCOID",
"args": [
{
"coid": "550e8400e29b41d4a716446655440000",
"p": "100.00",
"qty": "10.00"
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
'import requests
url = "https://api.perpetuals.polymarket.com/v1/trade/orders-coid"
payload = {
"op": {
"type": "modifyOrdersCOID",
"args": [
{
"coid": "550e8400e29b41d4a716446655440000",
"p": "100.00",
"qty": "10.00"
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
op: {
type: 'modifyOrdersCOID',
args: [{coid: '550e8400e29b41d4a716446655440000', p: '100.00', qty: '10.00'}]
},
sig: '0x1234567890...',
salt: 1234567890,
ts: 1767225600000,
exp: 1767225600000
})
};
fetch('https://api.perpetuals.polymarket.com/v1/trade/orders-coid', 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.perpetuals.polymarket.com/v1/trade/orders-coid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'op' => [
'type' => 'modifyOrdersCOID',
'args' => [
[
'coid' => '550e8400e29b41d4a716446655440000',
'p' => '100.00',
'qty' => '10.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://api.perpetuals.polymarket.com/v1/trade/orders-coid"
payload := strings.NewReader("{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.perpetuals.polymarket.com/v1/trade/orders-coid")
.header("Content-Type", "application/json")
.body("{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\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://api.perpetuals.polymarket.com/v1/trade/orders-coid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\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",
"order": {
"oid": 1234567890,
"iid": 1,
"buy": true,
"p": "100.00",
"qty": "10.00",
"tif": "gtc",
"po": false,
"ro": false,
"rest": "9.00",
"fill": "1.00",
"cts": 1767225600000,
"uts": 1767225600000,
"status": "open",
"coid": "550e8400e29b41d4a716446655440000"
}
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
]按客户端订单 ID 修改订单
Modify the price and total quantity of existing orders by client order ID. Requires proxy signature, see proxy signing.
PATCH
/
v1
/
trade
/
orders-coid
Modify Orders COID
curl --request PATCH \
--url https://api.perpetuals.polymarket.com/v1/trade/orders-coid \
--header 'Content-Type: application/json' \
--data '
{
"op": {
"type": "modifyOrdersCOID",
"args": [
{
"coid": "550e8400e29b41d4a716446655440000",
"p": "100.00",
"qty": "10.00"
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
'import requests
url = "https://api.perpetuals.polymarket.com/v1/trade/orders-coid"
payload = {
"op": {
"type": "modifyOrdersCOID",
"args": [
{
"coid": "550e8400e29b41d4a716446655440000",
"p": "100.00",
"qty": "10.00"
}
]
},
"sig": "0x1234567890...",
"salt": 1234567890,
"ts": 1767225600000,
"exp": 1767225600000
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
op: {
type: 'modifyOrdersCOID',
args: [{coid: '550e8400e29b41d4a716446655440000', p: '100.00', qty: '10.00'}]
},
sig: '0x1234567890...',
salt: 1234567890,
ts: 1767225600000,
exp: 1767225600000
})
};
fetch('https://api.perpetuals.polymarket.com/v1/trade/orders-coid', 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.perpetuals.polymarket.com/v1/trade/orders-coid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'op' => [
'type' => 'modifyOrdersCOID',
'args' => [
[
'coid' => '550e8400e29b41d4a716446655440000',
'p' => '100.00',
'qty' => '10.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://api.perpetuals.polymarket.com/v1/trade/orders-coid"
payload := strings.NewReader("{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\n }\n ]\n },\n \"sig\": \"0x1234567890...\",\n \"salt\": 1234567890,\n \"ts\": 1767225600000,\n \"exp\": 1767225600000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.perpetuals.polymarket.com/v1/trade/orders-coid")
.header("Content-Type", "application/json")
.body("{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\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://api.perpetuals.polymarket.com/v1/trade/orders-coid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": {\n \"type\": \"modifyOrdersCOID\",\n \"args\": [\n {\n \"coid\": \"550e8400e29b41d4a716446655440000\",\n \"p\": \"100.00\",\n \"qty\": \"10.00\"\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",
"order": {
"oid": 1234567890,
"iid": 1,
"buy": true,
"p": "100.00",
"qty": "10.00",
"tif": "gtc",
"po": false,
"ro": false,
"rest": "9.00",
"fill": "1.00",
"cts": 1767225600000,
"uts": 1767225600000,
"status": "open",
"coid": "550e8400e29b41d4a716446655440000"
}
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
][
{
"status": "err",
"error": "insufficient_margin"
}
]请求体
application/json
Modify by coid 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 expiry timestamp in Unix milliseconds. If provided, it must be in the future and within the gateway's default command timeout. It can shorten request validity but cannot extend it. This is not an order auto-cancel time.
示例:
1767225600000
此页面对您有帮助吗?
⌘I