private

package
v0.0.0-...-75bd426 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelAllChildOrdersRequest

type CancelAllChildOrdersRequest struct {
	Path        string            `json:"-"`
	ProductCode types.ProductCode `json:"product_code,omitempty"`
}

func NewCancelAllChildOrdersRequest

func NewCancelAllChildOrdersRequest(productCode types.ProductCode) *CancelAllChildOrdersRequest

func (*CancelAllChildOrdersRequest) CreateHTTPRequest

func (b *CancelAllChildOrdersRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type CancelChildOrderRequest

type CancelChildOrderRequest struct {
	Path                   string            `json:"-"`
	ProductCode            types.ProductCode `json:"product_code"`
	ChildOrderId           string            `json:"child_order_id,omitempty"`
	ChildOrderAcceptanceId string            `json:"child_order_acceptance_id,omitempty"`
}

func NewCancelChildOrderRequest

func NewCancelChildOrderRequest(productCode types.ProductCode, IdType types.IdType, orderId string) (*CancelChildOrderRequest, error)

func (*CancelChildOrderRequest) CreateHTTPRequest

func (b *CancelChildOrderRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type CancelParentOrderRequest

type CancelParentOrderRequest struct {
	Path                    string            `json:"-"`
	ProductCode             types.ProductCode `json:"product_code"`
	ParentOrderId           string            `json:"parent_order_id,omitempty"`
	ParentOrderAcceptanceId string            `json:"parent_order_acceptance_id,omitempty"`
}

func NewCancelParentOrderRequest

func NewCancelParentOrderRequest(productCode types.ProductCode, IdType types.IdType, orderId string) (*CancelParentOrderRequest, error)

func (*CancelParentOrderRequest) CreateHTTPRequest

func (r *CancelParentOrderRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetBalanceAsset

type GetBalanceAsset struct {
	CurrencyCode types.CurrencyCode `json:"currency_code"`
	Amount       float64            `json:"amount"`
	Available    float64            `json:"available"`
}

type GetBalanceHistoryEvent

type GetBalanceHistoryEvent struct {
	Id           int64              `json:"id"`
	TradeDate    string             `json:"trade_date"`
	ProductCode  types.ProductCode  `json:"product_code"`
	CurrencyCode types.CurrencyCode `json:"currency_code"`
	TradeType    types.TradeType    `json:"trade_type"`
	Price        float64            `json:"price"`
	Amount       float64            `json:"amount"`
	Quantity     float64            `json:"quantity"`
	Commission   float64            `json:"commission"`
	Balance      float64            `json:"balance"`
	OrderId      string             `json:"order_id"`
}

type GetBalanceHistoryRequest

type GetBalanceHistoryRequest struct {
	Path         string             `url:"-"`
	CurrencyCode types.CurrencyCode `url:"currency_code"`
	types.Pagination
}

func NewGetBalanceHistoryRequest

func NewGetBalanceHistoryRequest(currencyCode types.CurrencyCode, count int64, before int64, after int64) *GetBalanceHistoryRequest

func (*GetBalanceHistoryRequest) CreateHTTPRequest

func (r *GetBalanceHistoryRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetBalanceHistoryResponse

type GetBalanceHistoryResponse []*GetBalanceHistoryEvent

type GetBalanceRequest

type GetBalanceRequest struct {
	Path string `json:"-"`
}

func NewGetBalanceRequest

func NewGetBalanceRequest() *GetBalanceRequest

func (*GetBalanceRequest) CreateHTTPRequest

func (b *GetBalanceRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetBalanceResponse

type GetBalanceResponse []*GetBalanceAsset

type GetChildOrdersOrder

type GetChildOrdersOrder struct {
	Id                     int64             `json:"id"`
	ChildOrderId           string            `json:"child_order_id"`
	ProductCode            types.ProductCode `json:"product_code"`
	Side                   string            `json:"side"`
	ChildOrderType         string            `json:"child_order_type"`
	Price                  float64           `json:"price"`
	AveragePrice           float64           `json:"average_price"`
	Size                   float64           `json:"size"`
	ChildOrderState        string            `json:"child_order_state"`
	ExpireDate             string            `json:"expire_date"`
	ChildOrderDate         string            `json:"child_order_date"`
	ChildOrderAcceptanceId string            `json:"child_order_acceptance_id"`
	OutstandingSize        float64           `json:"outstanding_size"`
	CancelSize             float64           `json:"cancel_size"`
	ExecutedSize           float64           `json:"executed_size"`
	TotalCommission        float64           `json:"total_commission"`
}

type GetChildOrdersRequest

type GetChildOrdersRequest struct {
	Path        string            `url:"-"`
	ProductCode types.ProductCode `url:"product_code,omitempty"`
	types.Pagination
	ChildOrderState        types.OrderState `url:"child_order_state,omitempty"`
	ChildOrderId           string           `url:"child_order_id,omitempty"`
	ChildOrderAcceptanceId string           `url:"child_order_acceptance_id,omitempty"`
	ParentOrderId          string           `url:"parent_order_id,omitempty"`
}

func NewGetChildOrdersRequest

func NewGetChildOrdersRequest(productCode types.ProductCode, count int64, before int64, after int64, orderState types.OrderState) *GetChildOrdersRequest

func NewGetChildOrdersRequestById

func NewGetChildOrdersRequestById(productCode types.ProductCode, IdType types.IdType, orderId string) (*GetChildOrdersRequest, error)

func (*GetChildOrdersRequest) CreateHTTPRequest

func (b *GetChildOrdersRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetChildOrdersResponse

type GetChildOrdersResponse []*GetChildOrdersOrder

type GetCollateralAccountsAccount

type GetCollateralAccountsAccount struct {
	CurrencyCode types.CurrencyCode `json:"currency_code"`
	Amount       float64            `json:"amount"`
}

type GetCollateralAccountsRequest

type GetCollateralAccountsRequest struct {
	Path string `json:"-"`
}

func NewGetCollateralAccountsRequest

func NewGetCollateralAccountsRequest() *GetCollateralAccountsRequest

func (*GetCollateralAccountsRequest) CreateHTTPRequest

func (b *GetCollateralAccountsRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetCollateralAccountsResponse

type GetCollateralAccountsResponse []*GetCollateralAccountsAccount

type GetCollateralHistoryEvent

type GetCollateralHistoryEvent struct {
	Id           int64              `json:"id"`
	CurrencyCode types.CurrencyCode `json:"currency_code"`
	Change       float64            `json:"change"`
	Amount       float64            `json:"amount"`
	ReasonCode   string             `json:"reason_code"`
	Date         string             `json:"date"`
}

type GetCollateralHistoryRequest

type GetCollateralHistoryRequest struct {
	Path string `url:"-"`
	types.Pagination
}

func NewGetCollateralHistoryRequest

func NewGetCollateralHistoryRequest(count int64, before int64, after int64) *GetCollateralHistoryRequest

func (*GetCollateralHistoryRequest) CreateHTTPRequest

func (r *GetCollateralHistoryRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetCollateralHistoryResponse

type GetCollateralHistoryResponse []*GetCollateralHistoryEvent

type GetCollateralRequest

type GetCollateralRequest struct {
	Path string `json:"-"`
}

func NewGetCollateralRequest

func NewGetCollateralRequest() *GetCollateralRequest

func (*GetCollateralRequest) CreateHTTPRequest

func (b *GetCollateralRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetCollateralResponse

type GetCollateralResponse struct {
	Collateral        float64 `json:"collateral"`
	OpenPositionPNL   float64 `json:"open_position_pnl"`
	RequireCollateral float64 `json:"require_collateral"`
	KeepRate          float64 `json:"keep_rate"`
}

type GetExecutionsExecution

type GetExecutionsExecution struct {
	Id                     int64      `json:"id"`
	ChildOrderId           string     `json:"child_order_id"`
	Side                   types.Side `json:"side"`
	Price                  float64    `json:"price"`
	Size                   float64    `json:"size"`
	Commission             float64    `json:"commission"`
	ExecDate               string     `json:"expire_date"`
	ChildOrderAcceptanceId string     `json:"child_order_acceptance_id"`
}

type GetExecutionsRequest

type GetExecutionsRequest struct {
	Path        string            `url:"-"`
	ProductCode types.ProductCode `url:"product_code,omitempty"`
	types.Pagination
	ChildOrderId           string `url:"child_order_id,omitempty"`
	ChildOrderAcceptanceId string `url:"child_order_acceptance_id,omitempty"`
}

func NewGetExecutionsRequest

func NewGetExecutionsRequest(productCode types.ProductCode, count int64, before int64, after int64) *GetExecutionsRequest

func NewGetExecutionsRequestById

func NewGetExecutionsRequestById(productCode types.ProductCode, IdType types.IdType, orderId string) (*GetExecutionsRequest, error)

func (*GetExecutionsRequest) CreateHTTPRequest

func (r *GetExecutionsRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetExecutionsResponse

type GetExecutionsResponse []*GetExecutionsExecution

type GetParentOrderParameter

type GetParentOrderParameter struct {
	ProductCode   types.ProductCode   `json:"product_code"`
	ConditionType types.ConditionType `json:"condition_type"`
	Side          types.Side          `json:"side"`
	Price         float64             `json:"price"`
	Size          float64             `json:"size"`
	TriggerPrice  float64             `json:"trigger_price"`
	Offset        float64             `json:"offset"`
}

type GetParentOrderRequest

type GetParentOrderRequest struct {
	Path                    string `url:"-"`
	ParentOrderId           string `url:"parent_order_id,omitempty"`
	ParentOrderAcceptanceId string `url:"parent_order_acceptance_id,omitempty"`
}

func NewGetParentOrderRequest

func NewGetParentOrderRequest(IdType types.IdType, orderId string) (*GetParentOrderRequest, error)

func (*GetParentOrderRequest) CreateHTTPRequest

func (b *GetParentOrderRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetParentOrderResponse

type GetParentOrderResponse struct {
	Id             int64                      `json:"id"`
	ParentOrderId  string                     `json:"parent_order_id"`
	OrderMethod    types.OrderMethod          `json:"order_method"`
	MinuteToExpire int64                      `json:"minute_to_expire"`
	TimeInForce    types.TimeInForce          `json:"time_in_force"`
	Parameters     []*GetParentOrderParameter `json:"parameters"`
}

type GetParentOrdersOrder

type GetParentOrdersOrder struct {
	Id                      int64             `json:"id"`
	ParentOrderId           string            `json:"parent_order_id"`
	ProductCode             types.ProductCode `json:"product_code"`
	Side                    string            `json:"side"`
	ParentOrderType         string            `json:"parent_order_type"`
	Price                   float64           `json:"price"`
	AveragePrice            float64           `json:"average_price"`
	Size                    float64           `json:"size"`
	ParentOrderState        string            `json:"parent_order_state"`
	ExpireDate              string            `json:"expire_date"`
	ParentOrderDate         string            `json:"parent_order_date"`
	ParentOrderAcceptanceId string            `json:"parent_order_acceptance_id"`
	OutstandingSize         float64           `json:"outstanding_size"`
	CancelSize              float64           `json:"cancel_size"`
	ExecutedSize            float64           `json:"executed_size"`
	TotalCommission         float64           `json:"total_commission"`
}

type GetParentOrdersRequest

type GetParentOrdersRequest struct {
	Path        string            `url:"-"`
	ProductCode types.ProductCode `url:"product_code,omitempty"`
	types.Pagination
	ParentOrderState types.OrderState `url:"parent_order_state,omitempty"`
}

func NewGetParentOrdersRequest

func NewGetParentOrdersRequest(productCode types.ProductCode, count int64, before int64, after int64, orderState types.OrderState) *GetParentOrdersRequest

func (*GetParentOrdersRequest) CreateHTTPRequest

func (b *GetParentOrdersRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetParentOrdersResponse

type GetParentOrdersResponse []*GetParentOrdersOrder

type GetPermissionsRequest

type GetPermissionsRequest struct {
	Path string `json:"-"`
}

func NewGetPermissionsRequest

func NewGetPermissionsRequest() *GetPermissionsRequest

func (*GetPermissionsRequest) CreateHTTPRequest

func (b *GetPermissionsRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetPermissionsResponse

type GetPermissionsResponse []string

type GetPositionsPosition

type GetPositionsPosition struct {
	ProductCode         types.ProductCode `json:"product_code"`
	Side                types.Side        `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"`
	OpenDate            string            `json:"open_date"`
	Leverage            float64           `json:"leverage"`
	Pnl                 float64           `json:"pnl"`
	Sfd                 float64           `json:"sfd"`
}

type GetPositionsRequest

type GetPositionsRequest struct {
	Path        string            `url:"-"`
	ProductCode types.ProductCode `url:"product_code"`
}

func NewGetPositionsRequest

func NewGetPositionsRequest() *GetPositionsRequest

func (*GetPositionsRequest) CreateHTTPRequest

func (r *GetPositionsRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetPositionsResponse

type GetPositionsResponse []*GetPositionsPosition

type GetTradingCommissionRequest

type GetTradingCommissionRequest struct {
	Path        string            `url:"-"`
	ProductCode types.ProductCode `url:"product_code,omitempty"`
}

func NewGetTradingCommissionRequest

func NewGetTradingCommissionRequest(productCode types.ProductCode) *GetTradingCommissionRequest

func (*GetTradingCommissionRequest) CreateHTTPRequest

func (r *GetTradingCommissionRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type GetTradingCommissionResponse

type GetTradingCommissionResponse struct {
	CommissionRate float64 `json:"commission_rate"`
}

type SendChildOrderRequest

type SendChildOrderRequest struct {
	Path           string            `json:"-"`
	ProductCode    types.ProductCode `json:"product_code"`
	ChildOrderType types.OrderType   `json:"child_order_type"`
	Side           types.Side        `json:"side"`
	Price          float64           `json:"price,omitempty"`
	Size           float64           `json:"size"`
	MinuteToExpire int64             `json:"minute_to_expire,omitempty"`
	TimeInForce    types.TimeInForce `json:"time_in_force,omitempty"`
}

func NewSendChildOrderRequest

func NewSendChildOrderRequest(productCode types.ProductCode,
	childOrderType types.OrderType,
	side types.Side,
	price float64,
	size float64,
	minuteToExpire int64,
	timeInForce types.TimeInForce) *SendChildOrderRequest

func (*SendChildOrderRequest) CreateHTTPRequest

func (b *SendChildOrderRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type SendChildOrderResponse

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

type SendParentOrderParameter

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

type SendParentOrderRequest

type SendParentOrderRequest struct {
	Path           string                      `json:"-"`
	OrderMethod    types.OrderMethod           `json:"order_method,omitempty"`
	MinuteToExpire int64                       `json:"minute_to_expire,omitempty"`
	TimeInForce    types.TimeInForce           `json:"time_in_force,omitempty"`
	Parameters     []*SendParentOrderParameter `json:"parameters"`
}

func NewSendParentOrderRequest

func NewSendParentOrderRequest(orderMethod types.OrderMethod, minuteToExpire int64, timeInForce types.TimeInForce, parameters ...*SendParentOrderParameter) *SendParentOrderRequest

func (*SendParentOrderRequest) CreateHTTPRequest

func (r *SendParentOrderRequest) CreateHTTPRequest(endpoint string) (*client.HTTPRequest, error)

type SendParentOrderResponse

type SendParentOrderResponse 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