Documentation
¶
Index ¶
- Variables
- type ActiveAssets
- type Apps
- type BetCloseTime
- type CandleGeneratedMessage
- type CandleMessage
- type CandleMessageData
- type Database
- type ErrorMessage
- type ExpirationListChange
- type GetActiveSchedule
- type GetActiveScheduleBody
- type GetActiveScheduleResponse
- type GetActiveScheduleResponseMsgItems
- type GetComissions
- type GetComissionsBody
- type GetComissionsResponse
- type GetExpirationList
- type GetExpirationListBody
- type GetExpirationListResponse
- type GetInitData
- type GetSpotList
- type GetSpotListBody
- type GetSpotListResponse
- type GetUnderlyingListMsg
- type GetUnderlyingListResponse
- type InitDataAsset
- type InitDataResponse
- type MessageData
- type OnlyEnableAssets
- type OnlyEnableAssetsData
- type ProfileResponse
- type ProfileResponseBalance
- type RoutingFilters
- type SendCandles
- type SendCandlesMsg
- type SendCandlesMsgBody
- type SendLogin
- type SendMessage
- type SubChannel
- type SubIntrumentQuoetsGeneratedMsg
- type SubIntrumentQuoetsGeneratedMsgParams
- type SubIntrumentQuoetsGeneratedResponse
- type SubIntrumentQuoetsGeneratedResponseQuotes
- type SubscribeCandles
- type SubscribeCandlesMsg
- type SubscribeCandlesMsgParams
- type SubscribeCandlesMsgRouting
- type SubscribeMessage
- type TimeSyncMessage
- type UnderUnderlyingDigital
- type UnderUnderlyingDigitalAsset
Constants ¶
This section is empty.
Variables ¶
Logger -
Functions ¶
This section is empty.
Types ¶
type Apps ¶
type Apps struct {
Option core.RatesOption
Websocket func() *interfaces.WebsocketClient
Control *control
}
Apps -
func (*Apps) Run ¶
func (cc *Apps) Run(hc func() *core.HTTPClient, wsc func() *interfaces.WebsocketClient) bool
Run -
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 GetActiveScheduleResponse ¶
type GetActiveScheduleResponse struct {
Msg struct {
InstrumentType string `json:"instrument_type"`
Items []GetActiveScheduleResponseMsgItems `json:"items"`
} `json:"msg"`
}
GetActiveScheduleResponse -
type GetActiveScheduleResponseMsgItems ¶
type GetActiveScheduleResponseMsgItems struct {
ActiveID int `json:"active_id"`
Schedule []rates.Schedule `json:"schedule"`
}
GetActiveScheduleResponseMsgItems -
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 GetComissionsResponse ¶
type GetComissionsResponse struct {
Name string `json:"name"`
Msg struct {
UserGroupID int `json:"user_group_id"`
InstrumentType string `json:"instrument_type"`
Items []rates.Comissions `json:"items"`
} `json:"msg"`
}
GetComissionsResponse -
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 GetExpirationListResponse ¶
type GetExpirationListResponse struct {
Msg struct {
Type string `json:"type"`
Underlying string `json:"underlying"`
Expiration []rates.Expiration `json:"expiration"`
} `json:"msg"`
}
GetExpirationListResponse -
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 GetSpotListResponse ¶
type GetSpotListResponse struct {
Msg struct {
Type string `json:"type"`
Underlying string `json:"underlying"`
Expiration int64 `json:"expiration"`
Spot []rates.Spot `json:"spot"`
} `json:"msg"`
}
GetSpotListResponse -
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"`
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"`
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"`
} `json:"msg"`
}
InitDataResponse -
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 OnlyEnableAssets ¶
type OnlyEnableAssets struct {
Binary map[int]OnlyEnableAssetsData
Digital map[int]OnlyEnableAssetsData
sync.RWMutex
}
OnlyEnableAssets -
type OnlyEnableAssetsData ¶
type OnlyEnableAssetsData struct {
Enable bool
Suspended bool
Open bool
StartTime time.Time
OpenAt time.Time
CloseAt time.Time
}
OnlyEnableAssetsData -
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 SubChannel ¶
SubChannel -
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 -
type SubscribeMessage ¶
type SubscribeMessage struct {
Name string `json:"name"`
RequestID string `json:"request_id"`
Msg interface{} `json:"msg"`
}
SubscribeMessage -
type TimeSyncMessage ¶
TimeSyncMessage - time sync
type UnderUnderlyingDigital ¶
UnderUnderlyingDigital -
Source Files
¶
- apps.go
- assets.go
- assets.history.go
- assets.provider.go
- control.go
- database.go
- maps.go
- type.go