Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AuthRequest() *Request
- func (c *Client) CancelAllOrders(reqID int, market string) error
- func (c *Client) CancelOrder(reqID int, remoteID, market string) error
- func (c *Client) Connect() error
- func (c *Client) CreateLimitOrder(reqID int, ask string, bid string, orderSide string, price decimal.Decimal, ...) error
- func (c *Client) CreateMarketOrder(reqID int, ask string, bid string, orderSide string, amount decimal.Decimal, ...) error
- func (c *Client) GetOrderDetails(reqID int, remoteID string) error
- func (c *Client) Listen() <-chan Response
- func (c *Client) RestGetBalance(reqID int) (Response, error)
- func (c *Client) RestGetOrderDetails(reqID int, remoteID string) (Response, error)
- func (c *Client) RestGetTrades(reqID int, market string) (Response, error)
- func (c *Client) RestOpenOrders(reqID int, market string, pageNumber int, pageSize int) (Response, error)
- func (c *Client) Shutdown()
- func (c *Client) SubscribePrivateBalanceUpdates() error
- func (c *Client) SubscribePrivateOrders(markets ...string) error
- func (c *Client) SubscribePrivateTrades(markets ...string) error
- func (c *Client) SubscribePublicOrderBook(depth int, markets ...string) error
- func (c *Client) SubscribePublicTickers(markets ...string) error
- func (c *Client) SubscribePublicTrades(markets ...string) error
- type Connection
- type HTTPClient
- type LogFunc
- type Request
- type Response
- type Transport
Constants ¶
View Source
const ( // Types AuthRequest = iota + 1 SubscribeRequest HeartBeat OrderRequest RestOrderRequest RestBalanceRequest RestTradesRequest RestOpenOrdersRequest )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { LogFunc LogFunc // contains filtered or unexported fields }
func (*Client) AuthRequest ¶
func (*Client) CreateLimitOrder ¶
func (c *Client) CreateLimitOrder( reqID int, ask string, bid string, orderSide string, price decimal.Decimal, amount decimal.Decimal, uuid uuid.UUID, ) error
For MARKET BUY orders, amount is notional (https://exchange-docs.crypto.com/#private-create-order).
func (*Client) CreateMarketOrder ¶
func (*Client) RestGetOrderDetails ¶
func (*Client) RestGetTrades ¶
func (*Client) RestOpenOrders ¶
func (*Client) SubscribePrivateBalanceUpdates ¶
func (*Client) SubscribePrivateOrders ¶
SubscribePrivateOrders is subscription private order user.order.markets channel
func (*Client) SubscribePrivateTrades ¶
SubscribePrivateTrades is subscription private user.trade channel
func (*Client) SubscribePublicOrderBook ¶
SubscribePublicOrderBook is subscription orderbook channel Example: SubscribeOrderBook(depth, "ETH_BTC", "ETH_CRO") depth: Number of bids and asks to return. Allowed values: 10 or 150
func (*Client) SubscribePublicTickers ¶
SubscribePublicTickers is subscription ticker channel
func (*Client) SubscribePublicTrades ¶
SubscribePublicTrades is subscription trade channel Example: SubscribeTrades("ETH_BTC", "ETH_CRO")
type Connection ¶
func (*Connection) Type ¶
func (c *Connection) Type() string
type HTTPClient ¶
type Request ¶
Click to show internal directories.
Click to hide internal directories.