-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from binance/rc-v0.7.0
Release v0.7.0
- Loading branch information
Showing
22 changed files
with
634 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ package binance_connector | |
|
||
const Name = "binance-connector-go" | ||
|
||
const Version = "0.6.0" | ||
const Version = "0.7.0" |
30 changes: 30 additions & 0 deletions
30
examples/fiat/GetFiatDepositWithdrawHistory/GetFiatDepositWithdrawHistory.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
binance_connector "github.com/binance/binance-connector-go" | ||
) | ||
|
||
func main() { | ||
GetFiatDepositWithdrawHistory() | ||
} | ||
|
||
func GetFiatDepositWithdrawHistory() { | ||
apiKey := "your api key" | ||
secretKey := "your secret key" | ||
baseURL := "https://api.binance.com" | ||
|
||
client := binance_connector.NewClient(apiKey, secretKey, baseURL) | ||
|
||
// GetFiatDepositWithdrawHistoryService - /sapi/v1/fiat/orders | ||
getFiatDepositWithdrawHistory, err := client.NewGetFiatDepositWithdrawHistoryService(). | ||
TransactionType("0"). | ||
Do(context.Background()) | ||
if err != nil { | ||
fmt.Println(err) | ||
return | ||
} | ||
fmt.Println(binance_connector.PrettyPrint(getFiatDepositWithdrawHistory)) | ||
} |
30 changes: 30 additions & 0 deletions
30
examples/fiat/GetFiatPaymentHistory/GetFiatPaymentHistory.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
binance_connector "github.com/binance/binance-connector-go" | ||
) | ||
|
||
func main() { | ||
GetFiatPaymentHistory() | ||
} | ||
|
||
func GetFiatPaymentHistory() { | ||
apiKey := "your api key" | ||
secretKey := "your secret key" | ||
baseURL := "https://api.binance.com" | ||
|
||
client := binance_connector.NewClient(apiKey, secretKey, baseURL) | ||
|
||
// GetFiatPaymentHistoryService - /sapi/v1/fiat/payments | ||
getFiatPaymentHistory, err := client.NewGetFiatPaymentHistoryService(). | ||
TransactionType("0"). | ||
Do(context.Background()) | ||
if err != nil { | ||
fmt.Println(err) | ||
return | ||
} | ||
fmt.Println(binance_connector.PrettyPrint(getFiatPaymentHistory)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
binance_connector "github.com/binance/binance-connector-go" | ||
) | ||
|
||
func main() { | ||
WsMarketMiniTickers() | ||
} | ||
|
||
func WsMarketMiniTickers() { | ||
websocketStreamClient := binance_connector.NewWebsocketStreamClient(false) | ||
wsMarketMiniTickersHandler := func(event binance_connector.WsMarketMiniTickerStatEvent) { | ||
fmt.Println(binance_connector.PrettyPrint(event)) | ||
} | ||
errHandler := func(err error) { | ||
fmt.Println(err) | ||
} | ||
doneCh, stopCh, err := websocketStreamClient.WsMarketMiniTickersStatServe("BNBBTC", wsMarketMiniTickersHandler, errHandler) | ||
if err != nil { | ||
fmt.Println(err) | ||
return | ||
} | ||
// use stopCh to exit | ||
go func() { | ||
time.Sleep(10 * time.Second) | ||
stopCh <- struct{}{} | ||
}() | ||
<-doneCh | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.