Skip to content

Commit

Permalink
init options client and implement kline/order/exchange/depth services (
Browse files Browse the repository at this point in the history
…adshao#516)

* Initial commit of options support.

* Add unit tests.

* Add options depth support.

* Add options exchange info support.

* Add base options trade support.

* Update batch option create function.

* fix: use origin mod name instead of forked one

* fix code format in options package

---------

Co-authored-by: realcraze <[email protected]>
  • Loading branch information
wayne163 and realcraze authored Oct 18, 2023
1 parent acaa9b4 commit bb34461
Show file tree
Hide file tree
Showing 12 changed files with 2,633 additions and 0 deletions.
6 changes: 6 additions & 0 deletions v2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/adshao/go-binance/v2/common"
"github.com/adshao/go-binance/v2/delivery"
"github.com/adshao/go-binance/v2/futures"
"github.com/adshao/go-binance/v2/options"
)

// SideType define side type of order
Expand Down Expand Up @@ -309,6 +310,11 @@ func NewDeliveryClient(apiKey, secretKey string) *delivery.Client {
return delivery.NewClient(apiKey, secretKey)
}

// NewOptionsClient initialize client for options API
func NewOptionsClient(apiKey, secretKey string) *options.Client {
return options.NewClient(apiKey, secretKey)
}

type doFunc func(req *http.Request) (*http.Response, error)

// Client define API client
Expand Down
Loading

0 comments on commit bb34461

Please sign in to comment.