Debug an order's lifecycle.
Returns a comprehensive debug report for the given order, including order details, lifecycle events, auction participation, proposed solutions, executions, trades, and settlement attempts.
curl --request GET \
--url https://api.cow.fi/mainnet/api/v1/debug/order/{uid}import requests
url = "https://api.cow.fi/mainnet/api/v1/debug/order/{uid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cow.fi/mainnet/api/v1/debug/order/{uid}', 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/debug/order/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cow.fi/mainnet/api/v1/debug/order/{uid}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cow.fi/mainnet/api/v1/debug/order/{uid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/debug/order/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"orderUid": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"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"
}
]
}
},
"events": [
{
"label": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
],
"auctions": [
{
"id": 123,
"block": 123,
"deadline": 123,
"nativePrices": {},
"proposedSolutions": [
{
"solutionUid": 123,
"ranking": 123,
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"isWinner": true,
"filteredOut": true,
"score": "<string>",
"executedSell": "1234567890",
"executedBuy": "1234567890"
}
],
"executions": [
{
"executedFee": "1234567890",
"executedFeeToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"blockNumber": 123,
"protocolFees": [
{
"token": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"amount": "1234567890"
}
]
}
],
"settlementAttempts": [
{
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"solutionUid": 123,
"startTimestamp": "2023-11-07T05:31:56Z",
"startBlock": 123,
"deadlineBlock": 123,
"endTimestamp": "2023-11-07T05:31:56Z",
"endBlock": 123,
"outcome": "<string>"
}
],
"feePolicies": [
{
"surplusFactor": 123,
"surplusMaxVolumeFactor": 123,
"volumeFactor": 123,
"priceImprovementFactor": 123,
"priceImprovementMaxVolumeFactor": 123
}
]
}
],
"trades": [
{
"blockNumber": 123,
"logIndex": 123,
"buyAmount": "1234567890",
"sellAmount": "1234567890",
"sellAmountBeforeFees": "1234567890",
"txHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"auctionId": 123
}
]
}Path Parameters
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.
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
Response
Debug report returned.
The UID of the order being debugged.
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
An order as returned by the API. Combines the order creation data, order metadata, and any associated interactions.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Auctions this order participated in, sorted by ID. Each auction groups all related data: native prices, proposed solutions, executions, settlement attempts, and fee policies.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.cow.fi/mainnet/api/v1/debug/order/{uid}import requests
url = "https://api.cow.fi/mainnet/api/v1/debug/order/{uid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cow.fi/mainnet/api/v1/debug/order/{uid}', 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/debug/order/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cow.fi/mainnet/api/v1/debug/order/{uid}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cow.fi/mainnet/api/v1/debug/order/{uid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/debug/order/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"orderUid": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"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"
}
]
}
},
"events": [
{
"label": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
],
"auctions": [
{
"id": 123,
"block": 123,
"deadline": 123,
"nativePrices": {},
"proposedSolutions": [
{
"solutionUid": 123,
"ranking": 123,
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"isWinner": true,
"filteredOut": true,
"score": "<string>",
"executedSell": "1234567890",
"executedBuy": "1234567890"
}
],
"executions": [
{
"executedFee": "1234567890",
"executedFeeToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"blockNumber": 123,
"protocolFees": [
{
"token": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"amount": "1234567890"
}
]
}
],
"settlementAttempts": [
{
"solver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
"solutionUid": 123,
"startTimestamp": "2023-11-07T05:31:56Z",
"startBlock": 123,
"deadlineBlock": 123,
"endTimestamp": "2023-11-07T05:31:56Z",
"endBlock": 123,
"outcome": "<string>"
}
],
"feePolicies": [
{
"surplusFactor": 123,
"surplusMaxVolumeFactor": 123,
"volumeFactor": 123,
"priceImprovementFactor": 123,
"priceImprovementMaxVolumeFactor": 123
}
]
}
],
"trades": [
{
"blockNumber": 123,
"logIndex": 123,
"buyAmount": "1234567890",
"sellAmount": "1234567890",
"sellAmountBeforeFees": "1234567890",
"txHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"auctionId": 123
}
]
}