String concatenation/conversion/formatting improvements (#393)

* Magic strings

* Comment, format and builder fixes
This commit is contained in:
lozdog245
2019-12-09 11:44:01 +11:00
committed by Adrian Gallagher
parent 17a786536d
commit 8c30505d46
32 changed files with 122 additions and 128 deletions

View File

@@ -327,9 +327,8 @@ func (b *Bitmex) GetCurrentNotifications() ([]Notification, error) {
// GetOrders returns all the orders, open and closed
func (b *Bitmex) GetOrders(params *OrdersRequest) ([]Order, error) {
var orders []Order
return orders, b.SendAuthenticatedHTTPRequest(http.MethodGet,
fmt.Sprintf("%v%v", bitmexEndpointOrder, ""),
bitmexEndpointOrder,
params,
&orders)
}

View File

@@ -434,7 +434,7 @@ func (b *Bitmex) GenerateDefaultSubscriptions() {
for i := range channels {
for j := range allPairs {
subscriptions = append(subscriptions, wshandler.WebsocketChannelSubscription{
Channel: fmt.Sprintf("%v:%v", channels[i], allPairs[j].String()),
Channel: channels[i] + ":" + allPairs[j].String(),
Currency: allPairs[j],
})
}
@@ -474,7 +474,7 @@ func (b *Bitmex) GenerateAuthenticatedSubscriptions() {
for i := range channels {
for j := range contracts {
subscriptions = append(subscriptions, wshandler.WebsocketChannelSubscription{
Channel: fmt.Sprintf("%v:%v", channels[i], contracts[j].String()),
Channel: channels[i] + ":" + contracts[j].String(),
Currency: contracts[j],
})
}