gobybit

module
v0.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2024 License: MIT

README

gobybit

gobybit is a Go module for using the ByBit's Rest & Websocket API

Documentation

Full API, examples, and implementation notes are available in the Go documentation.

Go Reference

Installation
go get github.com/ginarea/gobybit@latest
Import
import "github.com/ginarea/gobybit/bybitv5"
Example
package main

import (
    "fmt"
    "reflect"

    "github.com/ginarea/gobybit/bybitv5"
)

func main() {
    apiKey := "XXXXX"
    apiSecret := "XXXXX"

    client := bybitv5.NewClient().WithAuth(apiKey, apiSecret)

    responce(client.GetInstruments(bybitv5.GetInstruments{
        Category: bybitv5.Inverse,
        Symbol:   "BTCUSD",
    }))

    responce(client.GetTickers(bybitv5.GetTickers{
        Category: bybitv5.Inverse,
        Symbol:   "ETHUSD",
    }))

    responce(client.GetOrderbook(bybitv5.GetOrderbook{
        Category: bybitv5.Spot,
        Symbol:   "ETHUSDT",
    }))
}

func responce[T any](r bybitv5.Response[T]) {
    fmt.Printf("%v: %+v\n", reflect.TypeOf(r), r)
}

Directories

Path Synopsis
account
Account Asset (https://bybit-exchange.github.io/docs/account_asset/#t-introduction)
Account Asset (https://bybit-exchange.github.io/docs/account_asset/#t-introduction)
derivatives
Derivatives (https://bybit-exchange.github.io/docs/derivativesV3/unified_margin/#t-introduction)
Derivatives (https://bybit-exchange.github.io/docs/derivativesV3/unified_margin/#t-introduction)
ifutures
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/inverse_futures/#t-accountdata)
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/inverse_futures/#t-accountdata)
iperpetual
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-accountdata)
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-accountdata)
spot
Account Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-accountdata)
Account Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-accountdata)
spotv3
Account Data Endpoints (https://bybit-exchange.github.io/docs/spot/v3/#t-accountdata)
Account Data Endpoints (https://bybit-exchange.github.io/docs/spot/v3/#t-accountdata)
uperpetual
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/linear/#t-accountdata)
Account Data Endpoints (https://bybit-exchange.github.io/docs/futuresV2/linear/#t-accountdata)
v5
v5 (https://bybit-exchange.github.io/docs/v5/intro)
v5 (https://bybit-exchange.github.io/docs/v5/intro)
Enums Definitions (https://bybit-exchange.github.io/docs/v5/enum)
Enums Definitions (https://bybit-exchange.github.io/docs/v5/enum)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL