Upbit API Client written in Golang
go get -u github.com/hexoul/go-upbit
- As library, start from
upbit.GetInstanceWithKey('YOUR_ACCESS_KEY', 'YOUR_SECRET_KEY')
- As program, start from
upbit.GetInstance()
after executinggo run -upbit:accesskey=[YOUR_ACCESS_KEY] -upbit:secretkey=[YOUR_SECRET_KEY]
package main
import (
"fmt"
upbit "github.com/hexoul/go-upbit"
)
func init() {
upbit.GetInstanceWithKey("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY")
}
func main() {
if ret, err := upbit.GetInstance().Accounts(); err == nil {
for _, v := range ret {
fmt.Println(v.Currency, v.Balance, v.Locked)
}
}
}
Type | Method | Endpoint | Done |
---|---|---|---|
Asset | GET | /v1/accounts | ✔ |
Order | GET | /v1/orders/chance | - |
Order | GET | /v1/orders | ✔ |
Order | GET | /v1/order | - |
Order | POST | /v1/order | - |
Order | DELETE | /v1/order | - |