Documentation ¶
Index ¶
- Constants
- Variables
- type Ocx
- func (o *Ocx) CancelOrder(orderId string, currency CurrencyPair) (bool, error)
- func (o *Ocx) GetAccount() (*Account, error)
- func (o *Ocx) GetDepth(size int, currency CurrencyPair) (*Depth, error)
- func (o *Ocx) GetExchangeName() string
- func (o *Ocx) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)
- func (o *Ocx) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)
- func (o *Ocx) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)
- func (o *Ocx) GetOrdersList()
- func (o *Ocx) GetServerTime() int64
- func (o *Ocx) GetTicker(currencyPair CurrencyPair) (*Ticker, error)
- func (o *Ocx) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (o *Ocx) GetUnfinishOrders(currency CurrencyPair) ([]Order, error)
- func (o *Ocx) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error)
- func (o *Ocx) LimitSell(amount, price string, currency CurrencyPair) (*Order, error)
- func (o *Ocx) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)
- func (o *Ocx) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)
Constants ¶
View Source
const ( API_BASE_URL = "https://openapi.ocx.com" V2 = "/api/v2/" TICKER_API = "market/ticker/%s" TICKERS_API = "market/tickers" DEPTH_API = "depth?market_code=%s" SERVER_TIME = "timestamp" TRADE_URL = "orders" GET_ACCOUNT_API = "accounts" GET_ORDER_API = "orders/%s" CANCEL_ORDER_API = "orders/:%s/cancel" CANCEL_ALL_ORDER_API = "orders/clear" PLACE_ORDER_API = "orders" )
Variables ¶
View Source
var TimeOffset int64 = 0
Functions ¶
This section is empty.
Types ¶
type Ocx ¶
type Ocx struct {
// contains filtered or unexported fields
}
func (*Ocx) CancelOrder ¶
func (*Ocx) GetAccount ¶
func (*Ocx) GetExchangeName ¶
func (*Ocx) GetKlineRecords ¶
func (*Ocx) GetOneOrder ¶
func (*Ocx) GetOrderHistorys ¶
func (*Ocx) GetOrdersList ¶
func (o *Ocx) GetOrdersList()
func (*Ocx) GetServerTime ¶
func (*Ocx) GetUnfinishOrders ¶
func (*Ocx) MarketSell ¶
Click to show internal directories.
Click to hide internal directories.