models

package
v0.0.0-...-ec27bc9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountEvent

type AccountEvent map[string]interface{}

type Bargain

type Bargain struct {
	Price  types.Price
	Volume types.Volume
}

func (*Bargain) MarshalJSON

func (b *Bargain) MarshalJSON() ([]byte, error)

type Candle

type Candle struct {
	Time   time.Time   `json:"timestamp,omitempty"`
	Open   types.Price `json:"open,omitempty"`
	High   types.Price `json:"high,omitempty"`
	Low    types.Price `json:"low,omitempty"`
	Close  types.Price `json:"close,omitempty"`
	Volume types.Price `json:"volume,omitempty"`
}

func (*Candle) Array

func (c *Candle) Array() []float64

type Currency

type Currency = api.Currency

type Deposit

type Deposit = api.Deposit

type Depth

type Depth struct {
	Timestamp time.Time  `json:"timestamp,omitempty"`
	Asks      []*Bargain `json:"asks,omitempty"`
	Bids      []*Bargain `json:"bids,omitempty"`
}

get depth of a specified market, sorted from highest price to lowest

type Market

type Market = api.Market

type Member

type Member = api.Member

type Order

type Order = api.Order

type OrderBook

type OrderBook = api.OrderBook

type OrderBookEvent

type OrderBookEvent struct {
	Action    string          `json:"action,omitempty"`
	Market    string          `json:"market,omitempty"`
	ID        int             `json:"id,omitempty"`
	Side      types.OrderSide `json:"side,omitempty"`
	Volume    types.Volume    `json:"volume,omitempty"`
	Price     types.Price     `json:"price,omitempty"`
	OrderType types.OrderType `json:"ord_type,omitempty"`
}

type OrderRequest

type OrderRequest struct {
	Side      types.OrderSide `json:"side,omitempty"`
	Volume    types.Volume    `json:"volume,omitempty"`
	Price     types.Price     `json:"price,omitempty"`
	StopPrice types.Price     `json:"stop_price,omitempty"`
	OrderType types.OrderType `json:"ord_type,omitempty"`
}

func (*OrderRequest) MarshalJSON

func (o *OrderRequest) MarshalJSON() ([]byte, error)

type PaymentAddress

type PaymentAddress = api.PaymentAddress

type Ticker

type Ticker struct {
	// timestamp in seconds since Unix epoch
	At     time.Time    `json:"at,omitempty"`
	Buy    types.Price  `json:"buy,omitempty"`
	Sell   types.Price  `json:"sell,omitempty"`
	Open   types.Price  `json:"open,omitempty"`
	Last   types.Price  `json:"last,omitempty"`
	High   types.Price  `json:"high,omitempty"`
	Low    types.Price  `json:"low,omitempty"`
	Volume types.Volume `json:"vol,omitempty"`
}

type TickerEvent

type TickerEvent struct {
	Market string `json:"market,omitempty"`
	Ticker
}

type Tickers

type Tickers map[string]*Ticker

type Trade

type Trade = api.Trade

type TradeEvent

type TradeEvent struct {
	At     time.Time    `json:"at,omitempty"`
	Market string       `json:"market,omitempty"`
	Volume types.Volume `json:"volume,omitempty"`
	Price  types.Price  `json:"price,omitempty"`
}

type Withdrawal

type Withdrawal = api.Withdrawal

Jump to

Keyboard shortcuts

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