Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
func (*Finder) OnSnapshot ¶
func (f *Finder) OnSnapshot(snap chatex.OrdersSnapshot)
type OrderCalc ¶ added in v0.3.1
type OrderCalc struct { MidAmount1 decimal.Decimal MidAmount2 decimal.Decimal MidAmount decimal.Decimal StartAmount decimal.Decimal NextAmount decimal.Decimal LastAmount decimal.Decimal MaxStartAmount *decimal.Decimal StartCoin chatexsdk.Coin NextCoin chatexsdk.Coin }
func (OrderCalc) CalcTrades ¶ added in v0.3.1
calcOrders calculates amounts to do trades with order1, and then with order2.
order1 allows to exchange start -> next. order2 allows to exchange next -> start.
order1 => next/start order2 => start/next
Order X/Y allows to buy X, and sell Y. order.Amount is the maximum X amount can buy. order.Rate is how much Y you need to sell to get one X.
Click to show internal directories.
Click to hide internal directories.