forked from nntaoli-project/goex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPI.go
21 lines (17 loc) · 898 Bytes
/
API.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package coinapi
// 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 string, size , since int) ([]Kline , error);
GetExchangeName() string;
}