Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed Mar 3, 2025
1 parent 0f9854d commit 731e263
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### go-binance

A Golang SDK for [binance](https://www.binance.com) API.
A Golang SDK for [binance](https://accounts.binance.com/register?ref=PGDFCE46) API.

[![Telegram Chat](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/gobinancegroup)
[![Build Status](https://travis-ci.org/adshao/go-binance.svg?branch=master)](https://travis-ci.org/adshao/go-binance)
[![GoDoc](https://godoc.org/github.com/adshao/go-binance?status.svg)](https://godoc.org/github.com/adshao/go-binance)
[![Go Report Card](https://goreportcard.com/badge/github.com/adshao/go-binance)](https://goreportcard.com/report/github.com/adshao/go-binance)
Expand All @@ -13,6 +14,12 @@ For best compatibility, please use Go >= 1.8.

Make sure you have read binance API document before continuing.


## Community
Join our growing community on Telegram to get help, or just chat!

[![Telegram Chat](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/gobinancegroup)

### API List

Name | Description | Status
Expand All @@ -23,9 +30,9 @@ Name | Description | Status
[margin-api.md](https://binance-docs.github.io/apidocs/spot/en) | Details on the Margin API (/sapi) | <input type="checkbox" checked> Implemented
[futures-api.md](https://binance-docs.github.io/apidocs/futures/en/#general-info) | Details on the Futures API (/fapi) | <input type="checkbox" checked> Implemented
[delivery-api.md](https://binance-docs.github.io/apidocs/delivery/en/#general-info) | Details on the Coin-M Futures API (/dapi) | <input type="checkbox" checked> Implemented
[options-api.md](https://binance-docs.github.io/apidocs/voptions/en/#general-info) | Details on the Options API(/eapi) | <input type="checkbox" checked> Implemented
[options-api.md](https://binance-docs.github.io/apidocs/voptions/en/#general-info) | Details on the Options API(/eapi) | <input type="checkbox" checked> Implemented



If you find an unimplemented interface, please submit an issue. It's great if you can open a PR to fix it.

### Installation
Expand All @@ -46,7 +53,7 @@ go get github.com/adshao/go-binance/v1
import (
// for spot and other interfaces contained in https://binance-docs.github.io/apidocs/spot/en/#change-log
"github.com/adshao/go-binance/v2"

"github.com/adshao/go-binance/v2/futures" // optional package
"github.com/adshao/go-binance/v2/delivery" // optional package
"github.com/adshao/go-binance/v2/options" // optional package
Expand Down Expand Up @@ -82,12 +89,12 @@ Following are some simple examples, please refer to [godoc](https://godoc.org/gi
If you have any questions, please refer to the specific version of the code for specific reference definitions or usage methods

##### Proxy Client

```
proxyUrl := "http://127.0.0.1:7890" // Please replace it with your exact proxy URL.
client := binance.NewProxiedClient(apiKey, apiSecret, proxyUrl)
```


#### Create Order

Expand Down Expand Up @@ -243,7 +250,7 @@ If you want to use a proxy, you can set `HTTPS_PROXY` or `HTTP_PROXY` in the env
binance.SetWsProxyUrl("http://127.0.0.1:7890")
binance.WsDepthServe("LTCBTC", wsDepthHandler, errHandler)
```

#### Depth

```golang
Expand Down Expand Up @@ -432,13 +439,13 @@ func main() {

func listenOrderPlaceResponse(ctx context.Context, wg *sync.WaitGroup, orderPlaceService *futures.OrderPlaceWsService) {
defer wg.Done()

go func() {
for msg := range orderPlaceService.GetReadChannel() {
log.Println("order place response", string(msg))
}
}()

go func() {
for err := range orderPlaceService.GetReadErrorChannel() {
log.Println("order place error", err)
Expand All @@ -455,7 +462,7 @@ func listenOrderPlaceResponse(ctx context.Context, wg *sync.WaitGroup, orderPlac
```go
func main() {
orderPlaceService, _ := futures.NewOrderPlaceWsService(apiKey, secretKey)

id := "some-id"
request := futures.NewOrderPlaceWsRequest()
request.
Expand All @@ -470,11 +477,19 @@ func main() {
if err != nil {
log.Fatal(err)
}

// handle response
}
```

## Check out some of the other packages

- Check out [CCXT](https://github.com/ccxt/ccxt) for more than 100 crypto exchanges with a unified trading API.
- Check out [Python-Binance](https://github.com/sammchardy/python-binance) for a complete Python Wrapper.
- Check out [Node-Binance-API] (https://github.com/carlosmiei/node-binance-api) for a node.js sdk.
- Check out [Binance-Trade-Bot] (https://github.com/ccxt/binance-trade-bot) for a binance bot in python





0 comments on commit 731e263

Please sign in to comment.