api

package
v0.0.0-...-fe11d6f Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHealth

func CheckHealth(c echo.Context) error

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context)

func Start

func Start(p *orderbook.TradingPlatform)

Types

type AccountActionParams

type AccountActionParams struct {
	Signer string  `json:"signer" form:"signer" query:"signer" validate:"required"`
	Amount float64 `json:"amount" form:"amount" query:"amount" validate:"required"`
}

type AccountBalanceParams

type AccountBalanceParams struct {
	Signer string `json:"signer" form:"signer" query:"signer" validate:"required"`
}

type AccountSendParams

type AccountSendParams struct {
	AccountActionParams
	Recipient string `json:"recipient" form:"recipient" query:"recipient" validate:"required"`
}

type Binder

type Binder struct{}

func (*Binder) Bind

func (cb *Binder) Bind(i interface{}, c echo.Context) (err error)

type CustomContext

type CustomContext struct {
	echo.Context
	// contains filtered or unexported fields
}

type HTTPError

type HTTPError interface {
	HTTPCode() int
}

type MarketParams

type MarketParams struct {
	Quote string `json:"quote" form:"quote" query:"quote" validate:"required"`
	Base  string `json:"base" form:"base" query:"base" validate:"required"`
}

type PlaceOrderRequestParams

type PlaceOrderRequestParams struct {
	MarketParams
	Side  orderbook.Side      `json:"side" form:"side" query:"side" validate:"required"`
	Type  orderbook.OrderType `json:"type" form:"type" query:"type" validate:"required"`
	Price float64             `json:"price" form:"price" query:"price" validate:"required"`
	Size  float64             `json:"size" form:"size" query:"size" validate:"required"`
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *Validator

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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