update websocket
This commit is contained in:
parent
e779130d41
commit
2fba46d439
@ -174,7 +174,7 @@
|
|||||||
} else if (type === "Q") {
|
} else if (type === "Q") {
|
||||||
$wsBidPrice = typeof bp !== "undefined" ? bp : null;
|
$wsBidPrice = typeof bp !== "undefined" ? bp : null;
|
||||||
$wsAskPrice = typeof ap !== "undefined" ? ap : null;
|
$wsAskPrice = typeof ap !== "undefined" ? ap : null;
|
||||||
$realtimePrice = $wsAskPrice;
|
$realtimePrice = typeof lp !== "undefined" ? lp : $wsAskPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update price increase state
|
// Update price increase state
|
||||||
|
|||||||
@ -150,7 +150,7 @@
|
|||||||
if (newItem) {
|
if (newItem) {
|
||||||
// Calculate the new changePercentage
|
// Calculate the new changePercentage
|
||||||
const baseLine = item?.price / (1 + item?.changesPercentage / 100);
|
const baseLine = item?.price / (1 + item?.changesPercentage / 100);
|
||||||
const newPrice = newItem?.ap;
|
const newPrice = newItem?.lp;
|
||||||
const newChangePercentage = (newPrice / baseLine - 1) * 100;
|
const newChangePercentage = (newPrice / baseLine - 1) * 100;
|
||||||
|
|
||||||
// Update the item directly in the oldList
|
// Update the item directly in the oldList
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user