Get Workflow Status
curl --request GET \
--url https://api-v2.swaps.xyz/api/workflows/getStatus \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.swaps.xyz/api/workflows/getStatus"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-v2.swaps.xyz/api/workflows/getStatus', 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-v2.swaps.xyz/api/workflows/getStatus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-v2.swaps.xyz/api/workflows/getStatus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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-v2.swaps.xyz/api/workflows/getStatus")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.swaps.xyz/api/workflows/getStatus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"txId": "0x36f51092bdfb6f9793fefd9b2d27529fbf7362b48ded9acb7fa4cc7aea03aeca",
"status": "success",
"operation": "placeOrder",
"timestamp": 1765593597,
"name": "polymarket",
"data": {
"userId": "0x0797bfec6d2d4f733d461bbee8125805e9e9c892",
"orderRequest": {
"tokenID": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
"feeRateBps": 0,
"slippage": 100,
"negRisk": true,
"amount": 5,
"price": 0.021,
"size": 5
},
"orderResponse": {
"id": "0xbd2f3c625c1f6f918a74e8645c3afee9e8f2c5adf91f178efa5e1b65f74fb489",
"status": "MATCHED",
"owner": "258f7485-b93f-52e5-2327-a53c49a299c1",
"maker_address": "0xBEDcAD563ddf52391573a016Bc5EC7A334Eec756",
"market": "0xb050c89e1e5738c79e117d28da1f057ac2f193511aab87a01b517b466c7265dc",
"asset_id": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
"original_size": "5",
"size_matched": "0",
"price": "0.02",
"outcome": "No",
"expiration": "1763996360",
"order_type": "GTD",
"associate_trades": [
"<string>"
],
"created_at": 1763996291
},
"relayTx": {
"txHash": "<string>",
"status": "<string>"
}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}Workflows | All
Get Workflow Status
Retrieves the status of a workflow transaction by transaction ID.
GET
/
workflows
/
getStatus
Get Workflow Status
curl --request GET \
--url https://api-v2.swaps.xyz/api/workflows/getStatus \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.swaps.xyz/api/workflows/getStatus"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-v2.swaps.xyz/api/workflows/getStatus', 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-v2.swaps.xyz/api/workflows/getStatus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-v2.swaps.xyz/api/workflows/getStatus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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-v2.swaps.xyz/api/workflows/getStatus")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.swaps.xyz/api/workflows/getStatus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"txId": "0x36f51092bdfb6f9793fefd9b2d27529fbf7362b48ded9acb7fa4cc7aea03aeca",
"status": "success",
"operation": "placeOrder",
"timestamp": 1765593597,
"name": "polymarket",
"data": {
"userId": "0x0797bfec6d2d4f733d461bbee8125805e9e9c892",
"orderRequest": {
"tokenID": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
"feeRateBps": 0,
"slippage": 100,
"negRisk": true,
"amount": 5,
"price": 0.021,
"size": 5
},
"orderResponse": {
"id": "0xbd2f3c625c1f6f918a74e8645c3afee9e8f2c5adf91f178efa5e1b65f74fb489",
"status": "MATCHED",
"owner": "258f7485-b93f-52e5-2327-a53c49a299c1",
"maker_address": "0xBEDcAD563ddf52391573a016Bc5EC7A334Eec756",
"market": "0xb050c89e1e5738c79e117d28da1f057ac2f193511aab87a01b517b466c7265dc",
"asset_id": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
"original_size": "5",
"size_matched": "0",
"price": "0.02",
"outcome": "No",
"expiration": "1763996360",
"order_type": "GTD",
"associate_trades": [
"<string>"
],
"created_at": 1763996291
},
"relayTx": {
"txHash": "<string>",
"status": "<string>"
}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"name": "<string>",
"message": "<string>",
"title": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"details": {}
}
}Authorizations
Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.
Query Parameters
Transaction ID from /getAction request
Example:
"0x1b121f30eeddfc1ee3eeb491c02be6c4b676b0ac0ac3e309fa25f010172c5af4"
Response
Workflow status response
Transaction ID
Example:
"0x36f51092bdfb6f9793fefd9b2d27529fbf7362b48ded9acb7fa4cc7aea03aeca"
Workflow status
Available options:
success, failed, pending Example:
"success"
Operation type
Example:
"placeOrder"
Unix timestamp when workflow was executed
Example:
1765593597
Workflow name
Example:
"polymarket"
Workflow-specific data
- Polymarket Data
- Generic Workflow Data
Show child attributes
Show child attributes
⌘I