Documentation ¶
Index ¶
- Constants
- func DefaultIfNil(ori, dft string) string
- func NewDexCli() *cli.App
- type Admin
- func (a *Admin) ApproveMarket(marketID string) (ret []byte, err error)
- func (a *Admin) CancelOrder(ID string) (ret []byte, err error)
- func (a *Admin) ListAccountBalances(address, limit, offset string) (ret []byte, err error)
- func (a *Admin) ListAccountOrders(marketID, address, limit, offset, status string) (ret []byte, err error)
- func (a *Admin) ListAccountTrades(marketID, address, limit, offset, status string) (ret []byte, err error)
- func (a *Admin) ListMarkets() (ret []byte, err error)
- func (a *Admin) NewMarket(...) (ret []byte, err error)
- func (a *Admin) PublishMarket(marketID string) (ret []byte, err error)
- func (a *Admin) RestartEngine() (ret []byte, err error)
- func (a *Admin) Status() (ret []byte, err error)
- func (a *Admin) UnPublishMarket(marketID string) (ret []byte, err error)
- func (a *Admin) UpdateMarket(...) (ret []byte, err error)
- func (a *Admin) UpdateMarketFee(marketID, makerFee, takerFee string) (ret []byte, err error)
- type IAdminApi
Constants ¶
View Source
const ( DefaultMinOrderSize = "0.01" DefaultPricePrecision = 5 DefaultPriceDecimals = 5 DefaultAmountDecimals = 5 DefaultMakerFeeRate = "0.01" DefaultTakerFeeRate = "0.03" DefaultGasUsedEstimation = 190000 DefaultLimit = "10" DefaultOffset = "10" DefaultStatus = "pending" DefaultAdminAPIURL = "http://localhost:3003" )
Variables ¶
This section is empty.
Functions ¶
func DefaultIfNil ¶
Types ¶
type Admin ¶
type Admin struct { AdminApiUrl string MarketUrl string CancelOrderUrl string ListOrderUrl string ListBalanceUrl string ListTradeUrl string RestartEngineUrl string StatusUrl string // contains filtered or unexported fields }
func (*Admin) ApproveMarket ¶
func (*Admin) ListAccountBalances ¶
func (*Admin) ListAccountOrders ¶
func (*Admin) ListAccountTrades ¶
func (*Admin) ListMarkets ¶
func (*Admin) PublishMarket ¶
func (*Admin) RestartEngine ¶
func (*Admin) UnPublishMarket ¶
func (*Admin) UpdateMarket ¶
type IAdminApi ¶
type IAdminApi interface { Status() ([]byte, error) NewMarket(marketID, baseTokenAddress, quoteTokenAddress, minOrderSize, pricePrecision, priceDecimals, amountDecimals, makerFeeRate, takerFeeRate, gasUsedEstimation string) ([]byte, error) ListMarkets() ([]byte, error) UpdateMarket(marketID, minOrderSize, pricePrecision, priceDecimals, amountDecimals, makerFeeRate, takerFeeRate, gasUsedEstimation, isPublish string) ([]byte, error) PublishMarket(marketID string) ([]byte, error) ApproveMarket(marketID string) (ret []byte, err error) UnPublishMarket(marketID string) ([]byte, error) UpdateMarketFee(marketID, makerFee, takerFee string) ([]byte, error) ListAccountOrders(marketID, address, limit, offset, status string) ([]byte, error) ListAccountBalances(address, limit, offset string) ([]byte, error) ListAccountTrades(marketID, address, limit, offset, status string) ([]byte, error) CancelOrder(ID string) ([]byte, error) RestartEngine() ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.