Documentation
¶
Index ¶
- Constants
- type OKCoin
- func (o *OKCoin) AddChannel(channel string)
- func (o *OKCoin) AddChannelAuthenticated(channel string, values map[string]string)
- func (o *OKCoin) BatchTrade(orderData string, symbol, orderType string) (OKCoinBatchTrade, error)
- func (o *OKCoin) Borrow(symbol, days string, amount, rate float64) (int, error)
- func (o *OKCoin) CancelBorrow(symbol string, borrowID int64) (bool, error)
- func (o *OKCoin) CancelFuturesOrder(orderID int64, symbol, contractType string)
- func (o *OKCoin) CancelOrder(orderID []int64, symbol string) (OKCoinCancelOrderResponse, error)
- func (o *OKCoin) CancelWithdrawal(symbol string, withdrawalID int64) (int, error)
- func (o *OKCoin) ConvertToURLValues(values map[string]string) url.Values
- func (o *OKCoin) FuturesBatchTrade(orderData, symbol, contractType string, leverage int64, orderType string)
- func (o *OKCoin) FuturesTrade(amount, price float64, matchPrice, leverage int64, ...)
- func (o *OKCoin) GetAccountRecords(symbol string, recType, currentPage, pageLength int) ([]OKCoinAccountRecords, error)
- func (o *OKCoin) GetBorrowInfo(symbol string) (OKCoinBorrowInfo, error)
- func (o *OKCoin) GetBorrowOrderInfo(borrowID int64) (OKCoinBorrowInfo, error)
- func (o *OKCoin) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (o *OKCoin) GetFee(maker bool) float64
- func (o *OKCoin) GetFutureOrdersInfo(orderID int64, contractType, symbol string)
- func (o *OKCoin) GetFuturesDepth(symbol, contractType string, size int64, merge bool) (OKCoinOrderbook, error)
- func (o *OKCoin) GetFuturesEstimatedPrice(symbol string) (float64, error)
- func (o *OKCoin) GetFuturesExchangeRate() (float64, error)
- func (o *OKCoin) GetFuturesExplosive(symbol, contractType string, status, currentPage, pageLength int64) ([]OKCoinFuturesExplosive, error)
- func (o *OKCoin) GetFuturesHoldAmount(symbol, contractType string) ([]OKCoinFuturesHoldAmount, error)
- func (o *OKCoin) GetFuturesIndex(symbol string) (float64, error)
- func (o *OKCoin) GetFuturesKline(symbol, klineType, contractType string, size, since int64) ([]interface{}, error)
- func (o *OKCoin) GetFuturesOrderInfo(orderID, status, currentPage, pageLength int64, symbol, contractType string)
- func (o *OKCoin) GetFuturesPosition(symbol, contractType string)
- func (o *OKCoin) GetFuturesTicker(symbol, contractType string) (OKCoinFuturesTicker, error)
- func (o *OKCoin) GetFuturesTrades(symbol, contractType string) ([]OKCoinFuturesTrades, error)
- func (o *OKCoin) GetFuturesUserInfo()
- func (o *OKCoin) GetFuturesUserInfo4Fix()
- func (o *OKCoin) GetFuturesUserPosition4Fix(symbol, contractType string)
- func (o *OKCoin) GetKline(symbol, klineType string, size, since int64) ([]interface{}, error)
- func (o *OKCoin) GetLendDepth(symbol string) ([]OKCoinLendDepth, error)
- func (o *OKCoin) GetOrderBook(symbol string, size int64, merge bool) (OKCoinOrderbook, error)
- func (o *OKCoin) GetOrderFeeInfo(symbol string, orderID int64) (OKCoinOrderFeeInfo, error)
- func (o *OKCoin) GetOrderHistory(pageLength, currentPage int64, status, symbol string) (OKCoinOrderHistory, error)
- func (o *OKCoin) GetOrderInfo(orderID int64, symbol string) ([]OKCoinOrderInfo, error)
- func (o *OKCoin) GetOrderInfoBatch(orderID []int64, symbol string) ([]OKCoinOrderInfo, error)
- func (o *OKCoin) GetOrderbookEx(currency pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (o *OKCoin) GetRepaymentInfo(borrowID int64) (bool, error)
- func (o *OKCoin) GetTicker(symbol string) (OKCoinTicker, error)
- func (o *OKCoin) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (o *OKCoin) GetTradeHistory(symbol string, TradeID int64) ([]OKCoinTrades, error)
- func (o *OKCoin) GetTrades(symbol string, since int64) ([]OKCoinTrades, error)
- func (o *OKCoin) GetUnrepaymentsInfo(symbol string, currentPage, pageLength int) ([]OKCoinBorrowOrder, error)
- func (o *OKCoin) GetUserInfo() (OKCoinUserInfo, error)
- func (o *OKCoin) GetWithdrawalInfo(symbol string, withdrawalID int64) ([]OKCoinWithdrawInfo, error)
- func (o *OKCoin) PingHandler(message string) error
- func (o *OKCoin) RemoveChannel(channel string)
- func (o *OKCoin) RemoveChannelAuthenticated(conn *websocket.Conn, channel string, values map[string]string)
- func (o *OKCoin) Run()
- func (o *OKCoin) SendAuthenticatedHTTPRequest(method string, v url.Values, result interface{}) (err error)
- func (o *OKCoin) SetDefaults()
- func (o *OKCoin) SetErrorDefaults()
- func (o *OKCoin) SetWebsocketErrorDefaults()
- func (o *OKCoin) Setup(exch config.ExchangeConfig)
- func (o *OKCoin) Start()
- func (o *OKCoin) Trade(amount, price float64, symbol, orderType string) (int64, error)
- func (o *OKCoin) UpdateOrderbook(currency pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (o *OKCoin) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (o *OKCoin) WebsocketClient()
- func (o *OKCoin) WebsocketFuturesCancel(symbol, contractType string, orderID int64)
- func (o *OKCoin) WebsocketFuturesOrderInfo(symbol, contractType string, orderID int64, ...)
- func (o *OKCoin) WebsocketFuturesTrade(symbol, contractType string, price, amount float64, ...)
- func (o *OKCoin) WebsocketSign(values map[string]string) string
- func (o *OKCoin) WebsocketSpotCancel(symbol string, orderID int64)
- func (o *OKCoin) WebsocketSpotOrderInfo(symbol string, orderID int64)
- func (o *OKCoin) WebsocketSpotTrade(symbol, orderType string, price, amount float64)
- func (o *OKCoin) Withdrawal(symbol string, fee float64, tradePWD, address string, amount float64) (int, error)
- type OKCoinAccountRecords
- type OKCoinBatchTrade
- type OKCoinBorrowInfo
- type OKCoinBorrowOrder
- type OKCoinBorrowResponse
- type OKCoinCancelOrderResponse
- type OKCoinFuturesExplosive
- type OKCoinFuturesHoldAmount
- type OKCoinFuturesOrder
- type OKCoinFuturesTicker
- type OKCoinFuturesTickerResponse
- type OKCoinFuturesTrades
- type OKCoinLendDepth
- type OKCoinOrderFeeInfo
- type OKCoinOrderHistory
- type OKCoinOrderInfo
- type OKCoinOrderbook
- type OKCoinRecord
- type OKCoinTicker
- type OKCoinTickerResponse
- type OKCoinTrades
- type OKCoinUserInfo
- type OKCoinWebsocketEvent
- type OKCoinWebsocketEventAuth
- type OKCoinWebsocketEventAuthRemove
- type OKCoinWebsocketFutureIndex
- type OKCoinWebsocketFuturesContract
- type OKCoinWebsocketFuturesOrder
- type OKCoinWebsocketFuturesRealtrades
- type OKCoinWebsocketFuturesTicker
- type OKCoinWebsocketFuturesUserInfo
- type OKCoinWebsocketOrder
- type OKCoinWebsocketOrderbook
- type OKCoinWebsocketRealtrades
- type OKCoinWebsocketResponse
- type OKCoinWebsocketTicker
- type OKCoinWebsocketTradeOrderResponse
- type OKCoinWebsocketUserinfo
- type OKCoinWithdrawInfo
- type OKCoinWithdrawalResponse
Constants ¶
View Source
const ( OKCOIN_API_URL = "https://www.okcoin.com/api/v1/" OKCOIN_API_URL_CHINA = "https://www.okcoin.cn/api/v1/" OKCOIN_API_VERSION = "1" OKCOIN_WEBSOCKET_URL = "wss://real.okcoin.com:10440/websocket/okcoinapi" OKCOIN_WEBSOCKET_URL_CHINA = "wss://real.okcoin.cn:10440/websocket/okcoinapi" OKCOIN_TICKER = "ticker.do" OKCOIN_DEPTH = "depth.do" OKCOIN_TRADES = "trades.do" OKCOIN_KLINE = "kline.do" OKCOIN_USERINFO = "userinfo.do" OKCOIN_TRADE = "trade.do" OKCOIN_TRADE_HISTORY = "trade_history.do" OKCOIN_TRADE_BATCH = "batch_trade.do" OKCOIN_ORDER_CANCEL = "cancel_order.do" OKCOIN_ORDER_INFO = "order_info.do" OKCOIN_ORDERS_INFO = "orders_info.do" OKCOIN_ORDER_HISTORY = "order_history.do" OKCOIN_WITHDRAW = "withdraw.do" OKCOIN_WITHDRAW_CANCEL = "cancel_withdraw.do" OKCOIN_WITHDRAW_INFO = "withdraw_info.do" OKCOIN_ORDER_FEE = "order_fee.do" OKCOIN_LEND_DEPTH = "lend_depth.do" OKCOIN_BORROWS_INFO = "borrows_info.do" OKCOIN_BORROW_MONEY = "borrow_money.do" OKCOIN_BORROW_CANCEL = "cancel_borrow.do" OKCOIN_BORROW_ORDER_INFO = "borrow_order_info.do" OKCOIN_REPAYMENT = "repayment.do" OKCOIN_UNREPAYMENTS_INFO = "unrepayments_info.do" OKCOIN_ACCOUNT_RECORDS = "account_records.do" OKCOIN_FUTURES_TICKER = "future_ticker.do" OKCOIN_FUTURES_DEPTH = "future_depth.do" OKCOIN_FUTURES_TRADES = "future_trades.do" OKCOIN_FUTURES_INDEX = "future_index.do" OKCOIN_EXCHANGE_RATE = "exchange_rate.do" OKCOIN_FUTURES_ESTIMATED_PRICE = "future_estimated_price.do" OKCOIN_FUTURES_KLINE = "future_kline.do" OKCOIN_FUTURES_HOLD_AMOUNT = "future_hold_amount.do" OKCOIN_FUTURES_USERINFO = "future_userinfo.do" OKCOIN_FUTURES_POSITION = "future_position.do" OKCOIN_FUTURES_TRADE = "future_trade.do" OKCOIN_FUTURES_TRADE_HISTORY = "future_trades_history.do" OKCOIN_FUTURES_TRADE_BATCH = "future_batch_trade.do" OKCOIN_FUTURES_CANCEL = "future_cancel.do" OKCOIN_FUTURES_ORDER_INFO = "future_order_info.do" OKCOIN_FUTURES_ORDERS_INFO = "future_orders_info.do" OKCOIN_FUTURES_USERINFO_4FIX = "future_userinfo_4fix.do" OKCOIN_FUTURES_POSITION_4FIX = "future_position_4fix.do" OKCOIN_FUTURES_EXPLOSIVE = "future_explosive.do" OKCOIN_FUTURES_DEVOLVE = "future_devolve.do" )
View Source
const ( OKCOIN_WEBSOCKET_USD_REALTRADES = "ok_usd_realtrades" OKCOIN_WEBSOCKET_CNY_REALTRADES = "ok_cny_realtrades" OKCOIN_WEBSOCKET_SPOTUSD_TRADE = "ok_spotusd_trade" OKCOIN_WEBSOCKET_SPOTCNY_TRADE = "ok_spotcny_trade" OKCOIN_WEBSOCKET_SPOTUSD_CANCEL_ORDER = "ok_spotusd_cancel_order" OKCOIN_WEBSOCKET_SPOTCNY_CANCEL_ORDER = "ok_spotcny_cancel_order" OKCOIN_WEBSOCKET_SPOTUSD_USERINFO = "ok_spotusd_userinfo" OKCOIN_WEBSOCKET_SPOTCNY_USERINFO = "ok_spotcny_userinfo" OKCOIN_WEBSOCKET_SPOTUSD_ORDER_INFO = "ok_spotusd_order_info" OKCOIN_WEBSOCKET_SPOTCNY_ORDER_INFO = "ok_spotcny_order_info" OKCOIN_WEBSOCKET_FUTURES_TRADE = "ok_futuresusd_trade" OKCOIN_WEBSOCKET_FUTURES_CANCEL_ORDER = "ok_futuresusd_cancel_order" OKCOIN_WEBSOCKET_FUTURES_REALTRADES = "ok_usd_future_realtrades" OKCOIN_WEBSOCKET_FUTURES_USERINFO = "ok_futureusd_userinfo" OKCOIN_WEBSOCKET_FUTURES_ORDER_INFO = "ok_futureusd_order_info" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OKCoin ¶
type OKCoin struct { exchange.Base RESTErrors map[string]string WebsocketErrors map[string]string FuturesValues []string WebsocketConn *websocket.Conn }
func (*OKCoin) AddChannel ¶
func (*OKCoin) AddChannelAuthenticated ¶
func (*OKCoin) BatchTrade ¶
func (o *OKCoin) BatchTrade(orderData string, symbol, orderType string) (OKCoinBatchTrade, error)
func (*OKCoin) CancelBorrow ¶
func (*OKCoin) CancelFuturesOrder ¶
func (*OKCoin) CancelOrder ¶
func (o *OKCoin) CancelOrder(orderID []int64, symbol string) (OKCoinCancelOrderResponse, error)
func (*OKCoin) CancelWithdrawal ¶
func (*OKCoin) ConvertToURLValues ¶
func (*OKCoin) FuturesBatchTrade ¶
func (*OKCoin) FuturesTrade ¶
func (*OKCoin) GetAccountRecords ¶
func (o *OKCoin) GetAccountRecords(symbol string, recType, currentPage, pageLength int) ([]OKCoinAccountRecords, error)
func (*OKCoin) GetBorrowInfo ¶
func (o *OKCoin) GetBorrowInfo(symbol string) (OKCoinBorrowInfo, error)
func (*OKCoin) GetBorrowOrderInfo ¶
func (o *OKCoin) GetBorrowOrderInfo(borrowID int64) (OKCoinBorrowInfo, error)
func (*OKCoin) GetExchangeAccountInfo ¶
GetExchangeAccountInfo retrieves balances for all enabled currencies for the OKCoin exchange
func (*OKCoin) GetFutureOrdersInfo ¶
func (*OKCoin) GetFuturesDepth ¶
func (*OKCoin) GetFuturesEstimatedPrice ¶
func (*OKCoin) GetFuturesExchangeRate ¶
func (*OKCoin) GetFuturesExplosive ¶
func (o *OKCoin) GetFuturesExplosive(symbol, contractType string, status, currentPage, pageLength int64) ([]OKCoinFuturesExplosive, error)
func (*OKCoin) GetFuturesHoldAmount ¶
func (o *OKCoin) GetFuturesHoldAmount(symbol, contractType string) ([]OKCoinFuturesHoldAmount, error)
func (*OKCoin) GetFuturesKline ¶
func (*OKCoin) GetFuturesOrderInfo ¶
func (*OKCoin) GetFuturesPosition ¶
func (*OKCoin) GetFuturesTicker ¶
func (o *OKCoin) GetFuturesTicker(symbol, contractType string) (OKCoinFuturesTicker, error)
func (*OKCoin) GetFuturesTrades ¶
func (o *OKCoin) GetFuturesTrades(symbol, contractType string) ([]OKCoinFuturesTrades, error)
func (*OKCoin) GetFuturesUserInfo ¶
func (o *OKCoin) GetFuturesUserInfo()
func (*OKCoin) GetFuturesUserInfo4Fix ¶
func (o *OKCoin) GetFuturesUserInfo4Fix()
func (*OKCoin) GetFuturesUserPosition4Fix ¶
func (*OKCoin) GetLendDepth ¶
func (o *OKCoin) GetLendDepth(symbol string) ([]OKCoinLendDepth, error)
func (*OKCoin) GetOrderBook ¶
func (*OKCoin) GetOrderFeeInfo ¶
func (o *OKCoin) GetOrderFeeInfo(symbol string, orderID int64) (OKCoinOrderFeeInfo, error)
func (*OKCoin) GetOrderHistory ¶
func (o *OKCoin) GetOrderHistory(pageLength, currentPage int64, status, symbol string) (OKCoinOrderHistory, error)
func (*OKCoin) GetOrderInfo ¶
func (o *OKCoin) GetOrderInfo(orderID int64, symbol string) ([]OKCoinOrderInfo, error)
func (*OKCoin) GetOrderInfoBatch ¶
func (o *OKCoin) GetOrderInfoBatch(orderID []int64, symbol string) ([]OKCoinOrderInfo, error)
func (*OKCoin) GetOrderbookEx ¶
func (o *OKCoin) GetOrderbookEx(currency pair.CurrencyPair, assetType string) (orderbook.Base, error)
GetOrderbookEx returns orderbook base on the currency pair
func (*OKCoin) GetTickerPrice ¶
GetTickerPrice returns the ticker for a currency pair
func (*OKCoin) GetTradeHistory ¶
func (o *OKCoin) GetTradeHistory(symbol string, TradeID int64) ([]OKCoinTrades, error)
func (*OKCoin) GetTrades ¶
func (o *OKCoin) GetTrades(symbol string, since int64) ([]OKCoinTrades, error)
func (*OKCoin) GetUnrepaymentsInfo ¶
func (o *OKCoin) GetUnrepaymentsInfo(symbol string, currentPage, pageLength int) ([]OKCoinBorrowOrder, error)
func (*OKCoin) GetUserInfo ¶
func (o *OKCoin) GetUserInfo() (OKCoinUserInfo, error)
func (*OKCoin) GetWithdrawalInfo ¶
func (o *OKCoin) GetWithdrawalInfo(symbol string, withdrawalID int64) ([]OKCoinWithdrawInfo, error)
func (*OKCoin) PingHandler ¶
func (*OKCoin) RemoveChannel ¶
func (*OKCoin) RemoveChannelAuthenticated ¶
func (*OKCoin) SendAuthenticatedHTTPRequest ¶
func (*OKCoin) SetDefaults ¶
func (o *OKCoin) SetDefaults()
func (*OKCoin) SetErrorDefaults ¶
func (o *OKCoin) SetErrorDefaults()
func (*OKCoin) SetWebsocketErrorDefaults ¶
func (o *OKCoin) SetWebsocketErrorDefaults()
func (*OKCoin) Setup ¶
func (o *OKCoin) Setup(exch config.ExchangeConfig)
func (*OKCoin) UpdateOrderbook ¶
func (o *OKCoin) UpdateOrderbook(currency pair.CurrencyPair, assetType string) (orderbook.Base, error)
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*OKCoin) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
func (*OKCoin) WebsocketClient ¶
func (o *OKCoin) WebsocketClient()
func (*OKCoin) WebsocketFuturesCancel ¶
func (*OKCoin) WebsocketFuturesOrderInfo ¶
func (*OKCoin) WebsocketFuturesTrade ¶
func (*OKCoin) WebsocketSpotCancel ¶
func (*OKCoin) WebsocketSpotOrderInfo ¶
func (*OKCoin) WebsocketSpotTrade ¶
type OKCoinAccountRecords ¶
type OKCoinAccountRecords struct { Records []OKCoinRecord `json:"records"` Symbol string `json:"symbol"` }
type OKCoinBatchTrade ¶
type OKCoinBorrowInfo ¶
type OKCoinBorrowInfo struct { BorrowBTC float64 `json:"borrow_btc"` BorrowLTC float64 `json:"borrow_ltc"` BorrowCNY float64 `json:"borrow_cny"` CanBorrow float64 `json:"can_borrow"` InterestBTC float64 `json:"interest_btc"` InterestLTC float64 `json:"interest_ltc"` Result bool `json:"result"` DailyInterestBTC float64 `json:"today_interest_btc"` DailyInterestLTC float64 `json:"today_interest_ltc"` DailyInterestCNY float64 `json:"today_interest_cny"` }
type OKCoinBorrowOrder ¶
type OKCoinBorrowResponse ¶
type OKCoinFuturesExplosive ¶
type OKCoinFuturesHoldAmount ¶
type OKCoinFuturesOrder ¶
type OKCoinFuturesOrder struct { Amount float64 `json:"amount"` ContractName string `json:"contract_name"` DateCreated float64 `json:"create_date"` TradeAmount float64 `json:"deal_amount"` Fee float64 `json:"fee"` LeverageRate float64 `json:"lever_rate"` OrderID int64 `json:"order_id"` Price float64 `json:"price"` AvgPrice float64 `json:"avg_price"` Status float64 `json:"status"` Symbol string `json:"symbol"` Type int64 `json:"type"` UnitAmount int64 `json:"unit_amount"` }
type OKCoinFuturesTicker ¶
type OKCoinFuturesTickerResponse ¶
type OKCoinFuturesTickerResponse struct { Date string Ticker OKCoinFuturesTicker }
type OKCoinFuturesTrades ¶
type OKCoinLendDepth ¶
type OKCoinOrderFeeInfo ¶
type OKCoinOrderHistory ¶
type OKCoinOrderHistory struct { CurrentPage int `json:"current_page"` Orders []OKCoinOrderInfo `json:"orders"` PageLength int `json:"page_length"` Result bool `json:"result"` Total int `json:"total"` }
type OKCoinOrderInfo ¶
type OKCoinOrderInfo struct { Amount float64 `json:"amount"` AvgPrice float64 `json:"avg_price"` Created int64 `json:"create_date"` DealAmount float64 `json:"deal_amount"` OrderID int64 `json:"order_id"` OrdersID int64 `json:"orders_id"` Price float64 `json:"price"` Status int `json:"status"` Symbol string `json:"symbol"` Type string `json:"type"` }
type OKCoinOrderbook ¶
type OKCoinRecord ¶
type OKCoinRecord struct { Address string `json:"addr"` Account int64 `json:"account,string"` Amount float64 `json:"amount"` Bank string `json:"bank"` BenificiaryAddress string `json:"benificiary_addr"` TransactionValue float64 `json:"transaction_value"` Fee float64 `json:"fee"` Date float64 `json:"date"` }
type OKCoinTicker ¶
type OKCoinTickerResponse ¶
type OKCoinTickerResponse struct { Date string Ticker OKCoinTicker }
type OKCoinTrades ¶
type OKCoinUserInfo ¶
type OKCoinUserInfo struct { Info struct { Funds struct { Asset struct { Net float64 `json:"net,string"` Total float64 `json:"total,string"` } `json:"asset"` Borrow struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` USD float64 `json:"usd,string"` CNY float64 `json:"cny,string"` } `json:"borrow"` Free struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` USD float64 `json:"usd,string"` CNY float64 `json:"cny,string"` } `json:"free"` Freezed struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` USD float64 `json:"usd,string"` CNY float64 `json:"cny,string"` } `json:"freezed"` UnionFund struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` } `json:"union_fund"` } `json:"funds"` } `json:"info"` Result bool `json:"result"` }
type OKCoinWebsocketEvent ¶
type OKCoinWebsocketFuturesContract ¶
type OKCoinWebsocketFuturesContract struct { Available float64 `json:"available"` Balance float64 `json:"balance"` Bond float64 `json:"bond"` ContractID float64 `json:"contract_id"` ContractType string `json:"contract_type"` Frozen float64 `json:"freeze"` Profit float64 `json:"profit"` Loss float64 `json:"unprofit"` }
type OKCoinWebsocketFuturesOrder ¶
type OKCoinWebsocketFuturesOrder struct { Amount float64 `json:"amount"` ContractName string `json:"contract_name"` DateCreated float64 `json:"createdDate"` TradeAmount float64 `json:"deal_amount"` Fee float64 `json:"fee"` LeverageAmount int `json:"lever_rate"` OrderID float64 `json:"order_id"` Price float64 `json:"price"` AvgPrice float64 `json:"avg_price"` Status int `json:"status"` Symbol string `json:"symbol"` TradeType int `json:"type"` UnitAmount float64 `json:"unit_amount"` }
type OKCoinWebsocketFuturesRealtrades ¶
type OKCoinWebsocketFuturesRealtrades struct { Amount float64 `json:"amount,string"` ContractID float64 `json:"contract_id,string"` ContractName string `json:"contract_name"` ContractType string `json:"contract_type"` TradeAmount float64 `json:"deal_amount,string"` Fee float64 `json:"fee,string"` OrderID float64 `json:"orderid"` Price float64 `json:"price,string"` AvgPrice float64 `json:"price_avg,string"` Status int `json:"status,string"` TradeType int `json:"type,string"` UnitAmount float64 `json:"unit_amount,string"` LeverageAmount int `json:"lever_rate,string"` }
type OKCoinWebsocketFuturesTicker ¶
type OKCoinWebsocketFuturesTicker struct { Buy float64 `json:"buy"` ContractID string `json:"contractId"` High float64 `json:"high"` HoldAmount float64 `json:"hold_amount"` Last float64 `json:"last,string"` Low float64 `json:"low"` Sell float64 `json:"sell"` UnitAmount float64 `json:"unitAmount"` Volume float64 `json:"vol,string"` }
type OKCoinWebsocketFuturesUserInfo ¶
type OKCoinWebsocketFuturesUserInfo struct { Info struct { BTC struct { Balance float64 `json:"balance"` Contracts []OKCoinWebsocketFuturesContract `json:"contracts"` Rights float64 `json:"rights"` } `json:"btc"` LTC struct { Balance float64 `json:"balance"` Contracts []OKCoinWebsocketFuturesContract `json:"contracts"` Rights float64 `json:"rights"` } `json:"ltc"` } `json:"info"` Result bool `json:"result"` }
type OKCoinWebsocketOrder ¶
type OKCoinWebsocketOrder struct { Amount float64 `json:"amount"` AvgPrice float64 `json:"avg_price"` DateCreated float64 `json:"create_date"` TradeAmount float64 `json:"deal_amount"` OrderID float64 `json:"order_id"` OrdersID float64 `json:"orders_id"` Price float64 `json:"price"` Status int64 `json:"status"` Symbol string `json:"symbol"` OrderType string `json:"type"` }
type OKCoinWebsocketRealtrades ¶
type OKCoinWebsocketRealtrades struct { AveragePrice float64 `json:"averagePrice,string"` CompletedTradeAmount float64 `json:"completedTradeAmount,string"` DateCreated float64 `json:"createdDate"` ID float64 `json:"id"` OrderID float64 `json:"orderId"` SigTradeAmount float64 `json:"sigTradeAmount,string"` SigTradePrice float64 `json:"sigTradePrice,string"` Status int64 `json:"status"` Symbol string `json:"symbol"` TradeAmount float64 `json:"tradeAmount,string"` TradePrice float64 `json:"buy,string"` TradeType string `json:"tradeType"` TradeUnitPrice float64 `json:"tradeUnitPrice,string"` UnTrade float64 `json:"unTrade,string"` }
type OKCoinWebsocketResponse ¶
type OKCoinWebsocketResponse struct { Channel string `json:"channel"` Data interface{} `json:"data"` }
type OKCoinWebsocketTicker ¶
type OKCoinWebsocketUserinfo ¶
type OKCoinWebsocketUserinfo struct { Info struct { Funds struct { Asset struct { Net float64 `json:"net,string"` Total float64 `json:"total,string"` } `json:"asset"` Free struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` USD float64 `json:"usd,string"` CNY float64 `json:"cny,string"` } `json:"free"` Frozen struct { BTC float64 `json:"btc,string"` LTC float64 `json:"ltc,string"` USD float64 `json:"usd,string"` CNY float64 `json:"cny,string"` } `json:"freezed"` } `json:"funds"` } `json:"info"` Result bool `json:"result"` }
type OKCoinWithdrawInfo ¶
Click to show internal directories.
Click to hide internal directories.