request

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateResolution

func ValidateResolution(value string) (string, error)

ValidateResolution checks if the given value is a valid resolution and returns the corresponding resolution value. If the value is not valid, it returns an error.

Types

type CancelOrder

type CancelOrder struct {
	Symbol string `json:"sym"`
	ID     string `json:"id"`
	Side   string `json:"sd" oneof:"buy sell"`
	Hash   string `json:"hash"`
}

func (*CancelOrder) Validate

func (p *CancelOrder) Validate() error

type PlaceAsk

type PlaceAsk struct {
	Symbol   string  `json:"sym"`
	Type     string  `json:"typ" validate:"oneof=limit market"`
	ClientID string  `json:"client_id"`
	Amount   float64 `json:"amt"`
	Rate     float64 `json:"rat"`
}

func (*PlaceAsk) Validate

func (p *PlaceAsk) Validate() error

type PlaceBid

type PlaceBid struct {
	Symbol   string  `json:"sym"`
	Type     string  `json:"typ" validate:"oneof=limit market"`
	ClientID string  `json:"client_id"`
	Amount   float64 `json:"amt"`
	Rate     float64 `json:"rat"`
}

func (*PlaceBid) Validate

func (p *PlaceBid) Validate() error

validate type of bid

Jump to

Keyboard shortcuts

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