qTrade API Go
This is an unofficial Go client for the qTrade.io crypto exchange API.
The client provides helpful methods, data structures, and enums to make the experience of using the qTrade API in Go as seamless as possible.
Features
- All documented API methods are implemented
- Automatic HMAC signature generation
- Automatic API error checking and parsing
- Enumerated data types for Markets, Currencies, and Order Types
- Automatic rate limit waiting
- Configurable retries
Documentation
Instantiating a client and making a request is easy:
package main
import (
"context"
"fmt"
"time"
"github.com/Henelik/qtrade-api-go/qtrade/v1"
)
func main() {
config := qtrade.Configuration{
HMACKeypair: "1:111111111111111111111111111",
Endpoint: "https://api.qtrade.io",
Timeout: time.Second * 60,
}
client, err := qtrade.NewClient(config)
if err != nil {
panic(err)
}
balances, err := client.GetBalances(context.Background(), nil)
if err != nil {
panic(err)
}
for _, balance := range balances {
fmt.Printf("Balance for %s: %v", balance.Currency, balance.Balance)
}
}
Please refer to the official documentation for more information.
Planned Features
- Helper functions (e.g. cancel all orders on a given market)
- Improve client documentation