ProphetX Parlay Price Quoting/Confirmation Integration
Guidelines for integrating with ProphetX APIs for parlay price quoting and confirmation.
This page provides general guidelines on how to integrate with ProphetX APIs to provide price quotes for Parlays.
Here's a high-level overview of how the parlay RFQ process works:
- Web/Mobile users send parlay quote requests for a list of unique outcomes to the ProphetX backend.
- ProphetX broadcasts these requests to all integrated Service Providers (SPs) for a price quote through WebSocket, and quotes are pushed to ProphetX through a callback RESTful API.
- Once the user agrees to the price, ProphetX confirms prices with SPs that can satisfy the order through a private WebSocket. SPs are expected to send confirmation to ProphetX through a callback RESTful API.
- After ProphetX receives the confirmation, an
order.finalizedmessage is pushed through a private channel to confirm the execution of the parlay.
API Documentation
Suggested integration steps:
Example Python code is available at: Python Parlay API Integration Guide
Example Golang code is available at: Golang Parlay Integration Guide
Step 1: Follow the first three steps in this document (ProphetX Service API Integration) to get the MM API token/secret and ingest sport events and markets. For Parlay API integration, the same MM API token/secret is used.
Major Steps:
- Exchange a session key by using Access Key and Secret Key
- (Optional) Get your current wallet balance
- Seeding events based on tournaments you want to play
Step 2: Connect to our Parlay-specific WebSocket. See the subscribe(self) in the Python example and ListenForMessages() in the Golang example. There are seven topics.
price.confirm.new, where only parlay confirmation is sent to individual parties to confirm acceptance when the user decides to accept the price. The example callback payload format is:
{
'parlay_id': price_quote_request['parlay_id'],
'offers': [
{
'valid_until': now_nanno,
'odds': 100000,
'max_risk': 200,
"estimated_price": [{'line_id': x['line_id'], 'odds': 200} for x in lines]
},
{
'valid_until': now_nanno,
'odds': 800,
'max_risk': 2000,
"estimated_price": [{'line_id': x['line_id'], 'odds': 200} for x in lines]
}
]
}price.confirm.new, where only parlay confirmation is sent to individual party to confirm the acceptance when user decided to accept the price. The example callback payload is of format
{
"action": "accept", //or reject
"confirmed_odds": ....,
"confirmed_stake": 100.0, // Optional. If null, no change to the stake
"price_probability": [
{
"max_risk": 200.0,
"lines": [
{
"line_id": "line_1",
"probability": 0.5
},
{
"line_id": "line_2",
"probability": 0.4
}
],
"correlation": ..., ?? (not determined yet)
},
{
"max_risk": 3000.0,
"lines": [
{
"line_id": "line_1",
"probability": 0.4
},
{
"line_id": "line_2",
"probability": 0.5
}
]
}
]
}order.matched, this message is broadcast to all SPs connecting to the parlay WebSocket. The message includes the last matched parlay odds and stake size from all SPs. Example message:
{"payload": {"market_lines": [...], "matched_at": 1759216871383341000, "matched_odds": 188, "matched_stake": 3.49,"parlay_id": "28250d66–30a4–406b-b90c-cd65c96d4c72", "timestamp": 1759216871383340000}order.finalized, once ProphetX receives the confirmation callback, this message will be pushed to SP to confirm that the parlay has been executed on the ProphetX side. Example payload of this message:
{"payload":{"confirmed_odds":-100000,"confirmed_stake":1349.049722844427,"odds":-100000,"order_uuid":"01977e64–756b-7a75-b218-f0a0e4032004","parlay_id":"23851166–3e18–4b3c-aea7–16de1b114bb8","status":"finalized","updated_at":1750172203426483200},"timestamp":1750172203428558300}order.settled, once one order of your parlay is settled, this message will be sent to the owner of the order.
{ "payload": { "order_uuid": "01991588–274d-70be-ac0a-cf876677d57f", "parlay_id": "fdd7e3fb-ef50–42eb-9d73–43d3d7f1390f", "settlement_status": "won", "settled_at": 1757002869231213000, "profit": 150 }, "timestamp": 1757002869231213000 }parlay.settled, once all orders inside a parlay are settled, this message will be sent to the owner of the parlay.
{ "payload": { "parlay_id": "fdd7e3fb-ef50–42eb-9d73–43d3d7f1390f", "settlement_status": "won", "settled_at": 1757002869231213000, "profit": 150 }, "timestamp": 1757002869231213000 }health_check, which works the same way as the MM API, and if your client does not receive this message for more than 30 seconds, please reconnect to the WebSocket.
Updated about 5 hours ago