2023-11-06 00:55:41 +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))
|
2023-11-06 01:16:08 +02:00
|
|
|
params := map[string]interface{}{"accountType": "UNIFIED", "category": "linear"}
|
|
|
|
accountResult, err := client.NewAccountService(params).GetTransactionLog(context.Background())
|
2023-11-06 00:55:41 +02:00
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
return
|
|
|
|
}
|
2023-11-06 01:16:08 +02:00
|
|
|
fmt.Println(bybit.PrettyPrint(accountResult))
|
2023-11-06 00:55:41 +02:00
|
|
|
}
|