mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* expose auth validator functionality for wrapper * Add REST validation after keys set, package account types for future syncing * Add transient error checking for initial creddemtial validation * fix command types * Addressed nits from glorious person * Amalgamate body within error when not between 2xx status, added btcmarket specific auth error check * nit fix for glorious person * Format fix * removed unused code * check transient first then validate if its an exchange specific authentication error, all others will be disregarded * Addressed glorious nits * Addressed glorious nits * Moved account processing to updateaccountinfo func and added in fetch account info * Add GRPC Account streaming (NOTE: could not complete until sync item added) * RM exchange check * Address xtda nits * RM comment code * Fix linter issues * used most recent protoc version * lbank linter issues fixed * Addressed nits and changed len check to range in for loops * Fixed timeout issue * thrasher nits addressed * add string holdings
47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
package engine
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/thrasher-corp/gocryptotrader/exchanges/account"
|
|
"github.com/thrasher-corp/gocryptotrader/exchanges/orderbook"
|
|
"github.com/thrasher-corp/gocryptotrader/exchanges/ticker"
|
|
)
|
|
|
|
// Route is a sub type that holds the request routes
|
|
type Route struct {
|
|
Name string
|
|
Method string
|
|
Pattern string
|
|
HandlerFunc http.HandlerFunc
|
|
}
|
|
|
|
// AllEnabledExchangeOrderbooks holds the enabled exchange orderbooks
|
|
type AllEnabledExchangeOrderbooks struct {
|
|
Data []EnabledExchangeOrderbooks `json:"data"`
|
|
}
|
|
|
|
// EnabledExchangeOrderbooks is a sub type for singular exchanges and respective
|
|
// orderbooks
|
|
type EnabledExchangeOrderbooks struct {
|
|
ExchangeName string `json:"exchangeName"`
|
|
ExchangeValues []orderbook.Base `json:"exchangeValues"`
|
|
}
|
|
|
|
// AllEnabledExchangeCurrencies holds the enabled exchange currencies
|
|
type AllEnabledExchangeCurrencies struct {
|
|
Data []EnabledExchangeCurrencies `json:"data"`
|
|
}
|
|
|
|
// EnabledExchangeCurrencies is a sub type for singular exchanges and respective
|
|
// currencies
|
|
type EnabledExchangeCurrencies struct {
|
|
ExchangeName string `json:"exchangeName"`
|
|
ExchangeValues []ticker.Price `json:"exchangeValues"`
|
|
}
|
|
|
|
// AllEnabledExchangeAccounts holds all enabled accounts info
|
|
type AllEnabledExchangeAccounts struct {
|
|
Data []account.Holdings `json:"data"`
|
|
}
|