configuration

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExchangesMinDepositConfig = map[string]common.ExchangesMinDeposit{
	"binance": map[string]float64{
		"ETH": 0,
	},
	"bittrex": map[string]float64{
		"ETH": 0.05,
	},
	"huobi": map[string]float64{
		"ETH": 0.01,
	},
	"stable_exchange": map[string]float64{
		"ETH": 0,
	},
}

ExchangesMinDepositConfig store preconfig min exchange deposit for each exchange

View Source
var FeeConfigs = map[string]common.ExchangeFees{
	"binance": {
		Trading: common.TradingFee{
			"taker": 0.001,
			"maker": 0.001,
		},
		Funding: common.FundingFee{
			Withdraw: map[string]float64{
				"ETH": 0.01,
			},
			Deposit: map[string]float64{
				"ETH": 0,
			},
		},
	},
	"bittrex": {
		Trading: common.TradingFee{
			"taker": 0.0025,
			"maker": 0.0025,
		},
		Funding: common.FundingFee{
			Withdraw: map[string]float64{
				"ETH": 0.006,
			},
			Deposit: map[string]float64{
				"ETH": 0,
			},
		},
	},
	"huobi": {
		Trading: common.TradingFee{
			"taker": 0.002,
			"maker": 0.002,
		},
		Funding: common.FundingFee{
			Withdraw: map[string]float64{
				"ETH": 0.01,
			},
			Deposit: map[string]float64{
				"ETH": 0.01,
			},
		},
	},
	"stable_exchange": {
		Trading: common.TradingFee{
			"taker": 0,
			"maker": 0,
		},
		Funding: common.FundingFee{
			Withdraw: map[string]float64{
				"ETH": 0,
			},
			Deposit: map[string]float64{
				"ETH": 0,
			},
		},
	},
}

FeeConfigs store predefined fee configs of exchanges

Functions

func GetSetting

func GetSetting(ac ccfg.AppConfig, addressSetting *settings.AddressSetting) (*settings.Settings, error)

Types

type AppState added in v0.1.2

type AppState struct {
	ActivityStorage      core.ActivityStorage
	DataStorage          data.Storage
	DataGlobalStorage    data.GlobalStorage
	FetcherStorage       fetcher.Storage
	FetcherGlobalStorage fetcher.GlobalStorage
	MetricStorage        metric.Storage
	Archive              archive.Archive

	World                *world.TheWorld
	FetcherRunner        fetcher.Runner
	DataControllerRunner datapruner.StorageControllerRunner
	FetcherExchanges     []fetcher.Exchange
	Exchanges            []common.Exchange
	BlockchainSigner     blockchain.Signer
	DepositSigner        blockchain.Signer

	EnableAuthentication bool
	AuthEngine           http.Authentication

	EthereumEndpoint        string
	BackupEthereumEndpoints []string
	Blockchain              *blockchain.BaseBlockchain

	Setting        *settings.Settings
	AddressSetting *settings.AddressSetting
	AppConfig      config.AppConfig
}

func InitAppState added in v0.1.2

func InitAppState(authEnbl bool, ac ccfg.AppConfig) *AppState

func (*AppState) AddCoreConfig added in v0.1.2

func (c *AppState) AddCoreConfig(appc config.AppConfig)

type ExchangePool

type ExchangePool struct {
	Exchanges map[common.ExchangeID]interface{}
}

func NewExchangePool

func NewExchangePool(
	ac config.AppConfig,
	blockchain *bbc.BaseBlockchain, setting *settings.Settings) (*ExchangePool, error)

func (*ExchangePool) CoreExchanges

func (ep *ExchangePool) CoreExchanges() ([]common.Exchange, error)

func (*ExchangePool) FetcherExchanges

func (ep *ExchangePool) FetcherExchanges() ([]fetcher.Exchange, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL