23 lines
506 B
Go
23 lines
506 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
bybit "github.com/wuhewuhe/bybit.go.api"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
AssetInfo()
|
||
|
}
|
||
|
|
||
|
func AssetInfo() {
|
||
|
client := bybit.NewBybitHttpClient("8wYkmpLsMg10eNQyPm", "Ouxc34myDnXvei54XsBZgoQzfGxO4bkr2Zsj", bybit.WithBaseURL(bybit.TESTNET))
|
||
|
params := map[string]interface{}{"accountType": "spot"}
|
||
|
assetResult, err := client.NewAssetService(params).GetAssetInfo(context.Background())
|
||
|
if err != nil {
|
||
|
fmt.Println(err)
|
||
|
return
|
||
|
}
|
||
|
fmt.Println(bybit.PrettyPrint(assetResult))
|
||
|
}
|