Added getAvailableExchanges

This commit is contained in:
Aleksandr Kraiz
2023-02-23 18:52:57 +04:00
parent f97e10b591
commit a5e464c9ad
2 changed files with 7 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import toUpperCase from '../../utils/toUpperCase';
import httpToWS from '../../utils/httpToWS';
import { ethers } from 'ethers';
import orderSchema from './schemas/orderSchema';
import { exchanges } from '../../constants';
class OrionAggregator {
private readonly apiUrl: string;
@@ -102,6 +103,11 @@ class OrionAggregator {
);
};
getAvailableExchanges = () => fetchWithValidation(
`${this.apiUrl}/api/v1/exchange/list`,
z.enum(exchanges).array(),
);
getExchangeOrderbook = (
pair: string,
exchange: Exchange,