Documentation ¶
Index ¶
- Constants
- Variables
- type Atop
- func (at *Atop) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (at *Atop) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)
- func (at *Atop) GetAccount() (*Account, error)
- func (at *Atop) GetDepth(size int, currency CurrencyPair) (*Depth, error)
- func (at *Atop) GetExchangeName() string
- func (at *Atop) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]Kline, error)
- func (at *Atop) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (at *Atop) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)
- func (at *Atop) GetTicker(currency CurrencyPair) (*Ticker, error)
- func (at *Atop) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (at *Atop) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (at *Atop) LimitBuy(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (at *Atop) LimitSell(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (at *Atop) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (at *Atop) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (at *Atop) Withdraw(amount, memo string, currency Currency, fees, receiveAddr, safePwd string) (string, error)
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 (*Atop) CancelOrder ¶
func (*Atop) CancelWithdraw ¶
func (*Atop) GetExchangeName ¶
func (*Atop) GetKlineRecords ¶
func (at *Atop) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]Kline, error)
hao
func (*Atop) GetOneOrder ¶
hao?
func (*Atop) GetOrderHistorys ¶
func (*Atop) GetUnfinishOrders ¶
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) MarketSell ¶
hao
Click to show internal directories.
Click to hide internal directories.