-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97adab2
commit 72af21a
Showing
6 changed files
with
176 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package stream | ||
|
||
type Response struct { | ||
Command string `json:"command"` | ||
} | ||
|
||
type KeepAliveResponse struct { | ||
Command string `json:"command"` | ||
Data KeepAliveData `json:"data"` | ||
} | ||
|
||
type KeepAliveData struct { | ||
Timestamp int `json:"timestamp"` | ||
} | ||
|
||
type ResponseCandle struct { | ||
Command string `json:"response"` | ||
Data Candle `json:"data"` | ||
} | ||
|
||
// TODO: Move it to a common package (stream and socket use it) | ||
type Candle struct { | ||
Close float64 `json:"close"` | ||
Ctm int64 `json:"ctm"` | ||
CtmString string `json:"ctmString"` | ||
High float64 `json:"high"` | ||
Low float64 `json:"low"` | ||
Open float64 `json:"open"` | ||
QuoteId int `json:"quoteId"` | ||
Symbol string `json:"symbol"` | ||
Vol float64 `json:"vol"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package xapi | ||
|
||
type Candle struct { | ||
Close float64 `json:"close"` | ||
Ctm int64 `json:"ctm"` | ||
CtmString string `json:"ctmString"` | ||
High float64 `json:"high"` | ||
Low float64 `json:"low"` | ||
Open float64 `json:"open"` | ||
QuoteId int `json:"quoteId"` | ||
Symbol string `json:"symbol"` | ||
Vol float64 `json:"vol"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters