Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 ivanglie
Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 21 additions & 0 deletions pkg/bankiru-go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
74 changes: 74 additions & 0 deletions pkg/bankiru-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Golang client for exchange rate of cash currency in Russia

Golang client that provides latest exchange rate of USDRUB cash in largest cities of Russia.

## Example

First, ensure the library is installed and up to date by running

```
go get -u github.com/ivanglie/usdrub-bot/pkg/bankiru-go
```

This is a very simple app that just displays USDRUB exhange rate in Novosibirsk.

```golang
package main

import (
"fmt"

"github.com/ivanglie/usdrub-bot/pkg/bankiru-go"
)

func main() {
client := bankiru.NewClient()
rates, err := client.Rates(bankiru.Novosibirsk)
if err != nil {
panic(err)
}
fmt.Println(rates)
}
```

Console output:

```json
{
"currency": "USD",
"city": "novosibirsk",
"branches": [
{
"bank": "ОП № 029/0000 Филиала \"Газпромбанк\" АО",
"subway": "Заельцовская, Гагаринская, Сибирская",
"currency": "USD",
"buy": 87.1,
"sell": 91.3,
"updated": "2023-07-03T13:00:00+03:00"
},
{
"bank": "ДО № 029/1007 Филиала \"Газпромбанк\" АО",
"subway": "Заельцовская, Берёзовая роща, Гагаринская",
"currency": "USD",
"buy": 87.1,
"sell": 91.3,
"updated": "2023-07-03T13:00:00+03:00"
},
{
"bank": "ДО № 029/1003 Филиала \"Газпромбанк\" АО",
"subway": "Берёзовая роща, Маршала Покрышкина, Золотая Нива",
"currency": "USD",
"buy": 87.1,
"sell": 91.3,
"updated": "2023-07-03T13:00:00+03:00"
}
]
}
```
See [main.go](../../examples/cash/main.go).

## References

For more information check out the following links:

* Cash currency exchange rates by [Banki.ru](https://www.banki.ru/products/currency/map/moskva/) (RU)
21 changes: 21 additions & 0 deletions pkg/bestchange-go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions pkg/bestchange-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Golang client for exchange rate of USDT (TRC20) to RUB cash in Russia

Golang client that provides latest exchange rate of USDRUB cash in largest cities of Russia.

## Example

First, ensure the library is installed and up to date by running

```
go get -u github.com/ivanglie/usdrub-bot/pkg/bestchange-go
```

This is a very simple app that just displays USDRUB exhange rate in Novosibirsk.

```golang
package main

import (
"fmt"

"github.com/ivanglie/usdrub-bot/pkg/bestchange-go"
)

func main() {
client := bestchange.NewClient()
rate, err := client.Rate()
if err != nil {
panic(err)
}
fmt.Println(rate)
}
```

Console output:

```
95.920519
```
See [main.go](../../examples/crypto/main.go).

## References

For more information check out the following links:

* Cash currency exchange rates by [Banki.ru](https://www.banki.ru/products/currency/map/moskva/) (RU)
21 changes: 21 additions & 0 deletions pkg/cbr-go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions pkg/cbr-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Golang client for the Central Bank of the Russian Federation currency rates API

Golang client for the [CBRF](http://www.cbr.ru/development/).

## Example

First, ensure the library is installed and up to date by running

```
go get -u github.com/ivanglie/usdrub-bot/pkg/cbr-go
```

This is a very simple app that just displays exhange rate of US dollar.

```golang
package main

import (
"fmt"
"time"

"github.com/ivanglie/usdrub-bot/pkg/cbr-go"
)

func main() {
client := cbr.NewClient()
rate, err := client.GetRate("USD", time.Now())
if err != nil {
panic(err)
}
fmt.Println(rate)
}
```

Console output:

```
76.8207
```

See [main.go](../../examples/cbr/main.go).

## References

For more information check out the following links:

* [CBRF API](http://www.cbr.ru/development/SXML/)
* [CBRF technical resources](http://www.cbr.ru/eng/development/) (EN)
21 changes: 21 additions & 0 deletions pkg/coingate-go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions pkg/coingate-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Golang client for CoinGate exchange rate API

Golang client for the [CoinGate Exchange](https://developer.coingate.com/docs/get-rate).

## Example

First, ensure the library is installed and up to date by running

```
go get -u github.com/ivanglie/usdrub-bot/pkg/coingate-go
```

This is a very simple app that just displays US Dollar to Chinese Yuan Renminbi conversion.

```golang
package main

import (
"fmt"

"github.com/ivanglie/usdrub-bot/pkg/coingate-go"
)

func main() {
client := coingate.NewClient()
rate, err := client.GetRate("USD", "CNY")
if err != nil {
panic(err)
}
fmt.Println(rate)
}

```
See [main.go](../../examples/coingate/main.go).

## References

For more information check out the following links:

* [CoinGate Exchange Rate API](https://developer.coingate.com/docs/get-rate)
21 changes: 21 additions & 0 deletions pkg/moex-go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 ivanglie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions pkg/moex-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Golang client for Moscow Exchange ISS API

Golang client for the [Moscow Exchange](https://www.moex.com/a2920).

## Example

First, ensure the library is installed and up to date by running

```
go get -u github.com/ivanglie/usdrub-bot/pkg/moex-go
```

This is a very simple app that just displays Chinese Yuan Renminbi to Russian Ruble conversion.

```golang
package main

import (
"fmt"

moex "github.com/ivanglie/usdrub-bot/pkg/moex-go"
)

func main() {
client := moex.NewClient()
rate, err := client.GetRate(moex.CNYRUB)
if err != nil {
panic(err)
}
fmt.Println(rate)
}
```
See [main.go](../../examples/moex/main.go).

## References

For more information check out the following links:

* MOEX ISS API [en](https://www.moex.com/a2920), [ru](https://www.moex.com/a2193)
* [MOEX ISS reference](https://iss.moex.com/iss/reference/)