atop

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//test  https://testapi.a.top
	//product   https://api.a.top
	ApiBaseUrl = "https://testapi.a.top"

	//Trading market configuration
	GetMarketConfig = "/data/api/v1/getMarketConfig"

	//K line data
	GetKLine = "/data/api/v1/getKLine"

	//Aggregate market
	GetTicker = "/data/api/v1/getTicker?market=%s"

	//The latest Ticker for all markets
	GetTickers = "/data/api/v1/getTickers"

	//Market depth data
	GetDepth = "/data/api/v1/getDepth?market=%s"

	//Recent market record
	GetTrades = "/data/api/v1/getTrades"

	//Get server time (no signature required)
	GetServerTime = "/trade/api/v1/getServerTime"

	//Get atcount balance
	GetBalance = "/trade/api/v1/getBalance"

	//Plate the order
	PlateOrder = "/trade/api/v1/order"

	//Commissioned by batch
	BatchOrder = "/trade/api/v1/batchOrder"

	//cancellations
	CancelOrder = "/trade/api/v1/cancel"

	//From a single batch
	BatchCancel = "/trade/api/v1/batchCancel"

	//The order information
	GetOrder = "/trade/api/v1/getOrder"

	//Gets an outstanding order
	GetOpenOrders = "/trade/api/v1/getOpenOrders"

	//Get orders history
	GetHistorys = "/trade/api/v1/getHistorys"

	//Gets multiple order information
	GetBatchOrders = "/trade/api/v1/getBatchOrders"

	//Gets the recharge address
	GetPayInAddress = "/trade/api/v1/getPayInAddress"

	//Get the withdrawal address
	GetPayOutAddress = "/trade/api/v1/getPayOutAddress"

	//Gets the recharge record
	GetPayInRecord = "/trade/api/v1/getPayInRecord"

	//Get the withdrawal record
	GetPayOutRecord = "/trade/api/v1/getPayOutRecord"

	//Withdrawal configuration
	GetWithdrawConfig = "/trade/api/v1/getWithdrawConfig"

	//withdraw
	Withdrawal = "/trade/api/v1/withdraw"
)

Variables

View Source
var KlinePeriodConverter = map[KlinePeriod]string{
	KLINE_PERIOD_1MIN:   "1min",
	KLINE_PERIOD_3MIN:   "3min",
	KLINE_PERIOD_5MIN:   "5min",
	KLINE_PERIOD_15MIN:  "15min",
	KLINE_PERIOD_30MIN:  "30min",
	KLINE_PERIOD_60MIN:  "1hour",
	KLINE_PERIOD_1H:     "1hour",
	KLINE_PERIOD_2H:     "2hour",
	KLINE_PERIOD_4H:     "4hour",
	KLINE_PERIOD_6H:     "6hour",
	KLINE_PERIOD_8H:     "8hour",
	KLINE_PERIOD_12H:    "12hour",
	KLINE_PERIOD_1DAY:   "1day",
	KLINE_PERIOD_3DAY:   "3day",
	KLINE_PERIOD_1WEEK:  "7day",
	KLINE_PERIOD_1MONTH: "30day",
}

Functions

This section is empty.

Types

type Exchange added in v1.3.9

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

func New

func New(client *http.Client, apiKey, secretKey string) *Exchange

func (*Exchange) CancelOrder added in v1.3.9

func (exchange *Exchange) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)

func (*Exchange) CancelWithdraw added in v1.3.9

func (exchange *Exchange) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)

func (*Exchange) GetAccount added in v1.3.9

func (exchange *Exchange) GetAccount() (*Account, error)

hao

func (*Exchange) GetAssets added in v1.3.9

func (exchange *Exchange) GetAssets(currency CurrencyPair) (*Assets, error)

func (*Exchange) GetDepth added in v1.3.9

func (exchange *Exchange) GetDepth(size int, currency CurrencyPair) (*Depth, error)

hao

func (*Exchange) GetExchangeName added in v1.3.9

func (exchange *Exchange) GetExchangeName() string

func (*Exchange) GetKlineRecords added in v1.3.9

func (exchange *Exchange) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]Kline, error)

hao

func (*Exchange) GetOneOrder added in v1.3.9

func (exchange *Exchange) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)

hao?

func (*Exchange) GetOrderHistorys added in v1.3.9

func (exchange *Exchange) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)

func (*Exchange) GetTicker added in v1.3.9

func (exchange *Exchange) GetTicker(currency CurrencyPair) (*Ticker, error)

hao

func (*Exchange) GetTradeHistory added in v1.3.9

func (exchange *Exchange) GetTradeHistory(currency CurrencyPair, optional ...OptionalParameter) ([]Trade, error)

func (*Exchange) GetTrades added in v1.3.9

func (exchange *Exchange) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

hao Non-individual, transaction record of the entire exchange

func (*Exchange) GetUnfinishOrders added in v1.3.9

func (exchange *Exchange) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)

hao

func (*Exchange) LimitBuy added in v1.3.9

func (exchange *Exchange) LimitBuy(amount, price string, currencyPair CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

hao

func (*Exchange) LimitSell added in v1.3.9

func (exchange *Exchange) LimitSell(amount, price string, currencyPair CurrencyPair, opt ...LimitOrderOptionalParameter) (*Order, error)

hao

func (*Exchange) MarketBuy added in v1.3.9

func (at *Exchange) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)

hao

func (*Exchange) MarketSell added in v1.3.9

func (exchange *Exchange) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)

hao

func (*Exchange) Withdraw added in v1.3.9

func (exchange *Exchange) Withdraw(amount, memo string, currency Currency, fees, receiveAddr, safePwd string) (string, error)

hao

Jump to

Keyboard shortcuts

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