mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-11 05:28:06 +03:00
Adde getPrices to aggregator
This commit is contained in:
@@ -285,6 +285,18 @@ class Aggregator {
|
||||
);
|
||||
};
|
||||
|
||||
getPrices = (assetPair: string, includePools: boolean) => {
|
||||
const url = new URL(`${this.apiUrl}/api/v1/prices/`);
|
||||
url.searchParams.append('assetPair', assetPair);
|
||||
url.searchParams.append('includePools', includePools.toString());
|
||||
return fetchWithValidation(
|
||||
url.toString(),
|
||||
z.number(),
|
||||
{ headers: this.basicAuthHeaders },
|
||||
errorSchema,
|
||||
);
|
||||
};
|
||||
|
||||
getLockedBalance = (address: string, currency: string) => {
|
||||
const url = new URL(`${this.apiUrl}/api/v1/address/balance/reserved/${currency}`);
|
||||
url.searchParams.append('address', address);
|
||||
|
||||
Reference in New Issue
Block a user