types

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	ID        string    `json:"id"`
	Type      OrderType `json:"type"`
	Amount    int64     `json:"amount"` // Amount in base units (e.g., satoshis)
	Price     int64     `json:"price"`  // Price in base units
	Side      string    `json:"side"`   // "buy" or "sell"
	Timestamp time.Time `json:"timestamp"`
	// Additional fields for order routing
	MaxSlippage int64  `json:"max_slippage"` // Maximum allowed slippage in basis points
	RouteHint   string `json:"route_hint"`   // Optional hint for preferred route
}

Order represents a trading order

type OrderType

type OrderType int

OrderType represents the type of order (market or limit)

const (
	// MarketOrder is an order that executes immediately at the best available price
	MarketOrder OrderType = iota
	// LimitOrder is an order that executes at a specified price or better
	LimitOrder
)

Jump to

Keyboard shortcuts

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