Documentation ¶
Index ¶
- Variables
- type ActiveAssets
- type Apps
- type AssetsData
- type BalanceChanged
- type Balances
- type BuyBinary
- type BuyDigital
- type Database
- func (cc *Database) Close() error
- func (cc *Database) Del(bucket, key string) (err error)
- func (cc *Database) DeleteAllTransaction()
- func (cc *Database) DeleteTest(opt tasks.TestTasks) (err error)
- func (cc *Database) DeleteTransaction(ids int64)
- func (cc *Database) Get(bucket, key string, autocreateBucket bool) (value []byte, err error)
- func (cc *Database) GetAll(bucket string) (res interface{})
- func (cc *Database) GetAllTransaction(taskID interface{}, status []brokers.DealStatus, startTime int64, limit int) (data []brokers.Transactions)
- func (cc *Database) GetNLastTransaction(tasksID string, last int) []brokers.Transactions
- func (cc *Database) GetStatsTasks(taskID string) (ts tasks.StatsTask)
- func (cc *Database) GetTransaction(id int64) (data brokers.Transactions, err error)
- func (cc *Database) Init() (err error)
- func (cc *Database) InsertTest(opt tasks.TestTasks) (err error)
- func (cc *Database) InsertTransacation(id int64, data interface{}) (err error)
- func (cc *Database) Set(bucket, key string, value []byte, autocreateBucket bool) (err error)
- func (cc *Database) UpdateTest(opt tasks.TestTasks) (err error)
- type DigitalOpetionPlacedResponse
- type GetComission
- type GetHistory
- type GetHistoryResponse
- type LoginResponseError
- type LoginSuccess
- type MessageData
- type OptionResponse
- type OptionsClosed
- type OptionsOpened
- type OptionsRejected
- type PositionChanged
- type Profile
- type ProfileMsg
- type RobinAsset
- type SelectionType
- type SendLogin
- type SendMessage
- type SendSubPotitionChange
- type Signal
- type Stores
- type SubChannel
- type TimeSyncMessage
Constants ¶
This section is empty.
Variables ¶
Logger -
Functions ¶
This section is empty.
Types ¶
type ActiveAssets ¶
ActiveAssets -
type Apps ¶
type Apps struct { HTTPClient func() *core.HTTPClient Websocket func() *interfaces.WebsocketClient Option core.BrokerOption Control *control ControlTest *controlTest }
Apps -
func (*Apps) Run ¶
func (cc *Apps) Run(hc func() *core.HTTPClient, wsc func() *interfaces.WebsocketClient) bool
Run -
type AssetsData ¶
type AssetsData struct { Turbo iqoption.AssetsListDataDetails Binary iqoption.AssetsListDataDetails Digital iqoption.AssetsListDataDetails }
AssetsData -
type BalanceChanged ¶
type BalanceChanged struct { Name string `json:"name"` MicroserviceName string `json:"microserviceName"` Msg struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` CurrentBalance struct { ID int64 `json:"id"` Type int `json:"type"` Index int64 `json:"index"` Amount float64 `json:"amount"` IsFiat bool `json:"if_fiat"` Currency string `json:"currency"` NewAmount float64 `json:"new_amount"` IsMarginal bool `json:"is_marginal"` BonusAmount float64 `json:"bonus_amount"` EnrolledAmount float64 `json:"enrolled_amount"` BonusTotalAmount float64 `json:"bonus_total_amount"` } `json:"current_balance"` } `json:"msg"` }
BalanceChanged -
type Balances ¶
type Balances struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Type int `json:"type"` Amount float64 `json:"amount"` EnrolledAmount float64 `json:"enrolled_amount"` EnrolledSumAmount float64 `json:"enrolled_sum_amount"` HoldAmount float64 `json:"hold_amount"` OrdersAmount float64 `json:"orders_amount"` AuthAmount float64 `json:"auth_amount"` Equivalent float64 `json:"equivalent"` Currency string `json:"currency"` IsFiat bool `json:"is_fiat"` IsMarginal bool `json:"is_marginal"` HasDeposits bool `json:"has_deposits"` }
Balances -
type BuyBinary ¶
type BuyBinary struct { Name string `json:"name"` Version string `json:"version"` Body struct { ActiveID int `json:"active_id"` OptionTypeID int `json:"option_type_id"` UserBalanceID int64 `json:"user_balance_id"` Direction string `json:"direction"` Expired int64 `json:"expired"` Price float64 `json:"price"` ProfitPercent float64 `json:"profit_percent"` Value float64 `json:"value"` RefundValue float64 `json:"refund_value"` } `json:"body"` }
BuyBinary -
type BuyDigital ¶
type BuyDigital struct { Name string `json:"name"` Version string `json:"version"` Body struct { UserBalanceID int64 `json:"user_balance_id"` Amount string `json:"amount"` InstrumentID string `json:"instrument_id"` } `json:"body"` }
BuyDigital -
type Database ¶
type Database struct { DB *nutsdb.DB Stores Stores Logger *logging.Logger ID string DBLocation string // contains filtered or unexported fields }
Database -
func (*Database) DeleteAllTransaction ¶
func (cc *Database) DeleteAllTransaction()
DeleteAllTransaction -
func (*Database) DeleteTest ¶
DeleteTest -
func (*Database) DeleteTransaction ¶
DeleteTransaction -
func (*Database) Get ¶
Get -
func (*Database) GetAllTransaction ¶
func (cc *Database) GetAllTransaction(taskID interface{}, status []brokers.DealStatus, startTime int64, limit int) (data []brokers.Transactions)
GetAllTransaction -
func (*Database) GetNLastTransaction ¶
func (cc *Database) GetNLastTransaction(tasksID string, last int) []brokers.Transactions
GetNLastTransaction -
func (*Database) GetStatsTasks ¶
GetStatsTasks -
func (*Database) GetTransaction ¶
func (cc *Database) GetTransaction(id int64) (data brokers.Transactions, err error)
GetTransaction -
func (*Database) InsertTest ¶
InsertTest -
func (*Database) InsertTransacation ¶
InsertTransacation -
func (*Database) Set ¶
Set -
type DigitalOpetionPlacedResponse ¶
type DigitalOpetionPlacedResponse struct { Name string `json:"name"` RequestID string `json:"request_id"` Msg struct { Message string `json:"message"` ID int64 `json:"id"` } `json:"msg"` Status int `json:"status"` }
DigitalOpetionPlacedResponse -
type GetComission ¶
type GetComission struct { Name string `json:"name"` RequestID string `json:"request_id"` Msg struct { Name string `json:"name"` Version string `json:"version"` Body struct { InstrumentType string `json:"instrument_type"` UserGroupID int64 `json:"user_group_id"` } `json:"body"` } `json:"msg"` }
GetComission -
type GetHistory ¶
type GetHistory struct { Name string `json:"name"` Version string `json:"version"` MicroserviceName string `json:"microserviceName"` Body struct { UserBalanceID int64 `json:"user_balance_id"` InstrumentTypes []string `json:"instrument_types"` Limit int `json:"limit"` Offset int `json:"offset"` Start int64 `json:"start"` End int64 `json:"end"` } `json:"body"` }
GetHistory -
type GetHistoryResponse ¶
type GetHistoryResponse struct { Status int `json:"status"` Msg struct { Error string `json:"error"` Positions []struct { ID string `json:"id"` UserID int64 `json:"user_id"` UserBalanceID int64 `json:"user_balance_id"` ExternalID int64 `json:"external_id"` ActiveID int `json:"active_id"` Source string `json:"source"` InstrumentType string `json:"instrument_type"` Status string `json:"status"` OpenTime int64 `json:"open_time"` OpenQuote float64 `json:"open_quote"` Invest float64 `json:"invest"` InvestEnrolled float64 `json:"invest_enrolled"` CloseQuote float64 `json:"close_quote"` InstrumentID string `json:"instrument_id"` CloseReason string `json:"close_reason"` CloseTime int64 `json:"close_time"` CloseProfit float64 `json:"close_profit"` CloseProfitEnrolled float64 `json:"close_profit_enrolled"` RawEvent struct { ID int64 `json:"id"` ExpirationValue float64 `json:"expiration_value"` WinEnrolledAmount float64 `json:"win_enrolled_amount"` Result string `json:"result"` OpenTime int64 `json:"open_time"` OptionTypeID int `json:"option_type_id"` UserBalanceType int `json:"user_balance_type"` Index int `json:"index"` EnrolledAmount float64 `json:"enrolled_amount"` Direction string `json:"direction"` BalanceID int64 `json:"balance_id"` OpenTimeMillisecond int64 `json:"open_time_millisecond"` OptionType string `json:"option_type"` UserID int64 `json:"user_id"` Amount float64 `json:"amount"` BuyAmount float64 `json:"buy_amount"` Currency string `json:"currency"` ProfitAmount float64 `json:"profit_amount"` UserGroupID int `json:"user_group_id"` ExpirationTime int64 `json:"expiration_time"` Value float64 `json:"value"` OptionID int64 `json:"option_id"` ActiveID int `json:"active_id"` OrderIds []int64 `json:"order_ids"` } `json:"raw_event"` } `json:"positions"` } `json:"msg"` }
GetHistoryResponse -
type LoginResponseError ¶
LoginResponseError -
type LoginSuccess ¶
LoginSuccess -
type MessageData ¶
type MessageData struct { Name string `json:"name"` Status int `json:"status"` RequestID string `json:"request_id"` }
MessageData - get data type of message
type OptionResponse ¶
type OptionResponse struct { Name string `json:"name"` RequestID string `json:"request_id"` Status int `json:"status"` Msg struct { Message string `json:"message"` ID int64 `json:"id"` UserID int64 `json:"user_id"` RefundValue float64 `json:"refund_value"` Exp int64 `json:"exp"` Price float64 `json:"price"` Created int64 `json:"created"` CreatedMillisecond int64 `json:"created_millisecond"` TimeRate int64 `json:"time_rate"` Type string `json:"type"` Act int `json:"act"` Direction string `json:"direction"` Value float64 `json:"value"` ProfitIncome float64 `json:"profit_income"` } `json:"msg"` }
OptionResponse -
type OptionsClosed ¶
type OptionsClosed struct { Name string `json:"name"` MicroserviceName string `json:"microserviceName"` Msg struct { Index int64 `json:"index"` Value float64 `json:"value"` Active string `json:"active"` Amount float64 `json:"amount"` EnrolledAmount float64 `json:"enrolled_amount"` UserID int64 `json:"user_id"` Currency string `json:"currency"` ActiveID int `json:"active_id"` Direction string `json:"direction"` OpenTime int64 `json:"open_time"` OpenTimeMillisecond int64 `json:"open_time_millisecond"` OptionID int64 `json:"option_id"` BalanceID int64 `json:"balance_id"` CountryID int `json:"country_id"` OptionType string `json:"option_type"` PlatformID int `json:"platform_id"` OptionTypeID int `json:"option_type_id"` ProfitPercent float64 `json:"profit_percent"` BalanceTypeID int `json:"balance_type_id"` ExpirationTime int64 `json:"expiration_time"` Result string `json:"result"` ExpirationValue float64 `json:"expiration_value"` WinEnrolledAmount float64 `json:"win_enrolled_amount"` } `json:"msg"` }
OptionsClosed -
type OptionsOpened ¶
type OptionsOpened struct { Name string `json:"name"` MicroserviceName string `json:"microserviceName"` Msg struct { Index int64 `json:"index"` Value float64 `json:"value"` Active string `json:"active"` Amount float64 `json:"amount"` EnrolledAmount float64 `json:"enrolled_amount"` UserID int64 `json:"user_id"` Currency string `json:"currency"` ActiveID int `json:"active_id"` Direction string `json:"direction"` OpenTime int64 `json:"open_time"` OpenTimeMillisecond int64 `json:"open_time_millisecond"` OptionID int64 `json:"option_id"` BalanceID int64 `json:"balance_id"` CountryID int `json:"country_id"` OptionType string `json:"option_type"` PlatformID int `json:"platform_id"` OptionTypeID int `json:"option_type_id"` ProfitPercent float64 `json:"profit_percent"` BalanceTypeID int `json:"balance_type_id"` ExpirationTime int64 `json:"expiration_time"` } `json:"msg"` }
OptionsOpened -
type OptionsRejected ¶
type OptionsRejected struct { Name string `json:"name"` MicroserviceName string `json:"microserviceName"` Msg struct { Index int64 `json:"index"` Value float64 `json:"value"` Amount float64 `json:"amount"` UserID int64 `json:"user_id"` BalanceID int64 `json:"balance_id"` OptionID int64 `json:"option_id"` Reason string `json:"reason"` } `json:"msg"` }
OptionsRejected -
type PositionChanged ¶
type PositionChanged struct { Name string `json:"name"` MicroserviceName string `json:"microserviceName"` Msg struct { Version int64 `json:"version"` ID string `json:"id"` UserID int64 `json:"user_id"` UserBalance int64 `json:"user_balance_id"` PlatformID int `json:"platform_id"` ExternalID int64 `json:"external_id"` ActiveID int `json:"active_id"` InstrumentID string `json:"instrument_id"` Source string `json:"source"` InstrumentType string `json:"instrument_type"` Status string `json:"status"` OpenTime int64 `json:"open_time"` OpenQuote float64 `json:"open_quote"` Invest float64 `json:"invest"` InvestEnrolled float64 `json:"invest_enrolled"` SellProfit float64 `json:"sell_profit"` SellProfitEnrolled float64 `json:"sell_profit_enrolled"` ExpectedProfit float64 `json:"expected_profit"` ExpectedProfitEnrolled float64 `json:"expected_profit_enrolled"` CloseQuote float64 `json:"close_quote"` CloseTime int64 `json:"close_time"` CloseProfit float64 `json:"close_profit"` CloseProfitEnrolled float64 `json:"close_profit_enrolled"` CloseReason string `json:"close_reason"` RawEvent struct { ID int64 `json:"id"` InstrumentExpiration int64 `json:"instrument_expiration"` OpenUnderlyingPrice float64 `json:"open_underlying_price"` BuyAmount float64 `json:"buy_amount"` Status string `json:"status"` UserBalanceType int `json:"user_balance_type"` UserBalanceID int64 `json:"user_balance_id"` CloseAt int64 `json:"close_at"` OrderIds []int64 `json:"order_ids"` } `json:"raw_event"` } `json:"msg"` }
PositionChanged -
type Profile ¶
type Profile struct { Name string `json:"name"` Msg ProfileMsg `json:"msg"` RequestID string `json:"request_id"` }
Profile -
type ProfileMsg ¶
type ProfileMsg struct { ID int64 `json:"id"` GroupID int64 `json:"group_id"` Balance float64 `json:"balance"` BalanceID float64 `json:"balance_id"` BalanceType int `json:"balance_type"` Balances []Balances `json:"balances"` CountryID int `json:"country_id"` Currency string `json:"currency"` CurrencyChar string `json:"currency_char"` CurrencyID int `json:"currency_id"` Email string `json:"email"` Name string `json:"name"` }
ProfileMsg -
type SelectionType ¶
type SelectionType struct { AssetID int Method iqoptiontype.InstrumentType Profit float64 Expiration int64 TypeID iqoptiontype.ProviderInstrumentType Spot rates.Spot }
SelectionType -
type SendLogin ¶
type SendLogin struct { Name string `json:"name"` Msg string `json:"msg"` RequestID string `json:"request_id"` }
SendLogin -
type SendMessage ¶
type SendMessage struct { Name string `json:"name"` RequestID string `json:"request_id"` Msg interface{} `json:"msg"` }
SendMessage -
type SendSubPotitionChange ¶
type SendSubPotitionChange struct { Name string `json:"name"` RequestID string `json:"request_id"` Msg struct { Name string `json:"name"` Version string `json:"version"` Params struct { RoutingFilter struct { UserID int64 `json:"user_id"` UserBalanceID int64 `json:"user_balance_id"` InstrumentType string `json:"instrument_type"` } `json:"routingFilters"` } `json:"params"` } `json:"msg"` }
SendSubPotitionChange -
type Signal ¶
type Signal struct { Direction indicator.Signal Result brokers.DealResult Open time.Time Close time.Time OpenValue float64 CloseValue float64 }
Signal -
type Stores ¶
type Stores struct { Token string Transactions *syncTransactionsMap TasksTest *syncTasksTestsMap }
Stores -
type SubChannel ¶
SubChannel -