wr 6 роки тому
батько
коміт
320127ff8a

+ 27 - 0
kline/214341259320977.key

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA1OUKKbqdzMWGyEJtyW6owsTMTwqjI/BDn2n5COXqjZXtPQ+d
+Ov+sR5aGviKfKsEpyiCRqVN1mVcVX90DKj2OmGI9EWbOCSG1eaKtRkdyHbei+hPb
+JMU0gIcttZm/zZnB7rVXwXBT1DD5/fMwVMT73FlQ49WbLwIHglJMeh0Tt7h+l/XD
+WfcGLtEUAUi2rz7JjO1RaCitlnpdN+Go/2CtYD3J0ZW46Nc9otknqSWwvcZGPC80
+e+36v+0jQQAl9xiJqZFySOtwo/Qgv4B8sTszaL2NH1FJIxrOezpFVYGlBikpkZ42
+Lwy8OsoiIutIjFwgIeT8Cn4aDxdXD49eSBRBnQIDAQABAoIBAQDI30LzlI0HhOhj
+U6pbAPpiq2VKvvKnGi/z3f2Hk8f3x5qMnorv/AUFltWT2P7tTEyt1oUZixHOmQgl
+51bxKBu/VBHitWl53EBqgD+VrBvURkyUQN/oldmv29wZGPSMfaMqJBik/+NYts1p
++2eC1En/4pYcIpPFitii8hwOrBjKoqR1wcumStcw7z4+U1bI2R7rImFXyW15/bfq
+Et0HjqF7r86yMSqEywe+TqUXMu/xTzPce5OKO1h0gjOgFmH4zwXhXAnOi4reR+6V
+zXxF3TgjvxxpiOJVQxGzUOLUGpaxBipP4EiK+MWAr9sopZDZm20yOrv3UcWTE5wS
+kKgSyczRAoGBAPP333Jz2aolIMmxANdvEY+cY1OXdfSicJD3O0I8FVLvfukf7gLf
+/xzJL6qm0ow3GC6g103+6B1EANdX0DU4ecrFvvzM9k6hddnrEfluCT+K3PVW/f7i
+KJkXTzIHONxRCSfHhBxktXm2yZ3vRtp6JUZEkjXXLWAlE1f+sjqGzjOjAoGBAN9k
+3AkpMExGEpfsavU901cIy0CPMS95oW3lGF7ezUL7YUmkfZRkqaRyTTgHggcD6OiC
+/GxVtti7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HqRXEvjeE/CpuVSPHyPKJYFsqWxP/a4quX
+cRCRsy+ki4EP8qT7NfPnkEogxZvlMctHsWgdtTbp9ShXbqCnqXPCw575BZH2rEKN
+xI30CWr6U47n4h2hSnaJxJeeA+xKsA1Vk4v8eLu7xwRlBwhZEsYNFAVpD3YEToek
+H877QzZrZ6EdG/3Vg6sdtHDQ4i/U87syTmyM2l8vXOGIZDd1Wr6dqee2FtCfhvAc
+WMbvh/J6sBOHMq0Vn5G8Tp6iUwsRlY1z7LaQKAlnlOiiZVhhe+1gvzJBHC0t+Hr2
+2YHwaoKDLhSB0F/gGkziNQ+py1hFne4MEOuvzOxJpjn0+wRIbBk=
+-----END CERTIFICATE-----

+ 163 - 0
kline/datasource.json

@@ -0,0 +1,163 @@
+{
+  "DBDriver": "mysql",
+  "DSN": "root:TickServer@133@tcp(localhost:3306)/tick_server?charset=utf8",
+  "DBName": "fzmnewdb",
+  "DsMap": {
+	"ctp": {
+      "BrokerId": "66666",
+      "User": "1011000",
+      "PassWord": "317496",
+      "Url": "tcp://ctp1-front5.citicsf.com:41205",
+      "Url2": "tcp://ctp1-md5.citicsf.com:41213",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false
+    },
+    "dzh": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "115.29.238.128:19526",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "easyforex": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "oanda": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "lmax": {
+      "BrokerId": "",
+      "User": "wave2907",
+      "PassWord": "Tg417396",
+      "Url": "https://trade.lmaxtrader.com",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "sina": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "sinafuture": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    },
+    "tdx": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "serverlist.txt",
+      "SymbolsFile": ""
+    },
+    "btc": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "serverlist.txt",
+      "SymbolsFile": ""
+    },
+    "polo": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "serverlist.txt",
+      "SymbolsFile": ""
+    },
+    "bty": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": true,
+      "CfgFile": "serverlist.txt",
+      "SymbolsFile": ""
+    },
+    "huobi": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "serverlist.txt",
+      "SymbolsFile": ""
+    },
+    "yunbi": {
+      "BrokerId": "",
+      "User": "",
+      "PassWord": "",
+      "Url": "",
+      "Url2": "",
+      "SaveDir": "/data/macoin/goprojects/bin/buff",
+      "SaveDir1": "",
+      "Run": false,
+      "CfgFile": "",
+      "SymbolsFile": ""
+    }
+  },
+  "DataDir": "/data/macoin/goprojects/bin/buff",
+  "HttpAddr": ":2107"
+}

BIN
kline/datasourceserver


+ 37 - 0
kline/db_script.sql

@@ -0,0 +1,37 @@
+-- MySQL dump 10.13  Distrib 5.7.20, for Linux (x86_64)
+--
+-- Host: localhost    Database: tick_server
+-- ------------------------------------------------------
+-- Server version	5.7.20-0ubuntu0.16.04.1
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Dumping data for table `inss_lastoffsets`
+--
+
+LOCK TABLES `inss_lastoffsets` WRITE;
+/*!40000 ALTER TABLE `inss_lastoffsets` DISABLE KEYS */;
+INSERT INTO `inss_lastoffsets` VALUES ('bty','ETHBTC',2310451),('bty','ETCBTC',2310118),('bty','ZECBTC',2310445),('bty','LTCBTC',2310452),('bty','BCCBTC',2310453),('bty','ETHUSDT',2310433),('bty','ETCUSDT',2310432),('bty','ZECUSDT',2310441),('bty','LTCUSDT',2310454),('bty','BCCUSDT',2310455),('bty','BTCUSDT',2309844),('bty','BTYUSDT',2310456),('bty','BTSUSDT',2310417),('bty','SCUSDT',2310448),('bty','BTYBTC',0),('bty','BTSBTC',0),('bty','SCBTC',0),('bty','YCCUSDT',0),('bty','BTCSUSDT',0),('bty','DCRUSDT',2310431);
+/*!40000 ALTER TABLE `inss_lastoffsets` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2018-05-16 18:02:12

+ 13 - 0
kline/ds.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+while true; do
+    running=$(ps -ef | grep "datasourceserver" | grep -v "grep") 
+    if [ "$running" ]; then
+        sleep 10
+	#rm -rf $PWD/*.log 
+	#rm -rf $PWD/*.out   
+	else
+        mv -f $PWD/datasourceserver.out $PWD/../dserver.out 
+	echo "starting service ..." 
+        nohup $PWD/datasourceserver > $PWD/datasourceserver.out 2>&1 &
+    fi 
+done 

Різницю між файлами не показано, бо вона завелика
+ 44 - 0
kline/fzmnewdb.sql


+ 1 - 0
kline/fzmnewinss.json

@@ -0,0 +1 @@
+{}

+ 73 - 0
kline/macoin.org.crt

@@ -0,0 +1,73 @@
+-----BEGIN CERTIFICATE-----
+MIIEqzCCA5OgAwIBAgIDAhaMMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNVBAYTAlVT
+MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMSAwHgYDVQQDExdSYXBpZFNTTCBTSEEy
+NTYgQ0EgLSBHMzAeFw0xNTAyMDMwMDQ0NDRaFw0xNjAzMDcwNDQ2NThaMIGQMRMw
+EQYDVQQLEwpHVDI5NTgxODM5MTEwLwYDVQQLEyhTZWUgd3d3LnJhcGlkc3NsLmNv
+bS9yZXNvdXJjZXMvY3BzIChjKTE1MS8wLQYDVQQLEyZEb21haW4gQ29udHJvbCBW
+YWxpZGF0ZWQgLSBSYXBpZFNTTChSKTEVMBMGA1UEAwwMKi5tYWNvaW4ub3JnMIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoswGBpghzTOC0PrCYeNdYi7j
+LPfiKu2mFt1Krd3ADseYGULF45vRFwIV9Jr8mKvObZ3TK4F8lPeoZwShWZADFZok
+Y5Cyo7JlgxI/7pupH1zWUW+9CCdxy13cirW8IsckEe5+mDkmyVv4zlJsBe5fZhza
+gEghC+T89xeDcnuce2SaSaFLemKs8Twp2puyjGoEB2q0YDjg/MqA1Ce8CkjY9AYz
+nrutb1FTz3X2ZvAtRUl4DwJpMKbQ1/E3Stlc/PVkCu89y9HiBfgdP/mpokOa5DTV
+WmzWrqmCErYy7y8i3kpYrMzhFT9V1URdlbSzswupummEpHO+Mqi2TZjkPRPYwwID
+AQABo4IBVDCCAVAwHwYDVR0jBBgwFoAUw5zz/NNGCDS7zkZ/oHxb8+IIy1kwVwYI
+KwYBBQUHAQEESzBJMB8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+  "DBDriver": "mysql",
+  "DSN": "root:TickServer@133@tcp(localhost:3306)/fzmnewdb?charset=utf8",
+  "DBName": "fzmnewdb",
+  "DsMap": {
+    "lmax": {
+      "Run": false
+    },
+    "dzh": {
+      "Run": false
+    },
+    "sina": {
+      "Run": false
+    },
+    "ctp": {
+      "Run": false
+    },
+    "easyforex": {
+      "Run": false
+    },
+    "oanda": {
+      "Run": false
+    },
+    "sinafuture": {
+      "Run": false
+    },
+    "tdx": {
+      "Run": false
+    },
+    "btc": {
+      "Run": false
+    },
+    "polo": {
+      "Run": false
+    },
+    "bty": {
+      "Run": true
+    },
+    "huobi": {
+      "Run": false
+    },
+    "yunbi": {
+      "Run": false
+    }
+  },
+  "Url": "http://127.0.0.1:2107/",
+  "UrlSSL": "https://127.0.0.1:2107/",
+  "FileServerAddr": "localhost:8080",
+  "DataDir": "/data/macoin/goprojects/bin/fzmnew",
+  "InssFile": "fzmnewinss.json",
+  "RpcAddr": ":19528",
+  "StreamAddr": ":19529"
+}

Різницю між файлами не показано, бо вона завелика
+ 112 - 0
kline/tick_server.sql


BIN
kline/tickserver


+ 11 - 0
kline/ts.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+while true; do
+    running=$(ps -ef | grep "tickserver" | grep -v "grep") 
+    if [ "$running" ]; then
+        sleep 10 
+    else
+        mv -f $PWD/tickserver.out $PWD/../tserver.out 
+        echo "starting service ..." 
+        nohup $PWD/tickserver > $PWD/tickserver.out 2>&1 &
+    fi 
+done 

+ 6 - 0
kline/webproxy.json

@@ -0,0 +1,6 @@
+{
+  "Saddr1": "127.0.0.1:19528",
+  "Saddr2": "127.0.0.1:19528",
+  "Saddr3": "127.0.0.1:19529",
+  "Saddr4": "127.0.0.1:9090"
+}

+ 6 - 0
kline/webproxys.json

@@ -0,0 +1,6 @@
+{
+  "Saddr1": "127.0.0.1:19528",
+  "Saddr2": "127.0.0.1:19528",
+  "Saddr3": "127.0.0.1:19529",
+  "Saddr4": "127.0.0.1:9090"
+}

BIN
kline/webproxys33


BIN
kline/webproxyt


+ 11 - 0
kline/wps33.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+while true; do
+    running=$(ps -ef | grep "webproxys33" | grep -v "grep") 
+    if [ "$running" ]; then
+        sleep 2 
+    else
+        mv -f $PWD/webproxys33.out $PWD/../wproxys33.out 
+        echo "starting service ..." 
+        nohup $PWD/webproxys33 > $PWD/webproxys33.out 2>&1 &
+    fi 
+done 

+ 11 - 0
kline/wpt.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+while true; do
+    running=$(ps -ef | grep "webproxyt" | grep -v "grep") 
+    if [ "$running" ]; then
+        sleep 2 
+    else
+        mv -f $PWD/webproxyt.out $PWD/../wproxyt.out 
+        echo "starting service ..." 
+        nohup $PWD/webproxyt > $PWD/webproxyt.out 2>&1 &
+    fi 
+done 

+ 73 - 0
read.txt

@@ -1 +1,74 @@
 
+###########环境依赖  
+nginx  
+mysql
+  
+###########部署步骤  
+1. 新建目录  
+    mkdir -p /data/macoin/goprojects/bin  
+  
+  
+2. 安装nginix,并修改/etc/nginx/sites-available/default:
+  server {
+        listen 9090 default_server;
+        listen [::]:9090 default_server ipv6only=on;
+
+        root /data/macoin/goprojects/bin/fzmnew;
+        index index.html index.htm;
+
+        server_name localhost;
+
+        location / {
+                try_files $uri $uri/ =404;
+        }
+	server {
+        listen 8080;
+        listen [::]:8080 ipv6only=on;
+        server_name localhost;
+        root /data/macoin/goprojects/bin/buff;
+        index index.html index.htm;
+
+        location / {
+                try_files $uri $uri/ =404;
+        }
+}
+
+  
+3. 安装mysql
+	新建数据库tick_server,fzmnewdb;
+	导入tick_server数据库表:use tick_server; source tick_server.sql;
+	导入fzmnewdb数据库表:use fzmnewdb; source fzmnewdb.sql;
+  
+4. 启动服务器: 
+    nohup ./wpt.sh > wpt.out 2>&1 &
+	nohup ./wps33.sh > wps33.out 2>&1 &
+	nohup ./ts.sh > ts.out 2>&1 &
+	nohup ./ds.sh > ds.out 2>&1 &
+	
+5. 在/etc/rc.local里添加如下内容:
+	cd /data/macoin/goprojects/bin
+	nohup ./wpt.sh > wpt.out 2>&1 &
+	nohup ./wps33.sh > wps33.out 2>&1 &
+	nohup ./ts.sh > ts.out 2>&1 &
+	nohup ./ds.sh > ds.out 2>&1 &
+         
+  
+  
+###########目录结构描述  
+├── datasourceserver                 
+├── datasource.json                         
+├── ds.sh                                  
+├── tickserver  
+├── mkconf.json                           
+├── ts.sh  
+├── webproxys33  
+├── webproxys.json  
+├── wps33.sh          
+├── webproxyt  
+├── webproxyt.json  
+├── wpt.sh               
+  
+  
+  
+###########V1.0.0 版本内容更新  
+1. 新功能  aaaaaaaaa  

+ 1 - 19
server/tick/ds_bty.go

@@ -22,17 +22,6 @@ import (
 )
 
 var btyInss = []int{
-	//markinfo.SCCNY,
-	//markinfo.BTCCNY,
-	//markinfo.BTYCNY,
-	//markinfo.ETHCNY,
-	//markinfo.ETCCNY,
-	//markinfo.ZECCNY,
-	//markinfo.BTSCNY,
-	//markinfo.LTCCNY,
-	//markinfo.BCCCNY,
-	//markinfo.NYCCCNY,
-	//markinfo.WTCCNY,
 	markinfo.ETHBTC,
 	markinfo.ETCBTC,
 	markinfo.ZECBTC,
@@ -47,11 +36,6 @@ var btyInss = []int{
 	markinfo.BTYUSDT,
 	markinfo.BTSUSDT,
 	markinfo.SCUSDT,
-	markinfo.BTYBTC,
-	markinfo.BTSBTC,
-	markinfo.SCBTC,
-	markinfo.YCCUSDT,
-	markinfo.BTCSUSDT,
 	markinfo.DCRUSDT,
 }
 
@@ -147,10 +131,8 @@ func (bds *BtyDS) getData(instrumentId, offset int64) {
 
 func GetEthTickbyPage(instrumentId, offset int64, cb func(*Market)) (int64, error) {
 	symbol, _ := markinfo.SymbolName(int(instrumentId))
-	//url := "http://47.75.62.253:46658/tender/default/kline?symbol=" + symbol + "&offset=" + fmt.Sprintf("%d", offset) + "&limit=100"
-	//url := "http://47.74.9.155:45656/tender/default/kline?symbol=" + symbol + "&offset=" + fmt.Sprintf("%d", offset) + "&limit=100"
 	url := "http://10.0.1.5:45656/tender/default/kline?symbol=" + symbol + "&offset=" + fmt.Sprintf("%d", offset) + "&limit=100"
-	//url := "http://121.196.205.182:45656/tender/default/kline?symbol=" + symbol + "&offset=" + fmt.Sprintf("%d", offset) + "&limit=100"
+	//url := "http://65.52.167.178:45656/forward?symbol=" + symbol + "&offset=" + fmt.Sprintf("%d", offset) + "&limit=100"
 	response, err := http.Get(url)
 	if err != nil {
 		//log.Println("f1", url, err)

Деякі файли не було показано, через те що забагато файлів було змінено