atop

package
v0.0.0-...-02bd842 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

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 Atop

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

func New

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

func (*Atop) CancelOrder

func (at *Atop) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)

func (*Atop) CancelWithdraw

func (at *Atop) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)

func (*Atop) GetAccount

func (at *Atop) GetAccount() (*Account, error)

hao

func (*Atop) GetDepth

func (at *Atop) GetDepth(size int, currency CurrencyPair) (*Depth, error)

hao

func (*Atop) GetExchangeName

func (at *Atop) GetExchangeName() string

func (*Atop) GetKlineRecords

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

hao

func (*Atop) GetOneOrder

func (at *Atop) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)

hao?

func (*Atop) GetOrderHistorys

func (at *Atop) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)

func (*Atop) GetTicker

func (at *Atop) GetTicker(currency CurrencyPair) (*Ticker, error)

hao

func (*Atop) GetTrades

func (at *Atop) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

hao Non-individual, transaction record of the entire exchange

func (*Atop) GetUnfinishOrders

func (at *Atop) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)

hao

func (*Atop) LimitBuy

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

hao

func (*Atop) LimitSell

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

hao

func (*Atop) MarketBuy

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

hao

func (*Atop) MarketSell

func (at *Atop) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)

hao

func (*Atop) Withdraw

func (at *Atop) 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