QuantStopExchange
Go library for crypto currency and stock market exchanges.
About The Project
Building financial applications is hard.
QSX provides a simple way to interact with many exchanges, and ensure a common data structure.
Getting Started
Import the library and any vendor exchanges:
import (
"github.com/quantstop/qsx"
"github.com/quantstop/qsx/vendors/coinbasepro"
)
Create an exchange object:
Authentication is only needed for operations that require it.
You may leave the fields empty as blank input strings.
config := &qsx.Config{
Auth: qsx.NewAuth("key", "pass", "secret"),
Sandbox: true,
}
coinbasepro, err := NewExchange(qsx.CoinbasePro, config)
if err != nil {
// handle error
}
Use the exchange object to perform an action:
candles, err := coinbasepro.GetHistoricalCandles(context.TODO(), "BTC-USD", "1m")
if err != nil {
// handle error
}
for _, candle := range candles {
fmt.Println(fmt.Sprintf("Close: %v", candle.Close))
}
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create.
Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request.
You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
License
Distributed under the MIT License. See the full LICENSE for more information.