Git Product home page Git Product logo

upbit's Introduction

소개

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)
		}
	}
}

upbit's People

Contributors

sangx2 avatar aerialcombat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.