Versions in this module Expand all Collapse all v1 v1.5.0 Jun 21, 2018 Changes in this version + const DefaultCapCurrency + const DefaultCronSpec10Hour + const DefaultCronSpec10Second + const DefaultCronSpec30Day + const DefaultCronSpec3Second + const DefaultCronSpec5Minute + const DefaultCronSpec5Second + const EventPostfixEnd + const EventPostfixReq + const EventPostfixRes + const Kafka_Topic_SocketIO_Notify_Circulr + const Kafka_Topic_SocketIO_Order_Transfer + const Kafka_Topic_SocketIO_Scan_Login + const OT_REDIS_PRE_KEY + const OT_STATUS_ACCEPT + const OT_STATUS_INIT + const OT_STATUS_REJECT + const P2P_50001 + const P2P_50002 + const P2P_50003 + const P2P_50004 + const P2P_50005 + const P2P_50006 + const P2P_50007 + const P2P_50008 + const PendingTxPreKey + const SL_REDIS_PRE_KEY + const SYS_10001 + const TS_REDIS_PRE_KEY + func GetPow(v uint8, r types.Bytes32, s types.Bytes32, powNonce uint64) *big.Int + func HandleInputOrder(input eventemitter.EventData) (orderHash string, err error) + func HandleOrder(input eventemitter.EventData) error + func Initialize(filterOptions *GatewayFiltersOptions, options *GateWayOptions, ...) + func StartMotanService(options motan.MotanServerOptions, accountManager accountmanager.AccountManager, ...) + func Uint64ToByteArray(src uint64) []byte + type AccountJson struct + Address string + DelegateAddress string + Tokens []Token + type AskBid struct + Buy [][]string + Sell [][]string + type BaseFilter struct + MaxPrice *big.Int + MaxSplitPercentage float64 + MaxValidSinceInterval int64 + MinLrcFee *big.Int + MinLrcHold int64 + MinSplitPercentage float64 + MinTokeSAmount map[string]*big.Int + MinTokenSUsdAmount float64 + type CancelOrderQuery struct + CutoffTime int64 + OrderHash string + Sign SignInfo + TokenB string + TokenS string + Type uint8 + type CommonTokenRequest struct + DelegateAddress string + Owner string + type CutoffFilter struct + type CutoffRequest struct + Address string + BlockNumber string + DelegateAddress string + type Depth struct + DelegateAddress string + Depth AskBid + Market string + type DepthElement struct + Amount *big.Rat + Price string + Size *big.Rat + type DepthQuery struct + DelegateAddress string + Market string + type EstimatedAllocatedAllowanceQuery struct + DelegateAddress string + Owner string + Token string + type EthForwarder struct + func (e *EthForwarder) Call(ethCall *types.CallArg, blockNumber string) (result string, err error) + func (e *EthForwarder) GetBalance(address, blockNumber string) (result string, err error) + func (e *EthForwarder) GetTransactionCount(address, blockNumber string) (result string, err error) + func (e *EthForwarder) SendRawTransaction(tx string) (result string, err error) + type FillQuery struct + DelegateAddress string + Market string + OrderHash string + OrderType string + Owner string + PageIndex int + PageSize int + RingHash string + Side string + type Filter interface + type GateWayOptions struct + IsBroadcast bool + MaxBroadcastTime int + type Gateway struct + type GatewayFiltersOptions struct + BaseFilter struct{ ... } + PowFilter struct{ ... } + type InvokeInfo struct + MethodName string + Query interface{} + type JsonrpcOptions struct + Port string + type JsonrpcService interface + Start func(port string) + Stop func() + type JsonrpcServiceImpl struct + func NewJsonrpcService(port string, walletService *WalletServiceImpl) *JsonrpcServiceImpl + func (*JsonrpcServiceImpl) Ping(val string, val2 int) (res string, err error) + func (j *JsonrpcServiceImpl) Start() + type LatestFill struct + Amount float64 + CreateTime int64 + LrcFee string + Price float64 + RingHash string + Side string + SplitB string + SplitS string + type LatestOrderQuery struct + Market string + OrderType string + Owner string + type LoginInfo struct + Owner string + UUID string + type MotanService struct + func (s *MotanService) GetBalanceAndAllowance(req *motan.AccountBalanceAndAllowanceReq) *motan.AccountBalanceAndAllowanceRes + func (s *MotanService) GetMinerOrders(req *motan.MinerOrdersReq) *motan.MinerOrdersRes + type NotifyCirculrBody struct + Body map[string]interface{} + Owner string + type OrderBook struct + Buy []OrderBookElement + DelegateAddress string + Market string + Sell []OrderBookElement + type OrderBookElement struct + Amount float64 + LrcFee float64 + OrderHash string + Price float64 + Size float64 + SplitB float64 + SplitS float64 + ValidUntil int64 + type OrderJsonResult struct + CancelledAmountB string + CancelledAmountS string + DealtAmountB string + DealtAmountS string + RawOrder RawOrderJsonResult + Status string + type OrderQuery struct + DelegateAddress string + Market string + OrderHash string + OrderType string + Owner string + PageIndex int + PageSize int + Side string + Status string + type OrderTransfer struct + Hash string + Origin string + Status string + Timestamp int64 + type OrderTransferQuery struct + Hash string + type P2PRingRequest struct + MakerOrderHash string + RawTx string + TakerOrderHash string + type PageResult struct + Data []interface{} + PageIndex int + PageSize int + Total int + type Portfolio struct + Amount string + Percentage string + Token string + type PowFilter struct + Difficulty *big.Int + type PriceQuote struct + Currency string + Tokens []TokenPrice + type PriceQuoteQuery struct + Currency string + type RawOrderJsonResult struct + AmountB string + AmountS string + AuthAddr string + AuthPrivateKey string + BuyNoMoreThanAmountB bool + CreateTime int64 + DelegateAddress string + Hash string + LrcFee string + MarginSplitPercentage string + Market string + OrderType string + Owner string + Protocol string + R string + S string + Side string + TokenB string + TokenS string + V string + ValidSince string + ValidUntil string + WalletAddress string + type RingMinedDetail struct + Fills []dao.FillEvent + RingInfo RingMinedInfo + type RingMinedInfo struct + BlockNumber int64 + DelegateAddress string + FeeRecipient string + ID int + IsRinghashReserved bool + Miner string + Protocol string + RingHash string + RingIndex string + Time int64 + TotalLrcFee string + TotalSplitFee map[string]*big.Int + TradeAmount int + TxHash string + type RingMinedQuery struct + DelegateAddress string + PageIndex int + PageSize int + ProtocolAddress string + RingIndex string + type Server struct + func NewServer(s socketio.Server) Server + func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type SignFilter struct + type SignInfo struct + Owner string + R string + S string + Timestamp string + V uint8 + type SignedLoginInfo struct + Sign SignInfo + UUID string + type SimpleKey struct + Key string + type SingleDelegateAddress struct + DelegateAddress string + type SingleMarket struct + Market string + type SingleOwner struct + Owner string + type SingleToken struct + Token string + type SocketClient struct + type SocketIOJsonResp struct + Code string + Data interface{} + Error string + type SocketIOService interface + Start func(port string) + Stop func() + type SocketIOServiceImpl struct + func NewSocketIOService(port string, walletService WalletServiceImpl, brokers []string) *SocketIOServiceImpl + func (so *SocketIOServiceImpl) EmitNowByEventType(bk string, v socketio.Conn, bv string) + func (so *SocketIOServiceImpl) Start() + type SocketMsgHandler struct + Data interface{} + Handler func(data interface{}) error + type SocketNode struct + type TempStore struct + Key string + Value string + type Ticket struct + Sign SignInfo + Ticket dao.TicketReceiver + type TicketQuery struct + Owner string + Sign SignInfo + type Token struct + Allowance string + Balance string + Token string + type TokenFilter struct + AllowTokens map[common.Address]bool + DeniedTokens map[common.Address]bool + type TokenPrice struct + Price float64 + Token string + type TransactionQuery struct + Owner string + PageIndex int + PageSize int + Status string + Symbol string + ThxHash string + TrxHashes []string + TxType string + type TrendQuery struct + Interval string + Market string + type TxNotify struct + From string + Gas string + GasPrice string + Hash string + Input string + Nonce string + R string + S string + To string + V string + Value string + type WalletServiceImpl struct + func NewWalletService(trendManager market.TrendManager, orderViewer viewer.OrderViewer, ...) *WalletServiceImpl + func (w *WalletServiceImpl) ApplyTicket(ticket Ticket) (result string, err error) + func (w *WalletServiceImpl) FlexCancelOrder(req CancelOrderQuery) (rst string, err error) + func (w *WalletServiceImpl) GetBalance(balanceQuery CommonTokenRequest) (res AccountJson, err error) + func (w *WalletServiceImpl) GetContracts() (contracts map[string][]string, err error) + func (w *WalletServiceImpl) GetCutoff(query CutoffRequest) (result int64, err error) + func (w *WalletServiceImpl) GetDepth(query DepthQuery) (res Depth, err error) + func (w *WalletServiceImpl) GetEstimateGasPrice() (result string, err error) + func (w *WalletServiceImpl) GetEstimatedAllocatedAllowance(query EstimatedAllocatedAllowanceQuery) (frozenAmount string, err error) + func (w *WalletServiceImpl) GetFills(query FillQuery) (dao.PageResult, error) + func (w *WalletServiceImpl) GetFrozenLRCFee(query SingleOwner) (frozenAmount string, err error) + func (w *WalletServiceImpl) GetGlobalMarketTicker(req SingleToken) (tickers map[string][]market.GlobalMarketTicker, err error) + func (w *WalletServiceImpl) GetGlobalTicker(req SingleToken) (ticker map[string]market.GlobalTicker, err error) + func (w *WalletServiceImpl) GetGlobalTrend(req SingleToken) (trend map[string][]market.GlobalTrend, err error) + func (w *WalletServiceImpl) GetLatestFills(query FillQuery) ([]LatestFill, error) + func (w *WalletServiceImpl) GetLatestMarketOrders(query LatestOrderQuery) (res []OrderJsonResult, err error) + func (w *WalletServiceImpl) GetLatestOrders(query LatestOrderQuery) (res []OrderJsonResult, err error) + func (w *WalletServiceImpl) GetLatestP2POrders(query LatestOrderQuery) (res []OrderJsonResult, err error) + func (w *WalletServiceImpl) GetLatestTransactions(query TransactionQuery) ([]txtyp.TransactionJsonResult, error) + func (w *WalletServiceImpl) GetLooprSupportedMarket() (markets []string, err error) + func (w *WalletServiceImpl) GetLooprSupportedTokens() (markets []types.Token, err error) + func (w *WalletServiceImpl) GetNonce(owner SingleOwner) (n int64, err error) + func (w *WalletServiceImpl) GetOldVersionWethBalance(owner SingleOwner) (res string, err error) + func (w *WalletServiceImpl) GetOrderByHash(query OrderQuery) (order OrderJsonResult, err error) + func (w *WalletServiceImpl) GetOrderTransfer(req OrderTransferQuery) (ot OrderTransfer, err error) + func (w *WalletServiceImpl) GetOrders(query *OrderQuery) (res PageResult, err error) + func (w *WalletServiceImpl) GetPendingRawTxByHash(query TransactionQuery) (result TxNotify, err error) + func (w *WalletServiceImpl) GetPendingTransactions(query SingleOwner) (result []txtyp.TransactionJsonResult, err error) + func (w *WalletServiceImpl) GetPortfolio(query SingleOwner) (res []Portfolio, err error) + func (w *WalletServiceImpl) GetPriceQuote(query PriceQuoteQuery) (result PriceQuote, err error) + func (w *WalletServiceImpl) GetRingMined(query RingMinedQuery) (res dao.PageResult, err error) + func (w *WalletServiceImpl) GetRingMinedDetail(query RingMinedQuery) (res RingMinedDetail, err error) + func (w *WalletServiceImpl) GetSupportedMarket() (markets []string, err error) + func (w *WalletServiceImpl) GetSupportedTokens() (markets []types.Token, err error) + func (w *WalletServiceImpl) GetTempStore(req SimpleKey) (ts string, err error) + func (w *WalletServiceImpl) GetTicker() (res []market.Ticker, err error) + func (w *WalletServiceImpl) GetTickers(mkt SingleMarket) (result map[string]market.Ticker, err error) + func (w *WalletServiceImpl) GetTransactions(query TransactionQuery) (PageResult, error) + func (w *WalletServiceImpl) GetTransactionsByHash(query TransactionQuery) (result []txtyp.TransactionJsonResult, err error) + func (w *WalletServiceImpl) GetTrend(query TrendQuery) (res []market.Trend, err error) + func (w *WalletServiceImpl) GetUnmergedOrderBook(query DepthQuery) (res OrderBook, err error) + func (w *WalletServiceImpl) NotifyCirculr(req NotifyCirculrBody) (owner string, err error) + func (w *WalletServiceImpl) NotifyScanLogin(req SignedLoginInfo) (rst string, err error) + func (w *WalletServiceImpl) NotifyTransactionSubmitted(txNotify TxNotify) (result string, err error) + func (w *WalletServiceImpl) QueryTicket(query TicketQuery) (ticket dao.TicketReceiver, err error) + func (w *WalletServiceImpl) SetOrderTransfer(req OrderTransfer) (hash string, err error) + func (w *WalletServiceImpl) SetTempStore(req TempStore) (hash string, err error) + func (w *WalletServiceImpl) SubmitOrder(order *types.OrderJsonRequest) (res string, err error) + func (w *WalletServiceImpl) SubmitRingForP2P(p2pRing P2PRingRequest) (res string, err error) + func (w *WalletServiceImpl) TestPing(input int) (resp []byte, err error) + func (w *WalletServiceImpl) TicketCount() (int, error) + func (w *WalletServiceImpl) UnlockWallet(owner SingleOwner) (result string, err error) + func (w *WalletServiceImpl) UpdateOrderTransfer(req OrderTransfer) (hash string, err error) + type WebsocketOptions struct + Port string + type WebsocketRequest map[string]string + type WebsocketService interface + Start func(port string) + Stop func() + type WebsocketServiceImpl struct + func NewWebsocketService(port string, trendManager market.TrendManager, ...) *WebsocketServiceImpl + func (ws *WebsocketServiceImpl) Start()