Skip to content

Commit

Permalink
feat: added proxy env for webscoket connection, unit/integration test…
Browse files Browse the repository at this point in the history
…s, sync write method and support 3 sign functions
  • Loading branch information
Artur Abelian committed Sep 23, 2024
1 parent c55a152 commit 2c5c386
Show file tree
Hide file tree
Showing 15 changed files with 1,654 additions and 484 deletions.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ BinanceClient = delivery.NewClient(ApiKey, SecretKey)
```

#### Websocket client
Order place
##### Order place
##### Async write/read
```go
func main() {
orderPlaceService, _ := futures.NewOrderPlaceWsService(apiKey, secretKey)
Expand Down Expand Up @@ -450,5 +451,30 @@ func listenOrderPlaceResponse(ctx context.Context, wg *sync.WaitGroup, orderPlac
}
}
```
##### Sync write/read
```go
func main() {
orderPlaceService, _ := futures.NewOrderPlaceWsService(apiKey, secretKey)

id := "some-id"
request := futures.NewOrderPlaceWsRequest()
request.
Symbol("BTCUSDT").
Side(futures.SideTypeSell).
Type(futures.OrderTypeLimit).
Price("68198.00").
Quantity("0.002").
TimeInForce(futures.TimeInForceTypeGTC)

response, err := orderPlaceService.SyncDo(id, request)
if err != nil {
log.Fatal(err)
}

// handle response
}
```




Loading

0 comments on commit 2c5c386

Please sign in to comment.