exchange

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange interface {
	// const
	OrderTypes() OrderTypes

	// public
	ExchangeName() string
	InScheduledMaintenance() bool
	Boards(symbol string) (board.Board, error)

	// private
	CreateOrder(price, size float64, isBuy bool, symbol, orderType string) (*order.Responce, error)
	LiquidationOrder(price, size float64, isBuy bool, symbol, orderType string) (*order.Responce, error)
	EditOrder(symbol, localID string, price, size float64) (*order.Order, error)
	CancelOrder(symbol, localID string) error
	CancelAllOrder(symbol string) error
	ActiveOrders(symbol string) ([]order.Order, error)
	Stocks(symbol string) (stock.Stock, error)
	Balance() ([]base.Balance, error)

	// for backtest
	UpdateLTP(ltp float64) error
	UpdateBestPrice(bestAsk, bestBid float64) error
}

Exchange 取引所のラッパーentity

type Key

type Key struct {
	APIKey        string
	APISecKey     string
	SpecificParam map[string]interface{}
}

Key .. key data for use private apis.

type OrderTypes

type OrderTypes struct {
	Market string
	Limit  string
}

type Stream

type Stream interface {
	Start() error
	// Read Execution, error Executionはなかったらnilが飛ぶ
	Read() (execution.Execution, error)
}

Stream socketを起動し受け取る

type Symbols

type Symbols struct {
	BtcJpy   string
	FxBtcJpy string
}

Jump to

Keyboard shortcuts

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