Documentation ¶
Index ¶
- Constants
- Variables
- type Exchange
- func (exchange *Exchange) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (exchange *Exchange) CancelWithdraw(id string, currency Currency, safePwd string) (bool, error)
- func (exchange *Exchange) GetAccount() (*Account, error)
- func (exchange *Exchange) GetAssets(currency CurrencyPair) (*Assets, error)
- func (exchange *Exchange) GetDepth(size int, currency CurrencyPair) (*Depth, error)
- func (exchange *Exchange) GetExchangeName() string
- func (exchange *Exchange) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]Kline, error)
- func (exchange *Exchange) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)
- func (exchange *Exchange) GetTicker(currency CurrencyPair) (*Ticker, error)
- func (exchange *Exchange) GetTradeHistory(currency CurrencyPair, optional ...OptionalParameter) ([]Trade, error)
- func (exchange *Exchange) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (exchange *Exchange) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (exchange *Exchange) LimitBuy(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (exchange *Exchange) LimitSell(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (at *Exchange) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) 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 Exchange ¶ added in v1.3.9
type Exchange struct {
// contains filtered or unexported fields
}
func (*Exchange) CancelOrder ¶ added in v1.3.9
func (*Exchange) CancelWithdraw ¶ added in v1.3.9
func (*Exchange) GetAccount ¶ added in v1.3.9
hao
func (*Exchange) GetExchangeName ¶ added in v1.3.9
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
hao?
func (*Exchange) GetOrderHistorys ¶ added in v1.3.9
func (*Exchange) GetTradeHistory ¶ added in v1.3.9
func (*Exchange) GetTrades ¶ added in v1.3.9
hao Non-individual, transaction record of the entire exchange
func (*Exchange) GetUnfinishOrders ¶ added in v1.3.9
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) MarketSell ¶ added in v1.3.9
func (exchange *Exchange) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
hao
Click to show internal directories.
Click to hide internal directories.