Documentation ¶
Index ¶
- Constants
- func CalcPnl(side crex.Direction, positionSize float64, entryPrice float64, ...) (pnl float64, pnlUsd float64)
- type BitMEXSim
- func (b *BitMEXSim) AmendOrder(symbol string, id string, price float64, size float64) (result Order, err error)
- func (b *BitMEXSim) CancelAllOrders(symbol string) (err error)
- func (b *BitMEXSim) CancelOrder(symbol string, id string) (result Order, err error)
- func (b *BitMEXSim) CloseLong(symbol string, orderType OrderType, price float64, size float64) (result Order, err error)
- func (b *BitMEXSim) CloseShort(symbol string, orderType OrderType, price float64, size float64) (result Order, err error)
- func (b *BitMEXSim) GetBalance(currency string) (result Balance, err error)
- func (b *BitMEXSim) GetContractID() (symbol string, err error)
- func (b *BitMEXSim) GetName() (name string)
- func (b *BitMEXSim) GetOpenOrders(symbol string) (result []Order, err error)
- func (b *BitMEXSim) GetOrder(symbol string, id string) (result Order, err error)
- func (b *BitMEXSim) GetOrderBook(symbol string, depth int) (result OrderBook, err error)
- func (b *BitMEXSim) GetPositions(symbol string) (result []Position, err error)
- func (b *BitMEXSim) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []Record, err error)
- func (b *BitMEXSim) OpenLong(symbol string, orderType OrderType, price float64, size float64) (result Order, err error)
- func (b *BitMEXSim) OpenShort(symbol string, orderType OrderType, price float64, size float64) (result Order, err error)
- func (b *BitMEXSim) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64, ...) (result Order, err error)
- func (b *BitMEXSim) RunEventLoopOnce() (err error)
- func (b *BitMEXSim) SetContractType(currencyPair string, contractType string) (err error)
- func (b *BitMEXSim) SetLeverRate(value float64) (err error)
- func (b *BitMEXSim) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error
- func (b *BitMEXSim) SubscribeOrders(market Market, callback func(orders []Order)) error
- func (b *BitMEXSim) SubscribePositions(market Market, callback func(positions []Position)) error
- func (b *BitMEXSim) SubscribeTrades(market Market, callback func(trades []Trade)) error
- type MarginInfo
Constants ¶
View Source
const (
OrderSizeLimit = 10000000 // Order size limit
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitMEXSim ¶
type BitMEXSim struct {
// contains filtered or unexported fields
}
BitMEXSim the BitMEX exchange for backtest
func NewBitMEXSim ¶
func (*BitMEXSim) AmendOrder ¶
func (*BitMEXSim) CancelAllOrders ¶
func (*BitMEXSim) CancelOrder ¶
func (*BitMEXSim) CloseShort ¶ added in v1.1.3
func (*BitMEXSim) GetBalance ¶
func (*BitMEXSim) GetContractID ¶
func (*BitMEXSim) GetOpenOrders ¶
func (*BitMEXSim) GetOrderBook ¶
func (*BitMEXSim) GetPositions ¶
func (*BitMEXSim) GetRecords ¶
func (*BitMEXSim) PlaceOrder ¶
func (*BitMEXSim) RunEventLoopOnce ¶
func (*BitMEXSim) SetContractType ¶
func (*BitMEXSim) SetLeverRate ¶
func (*BitMEXSim) SubscribeLevel2Snapshots ¶
func (*BitMEXSim) SubscribeOrders ¶
func (*BitMEXSim) SubscribePositions ¶
func (*BitMEXSim) SubscribeTrades ¶
Click to show internal directories.
Click to hide internal directories.