added market param to pairsConfig request

This commit is contained in:
Demid
2022-12-22 17:52:01 +03:00
parent c252e11d60
commit 3961138476

View File

@@ -83,12 +83,17 @@ class OrionAggregator {
);
};
getPairConfigs = () => fetchWithValidation(
`${this.apiUrl}/api/v1/pairs/exchangeInfo`,
exchangeInfoSchema,
undefined,
errorSchema,
);
getPairConfigs = (market: 'spot' | 'futures') => {
const url = new URL(`${this.apiUrl}/api/v1/pairs/exchangeInfo`);
url.searchParams.append('market', toUpperCase(market));
return fetchWithValidation(
url.toString(),
exchangeInfoSchema,
undefined,
errorSchema,
);
}
getPairConfig = (assetPair: string) => fetchWithValidation(
`${this.apiUrl}/api/v1/pairs/exchangeInfo/${assetPair}`,