Search events or markets
curl --request GET \
--url https://api.portalhq.io/api/v3/clients/me/integrations/agg/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.portalhq.io/api/v3/clients/me/integrations/agg/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.portalhq.io/api/v3/clients/me/integrations/agg/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.portalhq.io/api/v3/clients/me/integrations/agg/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 => [
"Authorization: Bearer <token>"
],
]);
$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.portalhq.io/api/v3/clients/me/integrations/agg/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.portalhq.io/api/v3/clients/me/integrations/agg/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/integrations/agg/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "events",
"data": [
{
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"image": "<string>",
"venue": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"description": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"gameStartTime": "<string>",
"slug": "<string>",
"subtitle": "<string>",
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"updatedAt": "<string>",
"venueMarkets": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"question": "<string>",
"venueMarketOutcomes": [
{
"id": "<string>",
"venueMarketId": "<string>",
"label": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"priceChange24h": 123,
"winner": true,
"payoutPerShare": 123,
"refundAtCost": true,
"matchedVenueMarketOutcomes": [
{
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>"
}
]
}
],
"deployerVenue": "<string>",
"marketId": "<string>",
"venueEventId": "<string>",
"shortTitle": "<string>",
"detailsDeferred": true,
"description": "<string>",
"rulesPrimary": "<string>",
"rulesSecondary": "<string>",
"conditionId": "<string>",
"volume": 123,
"volume24hr": 123,
"image": "<string>",
"status": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"resolutionDate": "<string>",
"negRisk": true,
"venues": [
"<string>"
],
"venueCount": 123,
"arbReturn": 123,
"aggKey": "<string>",
"sportsMarketType": "<string>",
"sectionRank": 123,
"period": "<string>",
"marketCategory": "<string>",
"marketGroup": "<string>",
"marketSubtype": "<string>",
"lineValue": 123,
"minOrderSize": 123,
"tickSize": 123,
"feeRate": 123,
"feeExponent": 123,
"feeBasis": "<string>",
"matchedVenueMarkets": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"question": "<string>",
"deployerVenue": "<string>",
"shortTitle": "<string>",
"detailsDeferred": true,
"description": "<string>",
"rulesPrimary": "<string>",
"rulesSecondary": "<string>",
"volume": 123,
"volume24hr": 123,
"status": "<string>",
"conditionId": "<string>",
"arbReturn": 123,
"image": "<string>",
"venueEvent": {
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"image": "<string>",
"venue": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"sport": "<string>",
"structureType": "<string>",
"subtitle": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"updatedAt": "<string>",
"gameStartTime": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"arbReturn": 123,
"recurrence": "<string>",
"aggKey": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
},
"venueMarketOutcomes": [
{
"id": "<string>",
"venueMarketId": "<string>",
"label": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"priceChange24h": 123,
"winner": true,
"payoutPerShare": 123,
"refundAtCost": true,
"matchedVenueMarketOutcomes": [
{
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>"
}
]
}
]
}
],
"venueEvent": {
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"image": "<string>",
"venue": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"sport": "<string>",
"structureType": "<string>",
"subtitle": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"updatedAt": "<string>",
"gameStartTime": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"arbReturn": 123,
"recurrence": "<string>",
"aggKey": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
}
}
],
"arbReturn": 123,
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"recurrence": "<string>",
"aggKey": "<string>",
"structureType": "<string>",
"sport": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
}
],
"nextCursor": "<string>",
"hasMore": true,
"meta": {
"complete": true,
"degradedSignals": [
"<string>"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "yield-xyz-borrow returned a response for GET /v1/positions that does not match the expected schema",
"id": "INTEGRATION_RESPONSE_SCHEMA_DRIFT",
"details": {
"integration": "yield-xyz-borrow",
"endpoint": "GET /v1/positions",
"issues": [
{
"path": "supplyBalances.0.balanceUsd",
"message": "Expected string, received number",
"code": "invalid_type"
}
]
}
}{
"error": "<string>"
}Agg
Search events or markets
Full-text search. type decides whether data holds events or markets. No Agg session needed.
GET
/
clients
/
me
/
integrations
/
agg
/
search
Search events or markets
curl --request GET \
--url https://api.portalhq.io/api/v3/clients/me/integrations/agg/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.portalhq.io/api/v3/clients/me/integrations/agg/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.portalhq.io/api/v3/clients/me/integrations/agg/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.portalhq.io/api/v3/clients/me/integrations/agg/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 => [
"Authorization: Bearer <token>"
],
]);
$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.portalhq.io/api/v3/clients/me/integrations/agg/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.portalhq.io/api/v3/clients/me/integrations/agg/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/integrations/agg/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "events",
"data": [
{
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"image": "<string>",
"venue": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"description": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"gameStartTime": "<string>",
"slug": "<string>",
"subtitle": "<string>",
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"updatedAt": "<string>",
"venueMarkets": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"question": "<string>",
"venueMarketOutcomes": [
{
"id": "<string>",
"venueMarketId": "<string>",
"label": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"priceChange24h": 123,
"winner": true,
"payoutPerShare": 123,
"refundAtCost": true,
"matchedVenueMarketOutcomes": [
{
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>"
}
]
}
],
"deployerVenue": "<string>",
"marketId": "<string>",
"venueEventId": "<string>",
"shortTitle": "<string>",
"detailsDeferred": true,
"description": "<string>",
"rulesPrimary": "<string>",
"rulesSecondary": "<string>",
"conditionId": "<string>",
"volume": 123,
"volume24hr": 123,
"image": "<string>",
"status": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"resolutionDate": "<string>",
"negRisk": true,
"venues": [
"<string>"
],
"venueCount": 123,
"arbReturn": 123,
"aggKey": "<string>",
"sportsMarketType": "<string>",
"sectionRank": 123,
"period": "<string>",
"marketCategory": "<string>",
"marketGroup": "<string>",
"marketSubtype": "<string>",
"lineValue": 123,
"minOrderSize": 123,
"tickSize": 123,
"feeRate": 123,
"feeExponent": 123,
"feeBasis": "<string>",
"matchedVenueMarkets": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"question": "<string>",
"deployerVenue": "<string>",
"shortTitle": "<string>",
"detailsDeferred": true,
"description": "<string>",
"rulesPrimary": "<string>",
"rulesSecondary": "<string>",
"volume": 123,
"volume24hr": 123,
"status": "<string>",
"conditionId": "<string>",
"arbReturn": 123,
"image": "<string>",
"venueEvent": {
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"image": "<string>",
"venue": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"sport": "<string>",
"structureType": "<string>",
"subtitle": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"updatedAt": "<string>",
"gameStartTime": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"arbReturn": 123,
"recurrence": "<string>",
"aggKey": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
},
"venueMarketOutcomes": [
{
"id": "<string>",
"venueMarketId": "<string>",
"label": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"priceChange24h": 123,
"winner": true,
"payoutPerShare": 123,
"refundAtCost": true,
"matchedVenueMarketOutcomes": [
{
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>"
}
]
}
]
}
],
"venueEvent": {
"id": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"image": "<string>",
"venue": "<string>",
"deployerVenue": "<string>",
"volume": 123,
"status": "<string>",
"sport": "<string>",
"structureType": "<string>",
"subtitle": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"creationDate": "<string>",
"updatedAt": "<string>",
"gameStartTime": "<string>",
"categories": [
{
"id": "<string>",
"category": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"parentId": "<string>",
"eventCount": 123,
"volume24hr": 123,
"volume": 123
}
}
],
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"venues": [
"<string>"
],
"marketCount": 123,
"venueCount": 123,
"groupMarketCount": 123,
"groupParentId": "<string>",
"arbReturn": 123,
"recurrence": "<string>",
"aggKey": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
}
}
],
"arbReturn": 123,
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
},
"recurrence": "<string>",
"aggKey": "<string>",
"structureType": "<string>",
"sport": "<string>",
"settlementDiff": {
"sharedSummary": "<string>",
"differences": [
{
"type": "<string>",
"title": "<string>",
"perVenue": {},
"summary": "<string>"
}
]
},
"settlementDiffStatus": "<string>",
"matchedVenueEvents": [
{
"id": "<string>",
"venue": "<string>",
"externalIdentifier": "<string>",
"title": "<string>",
"slug": "<string>",
"status": "<string>",
"series": {
"externalIdentifier": "<string>",
"id": "<string>",
"name": "<string>",
"venue": "<string>",
"recurrence": "<string>"
}
}
]
}
],
"nextCursor": "<string>",
"hasMore": true,
"meta": {
"complete": true,
"degradedSignals": [
"<string>"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "yield-xyz-borrow returned a response for GET /v1/positions that does not match the expected schema",
"id": "INTEGRATION_RESPONSE_SCHEMA_DRIFT",
"details": {
"integration": "yield-xyz-borrow",
"endpoint": "GET /v1/positions",
"issues": [
{
"path": "supplyBalances.0.balanceUsd",
"message": "Expected string, received number",
"code": "invalid_type"
}
]
}
}{
"error": "<string>"
}Authorizations
Client API Key or Client Session Token (CST). Pass as a Bearer token in the Authorization header.
Query Parameters
Search text.
What to search.
Available options:
events, markets Market status, e.g. open.
Page size, 1 to 100.
nextCursor from the previous page.
Response
Success
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?