Search Markets
curl --request GET \
--url https://api-v2.swaps.xyz/api/workflows/polymarket/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.swaps.xyz/api/workflows/polymarket/search"
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/polymarket/search', 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/polymarket/search",
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/polymarket/search"
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/polymarket/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.swaps.xyz/api/workflows/polymarket/search")
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{
"events": [
{
"id": "<string>",
"ticker": "<string>",
"slug": "<string>",
"title": "<string>",
"subtitle": "<string>",
"description": "<string>",
"resolutionSource": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"creationDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"image": "<string>",
"icon": "<string>",
"active": true,
"closed": true,
"archived": true,
"new": true,
"featured": true,
"restricted": true,
"volume": 123,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"openInterest": 123,
"liquidity": 123,
"liquidityAmm": 123,
"liquidityClob": 123,
"sortBy": "<string>",
"category": "<string>",
"subcategory": "<string>",
"isTemplate": true,
"templateVariables": "<string>",
"published_at": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"commentsEnabled": true,
"competitive": 123,
"featuredImage": "<string>",
"disqusThread": "<string>",
"parentEvent": "<string>",
"enableOrderBook": true,
"negRisk": true,
"negRiskMarketID": "<string>",
"negRiskFeeBips": 123,
"commentCount": 123,
"imageOptimized": {},
"iconOptimized": {},
"featuredImageOptimized": {},
"subEvents": [
"<string>"
],
"cyom": true,
"closedTime": "2023-11-07T05:31:56Z",
"showAllOutcomes": true,
"showMarketImages": true,
"automaticallyResolved": true,
"enableNegRisk": true,
"automaticallyActive": true,
"eventDate": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"eventWeek": 123,
"seriesSlug": "<string>",
"score": "<string>",
"elapsed": "<string>",
"period": "<string>",
"live": true,
"ended": true,
"finishedTimestamp": "2023-11-07T05:31:56Z",
"gmpChartMode": "<string>",
"eventCreators": [
{}
],
"tweetCount": 123,
"chats": [
{}
],
"featuredOrder": 123,
"estimateValue": true,
"cantEstimate": true,
"estimatedValue": "<string>",
"templates": [
{}
],
"spreadsMainLine": 123,
"totalsMainLine": 123,
"carouselMap": "<string>",
"negRiskAugmented": true,
"pendingDeployment": true,
"deploying": true,
"deployingTimestamp": "2023-11-07T05:31:56Z",
"scheduledDeploymentTimestamp": "2023-11-07T05:31:56Z",
"gameStatus": "<string>",
"requiresTranslation": true,
"markets": [
{
"id": "<string>",
"question": "<string>",
"conditionId": "<string>",
"slug": "<string>",
"resolutionSource": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"liquidity": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"outcomes": "<string>",
"outcomePrices": "<string>",
"volume": "<string>",
"active": true,
"closed": true,
"marketMakerAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"new": true,
"featured": true,
"submitted_by": "<string>",
"archived": true,
"resolvedBy": "<string>",
"restricted": true,
"groupItemTitle": "<string>",
"groupItemThreshold": "<string>",
"questionID": "<string>",
"enableOrderBook": true,
"orderPriceMinTickSize": 123,
"orderMinSize": 123,
"volumeNum": 123,
"liquidityNum": 123,
"endDateIso": "<string>",
"startDateIso": "<string>",
"hasReviewedDates": true,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"clobTokenIds": "<string>",
"umaBond": "<string>",
"umaReward": "<string>",
"volume24hrAmm": 123,
"volume1wkAmm": 123,
"volume1moAmm": 123,
"volume1yrAmm": 123,
"volume24hrClob": 123,
"volume1wkClob": 123,
"volume1moClob": 123,
"volume1yrClob": 123,
"volumeAmm": 123,
"volumeClob": 123,
"liquidityAmm": 123,
"liquidityClob": 123,
"acceptingOrders": true,
"negRisk": true,
"negRiskMarketID": "<string>",
"negRiskRequestID": "<string>",
"ready": true,
"funded": true,
"acceptingOrdersTimestamp": "2023-11-07T05:31:56Z",
"cyom": true,
"competitive": 123,
"pagerDutyNotificationEnabled": true,
"approved": true,
"clobRewards": [
{}
],
"rewardsMinSize": 123,
"rewardsMaxSpread": 123,
"spread": 123,
"oneDayPriceChange": 123,
"oneHourPriceChange": 123,
"oneWeekPriceChange": 123,
"oneMonthPriceChange": 123,
"oneYearPriceChange": 123,
"lastTradePrice": 123,
"bestBid": 123,
"bestAsk": 123,
"automaticallyActive": true,
"clearBookOnStart": true,
"seriesColor": "<string>",
"showGmpSeries": true,
"showGmpOutcome": true,
"manualActivation": true,
"negRiskOther": true,
"umaResolutionStatuses": "<string>",
"pendingDeployment": true,
"deploying": true,
"rfqEnabled": true,
"holdingRewardsEnabled": true,
"feesEnabled": true,
"image": "<string>",
"icon": "<string>"
}
],
"series": [
{
"id": "<string>",
"ticker": "<string>",
"slug": "<string>",
"title": "<string>",
"seriesType": "<string>",
"recurrence": "<string>",
"image": "<string>",
"icon": "<string>",
"active": true,
"closed": true,
"archived": true,
"featured": true,
"restricted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"volume": 123,
"liquidity": 123,
"commentCount": 123
}
],
"categories": [
{}
],
"collections": [
{}
],
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"forceShow": true,
"publishedAt": "<string>",
"createdBy": 123,
"updatedBy": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"forceHide": true,
"isCarousel": true,
"requiresTranslation": true
}
]
}
],
"pagination": {
"hasMore": true,
"totalResults": 123
},
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"forceShow": true,
"publishedAt": "<string>",
"createdBy": 123,
"updatedBy": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"forceHide": true,
"isCarousel": true,
"requiresTranslation": true
}
],
"profiles": [
{}
]
}{
"error": "<string>",
"code": 123,
"details": {}
}{
"error": "<string>",
"code": 123,
"details": {}
}{
"error": "<string>",
"code": 123,
"details": {}
}Market Discovery
Search Markets
Search for markets and events by query string or tags.
GET
/
api
/
workflows
/
polymarket
/
search
Search Markets
curl --request GET \
--url https://api-v2.swaps.xyz/api/workflows/polymarket/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.swaps.xyz/api/workflows/polymarket/search"
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/polymarket/search', 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/polymarket/search",
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/polymarket/search"
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/polymarket/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.swaps.xyz/api/workflows/polymarket/search")
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{
"events": [
{
"id": "<string>",
"ticker": "<string>",
"slug": "<string>",
"title": "<string>",
"subtitle": "<string>",
"description": "<string>",
"resolutionSource": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"creationDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"image": "<string>",
"icon": "<string>",
"active": true,
"closed": true,
"archived": true,
"new": true,
"featured": true,
"restricted": true,
"volume": 123,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"openInterest": 123,
"liquidity": 123,
"liquidityAmm": 123,
"liquidityClob": 123,
"sortBy": "<string>",
"category": "<string>",
"subcategory": "<string>",
"isTemplate": true,
"templateVariables": "<string>",
"published_at": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"commentsEnabled": true,
"competitive": 123,
"featuredImage": "<string>",
"disqusThread": "<string>",
"parentEvent": "<string>",
"enableOrderBook": true,
"negRisk": true,
"negRiskMarketID": "<string>",
"negRiskFeeBips": 123,
"commentCount": 123,
"imageOptimized": {},
"iconOptimized": {},
"featuredImageOptimized": {},
"subEvents": [
"<string>"
],
"cyom": true,
"closedTime": "2023-11-07T05:31:56Z",
"showAllOutcomes": true,
"showMarketImages": true,
"automaticallyResolved": true,
"enableNegRisk": true,
"automaticallyActive": true,
"eventDate": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"eventWeek": 123,
"seriesSlug": "<string>",
"score": "<string>",
"elapsed": "<string>",
"period": "<string>",
"live": true,
"ended": true,
"finishedTimestamp": "2023-11-07T05:31:56Z",
"gmpChartMode": "<string>",
"eventCreators": [
{}
],
"tweetCount": 123,
"chats": [
{}
],
"featuredOrder": 123,
"estimateValue": true,
"cantEstimate": true,
"estimatedValue": "<string>",
"templates": [
{}
],
"spreadsMainLine": 123,
"totalsMainLine": 123,
"carouselMap": "<string>",
"negRiskAugmented": true,
"pendingDeployment": true,
"deploying": true,
"deployingTimestamp": "2023-11-07T05:31:56Z",
"scheduledDeploymentTimestamp": "2023-11-07T05:31:56Z",
"gameStatus": "<string>",
"requiresTranslation": true,
"markets": [
{
"id": "<string>",
"question": "<string>",
"conditionId": "<string>",
"slug": "<string>",
"resolutionSource": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"liquidity": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"outcomes": "<string>",
"outcomePrices": "<string>",
"volume": "<string>",
"active": true,
"closed": true,
"marketMakerAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"new": true,
"featured": true,
"submitted_by": "<string>",
"archived": true,
"resolvedBy": "<string>",
"restricted": true,
"groupItemTitle": "<string>",
"groupItemThreshold": "<string>",
"questionID": "<string>",
"enableOrderBook": true,
"orderPriceMinTickSize": 123,
"orderMinSize": 123,
"volumeNum": 123,
"liquidityNum": 123,
"endDateIso": "<string>",
"startDateIso": "<string>",
"hasReviewedDates": true,
"volume24hr": 123,
"volume1wk": 123,
"volume1mo": 123,
"volume1yr": 123,
"clobTokenIds": "<string>",
"umaBond": "<string>",
"umaReward": "<string>",
"volume24hrAmm": 123,
"volume1wkAmm": 123,
"volume1moAmm": 123,
"volume1yrAmm": 123,
"volume24hrClob": 123,
"volume1wkClob": 123,
"volume1moClob": 123,
"volume1yrClob": 123,
"volumeAmm": 123,
"volumeClob": 123,
"liquidityAmm": 123,
"liquidityClob": 123,
"acceptingOrders": true,
"negRisk": true,
"negRiskMarketID": "<string>",
"negRiskRequestID": "<string>",
"ready": true,
"funded": true,
"acceptingOrdersTimestamp": "2023-11-07T05:31:56Z",
"cyom": true,
"competitive": 123,
"pagerDutyNotificationEnabled": true,
"approved": true,
"clobRewards": [
{}
],
"rewardsMinSize": 123,
"rewardsMaxSpread": 123,
"spread": 123,
"oneDayPriceChange": 123,
"oneHourPriceChange": 123,
"oneWeekPriceChange": 123,
"oneMonthPriceChange": 123,
"oneYearPriceChange": 123,
"lastTradePrice": 123,
"bestBid": 123,
"bestAsk": 123,
"automaticallyActive": true,
"clearBookOnStart": true,
"seriesColor": "<string>",
"showGmpSeries": true,
"showGmpOutcome": true,
"manualActivation": true,
"negRiskOther": true,
"umaResolutionStatuses": "<string>",
"pendingDeployment": true,
"deploying": true,
"rfqEnabled": true,
"holdingRewardsEnabled": true,
"feesEnabled": true,
"image": "<string>",
"icon": "<string>"
}
],
"series": [
{
"id": "<string>",
"ticker": "<string>",
"slug": "<string>",
"title": "<string>",
"seriesType": "<string>",
"recurrence": "<string>",
"image": "<string>",
"icon": "<string>",
"active": true,
"closed": true,
"archived": true,
"featured": true,
"restricted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"volume": 123,
"liquidity": 123,
"commentCount": 123
}
],
"categories": [
{}
],
"collections": [
{}
],
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"forceShow": true,
"publishedAt": "<string>",
"createdBy": 123,
"updatedBy": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"forceHide": true,
"isCarousel": true,
"requiresTranslation": true
}
]
}
],
"pagination": {
"hasMore": true,
"totalResults": 123
},
"tags": [
{
"id": "<string>",
"label": "<string>",
"slug": "<string>",
"forceShow": true,
"publishedAt": "<string>",
"createdBy": 123,
"updatedBy": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"forceHide": true,
"isCarousel": true,
"requiresTranslation": true
}
],
"profiles": [
{}
]
}{
"error": "<string>",
"code": 123,
"details": {}
}{
"error": "<string>",
"code": 123,
"details": {}
}{
"error": "<string>",
"code": 123,
"details": {}
}Authorizations
API key for authentication. Contact Swaps.xyz to obtain an API key.
Query Parameters
Search query string. Use '*' to return all results.
Array of tag IDs to filter by (can be repeated)
Page number for pagination
Required range:
x >= 1Limit results per type
Required range:
1 <= x <= 100Only return markets currently accepting orders
Response
Successful search response
⌘I