model

package
v0.0.0-...-a58d1de Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 1 Imported by: 50

Documentation

Overview

Package model data models of exchanges

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Currency string
	Free     float64
	Frozen   float64
}

type BigONEOrder

type BigONEOrder struct {
	ID         string
	Amount     float64
	DealAmount float64
	Price      float64
	Status     string
	Type       string
	Side       string
	Time       time.Time
	Raw        string
}

BigONE Order

type BigONETicker

type BigONETicker struct {
	Last  float64
	Open  float64
	Close float64
	High  float64
	Low   float64
	Vol   float64
}

BigONE Ticker

type BigONETrade

type BigONETrade struct {
	ID     string
	Type   string
	Price  float64
	Amount float64
	Time   time.Time
}

BigONE Trade

type BookTicker

type BookTicker struct {
	Symbol    string
	BidPrice  float64
	BidAmount float64
	AskPrice  float64
	AskAmount float64
}

type MarketInfo

type MarketInfo struct {
	Symbol        string
	DecimalPlaces int64
	MinAmount     float64
	Fee           float64
}

type MarketOrder

type MarketOrder struct {
	Price  float64
	Amount float64
}

type Order

type Order struct {
	ID         int64
	Amount     float64
	DealAmount float64
	Price      float64
	Status     string
	Type       string
	Side       string
	Raw        string
}

type OrderBook

type OrderBook struct {
	Asks []MarketOrder // 卖方深度
	Bids []MarketOrder // 买方深度
	Time time.Time
	Raw  string // exchange original info
}

type Record

type Record struct {
	Open  float64
	High  float64
	Low   float64
	Close float64
	Vol   float64
	Time  time.Time
	Raw   string
}

Kline OHLC struct

type SimpleTicker

type SimpleTicker struct {
	Price  float64
	Symbol string
}

type Ticker

type Ticker struct {
	Buy  float64 // 买一价
	Sell float64 // 卖一价
	Last float64 // 最新成交价
	Low  float64 // 最低价
	High float64 // 最高价
	Vol  float64 // 成交量(最近 24 小时)
	Time time.Time
	Raw  string // exchange original info
}

Ticker 行情数据

type Trade

type Trade struct {
	ID     int64 // trade id
	Type   string
	Price  float64
	Amount float64
	Time   time.Time
	Raw    string // exchange original info
}

历史成交

type Trades

type Trades []*Trade

Trades 多个历史成交

type ZBOrder

type ZBOrder struct {
	Currency    string    // 交易类型(目前仅支持btc_cny/ltc_cny/eth_cny/eth_btc/etc_cny)
	Fees        float64   // 交易手续费,卖单的话,显示的是收入货币(如人民币);买单的话,显示的是买入货币(如etc)
	ID          string    // 委托挂单号
	Price       float64   // 单价
	Status      int64     // 挂单状态(0: 待成交, 1: 取消, 2: 交易完成, 3: 待成交未交易部份)
	TotalAmount float64   // 挂单总数量
	TradeAmount float64   // 已成交数量
	TradePrice  float64   // 成交均价
	TradeDate   time.Time // 委托时间
	TradeMoney  float64   // 已成交总金额
	Type        int64     // 挂单类型 1/0[buy/sell]
}

ZBOrder 获取委托买单或卖单

Jump to

Keyboard shortcuts

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