Get market orderbook
curl --request GET \
--url https://api.unitedmarket.ai/markets/{id}/orderbookconst options = {method: 'GET'};
fetch('https://api.unitedmarket.ai/markets/{id}/orderbook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/markets/{id}/orderbook"
response = requests.get(url)
print(response.text){
"market": {},
"orderbooks": {
"yes": {
"buys": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
],
"sells": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
]
},
"no": {
"buys": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
],
"sells": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
]
}
},
"orderbooksByOutcome": {}
}Markets
Get market orderbook
Returns aggregated L2 price levels for a market as { market, orderbooks: { yes, no }, orderbooksByOutcome }. Each side is buys / sells of { price, size, numOrders } (plus display fields). This is not a signed-order dump and not the WebSocket { bids, asks } snapshot.
GET
https://api.unitedmarket.ai
/
markets
/
{id}
/
orderbook
Get market orderbook
curl --request GET \
--url https://api.unitedmarket.ai/markets/{id}/orderbookconst options = {method: 'GET'};
fetch('https://api.unitedmarket.ai/markets/{id}/orderbook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/markets/{id}/orderbook"
response = requests.get(url)
print(response.text){
"market": {},
"orderbooks": {
"yes": {
"buys": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
],
"sells": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
]
},
"no": {
"buys": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
],
"sells": [
{
"price": "<string>",
"size": "<string>",
"remainingMakerAmount": "<string>",
"numOrders": 123,
"orderHash": "<string>",
"maker": "<string>",
"signer": "<string>"
}
]
}
},
"orderbooksByOutcome": {}
}