2024-02-22 19:19:26 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
2024-06-03 23:07:14 +03:00
|
|
|
|
|
|
|
bybit "gitea.computernetthings.ru/yash/bybit.go.api"
|
2024-02-22 19:19:26 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
GetCoinInfo()
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetCoinInfo() {
|
|
|
|
client := bybit.NewBybitHttpClient("8wYkmpLsMg10eNQyPm", "Ouxc34myDnXvei54XsBZgoQzfGxO4bkr2Zsj", bybit.WithBaseURL(bybit.TESTNET))
|
|
|
|
params := map[string]interface{}{"coin": "USDT"}
|
|
|
|
assetResult, err := client.NewAssetService(params).GetCoinInfo(context.Background())
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
fmt.Println(bybit.PrettyPrint(assetResult))
|
|
|
|
}
|