Documentation ¶
Index ¶
- Constants
- func FillsParam(instrumentID string, orderID string, before string, after string, limit string) url.Values
- func NewSpotSymbol(base, quote string) exchange.SpotSymbol
- func ParseTime(timestamp string) (time.Time, error)
- func SubscribeCB(channel string, cb ResponseParseCB)
- type Client
- type CodeC
- type Ledger
- type LedgerType
- type Pcb
- type ResponseParseCB
- type RestClient
- type SpotSymbol
- type WSClient
- func (ws *WSClient) Auth(ctx context.Context) error
- func (ws *WSClient) Handle(ctx context.Context, notify *rpc.Notify)
- func (ws *WSClient) Run(ctx context.Context) error
- func (ws *WSClient) Subscribe(ctx context.Context, channels ...exchange.Channel) error
- func (ws *WSClient) UnSubscribe(ctx context.Context, channels ...exchange.Channel) error
Constants ¶
View Source
const ( OkexWSAddr = "wss://real.okex.com:8443/ws/v3" OkexTESTWSAddr = "wss://real.okex.com:8443/ws/v3?brokerId=9999" OKEX = "okex" )
Variables ¶
This section is empty.
Functions ¶
func FillsParam ¶ added in v0.3.0
func NewSpotSymbol ¶
func NewSpotSymbol(base, quote string) exchange.SpotSymbol
func SubscribeCB ¶
func SubscribeCB(channel string, cb ResponseParseCB)
Types ¶
type CodeC ¶
type CodeC struct {
LastSUBID string //okex op fail do not return operate type. we have to record
}
type Ledger ¶ added in v0.3.0
type Ledger struct { LedgerID string `json:"ledger_id"` Amount decimal.Decimal `json:"amount"` Type LedgerType `json:"type"` Fee decimal.Decimal `json:"fee"` Timestamp string `json:"timestamp"` InstrumentID string `json:"instrument_id"` Currency string `json:"currency"` Details interface{} `json:"details"` OrderID string `json:"order_id"` From string `json:"from"` To string `json:"to"` Balance decimal.Decimal `json:"balance"` }
Leder response for margin, swap
func FetchLedgers ¶ added in v0.3.0
type LedgerType ¶ added in v0.3.0
type LedgerType string
func (LedgerType) Parse ¶ added in v0.3.0
func (typ LedgerType) Parse() exchange.FinanceType
type ResponseParseCB ¶
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRestClient ¶
func NewRestClient(key, secret, passPhrase string) *RestClient
func NewTESTRestClient ¶
func NewTESTRestClient(key, secret, passPhrase string) *RestClient
func (*RestClient) Property ¶ added in v0.3.0
func (rc *RestClient) Property() exchange.Property
type SpotSymbol ¶
type SpotSymbol struct {
*exchange.BaseSpotSymbol
}
func (*SpotSymbol) String ¶
func (ss *SpotSymbol) String() string
type WSClient ¶
type WSClient struct { *exchange.WSClient Key string Secret string PassPhrase string // contains filtered or unexported fields }
func NewTESTWSClient ¶
NewTESTWSClient return a wsclient for okex testnet
func NewWSClient ¶
func (*WSClient) Run ¶
Run start the websocket loop and create a goroutine which will send ping message to okex server periodically
Click to show internal directories.
Click to hide internal directories.