Documentation ¶
Index ¶
- type Ccxt
- func (c *Ccxt) CancelOrder(orderID string, tradingPair string) (*CcxtOpenOrder, error)
- func (c *Ccxt) CreateLimitOrder(tradingPair string, side string, amount float64, price float64) (*CcxtOpenOrder, error)
- func (c *Ccxt) FetchBalance() (map[string]CcxtBalance, error)
- func (c *Ccxt) FetchMyTrades(tradingPair string) ([]CcxtTrade, error)
- func (c *Ccxt) FetchOpenOrders(tradingPairs []string) (map[string][]CcxtOpenOrder, error)
- func (c *Ccxt) FetchOrderBook(tradingPair string, limit *int) (map[string][]CcxtOrder, error)
- func (c *Ccxt) FetchTicker(tradingPair string) (map[string]interface{}, error)
- func (c *Ccxt) FetchTrades(tradingPair string) ([]CcxtTrade, error)
- type CcxtBalance
- type CcxtOpenOrder
- type CcxtOrder
- type CcxtTrade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ccxt ¶
type Ccxt struct {
// contains filtered or unexported fields
}
Ccxt Rest SDK (https://github.com/franz-see/ccxt-rest, https://github.com/ccxt/ccxt/)
func MakeInitializedCcxtExchange ¶
func MakeInitializedCcxtExchange(ccxtBaseURL string, exchangeName string, apiKey api.ExchangeAPIKey) (*Ccxt, error)
MakeInitializedCcxtExchange constructs an instance of Ccxt that is bound to a specific exchange instance on the CCXT REST server
func (*Ccxt) CancelOrder ¶ added in v1.3.0
func (c *Ccxt) CancelOrder(orderID string, tradingPair string) (*CcxtOpenOrder, error)
CancelOrder calls the /cancelOrder endpoint on CCXT with the orderID and tradingPair
func (*Ccxt) CreateLimitOrder ¶ added in v1.3.0
func (c *Ccxt) CreateLimitOrder(tradingPair string, side string, amount float64, price float64) (*CcxtOpenOrder, error)
CreateLimitOrder calls the /createOrder endpoint on CCXT with a limit price and the order type set to "limit"
func (*Ccxt) FetchBalance ¶ added in v1.3.0
func (c *Ccxt) FetchBalance() (map[string]CcxtBalance, error)
FetchBalance calls the /fetchBalance endpoint on CCXT
func (*Ccxt) FetchMyTrades ¶ added in v1.3.0
func (*Ccxt) FetchOpenOrders ¶ added in v1.3.0
func (c *Ccxt) FetchOpenOrders(tradingPairs []string) (map[string][]CcxtOpenOrder, error)
FetchOpenOrders calls the /fetchOpenOrders endpoint on CCXT
func (*Ccxt) FetchOrderBook ¶
FetchOrderBook calls the /fetchOrderBook endpoint on CCXT, trading pair is the CCXT version of the trading pair
func (*Ccxt) FetchTicker ¶
FetchTicker calls the /fetchTicker endpoint on CCXT, trading pair is the CCXT version of the trading pair
type CcxtBalance ¶ added in v1.3.0
CcxtBalance represents the balance for an asset
type CcxtOpenOrder ¶ added in v1.3.0
type CcxtOpenOrder struct { Amount float64 Cost float64 Filled float64 ID string Price float64 Side string Status string Symbol string Type string Timestamp int64 }
CcxtOpenOrder represents an open order
type CcxtTrade ¶
type CcxtTrade struct { Amount float64 `json:"amount"` Cost float64 `json:"cost"` Datetime string `json:"datetime"` ID string `json:"id"` Price float64 `json:"price"` Side string `json:"side"` Symbol string `json:"symbol"` Timestamp int64 `json:"timestamp"` }
CcxtTrade represents a trade