diff --git a/schema/active_symbols.go b/schema/active_symbols.go index 7cdf2fe..e985e0f 100644 --- a/schema/active_symbols.go +++ b/schema/active_symbols.go @@ -27,8 +27,8 @@ type ActiveSymbols struct { // what you specify in this field. LandingCompanyShort *ActiveSymbolsLandingCompanyShort `json:"landing_company_short,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/api_token.go b/schema/api_token.go index 930d401..b47f811 100644 --- a/schema/api_token.go +++ b/schema/api_token.go @@ -14,8 +14,8 @@ type ApiToken struct { // [Optional] The token to remove. DeleteToken *string `json:"delete_token,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] The name of the created token. diff --git a/schema/app_delete.go b/schema/app_delete.go index 66b6cef..ec9359e 100644 --- a/schema/app_delete.go +++ b/schema/app_delete.go @@ -10,8 +10,8 @@ type AppDelete struct { // Application app_id AppDelete int `json:"app_delete"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/app_get.go b/schema/app_get.go index a570eb3..32cb403 100644 --- a/schema/app_get.go +++ b/schema/app_get.go @@ -10,8 +10,8 @@ type AppGet struct { // Application app_id AppGet int `json:"app_get"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/app_list.go b/schema/app_list.go index 85152aa..beb9e29 100644 --- a/schema/app_list.go +++ b/schema/app_list.go @@ -11,8 +11,8 @@ type AppList struct { // Must be `1` AppList AppListAppList `json:"app_list"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/app_markup_details.go b/schema/app_markup_details.go index b6c25b9..c07ef08 100644 --- a/schema/app_markup_details.go +++ b/schema/app_markup_details.go @@ -29,8 +29,8 @@ type AppMarkupDetails struct { // [Optional] Apply upper limit to count of transactions received. Limit float64 `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Number of transactions to skip. diff --git a/schema/app_markup_statistics.go b/schema/app_markup_statistics.go index 335fabf..b12d20d 100644 --- a/schema/app_markup_statistics.go +++ b/schema/app_markup_statistics.go @@ -17,8 +17,8 @@ type AppMarkupStatistics struct { // End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. DateTo string `json:"date_to"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/app_register.go b/schema/app_register.go index 5efd9df..50f4f42 100644 --- a/schema/app_register.go +++ b/schema/app_register.go @@ -27,8 +27,8 @@ type AppRegister struct { // [Optional] Application's homepage URL. Homepage *string `json:"homepage,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Application name. diff --git a/schema/app_update.go b/schema/app_update.go index df05770..6c29332 100644 --- a/schema/app_update.go +++ b/schema/app_update.go @@ -27,8 +27,8 @@ type AppUpdate struct { // [Optional] Application's homepage URL. Homepage *string `json:"homepage,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Application name. diff --git a/schema/asset_index.go b/schema/asset_index.go index e6ef511..2403756 100644 --- a/schema/asset_index.go +++ b/schema/asset_index.go @@ -20,8 +20,8 @@ type AssetIndex struct { // landing company. LandingCompanyShort *AssetIndexLandingCompanyShort `json:"landing_company_short,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/authorize.go b/schema/authorize.go index ef9570f..a0d5ec1 100644 --- a/schema/authorize.go +++ b/schema/authorize.go @@ -15,8 +15,7 @@ type Authorize struct { AddToLoginHistory AuthorizeAddToLoginHistory `json:"add_to_login_history,omitempty"` // Authentication token. May be retrieved from - // https://www.binary.com/en/user/security/api_tokenws.html. Set to MULTI when - // using multiple tokens. + // https://www.binary.com/en/user/security/api_tokenws.html Authorize string `json:"authorize"` // [Optional] Used to pass data through the websocket, which may be retrieved via @@ -27,7 +26,7 @@ type Authorize struct { ReqId *int `json:"req_id,omitempty"` // Additional Authentication tokens of authorized user that may be used in this - // session. Upto 25 tokens. + // session. Upto 10 tokens. Tokens []string `json:"tokens,omitempty"` } @@ -79,8 +78,8 @@ func (j *Authorize) UnmarshalJSON(b []byte) error { if v, ok := raw["add_to_login_history"]; !ok || v == nil { plain.AddToLoginHistory = 0.0 } - if len(plain.Tokens) > 25 { - return fmt.Errorf("field %s length: must be <= %d", "tokens", 25) + if len(plain.Tokens) > 10 { + return fmt.Errorf("field %s length: must be <= %d", "tokens", 10) } *j = Authorize(plain) return nil diff --git a/schema/balance.go b/schema/balance.go index 7ddc706..a13c299 100644 --- a/schema/balance.go +++ b/schema/balance.go @@ -16,8 +16,8 @@ type Balance struct { // Must be `1` Balance BalanceBalance `json:"balance"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/buy.go b/schema/buy.go index a23e970..4bb518d 100644 --- a/schema/buy.go +++ b/schema/buy.go @@ -12,8 +12,8 @@ type Buy struct { // contract buy parameters are passed in the `parameters` field. Buy string `json:"buy"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass the parameters for contract buy. diff --git a/schema/buy_contract_for_multiple_accounts.go b/schema/buy_contract_for_multiple_accounts.go index 3aa6725..02ba181 100644 --- a/schema/buy_contract_for_multiple_accounts.go +++ b/schema/buy_contract_for_multiple_accounts.go @@ -14,8 +14,8 @@ type BuyContractForMultipleAccounts struct { // contract buy parameters are passed in the `parameters` field. BuyContractForMultipleAccounts string `json:"buy_contract_for_multiple_accounts"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass the parameters for contract buy. diff --git a/schema/cancel.go b/schema/cancel.go index e850242..a732f9d 100644 --- a/schema/cancel.go +++ b/schema/cancel.go @@ -10,8 +10,8 @@ type Cancel struct { // Value should be the `contract_id` which received from the `portfolio` call. Cancel int `json:"cancel"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/cashier.go b/schema/cashier.go index a899ffd..02f6892 100644 --- a/schema/cashier.go +++ b/schema/cashier.go @@ -26,8 +26,8 @@ type Cashier struct { // in order to prioritise their withdrawal request. EstimatedFeeUniqueId *string `json:"estimated_fee_unique_id,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/contract_update.go b/schema/contract_update.go index 6a9f3fb..c9de157 100644 --- a/schema/contract_update.go +++ b/schema/contract_update.go @@ -17,8 +17,8 @@ type ContractUpdate struct { // Specify limit order to update. LimitOrder ContractUpdateLimitOrder `json:"limit_order"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/contract_update_history.go b/schema/contract_update_history.go index 8614c9a..05e4380 100644 --- a/schema/contract_update_history.go +++ b/schema/contract_update_history.go @@ -17,8 +17,8 @@ type ContractUpdateHistory struct { // [Optional] Maximum number of historical updates to receive. Limit float64 `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/contracts_for.go b/schema/contracts_for.go index 4f764a6..8f56130 100644 --- a/schema/contracts_for.go +++ b/schema/contracts_for.go @@ -25,8 +25,8 @@ type ContractsFor struct { // take precendce until the deprecated field is removed from the api. LandingCompanyShort ContractsForLandingCompanyShort `json:"landing_company_short,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/copy_start.go b/schema/copy_start.go index 13b76f5..3f9755b 100644 --- a/schema/copy_start.go +++ b/schema/copy_start.go @@ -13,8 +13,8 @@ type CopyStart struct { // API tokens identifying the accounts of trader which will be used to copy trades CopyStart string `json:"copy_start"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to set maximum trade stake to be copied. diff --git a/schema/copy_stop.go b/schema/copy_stop.go index cecfaa3..c65e66c 100644 --- a/schema/copy_stop.go +++ b/schema/copy_stop.go @@ -10,8 +10,8 @@ type CopyStop struct { // API tokens identifying the accounts which needs not to be copied CopyStop string `json:"copy_stop"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/copytrading_list.go b/schema/copytrading_list.go index 9d16a37..c9ac998 100644 --- a/schema/copytrading_list.go +++ b/schema/copytrading_list.go @@ -11,8 +11,8 @@ type CopytradingList struct { // Must be `1` CopytradingList CopytradingListCopytradingList `json:"copytrading_list"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/crypto_config.go b/schema/crypto_config.go index 30799ae..da6a6d0 100644 --- a/schema/crypto_config.go +++ b/schema/crypto_config.go @@ -15,8 +15,8 @@ type CryptoConfig struct { // crypto config for the sent cryptocurrency code only. CurrencyCode *string `json:"currency_code,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/crypto_estimations.go b/schema/crypto_estimations.go index 8c605fa..045ccc7 100644 --- a/schema/crypto_estimations.go +++ b/schema/crypto_estimations.go @@ -14,8 +14,8 @@ type CryptoEstimations struct { // Cryptocurrency code for which fee estimation is provided. CurrencyCode string `json:"currency_code"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/document_upload.go b/schema/document_upload.go index 700ec15..998d4a7 100644 --- a/schema/document_upload.go +++ b/schema/document_upload.go @@ -39,8 +39,8 @@ type DocumentUpload struct { // any) LifetimeValid *DocumentUploadLifetimeValid `json:"lifetime_valid,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] To determine document side diff --git a/schema/exchange_rates.go b/schema/exchange_rates.go index fd9ef34..d4612f4 100644 --- a/schema/exchange_rates.go +++ b/schema/exchange_rates.go @@ -19,8 +19,8 @@ type ExchangeRates struct { // available if target_currency is provided. IncludeSpread *ExchangeRatesIncludeSpread `json:"include_spread,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/get_account_status.go b/schema/get_account_status.go index 6b48791..90052c8 100644 --- a/schema/get_account_status.go +++ b/schema/get_account_status.go @@ -11,8 +11,8 @@ type GetAccountStatus struct { // Must be `1` GetAccountStatus GetAccountStatusGetAccountStatus `json:"get_account_status"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/get_financial_assessment.go b/schema/get_financial_assessment.go index 227bdf5..f0eb9da 100644 --- a/schema/get_financial_assessment.go +++ b/schema/get_financial_assessment.go @@ -13,8 +13,8 @@ type GetFinancialAssessment struct { // Must be `1` GetFinancialAssessment GetFinancialAssessmentGetFinancialAssessment `json:"get_financial_assessment"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/get_limits.go b/schema/get_limits.go index 1b98d9f..2d25d0b 100644 --- a/schema/get_limits.go +++ b/schema/get_limits.go @@ -11,8 +11,8 @@ type GetLimits struct { // Must be `1` GetLimits GetLimitsGetLimits `json:"get_limits"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/get_self_exclusion.go b/schema/get_self_exclusion.go index 73bae9f..df6749a 100644 --- a/schema/get_self_exclusion.go +++ b/schema/get_self_exclusion.go @@ -13,8 +13,8 @@ type GetSelfExclusion struct { // Must be `1` GetSelfExclusion GetSelfExclusionGetSelfExclusion `json:"get_self_exclusion"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/get_settings.go b/schema/get_settings.go index 313c18c..2c0787b 100644 --- a/schema/get_settings.go +++ b/schema/get_settings.go @@ -11,8 +11,8 @@ type GetSettings struct { // Must be `1` GetSettings GetSettingsGetSettings `json:"get_settings"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/identity_verification_document_add.go b/schema/identity_verification_document_add.go index d3c6c5c..545012c 100644 --- a/schema/identity_verification_document_add.go +++ b/schema/identity_verification_document_add.go @@ -25,8 +25,8 @@ type IdentityVerificationDocumentAdd struct { // 2-letter country code (can obtained from `residence_list` call). IssuingCountry string `json:"issuing_country"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/kyc_auth_status.go b/schema/kyc_auth_status.go index 78a597e..0d7325b 100644 --- a/schema/kyc_auth_status.go +++ b/schema/kyc_auth_status.go @@ -18,8 +18,8 @@ type KycAuthStatus struct { // Indicates which landing companies to get the KYC authentication status for. LandingCompanies []KycAuthStatusLandingCompaniesElem `json:"landing_companies,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/login_history.go b/schema/login_history.go index b5f8aa4..f7b46fd 100644 --- a/schema/login_history.go +++ b/schema/login_history.go @@ -14,8 +14,8 @@ type LoginHistory struct { // Must be `1` LoginHistory LoginHistoryLoginHistory `json:"login_history"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/logout.go b/schema/logout.go index 3a6e07d..634559a 100644 --- a/schema/logout.go +++ b/schema/logout.go @@ -8,8 +8,8 @@ import "reflect" // Logout the session type Logout struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_deposit.go b/schema/mt5_deposit.go index d242524..db74a94 100644 --- a/schema/mt5_deposit.go +++ b/schema/mt5_deposit.go @@ -15,8 +15,8 @@ type Mt5Deposit struct { // Binary account loginid to transfer money from FromBinary *string `json:"from_binary,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_get_settings.go b/schema/mt5_get_settings.go index 7d9caae..349c82d 100644 --- a/schema/mt5_get_settings.go +++ b/schema/mt5_get_settings.go @@ -11,8 +11,8 @@ type Mt5GetSettings struct { // MT5 user login Login string `json:"login"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_login_list.go b/schema/mt5_login_list.go index b47b25a..a5b1482 100644 --- a/schema/mt5_login_list.go +++ b/schema/mt5_login_list.go @@ -8,8 +8,8 @@ import "reflect" // Get list of MT5 accounts for client type Mt5LoginList struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_new_account.go b/schema/mt5_new_account.go index 24fe9a5..fea48c5 100644 --- a/schema/mt5_new_account.go +++ b/schema/mt5_new_account.go @@ -45,8 +45,8 @@ type Mt5NewAccount struct { // Client leverage (from 1 to 1000). Leverage float64 `json:"leverage"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // The master password of the account. For validation (Accepts any printable ASCII diff --git a/schema/mt5_password_change.go b/schema/mt5_password_change.go index 6d6bc6e..cea0f4c 100644 --- a/schema/mt5_password_change.go +++ b/schema/mt5_password_change.go @@ -11,8 +11,8 @@ type Mt5PasswordChange struct { // MT5 user login Login string `json:"login"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_password_check.go b/schema/mt5_password_check.go index e8b596c..f364099 100644 --- a/schema/mt5_password_check.go +++ b/schema/mt5_password_check.go @@ -11,8 +11,8 @@ type Mt5PasswordCheck struct { // MT5 user login Login string `json:"login"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_password_reset.go b/schema/mt5_password_reset.go index 85b8d3a..fb84f80 100644 --- a/schema/mt5_password_reset.go +++ b/schema/mt5_password_reset.go @@ -11,8 +11,8 @@ type Mt5PasswordReset struct { // MT5 user login Login string `json:"login"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/mt5_withdrawal.go b/schema/mt5_withdrawal.go index 82453a2..abcf985 100644 --- a/schema/mt5_withdrawal.go +++ b/schema/mt5_withdrawal.go @@ -15,8 +15,8 @@ type Mt5Withdrawal struct { // MT5 account login to withdraw money from FromMt5 string `json:"from_mt5"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/new_account_maltainvest.go b/schema/new_account_maltainvest.go index 3b2bb90..efea924 100644 --- a/schema/new_account_maltainvest.go +++ b/schema/new_account_maltainvest.go @@ -97,8 +97,8 @@ type NewAccountMaltainvest struct { // features such as stop loss. Stop loss allows you to LeverageTradingHighRiskStopLoss *NewAccountMaltainvestLeverageTradingHighRiskStopLoss `json:"leverage_trading_high_risk_stop_loss,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Net Annual Income. diff --git a/schema/new_account_real.go b/schema/new_account_real.go index 54325e5..babf5c0 100644 --- a/schema/new_account_real.go +++ b/schema/new_account_real.go @@ -61,8 +61,8 @@ type NewAccountReal struct { // apostrophes. LastName *string `json:"last_name,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/new_account_virtual.go b/schema/new_account_virtual.go index 6d633fb..50e1127 100644 --- a/schema/new_account_virtual.go +++ b/schema/new_account_virtual.go @@ -29,8 +29,8 @@ type NewAccountVirtual struct { // [Optional] Google Click Identifier to track source. GclidUrl *string `json:"gclid_url,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/oauth_apps.go b/schema/oauth_apps.go index 18817bd..ce3ce34 100644 --- a/schema/oauth_apps.go +++ b/schema/oauth_apps.go @@ -8,8 +8,8 @@ import "reflect" // List all my used OAuth applications. type OauthApps struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/p2p_advert_create.go b/schema/p2p_advert_create.go index dfa588b..9afddb3 100644 --- a/schema/p2p_advert_create.go +++ b/schema/p2p_advert_create.go @@ -29,8 +29,8 @@ type P2PAdvertCreate struct { // currency of client's residence by default. LocalCurrency *string `json:"local_currency,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Maximum allowed amount for the orders of this advert, in advertiser's diff --git a/schema/p2p_advert_info.go b/schema/p2p_advert_info.go index dca70d1..02b95ff 100644 --- a/schema/p2p_advert_info.go +++ b/schema/p2p_advert_info.go @@ -12,8 +12,8 @@ type P2PAdvertInfo struct { // If not provided, all advertiser adverts will be subscribed. Id *string `json:"id,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_advert_list.go b/schema/p2p_advert_list.go index 246e987..81a0a5c 100644 --- a/schema/p2p_advert_list.go +++ b/schema/p2p_advert_list.go @@ -38,8 +38,8 @@ type P2PAdvertList struct { // ads from country of residence will be returned. LocalCurrency *string `json:"local_currency,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used for paging. diff --git a/schema/p2p_advert_update.go b/schema/p2p_advert_update.go index 1ea3fcf..4cee11f 100644 --- a/schema/p2p_advert_update.go +++ b/schema/p2p_advert_update.go @@ -31,8 +31,8 @@ type P2PAdvertUpdate struct { // [Optional] Local currency for this advert. LocalCurrency *string `json:"local_currency,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Maximum allowed amount for the orders of this advert, in diff --git a/schema/p2p_advertiser_adverts.go b/schema/p2p_advertiser_adverts.go index 3c84059..40c79c5 100644 --- a/schema/p2p_advertiser_adverts.go +++ b/schema/p2p_advertiser_adverts.go @@ -13,8 +13,8 @@ type P2PAdvertiserAdverts struct { // responses. Limit int `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used for paging. This value will also apply to subsription diff --git a/schema/p2p_advertiser_create.go b/schema/p2p_advertiser_create.go index c6a7636..c3fa6a4 100644 --- a/schema/p2p_advertiser_create.go +++ b/schema/p2p_advertiser_create.go @@ -16,8 +16,8 @@ type P2PAdvertiserCreate struct { // created. DefaultAdvertDescription *string `json:"default_advert_description,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // The advertiser's displayed name. diff --git a/schema/p2p_advertiser_info.go b/schema/p2p_advertiser_info.go index 849ea2c..f679d31 100644 --- a/schema/p2p_advertiser_info.go +++ b/schema/p2p_advertiser_info.go @@ -12,8 +12,8 @@ type P2PAdvertiserInfo struct { // advertiser information about the current account. Id *string `json:"id,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_advertiser_list.go b/schema/p2p_advertiser_list.go index 09d0d89..23aaad4 100644 --- a/schema/p2p_advertiser_list.go +++ b/schema/p2p_advertiser_list.go @@ -17,8 +17,8 @@ type P2PAdvertiserList struct { // [Optional] Used for paging. Limit int `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used for paging. diff --git a/schema/p2p_advertiser_payment_methods.go b/schema/p2p_advertiser_payment_methods.go index 4541a6a..0c89b9d 100644 --- a/schema/p2p_advertiser_payment_methods.go +++ b/schema/p2p_advertiser_payment_methods.go @@ -14,8 +14,8 @@ type P2PAdvertiserPaymentMethods struct { // Contains payment methods to delete. Delete []float64 `json:"delete,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 @@ -105,14 +105,14 @@ func (j *P2PAdvertiserPaymentMethods) UnmarshalJSON(b []byte) error { if plain.Create != nil && len(plain.Create) < 1 { return fmt.Errorf("field %s length: must be >= %d", "create", 1) } - if len(plain.Create) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "create", 100) + if len(plain.Create) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "create", 5) } if plain.Delete != nil && len(plain.Delete) < 1 { return fmt.Errorf("field %s length: must be >= %d", "delete", 1) } - if len(plain.Delete) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "delete", 100) + if len(plain.Delete) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "delete", 5) } *j = P2PAdvertiserPaymentMethods(plain) return nil diff --git a/schema/p2p_advertiser_relations.go b/schema/p2p_advertiser_relations.go index 7a10df8..6c808ee 100644 --- a/schema/p2p_advertiser_relations.go +++ b/schema/p2p_advertiser_relations.go @@ -14,8 +14,8 @@ type P2PAdvertiserRelations struct { // IDs of advertisers to add as favourites. AddFavourites []float64 `json:"add_favourites,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_advertiser_update.go b/schema/p2p_advertiser_update.go index 3c1801d..53eb29b 100644 --- a/schema/p2p_advertiser_update.go +++ b/schema/p2p_advertiser_update.go @@ -22,8 +22,8 @@ type P2PAdvertiserUpdate struct { // change the `is_active` of each individual advert. IsListed *P2PAdvertiserUpdateIsListed `json:"is_listed,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_chat_create.go b/schema/p2p_chat_create.go index 128e263..0a8c70f 100644 --- a/schema/p2p_chat_create.go +++ b/schema/p2p_chat_create.go @@ -8,8 +8,8 @@ import "reflect" // Creates a P2P chat for the specified order. type P2PChatCreate struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // The unique identifier for the order to create the chat for. diff --git a/schema/p2p_country_list.go b/schema/p2p_country_list.go index 3a9ee8b..883e2e4 100644 --- a/schema/p2p_country_list.go +++ b/schema/p2p_country_list.go @@ -11,8 +11,8 @@ type P2PCountryList struct { // [Optional] 2-letter country code. If not provided all countries are returned. Country *string `json:"country,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_cancel.go b/schema/p2p_order_cancel.go index f9ea19a..1c74bcc 100644 --- a/schema/p2p_order_cancel.go +++ b/schema/p2p_order_cancel.go @@ -11,8 +11,8 @@ type P2POrderCancel struct { // The unique identifier for this order. Id string `json:"id"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_confirm.go b/schema/p2p_order_confirm.go index c846102..e328c1b 100644 --- a/schema/p2p_order_confirm.go +++ b/schema/p2p_order_confirm.go @@ -14,8 +14,8 @@ type P2POrderConfirm struct { // The unique identifier for this order. Id string `json:"id"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_create.go b/schema/p2p_order_create.go index ac87dab..056d90a 100644 --- a/schema/p2p_order_create.go +++ b/schema/p2p_order_create.go @@ -17,8 +17,8 @@ type P2POrderCreate struct { // [Optional] Seller contact information. Only applicable for 'sell orders'. ContactInfo *string `json:"contact_info,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_dispute.go b/schema/p2p_order_dispute.go index 1f9f767..4c16354 100644 --- a/schema/p2p_order_dispute.go +++ b/schema/p2p_order_dispute.go @@ -14,8 +14,8 @@ type P2POrderDispute struct { // The unique identifier for this order. Id string `json:"id"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_info.go b/schema/p2p_order_info.go index 8c19488..f0b8344 100644 --- a/schema/p2p_order_info.go +++ b/schema/p2p_order_info.go @@ -11,8 +11,8 @@ type P2POrderInfo struct { // The unique identifier for the order. Id string `json:"id"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_order_list.go b/schema/p2p_order_list.go index 816e2d3..661e4b4 100644 --- a/schema/p2p_order_list.go +++ b/schema/p2p_order_list.go @@ -25,8 +25,8 @@ type P2POrderList struct { // [Optional] Used for paging. Limit int `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used for paging. diff --git a/schema/p2p_order_review.go b/schema/p2p_order_review.go index bd6cb47..29c97a0 100644 --- a/schema/p2p_order_review.go +++ b/schema/p2p_order_review.go @@ -8,8 +8,8 @@ import "reflect" // Creates a review for the specified order. type P2POrderReview struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // The order identification number. diff --git a/schema/p2p_payment_methods.go b/schema/p2p_payment_methods.go index c9bc450..b55c906 100644 --- a/schema/p2p_payment_methods.go +++ b/schema/p2p_payment_methods.go @@ -8,8 +8,8 @@ import "reflect" // List all P2P payment methods. type P2PPaymentMethods struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be 1 diff --git a/schema/p2p_ping.go b/schema/p2p_ping.go index f8baddd..c41dc50 100644 --- a/schema/p2p_ping.go +++ b/schema/p2p_ping.go @@ -9,8 +9,8 @@ import "reflect" // Keeps the connection alive and updates the P2P advertiser's online status. The // advertiser will be considered offline 60 seconds after a call is made. type P2PPing struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/p2p_settings.go b/schema/p2p_settings.go index 9989583..e02605c 100644 --- a/schema/p2p_settings.go +++ b/schema/p2p_settings.go @@ -8,8 +8,8 @@ import "reflect" // Request P2P Settings information. type P2PSettings struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Must be `1` diff --git a/schema/payment_methods.go b/schema/payment_methods.go index 9b238c1..5066b59 100644 --- a/schema/payment_methods.go +++ b/schema/payment_methods.go @@ -12,8 +12,8 @@ type PaymentMethods struct { // [Optional] 2-letter country code (ISO standard). Country *string `json:"country,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_create.go b/schema/paymentagent_create.go index e0f66c8..a6edc1b 100644 --- a/schema/paymentagent_create.go +++ b/schema/paymentagent_create.go @@ -26,8 +26,8 @@ type PaymentagentCreate struct { // [Optional] Information about payment agent and their proposed service. Information string `json:"information"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_details.go b/schema/paymentagent_details.go index 70cf9bb..0c0dcc2 100644 --- a/schema/paymentagent_details.go +++ b/schema/paymentagent_details.go @@ -8,8 +8,8 @@ import "reflect" // Gets client's payment agent details. type PaymentagentDetails struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_list.go b/schema/paymentagent_list.go index 2915b7e..20a9124 100644 --- a/schema/paymentagent_list.go +++ b/schema/paymentagent_list.go @@ -13,8 +13,8 @@ type PaymentagentList struct { // be returned (obtained from `payout_currencies` call). Currency *string `json:"currency,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_transfer.go b/schema/paymentagent_transfer.go index 53785ea..7648f22 100644 --- a/schema/paymentagent_transfer.go +++ b/schema/paymentagent_transfer.go @@ -21,8 +21,8 @@ type PaymentagentTransfer struct { // [Optional] If set to `1`, just do validation. DryRun *PaymentagentTransferDryRun `json:"dry_run,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_withdraw.go b/schema/paymentagent_withdraw.go index 5836149..25df12f 100644 --- a/schema/paymentagent_withdraw.go +++ b/schema/paymentagent_withdraw.go @@ -21,8 +21,8 @@ type PaymentagentWithdraw struct { // [Optional] If set to 1, just do validation. DryRun *PaymentagentWithdrawDryRun `json:"dry_run,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/paymentagent_withdraw_justification.go b/schema/paymentagent_withdraw_justification.go index d701f20..539fa38 100644 --- a/schema/paymentagent_withdraw_justification.go +++ b/schema/paymentagent_withdraw_justification.go @@ -8,8 +8,8 @@ import "reflect" // Provide justification to perform withdrawal using a Payment Agent. type PaymentagentWithdrawJustification struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // Reasons for needing to withdraw using a Payment Agent. diff --git a/schema/payout_currencies.go b/schema/payout_currencies.go index 940affd..11a9a5f 100644 --- a/schema/payout_currencies.go +++ b/schema/payout_currencies.go @@ -9,8 +9,8 @@ import "reflect" // Retrieve a list of available option payout currencies. If a user is logged in, // only the currencies available for the account will be returned. type PayoutCurrencies struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/portfolio.go b/schema/portfolio.go index 371a924..683047d 100644 --- a/schema/portfolio.go +++ b/schema/portfolio.go @@ -11,8 +11,8 @@ type Portfolio struct { // Return only contracts of the specified types ContractType []PortfolioContractTypeElem `json:"contract_type,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/profit_table.go b/schema/profit_table.go index 2e83908..5343bc7 100644 --- a/schema/profit_table.go +++ b/schema/profit_table.go @@ -23,8 +23,8 @@ type ProfitTable struct { // [Optional] Apply upper limit to count of transactions received. Limit float64 `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Number of transactions to skip. diff --git a/schema/proposal.go b/schema/proposal.go index 614fe4f..5f65a57 100644 --- a/schema/proposal.go +++ b/schema/proposal.go @@ -64,8 +64,8 @@ type Proposal struct { // `stop_loss`. LimitOrder *ProposalLimitOrder `json:"limit_order,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] The multiplier for non-binary options. E.g. lookbacks. diff --git a/schema/proposal_open_contract.go b/schema/proposal_open_contract.go index 01c7225..a009de8 100644 --- a/schema/proposal_open_contract.go +++ b/schema/proposal_open_contract.go @@ -12,8 +12,8 @@ type ProposalOpenContract struct { // will receive stream of all open contracts. ContractId *int `json:"contract_id,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/reality_check.go b/schema/reality_check.go index 453e0cd..b7635ea 100644 --- a/schema/reality_check.go +++ b/schema/reality_check.go @@ -11,8 +11,8 @@ import "reflect" // associated client profit/loss. The Reality Check facility is a regulatory // requirement for certain landing companies. type RealityCheck struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/revoke_oauth_app.go b/schema/revoke_oauth_app.go index be0f169..5b7081b 100644 --- a/schema/revoke_oauth_app.go +++ b/schema/revoke_oauth_app.go @@ -7,8 +7,8 @@ import "fmt" // Used for revoking access of particular app. type RevokeOauthApp struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/sell.go b/schema/sell.go index 8faea2b..af8ad57 100644 --- a/schema/sell.go +++ b/schema/sell.go @@ -7,8 +7,8 @@ import "fmt" // Sell a Contract as identified from a previous `portfolio` call. type Sell struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/sell_contract_for_multiple_accounts.go b/schema/sell_contract_for_multiple_accounts.go index 594f367..0fdad8d 100644 --- a/schema/sell_contract_for_multiple_accounts.go +++ b/schema/sell_contract_for_multiple_accounts.go @@ -13,8 +13,8 @@ import "reflect" // sell the contract on the currently-authorised account unless you include the // token for the current account. type SellContractForMultipleAccounts struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/sell_expired.go b/schema/sell_expired.go index b84d94b..c090e05 100644 --- a/schema/sell_expired.go +++ b/schema/sell_expired.go @@ -9,8 +9,8 @@ import "reflect" // This call will try to sell any expired contracts and return the number of sold // contracts. type SellExpired struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/set_account_currency.go b/schema/set_account_currency.go index 3242039..a7bba09 100644 --- a/schema/set_account_currency.go +++ b/schema/set_account_currency.go @@ -9,8 +9,8 @@ import "fmt" // currency for trading, deposit. Please note that account currency can only be set // once, and then can never be changed. type SetAccountCurrency struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/set_financial_assessment.go b/schema/set_financial_assessment.go index 373078c..40f1461 100644 --- a/schema/set_financial_assessment.go +++ b/schema/set_financial_assessment.go @@ -49,8 +49,8 @@ type SetFinancialAssessment struct { // [Optional] Income Source. IncomeSource *SetFinancialAssessmentIncomeSource `json:"income_source,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Net Annual Income. diff --git a/schema/set_self_exclusion.go b/schema/set_self_exclusion.go index 1ac7361..769b857 100644 --- a/schema/set_self_exclusion.go +++ b/schema/set_self_exclusion.go @@ -14,8 +14,8 @@ type SetSelfExclusion struct { // the company. ExcludeUntil *string `json:"exclude_until,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] 7-day limit on deposits. diff --git a/schema/set_settings.go b/schema/set_settings.go index 2c92eb0..faa2cdd 100644 --- a/schema/set_settings.go +++ b/schema/set_settings.go @@ -69,8 +69,8 @@ type SetSettings struct { // accounts). LastName *string `json:"last_name,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Indicates client's self-declaration of not being a PEP/RCA diff --git a/schema/statement.go b/schema/statement.go index 40ec4a9..e6f0a62 100644 --- a/schema/statement.go +++ b/schema/statement.go @@ -23,8 +23,8 @@ type Statement struct { // [Optional] Maximum number of transactions to receive. Limit float64 `json:"limit,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Number of transactions to skip. diff --git a/schema/tnc_approval.go b/schema/tnc_approval.go index 2c80932..e9548ef 100644 --- a/schema/tnc_approval.go +++ b/schema/tnc_approval.go @@ -11,8 +11,8 @@ type TncApproval struct { // [Optional] For Affiliate's Code of Conduct Agreement. AffiliateCocAgreement *TncApprovalAffiliateCocAgreement `json:"affiliate_coc_agreement,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/topup_virtual.go b/schema/topup_virtual.go index 92ede10..d00cdb6 100644 --- a/schema/topup_virtual.go +++ b/schema/topup_virtual.go @@ -9,8 +9,8 @@ import "reflect" // When a virtual-money's account balance becomes low, it can be topped up using // this call. type TopupVirtual struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/trading_durations.go b/schema/trading_durations.go index 955241b..b0e00b7 100644 --- a/schema/trading_durations.go +++ b/schema/trading_durations.go @@ -17,8 +17,8 @@ type TradingDurations struct { // landing company. LandingCompanyShort *TradingDurationsLandingCompanyShort `json:"landing_company_short,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/trading_platform_investor_password_reset.go b/schema/trading_platform_investor_password_reset.go index 70374f5..476baba 100644 --- a/schema/trading_platform_investor_password_reset.go +++ b/schema/trading_platform_investor_password_reset.go @@ -11,8 +11,8 @@ type TradingPlatformInvestorPasswordReset struct { // Trading account ID. AccountId string `json:"account_id"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // New password of the account. For validation (Accepts any printable ASCII diff --git a/schema/trading_platform_password_reset.go b/schema/trading_platform_password_reset.go index 1355439..fdb2374 100644 --- a/schema/trading_platform_password_reset.go +++ b/schema/trading_platform_password_reset.go @@ -8,8 +8,8 @@ import "reflect" // Reset the password of a Trading Platform Account type TradingPlatformPasswordReset struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // New password of the account. For validation (Accepts any printable ASCII diff --git a/schema/trading_servers.go b/schema/trading_servers.go index e8a364a..effafa2 100644 --- a/schema/trading_servers.go +++ b/schema/trading_servers.go @@ -15,8 +15,8 @@ type TradingServers struct { // one demo and two real environments. Defaults to 'all'. Environment TradingServersEnvironment `json:"environment,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Market type. diff --git a/schema/transaction.go b/schema/transaction.go index 006da7a..5aa5c4e 100644 --- a/schema/transaction.go +++ b/schema/transaction.go @@ -8,8 +8,8 @@ import "reflect" // Subscribe to transaction notifications type Transaction struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/transfer_between_accounts.go b/schema/transfer_between_accounts.go index dc2b470..9eb8c80 100644 --- a/schema/transfer_between_accounts.go +++ b/schema/transfer_between_accounts.go @@ -28,8 +28,8 @@ type TransferBetweenAccounts struct { // [Optional] Currency code. Currency *string `json:"currency,omitempty"` - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/verify_email.go b/schema/verify_email.go index eebb850..7ed1bd3 100644 --- a/schema/verify_email.go +++ b/schema/verify_email.go @@ -9,8 +9,8 @@ import "reflect" // Verify an email address for various purposes. The system will send an email to // the address containing a security code for verification. type VerifyEmail struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via diff --git a/schema/verify_email_cellxpert.go b/schema/verify_email_cellxpert.go index e81d1a7..dde5337 100644 --- a/schema/verify_email_cellxpert.go +++ b/schema/verify_email_cellxpert.go @@ -9,8 +9,8 @@ import "reflect" // Verify an email address for Cellxpert. The system will send an email to the // address containing a security code for verification. type VerifyEmailCellxpert struct { - // [Optional] The login id of the user. Mandatory when multiple tokens were - // provided during authorize. + // [Optional] The login id of the user. If left unspecified, it defaults to the + // initial authorized token's login id. Loginid *string `json:"loginid,omitempty"` // [Optional] Used to pass data through the websocket, which may be retrieved via