Documentation
¶
Index ¶
Constants ¶
View Source
const ( TopicOrder = "order" TopicAccount = "account" TopicFill = "fill" TopicBill = "bill" )
View Source
const ( BillTypeTrade BillType = "TRADE" DoneReasonFilled DoneReason = "FILLED" DoneReasonCancelled DoneReason = "CANCELLED" TransactionStatusPending TransactionStatus = "PENDING" TransactionStatusCompleted TransactionStatus = "COMPLETED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoneReason ¶
type DoneReason string
type Fill ¶
type Fill struct { gorm.Model TradeId int64 `json:"trade_id"` Trade Trade `gorm:"foreignKey:TradeId"` OrderId int64 `json:"order_id"` Order Order `gorm:"foreignKey:OrderId"` ProductId int64 `json:"product_id"` Product Product `gorm:"foreignKey:ProductId"` Size decimal.Decimal `json:"fill_size"` Price decimal.Decimal `json:"price"` Funds decimal.Decimal `json:"funds"` Fee decimal.Decimal `json:"fees"` Liquidity string `json:"liquidity"` Settled bool `json:"settled"` Side Side `json:"side"` Done bool `json:"done"` DoneReason DoneReason `json:"done_reason"` LogOffset int64 LogSeq int64 MessageSeq int64 `gorm:"index:o_m unique"` }
type Order ¶
type Order struct { gorm.Model ProductId int `json:"product_id"` Product Product `gorm:"foreignKey:ProductId"` UserId int `json:"user_id"` User User `gorm:"foreignKey:UserId"` ClientUuid string Size decimal.Decimal `json:"order_size"` Funds decimal.Decimal `json:"funds"` FilledSize decimal.Decimal `json:"filled_size"` ExecutedValue decimal.Decimal `json:"executed_value"` Price decimal.Decimal `json:"price"` FillFees decimal.Decimal `json:"fill_fees"` Type OrderType `json:"order_type"` Side Side `json:"side"` TimeInForce string `json:"time_in_force"` Status OrderStatus `json:"status"` Settled bool `json:"settled"` }
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusNew OrderStatus = "NEW" OrderStatusCancelled OrderStatus = "CANCELLED" OrderStatusOpen OrderStatus = "OPEN" OrderStatusCancelling OrderStatus = "CANCELLING" OrderStatusFilled OrderStatus = "FILLED" )
func NewOrderStatusFromString ¶
func NewOrderStatusFromString(s string) (*OrderStatus, error)
type Tick ¶
type Tick struct { gorm.Model ProductId int64 `json:"product_id"` Product Product `gorm:"foreignKey:ProductId"` Granularity int64 `json:"granularity"` Time int64 `json:"time"` Open decimal.Decimal `json:"open_price"` High decimal.Decimal `json:"high_price"` Low decimal.Decimal `json:"low_price"` Close decimal.Decimal `json:"close_price"` Volume decimal.Decimal `json:"volume"` LogOffset int64 LogSeq int64 }
type Trade ¶
type Trade struct { gorm.Model TradeId int64 `json:"trade_id"` OrderId int64 `json:"order_id"` Order Order `gorm:"foreignKey:OrderId"` MessageSeq int64 ProductId int64 `json:"product_id"` Product Product `gorm:"foreignKey:ProductId"` TakerOrderId int64 `json:"taker_order_id"` TakerOrderFk Order `gorm:"foreignKey:TakerOrderId"` MakerOrderId int64 `json:"maker_order_id"` MakerOrderFk Order `gorm:"foreignKey:MakerOrderId"` Price decimal.Decimal `json:"price"` Size decimal.Decimal `json:"size"` Side Side `json:"side"` Time time.Time LogOffset int64 LogSeq int64 }
type Transaction ¶
type TransactionStatus ¶
type TransactionStatus string
Click to show internal directories.
Click to hide internal directories.