Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FtxWebsocketURL is the ftx exchange websocket url. FtxWebsocketURL = "wss://ftx.com/ws/" // FtxRESTBaseURL is the ftx exchange base REST url. FtxRESTBaseURL = "https://ftx.com/api/" // CoinbaseProWebsocketURL is the coinbase-pro exchange websocket url. CoinbaseProWebsocketURL = "wss://ws-feed.pro.coinbase.com/" // CoinbaseProRESTBaseURL is the coinbase-pro exchange base REST url. CoinbaseProRESTBaseURL = "https://api.pro.coinbase.com/" // BinanceWebsocketURL is the binance exchange websocket url. BinanceWebsocketURL = "wss://stream.binance.com:9443/ws" // BinanceRESTBaseURL is the binance exchange base REST url. BinanceRESTBaseURL = "https://api.binance.com/api/v3/" // BitfinexWebsocketURL is the bitfinex exchange websocket url. BitfinexWebsocketURL = "wss://api-pub.bitfinex.com/ws/2" // BitfinexRESTBaseURL is the bitfinex exchange base REST url. BitfinexRESTBaseURL = "https://api-pub.bitfinex.com/v2/" // HbtcWebsocketURL is the hbtc exchange websocket url. HbtcWebsocketURL = "wss://wsapi.hbtc.com/openapi/quote/ws/v2" // HbtcRESTBaseURL is the hbtc exchange base REST url. HbtcRESTBaseURL = "https://api.hbtc.com/" // HuobiWebsocketURL is the huobi exchange websocket url. HuobiWebsocketURL = "wss://api.huobi.pro/ws" // HuobiRESTBaseURL is the huobi exchange base REST url. HuobiRESTBaseURL = "https://api.huobi.pro/" // GateioWebsocketURL is the gateio exchange websocket url. GateioWebsocketURL = "wss://api.gateio.ws/ws/v4/" // GateioRESTBaseURL is the gateio exchange base REST url. GateioRESTBaseURL = "https://api.gateio.ws/api/v4/" // KucoinRESTBaseURL is the kucoin exchange base REST url. KucoinRESTBaseURL = "https://api.kucoin.com/api/v1/" // BitstampWebsocketURL is the bitstamp exchange websocket url. BitstampWebsocketURL = "wss://ws.bitstamp.net/" // BitstampRESTBaseURL is the bitstamp exchange base REST url. BitstampRESTBaseURL = "https://www.bitstamp.net/api/v2/" // BybitWebsocketURL is the bybit exchange websocket url. BybitWebsocketURL = "wss://stream.bybit.com/realtime_public" // BybitRESTBaseURL is the bybit exchange base REST url. BybitRESTBaseURL = "https://api.bybit.com/" // ProbitWebsocketURL is the probit exchange websocket url. ProbitWebsocketURL = "wss://api.probit.com/api/exchange/v1/ws" // ProbitRESTBaseURL is the probit exchange base REST url. ProbitRESTBaseURL = "https://api.probit.com/api/exchange/v1/" // GeminiWebsocketURL is the gemini exchange websocket url. GeminiWebsocketURL = "wss://api.gemini.com/v2/marketdata" // GeminiRESTBaseURL is the gemini exchange base REST url. GeminiRESTBaseURL = "https://api.gemini.com/v1/" // BitmartWebsocketURL is the bitmart exchange websocket url. BitmartWebsocketURL = "wss://ws-manager-compress.bitmart.com?protocol=1.1" // BitmartRESTBaseURL is the bitmart exchange base REST url. BitmartRESTBaseURL = "https://api-cloud.bitmart.com/spot/v1/" // DigifinexWebsocketURL is the digifinex exchange websocket url. DigifinexWebsocketURL = "wss://openapi.digifinex.com/ws/v1/" // DigifinexRESTBaseURL is the digifinex exchange base REST url. DigifinexRESTBaseURL = "https://openapi.digifinex.com/v3/" // AscendexWebsocketURL is the ascendex exchange websocket url. AscendexWebsocketURL = "wss://ascendex.com/0/api/pro/v1/stream" // AscendexRESTBaseURL is the ascendex exchange base REST url. AscendexRESTBaseURL = "https://ascendex.com/api/pro/v1/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Exchanges []Exchange `json:"exchanges"` Connection Connection `json:"connection"` Log Log `json:"log"` }
Config contains config values for the app. Struct values are loaded from user defined JSON config file.
type Connection ¶
type Connection struct { WS WS `json:"websocket"` REST REST `json:"rest"` Terminal Terminal `json:"terminal"` MySQL MySQL `json:"mysql"` ES ES `json:"elastic_search"` InfluxDB InfluxDB `json:"influxdb"` }
Connection contains config values for different API and storage connections.
type ES ¶
type ES struct { Addresses []string `json:"addresses"` Username string `json:"username"` Password string `json:"password"` IndexName string `json:"index_name"` ReqTimeoutSec int `json:"request_timeout_sec"` MaxIdleConns int `json:"max_idle_conns"` MaxIdleConnsPerHost int `json:"max_idle_conns_per_host"` TickerCommitBuf int `json:"ticker_commit_buffer"` TradeCommitBuf int `json:"trade_commit_buffer"` }
ES contains config values for elastic search.
type Exchange ¶
type Exchange struct { Name string `json:"name"` Markets []Market `json:"markets"` Retry Retry `json:"retry"` }
Exchange contains config values for different exchanges.
type InfluxDB ¶ added in v1.7.0
type InfluxDB struct { Organization string `josn:"organization"` Bucket string `json:"bucket"` Token string `json:"token"` URL string `json:"URL"` ReqTimeoutSec int `json:"request_timeout_sec"` MaxIdleConns int `json:"max_idle_conns"` TickerCommitBuf int `json:"ticker_commit_buffer"` TradeCommitBuf int `json:"trade_commit_buffer"` }
InfluxDB contains config values for influxdb.
type Info ¶
type Info struct { Channel string `json:"channel"` Connector string `json:"connector"` WsConsiderIntSec int `json:"websocket_consider_interval_sec"` RESTPingIntSec int `json:"rest_ping_interval_sec"` Storages []string `json:"storages"` }
Info contains config values for different market channels.
type Market ¶
type Market struct { ID string `json:"id"` Info []Info `json:"info"` CommitName string `json:"commit_name"` }
Market contains config values for different markets.
type MySQL ¶
type MySQL struct { User string `josn:"user"` Password string `json:"password"` URL string `json:"URL"` Schema string `json:"schema"` ReqTimeoutSec int `json:"request_timeout_sec"` ConnMaxLifetimeSec int `json:"conn_max_lifetime_sec"` MaxOpenConns int `json:"max_open_conns"` MaxIdleConns int `json:"max_idle_conns"` TickerCommitBuf int `json:"ticker_commit_buffer"` TradeCommitBuf int `json:"trade_commit_buffer"` }
MySQL contains config values for mysql.
type REST ¶
type REST struct { ReqTimeoutSec int `json:"request_timeout_sec"` MaxIdleConns int `json:"max_idle_conns"` MaxIdleConnsPerHost int `json:"max_idle_conns_per_host"` }
REST contains config values for REST API connection.
type Retry ¶
type Retry struct { Number int `json:"number"` GapSec int `json:"gap_sec"` ResetSec int `json:"reset_sec"` }
Retry contains config values for retry process.
Click to show internal directories.
Click to hide internal directories.