mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
added market param to pairsConfig request
This commit is contained in:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user