Documentation ¶
Overview ¶
Specific use for iqoption source
Index ¶
- Variables
- type BetCloseTime
- type CandleGeneratedMessage
- type CandleMessage
- type CandleMessageData
- type ErrorMessage
- type ExpirationListChange
- type GetActiveSchedule
- type GetActiveScheduleBody
- type GetComissions
- type GetComissionsBody
- type GetExpirationList
- type GetExpirationListBody
- type GetHistoryOptions
- type GetInitData
- type GetSpotList
- type GetSpotListBody
- type GetUnderlyingListMsg
- type GetUnderlyingListResponse
- type InitDataAsset
- type InitDataResponse
- type LoginResponseError
- type LoginSuccess
- type MessageData
- type ProfileResponse
- type ProfileResponseBalance
- type RoutingFilters
- type SendCandles
- type SendCandlesMsg
- type SendCandlesMsgBody
- type SendLogin
- type SendMessage
- type SubIntrumentQuoetsGeneratedMsg
- type SubIntrumentQuoetsGeneratedMsgParams
- type SubIntrumentQuoetsGeneratedResponse
- type SubIntrumentQuoetsGeneratedResponseQuotes
- type SubscribeCandles
- type SubscribeCandlesMsg
- type SubscribeCandlesMsgParams
- type SubscribeCandlesMsgRouting
- type SubscribeMessage
- type TimeSyncMessage
Constants ¶
This section is empty.
Variables ¶
var MaxCandleDuration = map[int]int{
1: 180,
5: 360,
10: 530,
15: 700,
30: 900,
60: 900,
120: 980,
300: 1050,
600: 1150,
900: 1500,
1800: 1800,
3600: 2700,
7200: 2700,
14400: 2700,
28800: 2700,
43200: 2700,
86400: 2700,
604800: 2700,
2592000: 2700,
}
MaxCandleDuration - candle / days
Functions ¶
This section is empty.
Types ¶
type CandleGeneratedMessage ¶
type CandleGeneratedMessage struct { Name string `json:"name"` Msg CandleMessageData `json:"msg"` }
CandleGeneratedMessage -
type CandleMessage ¶
type CandleMessage struct { Name string `json:"name"` Msg struct { Candle []CandleMessageData `json:"candles"` } `json:"msg"` RequestID string `json:"request_id"` }
CandleMessage -
type CandleMessageData ¶
type CandleMessageData struct { ID int64 `json:"id"` From int64 `json:"from"` To int64 `json:"to"` Open float64 `json:"open"` Close float64 `json:"close"` Min float64 `json:"min"` Max float64 `json:"max"` Volume float64 `json:"volume"` Ask float64 `json:"ask"` Bid float64 `json:"bid"` Size int `json:"size"` At int64 `json:"at"` }
CandleMessageData -
type ErrorMessage ¶
type ErrorMessage struct { Name string `json:"name"` Msg map[string][]string `json:"msg"` RequestID string `json:"request_id"` Status int `json:"status"` }
ErrorMessage -
type ExpirationListChange ¶
type ExpirationListChange struct { Name string `json:"name"` Version string `json:"version"` Params struct { RoutingFilters struct { Type string `json:"type"` Underlying string `json:"underlying"` UserGroupID int64 `json:"user_group_id"` } `json:"routingFilters"` } `json:"params"` }
ExpirationListChange -
type GetActiveSchedule ¶
type GetActiveSchedule struct { Name string `json:"name"` Version string `json:"version"` Body GetActiveScheduleBody `json:"body"` }
GetActiveSchedule -
type GetActiveScheduleBody ¶
type GetActiveScheduleBody struct { InstrumentType string `json:"instrument_type"` Period int `json:"period"` }
GetActiveScheduleBody -
type GetComissions ¶
type GetComissions struct { Name string `json:"name"` Version string `json:"version"` Body GetComissionsBody `json:"body"` }
GetComissions -
type GetComissionsBody ¶
type GetComissionsBody struct { InstrumentType string `json:"instrument_type"` UserGroupID int64 `json:"user_group_id"` }
GetComissionsBody -
type GetExpirationList ¶
type GetExpirationList struct { Name string `json:"name"` Version string `json:"version"` Body GetExpirationListBody `json:"body"` }
GetExpirationList -
type GetExpirationListBody ¶
type GetExpirationListBody struct { Type string `json:"type"` Underlying string `json:"underlying"` }
GetExpirationListBody -
type GetHistoryOptions ¶
type GetHistoryOptions struct { Asset int `json:"asset"` Start time.Time `json:"start"` End time.Time `json:"end"` Candle []int `json:"candle"` Latest bool `json:"latest"` MinSize int `json:"minSize"` }
GetHistoryOptions -
type GetInitData ¶
type GetInitData struct { Name string `json:"name"` Version string `json:"version"` Body struct{} `json:"body"` }
GetInitData -
type GetSpotList ¶
type GetSpotList struct { Name string `json:"name"` Version string `json:"version"` Body GetSpotListBody `json:"body"` }
GetSpotList -
type GetSpotListBody ¶
type GetSpotListBody struct { Type string `json:"type"` Underlying string `json:"underlying"` Expiration int64 `json:"expiration"` Period int `json:"period"` }
GetSpotListBody -
type GetUnderlyingListMsg ¶
type GetUnderlyingListMsg struct { Name string `json:"name"` Version string `json:"version"` Body struct { Type string `json:"type"` } `json:"body"` }
GetUnderlyingListMsg -
type GetUnderlyingListResponse ¶
type GetUnderlyingListResponse struct { Msg struct { Type string `json:"type"` Underlying []struct { ActiveID int `json:"active_id"` IsEnabled bool `json:"is_enabled"` IsSuspended bool `json:"is_suspended"` StartTime int64 `json:"start_time"` ActiveType string `json:"active_type"` Underlying string `json:"underlying"` Name string `json:"name"` Schedule []struct { Open int64 `json:"open"` Close int64 `json:"close"` } `json:"schedule"` } `json:"underlying"` } `json:"msg"` }
GetUnderlyingListResponse -
type InitDataAsset ¶
type InitDataAsset struct { Name string `json:"name"` ID int `json:"id"` GroupID int `json:"group_id"` Precision int `json:"precision"` Enabled bool `json:"enabled"` IsSuspended bool `json:"is_suspended"` DeadTime int `json:"deadtime"` StartTime int64 `json:"start_time"` Schedule [][]int64 `json:"schedule"` Option struct { Profit struct { Commission float64 `json:"commission"` } `json:"profit"` ExpTime int `json:"exp_time"` BetCloseTime map[string]BetCloseTime `json:"bet_close_time"` StartTime int64 `json:"start_time"` } `json:"option"` }
InitDataAsset -
type InitDataResponse ¶
type InitDataResponse struct { Msg struct { Binary struct { Actives map[string]InitDataAsset `json:"actives"` } `json:"binary"` Turbo struct { Actives map[string]InitDataAsset `json:"actives"` } `json:"turbo"` Groups map[string]string `json:"groups"` } `json:"msg"` }
InitDataResponse -
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 ProfileResponse ¶
type ProfileResponse struct { Name string `json:"name"` Msg struct { UserID int64 `json:"user_id"` UserGroup string `json:"user_group"` GroupID int64 `json:"group_id"` Balance float64 `json:"balance"` BalanceID int64 `json:"balance_id"` BalanceType int `json:"balance_type"` Balances []ProfileResponseBalance `json:"balances"` CountryID int `json:"country_id"` Created int64 `json:"created"` Currency string `json:"currency"` CurrencyChar string `json:"currency_char"` CurrencyID int `json:"currency_id"` Email string `json:"email"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Name string `json:"name"` } `json:"msg"` }
ProfileResponse -
type ProfileResponseBalance ¶
type ProfileResponseBalance 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"` }
ProfileResponseBalance -
type RoutingFilters ¶
type RoutingFilters struct { Active int `json:"active"` Kind string `json:"kind"` ExpirationTimestamp int64 `json:"expiration_timestamp"` ExpirationPeriod int `json:"expiration_period"` }
RoutingFilters -
type SendCandles ¶
type SendCandles struct { Name string `json:"name"` Msg SendCandlesMsg `json:"msg"` RequestID string `json:"request_id"` }
SendCandles - Get candle
type SendCandlesMsg ¶
type SendCandlesMsg struct { Name string `json:"name"` Version string `json:"version"` Body SendCandlesMsgBody `json:"body"` }
SendCandlesMsg -
type SendCandlesMsgBody ¶
type SendCandlesMsgBody struct { ID int `json:"active_id"` Size int `json:"size"` OnlyClose bool `json:"only_closed"` From int64 `json:"from,omitempty"` To int64 `json:"to,omitempty"` }
SendCandlesMsgBody -
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 SubIntrumentQuoetsGeneratedMsg ¶
type SubIntrumentQuoetsGeneratedMsg struct { Name string `json:"name"` Version string `json:"version"` Params SubIntrumentQuoetsGeneratedMsgParams `json:"params"` }
SubIntrumentQuoetsGeneratedMsg -
type SubIntrumentQuoetsGeneratedMsgParams ¶
type SubIntrumentQuoetsGeneratedMsgParams struct {
RoutingFilters RoutingFilters `json:"routingFilters"`
}
SubIntrumentQuoetsGeneratedMsgParams -
type SubIntrumentQuoetsGeneratedResponse ¶
type SubIntrumentQuoetsGeneratedResponse struct { Name string `json:"name"` Msg struct { Active int `json:"active"` Expiration struct { Instant string `json:"instant"` Period int `json:"period"` Timestamp int64 `json:"timestamp"` } `json:"expiration"` Instant string `json:"instant"` Kind string `json:"kind"` Quotes []SubIntrumentQuoetsGeneratedResponseQuotes `json:"quotes"` } `json:"msg"` }
SubIntrumentQuoetsGeneratedResponse -
type SubIntrumentQuoetsGeneratedResponseQuotes ¶
type SubIntrumentQuoetsGeneratedResponseQuotes struct { Price struct { Ask float64 `json:"ask"` Bid float64 `json:"bid"` } `json:"price"` Symbols []string `json:"symbols"` }
SubIntrumentQuoetsGeneratedResponseQuotes -
type SubscribeCandles ¶
type SubscribeCandles struct { Name string `json:"name"` Msg SubscribeCandlesMsg `json:"msg"` RequestID string `json:"request_id"` }
SubscribeCandles -
type SubscribeCandlesMsg ¶
type SubscribeCandlesMsg struct { Name string `json:"name"` Params SubscribeCandlesMsgParams `json:"params"` }
SubscribeCandlesMsg -
type SubscribeCandlesMsgParams ¶
type SubscribeCandlesMsgParams struct {
RoutingFilters SubscribeCandlesMsgRouting `json:"routingFilters"`
}
SubscribeCandlesMsgParams -
type SubscribeCandlesMsgRouting ¶
SubscribeCandlesMsgRouting -