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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllOrderSide = []OrderSide{
	OrderSideBid,
	OrderSideAsk,
}

Functions

This section is empty.

Types

type CancelOrderInput

type CancelOrderInput struct {
	ClientMutationID *string `json:"clientMutationId"`
	ID               int     `json:"id"`
}

type CurrencyInput

type CurrencyInput struct {
	Code         string `json:"code"`
	Name         string `json:"name"`
	MaxPrecision int    `json:"maxPrecision"`
	Digital      bool   `json:"digital"`
}

type ExchangeInput

type ExchangeInput struct {
	ID string `json:"id"`
}

type OrderDetailsInput

type OrderDetailsInput struct {
	BaseCurrency    *CurrencyInput `json:"baseCurrency"`
	CounterCurrency *CurrencyInput `json:"counterCurrency"`
	Type            OrderType      `json:"type"`
	Side            OrderSide      `json:"side"`
	Quantity        *QuantityInput `json:"quantity"`
	Price           *QuantityInput `json:"price"`
}

type OrderPayload

type OrderPayload struct {
	ClientMutationID *string         `json:"clientMutationId"`
	Order            *entities.Order `json:"order"`
}

type OrderSide

type OrderSide string
const (
	OrderSideBid OrderSide = "BID"
	OrderSideAsk OrderSide = "ASK"
)

func (OrderSide) IsValid

func (e OrderSide) IsValid() bool

func (OrderSide) MarshalGQL

func (e OrderSide) MarshalGQL(w io.Writer)

func (OrderSide) String

func (e OrderSide) String() string

func (*OrderSide) UnmarshalGQL

func (e *OrderSide) UnmarshalGQL(v interface{}) error

type OrderType

type OrderType string
const (
	OrderTypeInstant      OrderType = "INSTANT"
	OrderTypeMarket       OrderType = "MARKET"
	OrderTypeLimit        OrderType = "LIMIT"
	OrderTypeStop         OrderType = "STOP"
	OrderTypeTrailingStop OrderType = "TRAILING_STOP"
)

func (OrderType) IsValid

func (e OrderType) IsValid() bool

func (OrderType) MarshalGQL

func (e OrderType) MarshalGQL(w io.Writer)

func (OrderType) String

func (e OrderType) String() string

func (*OrderType) UnmarshalGQL

func (e *OrderType) UnmarshalGQL(v interface{}) error

type OutboxStatus

type OutboxStatus string
const (
	OutboxStatusPending   OutboxStatus = "PENDING"
	OutboxStatusSucceeded OutboxStatus = "SUCCEEDED"
	OutboxStatusFailed    OutboxStatus = "FAILED"
)

func (OutboxStatus) IsValid

func (e OutboxStatus) IsValid() bool

func (OutboxStatus) MarshalGQL

func (e OutboxStatus) MarshalGQL(w io.Writer)

func (OutboxStatus) String

func (e OutboxStatus) String() string

func (*OutboxStatus) UnmarshalGQL

func (e *OutboxStatus) UnmarshalGQL(v interface{}) error

type QuantityInput

type QuantityInput struct {
	Amount int `json:"amount"`
	Scale  int `json:"scale"`
}

type SubmitOrderInput

type SubmitOrderInput struct {
	ClientMutationID   *string            `json:"clientMutationId"`
	OrderDetails       *OrderDetailsInput `json:"orderDetails"`
	PreferredExchanges []*ExchangeInput   `json:"preferredExchanges"`
}

Jump to

Keyboard shortcuts

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