bybit.go.api/examples/user/create_sub_user.go

23 lines
533 B
Go
Raw Normal View History

2023-11-06 02:08:54 +02:00
package main
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
func main() {
PlaceTrade()
}
func PlaceTrade() {
client := bybit.NewBybitHttpClient("8wYkmpLsMg10eNQyPm", "Ouxc34myDnXvei54XsBZgoQzfGxO4bkr2Zsj", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"username": "wuhe06112023Vic", "memberType": 1}
userResult, err := client.NewUserService(params).CreateSubMember(context.Background())
if err != nil {
fmt.Println(err)
return
}
fmt.Println(bybit.PrettyPrint(userResult))
}