List orders across your app
curl --request GET \
--url https://api.agg.market/apps/{appId}/orders \
--header 'x-app-api-key: <api-key>'import requests
url = "https://api.agg.market/apps/{appId}/orders"
headers = {"x-app-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-api-key': '<api-key>'}};
fetch('https://api.agg.market/apps/{appId}/orders', 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.agg.market/apps/{appId}/orders",
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-app-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.agg.market/apps/{appId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-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.agg.market/apps/{appId}/orders")
.header("x-app-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/apps/{appId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"quoteId": "<string>",
"externalId": "<string>",
"clientOrderId": "<string>",
"venue": "kalshi",
"status": "pending",
"side": "<string>",
"amountRaw": "<string>",
"limitPriceRaw": "<string>",
"timeInForce": "GTC",
"expiresAt": "2023-11-07T05:31:56Z",
"slippageBps": 123,
"quotedPriceRaw": "<string>",
"quotedCostRaw": "<string>",
"quotedSharesRaw": "<string>",
"quotedToWinRaw": "<string>",
"filledAmountRaw": "<string>",
"executionPrice": "<string>",
"actualSharesRaw": "<string>",
"actualToWinRaw": "<string>",
"partialFillReason": "<string>",
"txHash": "<string>",
"errorMessage": "<string>",
"dagRunId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"venueMarket": {
"id": "<string>",
"venueEventId": "<string>",
"question": "<string>",
"image": "<string>"
},
"venueMarketOutcome": {
"id": "<string>",
"label": "<string>",
"title": "<string>"
},
"userId": "<string>",
"orderType": "market",
"limitSizeRaw": "<string>",
"postOnly": true,
"reservedCostRaw": "<string>",
"filledSizeRaw": "<string>",
"filledCostRaw": "<string>",
"remainingSizeRaw": "<string>",
"averageFillPriceRaw": "<string>",
"venueOrderId": "<string>",
"tokenId": "<string>",
"cancelRequestedAt": "<string>",
"cancelledAt": "<string>",
"cancelReason": "<string>",
"fees": {
"venueFeeBasis": "fill",
"quoted": {
"venueFeeRaw": "<string>",
"appFeeRaw": "<string>",
"appFeeBips": 123,
"referralFeeRaw": "<string>"
},
"actual": {
"dagRunId": "<string>",
"venueFeeRaw": "<string>",
"appFee": {
"bips": 123,
"dueRaw": "<string>",
"collectedRaw": "<string>",
"status": "pending",
"finalizedAt": "2023-11-07T05:31:56Z"
},
"bridge": {
"relayFeeUsd": "<string>",
"originGasCostUsd": "<string>",
"operationCount": 123,
"pricedOperationCount": 123
},
"referral": {
"referrer": "<string>",
"payer": "user",
"feeBips": 123,
"dueRaw": "<string>",
"paidRaw": "<string>",
"status": "pending"
}
}
},
"signerAddress": "<string>"
}
],
"nextCursor": "<string>",
"hasMore": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Partner Admin
List orders across your app
Every order placed by any user of your app, as a changes feed: ordered by last update, oldest first. Page until hasMore is false, then store nextCursor and pass it as cursor on your next run to receive only orders created or changed since. nextCursor is returned on every response, including an empty one. An order is returned again each time it changes (for example pending → filled), so upsert by id. Orders changed in the last 2 minutes appear on a later run. Filter with status, a comma-separated list such as filled,partial_fill. Authenticate with an x-app-api-key of either scope: a read key can read every user’s orders in your app, so treat it as a credential over your users’ full trading history.
GET
/
apps
/
{appId}
/
orders
List orders across your app
curl --request GET \
--url https://api.agg.market/apps/{appId}/orders \
--header 'x-app-api-key: <api-key>'import requests
url = "https://api.agg.market/apps/{appId}/orders"
headers = {"x-app-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-api-key': '<api-key>'}};
fetch('https://api.agg.market/apps/{appId}/orders', 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.agg.market/apps/{appId}/orders",
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-app-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.agg.market/apps/{appId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-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.agg.market/apps/{appId}/orders")
.header("x-app-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/apps/{appId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"quoteId": "<string>",
"externalId": "<string>",
"clientOrderId": "<string>",
"venue": "kalshi",
"status": "pending",
"side": "<string>",
"amountRaw": "<string>",
"limitPriceRaw": "<string>",
"timeInForce": "GTC",
"expiresAt": "2023-11-07T05:31:56Z",
"slippageBps": 123,
"quotedPriceRaw": "<string>",
"quotedCostRaw": "<string>",
"quotedSharesRaw": "<string>",
"quotedToWinRaw": "<string>",
"filledAmountRaw": "<string>",
"executionPrice": "<string>",
"actualSharesRaw": "<string>",
"actualToWinRaw": "<string>",
"partialFillReason": "<string>",
"txHash": "<string>",
"errorMessage": "<string>",
"dagRunId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"venueMarket": {
"id": "<string>",
"venueEventId": "<string>",
"question": "<string>",
"image": "<string>"
},
"venueMarketOutcome": {
"id": "<string>",
"label": "<string>",
"title": "<string>"
},
"userId": "<string>",
"orderType": "market",
"limitSizeRaw": "<string>",
"postOnly": true,
"reservedCostRaw": "<string>",
"filledSizeRaw": "<string>",
"filledCostRaw": "<string>",
"remainingSizeRaw": "<string>",
"averageFillPriceRaw": "<string>",
"venueOrderId": "<string>",
"tokenId": "<string>",
"cancelRequestedAt": "<string>",
"cancelledAt": "<string>",
"cancelReason": "<string>",
"fees": {
"venueFeeBasis": "fill",
"quoted": {
"venueFeeRaw": "<string>",
"appFeeRaw": "<string>",
"appFeeBips": 123,
"referralFeeRaw": "<string>"
},
"actual": {
"dagRunId": "<string>",
"venueFeeRaw": "<string>",
"appFee": {
"bips": 123,
"dueRaw": "<string>",
"collectedRaw": "<string>",
"status": "pending",
"finalizedAt": "2023-11-07T05:31:56Z"
},
"bridge": {
"relayFeeUsd": "<string>",
"originGasCostUsd": "<string>",
"operationCount": 123,
"pricedOperationCount": 123
},
"referral": {
"referrer": "<string>",
"payer": "user",
"feeBips": 123,
"dueRaw": "<string>",
"paidRaw": "<string>",
"status": "pending"
}
}
},
"signerAddress": "<string>"
}
],
"nextCursor": "<string>",
"hasMore": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Integration guide
- Before you call: Create a server API key.
- Workflow: Read app-wide users, activity, and analytics.
- Next: Configure webhook delivery, rotation, and replay.