{"modulePath":"github.com/askgo/QuantBot","version":"v0.0.0-20181103064614-d060b71a9acb","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Types\n\n```go\ntype BigOne struct {\n\t// contains filtered or unexported fields\n}\n```\nBigOne the exchange struct of big.one\n\n```go\nfunc (e *BigOne) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *BigOne) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *BigOne) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *BigOne) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *BigOne) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *BigOne) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *BigOne) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *BigOne) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *BigOne) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *BigOne) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *BigOne) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *BigOne) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *BigOne) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *BigOne) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype Binance struct {\n\t// contains filtered or unexported fields\n}\n```\nBinance the exchange struct of binance.com\n\n```go\nfunc (e *Binance) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *Binance) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *Binance) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *Binance) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *Binance) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *Binance) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *Binance) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *Binance) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *Binance) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *Binance) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *Binance) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *Binance) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *Binance) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *Binance) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype Exchange interface {\n\tLog(...interface{})                                                                                   //向管理台发送这个交易所的打印信息\n\tGetType() string                                                                                      //获取交易所类型,是火币还是OKEY等。。。\n\tGetName() string                                                                                      //获取交易所名称,自定义的\n\tSetLimit(times interface{}) float64                                                                   //设置交易所的API访问频率,和 E.AutoSleep() 配合使用\n\tAutoSleep()                                                                                           //自动休眠以满足设置的交易所的API访问频率\n\tGetMinAmount(stock string) float64                                                                    //获取交易所的最小交易数量\n\tGetAccount() interface{}                                                                              //获取交易所的账户资金信息\n\tTrade(tradeType string, stockType string, price, amount interface{}, msgs ...interface{}) interface{} //如果 Price \u003c= 0 自动设置为市价单，数量参数也有所不同,如果成功返回订单的 ID,如果失败返回 false\n\tGetOrder(stockType, id string) interface{}                                                            //返回订单信息\n\tGetOrders(stockType string) interface{}                                                               //返回所有的未完成订单列表\n\tGetTrades(stockType string) interface{}                                                               //返回最近的已完成订单列表\n\tCancelOrder(order Order) bool                                                                         //取消一笔订单\n\tGetTicker(stockType string, sizes ...interface{}) interface{}                                         //获取交易所的最新市场行情数据\n\tGetRecords(stockType, period string, sizes ...interface{}) interface{}                                //返回交易所的最新K线数据列表\n}\n```\nExchange interface\n\n```go\nfunc NewBigOne(opt Option) Exchange\n```\nNewBigOne create an exchange struct of big.one\n\n```go\nfunc NewBinance(opt Option) Exchange\n```\nNewBinance create an exchange struct of Binance.com\n\n```go\nfunc NewGateIo(opt Option) Exchange\n```\nNewGateIo create an exchange struct of gateio.io\n\n```go\nfunc NewHuobi(opt Option) Exchange\n```\nNewHuobi create an exchange struct of huobi.com\n\n```go\nfunc NewOKEX(opt Option) Exchange\n```\nNewOKEX create an exchange struct of okex.com\n\n```go\nfunc NewOkexFuture(opt Option) Exchange\n```\nNewOkexFuture create an exchange struct of okex.com\n\n```go\nfunc NewPoloniex(opt Option) Exchange\n```\nNewPoloniex create an exchange struct of poloniex\n\n```go\nfunc NewZb(opt Option) Exchange\n```\nNewZb create an exchange struct of zb.com\n\n```go\ntype GateIo struct {\n\t// contains filtered or unexported fields\n}\n```\nGateIo the exchange struct of gateio.io\n\n```go\nfunc (e *GateIo) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *GateIo) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *GateIo) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *GateIo) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *GateIo) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *GateIo) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *GateIo) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *GateIo) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *GateIo) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *GateIo) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *GateIo) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *GateIo) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *GateIo) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *GateIo) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype Huobi struct {\n\t// contains filtered or unexported fields\n}\n```\nHuobi the exchange struct of huobi.com\n\n```go\nfunc (e *Huobi) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *Huobi) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *Huobi) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *Huobi) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *Huobi) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *Huobi) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *Huobi) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *Huobi) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *Huobi) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *Huobi) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *Huobi) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *Huobi) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *Huobi) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *Huobi) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype OKEX struct {\n\t// contains filtered or unexported fields\n}\n```\nOKEX the exchange struct of okex.com\n\n```go\nfunc (e *OKEX) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *OKEX) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *OKEX) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *OKEX) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *OKEX) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *OKEX) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *OKEX) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *OKEX) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *OKEX) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *OKEX) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *OKEX) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *OKEX) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *OKEX) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *OKEX) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype OkexFuture struct {\n\t// contains filtered or unexported fields\n}\n```\nOkexFuture the exchange struct of okex.com future\n\n```go\nfunc (e *OkexFuture) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *OkexFuture) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *OkexFuture) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *OkexFuture) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *OkexFuture) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *OkexFuture) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *OkexFuture) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *OkexFuture) GetPositions(stockType string) interface{}\n```\nGetPositions get the positions detail of this exchange\n\n```go\nfunc (e *OkexFuture) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *OkexFuture) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *OkexFuture) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *OkexFuture) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *OkexFuture) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *OkexFuture) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *OkexFuture) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype Option struct {\n\tTraderID  int64\n\tType      string\n\tName      string\n\tAccessKey string\n\tSecretKey string\n}\n```\nOption is an exchange option\n\n```go\ntype Order struct {\n\tID         string  //订单ID\n\tPrice      float64 //价格\n\tAmount     float64 //总量\n\tDealAmount float64 //成交量\n\tFee        float64 //这个订单的交易费\n\tTradeType  string  //交易类型\n\tStockType  string  //货币类型\n}\n```\nOrder struct\n\n```go\ntype OrderBook struct {\n\tPrice  float64 //价格\n\tAmount float64 //市场深度量\n}\n```\nOrderBook struct\n\n```go\ntype Poloniex struct {\n\t// contains filtered or unexported fields\n}\n```\nPoloniex the exchange struct of poloniex\n\n```go\nfunc (e *Poloniex) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *Poloniex) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *Poloniex) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *Poloniex) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *Poloniex) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *Poloniex) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *Poloniex) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *Poloniex) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *Poloniex) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *Poloniex) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *Poloniex) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *Poloniex) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *Poloniex) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *Poloniex) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n```go\ntype Position struct {\n\tPrice         float64 //价格\n\tLeverage      int     //杠杆比例\n\tAmount        float64 //总合约数量\n\tConfirmAmount float64\n\tFrozenAmount  float64 //冻结的合约数量\n\tProfit        float64 //收益\n\tContractType  string  //合约类型\n\tTradeType     string  //交易类型\n\tStockType     string  //货币类型\n}\n```\nPosition struct\n\n```go\ntype Record struct {\n\tTime   int64   //unix时间戳\n\tOpen   float64 //开盘价\n\tHigh   float64 //最高价\n\tLow    float64 //最低价\n\tClose  float64 //收盘价\n\tVolume float64 //交易量\n}\n```\nRecord struct\n\n```go\ntype Ticker struct {\n\tBids []OrderBook //买单市场深度列表\n\tBuy  float64     //买一价, Bids[0].Price\n\tMid  float64     //(Buy + Sell) / 2\n\tSell float64     //卖一价, Asks[0].Price\n\tAsks []OrderBook //卖单市场深度列表\n}\n```\nTicker struct\n\n```go\ntype Zb struct {\n\t// contains filtered or unexported fields\n}\n```\nZb the exchange struct of zb.com\n\n```go\nfunc (e *Zb) AutoSleep()\n```\nAutoSleep auto sleep to achieve the limit calls amount per second of this exchange\n\n```go\nfunc (e *Zb) CancelOrder(order Order) bool\n```\nCancelOrder cancel an order\n\n```go\nfunc (e *Zb) GetAccount() interface{}\n```\nGetAccount get the account detail of this exchange\n\n```go\nfunc (e *Zb) GetMinAmount(stock string) float64\n```\nGetMinAmount get the min trade amonut of this exchange\n\n```go\nfunc (e *Zb) GetName() string\n```\nGetName get the name of this exchange\n\n```go\nfunc (e *Zb) GetOrder(stockType, id string) interface{}\n```\nGetOrder get details of an order\n\n```go\nfunc (e *Zb) GetOrders(stockType string) interface{}\n```\nGetOrders get all unfilled orders\n\n```go\nfunc (e *Zb) GetRecords(stockType, period string, sizes ...interface{}) interface{}\n```\nGetRecords get candlestick data\n\n```go\nfunc (e *Zb) GetTicker(stockType string, sizes ...interface{}) interface{}\n```\nGetTicker get market ticker \u0026 depth\n\n```go\nfunc (e *Zb) GetTrades(stockType string) interface{}\n```\nGetTrades get all filled orders recently\n\n```go\nfunc (e *Zb) GetType() string\n```\nGetType get the type of this exchange\n\n```go\nfunc (e *Zb) Log(msgs ...interface{})\n```\nLog print something to console\n\n```go\nfunc (e *Zb) SetLimit(times interface{}) float64\n```\nSetLimit set the limit calls amount per second of this exchange\n\n```go\nfunc (e *Zb) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}\n```\nTrade place an order\n\n","path":"github.com/askgo/QuantBot/api","name":"api","synopsis":"","isRedistributable":true}
