order

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

* Copyright 2021 The Cerebro Authors * * Licensed under the GNU General Public License v3.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * <https:fsf.org/> * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int
const (
	Buy Action = iota + 1
	Sell
	Cancel
	Edit
)

type Order

type Order interface {
	ID() string
	Item() item.Item
	Type() OrderType
	Reject()
	Expire()
	Cancel()
	Margin()
	Submit()
	Accept()
	Partial(size int64)
	Complete()
	Status() Status
	Exec() OrderType
	OrderPrice() float64
	Action() Action
	Price() int64
	Size() int64
	RemainPrice() float64
	Copy() Order
	SetID(id string)
}

func NewOrder

func NewOrder(item item.Item, action Action, execType OrderType, size int64, price int64) Order

type OrderType

type OrderType int
const (
	Market OrderType = iota + 1
	Close
	Limit
	Stop
	StopLimit
	StopTrail
	StopTrailLimit
	Historical
)

type Status

type Status int32
const (
	None Status = iota
	Created
	Submitted
	Accepted
	Partial
	Completed
	Canceled
	Expired
	Margin
	Rejected
)

Jump to

Keyboard shortcuts

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