models

package
v0.0.0-...-fe50809 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency struct {
	Name         string
	Code         string
	MaxPrecision int32
	Digital      bool
}

type Exchange

type Exchange struct {
	Id string
}

type ID

type ID uuid.UUID

type Order

type Order struct {
	Id                 int
	OrderDetails       OrderDetails
	User               User
	PreferredExchanges []Exchange
}

type OrderBook

type OrderBook struct {
	BaseCurrency    Currency
	CounterCurrency Currency
	Time            time.Time
	Bids            []OrderBookEntry
	Asks            []OrderBookEntry
}

type OrderBookEntry

type OrderBookEntry struct {
	Quantity Quantity
	Price    Quantity
}

type OrderDetails

type OrderDetails struct {
	BaseCurrency    Currency
	CounterCurrency Currency
	Type            orderv1.OrderType
	Side            orderv1.OrderSide
	Quantity        Quantity
	Price           Quantity
}

type Quantity

type Quantity struct {
	Amount int64
	Scale  int32
}

type User

type User struct {
	Id      ID
	Created *time.Time
	Updated *time.Time
	Type    *UserType
}

type UserType

type UserType string
const (
	UserTypeRetail      UserType = "RETAIL"
	UserTypeInstitution UserType = "INSTITUTION"
)

Jump to

Keyboard shortcuts

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