handler

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminAuthHandler

func AdminAuthHandler(c *gin.Context)

func AdminFirmHandler

func AdminFirmHandler(c *gin.Context)

func AdminFuturesHandler

func AdminFuturesHandler(c *gin.Context)

func AdminOrderHandler

func AdminOrderHandler(c *gin.Context)

func AdminTradeHandler

func AdminTradeHandler(c *gin.Context)

func AuthHandler

func AuthHandler(c *gin.Context)

func ErrorHandler

func ErrorHandler(c *gin.Context, code int, message string)

func OrderHandler

func OrderHandler(c *gin.Context)

func StatusHandler

func StatusHandler(c *gin.Context)

func TradeHandler

func TradeHandler(c *gin.Context)

func ValidationHandler

func ValidationHandler(c *gin.Context)

Types

type Children

type Children struct {
	Value string `json:"value"`
	Label string `json:"label"`
}

type Error

type Error struct {
	Status  int    `json:"status"`
	Title   string `json:"title"`
	Message string `json:"message"`
}

type FuturesResponse

type FuturesResponse struct {
	Value    string     `json:"value"`
	Label    string     `json:"label"`
	Children []Children `json:"children"`
}

type OrderResponse

type OrderResponse struct {
	OrderID      uuid.UUID `json:"order_id" gorm:"primary_key"`
	OrderType    string    `json:"order_type"`
	Side         string    `json:"side"`
	FuturesID    string    `json:"futures_id"`
	Firm         string    `json:"firm"`
	TraderName   string    `json:"trader_name"`
	Quantity     string    `json:"quantity"`
	OpenQuantity string    `json:"open_quantity"`
	Price        string    `json:"price"`
	StopPrice    string    `json:"stop_price"`
	Status       string    `json:"status"`
	CreatedAt    string    `json:"created_at"`
	UpdatedAt    string    `json:"updated_at"`
}

type TradeResponse

type TradeResponse struct {
	TradeID    uuid.UUID       `json:"trade_id"`
	Quantity   decimal.Decimal `json:"quantity"`
	Price      decimal.Decimal `json:"price"`
	FuturesID  string          `json:"futures_id"`
	Initiator  Trader          `json:"initiator"`
	Completion Trader          `json:"completion"`
	CreatedAt  string          `json:"trade_time"`
}

type Trader

type Trader struct {
	Firm   string `json:"firm"`
	Side   string `json:"side"`
	Trader string `json:"trader"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL