mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-29 09:07:59 +03:00
New PriceFeed url
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user