stockmq-server

command module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

README

StockMQ Server

build status build status

High-Performance message broker for the market data.

This repository provides core functionality including WebSocket connector for Binance and Tinkoff OpenAPI.

Requirements

NATS Server

GO111MODULE=on go install github.com/nats-io/nats-server/v2@latest
$(GOPATH)/bin/nats-server

Example configuration

<?xml version="1.0" encoding="UTF-8"?>
<Config>
    <WebSocket>
        <Name>Binance-BTCUSD</Name>
        <Enabled>true</Enabled>
        <URL>wss://stream.binance.com:9443/ws</URL>
        <Handler>Binance</Handler>
        <DialTimeout>4</DialTimeout>
        <RetryDelay>3</RetryDelay>
        <PingTimeout>60</PingTimeout>
        <ReadLimit>655350</ReadLimit>
        <InitMessage>{"id": 0, "method": "SUBSCRIBE", "params": ["btcusdt@kline_1s", "btcusdt@depth"]}</InitMessage>
    </WebSocket>
</Config>

Start the server

Configure all required feeds in stockmq-server.xml

go build
./stockmq-server -c stockmq-server.xml

Listen to NATS

cd cmd/stockmq-nats
go build
./stockmq-nats -debug

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
Package server implements all methods required to process messages.
Package server implements all methods required to process messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL