45 lines
1.2 KiB
Go
45 lines
1.2 KiB
Go
package rest
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type HTTPError struct {
|
|
Error string
|
|
}
|
|
|
|
type Msg struct {
|
|
Text string
|
|
}
|
|
|
|
type Credentials struct {
|
|
Email string `json:"email" binding:"required" example:"user1"`
|
|
Password string `json:"password" binding:"required" example:"password1"`
|
|
}
|
|
|
|
type Session struct {
|
|
Email string
|
|
}
|
|
|
|
// ExecutionReportResponse is the REST representation of a FIX ExecutionReport.
|
|
type ExecutionReportResponse struct {
|
|
OrderID string `json:"orderID"`
|
|
ClOrdID string `json:"clOrdID"`
|
|
ExecID string `json:"execID"`
|
|
ExecType string `json:"execType"`
|
|
OrdStatus string `json:"ordStatus"`
|
|
Symbol string `json:"symbol"`
|
|
Side string `json:"side"`
|
|
OrderQty decimal.Decimal `json:"orderQty"`
|
|
Price decimal.Decimal `json:"price"`
|
|
LastPx decimal.Decimal `json:"lastPx"`
|
|
LastQty decimal.Decimal `json:"lastQty"`
|
|
CumQty decimal.Decimal `json:"cumQty"`
|
|
LeavesQty decimal.Decimal `json:"leavesQty"`
|
|
AvgPx decimal.Decimal `json:"avgPx"`
|
|
TransactTime time.Time `json:"transactTime"`
|
|
Account string `json:"account,omitempty"`
|
|
}
|