Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit b6b5c4c

Browse files
committed
docs: добавлен readme с примером
1 parent 44d5443 commit b6b5c4c

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1-
# gomoex
2-
Сlient for MOEX ISS
1+
# Gomoex
2+
3+
[![Go test](https://github.com/WLM1ke/gomoex/actions/workflows/test.yml/badge.svg)](https://github.com/WLM1ke/gomoex/actions/workflows/test.yml)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/WLM1ke/gomoex)](https://goreportcard.com/report/github.com/WLM1ke/gomoex)
5+
[![codecov](https://codecov.io/gh/WLM1ke/gomoex/branch/main/graph/badge.svg?token=74YYC7H8EC)](https://codecov.io/gh/WLM1ke/gomoex)
6+
[![Go Reference](https://pkg.go.dev/badge/github.com/WLM1ke/gomoex.svg)](https://pkg.go.dev/github.com/WLM1ke/gomoex)
7+
8+
Реализация части запросов к [MOEX Informational & Statistical Server](https://www.moex.com/a2193).
9+
10+
# Основные возможности
11+
12+
Реализованы запросы получения:
13+
14+
* списка торгуемых инструментов
15+
* интервалов дат с доступными свечками и историческими котировками
16+
* свечек и исторических котировок
17+
* дивидендов
18+
19+
При необходимости перечень запросов может быть расширен. [Документация](https://pkg.go.dev/github.com/WLM1ke/gomoex).
20+
21+
# Пример использования
22+
23+
Получение дневных свечек для AKRN:
24+
25+
```
26+
package main
27+
28+
import (
29+
"context"
30+
"fmt"
31+
"github.com/WLM1ke/gomoex"
32+
"net/http"
33+
)
34+
35+
func main() {
36+
cl := gomoex.NewISSClient(http.DefaultClient)
37+
rows, _ := cl.MarketCandles(context.Background(), gomoex.EngineStock, gomoex.MarketShares, "AKRN", "2021-03-01", "2021-03-11", gomoex.IntervalDay)
38+
for _, row := range rows {
39+
fmt.Printf("%+v\n", row)
40+
}
41+
}
42+
```
43+
44+
Результат:
45+
46+
```
47+
{Begin:2021-03-01 00:00:00 +0000 UTC End:2021-03-01 23:59:59 +0000 UTC Open:6006 Close:5992 High:6018 Low:5990 Value:5.138208e+06 Volume:856}
48+
{Begin:2021-03-02 00:00:00 +0000 UTC End:2021-03-02 23:59:59 +0000 UTC Open:6006 Close:6032 High:6046 Low:5990 Value:1.2557102e+07 Volume:2087}
49+
{Begin:2021-03-03 00:00:00 +0000 UTC End:2021-03-03 23:59:59 +0000 UTC Open:6048 Close:6000 High:6048 Low:5990 Value:7.280306e+06 Volume:1209}
50+
{Begin:2021-03-04 00:00:00 +0000 UTC End:2021-03-04 23:59:59 +0000 UTC Open:6000 Close:5982 High:6008 Low:5964 Value:8.168796e+06 Volume:1365}
51+
{Begin:2021-03-05 00:00:00 +0000 UTC End:2021-03-05 23:59:59 +0000 UTC Open:5968 Close:5996 High:6010 Low:5968 Value:4.505082e+06 Volume:752}
52+
{Begin:2021-03-09 00:00:00 +0000 UTC End:2021-03-09 23:59:59 +0000 UTC Open:6018 Close:6010 High:6018 Low:5960 Value:9.577078e+06 Volume:1597}
53+
{Begin:2021-03-10 00:00:00 +0000 UTC End:2021-03-10 23:59:59 +0000 UTC Open:6008 Close:6004 High:6010 Low:5982 Value:5.505522e+06 Volume:918}
54+
{Begin:2021-03-11 00:00:00 +0000 UTC End:2021-03-11 23:59:59 +0000 UTC Open:6006 Close:6000 High:6010 Low:5992 Value:3.228186e+06 Volume:538}
55+
```

0 commit comments

Comments
 (0)