tradingdays_server

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2016 License: MIT Imports: 8 Imported by: 0

README

gogrs - tradingdays_server

GoDoc Build Status

主要支援動態更新 CSV 檔案讀取,解決非預定開休市狀況(如:颱風假)

Install:

go install -u github.com/toomore/gogrs/cmd/tradingdays_server

Usage:

tradingdays_server [flags]

The flags are:

-http
	HTTP service address (default ':59123')
-csvcachetime
	CSV cache time.(default: 21600)

URL Path:

http://127.0.0.1:58123/open?q={timestamp}

回傳 JSON 格式

{
	"date": "2015-04-24T15:14:52Z",
	"open": true
}

範例:

http://gogrs-trd.toomore.net/open?q=1429888492

Docker

Download image.

docker pull toomore/gogrs

tag:latest bind to branch:master, more docker info.

Run tradingdays_server.

docker run -d -p 80:59123 toomore/gogrs tradingdays_server

Run with docker-compose

docker-compose up

TODO

  1. Implemented docker-compose scale tradingdays_server with not used ports.

Documentation

Overview

提供簡單的日期查詢 API Server.

主要支援動態更新 CSV 檔案讀取,解決非預定開休市狀況(如:颱風假)

Install:

go install github.com/toomore/gogrs/cmd/tradingdays_server

Usage:

tradingdays_server [flags]

The flags are:

-http
	HTTP service address (default ':59123')
-csvcachetime
	CSV cache time.(default: 21600)

URL Path:

/open?q={timestamp}

回傳 JSON 格式

{
	"date": "2015-04-24T15:14:52Z",
	"open": true
}

範例:

http://gogrs-trd.toomore.net/open?q=1429888492

Jump to

Keyboard shortcuts

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