miles170 / fugle-go

Go library for accessing the Fugle v0.3 HTTP API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fugle-go

GoDoc Test Status Test Coverage Go Report Card Code Climate

fugle-go is Go library for accessing Fugle API v0.3

Installation

fugle-go is compatible with modern Go releases in module mode, with Go installed:

go get github.com/miles170/fugle-go/fugle

Usage

HTTP API

import "github.com/miles170/fugle-go/fugle"

client := fugle.NewClient("demo")

META (提供盤中個股/指數當日基本資訊)

meta, err := client.Intrady.Meta("2884", false)

QUOTE (提供盤中個股/指數逐筆交易金額、狀態、最佳五檔及統計資訊)

quote, err := client.Intrady.Quote("2884", false)

CHART (提供盤中個股/指數 線圖時所需的各項即時資訊)

chart, err := client.Intrady.Chart("2884", false)

DEALTS (取得個股當日所有成交資訊)

dealts, err := client.Intrady.Dealts("2884", 50, 0, false)

VOLUMES (提供盤中個股即時分價量)

volumes, err := client.Intrady.Volumes("2884", false)

CANDLES (提供歷史股價資料,包含開高低收量)

candles, err := client.MarketData.Candles("2884",
		fugle.Date{Year: 2022, Month: 8, Day: 15},
		fugle.Date{Year: 2022, Month: 8, Day: 21})

License

BSD-3-Clause

About

Go library for accessing the Fugle v0.3 HTTP API

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%