krinklesaurus / go-p2pb2b

Golang library for the p2bp2b API https://documenter.getpostman.com/view/6288660/SVYxnEmD?version=latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Golang p2pb2b API library

GoDoc

API Docs

p2pb2b API docs can be found here

Usage

package main

import (
	"fmt"
	"os"

	"github.com/krinklesaurus/go-p2pb2b"
)

func main() {
	// create client with api key and api secret
	client, err := p2pb2b.NewClient("API_KEY", "API_SECRET")
	if err != nil {
		fmt.Println(fmt.Sprintf("damn, %v", err))
		os.Exit(1)
	}

	// get ticker
	ticker, err := client.GetTicker("ETH_BTC")
	if err != nil {
		fmt.Println(fmt.Sprintf("damn, %v", err))
		os.Exit(1)
	}
	fmt.Println(fmt.Sprintf("ticker %+v", ticker.Result))
}

Testing

Tests are run with make test. It uses a Docker container to run a sticky Golang version. Coverage can be checked with running make test first and then run make cover.

Contributions

Contributions are welcome. Just open a PR and I will review.

About

Golang library for the p2bp2b API https://documenter.getpostman.com/view/6288660/SVYxnEmD?version=latest

License:MIT License


Languages

Language:Go 98.7%Language:Makefile 1.3%