Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.35 KB

README.md

File metadata and controls

45 lines (35 loc) · 1.35 KB

go-bitflyer

Build Status Coverage Status GoDoc License: MIT

go-bitflyer is a Go bindings for bitFlyer Lightning API.

Usage

package main

import (
  "log"

  "github.com/kkohtaka/go-bitflyer/pkg/api/auth"
  "github.com/kkohtaka/go-bitflyer/pkg/api/v1"
  "github.com/kkohtaka/go-bitflyer/pkg/api/v1/markets"
  "github.com/kkohtaka/go-bitflyer/pkg/api/v1/permissions"
)

func main() {
  client := v1.NewClient(&v1.ClientOpts{
    AuthConfig: &auth.AuthConfig{
      APIKey:    "**********************",
      APISecret: "********************************************",
    },
  })

  if resp, err := client.Permissions(&permissions.Request{}); err != nil {
    log.Fatalln(err)
  } else {
    log.Println(resp)
  }

  if resp, err := client.Markets(&markets.Request{}); err != nil {
    log.Fatalln(err)
  } else {
    log.Println(resp)
  }
}