Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions core/api-doc-config.generated.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions core/scripts/generate-python-exchanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ function generateClass(exchange) {
constructorParams.push('base_url: Optional[str] = None');
constructorParams.push('auto_start_server: Optional[bool] = None');
constructorParams.push('pmxt_api_key: Optional[str] = None');
constructorParams.push('wallet_address: Optional[str] = None');
constructorParams.push('signer: Optional[object] = None');
superArgs.push('wallet_address=wallet_address');
superArgs.push('signer=signer');
superArgs.push('base_url=base_url');
superArgs.push('auto_start_server=auto_start_server');
superArgs.push('pmxt_api_key=pmxt_api_key');
Expand Down
3 changes: 2 additions & 1 deletion core/src/BaseExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type {
MatchResult,
EventMatchResult,
PriceComparison,
CompareMarketPricesParams,
ArbitrageOpportunity,
MatchedMarketPair,
MatchedPricePair,
Expand Down Expand Up @@ -1624,7 +1625,7 @@ export abstract class PredictionMarketExchange {
* @param params - Match filter parameters (uses relation: 'identity' internally)
* @returns Array of price comparisons across venues
*/
async compareMarketPrices(params: FetchMatchesParams): Promise<PriceComparison[]> {
async compareMarketPrices(params: CompareMarketPricesParams): Promise<PriceComparison[]> {
throw new Error("Method compareMarketPrices not implemented.");
}

Expand Down
17 changes: 17 additions & 0 deletions core/src/router/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ export interface ArbitrageOpportunity {
// Param types
// ---------------------------------------------------------------------------


/**
* Parameters for comparing market prices across venues.
*/
export interface CompareMarketPricesParams {
/** The source market ID to compare against. */
marketId: string;
/** Optional list of target market IDs to compare with. If not provided, the router finds matches automatically. */
targetMarketIds?: string[];
/** Minimum price difference to return. */
minDifference?: number;
/** Maximum number of results to return. */
limit?: number;
}



export interface FetchMarketMatchesParams {
/** Keyword search across matched market titles. */
query?: string;
Expand Down
2 changes: 1 addition & 1 deletion core/src/server/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ paths:
type: array
maxItems: 1
items:
$ref: '#/components/schemas/FetchMarketMatchesParams'
type: object
minItems: 1
credentials:
$ref: '#/components/schemas/ExchangeCredentials'
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7043,7 +7043,7 @@
"type": "array",
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/FetchMarketMatchesParams"
"type": "object"
},
"minItems": 1
},
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1172,12 +1172,12 @@ Compare live prices for the same market across venues. Finds identity matches an
**Signature:**

```python
def compare_market_prices(params: FetchMatchesParams) -> List[PriceComparison]:
def compare_market_prices(params: CompareMarketPricesParams) -> List[PriceComparison]:
```

**Parameters:**

- `params` (FetchMatchesParams): Match filter parameters (uses relation: 'identity' internally)
- `params` (CompareMarketPricesParams): Match filter parameters (uses relation: 'identity' internally)

**Returns:** List[[PriceComparison](#pricecomparison)] - Array of price comparisons across venues

Expand Down
Loading
Loading