Documentation Index
Fetch the complete documentation index at: https://docs.sx.bet/llms.txt
Use this file to discover all available pages before exploring further.
Subscribe to capital-efficiency refund events for a particular user. You receive updates when refunds are generated from reductions in maximum loss (MXL) for the user’s market groups.
For field definitions, see Get portfolio refunds. For a high-level overview, see Capital Efficiency.
CHANNEL NAME FORMAT
ce_refunds:{bettor}
| Name | Type | Description |
|---|
| bettor | string | The user address to subscribe to |
MESSAGE PAYLOAD FORMAT
The message payload matches a single element within the GET /trades/portfolio/refunds JSON results. See Get portfolio refunds for schema details.
// To subscribe
const bettor = "0xaD6A65315Cb20dD0b9D0Af56213516727a20C66F";
const sub = client.newSubscription(`ce_refunds:${bettor}`, { positioned: true, recoverable: true });
sub.on("publication", (ctx) => {
const data = ctx.data;
// message handler logic
});
sub.subscribe();
The above returns JSON structured like this:
[
{
"marketHash": "0x3e012cc2842849b96768547d4c92720d7ee8946e7706323f5114b6451708cf5e",
"baseToken": "0x1BC6326EA6aF2aB8E4b68c83418044B1923b2956",
"totalRefunded": 2.346033,
"events": [
{
"maker": false,
"amount": "2.346033",
"bettor": "0xaD6A65315Cb20dD0b9D0Af56213516727a20C66F",
"baseToken": "0x1BC6326EA6aF2aB8E4b68c83418044B1923b2956",
"createdAt": "2025-10-21T14:29:26.805266+00:00",
"marketHash": "0x3e012cc2842849b96768547d4c92720d7ee8946e7706323f5114b6451708cf5e",
"fillOrderHash": "0x7efa8ee211c5cbccebda722318252ee09cfadaa9c910bf4c433086d853784b02"
}
]
}
]