-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
160 additions
and
116 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package binance | ||
package cast | ||
|
||
import ( | ||
"strconv" | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package binance | ||
package cast | ||
|
||
import ( | ||
"strconv" | ||
|
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,84 @@ | ||
package models | ||
|
||
import "github.com/dasbd72/go-exchange-sdk/binance/pkg/cast" | ||
|
||
type ( | ||
GetPingResponse struct { | ||
} | ||
|
||
GetServerTimeResponse struct { | ||
ServerTime int64 `json:"serverTime"` | ||
} | ||
|
||
GetExchangeInfoResponse struct { | ||
Timezone string `json:"timezone"` | ||
ServerTime int64 `json:"serverTime"` | ||
RateLimits []interface{} | ||
ExchangeFilters []interface{} | ||
Symbols []struct { | ||
Symbol string `json:"symbol"` | ||
Status string `json:"status"` | ||
BaseAsset string `json:"baseAsset"` | ||
BaseAssetPrecision int `json:"baseAssetPrecision"` | ||
QuoteAsset string `json:"quoteAsset"` | ||
QuotePrecision int `json:"quotePrecision"` | ||
QuoteAssetPrecision int `json:"quoteAssetPrecision"` | ||
OrderTypes []string `json:"orderTypes"` | ||
IcebergAllowed bool `json:"icebergAllowed"` | ||
OcoAllowed bool `json:"ocoAllowed"` | ||
QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` | ||
AllowTrailingStop bool `json:"allowTrailingStop"` | ||
CancelReplaceAllowed bool `json:"cancelReplaceAllowed"` | ||
IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` | ||
IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` | ||
Filters []interface{} `json:"filters"` | ||
Permissions []string `json:"permissions"` | ||
DefaultSelfTradePreventionMode string `json:"defaultSelfTradePreventionMode"` | ||
AllowedSelfTradePreventionModes []string `json:"allowedSelfTradePreventionModes"` | ||
} | ||
} | ||
|
||
GetOrderBookRequest struct { | ||
params map[string]interface{} | ||
} | ||
|
||
GetOrderBookResponse struct { | ||
LastUpdateID int64 `json:"lastUpdateId"` | ||
Bids [][]cast.JSONFloat64 `json:"bids"` | ||
Asks [][]cast.JSONFloat64 `json:"asks"` | ||
} | ||
|
||
GetAveragePriceRequest struct { | ||
params map[string]interface{} | ||
} | ||
|
||
GetAveragePriceResponse struct { | ||
Mins int `json:"mins"` | ||
Price cast.JSONFloat64 `json:"price"` | ||
CloseTime int64 `json:"closeTime"` | ||
} | ||
) | ||
|
||
func NewGetOrderBookRequest(symbol string) *GetOrderBookRequest { | ||
return &GetOrderBookRequest{ | ||
params: map[string]interface{}{ | ||
"symbol": symbol, | ||
}, | ||
} | ||
} | ||
|
||
func (data *GetOrderBookRequest) Params() map[string]interface{} { | ||
return data.params | ||
} | ||
|
||
func NewGetAveragePriceRequest(symbol string) *GetAveragePriceRequest { | ||
return &GetAveragePriceRequest{ | ||
params: map[string]interface{}{ | ||
"symbol": symbol, | ||
}, | ||
} | ||
} | ||
|
||
func (data *GetAveragePriceRequest) Params() map[string]interface{} { | ||
return data.params | ||
} |
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,16 @@ | ||
package models | ||
|
||
import "github.com/dasbd72/go-exchange-sdk/binance/pkg/cast" | ||
|
||
type ( | ||
GetWalletStatusResponse struct { | ||
Status int `json:"status"` | ||
Msg string `json:"msg"` | ||
} | ||
|
||
GetUserWalletBalanceResponse []struct { | ||
Activate bool `json:"activate"` | ||
Balance cast.JSONFloat64 `json:"balance"` // in BTC | ||
WalletName string `json:"walletName"` | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.