A clean, strongly typed, and fully documented Go SDK for interacting with the Tabdeal exchange API.
This SDK provides strict typed models, request signing, public/private endpoints, and predictable behavior with minimal abstraction.
This SDK is unofficial. Use at your own risk.
- Full support for Tabdeal public & authenticated endpoints
- Strongly typed request/response structs
- Simple API key + secret authentication
- Request signing (HMAC-SHA256)
- Order placement, cancellation, bulk cancellation
- Wallets, trades, order history
- Order book & recent trades
- Fully structured error handling (
APIError,RequestError)
go get github.com/darhelm/go-tabdealpackage main
import (
"fmt"
"time"
tabdeal "github.com/darhelm/go-tabdeal"
)
func main() {
client, err := tabdeal.NewClient(tabdeal.ClientOptions{
ApiKey: "YOUR_KEY",
ApiSecret: "YOUR_SECRET",
Timeout: 5 * time.Second,
})
if err != nil {
panic(err)
}
info, err := client.GetMarketInformation()
if err != nil {
panic(err)
}
fmt.Println((*info)[0].Symbol)
}- SDK Reference: https://pkg.go.dev/github.com/darhelm/go-tabdeal
- Tabdeal API Docs: https://docs.tabdeal.org/
- Full examples:
EXAMPLES.md
client, err := tabdeal.NewClient(tabdeal.ClientOptions{
ApiKey: "KEY",
ApiSecret: "SECRET",
Timeout: 5 * time.Second,
})info, err := client.GetMarketInformation()
fmt.Println((*info)[0].Symbol)ob, err := client.GetOrderBook(types.GetOrderBookParams{
Symbol: "BTCIRT",
})
fmt.Println(ob.Asks[0], ob.Bids[0])trades, err := client.GetRecentTrades(types.GetRecentTradesParams{
Symbol: "BTCIRT",
})wallets, err := client.GetWallets(types.GetWalletParams{
Asset: "USDT",
})resp, err := client.CreateOrder(types.CreateOrderParams{
Symbol: "BTCIRT",
Side: "BUY",
Type: "LIMIT",
Quantity: 0.01,
Price: 1500000000,
})cancel, err := client.CancelOrder(types.CancelOrderParams{
Symbol: "BTCIRT",
OrderId: 1234,
})bulk, err := client.CancelOrderBulk(types.CancelOrderBulkParams{
Symbol: "BTCIRT",
})history, err := client.GetOrdersHistory(types.GetUserOrdersHistoryParams{
Symbol: "BTCIRT",
})open, err := client.GetOpenOrders(types.GetOpenOrdersParams{
Symbol: "BTCIRT",
})st, err := client.GetOrderStatus(types.GetOrderStatusParams{
OrderId: 1234,
})trades, err := client.GetUserTrades(types.GetUserTradesParams{
Symbol: "BTCIRT",
})if err != nil {
if apiErr, ok := err.(*tabdeal.APIError); ok {
fmt.Println(apiErr.Code, apiErr.Message, apiErr.Detail)
}
}MIT License.