qsx

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 6 Imported by: 0

README

Contributors Forks Stargazers Issues MIT License

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See the full LICENSE for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedExchanges

func GetSupportedExchanges() []qsx.Name

GetSupportedExchanges returns a list of all the supported exchanges

func NewExchange

func NewExchange(name qsx.Name, config *qsx.Config) (qsx.IExchange, error)

NewExchange creates an exchange connection and returns a struct that implements the IExchange interface

Types

This section is empty.

Directories

Path Synopsis
qsx
vendors

Jump to

Keyboard shortcuts

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