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
6 changes: 3 additions & 3 deletions core/src/BaseExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,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?: FetchMatchesParams): Promise<PriceComparison[]> {
throw new Error("Method compareMarketPrices not implemented.");
}

Expand All @@ -1529,7 +1529,7 @@ export abstract class PredictionMarketExchange {
* @param params - Match filter parameters
* @returns Array of subset/superset matches with live prices
*/
async fetchRelatedMarkets(params: FetchMatchesParams): Promise<PriceComparison[]> {
async fetchRelatedMarkets(params?: FetchMatchesParams): Promise<PriceComparison[]> {
throw new Error("Method fetchRelatedMarkets not implemented.");
}

Expand Down Expand Up @@ -1558,7 +1558,7 @@ export abstract class PredictionMarketExchange {
* @param params - Match filter parameters
* @returns Array of subset/superset matches with live prices
*/
async fetchHedges(params: FetchMatchesParams): Promise<PriceComparison[]> {
async fetchHedges(params?: FetchMatchesParams): Promise<PriceComparison[]> {
throw new Error("Method fetchHedges not implemented.");
}

Expand Down
6 changes: 3 additions & 3 deletions core/src/router/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export class Router extends PredictionMarketExchange {
// Price comparison: identity matches with live prices
// -----------------------------------------------------------------------

async compareMarketPrices(params: FetchMarketMatchesParams): Promise<PriceComparison[]> {
async compareMarketPrices(params: FetchMarketMatchesParams = {}): Promise<PriceComparison[]> {
if (params.market && !params.marketId) {
params = { ...params, marketId: params.market.marketId };
}
Expand All @@ -281,7 +281,7 @@ export class Router extends PredictionMarketExchange {
// Related markets: subset/superset matches with live prices
// -----------------------------------------------------------------------

async fetchRelatedMarkets(params: FetchMarketMatchesParams): Promise<PriceComparison[]> {
async fetchRelatedMarkets(params: FetchMarketMatchesParams = {}): Promise<PriceComparison[]> {
if (params.market && !params.marketId) {
params = { ...params, marketId: params.market.marketId };
}
Expand All @@ -304,7 +304,7 @@ export class Router extends PredictionMarketExchange {
}

/** @deprecated Use {@link fetchRelatedMarkets} instead. */
async fetchHedges(params: FetchMarketMatchesParams): Promise<PriceComparison[]> {
async fetchHedges(params: FetchMarketMatchesParams = {}): Promise<PriceComparison[]> {
logger.warn('fetchHedges is deprecated, use fetchRelatedMarkets instead');
return this.fetchRelatedMarkets(params);
}
Expand Down
Loading