okex

package
v1.16.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Index

Constants

View Source
const OKB = "OKB"

OKB is the platform currency of OKEx, pre-allocate static string here

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange struct {
	// contains filtered or unexported fields
}

func New

func New(key, secret, passphrase string) *Exchange

func (*Exchange) CancelOrders

func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) error

func (*Exchange) Name

func (e *Exchange) Name() types.ExchangeName

func (*Exchange) NewStream

func (e *Exchange) NewStream() types.Stream

func (*Exchange) PlatformFeeCurrency

func (e *Exchange) PlatformFeeCurrency() string

func (*Exchange) QueryAccount

func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error)

func (*Exchange) QueryAccountBalances

func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error)

func (*Exchange) QueryKLines

func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval types.Interval, options types.KLineQueryOptions) ([]types.KLine, error)

func (*Exchange) QueryMarkets

func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error)

func (*Exchange) QueryOpenOrders

func (e *Exchange) QueryOpenOrders(ctx context.Context, symbol string) (orders []types.Order, err error)

func (*Exchange) QueryTicker

func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error)

func (*Exchange) QueryTickers

func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[string]types.Ticker, error)

func (*Exchange) SubmitOrders

func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (createdOrders types.OrderSlice, err error)

type Stream

type Stream struct {
	types.StandardStream

	Client    *okexapi.RestClient
	ListenKey string
	Conn      *websocket.Conn
	// contains filtered or unexported fields
}

func NewStream

func NewStream(client *okexapi.RestClient) *Stream

func (*Stream) Close

func (s *Stream) Close() error

func (*Stream) Connect

func (s *Stream) Connect(ctx context.Context) error

func (*Stream) EmitKline

func (s *Stream) EmitKline()

func (*Stream) OnKline

func (s *Stream) OnKline(cb func())

func (*Stream) SetPublicOnly

func (s *Stream) SetPublicOnly()

type StreamEventHub

type StreamEventHub interface {
	OnKline(cb func())
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL