orders

package
v0.0.0-...-30c84b1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CHILDORDERPATH = "/v1/me/sendchildorder"
View Source
const PARENTORDERPATH = "/v1/me/sendparentorder"

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param struct {
	ProductCode   types.ProductCode   `json:"product_code"`
	ConditionType types.ConditionType `json:"condition_type"`
	Side          string              `json:"side"`
	Size          float64             `json:"size"`
	Price         float64             `json:"price"`
	TriggerPrice  float64             `json:"trigger_price,omitempty"`
}

type RequestForChildOrder

type RequestForChildOrder struct {
	ProductCode    types.ProductCode `json:"product_code"`
	ChildOrderType string            `json:"child_order_type"`
	Side           string            `json:"side"`
	Price          float64           `json:"price"`
	Size           float64           `json:"size"`
	TimeInForce    string            `json:"time_in_force"`
	MinuteToExpire int               `json:"minute_to_expire"`
}

func NewForChildOrder

func NewForChildOrder(
	code types.ProductCode,
	oType,
	tif string,
	side interface{},
	price,
	size float64,
	expire int) *RequestForChildOrder

NewForChildOrder side corresponds to int/string

func (*RequestForChildOrder) Method

func (p *RequestForChildOrder) Method() string

func (*RequestForChildOrder) Path

func (p *RequestForChildOrder) Path() string

func (*RequestForChildOrder) Payload

func (p *RequestForChildOrder) Payload() []byte

func (*RequestForChildOrder) Query

func (p *RequestForChildOrder) Query() string

type RequestForParentOrder

type RequestForParentOrder struct {
	TimeInForce    string  `json:"time_in_force"`
	OrderMethod    string  `json:"order_method"`
	MinuteToExpire int     `json:"minute_to_expire"`
	Parameters     []Param `json:"parameters"`
}

func NewForParentOrder

func NewForParentOrder(method types.OrderMethod, tif string, expire int, params []Param) *RequestForParentOrder

func (*RequestForParentOrder) Method

func (p *RequestForParentOrder) Method() string

func (*RequestForParentOrder) Path

func (p *RequestForParentOrder) Path() string

func (*RequestForParentOrder) Payload

func (p *RequestForParentOrder) Payload() []byte

func (*RequestForParentOrder) Query

func (p *RequestForParentOrder) Query() string

type ResponseForChildOrder

type ResponseForChildOrder struct {
	ChildOrderAcceptanceId string `json:"child_order_acceptance_id"`
}

type ResponseForParentOrder

type ResponseForParentOrder struct {
	ParentOrderAcceptanceId string `json:"parent_order_acceptance_id"`
}

Jump to

Keyboard shortcuts

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