curl --request PATCH \
--url https://api-uat.dimetrades.com/api/orders/{orderId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"price": 48,
"quantity": 12
}
'import requests
url = "https://api-uat.dimetrades.com/api/orders/{orderId}"
payload = {
"price": 48,
"quantity": 12
}
headers = {
"Authorization": "Bearer <token>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({price: 48, quantity: 12})
};
fetch('https://api-uat.dimetrades.com/api/orders/{orderId}', 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-uat.dimetrades.com/api/orders/{orderId}",
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([
'price' => 48,
'quantity' => 12
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-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-uat.dimetrades.com/api/orders/{orderId}"
payload := strings.NewReader("{\n \"price\": 48,\n \"quantity\": 12\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-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.patch("https://api-uat.dimetrades.com/api/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"price\": 48,\n \"quantity\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": 48,\n \"quantity\": 12\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "019f2cfb-9df3-733c-b8af-42a3620ee455",
"status": "pending_modify",
"newPrice": 48,
"newRemainingQuantity": 12,
"newTotalQuantity": 12,
"message": "Order modification request submitted successfully",
"warning": "This modification will cause the order to lose its queue priority"
},
"errors": []
}Modify an order
Modifies the price and/or total quantity of a live order — one still
resting on the book, i.e. status open or partial. At least one of
price or quantity must be provided. Publishes a modify message to the
engine; the response status reads pending_modify until confirmed. A
price change (or quantity increase) may cost the order its queue priority —
flagged via data.warning. Requires a KYC-verified account.
External-wallet brands: the reservation check on a modify
For a customer whose brand has external wallet integration enabled, a BUY modify
that increases the order’s cost triggers the same synchronous
reservation check as placement, before the
modify is accepted. The amount asked of you is the order’s remaining unfilled
quantity × the new price, plus the worst-case (taker-rate) fee — not the order’s
original total, and not a delta. The check runs only when that cost is larger
than the order’s current remaining cost; a modify that keeps or lowers the cost
makes no call. reserved: false rejects the modify with
EXTERNAL_WALLET_INSUFFICIENT_FUNDS (422), and an unreachable endpoint
rejects it with EXTERNAL_WALLET_UNAVAILABLE (502).
A modify is rejected with MarketHalted (4010) while the market is halted, even
though a cancel is still accepted.
pending_modify is only an acknowledgement value and is never stored on
the order: a successful modify leaves the status unchanged (open stays
open, partial stays partial) and applies the new price/quantity.
Terminal orders — filled, partially_filled, canceled, rejected,
expired — cannot be modified and return a 400. As with cancel, the
part-filled status that can still be modified is partial, not the
terminal partially_filled.
⚠️ price in, newPrice out — they are in different spaces
The price you send is the user-facing price (for a SELL order, the
price you want to sell at). The newPrice returned in the response is in
the orderbook’s representation.
For a converted (SELL) order those differ by the complement: submit
price: 70 on a SELL YES order and the response echoes newPrice: 30.
Invert it (100 - newPrice) before showing it back to the user, or the
confirmation will contradict what they just typed.
For a BUY order the two are identical and no conversion is needed. See Conventions → Order prices.
curl --request PATCH \
--url https://api-uat.dimetrades.com/api/orders/{orderId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"price": 48,
"quantity": 12
}
'import requests
url = "https://api-uat.dimetrades.com/api/orders/{orderId}"
payload = {
"price": 48,
"quantity": 12
}
headers = {
"Authorization": "Bearer <token>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({price: 48, quantity: 12})
};
fetch('https://api-uat.dimetrades.com/api/orders/{orderId}', 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-uat.dimetrades.com/api/orders/{orderId}",
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([
'price' => 48,
'quantity' => 12
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-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-uat.dimetrades.com/api/orders/{orderId}"
payload := strings.NewReader("{\n \"price\": 48,\n \"quantity\": 12\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-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.patch("https://api-uat.dimetrades.com/api/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"price\": 48,\n \"quantity\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": 48,\n \"quantity\": 12\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "019f2cfb-9df3-733c-b8af-42a3620ee455",
"status": "pending_modify",
"newPrice": 48,
"newRemainingQuantity": 12,
"newTotalQuantity": 12,
"message": "Order modification request submitted successfully",
"warning": "This modification will cause the order to lose its queue priority"
},
"errors": []
}Authorizations
The end user's JWT access token, sent as Authorization: Bearer <token>.
Obtain one from POST /partner/customers or POST /partner/customers/login
— both return it as token. It identifies which of your users a call
is made for, and is sent alongside your X-API-Key on every authenticated
endpoint.
Event discovery, categories, subcategories and scores are public and need no token.
ISV / partner credential — public half. Required on every request.
Identifies the integration partner (ISV) making the call. Issued by Dime
Trades when the ISV is onboarded and sent on every /partner/* endpoint:
X-API-Key: dt_pk_live_7f3c9a2e5b18
- On the two partner endpoints that create accounts or issue tokens (
POST /partner/customers,POST /partner/customers/login), it is accompanied byX-API-Secretand is the only authentication — there is no user token yet. - On every other partner endpoint it is sent alongside the user's
Authorization: Bearer <token>: the API key says which platform is calling, the bearer token says which user it is calling for.
Credentials are scoped to one or more brands; using a key with a brandId outside that scope returns 403. Staging and production keys are separate.
The key identifies your platform — treat it as a backend credential.
Path Parameters
The UUID of the order.
"019f2cfb-9df3-733c-b8af-42a3620ee455"
Body
- Option 1
- Option 2
Response
Modification request accepted.
Acknowledgement returned by PATCH /orders/{orderId} once the modify command is published to the matching engine. newPrice is expressed in orderbook terms for a converted (SELL) order (100 - <submitted price>). warning is only present when the modification (a price change, or a quantity increase) will cause the order to lose its queue priority — see ModifyOrderService.run (willLosePriority); it is omitted entirely otherwise, it is never null.
pending_modify is an acknowledgement value, not an order status. It means the modify command was published to the matching engine; it is never written to the order. Once the engine confirms, the order keeps its live status (open or partial) with the new price/quantity applied — a successful modify never changes status. Only live orders can be modified; a terminal one (filled, partially_filled, canceled, rejected, expired) returns a 400.
Show child attributes
Show child attributes
