s:=kumex.NewApiService(
// kumex.ApiBaseURIOption("https://api.kumex.com"), kumex.ApiKeyOption("key"),
kumex.ApiSecretOption("secret"),
kumex.ApiPassPhraseOption("passphrase"),
)
// Or add these options into the environmental variable// Bash: // export API_BASE_URI=https://api.kumex.com// export API_KEY=key// export API_SECRET=secret// export API_PASSPHRASE=passphrase// s := NewApiServiceFromEnv()
Debug mode & logging
// Require package github.com/sirupsen/logrus// Debug mode will record the logs of API and WebSocket to files.// Default values: LogLevel=logrus.DebugLevel, LogDirectory="/tmp"kumex.DebugMode=true// Or export API_DEBUG_MODE=1// Logging in your code// kumex.SetLoggerDirectory("/tmp")// logrus.SetLevel(logrus.DebugLevel)logrus.Debugln("I'm a debug message")
# Add your API configuration items into the environmental variable firstexport API_BASE_URI=https://api.kumex.com
export API_KEY=key
export API_SECRET=secret
export API_PASSPHRASE=passphrase
# Run tests
go test -v