Documentation ¶
Index ¶
- Constants
- Variables
- func NewCandlestickPeriod(period int) time.Time
- type Candlestick
- type Chart
- type ChartData
- type ChartIndicator
- type ChartStrategy
- type ChartTradingStrategy
- type Coin
- type Context
- type CryptoExchangeSummary
- type Ctx
- func (c *Ctx) Close()
- func (c *Ctx) GetAppRoot() string
- func (c *Ctx) GetCoreDB() *gorm.DB
- func (c *Ctx) GetDebug() bool
- func (c *Ctx) GetEthereumMode() string
- func (c *Ctx) GetIPC() string
- func (c *Ctx) GetKeystore() string
- func (c *Ctx) GetLogger() *logging.Logger
- func (c *Ctx) GetPriceDB() *gorm.DB
- func (c *Ctx) GetSSL() bool
- func (c *Ctx) GetUser() UserContext
- func (c *Ctx) SetUser(user UserContext)
- type Currency
- func (c *Currency) GetBaseUnit() int32
- func (c *Currency) GetDecimalPlace() int32
- func (c *Currency) GetID() string
- func (c *Currency) GetName() string
- func (c *Currency) GetSymbol() string
- func (c *Currency) GetTransactionFee() decimal.Decimal
- func (c *Currency) IsCrypto() bool
- func (c *Currency) IsFiat() bool
- func (c *Currency) String() string
- type CurrencyPair
- type DatabaseImpl
- func (database *DatabaseImpl) Close(db *gorm.DB)
- func (database *DatabaseImpl) ConnectCoreDB() *gorm.DB
- func (database *DatabaseImpl) ConnectPriceDB() *gorm.DB
- func (database *DatabaseImpl) DropCoreDB()
- func (database *DatabaseImpl) DropPriceDB()
- func (database *DatabaseImpl) MigrateCoreDB()
- func (database *DatabaseImpl) MigratePriceDB()
- type DatabaseManager
- type EthereumContract
- type EthereumToken
- type Exchange
- type FiatPriceService
- type FinancialIndicator
- type GlobalMarketCap
- type HttpWriter
- type JsonResponse
- type JsonWriter
- type KeyPair
- type MarketCap
- type MarketCapService
- type PeriodListener
- type Plugin
- type Portfolio
- type PriceChange
- type PriceListener
- type Profit
- type RateLimiter
- type RsaKeyPair
- type Token
- type TokenCaller
- func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error)
- func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error)
- func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error)
- func (_Token *TokenCaller) SpentAllowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error)
- type TokenCallerRaw
- type TokenCallerSession
- func (_Token *TokenCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error)
- func (_Token *TokenCallerSession) Decimals() (uint8, error)
- func (_Token *TokenCallerSession) Name() (string, error)
- func (_Token *TokenCallerSession) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenCallerSession) Symbol() (string, error)
- type TokenRaw
- func (_Token *TokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type TokenSession
- func (_Token *TokenSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenSession) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)
- func (_Token *TokenSession) BalanceOf(arg0 common.Address) (*big.Int, error)
- func (_Token *TokenSession) Decimals() (uint8, error)
- func (_Token *TokenSession) Name() (string, error)
- func (_Token *TokenSession) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
- func (_Token *TokenSession) Symbol() (string, error)
- func (_Token *TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)
- func (_Token *TokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)
- type TokenTransactor
- func (_Token *TokenTransactor) ApproveAndCall(opts *bind.TransactOpts, _spender common.Address, _value *big.Int, ...) (*types.Transaction, error)
- func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)
- func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, ...) (*types.Transaction, error)
- type TokenTransactorRaw
- type TokenTransactorSession
- func (_Token *TokenTransactorSession) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)
- func (_Token *TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)
- func (_Token *TokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)
- type Trade
- type TradingStrategy
- type TradingStrategyParams
- type Transaction
- type UserContext
- type UserCryptoExchange
- type UserCryptoWallet
- type Wallet
- type WalletParams
Constants ¶
const ( APPNAME = "tradebot" APPVERSION = "0.0.1" TIME_FORMAT = time.RFC3339 TIME_DISPLAY_FORMAT = "01-02-2006 15:04:05 MST" BUFFERED_CHANNEL_SIZE = 256 WEBSOCKET_KEEPALIVE = 10 * time.Second HTTP_CLIENT_TIMEOUT = 10 * time.Second CANDLESTICK_MIN_LOAD = 250 INDICATOR_PLUGIN_TYPE = "indicator" STRATEGY_PLUGIN_TYPE = "strategy" EXCHANGE_PLUGIN_TYPE = "exchange" WALLET_PLUGIN_TYPE = "wallet" BUY_ORDER_TYPE = "buy" SELL_ORDER_TYPE = "sell" DEPOSIT_ORDER_TYPE = "deposit" WITHDRAWAL_ORDER_TYPE = "withdrawal" TX_CATEGORY_DEPOSIT = "deposit" TX_CATEGORY_WITHDRAWAL = "withdrawal" TX_CATEGORY_TRADE = "trade" TX_CATEGORY_INCOME = "income" TX_CATEGORY_GIFT = "gift" TX_CATEGORY_MINING = "mining" TX_CATEGORY_SPEND = "spend" TX_CATEGORY_DONATION = "donation" TX_CATEGORY_LOST = "lost" TX_CATEGORY_TRANSFER = "transfer" )
const TokenABI = `` /* 1770-byte string literal not displayed */
TokenABI is the input ABI used to generate the binding from.
Variables ¶
var CryptoCurrencies = map[string]string{}/* 2344 elements not displayed */
var FiatCurrencies = map[string]*Currency{ "USD": &Currency{ ID: "USD", Name: "United States dollar", Symbol: "$", BaseUnit: 100, DecimalPlace: 2}, "CAD": &Currency{ ID: "CAD", Name: "Canadian dollar", Symbol: "$", BaseUnit: 100, DecimalPlace: 2}, "EUR": &Currency{ ID: "EUR", Name: "Euro", Symbol: "€", BaseUnit: 100, DecimalPlace: 2}, "JPY": &Currency{ ID: "JPY", Name: "Japanese yen", Symbol: "¥", BaseUnit: 100, DecimalPlace: 2}, "GBP": &Currency{ ID: "GBP", Symbol: "£", BaseUnit: 100, DecimalPlace: 2}, "CHF": &Currency{ ID: "CHF", Name: "Swiss franc", Symbol: "Fr", BaseUnit: 100, DecimalPlace: 2}, "KRW": &Currency{ ID: "KRW", Name: "South Korean won", Symbol: "₩", BaseUnit: 100, DecimalPlace: 2}}
Functions ¶
func NewCandlestickPeriod ¶
Types ¶
type Candlestick ¶
type Candlestick struct { Exchange string `json:"exchange"` CurrencyPair *CurrencyPair `json:"currency_pair"` Period int `json:"period"` Date time.Time `json:"date"` Open decimal.Decimal `json:"open"` Close decimal.Decimal `json:"close"` High decimal.Decimal `json:"high"` Low decimal.Decimal `json:"low"` Volume decimal.Decimal `json:"volume"` }
func CreateCandlestick ¶
func CreateCandlestick(exchangeName string, currencyPair *CurrencyPair, period int, prices []decimal.Decimal) *Candlestick
func (*Candlestick) String ¶
func (candle *Candlestick) String() string
type ChartIndicator ¶
type ChartStrategy ¶
type ChartTradingStrategy ¶
type CryptoExchangeSummary ¶
type Ctx ¶
type Ctx struct { AppRoot string Logger *logging.Logger CoreDB *gorm.DB PriceDB *gorm.DB User UserContext Debug bool SSL bool IPC string Keystore string EthereumMode string Context }
func (*Ctx) GetAppRoot ¶
func (*Ctx) GetEthereumMode ¶
func (*Ctx) GetKeystore ¶
func (*Ctx) GetPriceDB ¶
func (*Ctx) GetUser ¶
func (c *Ctx) GetUser() UserContext
func (*Ctx) SetUser ¶
func (c *Ctx) SetUser(user UserContext)
type Currency ¶
type Currency struct { ID string `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` BaseUnit int32 `json:"base_unit"` DecimalPlace int32 `json:"decimal_place"` TxFee decimal.Decimal `json:"tx_fee"` }
func (*Currency) GetBaseUnit ¶
func (*Currency) GetDecimalPlace ¶
func (*Currency) GetTransactionFee ¶
type CurrencyPair ¶
type CurrencyPair struct { Base string `json:"base"` Quote string `json:"quote"` LocalCurrency string `json:"local_currency"` }
func NewCurrencyPair ¶
func NewCurrencyPair(currencyPair, localCurrency string) (*CurrencyPair, error)
func (*CurrencyPair) Equals ¶
func (cp *CurrencyPair) Equals(currencyPair *CurrencyPair) bool
func (*CurrencyPair) String ¶
func (cp *CurrencyPair) String() string
type DatabaseImpl ¶
type DatabaseImpl struct { DatabaseManager // contains filtered or unexported fields }
func (*DatabaseImpl) Close ¶
func (database *DatabaseImpl) Close(db *gorm.DB)
func (*DatabaseImpl) ConnectCoreDB ¶
func (database *DatabaseImpl) ConnectCoreDB() *gorm.DB
func (*DatabaseImpl) ConnectPriceDB ¶
func (database *DatabaseImpl) ConnectPriceDB() *gorm.DB
func (*DatabaseImpl) DropCoreDB ¶
func (database *DatabaseImpl) DropCoreDB()
func (*DatabaseImpl) DropPriceDB ¶
func (database *DatabaseImpl) DropPriceDB()
func (*DatabaseImpl) MigrateCoreDB ¶
func (database *DatabaseImpl) MigrateCoreDB()
func (*DatabaseImpl) MigratePriceDB ¶
func (database *DatabaseImpl) MigratePriceDB()
type DatabaseManager ¶
type DatabaseManager interface { ConnectCoreDB() *gorm.DB MigrateCoreDB() DropCoreDB() ConnectPriceDB() *gorm.DB MigratePriceDB() DropPriceDB() Close(*gorm.DB) }
func CreateDatabase ¶
func CreateDatabase(directory, prefix string, debugMode bool) DatabaseManager
func NewDatabase ¶
func NewDatabase() DatabaseManager
type EthereumContract ¶
type EthereumToken ¶
type Exchange ¶
type Exchange interface { GetName() string GetDisplayName() string GetBalances() ([]Coin, decimal.Decimal) GetSummary() CryptoExchangeSummary GetNetWorth() decimal.Decimal GetTradingFee() decimal.Decimal //GetCurrencies() []string SubscribeToLiveFeed(currencyPair *CurrencyPair, price chan PriceChange) GetPrice(currencyPair *CurrencyPair) decimal.Decimal GetPriceHistory(currencyPair *CurrencyPair, start, end time.Time, granularity int) ([]Candlestick, error) GetOrderHistory(currencyPair *CurrencyPair) []Transaction GetDepositHistory() ([]Transaction, error) GetWithdrawalHistory() ([]Transaction, error) GetCurrencies() (map[string]*Currency, error) FormattedCurrencyPair(currencyPair *CurrencyPair) string ParseImport(file string) ([]Transaction, error) }
type FiatPriceService ¶
type FiatPriceService interface {
GetPriceAt(currency string, date time.Time) (*Candlestick, error)
}
type FinancialIndicator ¶
type FinancialIndicator interface { GetDefaultParameters() []string GetParameters() []string GetDisplayName() string GetName() string PeriodListener }
type GlobalMarketCap ¶
type GlobalMarketCap struct { TotalMarketCapUSD float64 `json:"total_market_cap_usd"` Total24HVolumeUSD float64 `json:"total_24h_volume_usd"` BitcoinDominance float64 `json:"bitcoin_percentage_of_market_cap"` ActiveCurrencies float64 `json:"active_currencies"` ActiveMarkets float64 `json:"active_markets"` LastUpdated int64 `json:"last_updated"` }
type HttpWriter ¶
type HttpWriter interface {
Write(w http.ResponseWriter, status int, response interface{})
}
type JsonResponse ¶
type JsonWriter ¶
type JsonWriter struct {
HttpWriter
}
func NewJsonWriter ¶
func NewJsonWriter() *JsonWriter
func (*JsonWriter) Write ¶
func (writer *JsonWriter) Write(w http.ResponseWriter, status int, response interface{})
type KeyPair ¶
type KeyPair interface { GetDirectory() string GetPrivateKey() *rsa.PrivateKey GetPrivateBytes() []byte GetPublicKey() *rsa.PublicKey GetPublicBytes() []byte }
func NewRsaKeyPair ¶
type MarketCap ¶
type MarketCap struct { Id string `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` Rank string `json:"rank"` PriceUSD string `json:"price_usd"` PriceBTC string `json:"price_btc"` VolumeUSD24h string `json:"24h_volume_usd"` MarketCapUSD string `json:"market_cap_usd"` AvailableSupply string `json:"available_supply"` TotalSupply string `json:"total_supply"` MaxSupply string `json:"max_supply"` PercentChange1h string `json:"percent_change_1h"` PercentChange24h string `json:"percent_change_24h"` PercentChange7d string `json:"percent_change_7d"` LastUpdated string `json:"last_updated"` }
type MarketCapService ¶
type MarketCapService interface { GetMarkets() []MarketCap GetMarket(symbol string) MarketCap GetGlobalMarket(currency string) *GlobalMarketCap GetMarketsByPrice(order string) []MarketCap GetMarketsByPercentChange1H(order string) []MarketCap GetMarketsByPercentChange24H(order string) []MarketCap GetMarketsByPercentChange7D(order string) []MarketCap GetMarketsByTopPerformers(order string) []MarketCap GetTrendingMarkets(order string) []MarketCap }
type PeriodListener ¶
type PeriodListener interface {
OnPeriodChange(candlestick *Candlestick)
}
type Portfolio ¶
type Portfolio interface { GetUser() UserContext GetNetWorth() decimal.Decimal GetExchanges() []CryptoExchangeSummary GetWallets() []UserCryptoWallet GetTokens() []EthereumToken }
type PriceChange ¶
type PriceListener ¶
type PriceListener interface {
OnPriceChange(priceChange *PriceChange)
}
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(maxRequests int, perSecond int) *RateLimiter
func (*RateLimiter) RespectRateLimit ¶
func (rateLimiter *RateLimiter) RespectRateLimit()
func (*RateLimiter) String ¶
func (rateLimiter *RateLimiter) String() string
type RsaKeyPair ¶
type RsaKeyPair struct { Directory string PrivateKey *rsa.PrivateKey PrivateBytes []byte PublicKey *rsa.PublicKey PublicBytes []byte KeyPair }
func (*RsaKeyPair) GetDirectory ¶
func (keypair *RsaKeyPair) GetDirectory() string
func (*RsaKeyPair) GetPrivateBytes ¶
func (keypair *RsaKeyPair) GetPrivateBytes() []byte
func (*RsaKeyPair) GetPrivateKey ¶
func (keypair *RsaKeyPair) GetPrivateKey() *rsa.PrivateKey
func (*RsaKeyPair) GetPublicBytes ¶
func (keypair *RsaKeyPair) GetPublicBytes() []byte
func (*RsaKeyPair) GetPublicKey ¶
func (keypair *RsaKeyPair) GetPublicKey() *rsa.PublicKey
type Token ¶
type Token struct { TokenCaller // Read-only binding to the contract TokenTransactor // Write-only binding to the contract }
Token is an auto generated Go binding around an Ethereum contract.
type TokenCaller ¶
type TokenCaller struct {
// contains filtered or unexported fields
}
TokenCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewTokenCaller ¶
func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error)
NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.
func (*TokenCaller) Allowance ¶
func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
Solidity: function allowance( address, address) constant returns(uint256)
func (*TokenCaller) BalanceOf ¶
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf( address) constant returns(uint256)
func (*TokenCaller) Decimals ¶
func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*TokenCaller) Name ¶
func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error)
Name is a free data retrieval call binding the contract method 0x06fdde03.
Solidity: function name() constant returns(string)
func (*TokenCaller) SpentAllowance ¶
func (_Token *TokenCaller) SpentAllowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)
SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.
Solidity: function spentAllowance( address, address) constant returns(uint256)
type TokenCallerRaw ¶
type TokenCallerRaw struct {
Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
}
TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*TokenCallerRaw) Call ¶
func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type TokenCallerSession ¶
type TokenCallerSession struct { Contract *TokenCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*TokenCallerSession) Allowance ¶
func (_Token *TokenCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
Solidity: function allowance( address, address) constant returns(uint256)
func (*TokenCallerSession) BalanceOf ¶
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf( address) constant returns(uint256)
func (*TokenCallerSession) Decimals ¶
func (_Token *TokenCallerSession) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*TokenCallerSession) Name ¶
func (_Token *TokenCallerSession) Name() (string, error)
Name is a free data retrieval call binding the contract method 0x06fdde03.
Solidity: function name() constant returns(string)
func (*TokenCallerSession) SpentAllowance ¶
func (_Token *TokenCallerSession) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.
Solidity: function spentAllowance( address, address) constant returns(uint256)
func (*TokenCallerSession) Symbol ¶
func (_Token *TokenCallerSession) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() constant returns(string)
type TokenRaw ¶
type TokenRaw struct {
Contract *Token // Generic contract binding to access the raw methods on
}
TokenRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*TokenRaw) Call ¶
func (_Token *TokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*TokenRaw) Transact ¶
func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TokenRaw) Transfer ¶
func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type TokenSession ¶
type TokenSession struct { Contract *Token // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
TokenSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*TokenSession) Allowance ¶
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
Solidity: function allowance( address, address) constant returns(uint256)
func (*TokenSession) ApproveAndCall ¶
func (_Token *TokenSession) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)
ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.
Solidity: function approveAndCall(_spender address, _value uint256, _extraData bytes) returns(success bool)
func (*TokenSession) BalanceOf ¶
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf( address) constant returns(uint256)
func (*TokenSession) Decimals ¶
func (_Token *TokenSession) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*TokenSession) Name ¶
func (_Token *TokenSession) Name() (string, error)
Name is a free data retrieval call binding the contract method 0x06fdde03.
Solidity: function name() constant returns(string)
func (*TokenSession) SpentAllowance ¶
func (_Token *TokenSession) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)
SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.
Solidity: function spentAllowance( address, address) constant returns(uint256)
func (*TokenSession) Symbol ¶
func (_Token *TokenSession) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() constant returns(string)
func (*TokenSession) Transfer ¶
func (_Token *TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)
Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
Solidity: function transfer(_to address, _value uint256) returns()
func (*TokenSession) TransferFrom ¶
func (_Token *TokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)
TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)
type TokenTransactor ¶
type TokenTransactor struct {
// contains filtered or unexported fields
}
TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewTokenTransactor ¶
func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error)
NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.
func (*TokenTransactor) ApproveAndCall ¶
func (_Token *TokenTransactor) ApproveAndCall(opts *bind.TransactOpts, _spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)
ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.
Solidity: function approveAndCall(_spender address, _value uint256, _extraData bytes) returns(success bool)
func (*TokenTransactor) Transfer ¶
func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)
Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
Solidity: function transfer(_to address, _value uint256) returns()
func (*TokenTransactor) TransferFrom ¶
func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)
TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)
type TokenTransactorRaw ¶
type TokenTransactorRaw struct {
Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
}
TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*TokenTransactorRaw) Transact ¶
func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TokenTransactorRaw) Transfer ¶
func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type TokenTransactorSession ¶
type TokenTransactorSession struct { Contract *TokenTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*TokenTransactorSession) ApproveAndCall ¶
func (_Token *TokenTransactorSession) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)
ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.
Solidity: function approveAndCall(_spender address, _value uint256, _extraData bytes) returns(success bool)
func (*TokenTransactorSession) Transfer ¶
func (_Token *TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)
Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
Solidity: function transfer(_to address, _value uint256) returns()
func (*TokenTransactorSession) TransferFrom ¶
func (_Token *TokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)
TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)
type TradingStrategy ¶
type TradingStrategyParams ¶
type TradingStrategyParams struct { CurrencyPair *CurrencyPair Balances []Coin Indicators map[string]FinancialIndicator NewPrice decimal.Decimal LastTrade Trade TradeFee decimal.Decimal Config []string }
type Transaction ¶
type Transaction interface { GetId() string GetDate() time.Time GetMarketPair() *CurrencyPair GetCurrencyPair() *CurrencyPair GetType() string GetCategory() string GetNetwork() string GetNetworkDisplayName() string GetQuantity() string GetQuantityCurrency() string GetFiatQuantity() string GetFiatQuantityCurrency() string GetPrice() string GetPriceCurrency() string GetFiatPrice() string GetFiatPriceCurrency() string GetQuoteFiatPrice() string GetQuoteFiatPriceCurrency() string GetFee() string GetFeeCurrency() string GetTotal() string GetTotalCurrency() string GetFiatFee() string GetFiatFeeCurrency() string GetFiatTotal() string GetFiatTotalCurrency() string IsDeleted() bool String() string }
type UserContext ¶
type UserCryptoExchange ¶
type UserCryptoWallet ¶
type Wallet ¶
type Wallet interface { GetPrice() decimal.Decimal GetWallet() (UserCryptoWallet, error) GetTransactions() ([]Transaction, error) }
type WalletParams ¶
type WalletParams struct { Context Context Address string WalletUser string WalletSecret string WalletExtra string MarketCapService MarketCapService FiatPriceService FiatPriceService }