order

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(c client.Client, orderID int64, pair string) error

func ListOrdersBook

func ListOrdersBook(c client.Client, pairing string) ([]Order, []Order, error)

Types

type CancelRequest

type CancelRequest struct {
	Pair string `json:"pair"`
}

type ListResp

type ListResp []Order

func List

func List(c client.Client, params ...string) (ListResp, error)

type Option

type Option struct {
	Type   string `json:"type"` // possible value ['limit','market']
	Pair   string `json:"pair"`
	Side   string `json:"side"` // possible value ['buy','sell']
	Price  string `json:"price,omitempty"`
	Amount string `json:"amount,omitempty"`
	Nonce  int64  `json:"nonce"`
}

type Order

type Order struct {
	ID              int64  `json:"id,omitempty"`
	Price           string `json:"price"`
	Amount          string `json:"amount"`
	RemainingAmount string `json:"remaining_amount,omitempty"`
	Cost            string `json:"cost,omitempty"`
	Status          string `json:"status,omitempty"`
	CreatedAt       string `json:"created_at,omitempty"`
	Side            string `json:"side,omitempty"`
}

func Create

func Create(c client.Client, option Option) (*Order, error)

Jump to

Keyboard shortcuts

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