Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

소개

upbit-go 는 upbit api를 이용한 라이브러리 패키지 입니다.

내부적으로 jwt 는 "github.com/dgrijalva/jwt-go", uuid 는 "github.com/google/uuid" 패키지를 사용합니다.

또한 요청 수 제한에 대한 처리는 하지 않고 API 마다 Remaining 구조체를 반환합니다. 개발시 참고 바랍니다.

설치

go get -u github.com/sangx2/upbit

Getting started

더 많은 테스트 예문은 _test 이름을 가진 파일들을 참고 바랍니다.

Exchange API

package main

import (
	"fmt"

	"github.com/sangx2/upbit"
)

func main() {
	u := upbit.NewUpbit("AccessKey", "SecretKey")

	accounts, remaining, e := u.GetAccounts()
	if e != nil {
		fmt.Println("GetAccounts error : %s", e.Error())
	} else {
		fmt.Printf("GetAccounts[remaining:%+v]\n", *remaining)
		for _, account := range accounts {
			fmt.Printf("%+v\n", *account)
		}
	}
}

Quotation API

Quotation API 는 "AccessKey"와 "SecretKey"가 필요하지 않습니다.

package main

import (
	"fmt"

	"github.com/sangx2/upbit"
)

func main() {
    u := upbit.NewUpbit("", "")

	markets, remaining, e := u.GetMarkets()
	if e != nil {
		fmt.Println("GetMarkets error : %s", e.Error())
	} else {
		fmt.Printf("GetMarkets[remaining:%+v]\n", *remaining)
		for _, market := range markets {
			fmt.Printf("%+v\n", *market)
		}
	}
}

About

업비트 open api를 이용한 go 라이브러리

Topics

Resources

Stars

17 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages