renamed newtickdata to newtickmessage. added firstconnectmessage.
This commit is contained in:
parent
dc382cd2cd
commit
74152a9fb9
@ -6,11 +6,6 @@ import io from "socket.io-client";
|
|||||||
|
|
||||||
export const socket = io();
|
export const socket = io();
|
||||||
|
|
||||||
export type NewTickData = {
|
|
||||||
tick: number,
|
|
||||||
price: number,
|
|
||||||
positions: Array<PositionState>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PositionState = {
|
export type PositionState = {
|
||||||
id: number,
|
id: number,
|
||||||
@ -22,10 +17,21 @@ export type PositionState = {
|
|||||||
profit_loss_percentage: number
|
profit_loss_percentage: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type FirstConnectMessage = {
|
||||||
|
ticks: Array<number>,
|
||||||
|
prices: Array<number>,
|
||||||
|
positions: Array<PositionState>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NewTickMessage = {
|
||||||
|
tick: number,
|
||||||
|
price: number,
|
||||||
|
positions: Array<PositionState>
|
||||||
|
}
|
||||||
|
|
||||||
export type PositionCloseMessage = {
|
export type PositionCloseMessage = {
|
||||||
message_name: string,
|
message_name: string,
|
||||||
position_id: number,
|
position_id: number,
|
||||||
symbol: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.on("connect", function () {
|
socket.on("connect", function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user