Documentation
¶
Index ¶
Constants ¶
View Source
const ( TYPED_SIG_EIP SigMode = 0 GETH = 1 TREZOR = 2 )
View Source
const ETH_ADDRESS = "0x0000000000000000000000000000000000000000"
Variables ¶
View Source
var ORDER_HASH_SCHEME = NewHash("0xb9caf644225739cd2bda9073346357ae4a0c3d71809876978bd81cc702b7fdc7")
Functions ¶
This section is empty.
Types ¶
type EC ¶
type Order ¶
type Order struct {
Hash Hash `json:"hash,omitempty" bson:"_id"`
Price float64 `json:"-" bson:"price"`
Make Trade `json:"make" bson:"make"`
Take Trade `json:"take" bson:"take"`
Expires Timestamp `json:"expires" bson:"expires"`
Nonce int64 `json:"nonce" bson:"nonce"`
Maker Address `json:"maker" bson:"maker"`
Exchange Address `json:"exchange" bson:"exchange"`
Signature EC `json:"signature" bson:"signature"`
Filled Int `json:"filled,omitempty" bson:"filled"`
Status OrderStatus `json:"-" bson:"status"`
}
type OrderStatus ¶ added in v1.0.2
type OrderStatus string
const ( UNDER_FUNDED OrderStatus = "UNDER_FUNDED" OPEN = "OPEN" )
type Tick ¶
type Tick struct {
Pair Pair `json:"pair" bson:"pair"`
Block int64 `json:"block" bson:"block"`
Volume Int `json:"volume" bson:"volume"`
Open float64 `json:"open" bson:"open"`
Close float64 `json:"close" bson:"close"`
High float64 `json:"high" bson:"high"`
Low float64 `json:"low" bson:"low"`
Timestamp Timestamp `json:"timestamp" bson:"timestamp"`
}
type Timestamp ¶
func NewTimestampFromInt ¶
func (Timestamp) MarshalJSON ¶
func (*Timestamp) UnmarshalJSON ¶
type Transaction ¶
type Transaction struct {
TransactionID Hash `json:"tx" bson:"_id"`
TransactionIndex uint `json:"index" bson:"index"`
OrderHash Hash `json:"hash" bson:"hash"`
BlockNumber uint64 `json:"block" bson:"block"`
Timestamp Timestamp `json:"timestamp" bson:"timestamp"`
Taker Address `json:"taker" bson:"taker"`
Maker Address `json:"maker" bson:"maker"`
Make Trade `json:"make" bson:"make"`
Take Trade `json:"take" bson:"take"`
}
func NewTransaction ¶
func NewTransaction(trade contracts.ExchangeTraded, timestamp Int) Transaction
Click to show internal directories.
Click to hide internal directories.