Market V3 · Crypto V4 · WebSocket

Bitkub's whole API.
One Go module.

Read Thai baht crypto prices, stream live tickers and manage your Bitkub account from Go code or a 33-command CLI. Signing and server-time sync are done for you, and market data needs no API key.

go install github.com/dvgamerr-app/go-bitkub/cmd/bitkub@latest
Terminal running bitkub market depth btc_thb --limit 5, listing five bids and five asks with price and volume Terminal running bitkub market ticker btc_thb, printing last price, 24 hour high and low, change and volume

Everything Bitkub exposes, typed.

Every function returns Go structs and every CLI command takes the same flags. Public data needs nothing; account features need one key pair.

PUBLIC no API keyKEY needs BTK_APIKEY and BTK_SECRET
public

Market data

Symbols, ticker, depth, bids, asks, recent trades and TradingView candles.

public

Live streams

WebSocket trade, ticker and order-book streams that reconnect on their own.

key

Trading

Place, cancel and look up buy and sell orders, open orders and history.

key

Balances

Wallet and detailed balances, including amounts reserved by open orders.

key

Crypto V4

Deposit addresses, deposits, withdrawals, coins and networks, compensations.

key

Fiat and user

Bank accounts, THB deposit and withdrawal history, limits and trading credits.

cli

Pipe-ready output

--format text, json or jsonl on every command, ready for jq and cron.

cli

Prebuilt binaries

Linux and macOS on amd64 and arm64, Windows on amd64. No Go needed.

Running in under a minute.

Pick the install that fits your machine, then read the market straight away. Keys are only for your own account.

  1. Install the CLI

    One go install, or a prebuilt binary from the latest release.

  2. Read the market

    bitkub market ticker btc_thb works with no account and no configuration.

  3. Connect your account

    Export BTK_APIKEY and BTK_SECRET, or put them in a .env file, to unlock balances, orders and transfers.

# Go 1.26 or newer
$ go install github.com/dvgamerr-app/go-bitkub/cmd/bitkub@latest
$ bitkub market ticker btc_thb

Full options, PATH setup and uninstalling: install guide.

Or call it from Go.

Import a package per API area. Public calls work immediately; bitkub.Initlizer() reads your keys from the environment for everything else.

go get github.com/dvgamerr-app/go-bitkub

Every function with an example is in the SDK reference. Streams are covered in the stream guide.

tickers, err := market.GetTicker("btc_thb")
if err != nil {
	log.Fatal(err)
}
fmt.Printf("BTC/THB %.2f\n", tickers[0].Last)

// reads BTK_APIKEY and BTK_SECRET
bitkub.Initlizer()
balances, err := market.GetBalances()

s := stream.New(nil)
s.ConnectMarket("market.ticker.thb_btc")
for msg := range s.Messages() {
	fmt.Println(msg.Type, msg.Data)
}

Output you can read, or pipe.

Readable logs by default, JSON when a script is listening.

Useful? Leave a star.

go-bitkub is free and MIT licensed. A star helps other developers building on Bitkub find it, and issues tell us which endpoint to cover next.