forked from nntaoli-project/goex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
API.go
23 lines (19 loc) · 988 Bytes
/
API.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package goex
// api interface
type API interface {
LimitBuy(amount, price string, currency CurrencyPair) (*Order, error)
LimitSell(amount, price string, currency CurrencyPair) (*Order, error)
MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)
MarketSell(amount, price string, currency CurrencyPair) (*Order, error)
CancelOrder(orderId string, currency CurrencyPair) (bool, error)
GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)
GetUnfinishOrders(currency CurrencyPair) ([]Order, error)
GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)
GetAccount() (*Account, error)
GetTicker(currency CurrencyPair) (*Ticker, error)
GetDepth(size int, currency CurrencyPair) (*Depth, error)
GetKlineRecords(currency CurrencyPair, period , size, since int) ([]Kline, error)
//非个人,整个交易所的交易记录
GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
GetExchangeName() string
}