mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 19:35:11 +03:00
Added getAvailableExchanges
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user