Liquid by Quoine API version2
go-liquid is a go client library for Liquid by Quoine API.
$ go get -u github.com/go-numb/go-liquid
package main
import (
"fmt"
"github.com/go-numb/go-liquid"
)
func main() {
client := liquid.New("<tokenID number>", "<secretkey>", nil)
fiat, err := client.GetFiatAccounts()
if err != nil {
fmt.Println(err)
}
fmt.Printf("%v\n", fiat)
doSomething()
}
package main
import (
"fmt"
"github.com/go-numb/go-liquid"
)
func Method(t *testing.T) {
done := make(chan struct{})
// for recive response data
realtime := NewConnect()
// Connect is reading channels in for loop
go realtime.Connect([]string{PUSHERchEXECUTION, PUSHERchASK, PUSHERchBID}, []string{BTCJPY, ETHJPY})
// use result data
// data in struct
for {
select {
case result := <-realtime.Results:
fmt.Printf("result: %+v\n", result)
}
}
<-done
}