mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-20 15:10:10 +00:00
FTX: Add REST staking and basic subaccount functionality (#692)
* Add FTX staking, missing margin APIs and basic subaccount support * Fix backtester tests and add optional subaccount support to exchange_wrapper_issues tool * subAccount to subaccount * Fix TyPo * Expand test coverage * Address nitterinos * Fix typos * Remove unusued error type
This commit is contained in:
@@ -109,6 +109,7 @@ See below for a set of tables and fields, expected values and what they can do
|
||||
| APISecretOverride | Will set the GoCryptoTrader exchange to use the following API Secret | `5678` |
|
||||
| APIClientIDOverride | Will set the GoCryptoTrader exchange to use the following API Client ID | `9012` |
|
||||
| API2FAOverride | Will set the GoCryptoTrader exchange to use the following 2FA seed | `hello-moto` |
|
||||
| APISubaccountOverride | Will set the GoCryptoTrader exchange to use the following subaccount on supported exchanges | `subzero` |
|
||||
| RealOrders | Whether to place real orders. You really should never consider using this. Ever ever. | `true` |
|
||||
|
||||
##### Leverage Settings
|
||||
|
||||
@@ -227,6 +227,10 @@ func setExchangeAPIKeys(name string, keys map[string]*config.APICredentialsConfi
|
||||
if keys[lowerExchangeName].OTPSecret != "-" {
|
||||
base.Config.API.Credentials.OTPSecret = keys[lowerExchangeName].OTPSecret
|
||||
}
|
||||
if keys[lowerExchangeName].Subaccount != "" {
|
||||
base.API.Credentials.Subaccount = keys[lowerExchangeName].Subaccount
|
||||
base.Config.API.Credentials.Subaccount = keys[lowerExchangeName].Subaccount
|
||||
}
|
||||
|
||||
base.API.AuthenticatedSupport = true
|
||||
base.API.AuthenticatedWebsocketSupport = true
|
||||
|
||||
@@ -35,14 +35,6 @@ type Config struct {
|
||||
Exchanges map[string]*config.APICredentialsConfig `json:"exchanges"`
|
||||
}
|
||||
|
||||
// Key is the format for wrapperconfig.json to store API credentials
|
||||
type Key struct {
|
||||
APIKey string `json:"apiKey"`
|
||||
APISecret string `json:"apiSecret,omitempty"`
|
||||
ClientID string `json:"clientId,omitempty"`
|
||||
OTPSecret string `json:"otpSecret,omitempty"`
|
||||
}
|
||||
|
||||
// ExchangeResponses contains all responses
|
||||
// associated with an exchange
|
||||
type ExchangeResponses struct {
|
||||
|
||||
Reference in New Issue
Block a user