Get existing orders from the list of UIDs.
Returns an array where each element is an object with either an “order” key containing the full order, or an “error” key containing the UID and a description of what went wrong.
POST
/
api
/
v1
/
orders
/
by_uids
Get existing orders from the list of UIDs.
curl --request POST \
--url https://api.cow.fi/mainnet/api/v1/orders/by_uids \
--header 'Content-Type: application/json' \
--data '
[
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
]
'import requests
url = "https://api.cow.fi/mainnet/api/v1/orders/by_uids"
payload = ["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"]
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([
'0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a'
])
};
fetch('https://api.cow.fi/mainnet/api/v1/orders/by_uids', 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.cow.fi/mainnet/api/v1/orders/by_uids",
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([
'0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a'
]),
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.cow.fi/mainnet/api/v1/orders/by_uids"
payload := strings.NewReader("[\n \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\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://api.cow.fi/mainnet/api/v1/orders/by_uids")
.header("Content-Type", "application/json")
.body("[\n \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/orders/by_uids")
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 \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\n]"
response = http.request(request)
puts response.read_body{
"order": {
"sellToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"buyToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"sellAmount": "1234567890",
"buyAmount": "1234567890",
"validTo": 123,
"feeAmount": "1234567890",
"partiallyFillable": true,
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"appData": "{\"version\":\"0.9.0\",\"metadata\":{}}",
"creationDate": "2020-12-03T18:35:18.814523Z",
"owner": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"uid": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"executedSellAmount": "1234567890",
"executedSellAmountBeforeFees": "1234567890",
"executedBuyAmount": "1234567890",
"executedFeeAmount": "1234567890",
"invalidated": true,
"settlementContract": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"receiver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"sellTokenBalance": "erc20",
"buyTokenBalance": "erc20",
"from": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"quoteId": 123,
"appDataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"fullBalanceCheck": false,
"availableBalance": "1234567890",
"isLiquidityOrder": true,
"ethflowData": {
"refundTxHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"userValidTo": 123
},
"onchainUser": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"onchainOrderData": {
"sender": "0x6810e776880c02933d47db1b9fc05908e5386b96"
},
"executedFee": "1234567890",
"executedFeeToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"fullAppData": "<string>",
"quote": {
"gasAmount": "150000",
"gasPrice": "15000000000",
"sellTokenPrice": "1000000000",
"sellAmount": "1234567890",
"buyAmount": "1234567890",
"feeAmount": "1234567890",
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"verified": true,
"metadata": {}
},
"interactions": {
"pre": [
{
"target": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"value": "1234567890",
"callData": "0xca11da7a"
}
],
"post": [
{
"target": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"value": "1234567890",
"callData": "0xca11da7a"
}
]
}
}
}Body
application/json
The list of up to 128 order uids to fetch
Unique identifier for the order: 56 bytes encoded as hex with 0x
prefix.
Bytes 0..32 are the order digest, bytes 30..52 the owner address and
bytes 52..56 the expiry (validTo) as a uint32 unix epoch timestamp.
Response
The resulting full order data based on the request. Each element of the array is an object of the following format:
{"order": <Order>}for successfully fetched orders{"error": {"uid": "<UID>", "description": "<message>"}}for orders that failed conversion The result ordering is not guaranteed and might differ from the order of requested UIDs. Orders that do not exist in the database will be missing from the response.
- Option 1
- Option 2
An order as returned by the API. Combines the order creation data, order metadata, and any associated interactions.
Show child attributes
Show child attributes
Last modified on March 17, 2026
Was this page helpful?
Cancel multiple orders by marking them invalid with a timestamp.
Previous
Get existing order from UID.
Next
⌘I
Get existing orders from the list of UIDs.
curl --request POST \
--url https://api.cow.fi/mainnet/api/v1/orders/by_uids \
--header 'Content-Type: application/json' \
--data '
[
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
]
'import requests
url = "https://api.cow.fi/mainnet/api/v1/orders/by_uids"
payload = ["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"]
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([
'0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a'
])
};
fetch('https://api.cow.fi/mainnet/api/v1/orders/by_uids', 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.cow.fi/mainnet/api/v1/orders/by_uids",
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([
'0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a'
]),
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.cow.fi/mainnet/api/v1/orders/by_uids"
payload := strings.NewReader("[\n \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\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://api.cow.fi/mainnet/api/v1/orders/by_uids")
.header("Content-Type", "application/json")
.body("[\n \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/orders/by_uids")
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 \"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a\"\n]"
response = http.request(request)
puts response.read_body{
"order": {
"sellToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"buyToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"sellAmount": "1234567890",
"buyAmount": "1234567890",
"validTo": 123,
"feeAmount": "1234567890",
"partiallyFillable": true,
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"appData": "{\"version\":\"0.9.0\",\"metadata\":{}}",
"creationDate": "2020-12-03T18:35:18.814523Z",
"owner": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"uid": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"executedSellAmount": "1234567890",
"executedSellAmountBeforeFees": "1234567890",
"executedBuyAmount": "1234567890",
"executedFeeAmount": "1234567890",
"invalidated": true,
"settlementContract": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"receiver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"sellTokenBalance": "erc20",
"buyTokenBalance": "erc20",
"from": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"quoteId": 123,
"appDataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"fullBalanceCheck": false,
"availableBalance": "1234567890",
"isLiquidityOrder": true,
"ethflowData": {
"refundTxHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"userValidTo": 123
},
"onchainUser": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"onchainOrderData": {
"sender": "0x6810e776880c02933d47db1b9fc05908e5386b96"
},
"executedFee": "1234567890",
"executedFeeToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"fullAppData": "<string>",
"quote": {
"gasAmount": "150000",
"gasPrice": "15000000000",
"sellTokenPrice": "1000000000",
"sellAmount": "1234567890",
"buyAmount": "1234567890",
"feeAmount": "1234567890",
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"verified": true,
"metadata": {}
},
"interactions": {
"pre": [
{
"target": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"value": "1234567890",
"callData": "0xca11da7a"
}
],
"post": [
{
"target": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"value": "1234567890",
"callData": "0xca11da7a"
}
]
}
}
}