A Golang cryptocurrency websocket trading API with support for more than 10 bitcoin/altcoin exchanges
This project has achieved 100% self-test code coverage. You can find usage examples in the _test files within each directory.
package main
import (
"github.com/conbanwa/exws"
"github.com/conbanwa/exws/build"
"github.com/conbanwa/exws/config"
)
//创建api
func NewCryptoMarket() exws.API {
config.UseProxy = "localhost:7890"
api := build.DefaultAPIBuilder.APIKey(apiKey).APISecretkey(Secretkey).ApiPassphrase(phrase).Build("alias")
return api
}
//使用创建的api
func main() {
api := NewCryptoMarket()
name := api.String()
pairs, err := api.PairArray()
allTicker, err := api.AllTicker()
fees, err := api.TradeFee()
}