Get information about solver competition.
Returns the competition information by tx_hash.
curl --request GET \
--url https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}import requests
url = "https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}', 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/v2/solver_competition/by_tx_hash/{tx_hash}",
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/v2/solver_competition/by_tx_hash/{tx_hash}"
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/v2/solver_competition/by_tx_hash/{tx_hash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}")
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{
"auctionId": 123,
"auctionStartBlock": 123,
"auctionDeadlineBlock": 123,
"transactionHashes": [
"0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5"
],
"referenceScores": {},
"auction": {
"orders": [
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
],
"prices": {}
},
"solutions": [
{
"ranking": 123,
"solverAddress": "<string>",
"score": "1234567890",
"referenceScore": "1234567890",
"txHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"clearingPrices": {},
"orders": [
{
"id": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"sellAmount": "1234567890",
"buyAmount": "1234567890"
}
],
"isWinner": true,
"filteredOut": true
}
]
}Path Parameters
Transaction hash in which the competition was settled.
32 byte digest encoded as a hex with 0x prefix.
"0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5"
Response
Competition
The settlements submitted by every solver for a specific auction.
The auctionId corresponds to the id external solvers are provided
with.
The ID of the auction the competition info is for.
Block that the auction started on.
Block deadline by which the auction must be settled.
The hashes of the transactions for the winning solutions of this competition.
32 byte digest encoded as a hex with 0x prefix.
The components that describe a batch auction for the solver competition.
Show child attributes
Show child attributes
Maps from solver name to object describing that solver's settlement.
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}import requests
url = "https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}', 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/v2/solver_competition/by_tx_hash/{tx_hash}",
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/v2/solver_competition/by_tx_hash/{tx_hash}"
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/v2/solver_competition/by_tx_hash/{tx_hash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v2/solver_competition/by_tx_hash/{tx_hash}")
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{
"auctionId": 123,
"auctionStartBlock": 123,
"auctionDeadlineBlock": 123,
"transactionHashes": [
"0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5"
],
"referenceScores": {},
"auction": {
"orders": [
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
],
"prices": {}
},
"solutions": [
{
"ranking": 123,
"solverAddress": "<string>",
"score": "1234567890",
"referenceScore": "1234567890",
"txHash": "0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5",
"clearingPrices": {},
"orders": [
{
"id": "0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a",
"sellAmount": "1234567890",
"buyAmount": "1234567890"
}
],
"isWinner": true,
"filteredOut": true
}
]
}