New PriceFeed url

This commit is contained in:
Aleksandr Kraiz
2022-05-30 19:09:31 +04:00
parent b17bc611cf
commit 350e8d97e0
3 changed files with 4 additions and 5 deletions

View File

@@ -135,8 +135,7 @@ export default class OrionUnit {
);
this.priceFeed = new PriceFeed(
options?.services?.priceFeed?.api
?? options?.api
?? customApi,
?? `${options?.api ?? customApi}/price-feed`,
);
this.orionAnalytics = new OrionAnalytics(orionAnalyticsUrl);
this.exchange = new Exchange(this);

View File

@@ -37,11 +37,11 @@ class PriceFeed {
get wsUrl() {
const url = new URL(this.apiUrl);
const wsProtocol = url.protocol === 'https:' ? 'wss' : 'ws';
return `${wsProtocol}://${url.host + url.pathname}/ws2`;
return `${wsProtocol}://${url.host + url.pathname}/api/v1`;
}
get candlesUrl() {
return `${this.apiUrl}/candles/candles`;
return `${this.apiUrl}/api/v1/candles`;
}
}