gdax

package
v0.0.193 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASE_URL         = "https://api.pro.coinbase.com"
	BASE_URL_SANDBOX = "https://api-public.sandbox.pro.coinbase.com"
)

Variables

This section is empty.

Functions

func GetMinOrderSize

func GetMinOrderSize(product *exchange.Product) (float64, error)

func ParseFloat

func ParseFloat(value string) float64

Types

type Client

type Client struct {
	*exchange.Client
}

func New

func New(sandbox bool) *Client

func (*Client) CreateOrder

func (self *Client) CreateOrder(neworder *Order) (*Order, error)

func (*Client) GetMe

func (self *Client) GetMe() (*Me, error)

func (*Client) GetOrder

func (self *Client) GetOrder(id string) (*Order, error)

type Me

type Me struct {
	ID string `json:"id"`
}

type Message

type Message struct {
	*exchange.Message
}

func (*Message) GetReason

func (self *Message) GetReason() MessageReason

func (*Message) GetType

func (self *Message) GetType() MessageType

func (*Message) Title

func (self *Message) Title() string

type MessageReason

type MessageReason int
const (
	REASON_UNKNOWN MessageReason = iota
	REASON_FILLED
	REASON_CANCELED
)

func (*MessageReason) String

func (mr *MessageReason) String() string

type MessageType

type MessageType int
const (
	MESSAGE_UNKNOWN MessageType = iota
	MESSAGE_RECEIVED
	MESSAGE_OPEN
	MESSAGE_DONE
	MESSAGE_MATCH
	MESSAGE_CHANGE
	MESSAGE_ACTIVATE
	MESSAGE_HEARTBEAT
	MESSAGE_ERROR
)

func (*MessageType) String

func (mt *MessageType) String() string

type Order

type Order struct {
	*exchange.Order
}

func (*Order) GetPrice

func (self *Order) GetPrice() float64

func (*Order) GetSize

func (self *Order) GetSize() float64

func (*Order) GetStopPrice

func (self *Order) GetStopPrice() float64

func (*Order) SetPrice

func (self *Order) SetPrice(value float64) *Order

func (*Order) SetSize

func (self *Order) SetSize(value float64) *Order

func (*Order) SetStopPrice

func (self *Order) SetStopPrice(value float64) *Order

Jump to

Keyboard shortcuts

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