order

package
v0.0.0-...-e85216b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetActiveOrdersParams

type GetActiveOrdersParams struct {
	Pair   types.TypePair `json:"pair"`
	Count  int            `json:"count"`
	FromID int            `json:"from_id"`
	EndID  int            `json:"end_id"`
	Since  int            `json:"since"`
	End    int            `json:"end"`
}

GetActiveOrdersParams is parameters for getting multiple orders.

type GetActiveOrdersResponse

type GetActiveOrdersResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code   int `json:"code"`
		Orders []struct {
			Pair            types.TypePair `json:"pair"`
			Side            string         `json:"side"`
			Type            string         `json:"type"`
			StartAmount     string         `json:"start_amount"`
			RemainingAmount string         `json:"remaining_amount"`
			ExecutedAmount  string         `json:"executed_amount"`
			Price           string         `json:"price"`
			AveragePrice    string         `json:"average_price"`
			OrderedAt       int            `json:"ordered_at"`
			Status          string         `json:"status"`
		} `json:"orders"`
	} `json:"data"`
}

GetActiveOrdersResponse is a response for getting multiple orders.

type GetOrderParams

type GetOrderParams struct {
	Pair    types.TypePair `json:"pair"`
	OrderID int            `json:"order_id"`
}

GetOrderParams is parameters for getting a order.

type GetOrderResponse

type GetOrderResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code            int            `json:"code"`
		OrderID         int            `json:"order_id"`
		Pair            types.TypePair `json:"pair"`
		Side            string         `json:"side"`
		Type            string         `json:"type"`
		StartAmount     string         `json:"start_amount"`
		RemainingAmount string         `json:"remaining_amount"`
		ExecutedAmount  string         `json:"executed_amount"`
		Price           string         `json:"price"`
		AveragePrice    string         `json:"average_price"`
		OrderedAt       int            `json:"ordered_at"`
		Status          string         `json:"status"`
	} `json:"data"`
}

GetOrderResponse is a response for getting a order.

type GetOrdersInfoParams

type GetOrdersInfoParams struct {
	Pair     types.TypePair `json:"pair"`
	OrderIDs []int          `json:"order_ids"`
}

GetOrdersInfoParams is parameters for getting multiple orders.

type Order

type Order struct {
	Client *client.Client
}

Order is a order.

func (*Order) GetActiveOrders

func (o *Order) GetActiveOrders(params GetActiveOrdersParams) (*GetActiveOrdersResponse, error)

GetActiveOrders gets multiple orders.

func (*Order) GetOrder

func (o *Order) GetOrder(params GetOrderParams) (*GetOrderResponse, error)

GetOrder gets an order infomation.

func (*Order) GetOrdersInfo

func (o *Order) GetOrdersInfo(params GetOrdersInfoParams) (*PostOrdersInfoResponse, error)

GetOrdersInfo gets multiple orders.

func (*Order) PostCancelOrder

func (o *Order) PostCancelOrder(params PostCancelOrderParams) (*PostCancelOrderResponse, error)

PostCancelOrder cancels order.

func (*Order) PostCancelOrders

func (o *Order) PostCancelOrders(params PostCancelOrdersParams) (*PostCancelOrdersResponse, error)

PostCancelOrders cancels orders.

func (*Order) PostOrder

func (o *Order) PostOrder(params PostOrderParams) (*PostOrderResponse, error)

PostOrder creates a new order.

type PostCancelOrderParams

type PostCancelOrderParams struct {
	Pair    types.TypePair `json:"pair"`
	OrderID int            `json:"order_id"`
}

PostCancelOrderParams is parameters for canceling a order.

type PostCancelOrderResponse

type PostCancelOrderResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code            int            `json:"code"`
		OrderID         int            `json:"order_id"`
		Pair            types.TypePair `json:"pair"`
		Side            string         `json:"side"`
		Type            string         `json:"type"`
		StartAmount     string         `json:"start_amount"`
		RemainingAmount string         `json:"remaining_amount"`
		ExecutedAmount  string         `json:"executed_amount"`
		Price           string         `json:"price"`
		AveragePrice    string         `json:"average_price"`
		OrderedAt       int            `json:"ordered_at"`
		CanceledAt      int            `json:"canceled_at"`
		Status          string         `json:"status"`
	} `json:"data"`
}

PostCancelOrderResponse is a response for canceling a order.

type PostCancelOrdersParams

type PostCancelOrdersParams struct {
	Pair     types.TypePair `json:"pair"`
	OrderIDs []int          `json:"order_ids"`
}

PostCancelOrdersParams is parameters for canceling orders.

type PostCancelOrdersResponse

type PostCancelOrdersResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code   int `json:"code"`
		Orders []struct {
			OrderID         int            `json:"order_id"`
			Pair            types.TypePair `json:"pair"`
			Side            string         `json:"side"`
			Type            string         `json:"type"`
			StartAmount     string         `json:"start_amount"`
			RemainingAmount string         `json:"remaining_amount"`
			ExecutedAmount  string         `json:"executed_amount"`
			Price           string         `json:"price"`
			AveragePrice    string         `json:"average_price"`
			OrderedAt       int            `json:"ordered_at"`
			CanceledAt      int            `json:"canceled_at"`
			Status          string         `json:"status"`
		} `json:"orders"`
	}
}

PostCancelOrdersResponse is a response for canceling orders.

type PostOrderParams

type PostOrderParams struct {
	Pair   types.TypePair `json:"pair"`
	Amount string         `json:"amount"`
	Price  string         `json:"price"`
	Side   string         `json:"side"`
	Type   string         `json:"type"`
}

PostOrderParams is parameters for creating a order.

type PostOrderResponse

type PostOrderResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code            int            `json:"code"`
		OrderID         int            `json:"order_id"`
		Pair            types.TypePair `json:"pair"`
		Side            string         `json:"side"`
		Type            string         `json:"type"`
		StartAmount     string         `json:"start_amount"`
		RemainingAmount string         `json:"remaining_amount"`
		ExecutedAmount  string         `json:"executed_amount"`
		Price           string         `json:"price"`
		AveragePrice    string         `json:"average_price"`
		OrderedAt       int            `json:"ordered_at"`
		Status          string         `json:"status"`
	} `json:"data"`
}

PostOrderResponse is a response for creating a order.

type PostOrdersInfoResponse

type PostOrdersInfoResponse struct {
	Success int `json:"success"`
	Data    struct {
		Code   int `json:"code"`
		Orders []struct {
			OrderID         int            `json:"order_id"`
			Pair            types.TypePair `json:"pair"`
			Side            string         `json:"side"`
			Type            string         `json:"type"`
			StartAmount     string         `json:"start_amount"`
			RemainingAmount string         `json:"remaining_amount"`
			ExecutedAmount  string         `json:"executed_amount"`
			Price           string         `json:"price"`
			AveragePrice    string         `json:"average_price"`
			OrderedAt       int            `json:"ordered_at"`
			CanceledAt      int            `json:"canceled_at"`
			Status          string         `json:"status"`
		} `json:"orders"`
	} `json:"data"`
}

PostOrdersInfoResponse is a response for getting multiple orders.

Jump to

Keyboard shortcuts

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