Location
sdks/typescript/pmxt/router.ts:296
Code
const url = `${this.config.basePath}/api/${this.exchangeName}/compareMarketPrices`;
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json', ...this.getAuthHeaders() },
body: JSON.stringify({ args: [query], credentials: this.getCredentials() }),
});
Risk
compareMarketPrices is a cross-venue router call that may fan out to multiple venue APIs on the server side. With no timeout on the client fetch, if the server is slow or the underlying venue calls hang, the SDK caller is blocked indefinitely.
Affected Methods
Router.compareMarketPrices() — and any other router methods using the same fetch pattern
Suggested Fix
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json', ...this.getAuthHeaders() },
body: JSON.stringify({ args: [query], credentials: this.getCredentials() }),
signal: AbortSignal.timeout(30_000),
});
Found by automated missing timeout audit
Location
sdks/typescript/pmxt/router.ts:296Code
Risk
compareMarketPricesis a cross-venue router call that may fan out to multiple venue APIs on the server side. With no timeout on the client fetch, if the server is slow or the underlying venue calls hang, the SDK caller is blocked indefinitely.Affected Methods
Router.compareMarketPrices()— and any other router methods using the samefetchpatternSuggested Fix
Found by automated missing timeout audit