exx

package
v1.5.19 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXX          = "EXX"
	API_BASE_URL = "https://api.exx.com/"
	MARKET_URL   = "http://api.exx.com/data/v1/"
	TICKER_API   = "ticker?currency=%s"
	DEPTH_API    = "depth?currency=%s"

	TRADE_URL                 = "https://trade.exx.com/api/"
	GET_ACCOUNT_API           = "getBalance"
	GET_ORDER_API             = "getOrder"
	GET_UNFINISHED_ORDERS_API = "getUnfinishedOrdersIgnoreTradeType"
	CANCEL_ORDER_API          = "cancelOrder"
	PLACE_ORDER_API           = "order"
	WITHDRAW_API              = "withdraw"
	CANCELWITHDRAW_API        = "cancelWithdraw"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exx

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

func New

func New(httpClient *http.Client, accessKey, secretKey string) *Exx

func (*Exx) CancelOrder

func (exx *Exx) CancelOrder(orderId string, currency CurrencyPair) (bool, error)

func (*Exx) CancelWithdraw

func (exx *Exx) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)

func (*Exx) GetAccount

func (exx *Exx) GetAccount() (*Account, error)

func (*Exx) GetDepth

func (exx *Exx) GetDepth(size int, currency CurrencyPair) (*Depth, error)

func (*Exx) GetExchangeName

func (exx *Exx) GetExchangeName() string

func (*Exx) GetKlineRecords

func (exx *Exx) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)

func (*Exx) GetOneOrder

func (exx *Exx) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)

func (*Exx) GetOrderHistorys

func (exx *Exx) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)

func (*Exx) GetTicker

func (exx *Exx) GetTicker(currency CurrencyPair) (*Ticker, error)

func (*Exx) GetTrades

func (exx *Exx) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

func (*Exx) GetUnfinishOrders

func (exx *Exx) GetUnfinishOrders(currency CurrencyPair) ([]Order, error)

func (*Exx) LimitBuy

func (exx *Exx) LimitBuy(amount, price string, currency CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

func (*Exx) LimitSell

func (exx *Exx) LimitSell(amount, price string, currency CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

func (*Exx) MarketBuy

func (exx *Exx) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*Exx) MarketSell

func (exx *Exx) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)

func (*Exx) Withdraw

func (exx *Exx) Withdraw(amount string, currency Currency, fees, receiveAddr, safePwd string) (string, error)

Jump to

Keyboard shortcuts

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