list

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

Documentation

Index

Constants

View Source
const BALANCESPATH = "/v1/me/getbalancehistory"
View Source
const CHILDORDERSPATH = "/v1/me/getchildorders"
View Source
const COLLATERALSPATH = "/v1/me/getcollateralhistory"
View Source
const EXECUTIONSPATH = "/v1/me/getexecutions"
View Source
const PARENTORDERSPATH = "/v1/me/getparentorders"
View Source
const POSITIONSSPATH = "/v1/me/getpositions"

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	OrderID      string             `json:"order_id"`
	ProductCode  string             `json:"product_code"`
	CurrencyCode string             `json:"currency_code"`
	TradeType    string             `json:"trade_type"`
	Price        float64            `json:"price"`
	Amount       float64            `json:"amount"`
	Quantity     float64            `json:"quantity"`
	Commission   float64            `json:"commission"`
	Balance      float64            `json:"balance"`
	TradeDate    types.ExchangeTime `json:"trade_date"`

	ID int `json:"id"`
}

type ChildOrder

type ChildOrder struct {
	ChildOrderID           string             `json:"child_order_id"`
	ProductCode            string             `json:"product_code"`
	Side                   string             `json:"side"`
	ChildOrderType         string             `json:"child_order_type"`
	ChildOrderState        string             `json:"child_order_state"`
	ChildOrderAcceptanceID string             `json:"child_order_acceptance_id"`
	ExecutedSize           float64            `json:"executed_size"`
	Price                  float64            `json:"price"`
	AveragePrice           float64            `json:"average_price"`
	Size                   float64            `json:"size"`
	OutstandingSize        float64            `json:"outstanding_size"`
	CancelSize             float64            `json:"cancel_size"`
	TotalCommission        float64            `json:"total_commission"`
	ExpireDate             types.ExchangeTime `json:"expire_date"`
	ChildOrderDate         types.ExchangeTime `json:"child_order_date"`

	ID int `json:"id"`
}

type Collateral

type Collateral struct {
	CurrencyCode string             `json:"currency_code"`
	ReasonCode   string             `json:"reason_code"`
	Change       float64            `json:"change"`
	Amount       float64            `json:"amount"`
	Date         types.ExchangeTime `json:"date"`

	ID int `json:"id"`
}

type Executions

type Executions struct {
	ChildOrderID           string             `json:"child_order_id"`
	ChildOrderAcceptanceID string             `json:"child_order_acceptance_id"`
	Side                   string             `json:"side"`
	Price                  float64            `json:"price"`
	Size                   float64            `json:"size"`
	Commission             float64            `json:"commission"`
	ExecDate               types.ExchangeTime `json:"exec_date"`

	ID int `json:"id"`
}

type ParentOrder

type ParentOrder struct {
	ParentOrderID           string             `json:"parent_order_id"`
	ProductCode             string             `json:"product_code"`
	Side                    string             `json:"side"`
	ParentOrderType         string             `json:"parent_order_type"`
	ParentOrderState        string             `json:"parent_order_state"`
	ParentOrderAcceptanceID string             `json:"parent_order_acceptance_id"`
	Price                   float64            `json:"price"`
	AveragePrice            float64            `json:"average_price"`
	Size                    float64            `json:"size"`
	OutstandingSize         float64            `json:"outstanding_size"`
	CancelSize              float64            `json:"cancel_size"`
	ExecutedSize            float64            `json:"executed_size"`
	TotalCommission         float64            `json:"total_commission"`
	ExpireDate              types.ExchangeTime `json:"expire_date"`
	ParentOrderDate         types.ExchangeTime `json:"parent_order_date"`

	ID int `json:"id"`
}

type Positions

type Positions struct {
	ProductCode         string  `json:"product_code"`
	Side                string  `json:"side"`
	Price               float64 `json:"price"`
	Size                float64 `json:"size"`
	Commission          float64 `json:"commission"`
	SwapPointAccumulate float64 `json:"swap_point_accumulate"`
	RequireCollateral   float64 `json:"require_collateral"`
	Leverage            float64 `json:"leverage"`
	Pnl                 float64 `json:"pnl"`
	Sfd                 float64 `json:"sfd"`

	OpenDate types.ExchangeTime `json:"open_date"`
}

type RequestForBalances

type RequestForBalances struct {
	CurrencyCode string           `json:"currency_code" url:"currency_code"`
	Pagination   types.Pagination `json:",inline"`
}

func NewForBalances

func NewForBalances(
	code string,
	count,
	after,
	before int) *RequestForBalances

func (*RequestForBalances) Method

func (p *RequestForBalances) Method() string

func (*RequestForBalances) Path

func (p *RequestForBalances) Path() string

func (*RequestForBalances) Payload

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

func (*RequestForBalances) Query

func (p *RequestForBalances) Query() string

type RequestForChildOrders

type RequestForChildOrders struct {
	ProductCode            types.ProductCode `json:"product_code" url:"product_code"`
	Pagination             types.Pagination  `json:",inline"`
	ChildOrderState        string            `json:"child_order_state,omitempty"`
	ChildOrderID           string            `json:"child_order_id,omitempty"`
	ChildOrderAcceptanceID string            `json:"child_order_acceptance_id,omitempty"`
	ParentOrderID          string            `json:"parent_order_id,omitempty"`
}

func NewForChildOrders

func NewForChildOrders(
	code types.ProductCode,
	state,
	oID,
	acceptanceID,
	parentID string,
	count,
	after,
	before int) *RequestForChildOrders

func (*RequestForChildOrders) Method

func (p *RequestForChildOrders) Method() string

func (*RequestForChildOrders) Path

func (p *RequestForChildOrders) Path() string

func (*RequestForChildOrders) Payload

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

func (*RequestForChildOrders) Query

func (p *RequestForChildOrders) Query() string

type RequestForCollaterals

type RequestForCollaterals struct {
	Pagination types.Pagination `json:",inline"`
}

func NewForCollaterals

func NewForCollaterals(count, after, before int) *RequestForCollaterals

func (*RequestForCollaterals) Method

func (p *RequestForCollaterals) Method() string

func (*RequestForCollaterals) Path

func (p *RequestForCollaterals) Path() string

func (*RequestForCollaterals) Payload

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

func (*RequestForCollaterals) Query

func (p *RequestForCollaterals) Query() string

type RequestForExecutions

type RequestForExecutions struct {
	ProductCode            types.ProductCode `json:"product_code" url:"product_code"`
	Pagination             types.Pagination  `json:",inline"`
	ChildOrderID           string            `json:"child_order_id,omitempty"`
	ChildOrderAcceptanceID string            `json:"child_order_acceptance_id,omitempty"`
}

func NewForExecutions

func NewForExecutions(
	code types.ProductCode,
	id, acceptanceID string,
	count,
	after,
	before int) *RequestForExecutions

func (*RequestForExecutions) Method

func (p *RequestForExecutions) Method() string

func (*RequestForExecutions) Path

func (p *RequestForExecutions) Path() string

func (*RequestForExecutions) Payload

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

func (*RequestForExecutions) Query

func (p *RequestForExecutions) Query() string

type RequestForParentOrders

type RequestForParentOrders struct {
	ProductCode      types.ProductCode `json:"product_code" url:"product_code"`
	Pagination       types.Pagination  `json:",inline"`
	ParentOrderState string            `json:"parent_order_state,omitempty"`
}

func NewForParentOrders

func NewForParentOrders(
	code types.ProductCode,
	state string,
	count,
	after,
	before int) *RequestForParentOrders

func (*RequestForParentOrders) Method

func (p *RequestForParentOrders) Method() string

func (*RequestForParentOrders) Path

func (p *RequestForParentOrders) Path() string

func (*RequestForParentOrders) Payload

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

func (*RequestForParentOrders) Query

func (p *RequestForParentOrders) Query() string

type RequestForPositions

type RequestForPositions struct {
	ProductCode types.ProductCode `json:"product_code" url:"product_code"`
}

func NewForPositions

func NewForPositions(code types.ProductCode) *RequestForPositions

func (*RequestForPositions) Method

func (p *RequestForPositions) Method() string

func (*RequestForPositions) Path

func (p *RequestForPositions) Path() string

func (*RequestForPositions) Payload

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

func (*RequestForPositions) Query

func (p *RequestForPositions) Query() string

type ResponseForBalances

type ResponseForBalances []Balance

type ResponseForChildOrders

type ResponseForChildOrders []ChildOrder

type ResponseForCollaterals

type ResponseForCollaterals []Collateral

type ResponseForExecutions

type ResponseForExecutions []Executions

type ResponseForParentOrders

type ResponseForParentOrders []ParentOrder

type ResponseForPositions

type ResponseForPositions []Positions

func (ResponseForPositions) Aggregate

func (positions ResponseForPositions) Aggregate() (avg, size, sfd, pnl float64)

type SFDFactors

type SFDFactors struct {
	// contains filtered or unexported fields
}

func (*SFDFactors) Culc

func (s *SFDFactors) Culc() (countF, sfdF float64)

func (*SFDFactors) Set

func (s *SFDFactors) Set(col *ResponseForCollaterals)

func (*SFDFactors) String

func (s *SFDFactors) String() string

Jump to

Keyboard shortcuts

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