schema

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type AccountList ¶ added in v0.4.11

type AccountList struct {
	// Must be `1`
	AccountList AccountListAccountList `json:"account_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AccountListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Returns all accounts belonging to the authorized user.

func (*AccountList) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListAccountList ¶ added in v0.4.11

type AccountListAccountList int

func (*AccountListAccountList) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListAccountList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListPassthrough ¶ added in v0.4.11

type AccountListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AccountListResp ¶ added in v0.4.11

type AccountListResp struct {
	// List of accounts for current user. This is also available from the `authroize`
	// call.
	AccountList []AccountListRespAccountListElem `json:"account_list,omitempty"`

	// Echo of the request made.
	EchoReq AccountListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AccountListRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns all accounts belonging to the authorized user.

func (*AccountListResp) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespAccountListElem ¶ added in v0.4.11

type AccountListRespAccountListElem struct {
	// Account category.
	AccountCategory AccountListRespAccountListElemAccountCategory `json:"account_category"`

	// Account type.
	AccountType string `json:"account_type"`

	// 2 letter broker code.
	Broker *string `json:"broker,omitempty"`

	// Creation time of the account as epoch.
	CreatedAt int `json:"created_at"`

	// Currency of specified account.
	Currency string `json:"currency"`

	// Boolean value: 1 or 0, indicating whether the account is marked as disabled or
	// not.
	IsDisabled AccountListRespAccountListElemIsDisabled `json:"is_disabled"`

	// Boolean value: 1 or 0, indicating whether the account is a virtual-money
	// account.
	IsVirtual AccountListRespAccountListElemIsVirtual `json:"is_virtual"`

	// Landing company shortcode the account belongs to.
	LandingCompanyName string `json:"landing_company_name"`

	// Details of the list of Trading accounts linked to the Wallet account.
	LinkedTo []AccountListRespAccountListElemLinkedToElem `json:"linked_to"`

	// The account ID of specified account.
	Loginid string `json:"loginid"`
}

func (*AccountListRespAccountListElem) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListRespAccountListElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespAccountListElemAccountCategory ¶ added in v0.4.11

type AccountListRespAccountListElemAccountCategory string
const AccountListRespAccountListElemAccountCategoryTrading AccountListRespAccountListElemAccountCategory = "trading"
const AccountListRespAccountListElemAccountCategoryWallet AccountListRespAccountListElemAccountCategory = "wallet"

func (*AccountListRespAccountListElemAccountCategory) UnmarshalJSON ¶ added in v0.4.11

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespAccountListElemIsDisabled ¶ added in v0.4.11

type AccountListRespAccountListElemIsDisabled int

func (*AccountListRespAccountListElemIsDisabled) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListRespAccountListElemIsDisabled) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespAccountListElemIsVirtual ¶ added in v0.4.11

type AccountListRespAccountListElemIsVirtual int

func (*AccountListRespAccountListElemIsVirtual) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListRespAccountListElemIsVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespAccountListElemLinkedToElem ¶ added in v0.4.11

type AccountListRespAccountListElemLinkedToElem struct {
	// Account ID.
	Loginid *string `json:"loginid,omitempty"`

	// Account platform name.
	Platform *AccountListRespAccountListElemLinkedToElemPlatform `json:"platform,omitempty"`
}

type AccountListRespAccountListElemLinkedToElemPlatform ¶ added in v0.4.11

type AccountListRespAccountListElemLinkedToElemPlatform string
const AccountListRespAccountListElemLinkedToElemPlatformCtrader AccountListRespAccountListElemLinkedToElemPlatform = "ctrader"
const AccountListRespAccountListElemLinkedToElemPlatformDtrade AccountListRespAccountListElemLinkedToElemPlatform = "dtrade"
const AccountListRespAccountListElemLinkedToElemPlatformDwallet AccountListRespAccountListElemLinkedToElemPlatform = "dwallet"
const AccountListRespAccountListElemLinkedToElemPlatformDxtrade AccountListRespAccountListElemLinkedToElemPlatform = "dxtrade"
const AccountListRespAccountListElemLinkedToElemPlatformMt5 AccountListRespAccountListElemLinkedToElemPlatform = "mt5"

func (*AccountListRespAccountListElemLinkedToElemPlatform) UnmarshalJSON ¶ added in v0.4.11

UnmarshalJSON implements json.Unmarshaler.

type AccountListRespEchoReq ¶ added in v0.4.11

type AccountListRespEchoReq map[string]interface{}

Echo of the request made.

type AccountListRespMsgType ¶ added in v0.4.11

type AccountListRespMsgType string
const AccountListRespMsgTypeAccountList AccountListRespMsgType = "account_list"

func (*AccountListRespMsgType) UnmarshalJSON ¶ added in v0.4.11

func (j *AccountListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbols ¶

type ActiveSymbols struct {
	// If you use `brief`, only a subset of fields will be returned.
	ActiveSymbols ActiveSymbolsActiveSymbols `json:"active_symbols"`

	// [Optional] Category of barrier.
	BarrierCategory []ActiveSymbolsBarrierCategoryElem `json:"barrier_category,omitempty"`

	// [Optional] The proposed contract type
	ContractType []ActiveSymbolsContractTypeElem `json:"contract_type,omitempty"`

	// Deprecated - replaced by landing_company_short.
	LandingCompany *ActiveSymbolsLandingCompany `json:"landing_company,omitempty"`

	// [Optional] If you specify this field, only symbols available for trading by
	// that landing company will be returned. If you are logged in, only symbols
	// available for trading by your landing company will be returned regardless of
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ActiveSymbolsPassthrough `json:"passthrough,omitempty"`

	// [Optional] If you specify this field, only symbols that can be traded through
	// that product type will be returned.
	ProductType *ActiveSymbolsProductType `json:"product_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).

func (*ActiveSymbols) UnmarshalJSON ¶

func (j *ActiveSymbols) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsActiveSymbols ¶

type ActiveSymbolsActiveSymbols string
const ActiveSymbolsActiveSymbolsBrief ActiveSymbolsActiveSymbols = "brief"
const ActiveSymbolsActiveSymbolsFull ActiveSymbolsActiveSymbols = "full"

func (*ActiveSymbolsActiveSymbols) UnmarshalJSON ¶

func (j *ActiveSymbolsActiveSymbols) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsBarrierCategoryElem ¶ added in v0.4.25

type ActiveSymbolsBarrierCategoryElem string
const ActiveSymbolsBarrierCategoryElemAmerican ActiveSymbolsBarrierCategoryElem = "american"
const ActiveSymbolsBarrierCategoryElemAsian ActiveSymbolsBarrierCategoryElem = "asian"
const ActiveSymbolsBarrierCategoryElemEuroAtm ActiveSymbolsBarrierCategoryElem = "euro_atm"
const ActiveSymbolsBarrierCategoryElemEuroNonAtm ActiveSymbolsBarrierCategoryElem = "euro_non_atm"
const ActiveSymbolsBarrierCategoryElemLookback ActiveSymbolsBarrierCategoryElem = "lookback"
const ActiveSymbolsBarrierCategoryElemNonFinancial ActiveSymbolsBarrierCategoryElem = "non_financial"
const ActiveSymbolsBarrierCategoryElemReset ActiveSymbolsBarrierCategoryElem = "reset"

func (*ActiveSymbolsBarrierCategoryElem) UnmarshalJSON ¶ added in v0.4.25

func (j *ActiveSymbolsBarrierCategoryElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsContractTypeElem ¶ added in v0.4.10

type ActiveSymbolsContractTypeElem string
const ActiveSymbolsContractTypeElemACCU ActiveSymbolsContractTypeElem = "ACCU"
const ActiveSymbolsContractTypeElemASIAND ActiveSymbolsContractTypeElem = "ASIAND"
const ActiveSymbolsContractTypeElemASIANU ActiveSymbolsContractTypeElem = "ASIANU"
const ActiveSymbolsContractTypeElemCALL ActiveSymbolsContractTypeElem = "CALL"
const ActiveSymbolsContractTypeElemCALLE ActiveSymbolsContractTypeElem = "CALLE"
const ActiveSymbolsContractTypeElemCALLSPREAD ActiveSymbolsContractTypeElem = "CALLSPREAD"
const ActiveSymbolsContractTypeElemDIGITDIFF ActiveSymbolsContractTypeElem = "DIGITDIFF"
const ActiveSymbolsContractTypeElemDIGITEVEN ActiveSymbolsContractTypeElem = "DIGITEVEN"
const ActiveSymbolsContractTypeElemDIGITMATCH ActiveSymbolsContractTypeElem = "DIGITMATCH"
const ActiveSymbolsContractTypeElemDIGITODD ActiveSymbolsContractTypeElem = "DIGITODD"
const ActiveSymbolsContractTypeElemDIGITOVER ActiveSymbolsContractTypeElem = "DIGITOVER"
const ActiveSymbolsContractTypeElemDIGITUNDER ActiveSymbolsContractTypeElem = "DIGITUNDER"
const ActiveSymbolsContractTypeElemEXPIRYMISS ActiveSymbolsContractTypeElem = "EXPIRYMISS"
const ActiveSymbolsContractTypeElemEXPIRYMISSE ActiveSymbolsContractTypeElem = "EXPIRYMISSE"
const ActiveSymbolsContractTypeElemEXPIRYRANGE ActiveSymbolsContractTypeElem = "EXPIRYRANGE"
const ActiveSymbolsContractTypeElemEXPIRYRANGEE ActiveSymbolsContractTypeElem = "EXPIRYRANGEE"
const ActiveSymbolsContractTypeElemLBFLOATCALL ActiveSymbolsContractTypeElem = "LBFLOATCALL"
const ActiveSymbolsContractTypeElemLBFLOATPUT ActiveSymbolsContractTypeElem = "LBFLOATPUT"
const ActiveSymbolsContractTypeElemLBHIGHLOW ActiveSymbolsContractTypeElem = "LBHIGHLOW"
const ActiveSymbolsContractTypeElemMULTDOWN ActiveSymbolsContractTypeElem = "MULTDOWN"
const ActiveSymbolsContractTypeElemMULTUP ActiveSymbolsContractTypeElem = "MULTUP"
const ActiveSymbolsContractTypeElemNOTOUCH ActiveSymbolsContractTypeElem = "NOTOUCH"
const ActiveSymbolsContractTypeElemONETOUCH ActiveSymbolsContractTypeElem = "ONETOUCH"
const ActiveSymbolsContractTypeElemPUT ActiveSymbolsContractTypeElem = "PUT"
const ActiveSymbolsContractTypeElemPUTE ActiveSymbolsContractTypeElem = "PUTE"
const ActiveSymbolsContractTypeElemPUTSPREAD ActiveSymbolsContractTypeElem = "PUTSPREAD"
const ActiveSymbolsContractTypeElemRANGE ActiveSymbolsContractTypeElem = "RANGE"
const ActiveSymbolsContractTypeElemRESETCALL ActiveSymbolsContractTypeElem = "RESETCALL"
const ActiveSymbolsContractTypeElemRESETPUT ActiveSymbolsContractTypeElem = "RESETPUT"
const ActiveSymbolsContractTypeElemRUNHIGH ActiveSymbolsContractTypeElem = "RUNHIGH"
const ActiveSymbolsContractTypeElemRUNLOW ActiveSymbolsContractTypeElem = "RUNLOW"
const ActiveSymbolsContractTypeElemTICKHIGH ActiveSymbolsContractTypeElem = "TICKHIGH"
const ActiveSymbolsContractTypeElemTICKLOW ActiveSymbolsContractTypeElem = "TICKLOW"
const ActiveSymbolsContractTypeElemTURBOSLONG ActiveSymbolsContractTypeElem = "TURBOSLONG"
const ActiveSymbolsContractTypeElemTURBOSSHORT ActiveSymbolsContractTypeElem = "TURBOSSHORT"
const ActiveSymbolsContractTypeElemUPORDOWN ActiveSymbolsContractTypeElem = "UPORDOWN"
const ActiveSymbolsContractTypeElemVANILLALONGCALL ActiveSymbolsContractTypeElem = "VANILLALONGCALL"
const ActiveSymbolsContractTypeElemVANILLALONGPUT ActiveSymbolsContractTypeElem = "VANILLALONGPUT"

func (*ActiveSymbolsContractTypeElem) UnmarshalJSON ¶ added in v0.4.10

func (j *ActiveSymbolsContractTypeElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsLandingCompany ¶

type ActiveSymbolsLandingCompany string
const ActiveSymbolsLandingCompanyIom ActiveSymbolsLandingCompany = "iom"
const ActiveSymbolsLandingCompanyMalta ActiveSymbolsLandingCompany = "malta"
const ActiveSymbolsLandingCompanyMaltainvest ActiveSymbolsLandingCompany = "maltainvest"
const ActiveSymbolsLandingCompanySvg ActiveSymbolsLandingCompany = "svg"
const ActiveSymbolsLandingCompanyVanuatu ActiveSymbolsLandingCompany = "vanuatu"
const ActiveSymbolsLandingCompanyVirtual ActiveSymbolsLandingCompany = "virtual"

func (*ActiveSymbolsLandingCompany) UnmarshalJSON ¶

func (j *ActiveSymbolsLandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsLandingCompanyShort ¶

type ActiveSymbolsLandingCompanyShort string
const ActiveSymbolsLandingCompanyShortIom ActiveSymbolsLandingCompanyShort = "iom"
const ActiveSymbolsLandingCompanyShortMalta ActiveSymbolsLandingCompanyShort = "malta"
const ActiveSymbolsLandingCompanyShortMaltainvest ActiveSymbolsLandingCompanyShort = "maltainvest"
const ActiveSymbolsLandingCompanyShortSvg ActiveSymbolsLandingCompanyShort = "svg"
const ActiveSymbolsLandingCompanyShortVanuatu ActiveSymbolsLandingCompanyShort = "vanuatu"
const ActiveSymbolsLandingCompanyShortVirtual ActiveSymbolsLandingCompanyShort = "virtual"

func (*ActiveSymbolsLandingCompanyShort) UnmarshalJSON ¶

func (j *ActiveSymbolsLandingCompanyShort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsPassthrough ¶

type ActiveSymbolsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ActiveSymbolsProductType ¶

type ActiveSymbolsProductType string
const ActiveSymbolsProductTypeBasic ActiveSymbolsProductType = "basic"

func (*ActiveSymbolsProductType) UnmarshalJSON ¶

func (j *ActiveSymbolsProductType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsResp ¶

type ActiveSymbolsResp struct {
	// List of active symbols.
	ActiveSymbols []ActiveSymbolsRespActiveSymbolsElem `json:"active_symbols,omitempty"`

	// Echo of the request made.
	EchoReq ActiveSymbolsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ActiveSymbolsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message containing the list of active symbols.

func (*ActiveSymbolsResp) UnmarshalJSON ¶

func (j *ActiveSymbolsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsRespActiveSymbolsElem ¶

type ActiveSymbolsRespActiveSymbolsElem struct {
	// `1` if the symbol is tradable in a forward starting contract, `0` if not.
	AllowForwardStarting *ActiveSymbolsRespActiveSymbolsElemAllowForwardStarting `json:"allow_forward_starting,omitempty"`

	// Amount the data feed is delayed (in minutes) due to Exchange licensing
	// requirements. Only returned on `full` active symbols call.
	DelayAmount *int `json:"delay_amount,omitempty"`

	// Display name.
	DisplayName string `json:"display_name"`

	// Display order.
	DisplayOrder int `json:"display_order"`

	// `1` if market is currently open, `0` if closed.
	ExchangeIsOpen ActiveSymbolsRespActiveSymbolsElemExchangeIsOpen `json:"exchange_is_open"`

	// Exchange name (for underlyings listed on a Stock Exchange). Only returned on
	// `full` active symbols call.
	ExchangeName *string `json:"exchange_name,omitempty"`

	// Intraday interval minutes. Only returned on `full` active symbols call.
	IntradayIntervalMinutes *int `json:"intraday_interval_minutes,omitempty"`

	// `1` indicates that trading is currently suspended, `0` if not.
	IsTradingSuspended ActiveSymbolsRespActiveSymbolsElemIsTradingSuspended `json:"is_trading_suspended"`

	// Market category (forex, indices, etc).
	Market string `json:"market"`

	// Translated market name.
	MarketDisplayName string `json:"market_display_name"`

	// Pip size (i.e. minimum fluctuation amount).
	Pip float64 `json:"pip"`

	// For stock indices, the underlying currency for that instrument. Only returned
	// on `full` active symbols call.
	QuotedCurrencySymbol *string `json:"quoted_currency_symbol,omitempty"`

	// Latest spot price of the underlying. Only returned on `full` active symbols
	// call.
	Spot *float64 `json:"spot,omitempty"`

	// Number of seconds elapsed since the last spot price. Only returned on `full`
	// active symbols call.
	SpotAge *string `json:"spot_age,omitempty"`

	// Daily percentage for a symbol. Only returned on 'full' active symbols call.
	SpotPercentageChange *string `json:"spot_percentage_change,omitempty"`

	// Latest spot epoch time. Only returned on `full` active symbols call.
	SpotTime *string `json:"spot_time,omitempty"`

	// Subgroup name.
	Subgroup string `json:"subgroup"`

	// Translated subgroup name.
	SubgroupDisplayName string `json:"subgroup_display_name"`

	// Submarket name.
	Submarket string `json:"submarket"`

	// Translated submarket name.
	SubmarketDisplayName string `json:"submarket_display_name"`

	// The symbol code for this underlying.
	Symbol string `json:"symbol"`

	// Symbol type (forex, commodities, etc).
	SymbolType string `json:"symbol_type"`
}

The information about each symbol.

func (*ActiveSymbolsRespActiveSymbolsElem) UnmarshalJSON ¶

func (j *ActiveSymbolsRespActiveSymbolsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsRespActiveSymbolsElemAllowForwardStarting ¶

type ActiveSymbolsRespActiveSymbolsElemAllowForwardStarting int

func (*ActiveSymbolsRespActiveSymbolsElemAllowForwardStarting) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsRespActiveSymbolsElemExchangeIsOpen ¶

type ActiveSymbolsRespActiveSymbolsElemExchangeIsOpen int

func (*ActiveSymbolsRespActiveSymbolsElemExchangeIsOpen) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsRespActiveSymbolsElemIsTradingSuspended ¶

type ActiveSymbolsRespActiveSymbolsElemIsTradingSuspended int

func (*ActiveSymbolsRespActiveSymbolsElemIsTradingSuspended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ActiveSymbolsRespEchoReq ¶

type ActiveSymbolsRespEchoReq map[string]interface{}

Echo of the request made.

type ActiveSymbolsRespMsgType ¶

type ActiveSymbolsRespMsgType string
const ActiveSymbolsRespMsgTypeActiveSymbols ActiveSymbolsRespMsgType = "active_symbols"

func (*ActiveSymbolsRespMsgType) UnmarshalJSON ¶

func (j *ActiveSymbolsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AfterFirstDepositRequirements ¶ added in v0.4.26

type AfterFirstDepositRequirements struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type ApiToken ¶

type ApiToken struct {
	// Must be `1`
	ApiToken ApiTokenApiToken `json:"api_token"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] The name of the created token.
	NewToken *string `json:"new_token,omitempty"`

	// [Optional] List of permission scopes to provide with the token.
	NewTokenScopes []ApiTokenNewTokenScopesElem `json:"new_token_scopes,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ApiTokenPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If you set this parameter during token creation, then the token
	// created will only work for the IP address that was used to create the token
	ValidForCurrentIpOnly *ApiTokenValidForCurrentIpOnly `json:"valid_for_current_ip_only,omitempty"`
}

This call manages API tokens

func (*ApiToken) UnmarshalJSON ¶

func (j *ApiToken) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenApiToken ¶

type ApiTokenApiToken int

func (*ApiTokenApiToken) UnmarshalJSON ¶

func (j *ApiTokenApiToken) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenNewTokenScopesElem ¶

type ApiTokenNewTokenScopesElem string
const ApiTokenNewTokenScopesElemAdmin ApiTokenNewTokenScopesElem = "admin"
const ApiTokenNewTokenScopesElemPayments ApiTokenNewTokenScopesElem = "payments"
const ApiTokenNewTokenScopesElemRead ApiTokenNewTokenScopesElem = "read"
const ApiTokenNewTokenScopesElemTrade ApiTokenNewTokenScopesElem = "trade"
const ApiTokenNewTokenScopesElemTradingInformation ApiTokenNewTokenScopesElem = "trading_information"

func (*ApiTokenNewTokenScopesElem) UnmarshalJSON ¶

func (j *ApiTokenNewTokenScopesElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenPassthrough ¶

type ApiTokenPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ApiTokenResp ¶

type ApiTokenResp struct {
	// Contains the result of API token according to the type of request.
	ApiToken *ApiTokenRespApiToken `json:"api_token,omitempty"`

	// Echo of the request made.
	EchoReq ApiTokenRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ApiTokenRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of the API token request made.

func (*ApiTokenResp) UnmarshalJSON ¶

func (j *ApiTokenResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenRespApiToken ¶

type ApiTokenRespApiToken struct {
	// Token deleted.
	DeleteToken *ApiTokenRespApiTokenDeleteToken `json:"delete_token,omitempty"`

	// Token created.
	NewToken *ApiTokenRespApiTokenNewToken `json:"new_token,omitempty"`

	// API tokens
	Tokens []ApiTokenRespApiTokenTokensElem `json:"tokens,omitempty"`
}

Contains the result of API token according to the type of request.

type ApiTokenRespApiTokenDeleteToken ¶

type ApiTokenRespApiTokenDeleteToken int

func (*ApiTokenRespApiTokenDeleteToken) UnmarshalJSON ¶

func (j *ApiTokenRespApiTokenDeleteToken) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenRespApiTokenNewToken ¶

type ApiTokenRespApiTokenNewToken int

func (*ApiTokenRespApiTokenNewToken) UnmarshalJSON ¶

func (j *ApiTokenRespApiTokenNewToken) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenRespApiTokenTokensElem ¶

type ApiTokenRespApiTokenTokensElem struct {
	// The token name specified when creating.
	DisplayName *string `json:"display_name,omitempty"`

	// The last date which the token has been used.
	LastUsed *string `json:"last_used,omitempty"`

	// List of permission scopes of the token.
	Scopes []ApiTokenRespApiTokenTokensElemScopesElem `json:"scopes,omitempty"`

	// The token that can be used to `authorize` with.
	Token *string `json:"token,omitempty"`

	// The IP restriction for the token. No restriction if empty.
	ValidForIp *string `json:"valid_for_ip,omitempty"`
}

The information for each token.

type ApiTokenRespApiTokenTokensElemScopesElem ¶

type ApiTokenRespApiTokenTokensElemScopesElem string
const ApiTokenRespApiTokenTokensElemScopesElemAdmin ApiTokenRespApiTokenTokensElemScopesElem = "admin"
const ApiTokenRespApiTokenTokensElemScopesElemPayments ApiTokenRespApiTokenTokensElemScopesElem = "payments"
const ApiTokenRespApiTokenTokensElemScopesElemRead ApiTokenRespApiTokenTokensElemScopesElem = "read"
const ApiTokenRespApiTokenTokensElemScopesElemTrade ApiTokenRespApiTokenTokensElemScopesElem = "trade"
const ApiTokenRespApiTokenTokensElemScopesElemTradingInformation ApiTokenRespApiTokenTokensElemScopesElem = "trading_information"

func (*ApiTokenRespApiTokenTokensElemScopesElem) UnmarshalJSON ¶

func (j *ApiTokenRespApiTokenTokensElemScopesElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenRespEchoReq ¶

type ApiTokenRespEchoReq map[string]interface{}

Echo of the request made.

type ApiTokenRespMsgType ¶

type ApiTokenRespMsgType string
const ApiTokenRespMsgTypeApiToken ApiTokenRespMsgType = "api_token"

func (*ApiTokenRespMsgType) UnmarshalJSON ¶

func (j *ApiTokenRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ApiTokenValidForCurrentIpOnly ¶

type ApiTokenValidForCurrentIpOnly int

func (*ApiTokenValidForCurrentIpOnly) UnmarshalJSON ¶

func (j *ApiTokenValidForCurrentIpOnly) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppDelete ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppDeletePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

The request for deleting an application.

func (*AppDelete) UnmarshalJSON ¶

func (j *AppDelete) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppDeletePassthrough ¶

type AppDeletePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppDeleteResp ¶

type AppDeleteResp struct {
	// 1 on success
	AppDelete *int `json:"app_delete,omitempty"`

	// Echo of the request made.
	EchoReq AppDeleteRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppDeleteRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of delete application request made.

func (*AppDeleteResp) UnmarshalJSON ¶

func (j *AppDeleteResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppDeleteRespEchoReq ¶

type AppDeleteRespEchoReq map[string]interface{}

Echo of the request made.

type AppDeleteRespMsgType ¶

type AppDeleteRespMsgType string
const AppDeleteRespMsgTypeAppDelete AppDeleteRespMsgType = "app_delete"

func (*AppDeleteRespMsgType) UnmarshalJSON ¶

func (j *AppDeleteRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppGet ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppGetPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

To get the information of the OAuth application specified by 'app_id'

func (*AppGet) UnmarshalJSON ¶

func (j *AppGet) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppGetPassthrough ¶

type AppGetPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppGetResp ¶

type AppGetResp struct {
	// The information of the requested application.
	AppGet *AppGetRespAppGet `json:"app_get,omitempty"`

	// Echo of the request made.
	EchoReq AppGetRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppGetRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with requested application details

func (*AppGetResp) UnmarshalJSON ¶

func (j *AppGetResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppGetRespAppGet ¶

type AppGetRespAppGet struct {
	// Active.
	Active *int `json:"active,omitempty"`

	// Application ID.
	AppId int `json:"app_id"`

	// Markup added to contract prices (as a percentage of contract payout).
	AppMarkupPercentage float64 `json:"app_markup_percentage"`

	// Application's App Store URL.
	Appstore string `json:"appstore"`

	// Application's GitHub page (for open-source projects).
	Github string `json:"github"`

	// Application's Google Play URL.
	Googleplay string `json:"googleplay"`

	// Application's homepage URL.
	Homepage string `json:"homepage"`

	// Application name.
	Name string `json:"name"`

	// The URL to redirect to after a successful login.
	RedirectUri string `json:"redirect_uri"`

	// Scope Details.
	Scopes []string `json:"scopes,omitempty"`

	// Used when `verify_email` called. If available, a URL containing the
	// verification token will send to the client's email, otherwise only the token
	// will be sent.
	VerificationUri string `json:"verification_uri"`
}

The information of the requested application.

func (*AppGetRespAppGet) UnmarshalJSON ¶

func (j *AppGetRespAppGet) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppGetRespEchoReq ¶

type AppGetRespEchoReq map[string]interface{}

Echo of the request made.

type AppGetRespMsgType ¶

type AppGetRespMsgType string
const AppGetRespMsgTypeAppGet AppGetRespMsgType = "app_get"

func (*AppGetRespMsgType) UnmarshalJSON ¶

func (j *AppGetRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppList ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

List all of the account's OAuth applications

func (*AppList) UnmarshalJSON ¶

func (j *AppList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppListAppList ¶

type AppListAppList int

func (*AppListAppList) UnmarshalJSON ¶

func (j *AppListAppList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppListPassthrough ¶

type AppListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppListResp ¶

type AppListResp struct {
	// List of created applications for the authorized account.
	AppList []AppListRespAppListElem `json:"app_list,omitempty"`

	// Echo of the request made.
	EchoReq AppListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppListRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with created applications

func (*AppListResp) UnmarshalJSON ¶

func (j *AppListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppListRespAppListElem ¶

type AppListRespAppListElem struct {
	// Active.
	Active *int `json:"active,omitempty"`

	// Application ID.
	AppId int `json:"app_id"`

	// Markup added to contract prices (as a percentage of contract payout).
	AppMarkupPercentage float64 `json:"app_markup_percentage"`

	// Application's App Store URL.
	Appstore *string `json:"appstore"`

	// Application's GitHub page. (for open-source projects)
	Github *string `json:"github"`

	// Application's Google Play URL.
	Googleplay *string `json:"googleplay"`

	// Application's homepage URL.
	Homepage *string `json:"homepage"`

	// Application name.
	Name string `json:"name"`

	// The URL to redirect to after a successful login.
	RedirectUri string `json:"redirect_uri"`

	// Scope Details.
	Scopes []string `json:"scopes,omitempty"`

	// Used when `verify_email` called. If available, a URL containing the
	// verification token will send to the client's email, otherwise only the token
	// will be sent.
	VerificationUri *string `json:"verification_uri"`
}

func (*AppListRespAppListElem) UnmarshalJSON ¶

func (j *AppListRespAppListElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppListRespEchoReq ¶

type AppListRespEchoReq map[string]interface{}

Echo of the request made.

type AppListRespMsgType ¶

type AppListRespMsgType string
const AppListRespMsgTypeAppList AppListRespMsgType = "app_list"

func (*AppListRespMsgType) UnmarshalJSON ¶

func (j *AppListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetails ¶

type AppMarkupDetails struct {
	// [Optional] Specific application `app_id` to report on.
	AppId *int `json:"app_id,omitempty"`

	// Must be `1`
	AppMarkupDetails AppMarkupDetailsAppMarkupDetails `json:"app_markup_details"`

	// [Optional] Specific client loginid to report on, like CR12345
	ClientLoginid *string `json:"client_loginid,omitempty"`

	// Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.
	DateFrom string `json:"date_from"`

	// End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time.
	DateTo string `json:"date_to"`

	// [Optional] If set to 1, will return `app_markup` transaction details.
	Description *AppMarkupDetailsDescription `json:"description,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Number of transactions to skip.
	Offset *int `json:"offset,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppMarkupDetailsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Sort direction on `transaction_time`. Other fields sort order is
	// ASC.
	Sort AppMarkupDetailsSort `json:"sort,omitempty"`

	// [Optional] One or more of the specified fields to sort on. Default sort field
	// is by `transaction_time`.
	SortFields []AppMarkupDetailsSortFieldsElem `json:"sort_fields,omitempty"`
}

Retrieve details of `app_markup` according to criteria specified.

func (*AppMarkupDetails) UnmarshalJSON ¶

func (j *AppMarkupDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsAppMarkupDetails ¶

type AppMarkupDetailsAppMarkupDetails int

func (*AppMarkupDetailsAppMarkupDetails) UnmarshalJSON ¶

func (j *AppMarkupDetailsAppMarkupDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsDescription ¶

type AppMarkupDetailsDescription int

func (*AppMarkupDetailsDescription) UnmarshalJSON ¶

func (j *AppMarkupDetailsDescription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsPassthrough ¶

type AppMarkupDetailsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppMarkupDetailsResp ¶

type AppMarkupDetailsResp struct {
	// App Markup transaction details
	AppMarkupDetails *AppMarkupDetailsRespAppMarkupDetails `json:"app_markup_details,omitempty"`

	// Echo of the request made.
	EchoReq AppMarkupDetailsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppMarkupDetailsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Per transaction reporting of app_markup

func (*AppMarkupDetailsResp) UnmarshalJSON ¶

func (j *AppMarkupDetailsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsRespAppMarkupDetails ¶

type AppMarkupDetailsRespAppMarkupDetails struct {
	// Array of returned transactions
	Transactions []AppMarkupDetailsRespAppMarkupDetailsTransactionsElem `json:"transactions,omitempty"`
}

App Markup transaction details

type AppMarkupDetailsRespAppMarkupDetailsTransactionsElem ¶

type AppMarkupDetailsRespAppMarkupDetailsTransactionsElem struct {
	// ID of the application where this contract was purchased.
	AppId *int `json:"app_id,omitempty"`

	// The markup the client paid in their currency
	AppMarkup *float64 `json:"app_markup,omitempty"`

	// The markup the client paid in USD
	AppMarkupUsd *float64 `json:"app_markup_usd,omitempty"`

	// The markup the client paid in the app developer's currency
	AppMarkupValue *float64 `json:"app_markup_value,omitempty"`

	// Currency code of the client
	ClientCurrcode *string `json:"client_currcode,omitempty"`

	// Login ID of the client
	ClientLoginid *string `json:"client_loginid,omitempty"`

	// Currency code of the app developer
	DevCurrcode *string `json:"dev_currcode,omitempty"`

	// Login ID of the app developer
	DevLoginid *string `json:"dev_loginid,omitempty"`

	// The transaction ID. Every contract (buy or sell) and every payment has a unique
	// ID.
	TransactionId *int `json:"transaction_id,omitempty"`

	// The epoch value of purchase time of transaction
	TransactionTime *string `json:"transaction_time,omitempty"`
}

type AppMarkupDetailsRespEchoReq ¶

type AppMarkupDetailsRespEchoReq map[string]interface{}

Echo of the request made.

type AppMarkupDetailsRespMsgType ¶

type AppMarkupDetailsRespMsgType string
const AppMarkupDetailsRespMsgTypeAppMarkupDetails AppMarkupDetailsRespMsgType = "app_markup_details"

func (*AppMarkupDetailsRespMsgType) UnmarshalJSON ¶

func (j *AppMarkupDetailsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsSort ¶

type AppMarkupDetailsSort string
const AppMarkupDetailsSortASC AppMarkupDetailsSort = "ASC"
const AppMarkupDetailsSortDESC AppMarkupDetailsSort = "DESC"

func (*AppMarkupDetailsSort) UnmarshalJSON ¶

func (j *AppMarkupDetailsSort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupDetailsSortFieldsElem ¶

type AppMarkupDetailsSortFieldsElem string
const AppMarkupDetailsSortFieldsElemAppId AppMarkupDetailsSortFieldsElem = "app_id"
const AppMarkupDetailsSortFieldsElemClientLoginid AppMarkupDetailsSortFieldsElem = "client_loginid"
const AppMarkupDetailsSortFieldsElemTransactionTime AppMarkupDetailsSortFieldsElem = "transaction_time"

func (*AppMarkupDetailsSortFieldsElem) UnmarshalJSON ¶

func (j *AppMarkupDetailsSortFieldsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupStatistics ¶

type AppMarkupStatistics struct {
	// Must be `1`
	AppMarkupStatistics AppMarkupStatisticsAppMarkupStatistics `json:"app_markup_statistics"`

	// Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.
	DateFrom string `json:"date_from"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppMarkupStatisticsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve statistics of `app_markup`.

func (*AppMarkupStatistics) UnmarshalJSON ¶

func (j *AppMarkupStatistics) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupStatisticsAppMarkupStatistics ¶

type AppMarkupStatisticsAppMarkupStatistics int

func (*AppMarkupStatisticsAppMarkupStatistics) UnmarshalJSON ¶

func (j *AppMarkupStatisticsAppMarkupStatistics) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupStatisticsPassthrough ¶

type AppMarkupStatisticsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppMarkupStatisticsResp ¶

type AppMarkupStatisticsResp struct {
	// App Markup transaction statistics
	AppMarkupStatistics *AppMarkupStatisticsRespAppMarkupStatistics `json:"app_markup_statistics,omitempty"`

	// Echo of the request made.
	EchoReq AppMarkupStatisticsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppMarkupStatisticsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Per application reporting of app_markup

func (*AppMarkupStatisticsResp) UnmarshalJSON ¶

func (j *AppMarkupStatisticsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMarkupStatisticsRespAppMarkupStatistics ¶

type AppMarkupStatisticsRespAppMarkupStatistics struct {
	// Array of summed app markups grouped by app_id
	Breakdown []AppMarkupStatisticsRespAppMarkupStatisticsBreakdownElem `json:"breakdown,omitempty"`

	// The sum of markup the client paid in USD
	TotalAppMarkupUsd *float64 `json:"total_app_markup_usd,omitempty"`

	// The total count of transactions
	TotalTransactionsCount *float64 `json:"total_transactions_count,omitempty"`
}

App Markup transaction statistics

type AppMarkupStatisticsRespAppMarkupStatisticsBreakdownElem ¶

type AppMarkupStatisticsRespAppMarkupStatisticsBreakdownElem struct {
	// ID of the application where this contract was purchased.
	AppId *int `json:"app_id,omitempty"`

	// The sum of markup the client paid in USD
	AppMarkupUsd *float64 `json:"app_markup_usd,omitempty"`

	// The sum of markup the client paid in developer's currency
	AppMarkupValue *float64 `json:"app_markup_value,omitempty"`

	// Currency code of the app developer
	DevCurrcode *string `json:"dev_currcode,omitempty"`

	// The count of app transactions
	TransactionsCount *float64 `json:"transactions_count,omitempty"`
}

type AppMarkupStatisticsRespEchoReq ¶

type AppMarkupStatisticsRespEchoReq map[string]interface{}

Echo of the request made.

type AppMarkupStatisticsRespMsgType ¶

type AppMarkupStatisticsRespMsgType string
const AppMarkupStatisticsRespMsgTypeAppMarkupStatistics AppMarkupStatisticsRespMsgType = "app_markup_statistics"

func (*AppMarkupStatisticsRespMsgType) UnmarshalJSON ¶

func (j *AppMarkupStatisticsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegister ¶

type AppRegister struct {
	// [Optional] Markup to be added to contract prices (as a percentage of contract
	// payout). Max markup: 3%.
	AppMarkupPercentage *float64 `json:"app_markup_percentage,omitempty"`

	// Must be `1`
	AppRegister AppRegisterAppRegister `json:"app_register"`

	// [Optional] Application's App Store URL (if applicable).
	Appstore *string `json:"appstore,omitempty"`

	// [Optional] Application's GitHub page (for open-source projects).
	Github *string `json:"github,omitempty"`

	// [Optional] Application's Google Play URL (if applicable).
	Googleplay *string `json:"googleplay,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// Application name.
	Name string `json:"name"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppRegisterPassthrough `json:"passthrough,omitempty"`

	// [Optional] The URL to redirect to after a successful login. Required if
	// charging markup percentage
	RedirectUri *string `json:"redirect_uri,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// List of permission scopes to grant the application.
	Scopes []AppRegisterScopesElem `json:"scopes"`

	// [Optional] Used when `verify_email` called. If available, a URL containing the
	// verification token will be sent to the client's email, otherwise only the token
	// will be sent.
	VerificationUri *string `json:"verification_uri,omitempty"`
}

Register a new OAuth application

func (*AppRegister) UnmarshalJSON ¶

func (j *AppRegister) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegisterAppRegister ¶

type AppRegisterAppRegister int

func (*AppRegisterAppRegister) UnmarshalJSON ¶

func (j *AppRegisterAppRegister) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegisterPassthrough ¶

type AppRegisterPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppRegisterResp ¶

type AppRegisterResp struct {
	// The information of the created application.
	AppRegister *AppRegisterRespAppRegister `json:"app_register,omitempty"`

	// Echo of the request made.
	EchoReq AppRegisterRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppRegisterRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with created application details

func (*AppRegisterResp) UnmarshalJSON ¶

func (j *AppRegisterResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegisterRespAppRegister ¶

type AppRegisterRespAppRegister struct {
	// Active.
	Active *int `json:"active,omitempty"`

	// Application ID.
	AppId int `json:"app_id"`

	// Markup added to contract prices (as a percentage of contract payout).
	AppMarkupPercentage float64 `json:"app_markup_percentage"`

	// Application's App Store URL.
	Appstore string `json:"appstore"`

	// Application's GitHub page (for open-source projects).
	Github string `json:"github"`

	// Application's Google Play URL.
	Googleplay string `json:"googleplay"`

	// Application's homepage URL.
	Homepage string `json:"homepage"`

	// Application name.
	Name string `json:"name"`

	// The URL to redirect to after a successful login.
	RedirectUri string `json:"redirect_uri"`

	// Scope Details.
	Scopes []string `json:"scopes,omitempty"`

	// Used when `verify_email` called. If available, a URL containing the
	// verification token will send to the client's email, otherwise only the token
	// will be sent.
	VerificationUri string `json:"verification_uri"`
}

The information of the created application.

func (*AppRegisterRespAppRegister) UnmarshalJSON ¶

func (j *AppRegisterRespAppRegister) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegisterRespEchoReq ¶

type AppRegisterRespEchoReq map[string]interface{}

Echo of the request made.

type AppRegisterRespMsgType ¶

type AppRegisterRespMsgType string
const AppRegisterRespMsgTypeAppRegister AppRegisterRespMsgType = "app_register"

func (*AppRegisterRespMsgType) UnmarshalJSON ¶

func (j *AppRegisterRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppRegisterScopesElem ¶

type AppRegisterScopesElem string
const AppRegisterScopesElemAdmin AppRegisterScopesElem = "admin"
const AppRegisterScopesElemPayments AppRegisterScopesElem = "payments"
const AppRegisterScopesElemRead AppRegisterScopesElem = "read"
const AppRegisterScopesElemTrade AppRegisterScopesElem = "trade"
const AppRegisterScopesElemTradingInformation AppRegisterScopesElem = "trading_information"

func (*AppRegisterScopesElem) UnmarshalJSON ¶

func (j *AppRegisterScopesElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppUpdate ¶

type AppUpdate struct {
	// [Optional] Markup to be added to contract prices (as a percentage of contract
	// payout). Max markup: 3%.
	AppMarkupPercentage *float64 `json:"app_markup_percentage,omitempty"`

	// Application app_id.
	AppUpdate int `json:"app_update"`

	// [Optional] Application's App Store URL (if applicable).
	Appstore *string `json:"appstore,omitempty"`

	// [Optional] Application's GitHub page (for open-source projects).
	Github *string `json:"github,omitempty"`

	// [Optional] Application's Google Play URL (if applicable).
	Googleplay *string `json:"googleplay,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// Application name.
	Name string `json:"name"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AppUpdatePassthrough `json:"passthrough,omitempty"`

	// [Optional] The URL to redirect to after a successful login. Required if
	// charging markup percentage.
	RedirectUri *string `json:"redirect_uri,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Change scopes will revoke all user's grants and log them out.
	Scopes []AppUpdateScopesElem `json:"scopes"`

	// [Optional] Used when `verify_email` called. If available, a URL containing the
	// verification token will send to the client's email, otherwise only the token
	// will be sent.
	VerificationUri *string `json:"verification_uri,omitempty"`
}

Update a new OAuth application

func (*AppUpdate) UnmarshalJSON ¶

func (j *AppUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppUpdatePassthrough ¶

type AppUpdatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AppUpdateResp ¶

type AppUpdateResp struct {
	// Information of the updated application.
	AppUpdate *AppUpdateRespAppUpdate `json:"app_update,omitempty"`

	// Echo of the request made.
	EchoReq AppUpdateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AppUpdateRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with created application

func (*AppUpdateResp) UnmarshalJSON ¶

func (j *AppUpdateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppUpdateRespAppUpdate ¶

type AppUpdateRespAppUpdate struct {
	// Active.
	Active *int `json:"active,omitempty"`

	// Application ID.
	AppId *int `json:"app_id,omitempty"`

	// Markup added to contract prices (as a percentage of contract payout).
	AppMarkupPercentage *float64 `json:"app_markup_percentage,omitempty"`

	// Application's App Store URL.
	Appstore *string `json:"appstore,omitempty"`

	// Application's GitHub page (for open-source projects).
	Github *string `json:"github,omitempty"`

	// Application's Google Play URL.
	Googleplay *string `json:"googleplay,omitempty"`

	// Application's homepage URL.
	Homepage *string `json:"homepage,omitempty"`

	// Application name.
	Name *string `json:"name,omitempty"`

	// The URL to redirect to after a successful login.
	RedirectUri *string `json:"redirect_uri,omitempty"`

	// Scope Details.
	Scopes []string `json:"scopes,omitempty"`

	// Used when `verify_email` called. If available, a URL containing the
	// verification token will be sent to the client's email, otherwise only the token
	// will be sent.
	VerificationUri *string `json:"verification_uri,omitempty"`
}

Information of the updated application.

type AppUpdateRespEchoReq ¶

type AppUpdateRespEchoReq map[string]interface{}

Echo of the request made.

type AppUpdateRespMsgType ¶

type AppUpdateRespMsgType string
const AppUpdateRespMsgTypeAppUpdate AppUpdateRespMsgType = "app_update"

func (*AppUpdateRespMsgType) UnmarshalJSON ¶

func (j *AppUpdateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppUpdateScopesElem ¶

type AppUpdateScopesElem string
const AppUpdateScopesElemAdmin AppUpdateScopesElem = "admin"
const AppUpdateScopesElemPayments AppUpdateScopesElem = "payments"
const AppUpdateScopesElemRead AppUpdateScopesElem = "read"
const AppUpdateScopesElemTrade AppUpdateScopesElem = "trade"
const AppUpdateScopesElemTradingInformation AppUpdateScopesElem = "trading_information"

func (*AppUpdateScopesElem) UnmarshalJSON ¶

func (j *AppUpdateScopesElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndex ¶

type AssetIndex struct {
	// Must be `1`
	AssetIndex AssetIndexAssetIndex `json:"asset_index"`

	// Deprecated - replaced by landing_company_short.
	LandingCompany *AssetIndexLandingCompany `json:"landing_company,omitempty"`

	// [Optional] If specified, will return only the underlyings for the specified
	// landing company.
	LandingCompanyShort *AssetIndexLandingCompanyShort `json:"landing_company_short,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AssetIndexPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.

func (*AssetIndex) UnmarshalJSON ¶

func (j *AssetIndex) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndexAssetIndex ¶

type AssetIndexAssetIndex int

func (*AssetIndexAssetIndex) UnmarshalJSON ¶

func (j *AssetIndexAssetIndex) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndexLandingCompany ¶

type AssetIndexLandingCompany string
const AssetIndexLandingCompanyIom AssetIndexLandingCompany = "iom"
const AssetIndexLandingCompanyMalta AssetIndexLandingCompany = "malta"
const AssetIndexLandingCompanyMaltainvest AssetIndexLandingCompany = "maltainvest"
const AssetIndexLandingCompanySvg AssetIndexLandingCompany = "svg"
const AssetIndexLandingCompanyVanuatu AssetIndexLandingCompany = "vanuatu"
const AssetIndexLandingCompanyVirtual AssetIndexLandingCompany = "virtual"

func (*AssetIndexLandingCompany) UnmarshalJSON ¶

func (j *AssetIndexLandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndexLandingCompanyShort ¶

type AssetIndexLandingCompanyShort string
const AssetIndexLandingCompanyShortIom AssetIndexLandingCompanyShort = "iom"
const AssetIndexLandingCompanyShortMalta AssetIndexLandingCompanyShort = "malta"
const AssetIndexLandingCompanyShortMaltainvest AssetIndexLandingCompanyShort = "maltainvest"
const AssetIndexLandingCompanyShortSvg AssetIndexLandingCompanyShort = "svg"
const AssetIndexLandingCompanyShortVanuatu AssetIndexLandingCompanyShort = "vanuatu"
const AssetIndexLandingCompanyShortVirtual AssetIndexLandingCompanyShort = "virtual"

func (*AssetIndexLandingCompanyShort) UnmarshalJSON ¶

func (j *AssetIndexLandingCompanyShort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndexPassthrough ¶

type AssetIndexPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AssetIndexResp ¶

type AssetIndexResp struct {
	// List of underlyings by their display name and symbol followed by their
	// available contract types and duration boundaries.
	AssetIndex []interface{} `json:"asset_index,omitempty"`

	// Echo of the request made.
	EchoReq AssetIndexRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AssetIndexRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with Asset Index

func (*AssetIndexResp) UnmarshalJSON ¶

func (j *AssetIndexResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AssetIndexRespEchoReq ¶

type AssetIndexRespEchoReq map[string]interface{}

Echo of the request made.

type AssetIndexRespMsgType ¶

type AssetIndexRespMsgType string
const AssetIndexRespMsgTypeAssetIndex AssetIndexRespMsgType = "asset_index"

func (*AssetIndexRespMsgType) UnmarshalJSON ¶

func (j *AssetIndexRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Authorize ¶

type Authorize struct {
	// [Optional] Send this when you use api tokens for authorization and want to
	// track activity using `login_history` call.
	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.
	Authorize string `json:"authorize"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough AuthorizePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Additional Authentication tokens of authorized user that may be used in this
	// session. Upto 25 tokens.
	Tokens []string `json:"tokens,omitempty"`
}

Authorize current WebSocket session to act on behalf of the owner of a given token. Must precede requests that need to access client account, for example purchasing and selling contracts or viewing portfolio.

func (*Authorize) UnmarshalJSON ¶

func (j *Authorize) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeAddToLoginHistory ¶

type AuthorizeAddToLoginHistory int

func (*AuthorizeAddToLoginHistory) UnmarshalJSON ¶

func (j *AuthorizeAddToLoginHistory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AuthorizePassthrough ¶

type AuthorizePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type AuthorizeResp ¶

type AuthorizeResp struct {
	// Account information for the holder of the token.
	Authorize *AuthorizeRespAuthorize `json:"authorize,omitempty"`

	// Echo of the request made.
	EchoReq AuthorizeRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType AuthorizeRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message containing account information for the holder of that token.

func (*AuthorizeResp) UnmarshalJSON ¶

func (j *AuthorizeResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorize ¶

type AuthorizeRespAuthorize struct {
	// List of accounts for current user. This is also available from the
	// `account_list` call.
	AccountList []AuthorizeRespAuthorizeAccountListElem `json:"account_list,omitempty"`

	// Cash balance of the account.
	Balance *float64 `json:"balance,omitempty"`

	// 2-letter country code (ISO standard).
	Country *string `json:"country,omitempty"`

	// Currency of the account.
	Currency *string `json:"currency,omitempty"`

	// User email.
	Email *string `json:"email,omitempty"`

	// User's full name. Will be empty for virtual accounts.
	Fullname *string `json:"fullname,omitempty"`

	// Boolean value: 1 or 0, indicating whether the account is a virtual-money
	// account.
	IsVirtual *AuthorizeRespAuthorizeIsVirtual `json:"is_virtual,omitempty"`

	// Landing company name the account belongs to.
	LandingCompanyFullname *string `json:"landing_company_fullname,omitempty"`

	// Landing company shortcode the account belongs to.
	LandingCompanyName *string `json:"landing_company_name,omitempty"`

	// Details of the list of Trading accounts linked to the Wallet account.
	LinkedTo []AuthorizeRespAuthorizeLinkedToElem `json:"linked_to,omitempty"`

	// Currencies in client's residence country
	LocalCurrencies AuthorizeRespAuthorizeLocalCurrencies `json:"local_currencies,omitempty"`

	// The account ID that the token was issued for.
	Loginid *string `json:"loginid,omitempty"`

	// User's preferred language, ISO standard code of language
	PreferredLanguage *string `json:"preferred_language,omitempty"`

	// Scopes available to the token.
	Scopes []string `json:"scopes,omitempty"`

	// List of landing company shortcodes the account can upgrade to.
	UpgradeableLandingCompanies []interface{} `json:"upgradeable_landing_companies,omitempty"`

	// The internal user ID for this account.
	UserId *int `json:"user_id,omitempty"`
}

Account information for the holder of the token.

type AuthorizeRespAuthorizeAccountListElem ¶

type AuthorizeRespAuthorizeAccountListElem struct {
	// Account category.
	AccountCategory *AuthorizeRespAuthorizeAccountListElemAccountCategory `json:"account_category,omitempty"`

	// Account type.
	AccountType *string `json:"account_type,omitempty"`

	// 2 letter broker code.
	Broker *string `json:"broker,omitempty"`

	// Creation time of the account as epoch.
	CreatedAt *int `json:"created_at,omitempty"`

	// Currency of specified account.
	Currency *string `json:"currency,omitempty"`

	// Currency type for the corresponding currency.
	CurrencyType *string `json:"currency_type,omitempty"`

	// Epoch of date till client has excluded him/herself from the website, only
	// present if client is self excluded.
	ExcludedUntil *int `json:"excluded_until,omitempty"`

	// Boolean value: 1 or 0, indicating whether the account is marked as disabled or
	// not.
	IsDisabled *AuthorizeRespAuthorizeAccountListElemIsDisabled `json:"is_disabled,omitempty"`

	// Boolean value: 1 or 0, indicating whether the account is a virtual-money
	// account.
	IsVirtual *AuthorizeRespAuthorizeAccountListElemIsVirtual `json:"is_virtual,omitempty"`

	// Landing company shortcode the account belongs to.
	LandingCompanyName *string `json:"landing_company_name,omitempty"`

	// Details of the list of Trading accounts linked to the Wallet account.
	LinkedTo []AuthorizeRespAuthorizeAccountListElemLinkedToElem `json:"linked_to,omitempty"`

	// The account ID of specified account.
	Loginid *string `json:"loginid,omitempty"`
}

type AuthorizeRespAuthorizeAccountListElemAccountCategory ¶

type AuthorizeRespAuthorizeAccountListElemAccountCategory string
const AuthorizeRespAuthorizeAccountListElemAccountCategoryTrading AuthorizeRespAuthorizeAccountListElemAccountCategory = "trading"
const AuthorizeRespAuthorizeAccountListElemAccountCategoryWallet AuthorizeRespAuthorizeAccountListElemAccountCategory = "wallet"

func (*AuthorizeRespAuthorizeAccountListElemAccountCategory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeAccountListElemIsDisabled ¶

type AuthorizeRespAuthorizeAccountListElemIsDisabled int

func (*AuthorizeRespAuthorizeAccountListElemIsDisabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeAccountListElemIsVirtual ¶

type AuthorizeRespAuthorizeAccountListElemIsVirtual int

func (*AuthorizeRespAuthorizeAccountListElemIsVirtual) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeAccountListElemLinkedToElem ¶

type AuthorizeRespAuthorizeAccountListElemLinkedToElem struct {
	// Account ID.
	Loginid *string `json:"loginid,omitempty"`

	// Account platform name.
	Platform *AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform `json:"platform,omitempty"`
}

type AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform ¶

type AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform string
const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformCtrader AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "ctrader"
const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDtrade AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dtrade"
const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDwallet AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dwallet"
const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDxtrade AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dxtrade"
const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformMt5 AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "mt5"

func (*AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeIsVirtual ¶

type AuthorizeRespAuthorizeIsVirtual int

func (*AuthorizeRespAuthorizeIsVirtual) UnmarshalJSON ¶

func (j *AuthorizeRespAuthorizeIsVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeLinkedToElem ¶

type AuthorizeRespAuthorizeLinkedToElem struct {
	// Account ID.
	Loginid *string `json:"loginid,omitempty"`

	// Account platform name.
	Platform *AuthorizeRespAuthorizeLinkedToElemPlatform `json:"platform,omitempty"`
}

type AuthorizeRespAuthorizeLinkedToElemPlatform ¶

type AuthorizeRespAuthorizeLinkedToElemPlatform string
const AuthorizeRespAuthorizeLinkedToElemPlatformCtrader AuthorizeRespAuthorizeLinkedToElemPlatform = "ctrader"
const AuthorizeRespAuthorizeLinkedToElemPlatformDtrade AuthorizeRespAuthorizeLinkedToElemPlatform = "dtrade"
const AuthorizeRespAuthorizeLinkedToElemPlatformDwallet AuthorizeRespAuthorizeLinkedToElemPlatform = "dwallet"
const AuthorizeRespAuthorizeLinkedToElemPlatformDxtrade AuthorizeRespAuthorizeLinkedToElemPlatform = "dxtrade"
const AuthorizeRespAuthorizeLinkedToElemPlatformMt5 AuthorizeRespAuthorizeLinkedToElemPlatform = "mt5"

func (*AuthorizeRespAuthorizeLinkedToElemPlatform) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type AuthorizeRespAuthorizeLocalCurrencies ¶

type AuthorizeRespAuthorizeLocalCurrencies map[string]interface{}

Currencies in client's residence country

type AuthorizeRespEchoReq ¶

type AuthorizeRespEchoReq map[string]interface{}

Echo of the request made.

type AuthorizeRespMsgType ¶

type AuthorizeRespMsgType string
const AuthorizeRespMsgTypeAuthorize AuthorizeRespMsgType = "authorize"

func (*AuthorizeRespMsgType) UnmarshalJSON ¶

func (j *AuthorizeRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Balance ¶

type Balance struct {
	// [Optional] If set to `all`, return the balances of all accounts one by one; if
	// set to `current`, return the balance of current account; if set as an account
	// id, return the balance of that account.
	Account string `json:"account,omitempty"`

	// Must be `1`
	Balance BalanceBalance `json:"balance"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough BalancePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever the balance changes.
	Subscribe *BalanceSubscribe `json:"subscribe,omitempty"`
}

Get user account balance

func (*Balance) UnmarshalJSON ¶

func (j *Balance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceBalance ¶

type BalanceBalance int

func (*BalanceBalance) UnmarshalJSON ¶

func (j *BalanceBalance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalancePassthrough ¶

type BalancePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type BalanceResp ¶

type BalanceResp struct {
	// Current balance of one or more accounts.
	Balance *BalanceRespBalance `json:"balance,omitempty"`

	// Echo of the request made.
	EchoReq BalanceRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType BalanceRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *BalanceRespSubscription `json:"subscription,omitempty"`
}

Return details of user account balance

func (*BalanceResp) UnmarshalJSON ¶

func (j *BalanceResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespBalance ¶

type BalanceRespBalance struct {
	// List of active accounts.
	Accounts BalanceRespBalanceAccounts `json:"accounts,omitempty"`

	// Balance of current account.
	Balance float64 `json:"balance"`

	// Currency of current account.
	Currency string `json:"currency"`

	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id *string `json:"id,omitempty"`

	// Client loginid.
	Loginid string `json:"loginid"`

	// Summary totals of accounts by type.
	Total *BalanceRespBalanceTotal `json:"total,omitempty"`
}

Current balance of one or more accounts.

func (*BalanceRespBalance) UnmarshalJSON ¶

func (j *BalanceRespBalance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespBalanceAccounts ¶

type BalanceRespBalanceAccounts map[string]interface{}

List of active accounts.

type BalanceRespBalanceTotal ¶

type BalanceRespBalanceTotal struct {
	// Total balance of all real money Deriv accounts.
	Deriv *BalanceRespBalanceTotalDeriv `json:"deriv,omitempty"`

	// Total balance of all demo Deriv accounts.
	DerivDemo *BalanceRespBalanceTotalDerivDemo `json:"deriv_demo,omitempty"`

	// Total balance of all MT5 real money accounts.
	Mt5 *BalanceRespBalanceTotalMt5 `json:"mt5,omitempty"`

	// Total balance of all MT5 demo accounts.
	Mt5Demo *BalanceRespBalanceTotalMt5Demo `json:"mt5_demo,omitempty"`
}

Summary totals of accounts by type.

type BalanceRespBalanceTotalDeriv ¶

type BalanceRespBalanceTotalDeriv struct {
	// Total of balances.
	Amount float64 `json:"amount"`

	// Currency of total.
	Currency string `json:"currency"`
}

Total balance of all real money Deriv accounts.

func (*BalanceRespBalanceTotalDeriv) UnmarshalJSON ¶

func (j *BalanceRespBalanceTotalDeriv) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespBalanceTotalDerivDemo ¶

type BalanceRespBalanceTotalDerivDemo struct {
	// Total of balances.
	Amount float64 `json:"amount"`

	// Currency of total.
	Currency string `json:"currency"`
}

Total balance of all demo Deriv accounts.

func (*BalanceRespBalanceTotalDerivDemo) UnmarshalJSON ¶

func (j *BalanceRespBalanceTotalDerivDemo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespBalanceTotalMt5 ¶

type BalanceRespBalanceTotalMt5 struct {
	// Total balance of all MT5 accounts
	Amount float64 `json:"amount"`

	// Currency of total.
	Currency string `json:"currency"`
}

Total balance of all MT5 real money accounts.

func (*BalanceRespBalanceTotalMt5) UnmarshalJSON ¶

func (j *BalanceRespBalanceTotalMt5) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespBalanceTotalMt5Demo ¶

type BalanceRespBalanceTotalMt5Demo struct {
	// Total of balances.
	Amount float64 `json:"amount"`

	// Currency of total.
	Currency string `json:"currency"`
}

Total balance of all MT5 demo accounts.

func (*BalanceRespBalanceTotalMt5Demo) UnmarshalJSON ¶

func (j *BalanceRespBalanceTotalMt5Demo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespEchoReq ¶

type BalanceRespEchoReq map[string]interface{}

Echo of the request made.

type BalanceRespMsgType ¶

type BalanceRespMsgType string
const BalanceRespMsgTypeBalance BalanceRespMsgType = "balance"

func (*BalanceRespMsgType) UnmarshalJSON ¶

func (j *BalanceRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceRespSubscription ¶

type BalanceRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*BalanceRespSubscription) UnmarshalJSON ¶

func (j *BalanceRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BalanceSubscribe ¶

type BalanceSubscribe int

func (*BalanceSubscribe) UnmarshalJSON ¶

func (j *BalanceSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Buy ¶

type Buy struct {
	// Either the ID received from a Price Proposal (`proposal` call), or `1` if
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass the parameters for contract buy.
	Parameters *BuyParameters `json:"parameters,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough BuyPassthrough `json:"passthrough,omitempty"`

	// Maximum price at which to purchase the contract.
	Price float64 `json:"price"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] `1` to stream.
	Subscribe *BuySubscribe `json:"subscribe,omitempty"`
}

Buy a Contract

func (*Buy) UnmarshalJSON ¶

func (j *Buy) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccounts ¶

type BuyContractForMultipleAccounts struct {
	// Either the ID received from a Price Proposal (`proposal` call), or `1` if
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass the parameters for contract buy.
	Parameters *BuyContractForMultipleAccountsParameters `json:"parameters,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough BuyContractForMultipleAccountsPassthrough `json:"passthrough,omitempty"`

	// Maximum price at which to purchase the contract.
	Price float64 `json:"price"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// List of API tokens identifying the accounts for which the contract is bought.
	// Note: If the same token appears multiple times or if multiple tokens designate
	// the same account, the contract is bought multiple times for this account.
	Tokens []string `json:"tokens"`
}

Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.

func (*BuyContractForMultipleAccounts) UnmarshalJSON ¶

func (j *BuyContractForMultipleAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsParameters ¶

type BuyContractForMultipleAccountsParameters struct {
	// [Optional] Proposed `payout` or `stake` value
	Amount *float64 `json:"amount,omitempty"`

	// [Optional] Markup added to contract prices (as a percentage of contract payout)
	AppMarkupPercentage *float64 `json:"app_markup_percentage,omitempty"`

	// [Optional] Barrier for the contract (or last digit prediction for digit
	// contracts). Contracts less than 24 hours in duration would need a relative
	// barrier (barriers which need +/-), where entry spot would be adjusted
	// accordingly with that amount to define a barrier, except for Synthetic Indices
	// as they support both relative and absolute barriers.
	Barrier *string `json:"barrier,omitempty"`

	// [Optional] Low barrier for the contract (for contracts with two barriers).
	// Contracts less than 24 hours in duration would need a relative barrier
	// (barriers which need +/-), where entry spot would be adjusted accordingly with
	// that amount to define a barrier, except for Synthetic Indices as they support
	// both relative and absolute barriers.
	Barrier2 *string `json:"barrier2,omitempty"`

	// [Optional] Indicate whether amount is 'payout' or 'stake'.
	Basis *BuyContractForMultipleAccountsParametersBasis `json:"basis,omitempty"`

	// A valid contract-type
	ContractType BuyContractForMultipleAccountsParametersContractType `json:"contract_type"`

	// This can only be the account-holder's currency
	Currency string `json:"currency"`

	// [Optional] Epoch value of the expiry time of the contract. You must either
	// specify `date_expiry` or `duration`.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// [Optional] For forward-starting contracts, epoch value of the starting time of
	// the contract.
	DateStart *int `json:"date_start,omitempty"`

	// [Optional] Duration quantity
	Duration *int `json:"duration,omitempty"`

	// [Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days,
	// `t`: ticks
	DurationUnit *BuyContractForMultipleAccountsParametersDurationUnit `json:"duration_unit,omitempty"`

	// [Optional] The multiplier for non-binary options. E.g. lookbacks.
	Multiplier *float64 `json:"multiplier,omitempty"`

	// [Optional] The tick that is predicted to have the highest/lowest value - for
	// tickhigh and ticklow contracts.
	SelectedTick *int `json:"selected_tick,omitempty"`

	// Symbol code
	Symbol string `json:"symbol"`
}

[Optional] Used to pass the parameters for contract buy.

func (*BuyContractForMultipleAccountsParameters) UnmarshalJSON ¶

func (j *BuyContractForMultipleAccountsParameters) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsParametersBasis ¶

type BuyContractForMultipleAccountsParametersBasis string
const BuyContractForMultipleAccountsParametersBasisPayout BuyContractForMultipleAccountsParametersBasis = "payout"
const BuyContractForMultipleAccountsParametersBasisStake BuyContractForMultipleAccountsParametersBasis = "stake"

func (*BuyContractForMultipleAccountsParametersBasis) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsParametersContractType ¶

type BuyContractForMultipleAccountsParametersContractType string
const BuyContractForMultipleAccountsParametersContractTypeASIAND BuyContractForMultipleAccountsParametersContractType = "ASIAND"
const BuyContractForMultipleAccountsParametersContractTypeASIANU BuyContractForMultipleAccountsParametersContractType = "ASIANU"
const BuyContractForMultipleAccountsParametersContractTypeCALL BuyContractForMultipleAccountsParametersContractType = "CALL"
const BuyContractForMultipleAccountsParametersContractTypeCALLE BuyContractForMultipleAccountsParametersContractType = "CALLE"
const BuyContractForMultipleAccountsParametersContractTypeCALLSPREAD BuyContractForMultipleAccountsParametersContractType = "CALLSPREAD"
const BuyContractForMultipleAccountsParametersContractTypeDIGITDIFF BuyContractForMultipleAccountsParametersContractType = "DIGITDIFF"
const BuyContractForMultipleAccountsParametersContractTypeDIGITEVEN BuyContractForMultipleAccountsParametersContractType = "DIGITEVEN"
const BuyContractForMultipleAccountsParametersContractTypeDIGITMATCH BuyContractForMultipleAccountsParametersContractType = "DIGITMATCH"
const BuyContractForMultipleAccountsParametersContractTypeDIGITODD BuyContractForMultipleAccountsParametersContractType = "DIGITODD"
const BuyContractForMultipleAccountsParametersContractTypeDIGITOVER BuyContractForMultipleAccountsParametersContractType = "DIGITOVER"
const BuyContractForMultipleAccountsParametersContractTypeDIGITUNDER BuyContractForMultipleAccountsParametersContractType = "DIGITUNDER"
const BuyContractForMultipleAccountsParametersContractTypeEXPIRYMISS BuyContractForMultipleAccountsParametersContractType = "EXPIRYMISS"
const BuyContractForMultipleAccountsParametersContractTypeEXPIRYMISSE BuyContractForMultipleAccountsParametersContractType = "EXPIRYMISSE"
const BuyContractForMultipleAccountsParametersContractTypeEXPIRYRANGE BuyContractForMultipleAccountsParametersContractType = "EXPIRYRANGE"
const BuyContractForMultipleAccountsParametersContractTypeEXPIRYRANGEE BuyContractForMultipleAccountsParametersContractType = "EXPIRYRANGEE"
const BuyContractForMultipleAccountsParametersContractTypeLBFLOATCALL BuyContractForMultipleAccountsParametersContractType = "LBFLOATCALL"
const BuyContractForMultipleAccountsParametersContractTypeLBFLOATPUT BuyContractForMultipleAccountsParametersContractType = "LBFLOATPUT"
const BuyContractForMultipleAccountsParametersContractTypeLBHIGHLOW BuyContractForMultipleAccountsParametersContractType = "LBHIGHLOW"
const BuyContractForMultipleAccountsParametersContractTypeMULTDOWN BuyContractForMultipleAccountsParametersContractType = "MULTDOWN"
const BuyContractForMultipleAccountsParametersContractTypeMULTUP BuyContractForMultipleAccountsParametersContractType = "MULTUP"
const BuyContractForMultipleAccountsParametersContractTypeNOTOUCH BuyContractForMultipleAccountsParametersContractType = "NOTOUCH"
const BuyContractForMultipleAccountsParametersContractTypeONETOUCH BuyContractForMultipleAccountsParametersContractType = "ONETOUCH"
const BuyContractForMultipleAccountsParametersContractTypePUT BuyContractForMultipleAccountsParametersContractType = "PUT"
const BuyContractForMultipleAccountsParametersContractTypePUTE BuyContractForMultipleAccountsParametersContractType = "PUTE"
const BuyContractForMultipleAccountsParametersContractTypePUTSPREAD BuyContractForMultipleAccountsParametersContractType = "PUTSPREAD"
const BuyContractForMultipleAccountsParametersContractTypeRANGE BuyContractForMultipleAccountsParametersContractType = "RANGE"
const BuyContractForMultipleAccountsParametersContractTypeRESETCALL BuyContractForMultipleAccountsParametersContractType = "RESETCALL"
const BuyContractForMultipleAccountsParametersContractTypeRESETPUT BuyContractForMultipleAccountsParametersContractType = "RESETPUT"
const BuyContractForMultipleAccountsParametersContractTypeRUNHIGH BuyContractForMultipleAccountsParametersContractType = "RUNHIGH"
const BuyContractForMultipleAccountsParametersContractTypeRUNLOW BuyContractForMultipleAccountsParametersContractType = "RUNLOW"
const BuyContractForMultipleAccountsParametersContractTypeTICKHIGH BuyContractForMultipleAccountsParametersContractType = "TICKHIGH"
const BuyContractForMultipleAccountsParametersContractTypeTICKLOW BuyContractForMultipleAccountsParametersContractType = "TICKLOW"
const BuyContractForMultipleAccountsParametersContractTypeTURBOSLONG BuyContractForMultipleAccountsParametersContractType = "TURBOSLONG"
const BuyContractForMultipleAccountsParametersContractTypeTURBOSSHORT BuyContractForMultipleAccountsParametersContractType = "TURBOSSHORT"
const BuyContractForMultipleAccountsParametersContractTypeUPORDOWN BuyContractForMultipleAccountsParametersContractType = "UPORDOWN"
const BuyContractForMultipleAccountsParametersContractTypeVANILLALONGCALL BuyContractForMultipleAccountsParametersContractType = "VANILLALONGCALL"
const BuyContractForMultipleAccountsParametersContractTypeVANILLALONGPUT BuyContractForMultipleAccountsParametersContractType = "VANILLALONGPUT"

func (*BuyContractForMultipleAccountsParametersContractType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsParametersDurationUnit ¶

type BuyContractForMultipleAccountsParametersDurationUnit string
const BuyContractForMultipleAccountsParametersDurationUnitD BuyContractForMultipleAccountsParametersDurationUnit = "d"
const BuyContractForMultipleAccountsParametersDurationUnitH BuyContractForMultipleAccountsParametersDurationUnit = "h"
const BuyContractForMultipleAccountsParametersDurationUnitM BuyContractForMultipleAccountsParametersDurationUnit = "m"
const BuyContractForMultipleAccountsParametersDurationUnitS BuyContractForMultipleAccountsParametersDurationUnit = "s"
const BuyContractForMultipleAccountsParametersDurationUnitT BuyContractForMultipleAccountsParametersDurationUnit = "t"

func (*BuyContractForMultipleAccountsParametersDurationUnit) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsPassthrough ¶

type BuyContractForMultipleAccountsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type BuyContractForMultipleAccountsResp ¶

type BuyContractForMultipleAccountsResp struct {
	// Receipt confirmation for the purchase
	BuyContractForMultipleAccounts *BuyContractForMultipleAccountsRespBuyContractForMultipleAccounts `json:"buy_contract_for_multiple_accounts,omitempty"`

	// Echo of the request made.
	EchoReq BuyContractForMultipleAccountsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType BuyContractForMultipleAccountsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with transaction results is received

func (*BuyContractForMultipleAccountsResp) UnmarshalJSON ¶

func (j *BuyContractForMultipleAccountsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsRespBuyContractForMultipleAccounts ¶

type BuyContractForMultipleAccountsRespBuyContractForMultipleAccounts struct {
	// List of results containing transactions and/or errors for the bought contracts.
	Result []interface{} `json:"result"`
}

Receipt confirmation for the purchase

func (*BuyContractForMultipleAccountsRespBuyContractForMultipleAccounts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type BuyContractForMultipleAccountsRespEchoReq ¶

type BuyContractForMultipleAccountsRespEchoReq map[string]interface{}

Echo of the request made.

type BuyContractForMultipleAccountsRespMsgType ¶

type BuyContractForMultipleAccountsRespMsgType string
const BuyContractForMultipleAccountsRespMsgTypeBuyContractForMultipleAccounts BuyContractForMultipleAccountsRespMsgType = "buy_contract_for_multiple_accounts"

func (*BuyContractForMultipleAccountsRespMsgType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type BuyParameters ¶

type BuyParameters struct {
	// [Optional] Proposed payout or stake value
	Amount *float64 `json:"amount,omitempty"`

	// [Optional] Markup added to contract prices (as a percentage of contract payout)
	AppMarkupPercentage *float64 `json:"app_markup_percentage,omitempty"`

	// [Optional] Barrier for the contract (or last digit prediction for digit
	// contracts). Contracts less than 24 hours in duration would need a relative
	// barrier (barriers which need +/-), where entry spot would be adjusted
	// accordingly with that amount to define a barrier, except for Synthetic Indices
	// as they support both relative and absolute barriers.
	Barrier *string `json:"barrier,omitempty"`

	// [Optional] Low barrier for the contract (for contracts with two barriers).
	// Contracts less than 24 hours in duration would need a relative barrier
	// (barriers which need +/-), where entry spot would be adjusted accordingly with
	// that amount to define a barrier, except for Synthetic Indices as they support
	// both relative and absolute barriers.
	Barrier2 *string `json:"barrier2,omitempty"`

	// [Optional] Barrier range for callputspread.
	BarrierRange *BuyParametersBarrierRange `json:"barrier_range,omitempty"`

	// [Optional] Indicates whether amount is 'payout' or 'stake' for binary options.
	Basis *BuyParametersBasis `json:"basis,omitempty"`

	// Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).
	Cancellation *string `json:"cancellation,omitempty"`

	// A valid contract-type
	ContractType BuyParametersContractType `json:"contract_type"`

	// This can only be the account-holder's currency
	Currency string `json:"currency"`

	// [Optional] Epoch value of the expiry time of the contract. You must either
	// specify date_expiry or duration.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// [Optional] For forward-starting contracts, epoch value of the starting time of
	// the contract.
	DateStart *int `json:"date_start,omitempty"`

	// [Optional] Duration quantity
	Duration *int `json:"duration,omitempty"`

	// [Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days,
	// `t`: ticks
	DurationUnit *BuyParametersDurationUnit `json:"duration_unit,omitempty"`

	// [Optional] Growth rate of an accumulator contract.
	GrowthRate *float64 `json:"growth_rate,omitempty"`

	// Add an order to close the contract once the order condition is met (only for
	// `MULTUP` and `MULTDOWN` and `ACCU` contracts).
	LimitOrder *BuyParametersLimitOrder `json:"limit_order,omitempty"`

	// [Optional] The multiplier for non-binary options. E.g. lookbacks.
	Multiplier *float64 `json:"multiplier,omitempty"`

	// [Optional] Clients can provide payout_per_point directly, and the barrier will
	// be calculated based on this payout_per_point value.
	PayoutPerPoint *float64 `json:"payout_per_point,omitempty"`

	// [Optional] The product type.
	ProductType BuyParametersProductType `json:"product_type,omitempty"`

	// [Optional] The tick that is predicted to have the highest/lowest value - for
	// tickhigh and ticklow contracts.
	SelectedTick *int `json:"selected_tick,omitempty"`

	// Symbol code
	Symbol string `json:"symbol"`

	// [For Snowball only] The trade risk profile for Snowball trade types.
	TradeRiskProfile *BuyParametersTradeRiskProfile `json:"trade_risk_profile,omitempty"`

	// [Optional] An epoch value of a predefined trading period start time
	TradingPeriodStart *int `json:"trading_period_start,omitempty"`
}

[Optional] Used to pass the parameters for contract buy.

func (*BuyParameters) UnmarshalJSON ¶

func (j *BuyParameters) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersBarrierRange ¶

type BuyParametersBarrierRange string
const BuyParametersBarrierRangeMiddle BuyParametersBarrierRange = "middle"
const BuyParametersBarrierRangeTight BuyParametersBarrierRange = "tight"
const BuyParametersBarrierRangeWide BuyParametersBarrierRange = "wide"

func (*BuyParametersBarrierRange) UnmarshalJSON ¶

func (j *BuyParametersBarrierRange) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersBasis ¶

type BuyParametersBasis string
const BuyParametersBasisPayout BuyParametersBasis = "payout"
const BuyParametersBasisStake BuyParametersBasis = "stake"

func (*BuyParametersBasis) UnmarshalJSON ¶

func (j *BuyParametersBasis) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersContractType ¶

type BuyParametersContractType string
const BuyParametersContractTypeACCU BuyParametersContractType = "ACCU"
const BuyParametersContractTypeASIAND BuyParametersContractType = "ASIAND"
const BuyParametersContractTypeASIANU BuyParametersContractType = "ASIANU"
const BuyParametersContractTypeCALL BuyParametersContractType = "CALL"
const BuyParametersContractTypeCALLE BuyParametersContractType = "CALLE"
const BuyParametersContractTypeCALLSPREAD BuyParametersContractType = "CALLSPREAD"
const BuyParametersContractTypeDIGITDIFF BuyParametersContractType = "DIGITDIFF"
const BuyParametersContractTypeDIGITEVEN BuyParametersContractType = "DIGITEVEN"
const BuyParametersContractTypeDIGITMATCH BuyParametersContractType = "DIGITMATCH"
const BuyParametersContractTypeDIGITODD BuyParametersContractType = "DIGITODD"
const BuyParametersContractTypeDIGITOVER BuyParametersContractType = "DIGITOVER"
const BuyParametersContractTypeDIGITUNDER BuyParametersContractType = "DIGITUNDER"
const BuyParametersContractTypeEXPIRYMISS BuyParametersContractType = "EXPIRYMISS"
const BuyParametersContractTypeEXPIRYMISSE BuyParametersContractType = "EXPIRYMISSE"
const BuyParametersContractTypeEXPIRYRANGE BuyParametersContractType = "EXPIRYRANGE"
const BuyParametersContractTypeEXPIRYRANGEE BuyParametersContractType = "EXPIRYRANGEE"
const BuyParametersContractTypeLBFLOATCALL BuyParametersContractType = "LBFLOATCALL"
const BuyParametersContractTypeLBFLOATPUT BuyParametersContractType = "LBFLOATPUT"
const BuyParametersContractTypeLBHIGHLOW BuyParametersContractType = "LBHIGHLOW"
const BuyParametersContractTypeMULTDOWN BuyParametersContractType = "MULTDOWN"
const BuyParametersContractTypeMULTUP BuyParametersContractType = "MULTUP"
const BuyParametersContractTypeNOTOUCH BuyParametersContractType = "NOTOUCH"
const BuyParametersContractTypeONETOUCH BuyParametersContractType = "ONETOUCH"
const BuyParametersContractTypePUT BuyParametersContractType = "PUT"
const BuyParametersContractTypePUTE BuyParametersContractType = "PUTE"
const BuyParametersContractTypePUTSPREAD BuyParametersContractType = "PUTSPREAD"
const BuyParametersContractTypeRANGE BuyParametersContractType = "RANGE"
const BuyParametersContractTypeRESETCALL BuyParametersContractType = "RESETCALL"
const BuyParametersContractTypeRESETPUT BuyParametersContractType = "RESETPUT"
const BuyParametersContractTypeRUNHIGH BuyParametersContractType = "RUNHIGH"
const BuyParametersContractTypeRUNLOW BuyParametersContractType = "RUNLOW"
const BuyParametersContractTypeSNOWDOWN BuyParametersContractType = "SNOWDOWN"
const BuyParametersContractTypeSNOWUP BuyParametersContractType = "SNOWUP"
const BuyParametersContractTypeTICKHIGH BuyParametersContractType = "TICKHIGH"
const BuyParametersContractTypeTICKLOW BuyParametersContractType = "TICKLOW"
const BuyParametersContractTypeTURBOSLONG BuyParametersContractType = "TURBOSLONG"
const BuyParametersContractTypeTURBOSSHORT BuyParametersContractType = "TURBOSSHORT"
const BuyParametersContractTypeUPORDOWN BuyParametersContractType = "UPORDOWN"
const BuyParametersContractTypeVANILLALONGCALL BuyParametersContractType = "VANILLALONGCALL"
const BuyParametersContractTypeVANILLALONGPUT BuyParametersContractType = "VANILLALONGPUT"

func (*BuyParametersContractType) UnmarshalJSON ¶

func (j *BuyParametersContractType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersDurationUnit ¶

type BuyParametersDurationUnit string
const BuyParametersDurationUnitD BuyParametersDurationUnit = "d"
const BuyParametersDurationUnitH BuyParametersDurationUnit = "h"
const BuyParametersDurationUnitM BuyParametersDurationUnit = "m"
const BuyParametersDurationUnitS BuyParametersDurationUnit = "s"
const BuyParametersDurationUnitT BuyParametersDurationUnit = "t"

func (*BuyParametersDurationUnit) UnmarshalJSON ¶

func (j *BuyParametersDurationUnit) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersLimitOrder ¶

type BuyParametersLimitOrder struct {
	// Contract will be automatically closed when the value of the contract reaches a
	// specific loss.
	StopLoss *float64 `json:"stop_loss,omitempty"`

	// Contract will be automatically closed when the value of the contract reaches a
	// specific profit.
	TakeProfit *float64 `json:"take_profit,omitempty"`
}

Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and `ACCU` contracts).

type BuyParametersProductType ¶

type BuyParametersProductType string
const BuyParametersProductTypeBasic BuyParametersProductType = "basic"

func (*BuyParametersProductType) UnmarshalJSON ¶

func (j *BuyParametersProductType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyParametersTradeRiskProfile ¶ added in v0.5.10

type BuyParametersTradeRiskProfile string
const BuyParametersTradeRiskProfileHigh BuyParametersTradeRiskProfile = "high"
const BuyParametersTradeRiskProfileLow BuyParametersTradeRiskProfile = "low"
const BuyParametersTradeRiskProfileMedium BuyParametersTradeRiskProfile = "medium"

func (*BuyParametersTradeRiskProfile) UnmarshalJSON ¶ added in v0.5.10

func (j *BuyParametersTradeRiskProfile) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyPassthrough ¶

type BuyPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type BuyResp ¶

type BuyResp struct {
	// Receipt confirmation for the purchase
	Buy *BuyRespBuy `json:"buy,omitempty"`

	// Echo of the request made.
	EchoReq BuyRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType BuyRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *BuyRespSubscription `json:"subscription,omitempty"`
}

A message with transaction results is received

func (*BuyResp) UnmarshalJSON ¶

func (j *BuyResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyRespBuy ¶

type BuyRespBuy struct {
	// The new account balance after completion of the purchase
	BalanceAfter float64 `json:"balance_after"`

	// Actual effected purchase price
	BuyPrice float64 `json:"buy_price"`

	// Internal contract identifier
	ContractId int `json:"contract_id"`

	// The description of contract purchased
	Longcode string `json:"longcode"`

	// Proposed payout value
	Payout float64 `json:"payout"`

	// Epoch value of the transaction purchase time
	PurchaseTime int `json:"purchase_time"`

	// Compact description of the contract purchased
	Shortcode string `json:"shortcode"`

	// Epoch value showing the expected start time of the contract
	StartTime int `json:"start_time"`

	// Internal transaction identifier
	TransactionId int `json:"transaction_id"`
}

Receipt confirmation for the purchase

func (*BuyRespBuy) UnmarshalJSON ¶

func (j *BuyRespBuy) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyRespEchoReq ¶

type BuyRespEchoReq map[string]interface{}

Echo of the request made.

type BuyRespMsgType ¶

type BuyRespMsgType string
const BuyRespMsgTypeBuy BuyRespMsgType = "buy"

func (*BuyRespMsgType) UnmarshalJSON ¶

func (j *BuyRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuyRespSubscription ¶

type BuyRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*BuyRespSubscription) UnmarshalJSON ¶

func (j *BuyRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BuySubscribe ¶

type BuySubscribe int

func (*BuySubscribe) UnmarshalJSON ¶

func (j *BuySubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Cancel ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CancelPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Cancel contract with contract id

func (*Cancel) UnmarshalJSON ¶

func (j *Cancel) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CancelPassthrough ¶

type CancelPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CancelResp ¶

type CancelResp struct {
	// Receipt for the transaction
	Cancel *CancelRespCancel `json:"cancel,omitempty"`

	// Echo of the request made.
	EchoReq CancelRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CancelRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with transaction results is received

func (*CancelResp) UnmarshalJSON ¶

func (j *CancelResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CancelRespCancel ¶

type CancelRespCancel struct {
	// New account balance after completion of the sale
	BalanceAfter *float64 `json:"balance_after,omitempty"`

	// Internal contract identifier for the sold contract
	ContractId *int `json:"contract_id,omitempty"`

	// Internal transaction identifier for the corresponding buy transaction
	ReferenceId *int `json:"reference_id,omitempty"`

	// Actual effected sale price
	SoldFor *float64 `json:"sold_for,omitempty"`

	// Internal transaction identifier for the sale transaction
	TransactionId *int `json:"transaction_id,omitempty"`
}

Receipt for the transaction

type CancelRespEchoReq ¶

type CancelRespEchoReq map[string]interface{}

Echo of the request made.

type CancelRespMsgType ¶

type CancelRespMsgType string
const CancelRespMsgTypeCancel CancelRespMsgType = "cancel"

func (*CancelRespMsgType) UnmarshalJSON ¶

func (j *CancelRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Cashier ¶

type Cashier struct {
	// [Optional] Address for crypto withdrawal. Only applicable for `api` type.
	Address *string `json:"address,omitempty"`

	// [Optional] Amount for crypto withdrawal. Only applicable for `api` type.
	Amount *float64 `json:"amount,omitempty"`

	// Operation which needs to be requested from cashier
	Cashier CashierCashier `json:"cashier"`

	// [Optional] If set to `1`, only validation is performed. Only applicable for
	// `withdraw` using `crypto` provider and `api` type.
	DryRun CashierDryRun `json:"dry_run,omitempty"`

	// [Optional] The `unique_id` of the estimated fee received from
	// `crypto_estimations` call in case the client is willing to pay the returned fee
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CashierPassthrough `json:"passthrough,omitempty"`

	// [Optional] Cashier provider.
	Provider CashierProvider `json:"provider,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Data is returned from the cashier. The `crypto` provider only
	// supports `api` (not `url`) for crypto accounts.
	Type CashierType `json:"type,omitempty"`

	// [Optional] Email verification code (received from a `verify_email` call, which
	// must be done first)
	VerificationCode *string `json:"verification_code,omitempty"`
}

Request the cashier info for the specified type.

func (*Cashier) UnmarshalJSON ¶

func (j *Cashier) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierCashier ¶

type CashierCashier string
const CashierCashierDeposit CashierCashier = "deposit"
const CashierCashierWithdraw CashierCashier = "withdraw"

func (*CashierCashier) UnmarshalJSON ¶

func (j *CashierCashier) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierDryRun ¶

type CashierDryRun int

func (*CashierDryRun) UnmarshalJSON ¶

func (j *CashierDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierPassthrough ¶

type CashierPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CashierProvider ¶

type CashierProvider string
const CashierProviderCrypto CashierProvider = "crypto"
const CashierProviderDoughflow CashierProvider = "doughflow"

func (*CashierProvider) UnmarshalJSON ¶

func (j *CashierProvider) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierResp ¶

type CashierResp struct {
	// Possible error codes are:
	// - `ASK_TNC_APPROVAL`: API call `tnc_approval`
	// - `ASK_AUTHENTICATE`
	// - `ASK_UK_FUNDS_PROTECTION`: API call `tnc_approval`
	// - `ASK_CURRENCY`: API call `set_account_currency`
	// - `ASK_EMAIL_VERIFY`: API call `verify_email`
	// - `ASK_FIX_DETAILS`: API call `set_settings`
	Cashier interface{} `json:"cashier,omitempty"`

	// Echo of the request made.
	EchoReq CashierRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CashierRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Cashier information for the specified type.

func (*CashierResp) UnmarshalJSON ¶

func (j *CashierResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierRespEchoReq ¶

type CashierRespEchoReq map[string]interface{}

Echo of the request made.

type CashierRespMsgType ¶

type CashierRespMsgType string
const CashierRespMsgTypeCashier CashierRespMsgType = "cashier"

func (*CashierRespMsgType) UnmarshalJSON ¶

func (j *CashierRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CashierType ¶

type CashierType string
const CashierTypeApi CashierType = "api"
const CashierTypeUrl CashierType = "url"

func (*CashierType) UnmarshalJSON ¶

func (j *CashierType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ClientKycStatusRequirements ¶ added in v0.5.4

type ClientKycStatusRequirements struct {
	// Status of proof of address (POA).
	PoaStatus ClientKycStatusRequirementsPoaStatus `json:"poa_status"`

	// Status of proof of identity (POI).
	PoiStatus ClientKycStatusRequirementsPoiStatus `json:"poi_status"`

	// Indicates whether the tax identification number (TIN) is valid (1) or not (0).
	ValidTin ClientKycStatusRequirementsValidTin `json:"valid_tin"`
}

[Optional] Pertains to client KYC. Returned only if the client fails to meet the requirements, including proof of identity (POI), validity of the tax identification number (TIN), and proof of address (POA).

func (*ClientKycStatusRequirements) UnmarshalJSON ¶ added in v0.5.4

func (j *ClientKycStatusRequirements) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ClientKycStatusRequirementsPoaStatus ¶ added in v0.5.4

type ClientKycStatusRequirementsPoaStatus string
const ClientKycStatusRequirementsPoaStatusExpired ClientKycStatusRequirementsPoaStatus = "expired"
const ClientKycStatusRequirementsPoaStatusNone ClientKycStatusRequirementsPoaStatus = "none"
const ClientKycStatusRequirementsPoaStatusPending ClientKycStatusRequirementsPoaStatus = "pending"
const ClientKycStatusRequirementsPoaStatusRejected ClientKycStatusRequirementsPoaStatus = "rejected"
const ClientKycStatusRequirementsPoaStatusVerified ClientKycStatusRequirementsPoaStatus = "verified"

func (*ClientKycStatusRequirementsPoaStatus) UnmarshalJSON ¶ added in v0.5.4

func (j *ClientKycStatusRequirementsPoaStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ClientKycStatusRequirementsPoiStatus ¶ added in v0.5.4

type ClientKycStatusRequirementsPoiStatus string
const ClientKycStatusRequirementsPoiStatusExpired ClientKycStatusRequirementsPoiStatus = "expired"
const ClientKycStatusRequirementsPoiStatusNone ClientKycStatusRequirementsPoiStatus = "none"
const ClientKycStatusRequirementsPoiStatusPending ClientKycStatusRequirementsPoiStatus = "pending"
const ClientKycStatusRequirementsPoiStatusRejected ClientKycStatusRequirementsPoiStatus = "rejected"
const ClientKycStatusRequirementsPoiStatusSuspected ClientKycStatusRequirementsPoiStatus = "suspected"
const ClientKycStatusRequirementsPoiStatusVerified ClientKycStatusRequirementsPoiStatus = "verified"

func (*ClientKycStatusRequirementsPoiStatus) UnmarshalJSON ¶ added in v0.5.4

func (j *ClientKycStatusRequirementsPoiStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ClientKycStatusRequirementsValidTin ¶ added in v0.5.4

type ClientKycStatusRequirementsValidTin int

func (*ClientKycStatusRequirementsValidTin) UnmarshalJSON ¶ added in v0.5.4

func (j *ClientKycStatusRequirementsValidTin) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ComplianceRequirements ¶ added in v0.4.26

type ComplianceRequirements struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type ConfirmEmail ¶ added in v0.4.18

type ConfirmEmail struct {
	// Must be `1`
	ConfirmEmail ConfirmEmailConfirmEmail `json:"confirm_email"`

	// [Optional] Purpose of the email verification. If set to 'account_opening', the
	// API will only return the verification response without updating the user's
	// email verification status.
	CreatedFor ConfirmEmailCreatedFor `json:"created_for,omitempty"`

	// Boolean value: 1 or 0, indicating whether the client has given consent for
	// marketing emails.
	EmailConsent ConfirmEmailEmailConsent `json:"email_consent"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ConfirmEmailPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first).
	VerificationCode string `json:"verification_code"`
}

Verifies the email for the user using verification code passed in the request object

func (*ConfirmEmail) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailConfirmEmail ¶ added in v0.4.18

type ConfirmEmailConfirmEmail int

func (*ConfirmEmailConfirmEmail) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmailConfirmEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailCreatedFor ¶ added in v0.6.1

type ConfirmEmailCreatedFor string
const ConfirmEmailCreatedForAccountOpening ConfirmEmailCreatedFor = "account_opening"
const ConfirmEmailCreatedForAccountVerification ConfirmEmailCreatedFor = "account_verification"

func (*ConfirmEmailCreatedFor) UnmarshalJSON ¶ added in v0.6.1

func (j *ConfirmEmailCreatedFor) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailEmailConsent ¶ added in v0.4.18

type ConfirmEmailEmailConsent int

func (*ConfirmEmailEmailConsent) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmailEmailConsent) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailPassthrough ¶ added in v0.4.18

type ConfirmEmailPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ConfirmEmailResp ¶ added in v0.4.18

type ConfirmEmailResp struct {
	// 1 for success (The verification code has been successfully verified)
	ConfirmEmail *ConfirmEmailRespConfirmEmail `json:"confirm_email,omitempty"`

	// Echo of the request made.
	EchoReq ConfirmEmailRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ConfirmEmailRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Confirm Email Response

func (*ConfirmEmailResp) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmailResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailRespConfirmEmail ¶ added in v0.4.18

type ConfirmEmailRespConfirmEmail int

func (*ConfirmEmailRespConfirmEmail) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmailRespConfirmEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ConfirmEmailRespEchoReq ¶ added in v0.4.18

type ConfirmEmailRespEchoReq map[string]interface{}

Echo of the request made.

type ConfirmEmailRespMsgType ¶ added in v0.4.18

type ConfirmEmailRespMsgType string
const ConfirmEmailRespMsgTypeConfirmEmail ConfirmEmailRespMsgType = "confirm_email"

func (*ConfirmEmailRespMsgType) UnmarshalJSON ¶ added in v0.4.18

func (j *ConfirmEmailRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdate ¶

type ContractUpdate struct {
	// Internal unique contract identifier.
	ContractId int `json:"contract_id"`

	// Must be `1`
	ContractUpdate ContractUpdateContractUpdate `json:"contract_update"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ContractUpdatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Update a contract condition.

func (*ContractUpdate) UnmarshalJSON ¶

func (j *ContractUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateContractUpdate ¶

type ContractUpdateContractUpdate int

func (*ContractUpdateContractUpdate) UnmarshalJSON ¶

func (j *ContractUpdateContractUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateHistory ¶

type ContractUpdateHistory struct {
	// Internal unique contract identifier.
	ContractId int `json:"contract_id"`

	// Must be `1`
	ContractUpdateHistory ContractUpdateHistoryContractUpdateHistory `json:"contract_update_history"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ContractUpdateHistoryPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Request for contract update history.

func (*ContractUpdateHistory) UnmarshalJSON ¶

func (j *ContractUpdateHistory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateHistoryContractUpdateHistory ¶

type ContractUpdateHistoryContractUpdateHistory int

func (*ContractUpdateHistoryContractUpdateHistory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateHistoryPassthrough ¶

type ContractUpdateHistoryPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ContractUpdateHistoryResp ¶

type ContractUpdateHistoryResp struct {
	// Contains the historical and the most recent update status of the contract
	ContractUpdateHistory []ContractUpdateHistoryRespContractUpdateHistoryElem `json:"contract_update_history,omitempty"`

	// Echo of the request made.
	EchoReq ContractUpdateHistoryRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ContractUpdateHistoryRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Contract update history status

func (*ContractUpdateHistoryResp) UnmarshalJSON ¶

func (j *ContractUpdateHistoryResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateHistoryRespContractUpdateHistoryElem ¶

type ContractUpdateHistoryRespContractUpdateHistoryElem struct {
	// Display name of the changed parameter.
	DisplayName *string `json:"display_name,omitempty"`

	// The amount.
	OrderAmount *string `json:"order_amount,omitempty"`

	// The epoch when the changed was done.
	OrderDate *int `json:"order_date,omitempty"`

	// The contract parameter updated.
	OrderType *string `json:"order_type,omitempty"`

	// The pip-sized barrier value.
	Value *string `json:"value,omitempty"`
}

Contains the changed parameter.

type ContractUpdateHistoryRespEchoReq ¶

type ContractUpdateHistoryRespEchoReq map[string]interface{}

Echo of the request made.

type ContractUpdateHistoryRespMsgType ¶

type ContractUpdateHistoryRespMsgType string
const ContractUpdateHistoryRespMsgTypeContractUpdateHistory ContractUpdateHistoryRespMsgType = "contract_update_history"

func (*ContractUpdateHistoryRespMsgType) UnmarshalJSON ¶

func (j *ContractUpdateHistoryRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateLimitOrder ¶

type ContractUpdateLimitOrder struct {
	// New stop loss value for a contract. To cancel, pass `null`.
	StopLoss *float64 `json:"stop_loss,omitempty"`

	// New take profit value for a contract. To cancel, pass `null`.
	TakeProfit *float64 `json:"take_profit,omitempty"`
}

Specify limit order to update.

type ContractUpdatePassthrough ¶

type ContractUpdatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ContractUpdateResp ¶

type ContractUpdateResp struct {
	// Contains the update status of the request
	ContractUpdate *ContractUpdateRespContractUpdate `json:"contract_update,omitempty"`

	// Echo of the request made.
	EchoReq ContractUpdateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ContractUpdateRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Contract update status

func (*ContractUpdateResp) UnmarshalJSON ¶

func (j *ContractUpdateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractUpdateRespContractUpdate ¶

type ContractUpdateRespContractUpdate struct {
	// The target spot price where the contract will be closed automatically at the
	// loss specified by the user.
	StopLoss *ContractUpdateRespContractUpdateStopLoss `json:"stop_loss,omitempty"`

	// The target spot price where the contract will be closed automatically at the
	// profit specified by the user.
	TakeProfit *ContractUpdateRespContractUpdateTakeProfit `json:"take_profit,omitempty"`
}

Contains the update status of the request

type ContractUpdateRespContractUpdateStopLoss ¶

type ContractUpdateRespContractUpdateStopLoss struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Stop loss amount
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Stop loss order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Stop loss pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

The target spot price where the contract will be closed automatically at the loss specified by the user.

type ContractUpdateRespContractUpdateTakeProfit ¶

type ContractUpdateRespContractUpdateTakeProfit struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Take profit amount
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Take profit order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Take profit pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

The target spot price where the contract will be closed automatically at the profit specified by the user.

type ContractUpdateRespEchoReq ¶

type ContractUpdateRespEchoReq map[string]interface{}

Echo of the request made.

type ContractUpdateRespMsgType ¶

type ContractUpdateRespMsgType string
const ContractUpdateRespMsgTypeContractUpdate ContractUpdateRespMsgType = "contract_update"

func (*ContractUpdateRespMsgType) UnmarshalJSON ¶

func (j *ContractUpdateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsFor ¶

type ContractsFor struct {
	// The short symbol name (obtained from `active_symbols` call).
	ContractsFor string `json:"contracts_for"`

	// [Optional] Currency of the contract's stake and payout (obtained from
	// `payout_currencies` call).
	Currency string `json:"currency,omitempty"`

	// Deprecated - Replaced by landing_company_short.
	LandingCompany ContractsForLandingCompany `json:"landing_company,omitempty"`

	// [Optional] Indicates which landing company to get a list of contracts for. If
	// you are logged in, your account's landing company will override this field.
	// Note that when landing_company_short is set to 'virtual', landing_company will
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ContractsForPassthrough `json:"passthrough,omitempty"`

	// [Optional] If you specify this field, only contracts tradable through that
	// contract type will be returned.
	ProductType *ContractsForProductType `json:"product_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.

func (*ContractsFor) UnmarshalJSON ¶

func (j *ContractsFor) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompany ¶ added in v0.4.25

type ContractsForCompany struct {
	// Must be `1`
	ContractsForCompany ContractsForCompanyContractsForCompany `json:"contracts_for_company"`

	// [Optional] Indicates which landing company to get a list of contracts for. If
	// you are logged in, your account's landing company will override this field.
	LandingCompany ContractsForCompanyLandingCompany `json:"landing_company,omitempty"`

	// [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
	// the `echo_req` output field.
	Passthrough ContractsForCompanyPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get the list of currently available contracts for a given landing company.

func (*ContractsForCompany) UnmarshalJSON ¶ added in v0.4.25

func (j *ContractsForCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyContractsForCompany ¶ added in v0.4.25

type ContractsForCompanyContractsForCompany int

func (*ContractsForCompanyContractsForCompany) UnmarshalJSON ¶ added in v0.4.25

func (j *ContractsForCompanyContractsForCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyLandingCompany ¶ added in v0.4.25

type ContractsForCompanyLandingCompany string
const ContractsForCompanyLandingCompanyIom ContractsForCompanyLandingCompany = "iom"
const ContractsForCompanyLandingCompanyMalta ContractsForCompanyLandingCompany = "malta"
const ContractsForCompanyLandingCompanyMaltainvest ContractsForCompanyLandingCompany = "maltainvest"
const ContractsForCompanyLandingCompanySvg ContractsForCompanyLandingCompany = "svg"
const ContractsForCompanyLandingCompanyVanuatu ContractsForCompanyLandingCompany = "vanuatu"
const ContractsForCompanyLandingCompanyVirtual ContractsForCompanyLandingCompany = "virtual"

func (*ContractsForCompanyLandingCompany) UnmarshalJSON ¶ added in v0.4.25

func (j *ContractsForCompanyLandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyPassthrough ¶ added in v0.4.25

type ContractsForCompanyPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ContractsForCompanyResp ¶ added in v0.4.25

type ContractsForCompanyResp struct {
	// List of available contracts for a given landing company.
	ContractsForCompany *ContractsForCompanyRespContractsForCompany `json:"contracts_for_company,omitempty"`

	// Echo of the request made.
	EchoReq ContractsForCompanyRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ContractsForCompanyRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get the list of currently available contracts for a given landing company.

func (*ContractsForCompanyResp) UnmarshalJSON ¶ added in v0.4.25

func (j *ContractsForCompanyResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyRespContractsForCompany ¶ added in v0.4.25

type ContractsForCompanyRespContractsForCompany struct {
	// List of available contracts.
	Available []ContractsForCompanyRespContractsForCompanyAvailableElem `json:"available"`

	// Count of contracts available
	HitCount float64 `json:"hit_count"`
}

List of available contracts for a given landing company.

func (*ContractsForCompanyRespContractsForCompany) UnmarshalJSON ¶ added in v0.4.25

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyRespContractsForCompanyAvailableElem ¶ added in v0.4.25

type ContractsForCompanyRespContractsForCompanyAvailableElem struct {
	// Category of contract barrier.
	BarrierCategory string `json:"barrier_category"`

	// Category of contract.
	ContractCategory string `json:"contract_category"`

	// Display name for the contract category, localized to selected language.
	ContractCategoryDisplay string `json:"contract_category_display"`

	// Display name for the contract, localized to selected language.
	ContractDisplay string `json:"contract_display"`

	// Type of contract.
	ContractType string `json:"contract_type"`

	// Default stake for the contract
	DefaultStake *float64 `json:"default_stake,omitempty"`

	// Type of sentiment.
	Sentiment string `json:"sentiment"`
}

func (*ContractsForCompanyRespContractsForCompanyAvailableElem) UnmarshalJSON ¶ added in v0.4.25

UnmarshalJSON implements json.Unmarshaler.

type ContractsForCompanyRespEchoReq ¶ added in v0.4.25

type ContractsForCompanyRespEchoReq map[string]interface{}

Echo of the request made.

type ContractsForCompanyRespMsgType ¶ added in v0.4.25

type ContractsForCompanyRespMsgType string
const ContractsForCompanyRespMsgTypeContractsForCompany ContractsForCompanyRespMsgType = "contracts_for_company"

func (*ContractsForCompanyRespMsgType) UnmarshalJSON ¶ added in v0.4.25

func (j *ContractsForCompanyRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForLandingCompany ¶

type ContractsForLandingCompany string
const ContractsForLandingCompanyIom ContractsForLandingCompany = "iom"
const ContractsForLandingCompanyMalta ContractsForLandingCompany = "malta"
const ContractsForLandingCompanyMaltainvest ContractsForLandingCompany = "maltainvest"
const ContractsForLandingCompanySvg ContractsForLandingCompany = "svg"
const ContractsForLandingCompanyVanuatu ContractsForLandingCompany = "vanuatu"
const ContractsForLandingCompanyVirtual ContractsForLandingCompany = "virtual"

func (*ContractsForLandingCompany) UnmarshalJSON ¶

func (j *ContractsForLandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForLandingCompanyShort ¶

type ContractsForLandingCompanyShort string
const ContractsForLandingCompanyShortIom ContractsForLandingCompanyShort = "iom"
const ContractsForLandingCompanyShortMalta ContractsForLandingCompanyShort = "malta"
const ContractsForLandingCompanyShortMaltainvest ContractsForLandingCompanyShort = "maltainvest"
const ContractsForLandingCompanyShortSvg ContractsForLandingCompanyShort = "svg"
const ContractsForLandingCompanyShortVanuatu ContractsForLandingCompanyShort = "vanuatu"
const ContractsForLandingCompanyShortVirtual ContractsForLandingCompanyShort = "virtual"

func (*ContractsForLandingCompanyShort) UnmarshalJSON ¶

func (j *ContractsForLandingCompanyShort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForPassthrough ¶

type ContractsForPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ContractsForProductType ¶

type ContractsForProductType string
const ContractsForProductTypeBasic ContractsForProductType = "basic"

func (*ContractsForProductType) UnmarshalJSON ¶

func (j *ContractsForProductType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForResp ¶

type ContractsForResp struct {
	// List of available contracts. Note: if the user is authenticated, then only
	// contracts allowed under his account will be returned.
	ContractsFor *ContractsForRespContractsFor `json:"contracts_for,omitempty"`

	// Echo of the request made.
	EchoReq ContractsForRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ContractsForRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get the list of currently available contracts

func (*ContractsForResp) UnmarshalJSON ¶

func (j *ContractsForResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForRespContractsFor ¶

type ContractsForRespContractsFor struct {
	// Array of available contracts details
	Available []ContractsForRespContractsForAvailableElem `json:"available"`

	// Symbol's next market-close time as an epoch value
	Close *int `json:"close,omitempty"`

	// Indicates the feed license for symbol, for example whether its realtime or
	// delayed
	FeedLicense *string `json:"feed_license,omitempty"`

	// Count of contracts available
	HitCount *float64 `json:"hit_count,omitempty"`

	// Array of non_available contracts details
	NonAvailable []interface{} `json:"non_available,omitempty"`

	// Symbol's next market-open time as an epoch value
	Open *int `json:"open,omitempty"`

	// Current spot price for this underlying
	Spot *float64 `json:"spot,omitempty"`
}

List of available contracts. Note: if the user is authenticated, then only contracts allowed under his account will be returned.

func (*ContractsForRespContractsFor) UnmarshalJSON ¶

func (j *ContractsForRespContractsFor) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ContractsForRespContractsForAvailableElem ¶

type ContractsForRespContractsForAvailableElem struct {
	// Array of available barriers for a predefined trading period
	AvailableBarriers []interface{} `json:"available_barriers,omitempty"`

	// Barrier Details.
	Barrier *string `json:"barrier,omitempty"`

	// Category of barrier.
	BarrierCategory string `json:"barrier_category"`

	// [Only for Vanilla] Barrier Choices
	BarrierChoices []interface{} `json:"barrier_choices,omitempty"`

	// Number of barriers.
	Barriers float64 `json:"barriers"`

	// Cancellation range
	CancellationRange []interface{} `json:"cancellation_range,omitempty"`

	// Category of contract.
	ContractCategory string `json:"contract_category"`

	// Category of the contract.
	ContractCategoryDisplay string `json:"contract_category_display"`

	// Display name for the type of contract.
	ContractDisplay *string `json:"contract_display,omitempty"`

	// Type of contract.
	ContractType string `json:"contract_type"`

	// Default stake for the contract
	DefaultStake *float64 `json:"default_stake,omitempty"`

	// [Only for Turbos] Its selected payout per point
	DisplayNumberOfContracts *float64 `json:"display_number_of_contracts,omitempty"`

	// [Only for Snowball] Available contract durations in seconds.
	DurationChoices []int `json:"duration_choices,omitempty"`

	// Name of exchange
	ExchangeName string `json:"exchange_name"`

	// Array of barriers already expired
	ExpiredBarriers []interface{} `json:"expired_barriers,omitempty"`

	// Expiry Type.
	ExpiryType string `json:"expiry_type"`

	// Array of returned forward starting options
	ForwardStartingOptions []ContractsForRespContractsForAvailableElemForwardStartingOptionsElem `json:"forward_starting_options,omitempty"`

	// Growth rate range.
	GrowthRateRange []interface{} `json:"growth_rate_range,omitempty"`

	// High barrier Details.
	HighBarrier *string `json:"high_barrier,omitempty"`

	// Last digit range
	LastDigitRange []interface{} `json:"last_digit_range,omitempty"`

	// Low barrier Details.
	LowBarrier *string `json:"low_barrier,omitempty"`

	// Type of market.
	Market string `json:"market"`

	// Maximum contract duration
	MaxContractDuration string `json:"max_contract_duration"`

	// [Only for turbos options] Maximum contract stake
	MaxStake *float64 `json:"max_stake,omitempty"`

	// Minimum contract duration.
	MinContractDuration string `json:"min_contract_duration"`

	// [Only for turbos options] Minimum contract stake
	MinStake *float64 `json:"min_stake,omitempty"`

	// Multiplier range.
	MultiplierRange []interface{} `json:"multiplier_range,omitempty"`

	// [Only for Turbos] Payout Choices
	PayoutChoices []interface{} `json:"payout_choices,omitempty"`

	// Maximum payout.
	PayoutLimit *float64 `json:"payout_limit,omitempty"`

	// Type of sentiment.
	Sentiment string `json:"sentiment"`

	// Start Type.
	StartType string `json:"start_type"`

	// Type of submarket.
	Submarket string `json:"submarket"`

	// [Only for Snowball] Available risk profile options.
	TradeRiskProfileChoices []string `json:"trade_risk_profile_choices,omitempty"`

	// A hash of predefined trading period
	TradingPeriod ContractsForRespContractsForAvailableElemTradingPeriod `json:"trading_period,omitempty"`

	// Symbol code
	UnderlyingSymbol string `json:"underlying_symbol"`
}

func (*ContractsForRespContractsForAvailableElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ContractsForRespContractsForAvailableElemForwardStartingOptionsElem ¶

type ContractsForRespContractsForAvailableElemForwardStartingOptionsElem struct {
	// The epoch value for the blackouts of forward starting session.
	Blackouts []interface{} `json:"blackouts,omitempty"`

	// The epoch value for the closing date of forward starting session.
	Close *string `json:"close,omitempty"`

	// The epoch value for the date of forward starting session.
	Date *string `json:"date,omitempty"`

	// The epoch value for the opening date of forward starting session.
	Open *string `json:"open,omitempty"`
}

type ContractsForRespContractsForAvailableElemTradingPeriod ¶

type ContractsForRespContractsForAvailableElemTradingPeriod map[string]interface{}

A hash of predefined trading period

type ContractsForRespEchoReq ¶

type ContractsForRespEchoReq map[string]interface{}

Echo of the request made.

type ContractsForRespMsgType ¶

type ContractsForRespMsgType string
const ContractsForRespMsgTypeContractsFor ContractsForRespMsgType = "contracts_for"

func (*ContractsForRespMsgType) UnmarshalJSON ¶

func (j *ContractsForRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStart ¶

type CopyStart struct {
	// [Optional] Used to set assets to be copied. E.x ["frxUSDJPY", "R_50"]
	Assets interface{} `json:"assets,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to set maximum trade stake to be copied.
	MaxTradeStake *float64 `json:"max_trade_stake,omitempty"`

	// [Optional] Used to set minimal trade stake to be copied.
	MinTradeStake *float64 `json:"min_trade_stake,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CopyStartPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Used to set trade types to be copied. E.x ["CALL", "PUT"]
	TradeTypes interface{} `json:"trade_types,omitempty"`
}

Start copy trader bets

func (*CopyStart) UnmarshalJSON ¶

func (j *CopyStart) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStartPassthrough ¶

type CopyStartPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CopyStartResp ¶

type CopyStartResp struct {
	// Copy start confirmation. Returns 1 is success.
	CopyStart *int `json:"copy_start,omitempty"`

	// Echo of the request made.
	EchoReq CopyStartRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CopyStartRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with results is received

func (*CopyStartResp) UnmarshalJSON ¶

func (j *CopyStartResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStartRespEchoReq ¶

type CopyStartRespEchoReq map[string]interface{}

Echo of the request made.

type CopyStartRespMsgType ¶

type CopyStartRespMsgType string
const CopyStartRespMsgTypeCopyStart CopyStartRespMsgType = "copy_start"

func (*CopyStartRespMsgType) UnmarshalJSON ¶

func (j *CopyStartRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStop ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CopyStopPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Stop copy trader bets

func (*CopyStop) UnmarshalJSON ¶

func (j *CopyStop) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStopPassthrough ¶

type CopyStopPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CopyStopResp ¶

type CopyStopResp struct {
	// Copy stopping confirmation. Returns 1 is success.
	CopyStop *int `json:"copy_stop,omitempty"`

	// Echo of the request made.
	EchoReq CopyStopRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CopyStopRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with results is received

func (*CopyStopResp) UnmarshalJSON ¶

func (j *CopyStopResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopyStopRespEchoReq ¶

type CopyStopRespEchoReq map[string]interface{}

Echo of the request made.

type CopyStopRespMsgType ¶

type CopyStopRespMsgType string
const CopyStopRespMsgTypeCopyStop CopyStopRespMsgType = "copy_stop"

func (*CopyStopRespMsgType) UnmarshalJSON ¶

func (j *CopyStopRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingList ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CopytradingListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieves a list of active copiers and/or traders for Copy Trading

func (*CopytradingList) UnmarshalJSON ¶

func (j *CopytradingList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingListCopytradingList ¶

type CopytradingListCopytradingList int

func (*CopytradingListCopytradingList) UnmarshalJSON ¶

func (j *CopytradingListCopytradingList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingListPassthrough ¶

type CopytradingListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CopytradingListResp ¶

type CopytradingListResp struct {
	// The trading information of copiers or traders.
	CopytradingList *CopytradingListRespCopytradingList `json:"copytrading_list,omitempty"`

	// Echo of the request made.
	EchoReq CopytradingListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CopytradingListRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Details of copiers and/or traders for Copy Trading

func (*CopytradingListResp) UnmarshalJSON ¶

func (j *CopytradingListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingListRespCopytradingList ¶

type CopytradingListRespCopytradingList struct {
	// List of users who are currently copy trading the authenticated user
	Copiers []CopytradingListRespCopytradingListCopiersElem `json:"copiers"`

	// List of traders being followed by the authenticated user
	Traders []CopytradingListRespCopytradingListTradersElem `json:"traders"`
}

The trading information of copiers or traders.

func (*CopytradingListRespCopytradingList) UnmarshalJSON ¶

func (j *CopytradingListRespCopytradingList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingListRespCopytradingListCopiersElem ¶

type CopytradingListRespCopytradingListCopiersElem struct {
	// The loginid of the copier's account.
	Loginid string `json:"loginid"`
}

func (*CopytradingListRespCopytradingListCopiersElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type CopytradingListRespCopytradingListTradersElem ¶

type CopytradingListRespCopytradingListTradersElem struct {
	// The list of assets to copy the trades of.
	Assets []string `json:"assets,omitempty"`

	// The loginid of the trader's account.
	Loginid *string `json:"loginid,omitempty"`

	// Maximum trading stake set for the trader.
	MaxTradeStake *float64 `json:"max_trade_stake,omitempty"`

	// Minimum trading stake set for the trader.
	MinTradeStake *float64 `json:"min_trade_stake,omitempty"`

	// The token provided for the trader.
	Token *string `json:"token,omitempty"`

	// The type of trades set.
	TradeTypes []string `json:"trade_types,omitempty"`
}

type CopytradingListRespEchoReq ¶

type CopytradingListRespEchoReq map[string]interface{}

Echo of the request made.

type CopytradingListRespMsgType ¶

type CopytradingListRespMsgType string
const CopytradingListRespMsgTypeCopytradingList CopytradingListRespMsgType = "copytrading_list"

func (*CopytradingListRespMsgType) UnmarshalJSON ¶

func (j *CopytradingListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingStatistics ¶

type CopytradingStatistics struct {
	// Must be `1`
	CopytradingStatistics CopytradingStatisticsCopytradingStatistics `json:"copytrading_statistics"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CopytradingStatisticsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// The ID of the target trader.
	TraderId string `json:"trader_id"`
}

Retrieve performance, trading, risk and copiers statistics of trader.

func (*CopytradingStatistics) UnmarshalJSON ¶

func (j *CopytradingStatistics) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingStatisticsCopytradingStatistics ¶

type CopytradingStatisticsCopytradingStatistics int

func (*CopytradingStatisticsCopytradingStatistics) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type CopytradingStatisticsPassthrough ¶

type CopytradingStatisticsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CopytradingStatisticsResp ¶

type CopytradingStatisticsResp struct {
	// Statistics of the trader
	CopytradingStatistics *CopytradingStatisticsRespCopytradingStatistics `json:"copytrading_statistics,omitempty"`

	// Echo of the request made.
	EchoReq CopytradingStatisticsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CopytradingStatisticsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The statistics of the trader.

func (*CopytradingStatisticsResp) UnmarshalJSON ¶

func (j *CopytradingStatisticsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CopytradingStatisticsRespCopytradingStatistics ¶

type CopytradingStatisticsRespCopytradingStatistics struct {
	// This is the epoch the investor started trading.
	ActiveSince int `json:"active_since"`

	// Average seconds of keeping positions open.
	AvgDuration int `json:"avg_duration"`

	// Average loss of trades in percentage.
	AvgLoss float64 `json:"avg_loss"`

	// Average profitable trades in percentage.
	AvgProfit float64 `json:"avg_profit"`

	// Number of copiers for this trader.
	Copiers float64 `json:"copiers"`

	// Represents the net change in equity for a 12-month period.
	Last12MonthsProfitableTrades float64 `json:"last_12months_profitable_trades"`

	// Represents the net change in equity per month.
	MonthlyProfitableTrades CopytradingStatisticsRespCopytradingStatisticsMonthlyProfitableTrades `json:"monthly_profitable_trades"`

	// Trader performance probability.
	PerformanceProbability float64 `json:"performance_probability"`

	// Total number of trades for all time.
	TotalTrades int `json:"total_trades"`

	// Represents the portfolio distribution by markets.
	TradesBreakdown CopytradingStatisticsRespCopytradingStatisticsTradesBreakdown `json:"trades_breakdown"`

	// Number of profit trades in percentage.
	TradesProfitable float64 `json:"trades_profitable"`

	// Represents the net change in equity per year.
	YearlyProfitableTrades CopytradingStatisticsRespCopytradingStatisticsYearlyProfitableTrades `json:"yearly_profitable_trades,omitempty"`
}

Statistics of the trader

func (*CopytradingStatisticsRespCopytradingStatistics) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type CopytradingStatisticsRespCopytradingStatisticsMonthlyProfitableTrades ¶

type CopytradingStatisticsRespCopytradingStatisticsMonthlyProfitableTrades map[string]interface{}

Represents the net change in equity per month.

type CopytradingStatisticsRespCopytradingStatisticsTradesBreakdown ¶

type CopytradingStatisticsRespCopytradingStatisticsTradesBreakdown map[string]interface{}

Represents the portfolio distribution by markets.

type CopytradingStatisticsRespCopytradingStatisticsYearlyProfitableTrades ¶

type CopytradingStatisticsRespCopytradingStatisticsYearlyProfitableTrades map[string]interface{}

Represents the net change in equity per year.

type CopytradingStatisticsRespEchoReq ¶

type CopytradingStatisticsRespEchoReq map[string]interface{}

Echo of the request made.

type CopytradingStatisticsRespMsgType ¶

type CopytradingStatisticsRespMsgType string
const CopytradingStatisticsRespMsgTypeCopytradingStatistics CopytradingStatisticsRespMsgType = "copytrading_statistics"

func (*CopytradingStatisticsRespMsgType) UnmarshalJSON ¶

func (j *CopytradingStatisticsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoConfig ¶

type CryptoConfig struct {
	// Must be `1`
	CryptoConfig CryptoConfigCryptoConfig `json:"crypto_config"`

	// [Optional] Cryptocurrency code. Sending request with currency_code provides
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CryptoConfigPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

The request for cryptocurrencies configuration.

func (*CryptoConfig) UnmarshalJSON ¶

func (j *CryptoConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoConfigCryptoConfig ¶

type CryptoConfigCryptoConfig int

func (*CryptoConfigCryptoConfig) UnmarshalJSON ¶

func (j *CryptoConfigCryptoConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoConfigPassthrough ¶

type CryptoConfigPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CryptoConfigResp ¶

type CryptoConfigResp struct {
	// Provides cryptocurrencies configuration.
	CryptoConfig *CryptoConfigRespCryptoConfig `json:"crypto_config,omitempty"`

	// Echo of the request made.
	EchoReq CryptoConfigRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CryptoConfigRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The response will display the configuration details related to cryptocurrencies

func (*CryptoConfigResp) UnmarshalJSON ¶

func (j *CryptoConfigResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoConfigRespCryptoConfig ¶

type CryptoConfigRespCryptoConfig struct {
	// Currency configuration including limitiations for each crypto currency.
	CurrenciesConfig CryptoConfigRespCryptoConfigCurrenciesConfig `json:"currencies_config"`
}

Provides cryptocurrencies configuration.

func (*CryptoConfigRespCryptoConfig) UnmarshalJSON ¶

func (j *CryptoConfigRespCryptoConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoConfigRespCryptoConfigCurrenciesConfig ¶

type CryptoConfigRespCryptoConfigCurrenciesConfig map[string]interface{}

Currency configuration including limitiations for each crypto currency.

type CryptoConfigRespEchoReq ¶

type CryptoConfigRespEchoReq map[string]interface{}

Echo of the request made.

type CryptoConfigRespMsgType ¶

type CryptoConfigRespMsgType string
const CryptoConfigRespMsgTypeCryptoConfig CryptoConfigRespMsgType = "crypto_config"

func (*CryptoConfigRespMsgType) UnmarshalJSON ¶

func (j *CryptoConfigRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimations ¶ added in v0.4.4

type CryptoEstimations struct {
	// Must be `1`
	CryptoEstimations CryptoEstimationsCryptoEstimations `json:"crypto_estimations"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough CryptoEstimationsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is an update to crypto
	// estimations.
	Subscribe *CryptoEstimationsSubscribe `json:"subscribe,omitempty"`
}

Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.

func (*CryptoEstimations) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimationsCryptoEstimations ¶ added in v0.4.4

type CryptoEstimationsCryptoEstimations int

func (*CryptoEstimationsCryptoEstimations) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimationsCryptoEstimations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimationsPassthrough ¶ added in v0.4.4

type CryptoEstimationsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type CryptoEstimationsResp ¶ added in v0.4.4

type CryptoEstimationsResp struct {
	// Cryptocurrency estimations. E.g. Withdrawal fee estimations.
	CryptoEstimations CryptoEstimationsRespCryptoEstimations `json:"crypto_estimations,omitempty"`

	// Echo of the request made.
	EchoReq CryptoEstimationsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType CryptoEstimationsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *CryptoEstimationsRespSubscription `json:"subscription,omitempty"`
}

Latest cryptocurrency estimations.

func (*CryptoEstimationsResp) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimationsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimationsRespCryptoEstimations ¶ added in v0.4.4

type CryptoEstimationsRespCryptoEstimations map[string]interface{}

Cryptocurrency estimations. E.g. Withdrawal fee estimations.

type CryptoEstimationsRespEchoReq ¶ added in v0.4.4

type CryptoEstimationsRespEchoReq map[string]interface{}

Echo of the request made.

type CryptoEstimationsRespMsgType ¶ added in v0.4.4

type CryptoEstimationsRespMsgType string
const CryptoEstimationsRespMsgTypeCryptoEstimations CryptoEstimationsRespMsgType = "crypto_estimations"

func (*CryptoEstimationsRespMsgType) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimationsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimationsRespSubscription ¶ added in v0.4.4

type CryptoEstimationsRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*CryptoEstimationsRespSubscription) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimationsRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CryptoEstimationsSubscribe ¶ added in v0.4.4

type CryptoEstimationsSubscribe int

func (*CryptoEstimationsSubscribe) UnmarshalJSON ¶ added in v0.4.4

func (j *CryptoEstimationsSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUpload ¶

type DocumentUpload struct {
	// Document file format
	DocumentFormat DocumentUploadDocumentFormat `json:"document_format"`

	// [Optional] Document ID (required for Passport, Proof of ID and Driver's
	// License)
	DocumentId *string `json:"document_id,omitempty"`

	// 2-letter country code, mandatory for POI only
	DocumentIssuingCountry *string `json:"document_issuing_country,omitempty"`

	// Document type
	DocumentType DocumentUploadDocumentType `json:"document_type"`

	// Must be `1`
	DocumentUpload DocumentUploadDocumentUpload `json:"document_upload"`

	// The checksum of the file to be uploaded
	ExpectedChecksum string `json:"expected_checksum"`

	// [Optional] Document expiration date (required for Passport, Proof of ID and
	// Driver's License)
	ExpirationDate *string `json:"expiration_date,omitempty"`

	// Document size (should be less than 10MB)
	FileSize int `json:"file_size"`

	// [Optional] Boolean value that indicates whether this document is lifetime valid
	// (only applies to POI document types, cancels out the expiration_date given if
	// any)
	LifetimeValid *DocumentUploadLifetimeValid `json:"lifetime_valid,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] To determine document side
	PageType *DocumentUploadPageType `json:"page_type,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough DocumentUploadPassthrough `json:"passthrough,omitempty"`

	// [Optional] It contains info about the proof of ownership being uploaded
	// (mandatory for proof_of_ownership document type)
	ProofOfOwnership *DocumentUploadProofOfOwnership `json:"proof_of_ownership,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Request KYC information from client

func (*DocumentUpload) UnmarshalJSON ¶

func (j *DocumentUpload) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadDocumentFormat ¶

type DocumentUploadDocumentFormat string
const DocumentUploadDocumentFormatGIF DocumentUploadDocumentFormat = "GIF"
const DocumentUploadDocumentFormatJPEG DocumentUploadDocumentFormat = "JPEG"
const DocumentUploadDocumentFormatJPG DocumentUploadDocumentFormat = "JPG"
const DocumentUploadDocumentFormatPDF DocumentUploadDocumentFormat = "PDF"
const DocumentUploadDocumentFormatPNG DocumentUploadDocumentFormat = "PNG"

func (*DocumentUploadDocumentFormat) UnmarshalJSON ¶

func (j *DocumentUploadDocumentFormat) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadDocumentType ¶

type DocumentUploadDocumentType string
const DocumentUploadDocumentTypeAffidavit DocumentUploadDocumentType = "affidavit"
const DocumentUploadDocumentTypeAmlglobalcheck DocumentUploadDocumentType = "amlglobalcheck"
const DocumentUploadDocumentTypeArticleOfAssociation DocumentUploadDocumentType = "article_of_association"
const DocumentUploadDocumentTypeAuthorisationLetter DocumentUploadDocumentType = "authorisation_letter"
const DocumentUploadDocumentTypeBankStatement DocumentUploadDocumentType = "bank_statement"
const DocumentUploadDocumentTypeBankstatement DocumentUploadDocumentType = "bankstatement"
const DocumentUploadDocumentTypeBirthCertificate DocumentUploadDocumentType = "birth_certificate"
const DocumentUploadDocumentTypeBrokerageStatement DocumentUploadDocumentType = "brokerage statement"
const DocumentUploadDocumentTypeBusinessDocumentsOthers DocumentUploadDocumentType = "business_documents_others"
const DocumentUploadDocumentTypeBusinessPoa DocumentUploadDocumentType = "business_poa"
const DocumentUploadDocumentTypeCoi DocumentUploadDocumentType = "coi"
const DocumentUploadDocumentTypeDeclarations DocumentUploadDocumentType = "declarations"
const DocumentUploadDocumentTypeDocverification DocumentUploadDocumentType = "docverification"
const DocumentUploadDocumentTypeDriverslicense DocumentUploadDocumentType = "driverslicense"
const DocumentUploadDocumentTypeDrivingLicence DocumentUploadDocumentType = "driving_licence"
const DocumentUploadDocumentTypeEddOthers DocumentUploadDocumentType = "edd_others"
const DocumentUploadDocumentTypeEmploymentContract DocumentUploadDocumentType = "employment_contract"
const DocumentUploadDocumentTypeIdentificationNumberDocument DocumentUploadDocumentType = "identification_number_document"
const DocumentUploadDocumentTypeInsuranceBill DocumentUploadDocumentType = "insurance_bill"
const DocumentUploadDocumentTypeMemorandum DocumentUploadDocumentType = "memorandum"
const DocumentUploadDocumentTypeNationalIdentityCard DocumentUploadDocumentType = "national_identity_card"
const DocumentUploadDocumentTypeNimcSlip DocumentUploadDocumentType = "nimc_slip"
const DocumentUploadDocumentTypeOfficialLetter DocumentUploadDocumentType = "official_letter"
const DocumentUploadDocumentTypeOther DocumentUploadDocumentType = "other"
const DocumentUploadDocumentTypePanCard DocumentUploadDocumentType = "pan_card"
const DocumentUploadDocumentTypePassport DocumentUploadDocumentType = "passport"
const DocumentUploadDocumentTypePayslip DocumentUploadDocumentType = "payslip"
const DocumentUploadDocumentTypePhoneBill DocumentUploadDocumentType = "phone_bill"
const DocumentUploadDocumentTypePoaOthers DocumentUploadDocumentType = "poa_others"
const DocumentUploadDocumentTypePoiOthers DocumentUploadDocumentType = "poi_others"
const DocumentUploadDocumentTypePowerOfAttorney DocumentUploadDocumentType = "power_of_attorney"
const DocumentUploadDocumentTypeProofOfOwnership DocumentUploadDocumentType = "proof_of_ownership"
const DocumentUploadDocumentTypeProofaddress DocumentUploadDocumentType = "proofaddress"
const DocumentUploadDocumentTypeProofid DocumentUploadDocumentType = "proofid"
const DocumentUploadDocumentTypeRentalAgreement DocumentUploadDocumentType = "rental_agreement"
const DocumentUploadDocumentTypeSelfieWithId DocumentUploadDocumentType = "selfie_with_id"
const DocumentUploadDocumentTypeServiceIdCard DocumentUploadDocumentType = "service_id_card"
const DocumentUploadDocumentTypeStudentCard DocumentUploadDocumentType = "student_card"
const DocumentUploadDocumentTypeTaxPhotoId DocumentUploadDocumentType = "tax_photo_id"
const DocumentUploadDocumentTypeTaxReceipt DocumentUploadDocumentType = "tax_receipt"
const DocumentUploadDocumentTypeTaxReturn DocumentUploadDocumentType = "tax_return"
const DocumentUploadDocumentTypeUtilityBill DocumentUploadDocumentType = "utility_bill"
const DocumentUploadDocumentTypeVoterCard DocumentUploadDocumentType = "voter_card"

func (*DocumentUploadDocumentType) UnmarshalJSON ¶

func (j *DocumentUploadDocumentType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadDocumentUpload ¶

type DocumentUploadDocumentUpload int

func (*DocumentUploadDocumentUpload) UnmarshalJSON ¶

func (j *DocumentUploadDocumentUpload) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadLifetimeValid ¶

type DocumentUploadLifetimeValid int

func (*DocumentUploadLifetimeValid) UnmarshalJSON ¶

func (j *DocumentUploadLifetimeValid) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadPageType ¶

type DocumentUploadPageType string
const DocumentUploadPageTypeBack DocumentUploadPageType = "back"
const DocumentUploadPageTypeFront DocumentUploadPageType = "front"
const DocumentUploadPageTypePhoto DocumentUploadPageType = "photo"

func (*DocumentUploadPageType) UnmarshalJSON ¶

func (j *DocumentUploadPageType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadPassthrough ¶

type DocumentUploadPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type DocumentUploadProofOfOwnership ¶

type DocumentUploadProofOfOwnership struct {
	// A collection of unspecific information related to the proof of ownership being
	// uploaded
	Details DocumentUploadProofOfOwnershipDetails `json:"details"`

	// The id of the proof of ownership as shown in the /get_account_status proof of
	// ownership list
	Id float64 `json:"id"`
}

[Optional] It contains info about the proof of ownership being uploaded (mandatory for proof_of_ownership document type)

func (*DocumentUploadProofOfOwnership) UnmarshalJSON ¶

func (j *DocumentUploadProofOfOwnership) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadProofOfOwnershipDetails ¶

type DocumentUploadProofOfOwnershipDetails map[string]interface{}

A collection of unspecific information related to the proof of ownership being uploaded

type DocumentUploadResp ¶

type DocumentUploadResp struct {
	// Details of the uploaded documents.
	DocumentUpload *DocumentUploadRespDocumentUpload `json:"document_upload,omitempty"`

	// Echo of the request made.
	EchoReq DocumentUploadRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType DocumentUploadRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Receive details of uploaded authentication documents

func (*DocumentUploadResp) UnmarshalJSON ¶

func (j *DocumentUploadResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadRespDocumentUpload ¶

type DocumentUploadRespDocumentUpload struct {
	// Current call type, add this to your binary payload metadata
	CallType float64 `json:"call_type"`

	// Hex encoded SHA-1 checksum of the file
	Checksum *string `json:"checksum,omitempty"`

	// 2-letter country code
	DocumentIssuingCountry *string `json:"document_issuing_country,omitempty"`

	// File size
	Size *float64 `json:"size,omitempty"`

	// Upload status (`success` or `failure`)
	Status *string `json:"status,omitempty"`

	// Current upload ID, add this to your binary payload metadata
	UploadId float64 `json:"upload_id"`
}

Details of the uploaded documents.

func (*DocumentUploadRespDocumentUpload) UnmarshalJSON ¶

func (j *DocumentUploadRespDocumentUpload) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DocumentUploadRespEchoReq ¶

type DocumentUploadRespEchoReq map[string]interface{}

Echo of the request made.

type DocumentUploadRespMsgType ¶

type DocumentUploadRespMsgType string
const DocumentUploadRespMsgTypeDocumentUpload DocumentUploadRespMsgType = "document_upload"

func (*DocumentUploadRespMsgType) UnmarshalJSON ¶

func (j *DocumentUploadRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EconomicCalendar ¶

type EconomicCalendar struct {
	// [Optional] Currency symbol.
	Currency *string `json:"currency,omitempty"`

	// Must be `1`
	EconomicCalendar EconomicCalendarEconomicCalendar `json:"economic_calendar"`

	// [Optional] End date.
	EndDate *int `json:"end_date,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough EconomicCalendarPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Start date.
	StartDate *int `json:"start_date,omitempty"`
}

Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.

func (*EconomicCalendar) UnmarshalJSON ¶

func (j *EconomicCalendar) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EconomicCalendarEconomicCalendar ¶

type EconomicCalendarEconomicCalendar int

func (*EconomicCalendarEconomicCalendar) UnmarshalJSON ¶

func (j *EconomicCalendarEconomicCalendar) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EconomicCalendarPassthrough ¶

type EconomicCalendarPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type EconomicCalendarResp ¶

type EconomicCalendarResp struct {
	// Echo of the request made.
	EchoReq EconomicCalendarRespEchoReq `json:"echo_req"`

	// Economic calendar.
	EconomicCalendar *EconomicCalendarRespEconomicCalendar `json:"economic_calendar,omitempty"`

	// Action name of the request made.
	MsgType EconomicCalendarRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A list of economic events.

func (*EconomicCalendarResp) UnmarshalJSON ¶

func (j *EconomicCalendarResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EconomicCalendarRespEchoReq ¶

type EconomicCalendarRespEchoReq map[string]interface{}

Echo of the request made.

type EconomicCalendarRespEconomicCalendar ¶

type EconomicCalendarRespEconomicCalendar struct {
	// Array of economic events
	Events []EconomicCalendarRespEconomicCalendarEventsElem `json:"events,omitempty"`
}

Economic calendar.

type EconomicCalendarRespEconomicCalendarEventsElem ¶

type EconomicCalendarRespEconomicCalendarEventsElem struct {
	// Actual value.
	Actual *EconomicCalendarRespEconomicCalendarEventsElemActual `json:"actual,omitempty"`

	// Currency symbol.
	Currency *string `json:"currency,omitempty"`

	// Event name.
	EventName *string `json:"event_name,omitempty"`

	// Forecasted value.
	Forecast *EconomicCalendarRespEconomicCalendarEventsElemForecast `json:"forecast,omitempty"`

	// Impact.
	Impact *int `json:"impact,omitempty"`

	// Previous value.
	Previous *EconomicCalendarRespEconomicCalendarEventsElemPrevious `json:"previous,omitempty"`

	// Release date.
	ReleaseDate *int `json:"release_date,omitempty"`
}

type EconomicCalendarRespEconomicCalendarEventsElemActual ¶

type EconomicCalendarRespEconomicCalendarEventsElemActual struct {
	// Actual value.
	DisplayValue *string `json:"display_value,omitempty"`
}

Actual value.

type EconomicCalendarRespEconomicCalendarEventsElemForecast ¶

type EconomicCalendarRespEconomicCalendarEventsElemForecast struct {
	// Forecasted value.
	DisplayValue *string `json:"display_value,omitempty"`
}

Forecasted value.

type EconomicCalendarRespEconomicCalendarEventsElemPrevious ¶

type EconomicCalendarRespEconomicCalendarEventsElemPrevious struct {
	// Previous value.
	DisplayValue *string `json:"display_value,omitempty"`
}

Previous value.

type EconomicCalendarRespMsgType ¶

type EconomicCalendarRespMsgType string
const EconomicCalendarRespMsgTypeEconomicCalendar EconomicCalendarRespMsgType = "economic_calendar"

func (*EconomicCalendarRespMsgType) UnmarshalJSON ¶

func (j *EconomicCalendarRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRates ¶

type ExchangeRates struct {
	// Base currency (can be obtained from `payout_currencies` call)
	BaseCurrency string `json:"base_currency"`

	// Must be `1`
	ExchangeRates ExchangeRatesExchangeRates `json:"exchange_rates"`

	// [Optional] 1 - Request for ask and bid rates along with the spot rate. Only
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ExchangeRatesPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] 1 - to initiate a realtime stream of exchange rates relative to base
	// currency.
	Subscribe *ExchangeRatesSubscribe `json:"subscribe,omitempty"`

	// [Optional] Target currency for the exchange rate. If subscribe is set,
	// target_currency must be specified as well.
	TargetCurrency *string `json:"target_currency,omitempty"`
}

Retrieves the exchange rate from a base currency to a target currency supported by the system.

func (*ExchangeRates) UnmarshalJSON ¶

func (j *ExchangeRates) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesExchangeRates ¶

type ExchangeRatesExchangeRates int

func (*ExchangeRatesExchangeRates) UnmarshalJSON ¶

func (j *ExchangeRatesExchangeRates) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesIncludeSpread ¶ added in v0.4.24

type ExchangeRatesIncludeSpread int

func (*ExchangeRatesIncludeSpread) UnmarshalJSON ¶ added in v0.4.24

func (j *ExchangeRatesIncludeSpread) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesPassthrough ¶

type ExchangeRatesPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ExchangeRatesResp ¶

type ExchangeRatesResp struct {
	// Echo of the request made.
	EchoReq ExchangeRatesRespEchoReq `json:"echo_req"`

	// Exchange rate values from base to target currency
	ExchangeRates *ExchangeRatesRespExchangeRates `json:"exchange_rates,omitempty"`

	// Action name of the request made.
	MsgType ExchangeRatesRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *ExchangeRatesRespSubscription `json:"subscription,omitempty"`
}

The exchange rate values from the specified base currency to the specified target currency supported by the system.

func (*ExchangeRatesResp) UnmarshalJSON ¶

func (j *ExchangeRatesResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesRespEchoReq ¶

type ExchangeRatesRespEchoReq map[string]interface{}

Echo of the request made.

type ExchangeRatesRespExchangeRates ¶

type ExchangeRatesRespExchangeRates struct {
	// Base currency
	BaseCurrency *string `json:"base_currency,omitempty"`

	// Date retrieval epoch time represented as an integer number
	Date *int `json:"date,omitempty"`

	// Rate of exchanging a unit of base currency into a target currency
	Rates ExchangeRatesRespExchangeRatesRates `json:"rates,omitempty"`
}

Exchange rate values from base to target currency

type ExchangeRatesRespExchangeRatesRates ¶

type ExchangeRatesRespExchangeRatesRates map[string]interface{}

Rate of exchanging a unit of base currency into a target currency

type ExchangeRatesRespMsgType ¶

type ExchangeRatesRespMsgType string
const ExchangeRatesRespMsgTypeExchangeRates ExchangeRatesRespMsgType = "exchange_rates"

func (*ExchangeRatesRespMsgType) UnmarshalJSON ¶

func (j *ExchangeRatesRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesRespSubscription ¶

type ExchangeRatesRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*ExchangeRatesRespSubscription) UnmarshalJSON ¶

func (j *ExchangeRatesRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeRatesSubscribe ¶

type ExchangeRatesSubscribe int

func (*ExchangeRatesSubscribe) UnmarshalJSON ¶

func (j *ExchangeRatesSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCode ¶ added in v0.6.2

type ExchangeVerificationCode struct {
	// Must be `1`
	ExchangeVerificationCode ExchangeVerificationCodeExchangeVerificationCode `json:"exchange_verification_code"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ExchangeVerificationCodePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Purpose of the token exchange.
	Type ExchangeVerificationCodeType `json:"type,omitempty"`

	// Email verification code (received from a `verify_email` call which must be done
	// first).
	VerificationCode string `json:"verification_code"`
}

Verifies the code and returns a new code if verification is successful

func (*ExchangeVerificationCode) UnmarshalJSON ¶ added in v0.6.2

func (j *ExchangeVerificationCode) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCodeExchangeVerificationCode ¶ added in v0.6.2

type ExchangeVerificationCodeExchangeVerificationCode int

func (*ExchangeVerificationCodeExchangeVerificationCode) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCodePassthrough ¶ added in v0.6.2

type ExchangeVerificationCodePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ExchangeVerificationCodeResp ¶ added in v0.6.2

type ExchangeVerificationCodeResp struct {
	// Echo of the request made.
	EchoReq ExchangeVerificationCodeRespEchoReq `json:"echo_req"`

	// Exchange Verification Code details
	ExchangeVerificationCode *ExchangeVerificationCodeRespExchangeVerificationCode `json:"exchange_verification_code,omitempty"`

	// Action name of the request made.
	MsgType ExchangeVerificationCodeRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Exchange Verification Code Response

func (*ExchangeVerificationCodeResp) UnmarshalJSON ¶ added in v0.6.2

func (j *ExchangeVerificationCodeResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCodeRespEchoReq ¶ added in v0.6.2

type ExchangeVerificationCodeRespEchoReq map[string]interface{}

Echo of the request made.

type ExchangeVerificationCodeRespExchangeVerificationCode ¶ added in v0.6.2

type ExchangeVerificationCodeRespExchangeVerificationCode struct {
	// The new code generated after successful verification
	NewVerificationCode string `json:"new_verification_code"`
}

Exchange Verification Code details

func (*ExchangeVerificationCodeRespExchangeVerificationCode) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCodeRespMsgType ¶ added in v0.6.2

type ExchangeVerificationCodeRespMsgType string
const ExchangeVerificationCodeRespMsgTypeExchangeVerificationCode ExchangeVerificationCodeRespMsgType = "exchange_verification_code"

func (*ExchangeVerificationCodeRespMsgType) UnmarshalJSON ¶ added in v0.6.2

func (j *ExchangeVerificationCodeRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExchangeVerificationCodeType ¶ added in v0.6.2

type ExchangeVerificationCodeType string
const ExchangeVerificationCodeTypeAccountOpening ExchangeVerificationCodeType = "account_opening"

func (*ExchangeVerificationCodeType) UnmarshalJSON ¶ added in v0.6.2

func (j *ExchangeVerificationCodeType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FinancialAssessmentQuestions ¶ added in v0.6.0

type FinancialAssessmentQuestions struct {
	// Must be `1`
	FinancialAssessmentQuestions FinancialAssessmentQuestionsFinancialAssessmentQuestions `json:"financial_assessment_questions"`

	// [Optional] The landing company the account.
	LandingCompanyShort *string `json:"landing_company_short,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough FinancialAssessmentQuestionsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] The version of the financial assessment questionnaire.
	Version *string `json:"version,omitempty"`
}

This call gets the financial assessment questionnaire structure, which defines the questions, possible answers, and flow logic for the financial assessment form.

func (*FinancialAssessmentQuestions) UnmarshalJSON ¶ added in v0.6.0

func (j *FinancialAssessmentQuestions) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FinancialAssessmentQuestionsFinancialAssessmentQuestions ¶ added in v0.6.0

type FinancialAssessmentQuestionsFinancialAssessmentQuestions int

func (*FinancialAssessmentQuestionsFinancialAssessmentQuestions) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type FinancialAssessmentQuestionsPassthrough ¶ added in v0.6.0

type FinancialAssessmentQuestionsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type FinancialAssessmentQuestionsResp ¶ added in v0.6.0

type FinancialAssessmentQuestionsResp struct {
	// Echo of the request made.
	EchoReq FinancialAssessmentQuestionsRespEchoReq `json:"echo_req"`

	// The financial assessment questionnaire structure
	FinancialAssessmentQuestions *FinancialAssessmentQuestionsRespFinancialAssessmentQuestions `json:"financial_assessment_questions,omitempty"`

	// Action name of the request made.
	MsgType FinancialAssessmentQuestionsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns the questionnaire structure defining the financial assessment questions and logic

func (*FinancialAssessmentQuestionsResp) UnmarshalJSON ¶ added in v0.6.0

func (j *FinancialAssessmentQuestionsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FinancialAssessmentQuestionsRespEchoReq ¶ added in v0.6.0

type FinancialAssessmentQuestionsRespEchoReq map[string]interface{}

Echo of the request made.

type FinancialAssessmentQuestionsRespFinancialAssessmentQuestions ¶ added in v0.6.0

type FinancialAssessmentQuestionsRespFinancialAssessmentQuestions struct {
	// Object containing the questions and possible answers
	Questions FinancialAssessmentQuestionsRespFinancialAssessmentQuestionsQuestions `json:"questions,omitempty"`

	// The version of the financial assessment questionnaire.
	Version *string `json:"version,omitempty"`
}

The financial assessment questionnaire structure

type FinancialAssessmentQuestionsRespFinancialAssessmentQuestionsQuestions ¶ added in v0.6.0

type FinancialAssessmentQuestionsRespFinancialAssessmentQuestionsQuestions map[string]interface{}

Object containing the questions and possible answers

type FinancialAssessmentQuestionsRespMsgType ¶ added in v0.6.0

type FinancialAssessmentQuestionsRespMsgType string
const FinancialAssessmentQuestionsRespMsgTypeFinancialAssessmentQuestions FinancialAssessmentQuestionsRespMsgType = "financial_assessment_questions"

func (*FinancialAssessmentQuestionsRespMsgType) UnmarshalJSON ¶ added in v0.6.0

func (j *FinancialAssessmentQuestionsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Forget ¶

type Forget struct {
	// ID of the real-time stream of messages to cancel.
	Forget string `json:"forget"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ForgetPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Immediately cancel the real-time stream of messages with a specific ID.

func (*Forget) UnmarshalJSON ¶

func (j *Forget) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetAll ¶

type ForgetAll struct {
	// Cancel all streams by type. The value can be either a single type e.g.
	// `"ticks"`, or an array of multiple types e.g. `["candles", "ticks"]`.
	ForgetAll interface{} `json:"forget_all"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ForgetAllPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Immediately cancel the real-time streams of messages of given type.

func (*ForgetAll) UnmarshalJSON ¶

func (j *ForgetAll) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetAllPassthrough ¶

type ForgetAllPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ForgetAllResp ¶

type ForgetAllResp struct {
	// Echo of the request made.
	EchoReq ForgetAllRespEchoReq `json:"echo_req"`

	// IDs of the cancelled streams
	ForgetAll []interface{} `json:"forget_all,omitempty"`

	// Action name of the request made.
	MsgType ForgetAllRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of forget all request made.

func (*ForgetAllResp) UnmarshalJSON ¶

func (j *ForgetAllResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetAllRespEchoReq ¶

type ForgetAllRespEchoReq map[string]interface{}

Echo of the request made.

type ForgetAllRespMsgType ¶

type ForgetAllRespMsgType string
const ForgetAllRespMsgTypeForgetAll ForgetAllRespMsgType = "forget_all"

func (*ForgetAllRespMsgType) UnmarshalJSON ¶

func (j *ForgetAllRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetPassthrough ¶

type ForgetPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ForgetResp ¶

type ForgetResp struct {
	// Echo of the request made.
	EchoReq ForgetRespEchoReq `json:"echo_req"`

	// If set to 1, stream exited and stopped. If set to 0, stream did not exist.
	Forget *ForgetRespForget `json:"forget,omitempty"`

	// Action name of the request made.
	MsgType ForgetRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of forget request made.

func (*ForgetResp) UnmarshalJSON ¶

func (j *ForgetResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetRespEchoReq ¶

type ForgetRespEchoReq map[string]interface{}

Echo of the request made.

type ForgetRespForget ¶

type ForgetRespForget int

func (*ForgetRespForget) UnmarshalJSON ¶

func (j *ForgetRespForget) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ForgetRespMsgType ¶

type ForgetRespMsgType string
const ForgetRespMsgTypeForget ForgetRespMsgType = "forget"

func (*ForgetRespMsgType) UnmarshalJSON ¶

func (j *ForgetRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatus ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetAccountStatusPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get Account Status

func (*GetAccountStatus) UnmarshalJSON ¶

func (j *GetAccountStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusGetAccountStatus ¶

type GetAccountStatusGetAccountStatus int

func (*GetAccountStatusGetAccountStatus) UnmarshalJSON ¶

func (j *GetAccountStatusGetAccountStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusPassthrough ¶

type GetAccountStatusPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetAccountStatusResp ¶

type GetAccountStatusResp struct {
	// Echo of the request made.
	EchoReq GetAccountStatusRespEchoReq `json:"echo_req"`

	// Account status details
	GetAccountStatus *GetAccountStatusRespGetAccountStatus `json:"get_account_status,omitempty"`

	// Action name of the request made.
	MsgType GetAccountStatusRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with Account Status

func (*GetAccountStatusResp) UnmarshalJSON ¶

func (j *GetAccountStatusResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespEchoReq ¶

type GetAccountStatusRespEchoReq map[string]interface{}

Echo of the request made.

type GetAccountStatusRespGetAccountStatus ¶

type GetAccountStatusRespGetAccountStatus struct {
	// This represents the authentication status of the user and it includes what
	// authentication is needed.
	Authentication *GetAccountStatusRespGetAccountStatusAuthentication `json:"authentication,omitempty"`

	// Contains missing profile fields required for cashier access.
	CashierMissingFields []string `json:"cashier_missing_fields,omitempty"`

	// If the cashier is unavailble, this array contains one or more error codes for
	// each reason.
	CashierValidation []string `json:"cashier_validation,omitempty"`

	// Provides cashier details for client currency.
	CurrencyConfig GetAccountStatusRespGetAccountStatusCurrencyConfig `json:"currency_config"`

	// P2P requires proof of address.
	P2PPoaRequired GetAccountStatusRespGetAccountStatusP2PPoaRequired `json:"p2p_poa_required"`

	// Current P2P status of client.
	P2PStatus GetAccountStatusRespGetAccountStatusP2PStatus `json:"p2p_status"`

	// Indicates whether the client should be prompted to authenticate their account.
	PromptClientToAuthenticate GetAccountStatusRespGetAccountStatusPromptClientToAuthenticate `json:"prompt_client_to_authenticate"`

	// Client risk classification: `low`, `standard`, `high`.
	RiskClassification string `json:"risk_classification"`

	// Social identity provider a user signed up with.
	SocialIdentityProvider *GetAccountStatusRespGetAccountStatusSocialIdentityProvider `json:"social_identity_provider,omitempty"`

	// Account status. Possible status:
	// - `address_verified`: client's address is verified by third party services.
	// - `allow_document_upload`: client is allowed to upload documents.
	// - `age_verification`: client is age-verified.
	// - `authenticated`: client is fully authenticated.
	// - `cashier_locked`: cashier is locked.
	// - `crs_tin_information`: client has updated tax related information.
	// - `deposit_locked`: deposit is not allowed.
	// - `disabled`: account is disabled.
	// - `document_expired`: client's submitted proof-of-identity documents have
	// expired.
	// - `document_expiring_soon`: client's submitted proof-of-identity documents are
	// expiring within a month.
	// - `dxtrade_password_not_set`: Deriv X password is not set.
	// - `financial_assessment_not_complete`: client should complete their financial
	// assessment.
	// - `financial_information_not_complete`: client has not completed financial
	// assessment.
	// - `financial_risk_approval`: client has accepted financial risk disclosure.
	// - `max_turnover_limit_not_set`: client has not set financial limits on their
	// account. Applies to UK and Malta clients.
	// - `mt5_password_not_set`: MT5 password is not set.
	// - `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed.
	// - `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of
	// Conduct Agreement.
	// - `no_trading`: trading is disabled.
	// - `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit.
	// - `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client.
	// - `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is
	// allowed.
	// - `password_reset_required`: this client must reset their password.
	// - `professional`: this client has opted for a professional account.
	// - `professional_requested`: this client has requested for a professional
	// account.
	// - `professional_rejected`: this client's request for a professional account has
	// been rejected.
	// - `social_signup`: this client is using social signup.
	// - `trading_experience_not_complete`: client has not completed the trading
	// experience questionnaire.
	// - `ukgc_funds_protection`: client has acknowledged UKGC funds protection
	// notice.
	// - `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell
	// contracts.
	// - `withdrawal_locked`: deposits allowed but withdrawals are not allowed.
	// - `deposit_attempt`: this prevent a client from changing the account currency
	// after deposit attempt.
	// - `poi_name_mismatch`: client POI documents name mismatch.
	// - `allow_poa_resubmission`: the client can resubmit POA documents.
	// - `allow_poi_resubmission`: the client can resubmit POI documents.
	// - `shared_payment_method`: the client has been sharing payment methods.
	// - `personal_details_locked`: client is not allowed to edit personal profile
	// details.
	// - `transfers_blocked`: it block any transfer between two accounts.
	// - `df_deposit_requires_poi`: the DF deposit will be blocked until the client
	// gets age verified.
	// - `authenticated_with_idv_photoid`: the client has been fully authenticated by
	// IDV.
	// - `idv_revoked`: the client used to be fully authenticated by IDV but it was
	// taken away due to compliance criteria.
	// - `mt5_additional_kyc_required`: client tax information, place of birth and
	// account opening reason is missing.
	// - `poi_expiring_soon`: the POI documents of the client will get expired soon,
	// allow them to reupload POI documents.
	// - `poa_authenticated_with_idv`: the POA is authenticated via IDV.
	// - `poa_expiring_soon`: the POA documents of the client will get outdated soon,
	// allow them to reupload POA documents.
	// - `tin_manually_approved`: the client's tax_identification_number has been
	// manually approved as client is not applicable for tax_identification_number
	Status []string `json:"status"`
}

Account status details

func (*GetAccountStatusRespGetAccountStatus) UnmarshalJSON ¶

func (j *GetAccountStatusRespGetAccountStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthentication ¶

type GetAccountStatusRespGetAccountStatusAuthentication struct {
	// POI attempts made by the client
	Attempts *GetAccountStatusRespGetAccountStatusAuthenticationAttempts `json:"attempts,omitempty"`

	// The authentication status for document.
	Document *GetAccountStatusRespGetAccountStatusAuthenticationDocument `json:"document,omitempty"`

	// The authentication status for identity.
	Identity *GetAccountStatusRespGetAccountStatusAuthenticationIdentity `json:"identity,omitempty"`

	// The authentication status for source of income document.
	Income *GetAccountStatusRespGetAccountStatusAuthenticationIncome `json:"income,omitempty"`

	// An array containing the list of required authentication.
	NeedsVerification []string `json:"needs_verification"`

	// The current state of the proof of ownership.
	Ownership *GetAccountStatusRespGetAccountStatusAuthenticationOwnership `json:"ownership,omitempty"`
}

This represents the authentication status of the user and it includes what authentication is needed.

func (*GetAccountStatusRespGetAccountStatusAuthentication) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationAttempts ¶

type GetAccountStatusRespGetAccountStatusAuthenticationAttempts struct {
	// A number of POI attempts made by the client
	Count *int `json:"count,omitempty"`

	// A list of POI attempts made by the client in chronological descending order
	History []GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElem `json:"history,omitempty"`

	// The latest POI attempt made by the client
	Latest GetAccountStatusRespGetAccountStatusAuthenticationAttemptsLatest `json:"latest,omitempty"`
}

POI attempts made by the client

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElem ¶

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElem struct {
	// 2-letter country code used to request the attempt.
	CountryCode *string `json:"country_code,omitempty"`

	// The document type of the attempt.
	DocumentType *string `json:"document_type,omitempty"`

	// The id of the attempt.
	Id *string `json:"id,omitempty"`

	// The service used to make the verification.
	Service *string `json:"service,omitempty"`

	// Status of the attempt.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus `json:"status,omitempty"`

	// The epoch of the attempt.
	Timestamp *int `json:"timestamp,omitempty"`
}

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatusNone GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatusPending GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationAttemptsHistoryElemStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsLatest ¶ added in v0.4.0

type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsLatest map[string]interface{}

The latest POI attempt made by the client

type GetAccountStatusRespGetAccountStatusAuthenticationDocument ¶

type GetAccountStatusRespGetAccountStatusAuthenticationDocument struct {
	// This is the epoch of the document expiry date.
	ExpiryDate *int `json:"expiry_date,omitempty"`

	// Show the last reported reasons for the rejected poa cases
	LastRejected *string `json:"last_rejected,omitempty"`

	// This represents the current status of the proof of address document submitted
	// for authentication.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus `json:"status,omitempty"`

	// This represents the current status of authentication for each mt5 jurisdiction.
	VerifiedJurisdiction *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdiction `json:"verified_jurisdiction,omitempty"`
}

The authentication status for document.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusNone GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusPending GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusSuspected GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "suspected"
const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdiction ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdiction struct {
	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Bvi *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionBvi `json:"bvi,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Dml *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDml `json:"dml,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Dsl *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDsl `json:"dsl,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Iom *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionIom `json:"iom,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Labuan *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionLabuan `json:"labuan,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Malta *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMalta `json:"malta,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Maltainvest *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMaltainvest `json:"maltainvest,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Samoa *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoa `json:"samoa,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	SamoaVirtual *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoaVirtual `json:"samoa-virtual,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Svg *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSvg `json:"svg,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Vanuatu *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVanuatu `json:"vanuatu,omitempty"`

	// This represents whether the client is allowed or not to create an account under
	// this jurisdiction
	Virtual *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVirtual `json:"virtual,omitempty"`
}

This represents the current status of authentication for each mt5 jurisdiction.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionBvi ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionBvi int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionBvi) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDml ¶ added in v0.5.8

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDml int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDml) UnmarshalJSON ¶ added in v0.5.8

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDsl ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDsl int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionDsl) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionIom ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionIom int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionIom) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionLabuan ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionLabuan int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionLabuan) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMalta ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMalta int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMalta) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMaltainvest ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMaltainvest int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionMaltainvest) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoa ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoa int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoa) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoaVirtual ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoaVirtual int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSamoaVirtual) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSvg ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSvg int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionSvg) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVanuatu ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVanuatu int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVanuatu) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVirtual ¶ added in v0.4.24

type GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVirtual int

func (*GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdictionVirtual) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentity ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentity struct {
	// This is the epoch of the document expiry date.
	ExpiryDate *int `json:"expiry_date,omitempty"`

	// This shows the information about the authentication services implemented
	Services *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServices `json:"services,omitempty"`

	// This represent the current status for proof of identity document submitted for
	// authentication.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus `json:"status,omitempty"`
}

The authentication status for identity.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServices ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServices struct {
	// This shows the information related to IDV supported services
	Idv *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdv `json:"idv,omitempty"`

	// This shows the information related to the manual POI checks
	Manual *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManual `json:"manual,omitempty"`

	// This shows the information related to Onfido supported services
	Onfido *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfido `json:"onfido,omitempty"`
}

This shows the information about the authentication services implemented

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdv ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdv struct {
	// This is the epoch of the document expiry date.
	ExpiryDate *int `json:"expiry_date,omitempty"`

	// Show the last IDV reported reasons for the rejected cases
	LastRejected []string `json:"last_rejected,omitempty"`

	// Indicate if the verification report was returned by the provider
	ReportAvailable *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportAvailable `json:"report_available,omitempty"`

	// Shows the latest document properties detected and reported by IDVS
	ReportedProperties GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportedProperties `json:"reported_properties,omitempty"`

	// This represents the status of the latest IDV check.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus `json:"status,omitempty"`

	// This shows the number of IDV submissions left for the client
	SubmissionsLeft *int `json:"submissions_left,omitempty"`
}

This shows the information related to IDV supported services

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportAvailable ¶ added in v0.4.23

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportAvailable int

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportAvailable) UnmarshalJSON ¶ added in v0.4.23

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportedProperties ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvReportedProperties map[string]interface{}

Shows the latest document properties detected and reported by IDVS

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatusNone GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatusPending GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesIdvStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManual ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManual struct {
	// This represents the status of the current manual POI check.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus `json:"status,omitempty"`
}

This shows the information related to the manual POI checks

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusNone GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusPending GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusSuspected GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "suspected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesManualStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfido ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfido struct {
	// 3 letter country code for Onfide SDK
	CountryCode *string `json:"country_code,omitempty"`

	// This shows the list of documents types supported by Onfido
	Documents []string `json:"documents,omitempty"`

	// This shows the list of documents types supported.
	DocumentsSupported []string `json:"documents_supported,omitempty"`

	// This shows the information if the country is supported by Onfido
	IsCountrySupported *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoIsCountrySupported `json:"is_country_supported,omitempty"`

	// Show the last Onfido reported reasons for the rejected cases
	LastRejected []string `json:"last_rejected,omitempty"`

	// Shows the latest document properties detected and reported by Onfido
	ReportedProperties GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoReportedProperties `json:"reported_properties,omitempty"`

	// This represents the status of the latest Onfido check.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus `json:"status,omitempty"`

	// This shows the number of Onfido submissions left for the client
	SubmissionsLeft *int `json:"submissions_left,omitempty"`
}

This shows the information related to Onfido supported services

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoIsCountrySupported ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoIsCountrySupported int

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoIsCountrySupported) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoReportedProperties ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoReportedProperties map[string]interface{}

Shows the latest document properties detected and reported by Onfido

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusNone GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusPending GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusSuspected GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "suspected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityServicesOnfidoStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "expired"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusNone GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusPending GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusSuspected GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "suspected"
const GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationIdentityStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationIncome ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIncome struct {
	// Epoch of the source of income document expiry date.
	ExpiryDate *int `json:"expiry_date,omitempty"`

	// Current status of the proof of income document submitted for authentication.
	Status *GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus `json:"status,omitempty"`
}

The authentication status for source of income document.

type GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatusLocked GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus = "locked"
const GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatusNone GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatusPending GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationIncomeStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusAuthenticationOwnership ¶

type GetAccountStatusRespGetAccountStatusAuthenticationOwnership struct {
	// The list of proof of ownership requests to fullfil
	Requests []GetAccountStatusRespGetAccountStatusAuthenticationOwnershipRequestsElem `json:"requests,omitempty"`

	// This represents the current status of the proof of ownership
	Status *GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus `json:"status,omitempty"`
}

The current state of the proof of ownership.

type GetAccountStatusRespGetAccountStatusAuthenticationOwnershipRequestsElem ¶

type GetAccountStatusRespGetAccountStatusAuthenticationOwnershipRequestsElem struct {
	// The request timestamp of creation
	CreationTime *string `json:"creation_time,omitempty"`

	// Number of documents required to be uploaded for proof of ownership
	DocumentsRequired *float64 `json:"documents_required,omitempty"`

	// The identifier of the proof of ownership request
	Id *float64 `json:"id,omitempty"`

	// The display name of the payment method being requested
	PaymentMethod *string `json:"payment_method,omitempty"`
}

type GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus ¶

type GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus string
const GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatusNone GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus = "none"
const GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatusPending GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus = "pending"
const GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatusRejected GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus = "rejected"
const GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatusVerified GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus = "verified"

func (*GetAccountStatusRespGetAccountStatusAuthenticationOwnershipStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusCurrencyConfig ¶

type GetAccountStatusRespGetAccountStatusCurrencyConfig map[string]interface{}

Provides cashier details for client currency.

type GetAccountStatusRespGetAccountStatusP2PPoaRequired ¶ added in v0.4.11

type GetAccountStatusRespGetAccountStatusP2PPoaRequired int

func (*GetAccountStatusRespGetAccountStatusP2PPoaRequired) UnmarshalJSON ¶ added in v0.4.11

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusP2PStatus ¶

type GetAccountStatusRespGetAccountStatusP2PStatus string
const GetAccountStatusRespGetAccountStatusP2PStatusActive GetAccountStatusRespGetAccountStatusP2PStatus = "active"
const GetAccountStatusRespGetAccountStatusP2PStatusNone GetAccountStatusRespGetAccountStatusP2PStatus = "none"
const GetAccountStatusRespGetAccountStatusP2PStatusPermBan GetAccountStatusRespGetAccountStatusP2PStatus = "perm_ban"
const GetAccountStatusRespGetAccountStatusP2PStatusTempBan GetAccountStatusRespGetAccountStatusP2PStatus = "temp_ban"

func (*GetAccountStatusRespGetAccountStatusP2PStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusPromptClientToAuthenticate ¶

type GetAccountStatusRespGetAccountStatusPromptClientToAuthenticate int

func (*GetAccountStatusRespGetAccountStatusPromptClientToAuthenticate) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespGetAccountStatusSocialIdentityProvider ¶

type GetAccountStatusRespGetAccountStatusSocialIdentityProvider string
const GetAccountStatusRespGetAccountStatusSocialIdentityProviderApple GetAccountStatusRespGetAccountStatusSocialIdentityProvider = "apple"
const GetAccountStatusRespGetAccountStatusSocialIdentityProviderFacebook GetAccountStatusRespGetAccountStatusSocialIdentityProvider = "facebook"
const GetAccountStatusRespGetAccountStatusSocialIdentityProviderGoogle GetAccountStatusRespGetAccountStatusSocialIdentityProvider = "google"

func (*GetAccountStatusRespGetAccountStatusSocialIdentityProvider) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetAccountStatusRespMsgType ¶

type GetAccountStatusRespMsgType string
const GetAccountStatusRespMsgTypeGetAccountStatus GetAccountStatusRespMsgType = "get_account_status"

func (*GetAccountStatusRespMsgType) UnmarshalJSON ¶

func (j *GetAccountStatusRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetFinancialAssessment ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetFinancialAssessmentPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

This call gets the financial assessment details. The 'financial assessment' is a questionnaire that clients of certain Landing Companies need to complete, due to regulatory and KYC (know your client) requirements.

func (*GetFinancialAssessment) UnmarshalJSON ¶

func (j *GetFinancialAssessment) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetFinancialAssessmentGetFinancialAssessment ¶

type GetFinancialAssessmentGetFinancialAssessment int

func (*GetFinancialAssessmentGetFinancialAssessment) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetFinancialAssessmentPassthrough ¶

type GetFinancialAssessmentPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetFinancialAssessmentResp ¶

type GetFinancialAssessmentResp struct {
	// Echo of the request made.
	EchoReq GetFinancialAssessmentRespEchoReq `json:"echo_req"`

	// Client's financial assessment details
	GetFinancialAssessment *GetFinancialAssessmentRespGetFinancialAssessment `json:"get_financial_assessment,omitempty"`

	// Action name of the request made.
	MsgType GetFinancialAssessmentRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

This call gets the financial assessment details of client's account.

func (*GetFinancialAssessmentResp) UnmarshalJSON ¶

func (j *GetFinancialAssessmentResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetFinancialAssessmentRespEchoReq ¶

type GetFinancialAssessmentRespEchoReq map[string]interface{}

Echo of the request made.

type GetFinancialAssessmentRespGetFinancialAssessment ¶

type GetFinancialAssessmentRespGetFinancialAssessment struct {
	// CFD Score
	CfdScore *int `json:"cfd_score,omitempty"`

	// Financial Information Score
	FinancialInformationScore *int `json:"financial_information_score,omitempty"`

	// Total Score
	TotalScore *int `json:"total_score,omitempty"`

	// Trading Experience Score
	TradingScore *int `json:"trading_score,omitempty"`
}

Client's financial assessment details

type GetFinancialAssessmentRespMsgType ¶

type GetFinancialAssessmentRespMsgType string
const GetFinancialAssessmentRespMsgTypeGetFinancialAssessment GetFinancialAssessmentRespMsgType = "get_financial_assessment"

func (*GetFinancialAssessmentRespMsgType) UnmarshalJSON ¶

func (j *GetFinancialAssessmentRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetLimits ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetLimitsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Trading and Withdrawal Limits for a given user

func (*GetLimits) UnmarshalJSON ¶

func (j *GetLimits) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetLimitsGetLimits ¶

type GetLimitsGetLimits int

func (*GetLimitsGetLimits) UnmarshalJSON ¶

func (j *GetLimitsGetLimits) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetLimitsPassthrough ¶

type GetLimitsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetLimitsResp ¶

type GetLimitsResp struct {
	// Echo of the request made.
	EchoReq GetLimitsRespEchoReq `json:"echo_req"`

	// Trading limits of real account user
	GetLimits *GetLimitsRespGetLimits `json:"get_limits,omitempty"`

	// Action name of the request made.
	MsgType GetLimitsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Trading and Withdrawal Limits

func (*GetLimitsResp) UnmarshalJSON ¶

func (j *GetLimitsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetLimitsRespEchoReq ¶

type GetLimitsRespEchoReq map[string]interface{}

Echo of the request made.

type GetLimitsRespGetLimits ¶

type GetLimitsRespGetLimits struct {
	// Maximum account cash balance
	AccountBalance *float64 `json:"account_balance,omitempty"`

	// Cumulative daily transfer limits
	DailyCumulativeAmountTransfers GetLimitsRespGetLimitsDailyCumulativeAmountTransfers `json:"daily_cumulative_amount_transfers,omitempty"`

	// Daily transfers
	DailyTransfers GetLimitsRespGetLimitsDailyTransfers `json:"daily_transfers,omitempty"`

	// Maximum daily turnover
	DailyTurnover *float64 `json:"daily_turnover,omitempty"`

	// Lifetime withdrawal limit
	LifetimeLimit *float64 `json:"lifetime_limit,omitempty"`

	// Lifetime transfer limits. Only present when applicable to the current accout.
	LifetimeTransfers *GetLimitsRespGetLimitsLifetimeTransfers `json:"lifetime_transfers,omitempty"`

	// Contains limitation information for each market.
	MarketSpecific GetLimitsRespGetLimitsMarketSpecific `json:"market_specific,omitempty"`

	// Number of days for num_of_days_limit withdrawal limit
	NumOfDays *int `json:"num_of_days,omitempty"`

	// Withdrawal limit for num_of_days days
	NumOfDaysLimit *float64 `json:"num_of_days_limit,omitempty"`

	// Maximum number of open positions
	OpenPositions *int `json:"open_positions,omitempty"`

	// Maximum aggregate payouts on open positions
	Payout *float64 `json:"payout,omitempty"`

	// Maximum payout for each symbol based on different barrier types.
	PayoutPerSymbol *GetLimitsRespGetLimitsPayoutPerSymbol `json:"payout_per_symbol,omitempty"`

	// Maximum aggregate payouts on open positions per symbol and contract type. This
	// limit can be exceeded up to the overall payout limit if there is no prior open
	// position.
	PayoutPerSymbolAndContractType *float64 `json:"payout_per_symbol_and_contract_type,omitempty"`

	// Amount left to reach withdrawal limit
	Remainder *float64 `json:"remainder,omitempty"`

	// Total withdrawal for num_of_days days
	WithdrawalForXDaysMonetary *float64 `json:"withdrawal_for_x_days_monetary,omitempty"`

	// Total withdrawal since inception
	WithdrawalSinceInceptionMonetary *float64 `json:"withdrawal_since_inception_monetary,omitempty"`
}

Trading limits of real account user

type GetLimitsRespGetLimitsDailyCumulativeAmountTransfers ¶

type GetLimitsRespGetLimitsDailyCumulativeAmountTransfers map[string]interface{}

Cumulative daily transfer limits

type GetLimitsRespGetLimitsDailyTransfers ¶

type GetLimitsRespGetLimitsDailyTransfers map[string]interface{}

Daily transfers

type GetLimitsRespGetLimitsLifetimeTransfers ¶ added in v0.4.11

type GetLimitsRespGetLimitsLifetimeTransfers struct {
	// Lifetime transfer limit for crypto to crypto currencies.
	CryptoToCrypto *GetLimitsRespGetLimitsLifetimeTransfersCryptoToCrypto `json:"crypto_to_crypto,omitempty"`

	// Lifetime transfer limit for crypto to fiat currencies.
	CryptoToFiat *GetLimitsRespGetLimitsLifetimeTransfersCryptoToFiat `json:"crypto_to_fiat,omitempty"`

	// Lifetime transfer limit for fiat to crypto currencies.
	FiatToCrypto *GetLimitsRespGetLimitsLifetimeTransfersFiatToCrypto `json:"fiat_to_crypto,omitempty"`
}

Lifetime transfer limits. Only present when applicable to the current accout.

type GetLimitsRespGetLimitsLifetimeTransfersCryptoToCrypto ¶ added in v0.4.11

type GetLimitsRespGetLimitsLifetimeTransfersCryptoToCrypto struct {
	// Total limit in client's currency.
	Allowed *float64 `json:"allowed,omitempty"`

	// Remaining limit in client's currency.
	Available *float64 `json:"available,omitempty"`
}

Lifetime transfer limit for crypto to crypto currencies.

type GetLimitsRespGetLimitsLifetimeTransfersCryptoToFiat ¶ added in v0.4.11

type GetLimitsRespGetLimitsLifetimeTransfersCryptoToFiat struct {
	// Total limit in client's currency.
	Allowed *float64 `json:"allowed,omitempty"`

	// Remaining limit in client's currency.
	Available *float64 `json:"available,omitempty"`
}

Lifetime transfer limit for crypto to fiat currencies.

type GetLimitsRespGetLimitsLifetimeTransfersFiatToCrypto ¶ added in v0.4.11

type GetLimitsRespGetLimitsLifetimeTransfersFiatToCrypto struct {
	// Total limit in client's currency.
	Allowed *float64 `json:"allowed,omitempty"`

	// Remaining limit in client's currency.
	Available *float64 `json:"available,omitempty"`
}

Lifetime transfer limit for fiat to crypto currencies.

type GetLimitsRespGetLimitsMarketSpecific ¶

type GetLimitsRespGetLimitsMarketSpecific map[string]interface{}

Contains limitation information for each market.

type GetLimitsRespGetLimitsPayoutPerSymbol ¶ added in v0.4.0

type GetLimitsRespGetLimitsPayoutPerSymbol struct {
	// Maximum aggregate payouts on open positions per symbol for contracts where
	// barrier is same as entry spot.
	Atm *float64 `json:"atm,omitempty"`

	// Maximum aggregate payouts on open positions per symbol for contract where
	// barrier is different from entry spot.
	NonAtm *GetLimitsRespGetLimitsPayoutPerSymbolNonAtm `json:"non_atm,omitempty"`
}

Maximum payout for each symbol based on different barrier types.

type GetLimitsRespGetLimitsPayoutPerSymbolNonAtm ¶ added in v0.4.0

type GetLimitsRespGetLimitsPayoutPerSymbolNonAtm struct {
	// Maximum aggregate payouts on open positions per symbol for contract where
	// barrier is different from entry spot and duration is less than and equal to
	// seven days
	LessThanSevenDays *float64 `json:"less_than_seven_days,omitempty"`

	// Maximum aggregate payouts on open positions per symbol for contract where
	// barrier is different from entry spot and duration is more to seven days
	MoreThanSevenDays *float64 `json:"more_than_seven_days,omitempty"`
}

Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot.

type GetLimitsRespMsgType ¶

type GetLimitsRespMsgType string
const GetLimitsRespMsgTypeGetLimits GetLimitsRespMsgType = "get_limits"

func (*GetLimitsRespMsgType) UnmarshalJSON ¶

func (j *GetLimitsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSelfExclusion ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetSelfExclusionPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Allows users to exclude themselves from the website for certain periods of time, or to set limits on their trading activities. This facility is a regulatory requirement for certain Landing Companies.

func (*GetSelfExclusion) UnmarshalJSON ¶

func (j *GetSelfExclusion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSelfExclusionGetSelfExclusion ¶

type GetSelfExclusionGetSelfExclusion int

func (*GetSelfExclusionGetSelfExclusion) UnmarshalJSON ¶

func (j *GetSelfExclusionGetSelfExclusion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSelfExclusionPassthrough ¶

type GetSelfExclusionPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetSelfExclusionResp ¶

type GetSelfExclusionResp struct {
	// Echo of the request made.
	EchoReq GetSelfExclusionRespEchoReq `json:"echo_req"`

	// List of values set for self exclusion.
	GetSelfExclusion *GetSelfExclusionRespGetSelfExclusion `json:"get_self_exclusion,omitempty"`

	// Action name of the request made.
	MsgType GetSelfExclusionRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with User Self-Exclusion

func (*GetSelfExclusionResp) UnmarshalJSON ¶

func (j *GetSelfExclusionResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSelfExclusionRespEchoReq ¶

type GetSelfExclusionRespEchoReq map[string]interface{}

Echo of the request made.

type GetSelfExclusionRespGetSelfExclusion ¶

type GetSelfExclusionRespGetSelfExclusion struct {
	// Exclude me from the website (for a minimum of 6 months, up to a maximum of 5
	// years). Note: uplifting this self-exclusion may require contacting the company.
	ExcludeUntil *string `json:"exclude_until,omitempty"`

	// 30-day limit on deposits
	Max30DayDeposit *float64 `json:"max_30day_deposit,omitempty"`

	// 30-day limit on losses
	Max30DayLosses *float64 `json:"max_30day_losses,omitempty"`

	// 30-day turnover limit
	Max30DayTurnover *float64 `json:"max_30day_turnover,omitempty"`

	// 7-day limit on deposits
	Max7DayDeposit *float64 `json:"max_7day_deposit,omitempty"`

	// 7-day limit on losses
	Max7DayLosses *float64 `json:"max_7day_losses,omitempty"`

	// 7-day turnover limit
	Max7DayTurnover *float64 `json:"max_7day_turnover,omitempty"`

	// Maximum account cash balance
	MaxBalance *float64 `json:"max_balance,omitempty"`

	// Daily limit on deposits
	MaxDeposit *float64 `json:"max_deposit,omitempty"`

	// Daily limit on losses
	MaxLosses *float64 `json:"max_losses,omitempty"`

	// Maximum number of open positions
	MaxOpenBets *int `json:"max_open_bets,omitempty"`

	// Daily turnover limit
	MaxTurnover *float64 `json:"max_turnover,omitempty"`

	// Session duration limit, in minutes
	SessionDurationLimit *int `json:"session_duration_limit,omitempty"`

	// Exclude me from the website (for up to 6 weeks). The time is in epoch format.
	// Note: unlike `exclude_until`, this self-exclusion will be lifted automatically
	// at the expiry of the timeout period.
	TimeoutUntil *int `json:"timeout_until,omitempty"`
}

List of values set for self exclusion.

type GetSelfExclusionRespMsgType ¶

type GetSelfExclusionRespMsgType string
const GetSelfExclusionRespMsgTypeGetSelfExclusion GetSelfExclusionRespMsgType = "get_self_exclusion"

func (*GetSelfExclusionRespMsgType) UnmarshalJSON ¶

func (j *GetSelfExclusionRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettings ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetSettingsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get User Settings (email, date of birth, address etc)

func (*GetSettings) UnmarshalJSON ¶

func (j *GetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsGetSettings ¶

type GetSettingsGetSettings int

func (*GetSettingsGetSettings) UnmarshalJSON ¶

func (j *GetSettingsGetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsPassthrough ¶

type GetSettingsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetSettingsResp ¶

type GetSettingsResp struct {
	// Echo of the request made.
	EchoReq GetSettingsRespEchoReq `json:"echo_req"`

	// User information and settings.
	GetSettings *GetSettingsRespGetSettings `json:"get_settings,omitempty"`

	// Action name of the request made.
	MsgType GetSettingsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with User Settings

func (*GetSettingsResp) UnmarshalJSON ¶

func (j *GetSettingsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespEchoReq ¶

type GetSettingsRespEchoReq map[string]interface{}

Echo of the request made.

type GetSettingsRespGetSettings ¶

type GetSettingsRespGetSettings struct {
	// Purpose and reason for requesting the account opening. Only applicable for real
	// money account.
	AccountOpeningReason *string `json:"account_opening_reason,omitempty"`

	// City (note: Only available for users who have at least one real account)
	AddressCity *string `json:"address_city,omitempty"`

	// Address line 1 (note: Only available for users who have at least one real
	// account)
	AddressLine1 *string `json:"address_line_1,omitempty"`

	// Address line 2 (note: Only available for users who have at least one real
	// account)
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// Post Code (note: Only available for users who have at least one real account)
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// State (note: Only available for users who have at least one real account)
	AddressState *string `json:"address_state,omitempty"`

	// Boolean value 1 or 0, indicating permission to allow others to follow your
	// trades. Note: not applicable for Virtual account. Only allow for real money
	// account.
	AllowCopiers *GetSettingsRespGetSettingsAllowCopiers `json:"allow_copiers,omitempty"`

	// The phone's calling country code.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// Country of legal citizenship, 2-letter country code.
	Citizen *string `json:"citizen,omitempty"`

	// Latest terms and conditions version accepted by client
	ClientTncStatus *string `json:"client_tnc_status,omitempty"`

	// Cooldown expiration epoch date when a client fails appropriateness tests
	CoolingOffExpirationDate *int `json:"cooling_off_expiration_date,omitempty"`

	// User Country (same as residence field) - deprecated
	Country *string `json:"country,omitempty"`

	// 2-letter country code ISO standard
	CountryCode *string `json:"country_code,omitempty"`

	// Epoch of user's birthday (note: Only available for users who have at least one
	// real account)
	DateOfBirth *int `json:"date_of_birth,omitempty"`

	// Boolean value 1 or 0, indicating if user email belong to dxtrade exception
	// list.
	DxtradeUserException *GetSettingsRespGetSettingsDxtradeUserException `json:"dxtrade_user_exception,omitempty"`

	// User Email
	Email *string `json:"email,omitempty"`

	// Boolean value 1 or 0, indicating permission to use email address for any
	// contact which may include marketing
	EmailConsent *GetSettingsRespGetSettingsEmailConsent `json:"email_consent,omitempty"`

	// Employment Status.
	EmploymentStatus *string `json:"employment_status,omitempty"`

	// Indicates client's self-declaration for FATCA.
	FatcaDeclaration *int `json:"fatca_declaration,omitempty"`

	// Contains features that are enabled or disabled for this user
	FeatureFlag *GetSettingsRespGetSettingsFeatureFlag `json:"feature_flag,omitempty"`

	// First name (note: Only available for users who have at least one real account)
	FirstName *string `json:"first_name,omitempty"`

	// Returns 1 if the client has a secret answer, 0 otherwise.
	HasSecretAnswer *GetSettingsRespGetSettingsHasSecretAnswer `json:"has_secret_answer,omitempty"`

	// A list of profile fields which are immutable (read-only unless they are not set
	// yet) due to landing company regulations and the current status of the account.
	ImmutableFields []string `json:"immutable_fields,omitempty"`

	// Boolean value 1 or 0, indicating whether is payment agent (note: not applicable
	// for virtual money accounts)
	IsAuthenticatedPaymentAgent *GetSettingsRespGetSettingsIsAuthenticatedPaymentAgent `json:"is_authenticated_payment_agent,omitempty"`

	// Last name (note: Only available for users who have at least one real account)
	LastName *string `json:"last_name,omitempty"`

	// Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed
	// Person/Relatives and Close Associates). Note: returned for real accounts only.
	NonPepDeclaration *GetSettingsRespGetSettingsNonPepDeclaration `json:"non_pep_declaration,omitempty"`

	// The phone's national format phone.
	Phone *string `json:"phone,omitempty"`

	// The status of the Phone Number Verification.
	PhoneNumberVerification *GetSettingsRespGetSettingsPhoneNumberVerification `json:"phone_number_verification,omitempty"`

	// Place of birth, 2-letter country code.
	PlaceOfBirth *string `json:"place_of_birth,omitempty"`

	// User's preferred language, ISO standard code of language
	PreferredLanguage *string `json:"preferred_language,omitempty"`

	// Boolean value 1 or 0, indicating if client has requested professional status.
	RequestProfessionalStatus *GetSettingsRespGetSettingsRequestProfessionalStatus `json:"request_professional_status,omitempty"`

	// User Country
	Residence *string `json:"residence,omitempty"`

	// Salutation (note: Only available for users who have at least one real account)
	Salutation *string `json:"salutation,omitempty"`

	// Tax identification number. Only applicable for real money account.
	TaxIdentificationNumber *string `json:"tax_identification_number,omitempty"`

	// Residence for tax purpose. Comma separated iso country code if multiple
	// jurisdictions. Only applicable for real money account.
	TaxResidence *string `json:"tax_residence,omitempty"`

	// [Optional] Whether the client has skipped the TIN form. Only applicable for
	// real money account.
	TinSkipped *GetSettingsRespGetSettingsTinSkipped `json:"tin_skipped,omitempty"`

	// Terms and condition status tells us whether all the accounts of this user has
	// accepted the latest T&C version.
	TncStatus GetSettingsRespGetSettingsTncStatus `json:"tnc_status,omitempty"`

	// The start date to inform users within a grace period, with the notification
	// automatically deactivating after the specified duration.
	TncUpdateNotificationStartDate *string `json:"tnc_update_notification_start_date,omitempty"`

	// Boolean value 1 or 0, indicating if client has enabled the Trading Hub
	// dashboard
	TradingHub *int `json:"trading_hub,omitempty"`

	// Hash generated using user details to verify whether the user is legitimate for
	// our customer support system.
	UserHash *string `json:"user_hash,omitempty"`
}

User information and settings.

type GetSettingsRespGetSettingsAllowCopiers ¶

type GetSettingsRespGetSettingsAllowCopiers int

func (*GetSettingsRespGetSettingsAllowCopiers) UnmarshalJSON ¶

func (j *GetSettingsRespGetSettingsAllowCopiers) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsDxtradeUserException ¶

type GetSettingsRespGetSettingsDxtradeUserException int

func (*GetSettingsRespGetSettingsDxtradeUserException) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsEmailConsent ¶

type GetSettingsRespGetSettingsEmailConsent int

func (*GetSettingsRespGetSettingsEmailConsent) UnmarshalJSON ¶

func (j *GetSettingsRespGetSettingsEmailConsent) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsFeatureFlag ¶

type GetSettingsRespGetSettingsFeatureFlag struct {
	// Boolean value 1 or 0 indicating whether his feature this enabled or not
	Wallet *GetSettingsRespGetSettingsFeatureFlagWallet `json:"wallet,omitempty"`
}

Contains features that are enabled or disabled for this user

type GetSettingsRespGetSettingsFeatureFlagWallet ¶

type GetSettingsRespGetSettingsFeatureFlagWallet int

func (*GetSettingsRespGetSettingsFeatureFlagWallet) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsHasSecretAnswer ¶

type GetSettingsRespGetSettingsHasSecretAnswer int

func (*GetSettingsRespGetSettingsHasSecretAnswer) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsIsAuthenticatedPaymentAgent ¶

type GetSettingsRespGetSettingsIsAuthenticatedPaymentAgent int

func (*GetSettingsRespGetSettingsIsAuthenticatedPaymentAgent) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsNonPepDeclaration ¶

type GetSettingsRespGetSettingsNonPepDeclaration int

func (*GetSettingsRespGetSettingsNonPepDeclaration) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsPhoneNumberVerification ¶ added in v0.4.23

type GetSettingsRespGetSettingsPhoneNumberVerification struct {
	// Indicates the attempts remaining for /phone_number_challenge
	ChallengeAttemptsRemaining *int `json:"challenge_attempts_remaining,omitempty"`

	// (Optional) Indicates the timestamp for the next verification attempt
	NextAttempt *int `json:"next_attempt,omitempty"`

	// (Optional) Indicates the timestamp for the next email verification attempt
	NextEmailAttempt *int `json:"next_email_attempt,omitempty"`

	// (Optional) Indicates the timestamp for the next verify attempt
	NextVerifyAttempt *int `json:"next_verify_attempt,omitempty"`

	// (Optional) Indicates the timestamp for the current's session email code expiry
	SessionTimestamp *int `json:"session_timestamp,omitempty"`

	// Indicates the verification status of the client's phone number.
	Verified GetSettingsRespGetSettingsPhoneNumberVerificationVerified `json:"verified"`

	// Indicates the attempts remaining for /phone_number_verification
	VerifyAttemptsRemaining *int `json:"verify_attempts_remaining,omitempty"`
}

The status of the Phone Number Verification.

func (*GetSettingsRespGetSettingsPhoneNumberVerification) UnmarshalJSON ¶ added in v0.4.23

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsPhoneNumberVerificationVerified ¶ added in v0.4.23

type GetSettingsRespGetSettingsPhoneNumberVerificationVerified int

func (*GetSettingsRespGetSettingsPhoneNumberVerificationVerified) UnmarshalJSON ¶ added in v0.4.23

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsRequestProfessionalStatus ¶

type GetSettingsRespGetSettingsRequestProfessionalStatus int

func (*GetSettingsRespGetSettingsRequestProfessionalStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsTinSkipped ¶ added in v0.5.7

type GetSettingsRespGetSettingsTinSkipped int

func (*GetSettingsRespGetSettingsTinSkipped) UnmarshalJSON ¶ added in v0.5.7

func (j *GetSettingsRespGetSettingsTinSkipped) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetSettingsRespGetSettingsTncStatus ¶ added in v0.5.5

type GetSettingsRespGetSettingsTncStatus map[string]interface{}

Terms and condition status tells us whether all the accounts of this user has accepted the latest T&C version.

type GetSettingsRespMsgType ¶

type GetSettingsRespMsgType string
const GetSettingsRespMsgTypeGetSettings GetSettingsRespMsgType = "get_settings"

func (*GetSettingsRespMsgType) UnmarshalJSON ¶

func (j *GetSettingsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetThirdPartyRedirect ¶ added in v0.6.0

type GetThirdPartyRedirect struct {
	// Must be `1`
	GetThirdPartyRedirect GetThirdPartyRedirectGetThirdPartyRedirect `json:"get_third_party_redirect"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// The name of third party platform for redirect URL.
	Name GetThirdPartyRedirectName `json:"name"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough GetThirdPartyRedirectPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get Third Party Redirect URL for sso login.

func (*GetThirdPartyRedirect) UnmarshalJSON ¶ added in v0.6.0

func (j *GetThirdPartyRedirect) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetThirdPartyRedirectGetThirdPartyRedirect ¶ added in v0.6.0

type GetThirdPartyRedirectGetThirdPartyRedirect int

func (*GetThirdPartyRedirectGetThirdPartyRedirect) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type GetThirdPartyRedirectName ¶ added in v0.6.0

type GetThirdPartyRedirectName string
const GetThirdPartyRedirectNameDynamicworks GetThirdPartyRedirectName = "dynamicworks"

func (*GetThirdPartyRedirectName) UnmarshalJSON ¶ added in v0.6.0

func (j *GetThirdPartyRedirectName) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetThirdPartyRedirectPassthrough ¶ added in v0.6.0

type GetThirdPartyRedirectPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type GetThirdPartyRedirectResp ¶ added in v0.6.0

type GetThirdPartyRedirectResp struct {
	// Echo of the request made.
	EchoReq GetThirdPartyRedirectRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType GetThirdPartyRedirectRespMsgType `json:"msg_type"`

	// Redirect URL for sso login.
	RedirectUrl *string `json:"redirect_url,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result for Third Party Redirect URL for sso login.

func (*GetThirdPartyRedirectResp) UnmarshalJSON ¶ added in v0.6.0

func (j *GetThirdPartyRedirectResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GetThirdPartyRedirectRespEchoReq ¶ added in v0.6.0

type GetThirdPartyRedirectRespEchoReq map[string]interface{}

Echo of the request made.

type GetThirdPartyRedirectRespMsgType ¶ added in v0.6.0

type GetThirdPartyRedirectRespMsgType string
const GetThirdPartyRedirectRespMsgTypeGetThirdPartyRedirect GetThirdPartyRedirectRespMsgType = "get_third_party_redirect"

func (*GetThirdPartyRedirectRespMsgType) UnmarshalJSON ¶ added in v0.6.0

func (j *GetThirdPartyRedirectRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type IdentityVerificationDocumentAdd ¶

type IdentityVerificationDocumentAdd struct {
	// [Optional] Additional info required by some document types.
	DocumentAdditional *string `json:"document_additional,omitempty"`

	// The identification number of the document.
	DocumentNumber string `json:"document_number"`

	// The type of the document based on provided `issuing_country` (can obtained from
	// `residence_list` call).
	DocumentType string `json:"document_type"`

	// Must be `1`
	IdentityVerificationDocumentAdd IdentityVerificationDocumentAddIdentityVerificationDocumentAdd `json:"identity_verification_document_add"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough IdentityVerificationDocumentAddPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Adds document information such as issuing country, id and type for identity verification processes.

func (*IdentityVerificationDocumentAdd) UnmarshalJSON ¶

func (j *IdentityVerificationDocumentAdd) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type IdentityVerificationDocumentAddIdentityVerificationDocumentAdd ¶

type IdentityVerificationDocumentAddIdentityVerificationDocumentAdd int

func (*IdentityVerificationDocumentAddIdentityVerificationDocumentAdd) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type IdentityVerificationDocumentAddPassthrough ¶

type IdentityVerificationDocumentAddPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type IdentityVerificationDocumentAddResp ¶

type IdentityVerificationDocumentAddResp struct {
	// Echo of the request made.
	EchoReq IdentityVerificationDocumentAddRespEchoReq `json:"echo_req"`

	// 1 on success
	IdentityVerificationDocumentAdd *IdentityVerificationDocumentAddRespIdentityVerificationDocumentAdd `json:"identity_verification_document_add,omitempty"`

	// Action name of the request made.
	MsgType IdentityVerificationDocumentAddRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Adds document information such as issuing country, id and type for identity verification processes.

func (*IdentityVerificationDocumentAddResp) UnmarshalJSON ¶

func (j *IdentityVerificationDocumentAddResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type IdentityVerificationDocumentAddRespEchoReq ¶

type IdentityVerificationDocumentAddRespEchoReq map[string]interface{}

Echo of the request made.

type IdentityVerificationDocumentAddRespIdentityVerificationDocumentAdd ¶

type IdentityVerificationDocumentAddRespIdentityVerificationDocumentAdd int

func (*IdentityVerificationDocumentAddRespIdentityVerificationDocumentAdd) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type IdentityVerificationDocumentAddRespMsgType ¶

type IdentityVerificationDocumentAddRespMsgType string
const IdentityVerificationDocumentAddRespMsgTypeIdentityVerificationDocumentAdd IdentityVerificationDocumentAddRespMsgType = "identity_verification_document_add"

func (*IdentityVerificationDocumentAddRespMsgType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type KycAuthStatus ¶ added in v0.3.5

type KycAuthStatus struct {
	// The country for which service availability is being verified, 2-letter country
	// code
	Country *string `json:"country,omitempty"`

	// Must be `1`
	KycAuthStatus KycAuthStatusKycAuthStatus `json:"kyc_auth_status"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough KycAuthStatusPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get KYC Authentication Status

func (*KycAuthStatus) UnmarshalJSON ¶ added in v0.3.5

func (j *KycAuthStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KycAuthStatusKycAuthStatus ¶ added in v0.3.5

type KycAuthStatusKycAuthStatus int

func (*KycAuthStatusKycAuthStatus) UnmarshalJSON ¶ added in v0.3.5

func (j *KycAuthStatusKycAuthStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KycAuthStatusLandingCompaniesElem ¶ added in v0.4.2

type KycAuthStatusLandingCompaniesElem string
const KycAuthStatusLandingCompaniesElemBvi KycAuthStatusLandingCompaniesElem = "bvi"
const KycAuthStatusLandingCompaniesElemDsl KycAuthStatusLandingCompaniesElem = "dsl"
const KycAuthStatusLandingCompaniesElemIom KycAuthStatusLandingCompaniesElem = "iom"
const KycAuthStatusLandingCompaniesElemLabuan KycAuthStatusLandingCompaniesElem = "labuan"
const KycAuthStatusLandingCompaniesElemMalta KycAuthStatusLandingCompaniesElem = "malta"
const KycAuthStatusLandingCompaniesElemMaltainvest KycAuthStatusLandingCompaniesElem = "maltainvest"
const KycAuthStatusLandingCompaniesElemSamoa KycAuthStatusLandingCompaniesElem = "samoa"
const KycAuthStatusLandingCompaniesElemSamoaVirtual KycAuthStatusLandingCompaniesElem = "samoa-virtual"
const KycAuthStatusLandingCompaniesElemSvg KycAuthStatusLandingCompaniesElem = "svg"
const KycAuthStatusLandingCompaniesElemVanuatu KycAuthStatusLandingCompaniesElem = "vanuatu"
const KycAuthStatusLandingCompaniesElemVirtual KycAuthStatusLandingCompaniesElem = "virtual"

func (*KycAuthStatusLandingCompaniesElem) UnmarshalJSON ¶ added in v0.4.2

func (j *KycAuthStatusLandingCompaniesElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KycAuthStatusPassthrough ¶ added in v0.3.5

type KycAuthStatusPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type KycAuthStatusResp ¶ added in v0.3.5

type KycAuthStatusResp struct {
	// Echo of the request made.
	EchoReq KycAuthStatusRespEchoReq `json:"echo_req"`

	// Proof of Identity (POI) and Proof of Address (POA) authentication status
	// details.
	KycAuthStatus KycAuthStatusRespKycAuthStatus `json:"kyc_auth_status,omitempty"`

	// Action name of the request made.
	MsgType KycAuthStatusRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with KYC Authentication Status.

func (*KycAuthStatusResp) UnmarshalJSON ¶ added in v0.3.5

func (j *KycAuthStatusResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KycAuthStatusRespEchoReq ¶ added in v0.3.5

type KycAuthStatusRespEchoReq map[string]interface{}

Echo of the request made.

type KycAuthStatusRespKycAuthStatus ¶ added in v0.3.5

type KycAuthStatusRespKycAuthStatus map[string]interface{}

Proof of Identity (POI) and Proof of Address (POA) authentication status details.

type KycAuthStatusRespMsgType ¶ added in v0.3.5

type KycAuthStatusRespMsgType string
const KycAuthStatusRespMsgTypeKycAuthStatus KycAuthStatusRespMsgType = "kyc_auth_status"

func (*KycAuthStatusRespMsgType) UnmarshalJSON ¶ added in v0.3.5

func (j *KycAuthStatusRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompany ¶

type LandingCompany struct {
	// Client's 2-letter country code (obtained from `residence_list` call).
	LandingCompany string `json:"landing_company"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough LandingCompanyPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies. This call will return the appropriate Landing Company for clients of a given country. The landing company may differ for derived contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).

func (*LandingCompany) UnmarshalJSON ¶

func (j *LandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetails ¶

type LandingCompanyDetails struct {
	// [Optional] Will return an extra field `tin_not_mandatory` indicating if the
	// landing company does not require tax identification number for the provided
	// country.
	Country *string `json:"country,omitempty"`

	// Landing company shortcode.
	LandingCompanyDetails LandingCompanyDetailsLandingCompanyDetails `json:"landing_company_details"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough LandingCompanyDetailsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies (and which are wholly owned subsidiaries of the Deriv Group). This call provides information about each Landing Company.

func (*LandingCompanyDetails) UnmarshalJSON ¶

func (j *LandingCompanyDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsLandingCompanyDetails ¶

type LandingCompanyDetailsLandingCompanyDetails string
const LandingCompanyDetailsLandingCompanyDetailsBvi LandingCompanyDetailsLandingCompanyDetails = "bvi"
const LandingCompanyDetailsLandingCompanyDetailsDml LandingCompanyDetailsLandingCompanyDetails = "dml"
const LandingCompanyDetailsLandingCompanyDetailsDsl LandingCompanyDetailsLandingCompanyDetails = "dsl"
const LandingCompanyDetailsLandingCompanyDetailsIom LandingCompanyDetailsLandingCompanyDetails = "iom"
const LandingCompanyDetailsLandingCompanyDetailsLabuan LandingCompanyDetailsLandingCompanyDetails = "labuan"
const LandingCompanyDetailsLandingCompanyDetailsMalta LandingCompanyDetailsLandingCompanyDetails = "malta"
const LandingCompanyDetailsLandingCompanyDetailsMaltainvest LandingCompanyDetailsLandingCompanyDetails = "maltainvest"
const LandingCompanyDetailsLandingCompanyDetailsSamoa LandingCompanyDetailsLandingCompanyDetails = "samoa"
const LandingCompanyDetailsLandingCompanyDetailsSamoaVirtual LandingCompanyDetailsLandingCompanyDetails = "samoa-virtual"
const LandingCompanyDetailsLandingCompanyDetailsSvg LandingCompanyDetailsLandingCompanyDetails = "svg"
const LandingCompanyDetailsLandingCompanyDetailsVanuatu LandingCompanyDetailsLandingCompanyDetails = "vanuatu"
const LandingCompanyDetailsLandingCompanyDetailsVirtual LandingCompanyDetailsLandingCompanyDetails = "virtual"

func (*LandingCompanyDetailsLandingCompanyDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsPassthrough ¶

type LandingCompanyDetailsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type LandingCompanyDetailsResp ¶

type LandingCompanyDetailsResp struct {
	// Echo of the request made.
	EchoReq LandingCompanyDetailsRespEchoReq `json:"echo_req"`

	// The detailed information of the requested landing company.
	LandingCompanyDetails *LandingCompanyDetailsRespLandingCompanyDetails `json:"landing_company_details,omitempty"`

	// Action name of the request made.
	MsgType LandingCompanyDetailsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with Landing Company.

func (*LandingCompanyDetailsResp) UnmarshalJSON ¶

func (j *LandingCompanyDetailsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsRespEchoReq ¶

type LandingCompanyDetailsRespEchoReq map[string]interface{}

Echo of the request made.

type LandingCompanyDetailsRespLandingCompanyDetails ¶

type LandingCompanyDetailsRespLandingCompanyDetails struct {
	// Landing Company address.
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyDetailsRespLandingCompanyDetailsChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country.
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig *LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyDetailsRespLandingCompanyDetailsHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types for this Landing Company
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies for accounts with this Landing Company.
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowed markets for this Landing Company
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default currency of client accounts with this Landing Company.
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company name.
	Name *string `json:"name,omitempty"`

	// Legal requirements for the given Landing Company.
	Requirements *LandingCompanyDetailsRespLandingCompanyDetailsRequirements `json:"requirements,omitempty"`

	// Landing Company shortcode.
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyDetailsRespLandingCompanyDetailsSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyDetailsRespLandingCompanyDetailsTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

The detailed information of the requested landing company.

type LandingCompanyDetailsRespLandingCompanyDetailsChangeableFields ¶

type LandingCompanyDetailsRespLandingCompanyDetailsChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfig ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfig struct {
	// Name of commodities.
	Commodities LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCommodities `json:"commodities,omitempty"`

	// Name of cryptocurrency.
	Cryptocurrency LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCryptocurrency `json:"cryptocurrency,omitempty"`

	// Name of forex.
	Forex LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigForex `json:"forex,omitempty"`

	// Name of indices.
	Indices LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigIndices `json:"indices,omitempty"`

	// Name of market.
	Market *LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarket `json:"market,omitempty"`

	// Name of synthetic index.
	SyntheticIndex LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigSyntheticIndex `json:"synthetic_index,omitempty"`
}

The configuration of each currency.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCommodities ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCommodities map[string]interface{}

Name of commodities.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCryptocurrency ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigCryptocurrency map[string]interface{}

Name of cryptocurrency.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigForex ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigForex map[string]interface{}

Name of forex.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigIndices ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigIndices map[string]interface{}

Name of indices.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarket ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarket struct {
	// Currency Symbol.
	Currency *LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarketCurrency `json:"currency,omitempty"`
}

Name of market.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarketCurrency ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigMarketCurrency struct {
	// Maximum payout for this currency in this market.
	MaxPayout *int `json:"max_payout,omitempty"`

	// Minimum stake for this currency in this market.
	MinStake *int `json:"min_stake,omitempty"`
}

Currency Symbol.

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigSyntheticIndex ¶

type LandingCompanyDetailsRespLandingCompanyDetailsCurrencyConfigSyntheticIndex map[string]interface{}

Name of synthetic index.

type LandingCompanyDetailsRespLandingCompanyDetailsHasRealityCheck ¶

type LandingCompanyDetailsRespLandingCompanyDetailsHasRealityCheck int

func (*LandingCompanyDetailsRespLandingCompanyDetailsHasRealityCheck) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsRespLandingCompanyDetailsRequirements ¶

type LandingCompanyDetailsRespLandingCompanyDetailsRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyDetailsRespLandingCompanyDetailsRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyDetailsRespLandingCompanyDetailsRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the given Landing Company.

type LandingCompanyDetailsRespLandingCompanyDetailsRequirementsAfterFirstDeposit ¶

type LandingCompanyDetailsRespLandingCompanyDetailsRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyDetailsRespLandingCompanyDetailsRequirementsCompliance ¶

type LandingCompanyDetailsRespLandingCompanyDetailsRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyDetailsRespLandingCompanyDetailsSupportProfessionalClient ¶

type LandingCompanyDetailsRespLandingCompanyDetailsSupportProfessionalClient int

func (*LandingCompanyDetailsRespLandingCompanyDetailsSupportProfessionalClient) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsRespLandingCompanyDetailsTinNotMandatory ¶

type LandingCompanyDetailsRespLandingCompanyDetailsTinNotMandatory int

func (*LandingCompanyDetailsRespLandingCompanyDetailsTinNotMandatory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyDetailsRespMsgType ¶

type LandingCompanyDetailsRespMsgType string
const LandingCompanyDetailsRespMsgTypeLandingCompanyDetails LandingCompanyDetailsRespMsgType = "landing_company_details"

func (*LandingCompanyDetailsRespMsgType) UnmarshalJSON ¶

func (j *LandingCompanyDetailsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyInfo ¶ added in v0.4.26

type LandingCompanyInfo struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyInfoChangeableFields `json:"changeable_fields,omitempty"`

	// Client kyc statusequirements
	ClientKycStatus *ClientKycStatusRequirements `json:"client_kyc_status,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyInfoCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyInfoHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LegalRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyInfoSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyInfoTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

type LandingCompanyInfoChangeableFields ¶ added in v0.4.26

type LandingCompanyInfoChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyInfoCurrencyConfig ¶ added in v0.4.26

type LandingCompanyInfoCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyInfoHasRealityCheck ¶ added in v0.4.26

type LandingCompanyInfoHasRealityCheck int

func (*LandingCompanyInfoHasRealityCheck) UnmarshalJSON ¶ added in v0.4.26

func (j *LandingCompanyInfoHasRealityCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyInfoSupportProfessionalClient ¶ added in v0.4.26

type LandingCompanyInfoSupportProfessionalClient int

func (*LandingCompanyInfoSupportProfessionalClient) UnmarshalJSON ¶ added in v0.4.26

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyInfoTinNotMandatory ¶ added in v0.4.26

type LandingCompanyInfoTinNotMandatory int

func (*LandingCompanyInfoTinNotMandatory) UnmarshalJSON ¶ added in v0.4.26

func (j *LandingCompanyInfoTinNotMandatory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyPassthrough ¶

type LandingCompanyPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type LandingCompanyResp ¶

type LandingCompanyResp struct {
	// Echo of the request made.
	EchoReq LandingCompanyRespEchoReq `json:"echo_req"`

	// Landing Company
	LandingCompany *LandingCompanyRespLandingCompany `json:"landing_company,omitempty"`

	// Action name of the request made.
	MsgType LandingCompanyRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns the Landing Company for clients of a given country.

func (*LandingCompanyResp) UnmarshalJSON ¶

func (j *LandingCompanyResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespEchoReq ¶

type LandingCompanyRespEchoReq map[string]interface{}

Echo of the request made.

type LandingCompanyRespLandingCompany ¶

type LandingCompanyRespLandingCompany struct {
	// Flag to indicate if address parseable or not
	AddressParseable *LandingCompanyRespLandingCompanyAddressParseable `json:"address_parseable,omitempty"`

	// Config for all account types (Synthetic Indices and Financials).
	AllCompany *LandingCompanyRespLandingCompanyAllCompany `json:"all_company,omitempty"`

	// Config structure with document types ,taxRequired ,tin format details.
	Config LandingCompanyRespLandingCompanyConfig `json:"config,omitempty"`

	// Available CTrader accounts.
	Ctrader *LandingCompanyRespLandingCompanyCtrader `json:"ctrader,omitempty"`

	// Available Deriv X all account types (Synthetic Indices and Financials).
	DxtradeAllCompany *LandingCompanyRespLandingCompanyDxtradeAllCompany `json:"dxtrade_all_company,omitempty"`

	// Available Deriv X financial account types (all except Synthetic Indices).
	DxtradeFinancialCompany *LandingCompanyRespLandingCompanyDxtradeFinancialCompany `json:"dxtrade_financial_company,omitempty"`

	// Available Deriv X derived account types (Synthetic Indices).
	DxtradeGamingCompany *LandingCompanyRespLandingCompanyDxtradeGamingCompany `json:"dxtrade_gaming_company,omitempty"`

	// Landing Company for financial contracts (all except Synthetic Indices)
	FinancialCompany *LandingCompanyRespLandingCompanyFinancialCompany `json:"financial_company,omitempty"`

	// Forbidden postcode pattern
	ForbiddenPostcodePattern *string `json:"forbidden_postcode_pattern,omitempty"`

	// Landing Company for derived contracts (Synthetic Indices)
	GamingCompany *LandingCompanyRespLandingCompanyGamingCompany `json:"gaming_company,omitempty"`

	// Country code
	Id *string `json:"id,omitempty"`

	// Flag to indicate if idv is supported or not
	IsIdvSupported *LandingCompanyRespLandingCompanyIsIdvSupported `json:"is_idv_supported,omitempty"`

	// Open mf account lc details.
	LcToOpenMfAccount *string `json:"lc_to_open_mf_account,omitempty"`

	// Minimum age
	MinimumAge *int `json:"minimum_age,omitempty"`

	// Flag to indicate if mt5 age verification detail.
	Mt5AgeVerification *LandingCompanyRespLandingCompanyMt5AgeVerification `json:"mt5_age_verification,omitempty"`

	// Landing Company for MT5 standard combined all Synthetic and financial,
	// currently has Financial as subtype.
	MtAllCompany *LandingCompanyRespLandingCompanyMtAllCompany `json:"mt_all_company,omitempty"`

	// Landing Company for MT5 financial contracts (all except Synthetic Indices),
	// currently divided into Financial STP, Financial (standard) as subtypes.
	MtFinancialCompany *LandingCompanyRespLandingCompanyMtFinancialCompany `json:"mt_financial_company,omitempty"`

	// Landing Company for MT5 standard derived contracts (Synthetic Indices),
	// currently has Financial as subtype.
	MtGamingCompany *LandingCompanyRespLandingCompanyMtGamingCompany `json:"mt_gaming_company,omitempty"`

	// Country name
	Name *string `json:"name,omitempty"`

	// Flag to indicate whether max turnover limit settings.
	NeedSetMaxTurnoverLimit *LandingCompanyRespLandingCompanyNeedSetMaxTurnoverLimit `json:"need_set_max_turnover_limit,omitempty"`

	// Flag to indicate province settings.
	NoProvince *LandingCompanyRespLandingCompanyNoProvince `json:"no_province,omitempty"`

	// Flag to indicate whether address postcode is required or not.
	RequireAddressPostcode *LandingCompanyRespLandingCompanyRequireAddressPostcode `json:"require_address_postcode,omitempty"`

	// Flag to indicate whether age verification required ofr synthetic or not.
	RequireAgeVerifiedForSynthetic *LandingCompanyRespLandingCompanyRequireAgeVerifiedForSynthetic `json:"require_age_verified_for_synthetic,omitempty"`

	// Flag to indicate whether poi is required.
	RequirePoi *LandingCompanyRespLandingCompanyRequirePoi `json:"require_poi,omitempty"`

	// Flag to indicate whether verification required if age not verified.
	RequireVerificationWhenNotAgeVerified *LandingCompanyRespLandingCompanyRequireVerificationWhenNotAgeVerified `json:"require_verification_when_not_age_verified,omitempty"`

	// Flag to indicate whether to skip deposit verifcation or not.
	SkipDepositVerification *LandingCompanyRespLandingCompanySkipDepositVerification `json:"skip_deposit_verification,omitempty"`

	// Virtual Company
	VirtualCompany *string `json:"virtual_company,omitempty"`
}

Landing Company

type LandingCompanyRespLandingCompanyAddressParseable ¶

type LandingCompanyRespLandingCompanyAddressParseable int

func (*LandingCompanyRespLandingCompanyAddressParseable) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyAllCompany ¶

type LandingCompanyRespLandingCompanyAllCompany string
const LandingCompanyRespLandingCompanyAllCompanyNone LandingCompanyRespLandingCompanyAllCompany = "none"
const LandingCompanyRespLandingCompanyAllCompanySvg LandingCompanyRespLandingCompanyAllCompany = "svg"

func (*LandingCompanyRespLandingCompanyAllCompany) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyConfig ¶

type LandingCompanyRespLandingCompanyConfig map[string]interface{}

Config structure with document types ,taxRequired ,tin format details.

type LandingCompanyRespLandingCompanyCtrader ¶

type LandingCompanyRespLandingCompanyCtrader struct {
	// CTrader all account types (Synthetic Indices and Financials).
	All *LandingCompanyRespLandingCompanyCtraderAll `json:"all,omitempty"`
}

Available CTrader accounts.

type LandingCompanyRespLandingCompanyCtraderAll ¶

type LandingCompanyRespLandingCompanyCtraderAll struct {
	// For standard client
	Standard *LandingCompanyRespLandingCompanyCtraderAllStandard `json:"standard,omitempty"`
}

CTrader all account types (Synthetic Indices and Financials).

type LandingCompanyRespLandingCompanyCtraderAllStandard ¶

type LandingCompanyRespLandingCompanyCtraderAllStandard string
const LandingCompanyRespLandingCompanyCtraderAllStandardNone LandingCompanyRespLandingCompanyCtraderAllStandard = "none"
const LandingCompanyRespLandingCompanyCtraderAllStandardSvg LandingCompanyRespLandingCompanyCtraderAllStandard = "svg"

func (*LandingCompanyRespLandingCompanyCtraderAllStandard) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeAllCompany ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompany struct {
	// Landing Company details.
	Standard *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandard `json:"standard,omitempty"`
}

Available Deriv X all account types (Synthetic Indices and Financials).

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandard ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandard struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company details.

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardChangeableFields ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardCurrencyConfig ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardHasRealityCheck ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardHasRealityCheck int

func (*LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardHasRealityCheck) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirements ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsAfterFirstDeposit ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsCompliance ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardSupportProfessionalClient ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardSupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardSupportProfessionalClient) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardTinNotMandatory ¶

type LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardTinNotMandatory int

func (*LandingCompanyRespLandingCompanyDxtradeAllCompanyStandardTinNotMandatory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeFinancialCompany ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompany struct {
	// Landing Company details.
	Standard *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandard `json:"standard,omitempty"`
}

Available Deriv X financial account types (all except Synthetic Indices).

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandard ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandard struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company details.

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardChangeableFields ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardCurrencyConfig ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardHasRealityCheck ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardHasRealityCheck int

func (*LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardHasRealityCheck) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirements ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsAfterFirstDeposit ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsCompliance ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardSupportProfessionalClient ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardSupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardSupportProfessionalClient) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardTinNotMandatory ¶

type LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardTinNotMandatory int

func (*LandingCompanyRespLandingCompanyDxtradeFinancialCompanyStandardTinNotMandatory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeGamingCompany ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompany struct {
	// Landing Company details.
	Standard *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandard `json:"standard,omitempty"`
}

Available Deriv X derived account types (Synthetic Indices).

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandard ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandard struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company details.

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardChangeableFields ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardCurrencyConfig ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardHasRealityCheck ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardHasRealityCheck int

func (*LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardHasRealityCheck) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirements ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsAfterFirstDeposit ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsCompliance ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardSupportProfessionalClient ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardSupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardSupportProfessionalClient) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardTinNotMandatory ¶

type LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardTinNotMandatory int

func (*LandingCompanyRespLandingCompanyDxtradeGamingCompanyStandardTinNotMandatory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyFinancialCompany ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompany struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyFinancialCompanyChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyFinancialCompanyCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyFinancialCompanyHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types for this Landing Company
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowed account currencies for this Landing Company
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowed markets for this Landing Company
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyFinancialCompanyRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyFinancialCompanySupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyFinancialCompanyTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company for financial contracts (all except Synthetic Indices)

type LandingCompanyRespLandingCompanyFinancialCompanyChangeableFields ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyFinancialCompanyCurrencyConfig ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyFinancialCompanyHasRealityCheck ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyHasRealityCheck int

func (*LandingCompanyRespLandingCompanyFinancialCompanyHasRealityCheck) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyFinancialCompanyRequirements ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyFinancialCompanyRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyFinancialCompanyRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyFinancialCompanyRequirementsAfterFirstDeposit ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyFinancialCompanyRequirementsCompliance ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyFinancialCompanySupportProfessionalClient ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanySupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyFinancialCompanySupportProfessionalClient) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyFinancialCompanyTinNotMandatory ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyFinancialCompanyTinNotMandatory int

func (*LandingCompanyRespLandingCompanyFinancialCompanyTinNotMandatory) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyGamingCompany ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompany struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyGamingCompanyChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyGamingCompanyCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyGamingCompanyHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyGamingCompanyRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyGamingCompanySupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyGamingCompanyTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company for derived contracts (Synthetic Indices)

type LandingCompanyRespLandingCompanyGamingCompanyChangeableFields ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyGamingCompanyCurrencyConfig ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyGamingCompanyHasRealityCheck ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyHasRealityCheck int

func (*LandingCompanyRespLandingCompanyGamingCompanyHasRealityCheck) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyGamingCompanyRequirements ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyGamingCompanyRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyGamingCompanyRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyGamingCompanyRequirementsAfterFirstDeposit ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyGamingCompanyRequirementsCompliance ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyGamingCompanySupportProfessionalClient ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanySupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyGamingCompanySupportProfessionalClient) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyGamingCompanyTinNotMandatory ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyGamingCompanyTinNotMandatory int

func (*LandingCompanyRespLandingCompanyGamingCompanyTinNotMandatory) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyIsIdvSupported ¶

type LandingCompanyRespLandingCompanyIsIdvSupported int

func (*LandingCompanyRespLandingCompanyIsIdvSupported) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyMt5AgeVerification ¶

type LandingCompanyRespLandingCompanyMt5AgeVerification int

func (*LandingCompanyRespLandingCompanyMt5AgeVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyMtAllCompany ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtAllCompany struct {
	// Landing Company for MT5 combined all Synthetic and financial
	SwapFree *LandingCompanyInfo `json:"swap_free,omitempty"`

	// Contain details for landing company for zero_spread sub account type.
	ZeroSpread *LandingCompanyInfo `json:"zero_spread,omitempty"`
}

Landing Company for MT5 standard combined all Synthetic and financial, currently has Financial as subtype.

type LandingCompanyRespLandingCompanyMtFinancialCompany ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtFinancialCompany struct {
	// Contain details for landing company for financial subtype. The Financial
	// account is suitable for a wide range of traders, both new and experienced. It
	// gives you mid-range leverage and variable spreads that give you a great deal of
	// flexibility for whatever position you wish to take in the market.
	Financial *LandingCompanyInfo `json:"financial,omitempty"`

	// Contain details for landing company for Financial STP subtype. The Financial
	// STP account provides you with tight spreads, higher ticket size and offers a
	// variety of FX pairs from majors to exotics. It is a straight through processing
	// (STP) account with direct access to FX liquidity from various providers.
	FinancialStp *LandingCompanyInfo `json:"financial_stp,omitempty"`

	// Contain details for landing company for gold sub account type.
	Gold *LandingCompanyInfo `json:"gold,omitempty"`
}

Landing Company for MT5 financial contracts (all except Synthetic Indices), currently divided into Financial STP, Financial (standard) as subtypes.

type LandingCompanyRespLandingCompanyMtGamingCompany ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompany struct {
	// Landing Company for MT5 derived contracts (Synthetic Indices)
	Financial *LandingCompanyRespLandingCompanyMtGamingCompanyFinancial `json:"financial,omitempty"`
}

Landing Company for MT5 standard derived contracts (Synthetic Indices), currently has Financial as subtype.

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancial ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancial struct {
	// Landing Company address
	Address []string `json:"address,omitempty"`

	// Special conditions for changing sensitive fields
	ChangeableFields LandingCompanyRespLandingCompanyMtGamingCompanyFinancialChangeableFields `json:"changeable_fields,omitempty"`

	// Landing Company country of incorporation
	Country *string `json:"country,omitempty"`

	// The configuration of each currency.
	CurrencyConfig LandingCompanyRespLandingCompanyMtGamingCompanyFinancialCurrencyConfig `json:"currency_config,omitempty"`

	// Flag to indicate whether reality check is applicable for this Landing Company.
	// `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives
	// a summary of the client's trades and account balances on a regular basis
	// throughout his session, and is a regulatory requirement for certain Landing
	// Companies.
	HasRealityCheck *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialHasRealityCheck `json:"has_reality_check,omitempty"`

	// Allowed contract types
	LegalAllowedContractCategories []string `json:"legal_allowed_contract_categories,omitempty"`

	// Allowable currencies
	LegalAllowedCurrencies []string `json:"legal_allowed_currencies,omitempty"`

	// Allowable markets
	LegalAllowedMarkets []string `json:"legal_allowed_markets,omitempty"`

	// Default account currency
	LegalDefaultCurrency *string `json:"legal_default_currency,omitempty"`

	// Landing Company legal name
	Name *string `json:"name,omitempty"`

	// Legal requirements for the Landing Company
	Requirements *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirements `json:"requirements,omitempty"`

	// Landing Company short code
	Shortcode *string `json:"shortcode,omitempty"`

	// Flag that indicates whether the landing company supports professional accounts
	// or not
	SupportProfessionalClient *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialSupportProfessionalClient `json:"support_professional_client,omitempty"`

	// Flag that indicates whether tax identifier number is not mandatory for the
	// current country and landing company.
	TinNotMandatory *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialTinNotMandatory `json:"tin_not_mandatory,omitempty"`
}

Landing Company for MT5 derived contracts (Synthetic Indices)

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialChangeableFields ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialChangeableFields map[string]interface{}

Special conditions for changing sensitive fields

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialCurrencyConfig ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialCurrencyConfig map[string]interface{}

The configuration of each currency.

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialHasRealityCheck ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialHasRealityCheck int

func (*LandingCompanyRespLandingCompanyMtGamingCompanyFinancialHasRealityCheck) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirements ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsAfterFirstDeposit `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsCompliance `json:"compliance,omitempty"`

	// Sign up requirements for partners
	Partner []string `json:"partner,omitempty"`

	// Sign up requirements
	Signup []string `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal []string `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsAfterFirstDeposit ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsAfterFirstDeposit struct {
	// Financial assessment requirements
	FinancialAssessment []string `json:"financial_assessment,omitempty"`
}

After first deposit requirements

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsCompliance ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialRequirementsCompliance struct {
	// Compliance MT5 requirements
	Mt5 []string `json:"mt5,omitempty"`

	// Compliance tax information requirements
	TaxInformation []string `json:"tax_information,omitempty"`
}

Compliance requirements

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialSupportProfessionalClient ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialSupportProfessionalClient int

func (*LandingCompanyRespLandingCompanyMtGamingCompanyFinancialSupportProfessionalClient) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialTinNotMandatory ¶ added in v0.4.0

type LandingCompanyRespLandingCompanyMtGamingCompanyFinancialTinNotMandatory int

func (*LandingCompanyRespLandingCompanyMtGamingCompanyFinancialTinNotMandatory) UnmarshalJSON ¶ added in v0.4.0

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyNeedSetMaxTurnoverLimit ¶

type LandingCompanyRespLandingCompanyNeedSetMaxTurnoverLimit int

func (*LandingCompanyRespLandingCompanyNeedSetMaxTurnoverLimit) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyNoProvince ¶

type LandingCompanyRespLandingCompanyNoProvince int

func (*LandingCompanyRespLandingCompanyNoProvince) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyRequireAddressPostcode ¶

type LandingCompanyRespLandingCompanyRequireAddressPostcode int

func (*LandingCompanyRespLandingCompanyRequireAddressPostcode) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyRequireAgeVerifiedForSynthetic ¶

type LandingCompanyRespLandingCompanyRequireAgeVerifiedForSynthetic int

func (*LandingCompanyRespLandingCompanyRequireAgeVerifiedForSynthetic) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyRequirePoi ¶

type LandingCompanyRespLandingCompanyRequirePoi int

func (*LandingCompanyRespLandingCompanyRequirePoi) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanyRequireVerificationWhenNotAgeVerified ¶

type LandingCompanyRespLandingCompanyRequireVerificationWhenNotAgeVerified int

func (*LandingCompanyRespLandingCompanyRequireVerificationWhenNotAgeVerified) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespLandingCompanySkipDepositVerification ¶

type LandingCompanyRespLandingCompanySkipDepositVerification int

func (*LandingCompanyRespLandingCompanySkipDepositVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type LandingCompanyRespMsgType ¶

type LandingCompanyRespMsgType string
const LandingCompanyRespMsgTypeLandingCompany LandingCompanyRespMsgType = "landing_company"

func (*LandingCompanyRespMsgType) UnmarshalJSON ¶

func (j *LandingCompanyRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LegalRequirements ¶ added in v0.4.26

type LegalRequirements struct {
	// After first deposit requirements
	AfterFirstDeposit *AfterFirstDepositRequirements `json:"after_first_deposit,omitempty"`

	// Compliance requirements
	Compliance *ComplianceRequirements `json:"compliance,omitempty"`

	// Sign up requirements
	Partner SignUpRequirements `json:"partner,omitempty"`

	// Sign up requirements
	Signup SignUpRequirements `json:"signup,omitempty"`

	// Withdrawal requirements
	Withdrawal WithdrawalRequirements `json:"withdrawal,omitempty"`
}

Legal requirements for the Landing Company

type LoginHistory ¶

type LoginHistory struct {
	// [Optional] Apply limit to count of login history records.
	Limit int `json:"limit,omitempty"`

	// Must be `1`
	LoginHistory LoginHistoryLoginHistory `json:"login_history"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough LoginHistoryPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve a summary of login history for user.

func (*LoginHistory) UnmarshalJSON ¶

func (j *LoginHistory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LoginHistoryLoginHistory ¶

type LoginHistoryLoginHistory int

func (*LoginHistoryLoginHistory) UnmarshalJSON ¶

func (j *LoginHistoryLoginHistory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LoginHistoryPassthrough ¶

type LoginHistoryPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type LoginHistoryResp ¶

type LoginHistoryResp struct {
	// Echo of the request made.
	EchoReq LoginHistoryRespEchoReq `json:"echo_req"`

	// Array of records of client login/logout activities
	LoginHistory []LoginHistoryRespLoginHistoryElem `json:"login_history,omitempty"`

	// Action name of the request made.
	MsgType LoginHistoryRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Recent login/logout history records

func (*LoginHistoryResp) UnmarshalJSON ¶

func (j *LoginHistoryResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LoginHistoryRespEchoReq ¶

type LoginHistoryRespEchoReq map[string]interface{}

Echo of the request made.

type LoginHistoryRespLoginHistoryElem ¶

type LoginHistoryRespLoginHistoryElem struct {
	// Type of action.
	Action string `json:"action"`

	// Browser used
	Browser string `json:"browser"`

	// Country the login originated (IP Based))
	Country string `json:"country"`

	// ISO6801 timestame of the activity
	Datetime string `json:"datetime"`

	// Client device
	Device string `json:"device"`

	// Provides details about browser, device used during login or logout
	Environment string `json:"environment"`

	// IP Address the login was from
	Ip string `json:"ip"`

	// Browser language
	Language string `json:"language"`

	// Operating system
	Os string `json:"os"`

	// Status of activity: 1 - success, 0 - failure
	Status LoginHistoryRespLoginHistoryElemStatus `json:"status"`

	// Epoch time of the activity
	Time int `json:"time"`

	// Version of the browser
	Version string `json:"version"`
}

User login history

func (*LoginHistoryRespLoginHistoryElem) UnmarshalJSON ¶

func (j *LoginHistoryRespLoginHistoryElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LoginHistoryRespLoginHistoryElemStatus ¶

type LoginHistoryRespLoginHistoryElemStatus int

func (*LoginHistoryRespLoginHistoryElemStatus) UnmarshalJSON ¶

func (j *LoginHistoryRespLoginHistoryElemStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LoginHistoryRespMsgType ¶

type LoginHistoryRespMsgType string
const LoginHistoryRespMsgTypeLoginHistory LoginHistoryRespMsgType = "login_history"

func (*LoginHistoryRespMsgType) UnmarshalJSON ¶

func (j *LoginHistoryRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Logout ¶

type Logout struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Logout LogoutLogout `json:"logout"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough LogoutPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Logout the session

func (*Logout) UnmarshalJSON ¶

func (j *Logout) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LogoutLogout ¶

type LogoutLogout int

func (*LogoutLogout) UnmarshalJSON ¶

func (j *LogoutLogout) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LogoutPassthrough ¶

type LogoutPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type LogoutResp ¶

type LogoutResp struct {
	// Echo of the request made.
	EchoReq LogoutRespEchoReq `json:"echo_req"`

	// The result of logout request which is 1
	Logout *LogoutRespLogout `json:"logout,omitempty"`

	// Action name of the request made.
	MsgType LogoutRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The response of logout request made.

func (*LogoutResp) UnmarshalJSON ¶

func (j *LogoutResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LogoutRespEchoReq ¶

type LogoutRespEchoReq map[string]interface{}

Echo of the request made.

type LogoutRespLogout ¶

type LogoutRespLogout int

func (*LogoutRespLogout) UnmarshalJSON ¶

func (j *LogoutRespLogout) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LogoutRespMsgType ¶

type LogoutRespMsgType string
const LogoutRespMsgTypeLogout LogoutRespMsgType = "logout"

func (*LogoutRespMsgType) UnmarshalJSON ¶

func (j *LogoutRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5Deposit ¶

type Mt5Deposit struct {
	// Amount to deposit (in the currency of from_binary); min = $1 or an equivalent
	// amount, max = $20000 or an equivalent amount
	Amount *float64 `json:"amount,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5Deposit Mt5DepositMt5Deposit `json:"mt5_deposit"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5DepositPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// MT5 account login to deposit money to
	ToMt5 string `json:"to_mt5"`
}

This call allows deposit into MT5 account from Binary account.

func (*Mt5Deposit) UnmarshalJSON ¶

func (j *Mt5Deposit) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5DepositMt5Deposit ¶

type Mt5DepositMt5Deposit int

func (*Mt5DepositMt5Deposit) UnmarshalJSON ¶

func (j *Mt5DepositMt5Deposit) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5DepositPassthrough ¶

type Mt5DepositPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5DepositResp ¶

type Mt5DepositResp struct {
	// Withdrawal reference ID of Binary account
	BinaryTransactionId *int `json:"binary_transaction_id,omitempty"`

	// Echo of the request made.
	EchoReq Mt5DepositRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5DepositRespMsgType `json:"msg_type"`

	// 1 on success
	Mt5Deposit *int `json:"mt5_deposit,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of MT5 deposit request.

func (*Mt5DepositResp) UnmarshalJSON ¶

func (j *Mt5DepositResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5DepositRespEchoReq ¶

type Mt5DepositRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5DepositRespMsgType ¶

type Mt5DepositRespMsgType string
const Mt5DepositRespMsgTypeMt5Deposit Mt5DepositRespMsgType = "mt5_deposit"

func (*Mt5DepositRespMsgType) UnmarshalJSON ¶

func (j *Mt5DepositRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettings ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5GetSettings Mt5GetSettingsMt5GetSettings `json:"mt5_get_settings"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5GetSettingsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get MT5 user account settings

func (*Mt5GetSettings) UnmarshalJSON ¶

func (j *Mt5GetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsMt5GetSettings ¶

type Mt5GetSettingsMt5GetSettings int

func (*Mt5GetSettingsMt5GetSettings) UnmarshalJSON ¶

func (j *Mt5GetSettingsMt5GetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsPassthrough ¶

type Mt5GetSettingsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5GetSettingsResp ¶

type Mt5GetSettingsResp struct {
	// Echo of the request made.
	EchoReq Mt5GetSettingsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5GetSettingsRespMsgType `json:"msg_type"`

	// MT5 user account details
	Mt5GetSettings *Mt5GetSettingsRespMt5GetSettings `json:"mt5_get_settings,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get MT5 user settings

func (*Mt5GetSettingsResp) UnmarshalJSON ¶

func (j *Mt5GetSettingsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespEchoReq ¶

type Mt5GetSettingsRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5GetSettingsRespMsgType ¶

type Mt5GetSettingsRespMsgType string
const Mt5GetSettingsRespMsgTypeMt5GetSettings Mt5GetSettingsRespMsgType = "mt5_get_settings"

func (*Mt5GetSettingsRespMsgType) UnmarshalJSON ¶

func (j *Mt5GetSettingsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettings ¶

type Mt5GetSettingsRespMt5GetSettings struct {
	// Account type.
	AccountType *Mt5GetSettingsRespMt5GetSettingsAccountType `json:"account_type,omitempty"`

	// The address of the user. The maximum length of the address is 128 characters.
	Address *string `json:"address,omitempty"`

	// Balance of the Trading account.
	Balance *float64 `json:"balance,omitempty"`

	// User's city of residence.
	City *string `json:"city,omitempty"`

	// Name of the client's company. The maximum length of the company name is 64
	// characters.
	Company *string `json:"company,omitempty"`

	// 2-letter country code.
	Country *string `json:"country,omitempty"`

	// MT5 account currency (`USD` or `EUR`) that depends on the MT5 company
	// (`vanuatu`, `svg`, `malta`).
	Currency *string `json:"currency,omitempty"`

	// Account balance, formatted to appropriate decimal places.
	DisplayBalance *string `json:"display_balance,omitempty"`

	// Email address.
	Email *string `json:"email,omitempty"`

	// The group where account belongs to.
	Group *string `json:"group,omitempty"`

	// Landing company shortcode of the MT5 account.
	LandingCompanyShort *Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort `json:"landing_company_short,omitempty"`

	// Client leverage (from 1 to 1000).
	Leverage *float64 `json:"leverage,omitempty"`

	// Login ID of the user's MT5 account.
	Login *string `json:"login,omitempty"`

	// Market type
	MarketType *Mt5GetSettingsRespMt5GetSettingsMarketType `json:"market_type,omitempty"`

	// Client's name. The maximum length of a client's symbol name is 128 characters.
	Name *string `json:"name,omitempty"`

	// User's phone number.
	Phone *string `json:"phone,omitempty"`

	// The user's phone password.
	PhonePassword *string `json:"phonePassword,omitempty"`

	// Trade server name of the MT5 account.
	Server *string `json:"server,omitempty"`

	// Trade server information.
	ServerInfo *Mt5GetSettingsRespMt5GetSettingsServerInfo `json:"server_info,omitempty"`

	// User's state (region) of residence.
	State *string `json:"state,omitempty"`

	// Sub account category.
	SubAccountCategory *Mt5GetSettingsRespMt5GetSettingsSubAccountCategory `json:"sub_account_category,omitempty"`

	// Sub account type
	SubAccountType *Mt5GetSettingsRespMt5GetSettingsSubAccountType `json:"sub_account_type,omitempty"`

	// User's zip code.
	ZipCode *string `json:"zipCode,omitempty"`
}

MT5 user account details

type Mt5GetSettingsRespMt5GetSettingsAccountType ¶

type Mt5GetSettingsRespMt5GetSettingsAccountType string
const Mt5GetSettingsRespMt5GetSettingsAccountTypeDemo Mt5GetSettingsRespMt5GetSettingsAccountType = "demo"
const Mt5GetSettingsRespMt5GetSettingsAccountTypeReal Mt5GetSettingsRespMt5GetSettingsAccountType = "real"

func (*Mt5GetSettingsRespMt5GetSettingsAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort ¶

type Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort string
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortBvi Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "bvi"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortDml Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "dml"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortLabuan Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "labuan"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortMalta Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "malta"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortMaltainvest Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "maltainvest"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortSeychelles Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "seychelles"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortSvg Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "svg"
const Mt5GetSettingsRespMt5GetSettingsLandingCompanyShortVanuatu Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort = "vanuatu"

func (*Mt5GetSettingsRespMt5GetSettingsLandingCompanyShort) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettingsMarketType ¶

type Mt5GetSettingsRespMt5GetSettingsMarketType string
const Mt5GetSettingsRespMt5GetSettingsMarketTypeAll Mt5GetSettingsRespMt5GetSettingsMarketType = "all"
const Mt5GetSettingsRespMt5GetSettingsMarketTypeFinancial Mt5GetSettingsRespMt5GetSettingsMarketType = "financial"
const Mt5GetSettingsRespMt5GetSettingsMarketTypeSynthetic Mt5GetSettingsRespMt5GetSettingsMarketType = "synthetic"

func (*Mt5GetSettingsRespMt5GetSettingsMarketType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettingsServerInfo ¶ added in v0.3.6

type Mt5GetSettingsRespMt5GetSettingsServerInfo struct {
	// The environment. E.g. Deriv-Server.
	Environment *Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment `json:"environment,omitempty"`

	// Geographical location of the server.
	Geolocation *Mt5GetSettingsRespMt5GetSettingsServerInfoGeolocation `json:"geolocation,omitempty"`

	// Server id.
	Id *string `json:"id,omitempty"`
}

Trade server information.

type Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment ¶ added in v0.3.6

type Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment string
const Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironmentDerivDemo Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment = "Deriv-Demo"
const Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironmentDerivServer Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment = "Deriv-Server"
const Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironmentDerivServer02 Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment = "Deriv-Server-02"
const Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironmentDerivServer03 Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment = "Deriv-Server-03"

func (*Mt5GetSettingsRespMt5GetSettingsServerInfoEnvironment) UnmarshalJSON ¶ added in v0.3.6

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettingsServerInfoGeolocation ¶ added in v0.3.6

type Mt5GetSettingsRespMt5GetSettingsServerInfoGeolocation struct {
	// Internal server grouping.
	Group *string `json:"group,omitempty"`

	// Server location.
	Location *string `json:"location,omitempty"`

	// Server region.
	Region *string `json:"region,omitempty"`

	// Server sequence.
	Sequence *int `json:"sequence,omitempty"`
}

Geographical location of the server.

type Mt5GetSettingsRespMt5GetSettingsSubAccountCategory ¶ added in v0.3.6

type Mt5GetSettingsRespMt5GetSettingsSubAccountCategory string
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategoryBlank Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = ""
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategoryIbt Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = "ibt"
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategoryLim Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = "lim"
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategoryStp Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = "stp"
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategorySwapFree Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = "swap_free"
const Mt5GetSettingsRespMt5GetSettingsSubAccountCategorySwapFreeHighRisk Mt5GetSettingsRespMt5GetSettingsSubAccountCategory = "swap_free_high_risk"

func (*Mt5GetSettingsRespMt5GetSettingsSubAccountCategory) UnmarshalJSON ¶ added in v0.3.6

UnmarshalJSON implements json.Unmarshaler.

type Mt5GetSettingsRespMt5GetSettingsSubAccountType ¶

type Mt5GetSettingsRespMt5GetSettingsSubAccountType string
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeFinancial Mt5GetSettingsRespMt5GetSettingsSubAccountType = "financial"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeFinancialStp Mt5GetSettingsRespMt5GetSettingsSubAccountType = "financial_stp"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeGold Mt5GetSettingsRespMt5GetSettingsSubAccountType = "gold"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeIbt Mt5GetSettingsRespMt5GetSettingsSubAccountType = "ibt"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeStandard Mt5GetSettingsRespMt5GetSettingsSubAccountType = "standard"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeStp Mt5GetSettingsRespMt5GetSettingsSubAccountType = "stp"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeSwapFree Mt5GetSettingsRespMt5GetSettingsSubAccountType = "swap_free"
const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeZeroSpread Mt5GetSettingsRespMt5GetSettingsSubAccountType = "zero_spread"

func (*Mt5GetSettingsRespMt5GetSettingsSubAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginList ¶

type Mt5LoginList struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5LoginList Mt5LoginListMt5LoginList `json:"mt5_login_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5LoginListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get list of MT5 accounts for client

func (*Mt5LoginList) UnmarshalJSON ¶

func (j *Mt5LoginList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListMt5LoginList ¶

type Mt5LoginListMt5LoginList int

func (*Mt5LoginListMt5LoginList) UnmarshalJSON ¶

func (j *Mt5LoginListMt5LoginList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListPassthrough ¶

type Mt5LoginListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5LoginListResp ¶

type Mt5LoginListResp struct {
	// Echo of the request made.
	EchoReq Mt5LoginListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5LoginListRespMsgType `json:"msg_type"`

	// Array containing MT5 account objects.
	Mt5LoginList []Mt5LoginListRespMt5LoginListElem `json:"mt5_login_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get list of MT5 accounts for client.

func (*Mt5LoginListResp) UnmarshalJSON ¶

func (j *Mt5LoginListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespEchoReq ¶

type Mt5LoginListRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5LoginListRespMsgType ¶

type Mt5LoginListRespMsgType string
const Mt5LoginListRespMsgTypeMt5LoginList Mt5LoginListRespMsgType = "mt5_login_list"

func (*Mt5LoginListRespMsgType) UnmarshalJSON ¶

func (j *Mt5LoginListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElem ¶

type Mt5LoginListRespMt5LoginListElem struct {
	// Account type.
	AccountType *Mt5LoginListRespMt5LoginListElemAccountType `json:"account_type,omitempty"`

	// Balance of the MT5 account.
	Balance *float64 `json:"balance,omitempty"`

	// [Optional] Pertains to client KYC. Returned only if the client fails to meet
	// the requirements, including proof of identity (POI), validity of the tax
	// identification number (TIN), and proof of address (POA).
	ClientKycStatus *Mt5LoginListRespMt5LoginListElemClientKycStatus `json:"client_kyc_status,omitempty"`

	// Residence of the MT5 account.
	Country *string `json:"country,omitempty"`

	// Currency of the MT5 account.
	Currency *string `json:"currency,omitempty"`

	// Account balance, formatted to appropriate decimal places.
	DisplayBalance *string `json:"display_balance,omitempty"`

	// [Optional] Determines the eligibility status for migrating a client account
	// based on verification and account type.
	EligibleToMigrate Mt5LoginListRespMt5LoginListElemEligibleToMigrate `json:"eligible_to_migrate,omitempty"`

	// Email address of the MT5 account.
	Email *string `json:"email,omitempty"`

	// Error in MT5 account details.
	Error *Mt5LoginListRespMt5LoginListElemError `json:"error,omitempty"`

	// Group type of the MT5 account, e.g. `demo\svg_financial`
	Group *string `json:"group,omitempty"`

	// Indicate if the account is a main agent - an IB account
	IsMainAgent *bool `json:"is_main_agent,omitempty"`

	// Broker name
	LandingCompany *string `json:"landing_company,omitempty"`

	// Landing company shortcode of the MT5 account.
	LandingCompanyShort *Mt5LoginListRespMt5LoginListElemLandingCompanyShort `json:"landing_company_short,omitempty"`

	// Leverage of the MT5 account (1 to 1000).
	Leverage *float64 `json:"leverage,omitempty"`

	// Login of MT5 account.
	Login *string `json:"login,omitempty"`

	// Market type
	MarketType *Mt5LoginListRespMt5LoginListElemMarketType `json:"market_type,omitempty"`

	// Name of the owner of the MT5 account.
	Name *string `json:"name,omitempty"`

	// Product name that Deriv offer
	Product *Mt5LoginListRespMt5LoginListElemProduct `json:"product,omitempty"`

	// Timestamp of the latest MT5 request.
	RequestTimestamp *int `json:"request_timestamp,omitempty"`

	// Rights assigned to the MT5 account.
	Rights *Mt5LoginListRespMt5LoginListElemRights `json:"rights,omitempty"`

	// Trade server name of the MT5 account.
	Server *string `json:"server,omitempty"`

	// Trade server information.
	ServerInfo *Mt5LoginListRespMt5LoginListElemServerInfo `json:"server_info,omitempty"`

	// MT5 account status.
	Status *string `json:"status,omitempty"`

	// Sub account category refer to the additional risk management
	SubAccountCategory *Mt5LoginListRespMt5LoginListElemSubAccountCategory `json:"sub_account_category,omitempty"`

	// Sub account type refer to different offerings that we have for mt5
	SubAccountType *Mt5LoginListRespMt5LoginListElemSubAccountType `json:"sub_account_type,omitempty"`

	// MT5 webtrader url for each mt5 platform
	WebtraderUrl *string `json:"webtrader_url,omitempty"`

	// Links to access MT5 application for different platforms.
	WhiteLabelLinks *Mt5LoginListRespMt5LoginListElemWhiteLabelLinks `json:"white_label_links,omitempty"`
}

type Mt5LoginListRespMt5LoginListElemAccountType ¶

type Mt5LoginListRespMt5LoginListElemAccountType string
const Mt5LoginListRespMt5LoginListElemAccountTypeDemo Mt5LoginListRespMt5LoginListElemAccountType = "demo"
const Mt5LoginListRespMt5LoginListElemAccountTypeReal Mt5LoginListRespMt5LoginListElemAccountType = "real"

func (*Mt5LoginListRespMt5LoginListElemAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemClientKycStatus ¶ added in v0.5.4

type Mt5LoginListRespMt5LoginListElemClientKycStatus struct {
	// Status of proof of address (POA).
	PoaStatus *Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus `json:"poa_status,omitempty"`

	// Status of proof of identity (POI).
	PoiStatus *Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus `json:"poi_status,omitempty"`

	// Indicates whether the tax identification number (TIN) is valid (1) or not (0).
	ValidTin *Mt5LoginListRespMt5LoginListElemClientKycStatusValidTin `json:"valid_tin,omitempty"`
}

[Optional] Pertains to client KYC. Returned only if the client fails to meet the requirements, including proof of identity (POI), validity of the tax identification number (TIN), and proof of address (POA).

type Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus ¶ added in v0.5.4

type Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus string
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatusExpired Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus = "expired"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatusNone Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus = "none"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatusPending Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus = "pending"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatusRejected Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus = "rejected"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatusVerified Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus = "verified"

func (*Mt5LoginListRespMt5LoginListElemClientKycStatusPoaStatus) UnmarshalJSON ¶ added in v0.5.4

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus ¶ added in v0.5.4

type Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus string
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusExpired Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "expired"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusNone Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "none"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusPending Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "pending"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusRejected Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "rejected"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusSuspected Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "suspected"
const Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatusVerified Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus = "verified"

func (*Mt5LoginListRespMt5LoginListElemClientKycStatusPoiStatus) UnmarshalJSON ¶ added in v0.5.4

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemClientKycStatusValidTin ¶ added in v0.5.4

type Mt5LoginListRespMt5LoginListElemClientKycStatusValidTin int

func (*Mt5LoginListRespMt5LoginListElemClientKycStatusValidTin) UnmarshalJSON ¶ added in v0.5.4

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemEligibleToMigrate ¶ added in v0.4.2

type Mt5LoginListRespMt5LoginListElemEligibleToMigrate map[string]interface{}

[Optional] Determines the eligibility status for migrating a client account based on verification and account type.

type Mt5LoginListRespMt5LoginListElemError ¶

type Mt5LoginListRespMt5LoginListElemError struct {
	// Error code string.
	Code *string `json:"code,omitempty"`

	// Extra information about the error.
	Details *Mt5LoginListRespMt5LoginListElemErrorDetails `json:"details,omitempty"`

	// Error message.
	MessageToClient *string `json:"message_to_client,omitempty"`
}

Error in MT5 account details.

type Mt5LoginListRespMt5LoginListElemErrorDetails ¶

type Mt5LoginListRespMt5LoginListElemErrorDetails struct {
	// MT5 account type.
	AccountType *string `json:"account_type,omitempty"`

	// MT5 account login ID.
	Login *string `json:"login,omitempty"`

	// Trade server name of the MT5 account.
	Server *string `json:"server,omitempty"`

	// Trade server information.
	ServerInfo *Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfo `json:"server_info,omitempty"`
}

Extra information about the error.

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfo ¶

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfo struct {
	// The environment. E.g. Deriv-Server.
	Environment *Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment `json:"environment,omitempty"`

	// Geographical location of the server.
	Geolocation *Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoGeolocation `json:"geolocation,omitempty"`

	// Server id.
	Id *string `json:"id,omitempty"`
}

Trade server information.

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment ¶

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment string
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivBVIServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivBVI-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivBVIServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivBVI-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivBVIServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivBVI-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivDemo Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "Deriv-Demo"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivFXServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivFX-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivFXServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivFX-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivFXServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivFX-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMTServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMT-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMTServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMT-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMTServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMT-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMUServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMU-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMUServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMU-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivMUServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivMU-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivSVGServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivSVG-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivSVGServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivSVG-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivSVGServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivSVG-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "Deriv-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "Deriv-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "Deriv-Server-03"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivVUServer Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivVU-Server"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivVUServer02 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivVU-Server-02"
const Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironmentDerivVUServer03 Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment = "DerivVU-Server-03"

func (*Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoEnvironment) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoGeolocation ¶

type Mt5LoginListRespMt5LoginListElemErrorDetailsServerInfoGeolocation struct {
	// Internal server grouping.
	Group *string `json:"group,omitempty"`

	// Server location.
	Location *string `json:"location,omitempty"`

	// Server region.
	Region *string `json:"region,omitempty"`

	// Server sequence.
	Sequence *int `json:"sequence,omitempty"`
}

Geographical location of the server.

type Mt5LoginListRespMt5LoginListElemLandingCompanyShort ¶

type Mt5LoginListRespMt5LoginListElemLandingCompanyShort string
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortBvi Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "bvi"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortDml Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "dml"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortLabuan Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "labuan"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortMalta Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "malta"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortMaltainvest Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "maltainvest"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortSeychelles Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "seychelles"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortSvg Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "svg"
const Mt5LoginListRespMt5LoginListElemLandingCompanyShortVanuatu Mt5LoginListRespMt5LoginListElemLandingCompanyShort = "vanuatu"

func (*Mt5LoginListRespMt5LoginListElemLandingCompanyShort) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemMarketType ¶

type Mt5LoginListRespMt5LoginListElemMarketType string
const Mt5LoginListRespMt5LoginListElemMarketTypeAll Mt5LoginListRespMt5LoginListElemMarketType = "all"
const Mt5LoginListRespMt5LoginListElemMarketTypeFinancial Mt5LoginListRespMt5LoginListElemMarketType = "financial"
const Mt5LoginListRespMt5LoginListElemMarketTypeSynthetic Mt5LoginListRespMt5LoginListElemMarketType = "synthetic"

func (*Mt5LoginListRespMt5LoginListElemMarketType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemProduct ¶ added in v0.4.24

type Mt5LoginListRespMt5LoginListElemProduct string
const Mt5LoginListRespMt5LoginListElemProductBlank Mt5LoginListRespMt5LoginListElemProduct = ""
const Mt5LoginListRespMt5LoginListElemProductFinancial Mt5LoginListRespMt5LoginListElemProduct = "financial"
const Mt5LoginListRespMt5LoginListElemProductGold Mt5LoginListRespMt5LoginListElemProduct = "gold"
const Mt5LoginListRespMt5LoginListElemProductStandard Mt5LoginListRespMt5LoginListElemProduct = "standard"
const Mt5LoginListRespMt5LoginListElemProductStp Mt5LoginListRespMt5LoginListElemProduct = "stp"
const Mt5LoginListRespMt5LoginListElemProductSwapFree Mt5LoginListRespMt5LoginListElemProduct = "swap_free"
const Mt5LoginListRespMt5LoginListElemProductSynthetic Mt5LoginListRespMt5LoginListElemProduct = "synthetic"
const Mt5LoginListRespMt5LoginListElemProductZeroSpread Mt5LoginListRespMt5LoginListElemProduct = "zero_spread"

func (*Mt5LoginListRespMt5LoginListElemProduct) UnmarshalJSON ¶ added in v0.4.24

func (j *Mt5LoginListRespMt5LoginListElemProduct) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemRights ¶ added in v0.4.24

type Mt5LoginListRespMt5LoginListElemRights struct {
	// User is allowed to connect via MT5 Web API
	Api *bool `json:"api,omitempty"`

	// This flag is obsolete and not used
	ApiDeprecated *bool `json:"api_deprecated,omitempty"`

	// User's certificate is confirmed
	Confirmed *bool `json:"confirmed,omitempty"`

	// The User is allowed to connect
	Enabled *bool `json:"enabled,omitempty"`

	// User is not allowed to view reports
	ExcludeReports *bool `json:"exclude_reports,omitempty"`

	// User is allowed to use Expert Advisors
	Expert *bool `json:"expert,omitempty"`

	// For internal mt5 usage
	Investor *bool `json:"investor,omitempty"`

	// User is allowed to use OTP
	OtpEnabled *bool `json:"otp_enabled,omitempty"`

	// User is allowed to change password
	PasswordChange *bool `json:"password_change,omitempty"`

	// User has enabled push notifications
	Push *bool `json:"push,omitempty"`

	// Value for internal mt5 usage
	Readonly *bool `json:"readonly,omitempty"`

	// User is allowed to receive daily reports
	Reports *bool `json:"reports,omitempty"`

	// User must change password during next connection
	ResetPass *bool `json:"reset_pass,omitempty"`

	// VPS is enabled for user
	Sponsored *bool `json:"sponsored,omitempty"`

	// User can view technical accounts in manager/admin terminal
	Technical *bool `json:"technical,omitempty"`

	// Trading is disabled for user
	TradeDisabled *bool `json:"trade_disabled,omitempty"`

	// User is allowed to use trailing stops
	Trailing *bool `json:"trailing,omitempty"`
}

Rights assigned to the MT5 account.

type Mt5LoginListRespMt5LoginListElemServerInfo ¶

type Mt5LoginListRespMt5LoginListElemServerInfo struct {
	// The environment. E.g. Deriv-Server.
	Environment *Mt5LoginListRespMt5LoginListElemServerInfoEnvironment `json:"environment,omitempty"`

	// Geographical location of the server.
	Geolocation *Mt5LoginListRespMt5LoginListElemServerInfoGeolocation `json:"geolocation,omitempty"`

	// Server id.
	Id *string `json:"id,omitempty"`
}

Trade server information.

type Mt5LoginListRespMt5LoginListElemServerInfoEnvironment ¶

type Mt5LoginListRespMt5LoginListElemServerInfoEnvironment string
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivBVIServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivBVI-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivBVIServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivBVI-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivBVIServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivBVI-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivDemo Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "Deriv-Demo"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivFXServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivFX-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivFXServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivFX-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivFXServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivFX-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMTServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMT-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMTServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMT-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMTServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMT-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMUServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMU-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMUServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMU-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivMUServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivMU-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivSVGServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivSVG-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivSVGServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivSVG-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivSVGServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivSVG-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "Deriv-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "Deriv-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "Deriv-Server-03"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivVUServer Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivVU-Server"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivVUServer02 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivVU-Server-02"
const Mt5LoginListRespMt5LoginListElemServerInfoEnvironmentDerivVUServer03 Mt5LoginListRespMt5LoginListElemServerInfoEnvironment = "DerivVU-Server-03"

func (*Mt5LoginListRespMt5LoginListElemServerInfoEnvironment) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemServerInfoGeolocation ¶

type Mt5LoginListRespMt5LoginListElemServerInfoGeolocation struct {
	// Internal server grouping.
	Group *string `json:"group,omitempty"`

	// Server location.
	Location *string `json:"location,omitempty"`

	// Server region.
	Region *string `json:"region,omitempty"`

	// Server sequence.
	Sequence *int `json:"sequence,omitempty"`
}

Geographical location of the server.

type Mt5LoginListRespMt5LoginListElemSubAccountCategory ¶

type Mt5LoginListRespMt5LoginListElemSubAccountCategory string
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryAb Mt5LoginListRespMt5LoginListElemSubAccountCategory = "ab"
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryBa Mt5LoginListRespMt5LoginListElemSubAccountCategory = "ba"
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryBlank Mt5LoginListRespMt5LoginListElemSubAccountCategory = ""
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryGold Mt5LoginListRespMt5LoginListElemSubAccountCategory = "gold"
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryHr Mt5LoginListRespMt5LoginListElemSubAccountCategory = "hr"
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryLim Mt5LoginListRespMt5LoginListElemSubAccountCategory = "lim"
const Mt5LoginListRespMt5LoginListElemSubAccountCategoryStp Mt5LoginListRespMt5LoginListElemSubAccountCategory = "stp"
const Mt5LoginListRespMt5LoginListElemSubAccountCategorySwapFree Mt5LoginListRespMt5LoginListElemSubAccountCategory = "swap_free"
const Mt5LoginListRespMt5LoginListElemSubAccountCategorySwapFreeHighRisk Mt5LoginListRespMt5LoginListElemSubAccountCategory = "swap_free_high_risk"

func (*Mt5LoginListRespMt5LoginListElemSubAccountCategory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemSubAccountType ¶

type Mt5LoginListRespMt5LoginListElemSubAccountType string
const Mt5LoginListRespMt5LoginListElemSubAccountTypeFinancial Mt5LoginListRespMt5LoginListElemSubAccountType = "financial"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeFinancialStp Mt5LoginListRespMt5LoginListElemSubAccountType = "financial_stp"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeGold Mt5LoginListRespMt5LoginListElemSubAccountType = "gold"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeIbt Mt5LoginListRespMt5LoginListElemSubAccountType = "ibt"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeStandard Mt5LoginListRespMt5LoginListElemSubAccountType = "standard"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeStp Mt5LoginListRespMt5LoginListElemSubAccountType = "stp"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeSwapFree Mt5LoginListRespMt5LoginListElemSubAccountType = "swap_free"
const Mt5LoginListRespMt5LoginListElemSubAccountTypeZeroSpread Mt5LoginListRespMt5LoginListElemSubAccountType = "zero_spread"

func (*Mt5LoginListRespMt5LoginListElemSubAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5LoginListRespMt5LoginListElemWhiteLabelLinks struct {
	// Download link for Android.
	Android *string `json:"android,omitempty"`

	// Download link for iOS.
	Ios *string `json:"ios,omitempty"`

	// MT5 webtrader url based on jurisdiction and platform
	WebtraderUrl *string `json:"webtrader_url,omitempty"`

	// Download link for Windows.
	Windows *string `json:"windows,omitempty"`
}

Links to access MT5 application for different platforms.

type Mt5NewAccount ¶

type Mt5NewAccount struct {
	// Account type. If set to 'financial', setting 'mt5_account_type' is also
	// required.
	AccountType Mt5NewAccountAccountType `json:"account_type"`

	// [Optional] The address of the user. The maximum length of this address field is
	// 128 characters.
	Address *string `json:"address,omitempty"`

	// [Optional] User's city of residence.
	City *string `json:"city,omitempty"`

	// [Optional] Name of the client's company. The maximum length of the company name
	// is 64 characters.
	Company *string `json:"company,omitempty"`

	// [Optional] 2-letter country code (value received from `residence_list` call).
	Country *string `json:"country,omitempty"`

	// [Optional] MT5 account currency, the default value will be the qualified
	// account currency.
	Currency *string `json:"currency,omitempty"`

	// [Optional] If set to 1, only validation is performed.
	DryRun Mt5NewAccountDryRun `json:"dry_run,omitempty"`

	// Email address
	Email string `json:"email"`

	// [Optional] The investor password of the account. For validation (Accepts any
	// printable ASCII character. Must be within 8-25 characters, and include numbers,
	// lowercase and uppercase letters. Must not be the same as the user's email
	// address).
	InvestPassword *string `json:"investPassword,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// The master password of the account. For validation (Accepts any printable ASCII
	// character. Must be within 8-25 characters, and include numbers, lowercase and
	// uppercase letters. Must not be the same as the user's email address). This
	// field is required.
	MainPassword string `json:"mainPassword"`

	// [Optional] Indicates whether the user would like to migrate his account to
	// other jurisdiction.
	Migrate *bool `json:"migrate,omitempty"`

	// [Optional] To choose whether account is conventional or swap_free. Unavailable
	// for financial_stp MT5_account_type
	Mt5AccountCategory *Mt5NewAccountMt5AccountCategory `json:"mt5_account_category,omitempty"`

	// [Optional] Financial: Variable spreads, High leverage. Financial STP: Variable
	// spreads, Medium Leverage, more products. If 'account_type' set to 'financial',
	// setting 'mt5_account_type' is also required.
	Mt5AccountType *Mt5NewAccountMt5AccountType `json:"mt5_account_type,omitempty"`

	// Must be `1`
	Mt5NewAccount Mt5NewAccountMt5NewAccount `json:"mt5_new_account"`

	// Client's name. The maximum length here is 101 characters.
	Name string `json:"name"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5NewAccountPassthrough `json:"passthrough,omitempty"`

	// [Optional] User's phone number.
	Phone *string `json:"phone,omitempty"`

	// [Optional] The user's phone password.
	PhonePassword *string `json:"phonePassword,omitempty"`

	// Product name that Deriv offer
	Product *Mt5NewAccountProduct `json:"product,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Trade server.
	Server *Mt5NewAccountServer `json:"server,omitempty"`

	// [Optional] User's state (region) of residence.
	State *string `json:"state,omitempty"`

	// [Optional] Indicate the additional risk management for each account
	SubAccountCategory *Mt5NewAccountSubAccountCategory `json:"sub_account_category,omitempty"`

	// [Optional] Indicate the different offerings for mt5 account
	SubAccountType *Mt5NewAccountSubAccountType `json:"sub_account_type,omitempty"`

	// [Optional] User's zip code.
	ZipCode *string `json:"zipCode,omitempty"`
}

This call creates new MT5 user, either demo or real money user.

func (*Mt5NewAccount) UnmarshalJSON ¶

func (j *Mt5NewAccount) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountAccountType ¶

type Mt5NewAccountAccountType string
const Mt5NewAccountAccountTypeAll Mt5NewAccountAccountType = "all"
const Mt5NewAccountAccountTypeDemo Mt5NewAccountAccountType = "demo"
const Mt5NewAccountAccountTypeFinancial Mt5NewAccountAccountType = "financial"
const Mt5NewAccountAccountTypeGaming Mt5NewAccountAccountType = "gaming"

func (*Mt5NewAccountAccountType) UnmarshalJSON ¶

func (j *Mt5NewAccountAccountType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountDryRun ¶

type Mt5NewAccountDryRun int

func (*Mt5NewAccountDryRun) UnmarshalJSON ¶

func (j *Mt5NewAccountDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountMt5AccountCategory ¶

type Mt5NewAccountMt5AccountCategory string
const Mt5NewAccountMt5AccountCategoryConventional Mt5NewAccountMt5AccountCategory = "conventional"
const Mt5NewAccountMt5AccountCategoryGold Mt5NewAccountMt5AccountCategory = "gold"
const Mt5NewAccountMt5AccountCategorySwapFree Mt5NewAccountMt5AccountCategory = "swap_free"

func (*Mt5NewAccountMt5AccountCategory) UnmarshalJSON ¶

func (j *Mt5NewAccountMt5AccountCategory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountMt5AccountType ¶

type Mt5NewAccountMt5AccountType string
const Mt5NewAccountMt5AccountTypeFinancial Mt5NewAccountMt5AccountType = "financial"
const Mt5NewAccountMt5AccountTypeFinancialStp Mt5NewAccountMt5AccountType = "financial_stp"
const Mt5NewAccountMt5AccountTypeGold Mt5NewAccountMt5AccountType = "gold"

func (*Mt5NewAccountMt5AccountType) UnmarshalJSON ¶

func (j *Mt5NewAccountMt5AccountType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountMt5NewAccount ¶

type Mt5NewAccountMt5NewAccount int

func (*Mt5NewAccountMt5NewAccount) UnmarshalJSON ¶

func (j *Mt5NewAccountMt5NewAccount) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountPassthrough ¶

type Mt5NewAccountPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5NewAccountProduct ¶ added in v0.4.24

type Mt5NewAccountProduct string
const Mt5NewAccountProductBlank Mt5NewAccountProduct = ""
const Mt5NewAccountProductFinancial Mt5NewAccountProduct = "financial"
const Mt5NewAccountProductGold Mt5NewAccountProduct = "gold"
const Mt5NewAccountProductStandard Mt5NewAccountProduct = "standard"
const Mt5NewAccountProductStp Mt5NewAccountProduct = "stp"
const Mt5NewAccountProductSwapFree Mt5NewAccountProduct = "swap_free"
const Mt5NewAccountProductSynthetic Mt5NewAccountProduct = "synthetic"
const Mt5NewAccountProductZeroSpread Mt5NewAccountProduct = "zero_spread"

func (*Mt5NewAccountProduct) UnmarshalJSON ¶ added in v0.4.24

func (j *Mt5NewAccountProduct) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountResp ¶

type Mt5NewAccountResp struct {
	// Echo of the request made.
	EchoReq Mt5NewAccountRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5NewAccountRespMsgType `json:"msg_type"`

	// New MT5 account details
	Mt5NewAccount *Mt5NewAccountRespMt5NewAccount `json:"mt5_new_account,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create MT5 account Receive

func (*Mt5NewAccountResp) UnmarshalJSON ¶

func (j *Mt5NewAccountResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespEchoReq ¶

type Mt5NewAccountRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5NewAccountRespMsgType ¶

type Mt5NewAccountRespMsgType string
const Mt5NewAccountRespMsgTypeMt5NewAccount Mt5NewAccountRespMsgType = "mt5_new_account"

func (*Mt5NewAccountRespMsgType) UnmarshalJSON ¶

func (j *Mt5NewAccountRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespMt5NewAccount ¶

type Mt5NewAccountRespMt5NewAccount struct {
	// Account type.
	AccountType *Mt5NewAccountRespMt5NewAccountAccountType `json:"account_type,omitempty"`

	// Agent Details.
	Agent *string `json:"agent,omitempty"`

	// Account balance.
	Balance *float64 `json:"balance,omitempty"`

	// MT5 account currency (`USD` or `EUR`) that depends on the MT5 company
	// (`vanuatu`, `svg`, `malta`).
	Currency *string `json:"currency,omitempty"`

	// Account balance, formatted to appropriate decimal places.
	DisplayBalance *string `json:"display_balance,omitempty"`

	// Login ID of the user's new MT5 account. Login could have 2 types of prefixes:
	// MTD, MTR. MTD - for demo accounts and MTR for real money accounts.
	Login *string `json:"login,omitempty"`

	// With default value of conventional, unavailable for `financial_stp` sub account
	// type.
	Mt5AccountCategory *Mt5NewAccountRespMt5NewAccountMt5AccountCategory `json:"mt5_account_category,omitempty"`

	// Sub account type for classic MT5 account.
	Mt5AccountType *Mt5NewAccountRespMt5NewAccountMt5AccountType `json:"mt5_account_type,omitempty"`

	// Product name that Deriv offer
	Product *Mt5NewAccountRespMt5NewAccountProduct `json:"product,omitempty"`

	// Indicate the different offerings for mt5 account.
	SubAccountType *Mt5NewAccountRespMt5NewAccountSubAccountType `json:"sub_account_type,omitempty"`
}

New MT5 account details

type Mt5NewAccountRespMt5NewAccountAccountType ¶

type Mt5NewAccountRespMt5NewAccountAccountType string
const Mt5NewAccountRespMt5NewAccountAccountTypeAll Mt5NewAccountRespMt5NewAccountAccountType = "all"
const Mt5NewAccountRespMt5NewAccountAccountTypeDemo Mt5NewAccountRespMt5NewAccountAccountType = "demo"
const Mt5NewAccountRespMt5NewAccountAccountTypeFinancial Mt5NewAccountRespMt5NewAccountAccountType = "financial"
const Mt5NewAccountRespMt5NewAccountAccountTypeGaming Mt5NewAccountRespMt5NewAccountAccountType = "gaming"

func (*Mt5NewAccountRespMt5NewAccountAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespMt5NewAccountMt5AccountCategory ¶

type Mt5NewAccountRespMt5NewAccountMt5AccountCategory string
const Mt5NewAccountRespMt5NewAccountMt5AccountCategoryConventional Mt5NewAccountRespMt5NewAccountMt5AccountCategory = "conventional"
const Mt5NewAccountRespMt5NewAccountMt5AccountCategoryGold Mt5NewAccountRespMt5NewAccountMt5AccountCategory = "gold"
const Mt5NewAccountRespMt5NewAccountMt5AccountCategorySwapFree Mt5NewAccountRespMt5NewAccountMt5AccountCategory = "swap_free"

func (*Mt5NewAccountRespMt5NewAccountMt5AccountCategory) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespMt5NewAccountMt5AccountType ¶

type Mt5NewAccountRespMt5NewAccountMt5AccountType string
const Mt5NewAccountRespMt5NewAccountMt5AccountTypeFinancial Mt5NewAccountRespMt5NewAccountMt5AccountType = "financial"
const Mt5NewAccountRespMt5NewAccountMt5AccountTypeFinancialStp Mt5NewAccountRespMt5NewAccountMt5AccountType = "financial_stp"
const Mt5NewAccountRespMt5NewAccountMt5AccountTypeGold Mt5NewAccountRespMt5NewAccountMt5AccountType = "gold"
const Mt5NewAccountRespMt5NewAccountMt5AccountTypeStandard Mt5NewAccountRespMt5NewAccountMt5AccountType = "standard"

func (*Mt5NewAccountRespMt5NewAccountMt5AccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespMt5NewAccountProduct ¶ added in v0.4.24

type Mt5NewAccountRespMt5NewAccountProduct string
const Mt5NewAccountRespMt5NewAccountProductBlank Mt5NewAccountRespMt5NewAccountProduct = ""
const Mt5NewAccountRespMt5NewAccountProductFinancial Mt5NewAccountRespMt5NewAccountProduct = "financial"
const Mt5NewAccountRespMt5NewAccountProductGold Mt5NewAccountRespMt5NewAccountProduct = "gold"
const Mt5NewAccountRespMt5NewAccountProductStandard Mt5NewAccountRespMt5NewAccountProduct = "standard"
const Mt5NewAccountRespMt5NewAccountProductStp Mt5NewAccountRespMt5NewAccountProduct = "stp"
const Mt5NewAccountRespMt5NewAccountProductSwapFree Mt5NewAccountRespMt5NewAccountProduct = "swap_free"
const Mt5NewAccountRespMt5NewAccountProductSynthetic Mt5NewAccountRespMt5NewAccountProduct = "synthetic"
const Mt5NewAccountRespMt5NewAccountProductZeroSpread Mt5NewAccountRespMt5NewAccountProduct = "zero_spread"

func (*Mt5NewAccountRespMt5NewAccountProduct) UnmarshalJSON ¶ added in v0.4.24

func (j *Mt5NewAccountRespMt5NewAccountProduct) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountRespMt5NewAccountSubAccountType ¶ added in v0.4.26

type Mt5NewAccountRespMt5NewAccountSubAccountType string
const Mt5NewAccountRespMt5NewAccountSubAccountTypeGold Mt5NewAccountRespMt5NewAccountSubAccountType = "gold"
const Mt5NewAccountRespMt5NewAccountSubAccountTypeIbt Mt5NewAccountRespMt5NewAccountSubAccountType = "ibt"
const Mt5NewAccountRespMt5NewAccountSubAccountTypeStandard Mt5NewAccountRespMt5NewAccountSubAccountType = "standard"
const Mt5NewAccountRespMt5NewAccountSubAccountTypeStp Mt5NewAccountRespMt5NewAccountSubAccountType = "stp"
const Mt5NewAccountRespMt5NewAccountSubAccountTypeSwapFree Mt5NewAccountRespMt5NewAccountSubAccountType = "swap_free"
const Mt5NewAccountRespMt5NewAccountSubAccountTypeZeroSpread Mt5NewAccountRespMt5NewAccountSubAccountType = "zero_spread"

func (*Mt5NewAccountRespMt5NewAccountSubAccountType) UnmarshalJSON ¶ added in v0.4.26

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountServer ¶

type Mt5NewAccountServer string
const Mt5NewAccountServerP01Ts01 Mt5NewAccountServer = "p01_ts01"
const Mt5NewAccountServerP01Ts02 Mt5NewAccountServer = "p01_ts02"
const Mt5NewAccountServerP01Ts03 Mt5NewAccountServer = "p01_ts03"
const Mt5NewAccountServerP01Ts04 Mt5NewAccountServer = "p01_ts04"
const Mt5NewAccountServerP02Ts02 Mt5NewAccountServer = "p02_ts02"
const Mt5NewAccountServerP03Ts01 Mt5NewAccountServer = "p03_ts01"
const Mt5NewAccountServerP03Ts02 Mt5NewAccountServer = "p03_ts02"

func (*Mt5NewAccountServer) UnmarshalJSON ¶

func (j *Mt5NewAccountServer) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountSubAccountCategory ¶

type Mt5NewAccountSubAccountCategory string
const Mt5NewAccountSubAccountCategoryAb Mt5NewAccountSubAccountCategory = "ab"
const Mt5NewAccountSubAccountCategoryBa Mt5NewAccountSubAccountCategory = "ba"
const Mt5NewAccountSubAccountCategoryBlank Mt5NewAccountSubAccountCategory = ""
const Mt5NewAccountSubAccountCategoryGold Mt5NewAccountSubAccountCategory = "gold"
const Mt5NewAccountSubAccountCategoryHr Mt5NewAccountSubAccountCategory = "hr"
const Mt5NewAccountSubAccountCategoryLim Mt5NewAccountSubAccountCategory = "lim"
const Mt5NewAccountSubAccountCategorySwapFree Mt5NewAccountSubAccountCategory = "swap_free"

func (*Mt5NewAccountSubAccountCategory) UnmarshalJSON ¶

func (j *Mt5NewAccountSubAccountCategory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5NewAccountSubAccountType ¶ added in v0.4.26

type Mt5NewAccountSubAccountType string
const Mt5NewAccountSubAccountTypeGold Mt5NewAccountSubAccountType = "gold"
const Mt5NewAccountSubAccountTypeIbt Mt5NewAccountSubAccountType = "ibt"
const Mt5NewAccountSubAccountTypeStandard Mt5NewAccountSubAccountType = "standard"
const Mt5NewAccountSubAccountTypeStp Mt5NewAccountSubAccountType = "stp"
const Mt5NewAccountSubAccountTypeSwapFree Mt5NewAccountSubAccountType = "swap_free"
const Mt5NewAccountSubAccountTypeZeroSpread Mt5NewAccountSubAccountType = "zero_spread"

func (*Mt5NewAccountSubAccountType) UnmarshalJSON ¶ added in v0.4.26

func (j *Mt5NewAccountSubAccountType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordChange ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5PasswordChange Mt5PasswordChangeMt5PasswordChange `json:"mt5_password_change"`

	// New password of the account. For validation (Accepts any printable ASCII
	// character. Must be within 8-25 characters, and include numbers, lowercase and
	// uppercase letters. Must not be the same as the user's email address).
	NewPassword string `json:"new_password"`

	// Old password for validation (non-empty string, accepts any printable ASCII
	// character)
	OldPassword string `json:"old_password"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5PasswordChangePassthrough `json:"passthrough,omitempty"`

	// [Optional] Type of the password to change.
	PasswordType Mt5PasswordChangePasswordType `json:"password_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

To change passwords of the MT5 account.

func (*Mt5PasswordChange) UnmarshalJSON ¶

func (j *Mt5PasswordChange) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordChangeMt5PasswordChange ¶

type Mt5PasswordChangeMt5PasswordChange int

func (*Mt5PasswordChangeMt5PasswordChange) UnmarshalJSON ¶

func (j *Mt5PasswordChangeMt5PasswordChange) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordChangePassthrough ¶

type Mt5PasswordChangePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5PasswordChangePasswordType ¶

type Mt5PasswordChangePasswordType string
const Mt5PasswordChangePasswordTypeInvestor Mt5PasswordChangePasswordType = "investor"
const Mt5PasswordChangePasswordTypeMain Mt5PasswordChangePasswordType = "main"

func (*Mt5PasswordChangePasswordType) UnmarshalJSON ¶

func (j *Mt5PasswordChangePasswordType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordChangeResp ¶

type Mt5PasswordChangeResp struct {
	// Echo of the request made.
	EchoReq Mt5PasswordChangeRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5PasswordChangeRespMsgType `json:"msg_type"`

	// `1` on success
	Mt5PasswordChange *int `json:"mt5_password_change,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

MT5 user password change receive

func (*Mt5PasswordChangeResp) UnmarshalJSON ¶

func (j *Mt5PasswordChangeResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordChangeRespEchoReq ¶

type Mt5PasswordChangeRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5PasswordChangeRespMsgType ¶

type Mt5PasswordChangeRespMsgType string
const Mt5PasswordChangeRespMsgTypeMt5PasswordChange Mt5PasswordChangeRespMsgType = "mt5_password_change"

func (*Mt5PasswordChangeRespMsgType) UnmarshalJSON ¶

func (j *Mt5PasswordChangeRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordCheck ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5PasswordCheck Mt5PasswordCheckMt5PasswordCheck `json:"mt5_password_check"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5PasswordCheckPassthrough `json:"passthrough,omitempty"`

	// The password of the account.
	Password string `json:"password"`

	// [Optional] Type of the password to check.
	PasswordType Mt5PasswordCheckPasswordType `json:"password_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

This call validates the main password for the MT5 user

func (*Mt5PasswordCheck) UnmarshalJSON ¶

func (j *Mt5PasswordCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordCheckMt5PasswordCheck ¶

type Mt5PasswordCheckMt5PasswordCheck int

func (*Mt5PasswordCheckMt5PasswordCheck) UnmarshalJSON ¶

func (j *Mt5PasswordCheckMt5PasswordCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordCheckPassthrough ¶

type Mt5PasswordCheckPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5PasswordCheckPasswordType ¶

type Mt5PasswordCheckPasswordType string
const Mt5PasswordCheckPasswordTypeInvestor Mt5PasswordCheckPasswordType = "investor"
const Mt5PasswordCheckPasswordTypeMain Mt5PasswordCheckPasswordType = "main"

func (*Mt5PasswordCheckPasswordType) UnmarshalJSON ¶

func (j *Mt5PasswordCheckPasswordType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordCheckResp ¶

type Mt5PasswordCheckResp struct {
	// Echo of the request made.
	EchoReq Mt5PasswordCheckRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5PasswordCheckRespMsgType `json:"msg_type"`

	// `1` on success
	Mt5PasswordCheck *int `json:"mt5_password_check,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

MT5 user password check receive

func (*Mt5PasswordCheckResp) UnmarshalJSON ¶

func (j *Mt5PasswordCheckResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordCheckRespEchoReq ¶

type Mt5PasswordCheckRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5PasswordCheckRespMsgType ¶

type Mt5PasswordCheckRespMsgType string
const Mt5PasswordCheckRespMsgTypeMt5PasswordCheck Mt5PasswordCheckRespMsgType = "mt5_password_check"

func (*Mt5PasswordCheckRespMsgType) UnmarshalJSON ¶

func (j *Mt5PasswordCheckRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordReset ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5PasswordReset Mt5PasswordResetMt5PasswordReset `json:"mt5_password_reset"`

	// New password of the account. For validation (Accepts any printable ASCII
	// character. Must be within 8-25 characters, and include numbers, lowercase and
	// uppercase letters. Must not be the same as the user's email address).
	NewPassword string `json:"new_password"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5PasswordResetPassthrough `json:"passthrough,omitempty"`

	// [Optional] Type of the password to reset.
	PasswordType Mt5PasswordResetPasswordType `json:"password_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first)
	VerificationCode string `json:"verification_code"`
}

To reset the password of MT5 account.

func (*Mt5PasswordReset) UnmarshalJSON ¶

func (j *Mt5PasswordReset) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordResetMt5PasswordReset ¶

type Mt5PasswordResetMt5PasswordReset int

func (*Mt5PasswordResetMt5PasswordReset) UnmarshalJSON ¶

func (j *Mt5PasswordResetMt5PasswordReset) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordResetPassthrough ¶

type Mt5PasswordResetPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5PasswordResetPasswordType ¶

type Mt5PasswordResetPasswordType string
const Mt5PasswordResetPasswordTypeInvestor Mt5PasswordResetPasswordType = "investor"
const Mt5PasswordResetPasswordTypeMain Mt5PasswordResetPasswordType = "main"

func (*Mt5PasswordResetPasswordType) UnmarshalJSON ¶

func (j *Mt5PasswordResetPasswordType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordResetResp ¶

type Mt5PasswordResetResp struct {
	// Echo of the request made.
	EchoReq Mt5PasswordResetRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5PasswordResetRespMsgType `json:"msg_type"`

	// `1` on success
	Mt5PasswordReset *int `json:"mt5_password_reset,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

MT5 user password reset receive

func (*Mt5PasswordResetResp) UnmarshalJSON ¶

func (j *Mt5PasswordResetResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5PasswordResetRespEchoReq ¶

type Mt5PasswordResetRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5PasswordResetRespMsgType ¶

type Mt5PasswordResetRespMsgType string
const Mt5PasswordResetRespMsgTypeMt5PasswordReset Mt5PasswordResetRespMsgType = "mt5_password_reset"

func (*Mt5PasswordResetRespMsgType) UnmarshalJSON ¶

func (j *Mt5PasswordResetRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5Withdrawal ¶

type Mt5Withdrawal struct {
	// Amount to withdraw (in the currency of the MT5 account); min = $1 or an
	// equivalent amount, max = $20000 or an equivalent amount.
	Amount float64 `json:"amount"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	Mt5Withdrawal Mt5WithdrawalMt5Withdrawal `json:"mt5_withdrawal"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough Mt5WithdrawalPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Binary account loginid to transfer money to
	ToBinary string `json:"to_binary"`
}

This call allows withdrawal from MT5 account to Binary account.

func (*Mt5Withdrawal) UnmarshalJSON ¶

func (j *Mt5Withdrawal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5WithdrawalMt5Withdrawal ¶

type Mt5WithdrawalMt5Withdrawal int

func (*Mt5WithdrawalMt5Withdrawal) UnmarshalJSON ¶

func (j *Mt5WithdrawalMt5Withdrawal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5WithdrawalPassthrough ¶

type Mt5WithdrawalPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type Mt5WithdrawalResp ¶

type Mt5WithdrawalResp struct {
	// Deposit reference ID of Binary account.
	BinaryTransactionId *int `json:"binary_transaction_id,omitempty"`

	// Echo of the request made.
	EchoReq Mt5WithdrawalRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType Mt5WithdrawalRespMsgType `json:"msg_type"`

	// `1` on success
	Mt5Withdrawal *int `json:"mt5_withdrawal,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of MT5 withdrawal request made.

func (*Mt5WithdrawalResp) UnmarshalJSON ¶

func (j *Mt5WithdrawalResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Mt5WithdrawalRespEchoReq ¶

type Mt5WithdrawalRespEchoReq map[string]interface{}

Echo of the request made.

type Mt5WithdrawalRespMsgType ¶

type Mt5WithdrawalRespMsgType string
const Mt5WithdrawalRespMsgTypeMt5Withdrawal Mt5WithdrawalRespMsgType = "mt5_withdrawal"

func (*Mt5WithdrawalRespMsgType) UnmarshalJSON ¶

func (j *Mt5WithdrawalRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvest ¶

type NewAccountMaltainvest struct {
	// Show whether client has accepted risk disclaimer.
	AcceptRisk *NewAccountMaltainvestAcceptRisk `json:"accept_risk,omitempty"`

	// [Optional] Purpose and reason for requesting the account opening.
	AccountOpeningReason *NewAccountMaltainvestAccountOpeningReason `json:"account_opening_reason,omitempty"`

	// [Optional] The anticipated account turnover.
	AccountTurnover *string `json:"account_turnover,omitempty"`

	// Within 100 characters
	AddressCity string `json:"address_city"`

	// Within 70 characters, with no leading whitespaces and may contain
	// letters/numbers and/or any of following characters '.,:;()@#/-
	AddressLine1 string `json:"address_line_1"`

	// [Optional] Within 70 characters.
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// [Optional] Within 20 characters and may not contain '+'.
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// [Optional] Possible value receive from `states_list` call.
	AddressState *string `json:"address_state,omitempty"`

	// [Optional] Affiliate token, within 32 characters.
	AffiliateToken *string `json:"affiliate_token,omitempty"`

	// [Optional] The phone's calling country code. Don't include the `+` sign. Up to
	// 4 digits.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// How much experience do you have in CFD trading?
	CfdExperience *NewAccountMaltainvestCfdExperience `json:"cfd_experience,omitempty"`

	// How many CFD trades have you placed in the past 12 months?
	CfdFrequency *NewAccountMaltainvestCfdFrequency `json:"cfd_frequency,omitempty"`

	// In your understanding, CFD trading allows you to:
	CfdTradingDefinition *NewAccountMaltainvestCfdTradingDefinition `json:"cfd_trading_definition,omitempty"`

	// [Optional] Country of legal citizenship, 2-letter country code. Possible value
	// receive from `residence_list` call.
	Citizen *string `json:"citizen,omitempty"`

	// [Optional] Indicates whether this is for a client requesting an account with
	// professional status.
	ClientType NewAccountMaltainvestClientType `json:"client_type,omitempty"`

	// [Optional] To set currency of the account. List of supported currencies can be
	// acquired with `payout_currencies` call.
	Currency *string `json:"currency,omitempty"`

	// Date of birth format: yyyy-mm-dd.
	DateOfBirth string `json:"date_of_birth"`

	// [Optional] Level of Education
	EducationLevel *string `json:"education_level,omitempty"`

	// [Optional] Industry of Employment.
	EmploymentIndustry *string `json:"employment_industry,omitempty"`

	// Employment Status.
	EmploymentStatus string `json:"employment_status"`

	// [Optional] Estimated Net Worth.
	EstimatedWorth *string `json:"estimated_worth,omitempty"`

	// [Optional] Indicates client's self-declaration of FATCA.
	FatcaDeclaration *NewAccountMaltainvestFatcaDeclaration `json:"fatca_declaration,omitempty"`

	// [Optional] Version of the financial information
	FinancialInformationVersion *string `json:"financial_information_version,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	FirstName string `json:"first_name"`

	// [Optional] Income Source.
	IncomeSource *string `json:"income_source,omitempty"`

	// [Optional] Investment intention.
	InvestmentIntention *string `json:"investment_intention,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	LastName string `json:"last_name"`

	// How does leverage affect CFD trading?
	LeverageImpactTrading *NewAccountMaltainvestLeverageImpactTrading `json:"leverage_impact_trading,omitempty"`

	// Leverage trading is high-risk, so it's a good idea to use risk management
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Net Annual Income.
	NetIncome *string `json:"net_income,omitempty"`

	// Must be `1`
	NewAccountMaltainvest NewAccountMaltainvestNewAccountMaltainvest `json:"new_account_maltainvest"`

	// [Optional] Indicates client's self-declaration of not being a PEP/RCA.
	NonPepDeclaration *int `json:"non_pep_declaration,omitempty"`

	// [Optional] Occupation.
	Occupation *string `json:"occupation,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewAccountMaltainvestPassthrough `json:"passthrough,omitempty"`

	// [Optional] The phone's national format, don't include the `+` sign nor the
	// calling country code. Up to 15 digits are allowed.
	Phone *string `json:"phone,omitempty"`

	// [Optional] Place of birth, 2-letter country code.
	PlaceOfBirth *string `json:"place_of_birth,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// When would you be required to pay an initial margin?
	RequiredInitialMargin *NewAccountMaltainvestRequiredInitialMargin `json:"required_initial_margin,omitempty"`

	// 2-letter country code, possible value receive from `residence_list` call.
	Residence string `json:"residence"`

	// [Optional] Indicates client's self declaration for opening account under own
	// initiative, must be 1
	ResidentSelfDeclaration *NewAccountMaltainvestResidentSelfDeclaration `json:"resident_self_declaration,omitempty"`

	// Do you understand that you could potentially lose 100% of the money you use to
	// trade?
	RiskTolerance *NewAccountMaltainvestRiskTolerance `json:"risk_tolerance,omitempty"`

	// Accept any value in enum list.
	Salutation NewAccountMaltainvestSalutation `json:"salutation"`

	// [Optional] Answer to secret question, within 4-50 characters.
	SecretAnswer *string `json:"secret_answer,omitempty"`

	// [Optional] Accept any value in enum list.
	SecretQuestion *NewAccountMaltainvestSecretQuestion `json:"secret_question,omitempty"`

	// How much knowledge and experience do you have in relation to online trading?
	SourceOfExperience *NewAccountMaltainvestSourceOfExperience `json:"source_of_experience,omitempty"`

	// [Optional] Source of wealth.
	SourceOfWealth *string `json:"source_of_wealth,omitempty"`

	// Tax identification number. Only applicable for real money account. Required for
	// `maltainvest` landing company.
	TaxIdentificationNumber *string `json:"tax_identification_number,omitempty"`

	// Residence for tax purpose. Comma separated iso country code if multiple
	// jurisdictions. Only applicable for real money account. Required for
	// `maltainvest` landing company.
	TaxResidence string `json:"tax_residence"`

	// [Optional] Whether the client has skipped the TIN form. Only applicable for
	// real money account.
	TinSkipped *NewAccountMaltainvestTinSkipped `json:"tin_skipped,omitempty"`

	// The tnc acceptance status of the user.
	TncAcceptance *NewAccountMaltainvestTncAcceptance `json:"tnc_acceptance,omitempty"`

	// How much experience do you have with other financial instruments?
	TradingExperienceFinancialInstruments *NewAccountMaltainvestTradingExperienceFinancialInstruments `json:"trading_experience_financial_instruments,omitempty"`

	// How many trades have you placed with other financial instruments in the past 12
	// months?
	TradingFrequencyFinancialInstruments *NewAccountMaltainvestTradingFrequencyFinancialInstruments `json:"trading_frequency_financial_instruments,omitempty"`
}

This call opens a new real-money account with the `maltainvest` Landing Company. This call can be made from a virtual-money account or real-money account at Deriv (Europe) Limited. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.

func (*NewAccountMaltainvest) UnmarshalJSON ¶

func (j *NewAccountMaltainvest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestAcceptRisk ¶

type NewAccountMaltainvestAcceptRisk int

func (*NewAccountMaltainvestAcceptRisk) UnmarshalJSON ¶

func (j *NewAccountMaltainvestAcceptRisk) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestAccountOpeningReason ¶

type NewAccountMaltainvestAccountOpeningReason string
const NewAccountMaltainvestAccountOpeningReasonAdditionalRevenue NewAccountMaltainvestAccountOpeningReason = "Additional revenue"
const NewAccountMaltainvestAccountOpeningReasonHedging NewAccountMaltainvestAccountOpeningReason = "Hedging"
const NewAccountMaltainvestAccountOpeningReasonIncomeEarning NewAccountMaltainvestAccountOpeningReason = "Income Earning"
const NewAccountMaltainvestAccountOpeningReasonSavings NewAccountMaltainvestAccountOpeningReason = "Savings"
const NewAccountMaltainvestAccountOpeningReasonSpeculative NewAccountMaltainvestAccountOpeningReason = "Speculative"

func (*NewAccountMaltainvestAccountOpeningReason) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestCfdExperience ¶

type NewAccountMaltainvestCfdExperience string
const NewAccountMaltainvestCfdExperienceA12Years NewAccountMaltainvestCfdExperience = "1 - 2 years"
const NewAccountMaltainvestCfdExperienceLessThanAYear NewAccountMaltainvestCfdExperience = "Less than a year"
const NewAccountMaltainvestCfdExperienceNoExperience NewAccountMaltainvestCfdExperience = "No experience"
const NewAccountMaltainvestCfdExperienceOver3Years NewAccountMaltainvestCfdExperience = "Over 3 years"

func (*NewAccountMaltainvestCfdExperience) UnmarshalJSON ¶

func (j *NewAccountMaltainvestCfdExperience) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestCfdFrequency ¶

type NewAccountMaltainvestCfdFrequency string
const NewAccountMaltainvestCfdFrequencyA1139TransactionsInThePast12Months NewAccountMaltainvestCfdFrequency = "11 - 39 transactions in the past 12 months"
const NewAccountMaltainvestCfdFrequencyA15TransactionsInThePast12Months NewAccountMaltainvestCfdFrequency = "1 - 5 transactions in the past 12 months"
const NewAccountMaltainvestCfdFrequencyA40TransactionsOrMoreInThePast12Months NewAccountMaltainvestCfdFrequency = "40 transactions or more in the past 12 months"
const NewAccountMaltainvestCfdFrequencyA610TransactionsInThePast12Months NewAccountMaltainvestCfdFrequency = "6 - 10 transactions in the past 12 months"
const NewAccountMaltainvestCfdFrequencyNoTransactionsInThePast12Months NewAccountMaltainvestCfdFrequency = "No transactions in the past 12 months"

func (*NewAccountMaltainvestCfdFrequency) UnmarshalJSON ¶

func (j *NewAccountMaltainvestCfdFrequency) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestCfdTradingDefinition ¶

type NewAccountMaltainvestCfdTradingDefinition string
const NewAccountMaltainvestCfdTradingDefinitionMakeALongTermInvestment NewAccountMaltainvestCfdTradingDefinition = "Make a long-term investment."
const NewAccountMaltainvestCfdTradingDefinitionPlaceABetOnThePriceMovement NewAccountMaltainvestCfdTradingDefinition = "Place a bet on the price movement."
const NewAccountMaltainvestCfdTradingDefinitionPurchaseSharesOfACompanyOrPhysicalCommodities NewAccountMaltainvestCfdTradingDefinition = "Purchase shares of a company or physical commodities."
const NewAccountMaltainvestCfdTradingDefinitionSpeculateOnThePriceMovement NewAccountMaltainvestCfdTradingDefinition = "Speculate on the price movement."

func (*NewAccountMaltainvestCfdTradingDefinition) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestClientType ¶

type NewAccountMaltainvestClientType string
const NewAccountMaltainvestClientTypeProfessional NewAccountMaltainvestClientType = "professional"
const NewAccountMaltainvestClientTypeRetail NewAccountMaltainvestClientType = "retail"

func (*NewAccountMaltainvestClientType) UnmarshalJSON ¶

func (j *NewAccountMaltainvestClientType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestFatcaDeclaration ¶ added in v0.4.19

type NewAccountMaltainvestFatcaDeclaration int

func (*NewAccountMaltainvestFatcaDeclaration) UnmarshalJSON ¶ added in v0.4.19

func (j *NewAccountMaltainvestFatcaDeclaration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestLeverageImpactTrading ¶

type NewAccountMaltainvestLeverageImpactTrading string
const NewAccountMaltainvestLeverageImpactTradingLeverageGuaranteesProfits NewAccountMaltainvestLeverageImpactTrading = "Leverage guarantees profits."
const NewAccountMaltainvestLeverageImpactTradingLeverageIsARiskMitigationTechnique NewAccountMaltainvestLeverageImpactTrading = "Leverage is a risk mitigation technique."
const NewAccountMaltainvestLeverageImpactTradingLeverageLetsYouOpenLargerPositionsForAFractionOfTheTradeSValue NewAccountMaltainvestLeverageImpactTrading = "Leverage lets you open larger positions for a fraction of the trade's value."
const NewAccountMaltainvestLeverageImpactTradingLeveragePreventsYouFromOpeningLargePositions NewAccountMaltainvestLeverageImpactTrading = "Leverage prevents you from opening large positions."

func (*NewAccountMaltainvestLeverageImpactTrading) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestLeverageTradingHighRiskStopLoss ¶

type NewAccountMaltainvestLeverageTradingHighRiskStopLoss string
const NewAccountMaltainvestLeverageTradingHighRiskStopLossCancelYourTradeAtAnyTimeWithinAChosenTimeframe NewAccountMaltainvestLeverageTradingHighRiskStopLoss = "Cancel your trade at any time within a chosen timeframe."
const NewAccountMaltainvestLeverageTradingHighRiskStopLossCloseYourTradeAutomaticallyWhenTheLossIsMoreThanOrEqualToASpecificAmount NewAccountMaltainvestLeverageTradingHighRiskStopLoss = "Close your trade automatically when the loss is more than or equal to a specific amount."
const NewAccountMaltainvestLeverageTradingHighRiskStopLossCloseYourTradeAutomaticallyWhenTheProfitIsMoreThanOrEqualToASpecificAmount NewAccountMaltainvestLeverageTradingHighRiskStopLoss = "Close your trade automatically when the profit is more than or equal to a specific amount."
const NewAccountMaltainvestLeverageTradingHighRiskStopLossMakeAGuaranteedProfitOnYourTrade NewAccountMaltainvestLeverageTradingHighRiskStopLoss = "Make a guaranteed profit on your trade."

func (*NewAccountMaltainvestLeverageTradingHighRiskStopLoss) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestNewAccountMaltainvest ¶

type NewAccountMaltainvestNewAccountMaltainvest int

func (*NewAccountMaltainvestNewAccountMaltainvest) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestPassthrough ¶

type NewAccountMaltainvestPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewAccountMaltainvestRequiredInitialMargin ¶

type NewAccountMaltainvestRequiredInitialMargin string
const NewAccountMaltainvestRequiredInitialMarginAllOfTheAbove NewAccountMaltainvestRequiredInitialMargin = "All of the above."
const NewAccountMaltainvestRequiredInitialMarginWhenBuyingSharesOfACompany NewAccountMaltainvestRequiredInitialMargin = "When buying shares of a company."
const NewAccountMaltainvestRequiredInitialMarginWhenOpeningALeveragedCFDTrade NewAccountMaltainvestRequiredInitialMargin = "When opening a Leveraged CFD trade."
const NewAccountMaltainvestRequiredInitialMarginWhenTradingMultipliers NewAccountMaltainvestRequiredInitialMargin = "When trading Multipliers."

func (*NewAccountMaltainvestRequiredInitialMargin) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestResidentSelfDeclaration ¶ added in v0.4.21

type NewAccountMaltainvestResidentSelfDeclaration int

func (*NewAccountMaltainvestResidentSelfDeclaration) UnmarshalJSON ¶ added in v0.4.21

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestResp ¶

type NewAccountMaltainvestResp struct {
	// Echo of the request made.
	EchoReq NewAccountMaltainvestRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewAccountMaltainvestRespMsgType `json:"msg_type"`

	// New `maltainvest` account details
	NewAccountMaltainvest *NewAccountMaltainvestRespNewAccountMaltainvest `json:"new_account_maltainvest,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create maltainvest account Receive

func (*NewAccountMaltainvestResp) UnmarshalJSON ¶

func (j *NewAccountMaltainvestResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestRespEchoReq ¶

type NewAccountMaltainvestRespEchoReq map[string]interface{}

Echo of the request made.

type NewAccountMaltainvestRespMsgType ¶

type NewAccountMaltainvestRespMsgType string
const NewAccountMaltainvestRespMsgTypeNewAccountMaltainvest NewAccountMaltainvestRespMsgType = "new_account_maltainvest"

func (*NewAccountMaltainvestRespMsgType) UnmarshalJSON ¶

func (j *NewAccountMaltainvestRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestRespNewAccountMaltainvest ¶

type NewAccountMaltainvestRespNewAccountMaltainvest struct {
	// Client ID of new `maltainvest` account
	ClientId string `json:"client_id"`

	// Currency of an account
	Currency *string `json:"currency,omitempty"`

	// Currency type against the currency
	CurrencyType *string `json:"currency_type,omitempty"`

	// Landing company full name
	LandingCompany string `json:"landing_company"`

	// Landing company shortcode
	LandingCompanyShort *string `json:"landing_company_short,omitempty"`

	// Landing company shortcode
	LandingCompanyShortcode *string `json:"landing_company_shortcode,omitempty"`

	// OAuth token for client's login session
	OauthToken string `json:"oauth_token"`
}

New `maltainvest` account details

func (*NewAccountMaltainvestRespNewAccountMaltainvest) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestRiskTolerance ¶

type NewAccountMaltainvestRiskTolerance string
const NewAccountMaltainvestRiskToleranceNo NewAccountMaltainvestRiskTolerance = "No"
const NewAccountMaltainvestRiskToleranceYes NewAccountMaltainvestRiskTolerance = "Yes"

func (*NewAccountMaltainvestRiskTolerance) UnmarshalJSON ¶

func (j *NewAccountMaltainvestRiskTolerance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestSalutation ¶

type NewAccountMaltainvestSalutation string
const NewAccountMaltainvestSalutationMiss NewAccountMaltainvestSalutation = "Miss"
const NewAccountMaltainvestSalutationMr NewAccountMaltainvestSalutation = "Mr"
const NewAccountMaltainvestSalutationMrs NewAccountMaltainvestSalutation = "Mrs"
const NewAccountMaltainvestSalutationMs NewAccountMaltainvestSalutation = "Ms"

func (*NewAccountMaltainvestSalutation) UnmarshalJSON ¶

func (j *NewAccountMaltainvestSalutation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestSecretQuestion ¶

type NewAccountMaltainvestSecretQuestion string
const NewAccountMaltainvestSecretQuestionBrandOfFirstCar NewAccountMaltainvestSecretQuestion = "Brand of first car"
const NewAccountMaltainvestSecretQuestionFavouriteArtist NewAccountMaltainvestSecretQuestion = "Favourite artist"
const NewAccountMaltainvestSecretQuestionFavouriteDish NewAccountMaltainvestSecretQuestion = "Favourite dish"
const NewAccountMaltainvestSecretQuestionMemorableDate NewAccountMaltainvestSecretQuestion = "Memorable date"
const NewAccountMaltainvestSecretQuestionMemorableTownCity NewAccountMaltainvestSecretQuestion = "Memorable town/city"
const NewAccountMaltainvestSecretQuestionMotherSMaidenName NewAccountMaltainvestSecretQuestion = "Mother's maiden name"
const NewAccountMaltainvestSecretQuestionNameOfFirstLove NewAccountMaltainvestSecretQuestion = "Name of first love"
const NewAccountMaltainvestSecretQuestionNameOfYourPet NewAccountMaltainvestSecretQuestion = "Name of your pet"

func (*NewAccountMaltainvestSecretQuestion) UnmarshalJSON ¶

func (j *NewAccountMaltainvestSecretQuestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestSourceOfExperience ¶

type NewAccountMaltainvestSourceOfExperience string
const NewAccountMaltainvestSourceOfExperienceIHaveAnAcademicDegreeProfessionalCertificationAndOrWorkExperience NewAccountMaltainvestSourceOfExperience = "I have an academic degree, professional certification, and/or work experience."
const NewAccountMaltainvestSourceOfExperienceIHaveAttendedSeminarsTrainingAndOrWorkshops NewAccountMaltainvestSourceOfExperience = "I have attended seminars, training, and/or workshops."
const NewAccountMaltainvestSourceOfExperienceIHaveLittleExperience NewAccountMaltainvestSourceOfExperience = "I have little experience."
const NewAccountMaltainvestSourceOfExperienceIHaveNoKnowledge NewAccountMaltainvestSourceOfExperience = "I have no knowledge."
const NewAccountMaltainvestSourceOfExperienceITradeForexCFDsAndOtherComplexFinancialInstruments NewAccountMaltainvestSourceOfExperience = "I trade forex CFDs and other complex financial instruments."

func (*NewAccountMaltainvestSourceOfExperience) UnmarshalJSON ¶

func (j *NewAccountMaltainvestSourceOfExperience) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestTinSkipped ¶ added in v0.5.7

type NewAccountMaltainvestTinSkipped int

func (*NewAccountMaltainvestTinSkipped) UnmarshalJSON ¶ added in v0.5.7

func (j *NewAccountMaltainvestTinSkipped) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestTncAcceptance ¶ added in v0.5.5

type NewAccountMaltainvestTncAcceptance int

func (*NewAccountMaltainvestTncAcceptance) UnmarshalJSON ¶ added in v0.5.5

func (j *NewAccountMaltainvestTncAcceptance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestTradingExperienceFinancialInstruments ¶

type NewAccountMaltainvestTradingExperienceFinancialInstruments string
const NewAccountMaltainvestTradingExperienceFinancialInstrumentsA12Years NewAccountMaltainvestTradingExperienceFinancialInstruments = "1 - 2 years"
const NewAccountMaltainvestTradingExperienceFinancialInstrumentsLessThanAYear NewAccountMaltainvestTradingExperienceFinancialInstruments = "Less than a year"
const NewAccountMaltainvestTradingExperienceFinancialInstrumentsNoExperience NewAccountMaltainvestTradingExperienceFinancialInstruments = "No experience"
const NewAccountMaltainvestTradingExperienceFinancialInstrumentsOver3Years NewAccountMaltainvestTradingExperienceFinancialInstruments = "Over 3 years"

func (*NewAccountMaltainvestTradingExperienceFinancialInstruments) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountMaltainvestTradingFrequencyFinancialInstruments ¶

type NewAccountMaltainvestTradingFrequencyFinancialInstruments string
const NewAccountMaltainvestTradingFrequencyFinancialInstrumentsA1139TransactionsInThePast12Months NewAccountMaltainvestTradingFrequencyFinancialInstruments = "11 - 39 transactions in the past 12 months"
const NewAccountMaltainvestTradingFrequencyFinancialInstrumentsA15TransactionsInThePast12Months NewAccountMaltainvestTradingFrequencyFinancialInstruments = "1 - 5 transactions in the past 12 months"
const NewAccountMaltainvestTradingFrequencyFinancialInstrumentsA40TransactionsOrMoreInThePast12Months NewAccountMaltainvestTradingFrequencyFinancialInstruments = "40 transactions or more in the past 12 months"
const NewAccountMaltainvestTradingFrequencyFinancialInstrumentsA610TransactionsInThePast12Months NewAccountMaltainvestTradingFrequencyFinancialInstruments = "6 - 10 transactions in the past 12 months"
const NewAccountMaltainvestTradingFrequencyFinancialInstrumentsNoTransactionsInThePast12Months NewAccountMaltainvestTradingFrequencyFinancialInstruments = "No transactions in the past 12 months"

func (*NewAccountMaltainvestTradingFrequencyFinancialInstruments) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountReal ¶

type NewAccountReal struct {
	// [Optional] Purpose and reason for requesting the account opening.
	AccountOpeningReason *NewAccountRealAccountOpeningReason `json:"account_opening_reason,omitempty"`

	// [Optional] The anticipated account turnover.
	AccountTurnover *NewAccountRealAccountTurnover `json:"account_turnover,omitempty"`

	// [Optional] Within 100 characters.
	AddressCity *string `json:"address_city,omitempty"`

	// Within 70 characters, with no leading whitespaces and may contain
	// letters/numbers and/or any of following characters '.,:;()@#/-
	AddressLine1 *string `json:"address_line_1,omitempty"`

	// [Optional] Within 70 characters.
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// [Optional] Within 20 characters and may not contain '+'.
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// [Optional] Possible value receive from `states_list` call.
	AddressState *string `json:"address_state,omitempty"`

	// [Optional] Affiliate token, within 32 characters.
	AffiliateToken *string `json:"affiliate_token,omitempty"`

	// [Optional] The phone's calling country code. Don't include the `+` sign. Up to
	// 4 digits.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// [Optional] Country of legal citizenship, 2-letter country code.
	Citizen *string `json:"citizen,omitempty"`

	// [Optional] Indicates whether this is for a client requesting an account with
	// professional status.
	ClientType NewAccountRealClientType `json:"client_type,omitempty"`

	// [Optional] To set currency of the account. List of supported currencies can be
	// acquired with `payout_currencies` call.
	Currency *string `json:"currency,omitempty"`

	// Date of birth format: `yyyy-mm-dd`.
	DateOfBirth *string `json:"date_of_birth,omitempty"`

	// Employment Status.
	EmploymentStatus *string `json:"employment_status,omitempty"`

	// [Optional] Indicates client's self-declaration of FATCA.
	FatcaDeclaration *NewAccountRealFatcaDeclaration `json:"fatca_declaration,omitempty"`

	// [Optional] The version of the financial information form.
	FinancialInformationVersion *string `json:"financial_information_version,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	FirstName *string `json:"first_name,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	LastName *string `json:"last_name,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	NewAccountReal NewAccountRealNewAccountReal `json:"new_account_real"`

	// [Optional] Indicates client's self-declaration of not being a PEP/RCA
	// (Politically Exposed Person/Relatives and Close Associates).
	NonPepDeclaration *int `json:"non_pep_declaration,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewAccountRealPassthrough `json:"passthrough,omitempty"`

	// [Optional] The phone's national format, don't include the `+` sign nor the
	// calling country code. Up to 15 digits are allowed.
	Phone *string `json:"phone,omitempty"`

	// [Optional] Place of birth, 2-letter country code.
	PlaceOfBirth *string `json:"place_of_birth,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// 2-letter country code, possible value receive from `residence_list` call.
	Residence *string `json:"residence,omitempty"`

	// [Optional] Accept any value in enum list.
	Salutation *NewAccountRealSalutation `json:"salutation,omitempty"`

	// [Optional] Answer to secret question, within 4-50 characters. Required for new
	// account and existing client details will be used if client open another
	// account.
	SecretAnswer *string `json:"secret_answer,omitempty"`

	// [Optional] Accept any value in enum list. Required for new account and existing
	// client details will be used if client open another account.
	SecretQuestion *NewAccountRealSecretQuestion `json:"secret_question,omitempty"`

	// [Optional] Tax identification number. Only applicable for real money account.
	// Required for `maltainvest` landing company.
	TaxIdentificationNumber *string `json:"tax_identification_number,omitempty"`

	// [Optional] Residence for tax purpose. Comma separated iso country code if
	// multiple jurisdictions. Only applicable for real money account. Required for
	// `maltainvest` landing company.
	TaxResidence *string `json:"tax_residence,omitempty"`

	// [Optional] Whether the client has skipped the TIN form. Only applicable for
	// real money account.
	TinSkipped *NewAccountRealTinSkipped `json:"tin_skipped,omitempty"`

	// The tnc acceptance status of the user.
	TncAcceptance *NewAccountRealTncAcceptance `json:"tnc_acceptance,omitempty"`
}

This call opens a new real-money account. This call can be made from a virtual-money or a real-money account. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.

func (*NewAccountReal) UnmarshalJSON ¶

func (j *NewAccountReal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealAccountOpeningReason ¶

type NewAccountRealAccountOpeningReason string
const NewAccountRealAccountOpeningReasonAdditionalRevenue NewAccountRealAccountOpeningReason = "Additional revenue"
const NewAccountRealAccountOpeningReasonHedging NewAccountRealAccountOpeningReason = "Hedging"
const NewAccountRealAccountOpeningReasonIncomeEarning NewAccountRealAccountOpeningReason = "Income Earning"
const NewAccountRealAccountOpeningReasonPeerToPeerExchange NewAccountRealAccountOpeningReason = "Peer-to-peer exchange"
const NewAccountRealAccountOpeningReasonSavings NewAccountRealAccountOpeningReason = "Savings"
const NewAccountRealAccountOpeningReasonSpeculative NewAccountRealAccountOpeningReason = "Speculative"

func (*NewAccountRealAccountOpeningReason) UnmarshalJSON ¶

func (j *NewAccountRealAccountOpeningReason) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealAccountTurnover ¶

type NewAccountRealAccountTurnover string
const NewAccountRealAccountTurnoverA100001500000 NewAccountRealAccountTurnover = "$100,001 - $500,000"
const NewAccountRealAccountTurnoverA2500050000 NewAccountRealAccountTurnover = "$25,000 - $50,000"
const NewAccountRealAccountTurnoverA50001100000 NewAccountRealAccountTurnover = "$50,001 - $100,000"
const NewAccountRealAccountTurnoverLessThan25000 NewAccountRealAccountTurnover = "Less than $25,000"
const NewAccountRealAccountTurnoverOver500000 NewAccountRealAccountTurnover = "Over $500,000"

func (*NewAccountRealAccountTurnover) UnmarshalJSON ¶

func (j *NewAccountRealAccountTurnover) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealClientType ¶

type NewAccountRealClientType string
const NewAccountRealClientTypeProfessional NewAccountRealClientType = "professional"
const NewAccountRealClientTypeRetail NewAccountRealClientType = "retail"

func (*NewAccountRealClientType) UnmarshalJSON ¶

func (j *NewAccountRealClientType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealFatcaDeclaration ¶ added in v0.4.19

type NewAccountRealFatcaDeclaration int

func (*NewAccountRealFatcaDeclaration) UnmarshalJSON ¶ added in v0.4.19

func (j *NewAccountRealFatcaDeclaration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealNewAccountReal ¶

type NewAccountRealNewAccountReal int

func (*NewAccountRealNewAccountReal) UnmarshalJSON ¶

func (j *NewAccountRealNewAccountReal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealPassthrough ¶

type NewAccountRealPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewAccountRealResp ¶

type NewAccountRealResp struct {
	// Echo of the request made.
	EchoReq NewAccountRealRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewAccountRealRespMsgType `json:"msg_type"`

	// New real money account details
	NewAccountReal *NewAccountRealRespNewAccountReal `json:"new_account_real,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create real account Receive

func (*NewAccountRealResp) UnmarshalJSON ¶

func (j *NewAccountRealResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealRespEchoReq ¶

type NewAccountRealRespEchoReq map[string]interface{}

Echo of the request made.

type NewAccountRealRespMsgType ¶

type NewAccountRealRespMsgType string
const NewAccountRealRespMsgTypeNewAccountReal NewAccountRealRespMsgType = "new_account_real"

func (*NewAccountRealRespMsgType) UnmarshalJSON ¶

func (j *NewAccountRealRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealRespNewAccountReal ¶

type NewAccountRealRespNewAccountReal struct {
	// Client ID of new real money account
	ClientId string `json:"client_id"`

	// Currency of an account
	Currency *string `json:"currency,omitempty"`

	// Currency type against the currency
	CurrencyType *string `json:"currency_type,omitempty"`

	// Landing company full name
	LandingCompany string `json:"landing_company"`

	// Landing company shortcode
	LandingCompanyShort *string `json:"landing_company_short,omitempty"`

	// Landing company shortcode
	LandingCompanyShortcode *string `json:"landing_company_shortcode,omitempty"`

	// OAuth token for client's login session
	OauthToken string `json:"oauth_token"`
}

New real money account details

func (*NewAccountRealRespNewAccountReal) UnmarshalJSON ¶

func (j *NewAccountRealRespNewAccountReal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealSalutation ¶

type NewAccountRealSalutation string
const NewAccountRealSalutationMiss NewAccountRealSalutation = "Miss"
const NewAccountRealSalutationMr NewAccountRealSalutation = "Mr"
const NewAccountRealSalutationMrs NewAccountRealSalutation = "Mrs"
const NewAccountRealSalutationMs NewAccountRealSalutation = "Ms"

func (*NewAccountRealSalutation) UnmarshalJSON ¶

func (j *NewAccountRealSalutation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealSecretQuestion ¶

type NewAccountRealSecretQuestion string
const NewAccountRealSecretQuestionBrandOfFirstCar NewAccountRealSecretQuestion = "Brand of first car"
const NewAccountRealSecretQuestionFavouriteArtist NewAccountRealSecretQuestion = "Favourite artist"
const NewAccountRealSecretQuestionFavouriteDish NewAccountRealSecretQuestion = "Favourite dish"
const NewAccountRealSecretQuestionMemorableDate NewAccountRealSecretQuestion = "Memorable date"
const NewAccountRealSecretQuestionMemorableTownCity NewAccountRealSecretQuestion = "Memorable town/city"
const NewAccountRealSecretQuestionMotherSMaidenName NewAccountRealSecretQuestion = "Mother's maiden name"
const NewAccountRealSecretQuestionNameOfFirstLove NewAccountRealSecretQuestion = "Name of first love"
const NewAccountRealSecretQuestionNameOfYourPet NewAccountRealSecretQuestion = "Name of your pet"

func (*NewAccountRealSecretQuestion) UnmarshalJSON ¶

func (j *NewAccountRealSecretQuestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealTinSkipped ¶ added in v0.5.7

type NewAccountRealTinSkipped int

func (*NewAccountRealTinSkipped) UnmarshalJSON ¶ added in v0.5.7

func (j *NewAccountRealTinSkipped) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountRealTncAcceptance ¶ added in v0.5.5

type NewAccountRealTncAcceptance int

func (*NewAccountRealTncAcceptance) UnmarshalJSON ¶ added in v0.5.5

func (j *NewAccountRealTncAcceptance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtual ¶

type NewAccountVirtual struct {
	// [Optional] Affiliate token, within 100 characters.
	AffiliateToken *string `json:"affiliate_token,omitempty"`

	// Password (Accepts any printable ASCII character. Must be within 8-25
	// characters, and include numbers, lowercase and uppercase letters. Must not be
	// the same as the user's email address).
	ClientPassword *string `json:"client_password,omitempty"`

	// [Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.
	DateFirstContact *string `json:"date_first_contact,omitempty"`

	// [Optional] Email address for signup.
	Email *string `json:"email,omitempty"`

	// [Optional] Boolean value: 1 or 0, indicating whether the client has given
	// consent for marketing emails.
	EmailConsent *NewAccountVirtualEmailConsent `json:"email_consent,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	NewAccountVirtual NewAccountVirtualNewAccountVirtual `json:"new_account_virtual"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewAccountVirtualPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// 2-letter country code (obtained from `residence_list` call).
	Residence *string `json:"residence,omitempty"`

	// [Optional] Show whether user has used mobile or desktop.
	SignupDevice *NewAccountVirtualSignupDevice `json:"signup_device,omitempty"`

	// Account type
	Type NewAccountVirtualType `json:"type,omitempty"`

	// [Optional] Identifier of particular ad. Value must match Regex pattern to be
	// recorded
	UtmAdId interface{} `json:"utm_ad_id,omitempty"`

	// [Optional] Identifier of ad group in the campaign. Value must match Regex
	// pattern to be recorded
	UtmAdgroupId interface{} `json:"utm_adgroup_id,omitempty"`

	// [Optional] Unique identifier of click on AdRoll ads platform. Value must match
	// Regex pattern to be recorded
	UtmAdrollclkId interface{} `json:"utm_adrollclk_id,omitempty"`

	// [Optional] Identifies a specific product promotion or strategic campaign such
	// as a spring sale or other promotions. Value must match Regex pattern to be
	// recorded
	UtmCampaign interface{} `json:"utm_campaign,omitempty"`

	// [Optional] Identifier of paid ad campaign. Value must match Regex pattern to be
	// recorded
	UtmCampaignId interface{} `json:"utm_campaign_id,omitempty"`

	// [Optional] Used to differentiate similar content, or links within the same ad.
	// Value must match Regex pattern to be recorded
	UtmContent interface{} `json:"utm_content,omitempty"`

	// [Optional] Unique identifier of click on Facebook ads platform. Value must
	// match Regex pattern to be recorded
	UtmFbclId interface{} `json:"utm_fbcl_id,omitempty"`

	// [Optional] Unique visitor identifier on Google Ads platform. Value must match
	// Regex pattern to be recorded
	UtmGlClientId interface{} `json:"utm_gl_client_id,omitempty"`

	// [Optional] Identifies the medium the link was used upon such as: email, CPC, or
	// other methods of sharing. Value must match Regex pattern to be recorded
	UtmMedium interface{} `json:"utm_medium,omitempty"`

	// [Optional] Unique click identifier on Microsoft Bing ads platform. Value must
	// match Regex pattern to be recorded
	UtmMsclkId interface{} `json:"utm_msclk_id,omitempty"`

	// [Optional] Identifies the source of traffic such as: search engine, newsletter,
	// or other referral. Value must match Regex pattern to be recorded
	UtmSource interface{} `json:"utm_source,omitempty"`

	// [Optional] Used to send information related to the campaign term like paid
	// search keywords. Value must match Regex pattern to be recorded
	UtmTerm interface{} `json:"utm_term,omitempty"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first).
	VerificationCode *string `json:"verification_code,omitempty"`
}

Create a new virtual-money account.

func (*NewAccountVirtual) UnmarshalJSON ¶

func (j *NewAccountVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualEmailConsent ¶

type NewAccountVirtualEmailConsent int

func (*NewAccountVirtualEmailConsent) UnmarshalJSON ¶

func (j *NewAccountVirtualEmailConsent) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualNewAccountVirtual ¶

type NewAccountVirtualNewAccountVirtual int

func (*NewAccountVirtualNewAccountVirtual) UnmarshalJSON ¶

func (j *NewAccountVirtualNewAccountVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualPassthrough ¶

type NewAccountVirtualPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewAccountVirtualResp ¶

type NewAccountVirtualResp struct {
	// Echo of the request made.
	EchoReq NewAccountVirtualRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewAccountVirtualRespMsgType `json:"msg_type"`

	// New virtual-money account details
	NewAccountVirtual *NewAccountVirtualRespNewAccountVirtual `json:"new_account_virtual,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create virtual-money account

func (*NewAccountVirtualResp) UnmarshalJSON ¶

func (j *NewAccountVirtualResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualRespEchoReq ¶

type NewAccountVirtualRespEchoReq map[string]interface{}

Echo of the request made.

type NewAccountVirtualRespMsgType ¶

type NewAccountVirtualRespMsgType string
const NewAccountVirtualRespMsgTypeNewAccountVirtual NewAccountVirtualRespMsgType = "new_account_virtual"

func (*NewAccountVirtualRespMsgType) UnmarshalJSON ¶

func (j *NewAccountVirtualRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualRespNewAccountVirtual ¶

type NewAccountVirtualRespNewAccountVirtual struct {
	// Account balance
	Balance float64 `json:"balance"`

	// ID of the new virtual-money account
	ClientId string `json:"client_id"`

	// Account currency
	Currency string `json:"currency"`

	// Currency type against the currency
	CurrencyType *string `json:"currency_type,omitempty"`

	// Email of the new virtual-money account
	Email string `json:"email"`

	// [Optional] One-time code for passwordless login, valid for 1 minute
	LoginCode *string `json:"login_code,omitempty"`

	// Oauth token for the client's login session (so that the user may be logged in
	// immediately)
	OauthToken string `json:"oauth_token"`

	// Refresh token to perform PTA, only for the first ever created account
	RefreshToken *string `json:"refresh_token,omitempty"`

	// Account type
	Type *NewAccountVirtualRespNewAccountVirtualType `json:"type,omitempty"`
}

New virtual-money account details

func (*NewAccountVirtualRespNewAccountVirtual) UnmarshalJSON ¶

func (j *NewAccountVirtualRespNewAccountVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualRespNewAccountVirtualType ¶

type NewAccountVirtualRespNewAccountVirtualType string
const NewAccountVirtualRespNewAccountVirtualTypeTrading NewAccountVirtualRespNewAccountVirtualType = "trading"
const NewAccountVirtualRespNewAccountVirtualTypeWallet NewAccountVirtualRespNewAccountVirtualType = "wallet"

func (*NewAccountVirtualRespNewAccountVirtualType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualSignupDevice ¶

type NewAccountVirtualSignupDevice string
const NewAccountVirtualSignupDeviceDesktop NewAccountVirtualSignupDevice = "desktop"
const NewAccountVirtualSignupDeviceMobile NewAccountVirtualSignupDevice = "mobile"

func (*NewAccountVirtualSignupDevice) UnmarshalJSON ¶

func (j *NewAccountVirtualSignupDevice) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountVirtualType ¶

type NewAccountVirtualType string
const NewAccountVirtualTypeDynamic NewAccountVirtualType = "dynamic"
const NewAccountVirtualTypeTrading NewAccountVirtualType = "trading"
const NewAccountVirtualTypeWallet NewAccountVirtualType = "wallet"

func (*NewAccountVirtualType) UnmarshalJSON ¶

func (j *NewAccountVirtualType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDob struct {
	// Date of birth format: yyyy-mm-dd
	DateOfBirth string `json:"date_of_birth"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	FirstName string `json:"first_name"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	LastName string `json:"last_name"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Set to 1 to check for duplicate name and date of birth.
	NewAccountWalletCheckDuplicateNameAndDob NewAccountWalletCheckDuplicateNameAndDobNewAccountWalletCheckDuplicateNameAndDob `json:"new_account_wallet_check_duplicate_name_and_dob"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewAccountWalletCheckDuplicateNameAndDobPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Check if name and date of birth match an existing account.

func (*NewAccountWalletCheckDuplicateNameAndDob) UnmarshalJSON ¶ added in v0.6.2

func (j *NewAccountWalletCheckDuplicateNameAndDob) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDobNewAccountWalletCheckDuplicateNameAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobNewAccountWalletCheckDuplicateNameAndDob int

func (*NewAccountWalletCheckDuplicateNameAndDobNewAccountWalletCheckDuplicateNameAndDob) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDobPassthrough ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewAccountWalletCheckDuplicateNameAndDobResp ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobResp struct {
	// Echo of the request made.
	EchoReq NewAccountWalletCheckDuplicateNameAndDobRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewAccountWalletCheckDuplicateNameAndDobRespMsgType `json:"msg_type"`

	// The result of checking for duplicate name and date of birth
	NewAccountWalletCheckDuplicateNameAndDob *NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDob `json:"new_account_wallet_check_duplicate_name_and_dob,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Response for checking if name and date of birth match an existing account.

func (*NewAccountWalletCheckDuplicateNameAndDobResp) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDobRespEchoReq ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobRespEchoReq map[string]interface{}

Echo of the request made.

type NewAccountWalletCheckDuplicateNameAndDobRespMsgType ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobRespMsgType string
const NewAccountWalletCheckDuplicateNameAndDobRespMsgTypeNewAccountWalletCheckDuplicateNameAndDob NewAccountWalletCheckDuplicateNameAndDobRespMsgType = "new_account_wallet_check_duplicate_name_and_dob"

func (*NewAccountWalletCheckDuplicateNameAndDobRespMsgType) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDob struct {
	// 1 if a matching account was found, 0 if not
	HasDuplicate NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDobHasDuplicate `json:"has_duplicate"`
}

The result of checking for duplicate name and date of birth

func (*NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDob) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDobHasDuplicate ¶ added in v0.6.2

type NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDobHasDuplicate int

func (*NewAccountWalletCheckDuplicateNameAndDobRespNewAccountWalletCheckDuplicateNameAndDobHasDuplicate) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDob struct {
	// Date of birth format: yyyy-mm-dd
	DateOfBirth string `json:"date_of_birth"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Set to 1 to check for duplicate phone number and date of birth.
	NewAccountWalletCheckDuplicatePhoneAndDob NewAccountWalletCheckDuplicatePhoneAndDobNewAccountWalletCheckDuplicatePhoneAndDob `json:"new_account_wallet_check_duplicate_phone_and_dob"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewAccountWalletCheckDuplicatePhoneAndDobPassthrough `json:"passthrough,omitempty"`

	// Phone number starts with + sign and country code with digits
	PhoneNumber string `json:"phone_number"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Check if name and date of birth match an existing account.

func (*NewAccountWalletCheckDuplicatePhoneAndDob) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDobNewAccountWalletCheckDuplicatePhoneAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobNewAccountWalletCheckDuplicatePhoneAndDob int

func (*NewAccountWalletCheckDuplicatePhoneAndDobNewAccountWalletCheckDuplicatePhoneAndDob) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDobPassthrough ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewAccountWalletCheckDuplicatePhoneAndDobResp ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobResp struct {
	// Echo of the request made.
	EchoReq NewAccountWalletCheckDuplicatePhoneAndDobRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewAccountWalletCheckDuplicatePhoneAndDobRespMsgType `json:"msg_type"`

	// The result of checking for duplicate name and date of birth
	NewAccountWalletCheckDuplicatePhoneAndDob *NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDob `json:"new_account_wallet_check_duplicate_phone_and_dob,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Response for checking if name and date of birth match an existing account.

func (*NewAccountWalletCheckDuplicatePhoneAndDobResp) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDobRespEchoReq ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobRespEchoReq map[string]interface{}

Echo of the request made.

type NewAccountWalletCheckDuplicatePhoneAndDobRespMsgType ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobRespMsgType string
const NewAccountWalletCheckDuplicatePhoneAndDobRespMsgTypeNewAccountWalletCheckDuplicatePhoneAndDob NewAccountWalletCheckDuplicatePhoneAndDobRespMsgType = "new_account_wallet_check_duplicate_phone_and_dob"

func (*NewAccountWalletCheckDuplicatePhoneAndDobRespMsgType) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDob ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDob struct {
	// 1 if a matching account was found, 0 if not
	HasDuplicate NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDobHasDuplicate `json:"has_duplicate"`
}

The result of checking for duplicate name and date of birth

func (*NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDob) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDobHasDuplicate ¶ added in v0.6.2

type NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDobHasDuplicate int

func (*NewAccountWalletCheckDuplicatePhoneAndDobRespNewAccountWalletCheckDuplicatePhoneAndDobHasDuplicate) UnmarshalJSON ¶ added in v0.6.2

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccount ¶ added in v0.5.9

type NewPartnerAccount struct {
	// [Optional] The anticipated account turnover.
	AccountTurnover *NewPartnerAccountAccountTurnover `json:"account_turnover,omitempty"`

	// [Optional] Within 100 characters.
	AddressCity *string `json:"address_city,omitempty"`

	// Within 70 characters, with no leading whitespaces and may contain
	// letters/numbers and/or any of following characters '.,:;()@#/-
	AddressLine1 *string `json:"address_line_1,omitempty"`

	// [Optional] Within 70 characters.
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// [Optional] Within 20 characters and may not contain '+'.
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// [Optional] Possible value receive from `states_list` call.
	AddressState *string `json:"address_state,omitempty"`

	// [Optional] The phone's calling country code. Don't include the `+` sign. Up to
	// 4 digits.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// [Optional] Country of legal citizenship, 2-letter country code.
	Citizen *string `json:"citizen,omitempty"`

	// [Optional] Indicates whether this is for a client requesting an account with
	// professional status.
	ClientType NewPartnerAccountClientType `json:"client_type,omitempty"`

	// [Optional] Company name. Only applicable for partners of type company.
	CompanyName *string `json:"company_name,omitempty"`

	// [Optional] Company registration number. Only applicable for partners of type
	// company.
	CompanyRegistrationNo *string `json:"company_registration_no,omitempty"`

	// [Optional] To set currency of the account. List of supported currencies can be
	// acquired with `payout_currencies` call.
	Currency *string `json:"currency,omitempty"`

	// Date of birth format: `yyyy-mm-dd`.
	DateOfBirth *string `json:"date_of_birth,omitempty"`

	// [Optional] Indicates client's self-declaration of FATCA.
	FatcaDeclaration *NewPartnerAccountFatcaDeclaration `json:"fatca_declaration,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	FirstName *string `json:"first_name,omitempty"`

	// [Optional] If specified, will return only the underlyings for the specified
	// landing company.
	LandingCompanyShort *NewPartnerAccountLandingCompanyShort `json:"landing_company_short,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	LastName *string `json:"last_name,omitempty"`

	// [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`
	NewPartnerAccount NewPartnerAccountNewPartnerAccount `json:"new_partner_account"`

	// [Optional] Indicates client's self-declaration of not being a PEP/RCA
	// (Politically Exposed Person/Relatives and Close Associates).
	NonPepDeclaration *int `json:"non_pep_declaration,omitempty"`

	// Defines whether this partner is an individual or a company. Only applicable for
	// partners
	PartnerType NewPartnerAccountPartnerType `json:"partner_type"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough NewPartnerAccountPassthrough `json:"passthrough,omitempty"`

	// [Optional] The phone's national format in 8-35 digits, don't include the `+`
	// sign nor the calling country code.
	Phone *string `json:"phone,omitempty"`

	// [Optional] Name  of the provider platform.
	Provider *NewPartnerAccountProvider `json:"provider,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// 2-letter country code, possible value receive from `residence_list` call.
	Residence *string `json:"residence,omitempty"`

	// [Optional] Accept any value in enum list.
	Salutation *NewPartnerAccountSalutation `json:"salutation,omitempty"`

	// [Optional] Answer to secret question, within 4-50 characters. Required for new
	// account and existing client details will be used if client open another
	// account.
	SecretAnswer *string `json:"secret_answer,omitempty"`

	// [Optional] Accept any value in enum list. Required for new account and existing
	// client details will be used if client open another account.
	SecretQuestion *NewPartnerAccountSecretQuestion `json:"secret_question,omitempty"`

	// Partner's Website URI/Promotional Platform
	Website string `json:"website"`
}

This call opens a new Real-Partner Account

func (*NewPartnerAccount) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccount) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountAccountTurnover ¶ added in v0.5.9

type NewPartnerAccountAccountTurnover string
const NewPartnerAccountAccountTurnoverA100001500000 NewPartnerAccountAccountTurnover = "$100,001 - $500,000"
const NewPartnerAccountAccountTurnoverA2500050000 NewPartnerAccountAccountTurnover = "$25,000 - $50,000"
const NewPartnerAccountAccountTurnoverA50001100000 NewPartnerAccountAccountTurnover = "$50,001 - $100,000"
const NewPartnerAccountAccountTurnoverLessThan25000 NewPartnerAccountAccountTurnover = "Less than $25,000"
const NewPartnerAccountAccountTurnoverOver500000 NewPartnerAccountAccountTurnover = "Over $500,000"

func (*NewPartnerAccountAccountTurnover) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountAccountTurnover) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountClientType ¶ added in v0.5.9

type NewPartnerAccountClientType string
const NewPartnerAccountClientTypeProfessional NewPartnerAccountClientType = "professional"
const NewPartnerAccountClientTypeRetail NewPartnerAccountClientType = "retail"

func (*NewPartnerAccountClientType) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountClientType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountFatcaDeclaration ¶ added in v0.5.9

type NewPartnerAccountFatcaDeclaration int

func (*NewPartnerAccountFatcaDeclaration) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountFatcaDeclaration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountLandingCompanyShort ¶ added in v0.5.9

type NewPartnerAccountLandingCompanyShort string
const NewPartnerAccountLandingCompanyShortMaltainvest NewPartnerAccountLandingCompanyShort = "maltainvest"
const NewPartnerAccountLandingCompanyShortSvg NewPartnerAccountLandingCompanyShort = "svg"

func (*NewPartnerAccountLandingCompanyShort) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountLandingCompanyShort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountNewPartnerAccount ¶ added in v0.5.9

type NewPartnerAccountNewPartnerAccount int

func (*NewPartnerAccountNewPartnerAccount) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountNewPartnerAccount) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountPartnerType ¶ added in v0.5.9

type NewPartnerAccountPartnerType string
const NewPartnerAccountPartnerTypeCompany NewPartnerAccountPartnerType = "company"
const NewPartnerAccountPartnerTypeIndividual NewPartnerAccountPartnerType = "individual"

func (*NewPartnerAccountPartnerType) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountPartnerType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountPassthrough ¶ added in v0.5.9

type NewPartnerAccountPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type NewPartnerAccountProvider ¶ added in v0.5.9

type NewPartnerAccountProvider string
const NewPartnerAccountProviderDynamicworks NewPartnerAccountProvider = "dynamicworks"
const NewPartnerAccountProviderMyaffiliate NewPartnerAccountProvider = "myaffiliate"

func (*NewPartnerAccountProvider) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountProvider) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountResp ¶ added in v0.5.9

type NewPartnerAccountResp struct {
	// Echo of the request made.
	EchoReq NewPartnerAccountRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType NewPartnerAccountRespMsgType `json:"msg_type"`

	// New real partner account details
	NewPartnerAccount *NewPartnerAccountRespNewPartnerAccount `json:"new_partner_account,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create real partner account - Receive

func (*NewPartnerAccountResp) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountRespEchoReq ¶ added in v0.5.9

type NewPartnerAccountRespEchoReq map[string]interface{}

Echo of the request made.

type NewPartnerAccountRespMsgType ¶ added in v0.5.9

type NewPartnerAccountRespMsgType string
const NewPartnerAccountRespMsgTypeNewPartnerAccount NewPartnerAccountRespMsgType = "new_partner_account"

func (*NewPartnerAccountRespMsgType) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountRespNewPartnerAccount ¶ added in v0.5.9

type NewPartnerAccountRespNewPartnerAccount struct {
	// Client ID of new real partner account
	ClientId string `json:"client_id"`

	// Currency of an account
	Currency *string `json:"currency,omitempty"`

	// Currency type against the currency
	CurrencyType *string `json:"currency_type,omitempty"`

	// Landing company full name
	LandingCompany string `json:"landing_company"`

	// Landing company shortcode
	LandingCompanyShortcode *string `json:"landing_company_shortcode,omitempty"`

	// OAuth token for client's login session
	OauthToken string `json:"oauth_token"`
}

New real partner account details

func (*NewPartnerAccountRespNewPartnerAccount) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountRespNewPartnerAccount) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountSalutation ¶ added in v0.5.9

type NewPartnerAccountSalutation string
const NewPartnerAccountSalutationMiss NewPartnerAccountSalutation = "Miss"
const NewPartnerAccountSalutationMr NewPartnerAccountSalutation = "Mr"
const NewPartnerAccountSalutationMrs NewPartnerAccountSalutation = "Mrs"
const NewPartnerAccountSalutationMs NewPartnerAccountSalutation = "Ms"

func (*NewPartnerAccountSalutation) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountSalutation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type NewPartnerAccountSecretQuestion ¶ added in v0.5.9

type NewPartnerAccountSecretQuestion string
const NewPartnerAccountSecretQuestionBrandOfFirstCar NewPartnerAccountSecretQuestion = "Brand of first car"
const NewPartnerAccountSecretQuestionFavouriteArtist NewPartnerAccountSecretQuestion = "Favourite artist"
const NewPartnerAccountSecretQuestionFavouriteDish NewPartnerAccountSecretQuestion = "Favourite dish"
const NewPartnerAccountSecretQuestionMemorableDate NewPartnerAccountSecretQuestion = "Memorable date"
const NewPartnerAccountSecretQuestionMemorableTownCity NewPartnerAccountSecretQuestion = "Memorable town/city"
const NewPartnerAccountSecretQuestionMotherSMaidenName NewPartnerAccountSecretQuestion = "Mother's maiden name"
const NewPartnerAccountSecretQuestionNameOfFirstLove NewPartnerAccountSecretQuestion = "Name of first love"
const NewPartnerAccountSecretQuestionNameOfYourPet NewPartnerAccountSecretQuestion = "Name of your pet"

func (*NewPartnerAccountSecretQuestion) UnmarshalJSON ¶ added in v0.5.9

func (j *NewPartnerAccountSecretQuestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthApps ¶

type OauthApps struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	OauthApps OauthAppsOauthApps `json:"oauth_apps"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough OauthAppsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

List all my used OAuth applications.

func (*OauthApps) UnmarshalJSON ¶

func (j *OauthApps) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthAppsOauthApps ¶

type OauthAppsOauthApps int

func (*OauthAppsOauthApps) UnmarshalJSON ¶

func (j *OauthAppsOauthApps) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthAppsPassthrough ¶

type OauthAppsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type OauthAppsResp ¶

type OauthAppsResp struct {
	// Echo of the request made.
	EchoReq OauthAppsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType OauthAppsRespMsgType `json:"msg_type"`

	// List of 3rd party OAuth applications that used for the authorized account.
	OauthApps []OauthAppsRespOauthAppsElem `json:"oauth_apps,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with used applications

func (*OauthAppsResp) UnmarshalJSON ¶

func (j *OauthAppsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthAppsRespEchoReq ¶

type OauthAppsRespEchoReq map[string]interface{}

Echo of the request made.

type OauthAppsRespMsgType ¶

type OauthAppsRespMsgType string
const OauthAppsRespMsgTypeOauthApps OauthAppsRespMsgType = "oauth_apps"

func (*OauthAppsRespMsgType) UnmarshalJSON ¶

func (j *OauthAppsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthAppsRespOauthAppsElem ¶

type OauthAppsRespOauthAppsElem struct {
	// Application ID.
	AppId int `json:"app_id"`

	// Markup added to contract prices (as a percentage of contract payout)
	AppMarkupPercentage float64 `json:"app_markup_percentage"`

	// The last date which the application has been used.
	LastUsed *string `json:"last_used"`

	// Application name
	Name string `json:"name"`

	// Boolean value: 1 or 0, indicating 1 if app is an official app and 0 incase of
	// unofficial app
	Official OauthAppsRespOauthAppsElemOfficial `json:"official"`

	// The list of permission scopes grant for each app.
	Scopes []string `json:"scopes"`
}

func (*OauthAppsRespOauthAppsElem) UnmarshalJSON ¶

func (j *OauthAppsRespOauthAppsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OauthAppsRespOauthAppsElemOfficial ¶

type OauthAppsRespOauthAppsElemOfficial int

func (*OauthAppsRespOauthAppsElemOfficial) UnmarshalJSON ¶

func (j *OauthAppsRespOauthAppsElemOfficial) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreate ¶

type P2PAdvertCreate struct {
	// The total amount of the advert, in advertiser's account currency.
	Amount float64 `json:"amount"`

	// [Optional] Indicates if this is block trade ad or not. Default: 0.
	BlockTrade P2PAdvertCreateBlockTrade `json:"block_trade,omitempty"`

	// [Optional] Advertiser contact information.
	ContactInfo *string `json:"contact_info,omitempty"`

	// [Optional] General information about the advert.
	Description *string `json:"description,omitempty"`

	// [Optional] 2 letter country codes. Counterparties who do not live in these
	// countries will not be allowed to place orders against the advert.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// [Optional] Local currency for this advert. If not provided, will use the
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Maximum allowed amount for the orders of this advert, in advertiser's
	// `account_currency`. Should be more than or equal to `min_order_amount`
	MaxOrderAmount float64 `json:"max_order_amount"`

	// [Optional] Counterparties who have a 30 day completion rate less than this
	// value will not be allowed to place orders against the advert.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// [Optional] Counterparties who joined less than this number of days ago will not
	// be allowed to place orders against the advert.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum allowed amount for the orders of this advert, in advertiser's
	// `account_currency`. Should be less than or equal to `max_order_amount`.
	MinOrderAmount float64 `json:"min_order_amount"`

	// [Optional] Counterparties who have an average rating less than this value will
	// not be allowed to place orders against the advert.
	MinRating *float64 `json:"min_rating,omitempty"`

	// [Optional] Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod *int `json:"order_expiry_period,omitempty"`

	// Must be 1
	P2PAdvertCreate P2PAdvertCreateP2PAdvertCreate `json:"p2p_advert_create"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertCreatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Payment instructions.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// [Optional] Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method,omitempty"`

	// IDs of previously saved payment methods as returned from
	// p2p_advertiser_payment_methods, only applicable for sell ads.
	PaymentMethodIds []int `json:"payment_method_ids,omitempty"`

	// Payment method identifiers as returned from p2p_payment_methods, only
	// applicable for buy ads.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate float64 `json:"rate"`

	// Type of rate, fixed or floating.
	RateType P2PAdvertCreateRateType `json:"rate_type,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// The advertisement represents the intention to perform this action on your Deriv
	// account funds.
	Type P2PAdvertCreateType `json:"type"`
}

Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.

func (*P2PAdvertCreate) UnmarshalJSON ¶

func (j *P2PAdvertCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateBlockTrade ¶

type P2PAdvertCreateBlockTrade int

func (*P2PAdvertCreateBlockTrade) UnmarshalJSON ¶

func (j *P2PAdvertCreateBlockTrade) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateP2PAdvertCreate ¶

type P2PAdvertCreateP2PAdvertCreate int

func (*P2PAdvertCreateP2PAdvertCreate) UnmarshalJSON ¶

func (j *P2PAdvertCreateP2PAdvertCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreatePassthrough ¶

type P2PAdvertCreatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertCreateRateType ¶

type P2PAdvertCreateRateType string
const P2PAdvertCreateRateTypeFixed P2PAdvertCreateRateType = "fixed"
const P2PAdvertCreateRateTypeFloat P2PAdvertCreateRateType = "float"

func (*P2PAdvertCreateRateType) UnmarshalJSON ¶

func (j *P2PAdvertCreateRateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateResp ¶

type P2PAdvertCreateResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertCreateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertCreateRespMsgType `json:"msg_type"`

	// The information of the created P2P advert.
	P2PAdvertCreate *P2PAdvertCreateRespP2PAdvertCreate `json:"p2p_advert_create,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns the information of the created P2P (Peer to Peer) advert.

func (*P2PAdvertCreateResp) UnmarshalJSON ¶

func (j *P2PAdvertCreateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespEchoReq ¶

type P2PAdvertCreateRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertCreateRespMsgType ¶

type P2PAdvertCreateRespMsgType string
const P2PAdvertCreateRespMsgTypeP2PAdvertCreate P2PAdvertCreateRespMsgType = "p2p_advert_create"

func (*P2PAdvertCreateRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertCreateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreate ¶

type P2PAdvertCreateRespP2PAdvertCreate struct {
	// Currency for this advert. This is the system currency to be transferred between
	// advertiser and client.
	AccountCurrency string `json:"account_currency"`

	// The number of active orders against this advert.
	ActiveOrders int `json:"active_orders"`

	// Details of the advertiser for this advert.
	AdvertiserDetails P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetails `json:"advertiser_details"`

	// The total amount specified in advert, in `account_currency`.
	Amount float64 `json:"amount"`

	// The total amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// Indicates if this is block trade advert or not.
	BlockTrade P2PAdvertCreateRespP2PAdvertCreateBlockTrade `json:"block_trade"`

	// Advertiser contact information. Only applicable for 'sell adverts'.
	ContactInfo *string `json:"contact_info,omitempty"`

	// Type of transaction from the opposite party's perspective.
	CounterpartyType P2PAdvertCreateRespP2PAdvertCreateCounterpartyType `json:"counterparty_type"`

	// The target country code of the advert.
	Country string `json:"country"`

	// The advert creation time in epoch.
	CreatedTime int `json:"created_time"`

	// General information about the advert.
	Description string `json:"description"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable.
	EffectiveRate *float64 `json:"effective_rate"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable, formatted to appropriate decimal places.
	EffectiveRateDisplay *string `json:"effective_rate_display"`

	// 2 letter country codes. Counterparties who do not live in these countries are
	// not allowed to place orders against this advert.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id string `json:"id"`

	// The activation status of the advert.
	IsActive P2PAdvertCreateRespP2PAdvertCreateIsActive `json:"is_active"`

	// Indicates that this advert will appear on the main advert list.
	IsVisible P2PAdvertCreateRespP2PAdvertCreateIsVisible `json:"is_visible"`

	// Local currency for this advert. This is the form of payment to be arranged
	// directly between advertiser and client.
	LocalCurrency string `json:"local_currency"`

	// Maximum order amount specified in advert, in `account_currency`.
	MaxOrderAmount float64 `json:"max_order_amount"`

	// Maximum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountDisplay string `json:"max_order_amount_display"`

	// Maximum order amount at this time, in `account_currency`.
	MaxOrderAmountLimit float64 `json:"max_order_amount_limit"`

	// Maximum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountLimitDisplay string `json:"max_order_amount_limit_display"`

	// Counterparties who have a 30 day completion rate less than this value are not
	// allowed to place orders against this advert.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// Counterparties who joined less than this number of days ago are not allowed to
	// place orders against this advert.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`.
	MinOrderAmount float64 `json:"min_order_amount"`

	// Minimum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountDisplay string `json:"min_order_amount_display"`

	// Minimum order amount at this time, in `account_currency`.
	MinOrderAmountLimit float64 `json:"min_order_amount_limit"`

	// Minimum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountLimitDisplay string `json:"min_order_amount_limit_display"`

	// Counterparties who have an average rating less than this value are not allowed
	// to place orders against this advert.
	MinRating *float64 `json:"min_rating,omitempty"`

	// Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod int `json:"order_expiry_period"`

	// Payment instructions. Only applicable for 'sell adverts'.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method"`

	// Details of available payment methods (sell adverts only).
	PaymentMethodDetails P2PAdvertCreateRespP2PAdvertCreatePaymentMethodDetails `json:"payment_method_details,omitempty"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost of the advert in local currency.
	Price *float64 `json:"price"`

	// Cost of the advert in local currency, formatted to appropriate decimal places.
	PriceDisplay *string `json:"price_display"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate float64 `json:"rate"`

	// Conversion rate formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Type of rate, fixed or floating.
	RateType P2PAdvertCreateRespP2PAdvertCreateRateType `json:"rate_type"`

	// Amount currently available for orders, in `account_currency`.
	RemainingAmount float64 `json:"remaining_amount"`

	// Amount currently available for orders, in `account_currency`, formatted to
	// appropriate decimal places.
	RemainingAmountDisplay string `json:"remaining_amount_display"`

	// The type of advertisement in relation to the advertiser's Deriv account.
	Type P2PAdvertCreateRespP2PAdvertCreateType `json:"type"`

	// Reasons why an advert is not visible. Possible values:
	// - `advert_fixed_rate_disabled`: fixed rate adverts are no longer available in
	// the advert's country.
	// - `advert_float_rate_disabled`: floating rate adverts are no longer available
	// in the advert's country.
	// - `advert_inactive`: the advert is set inactive.
	// - `advert_max_limit`: the minimum order amount exceeds the system maximum
	// order.
	// - `advert_min_limit`: the maximum order amount is too small to be shown on the
	// advert list.
	// - `advert_remaining`: the remaining amount of the advert is below the minimum
	// order.
	// - `advert_no_payment_methods`: the advert has no valid payment methods.
	// - `advertiser_ads_paused`: the advertiser has paused all adverts.
	// - `advertiser_approval`: the advertiser's proof of identity is not verified.
	// - `advertiser_balance`: the advertiser's P2P balance is less than the minimum
	// order.
	// - `advertiser_schedule`: the advertiser's schedule does not have availability
	// between now and now + order_expiry_period.
	// - `advertiser_block_trade_ineligible`: the advertiser is not currently eligible
	// for block trading.
	// - `advertiser_daily_limit`: the advertiser's remaining daily limit is less than
	// the minimum order.
	// - `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.
	VisibilityStatus []P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem `json:"visibility_status,omitempty"`
}

The information of the created P2P advert.

func (*P2PAdvertCreateRespP2PAdvertCreate) UnmarshalJSON ¶

func (j *P2PAdvertCreateRespP2PAdvertCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetails ¶

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetails struct {
	// The total number of orders completed in the past 30 days.
	CompletedOrdersCount int `json:"completed_orders_count"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsOnline `json:"is_online"`

	// Inidcates whether the advertiser's schedule has availability between now and
	// now + order_expiry_period.
	IsScheduleAvailable P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The percentage of successfully completed orders made by or placed against the
	// advertiser within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`
}

Details of the advertiser for this advert.

func (*P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsOnline ¶

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsOnline int

func (*P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsScheduleAvailable int

func (*P2PAdvertCreateRespP2PAdvertCreateAdvertiserDetailsIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateBlockTrade ¶

type P2PAdvertCreateRespP2PAdvertCreateBlockTrade int

func (*P2PAdvertCreateRespP2PAdvertCreateBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateCounterpartyType ¶

type P2PAdvertCreateRespP2PAdvertCreateCounterpartyType string
const P2PAdvertCreateRespP2PAdvertCreateCounterpartyTypeBuy P2PAdvertCreateRespP2PAdvertCreateCounterpartyType = "buy"
const P2PAdvertCreateRespP2PAdvertCreateCounterpartyTypeSell P2PAdvertCreateRespP2PAdvertCreateCounterpartyType = "sell"

func (*P2PAdvertCreateRespP2PAdvertCreateCounterpartyType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateIsActive ¶

type P2PAdvertCreateRespP2PAdvertCreateIsActive int

func (*P2PAdvertCreateRespP2PAdvertCreateIsActive) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateIsVisible ¶

type P2PAdvertCreateRespP2PAdvertCreateIsVisible int

func (*P2PAdvertCreateRespP2PAdvertCreateIsVisible) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreatePaymentMethodDetails ¶

type P2PAdvertCreateRespP2PAdvertCreatePaymentMethodDetails map[string]interface{}

Details of available payment methods (sell adverts only).

type P2PAdvertCreateRespP2PAdvertCreateRateType ¶

type P2PAdvertCreateRespP2PAdvertCreateRateType string
const P2PAdvertCreateRespP2PAdvertCreateRateTypeFixed P2PAdvertCreateRespP2PAdvertCreateRateType = "fixed"
const P2PAdvertCreateRespP2PAdvertCreateRateTypeFloat P2PAdvertCreateRespP2PAdvertCreateRateType = "float"

func (*P2PAdvertCreateRespP2PAdvertCreateRateType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateType ¶

type P2PAdvertCreateRespP2PAdvertCreateType string
const P2PAdvertCreateRespP2PAdvertCreateTypeBuy P2PAdvertCreateRespP2PAdvertCreateType = "buy"
const P2PAdvertCreateRespP2PAdvertCreateTypeSell P2PAdvertCreateRespP2PAdvertCreateType = "sell"

func (*P2PAdvertCreateRespP2PAdvertCreateType) UnmarshalJSON ¶

func (j *P2PAdvertCreateRespP2PAdvertCreateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem ¶

type P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem string
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertFixedRateDisabled P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_fixed_rate_disabled"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertFloatRateDisabled P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_float_rate_disabled"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertInactive P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_inactive"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertMaxLimit P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_max_limit"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertMinLimit P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_min_limit"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertNoPaymentMethods P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_no_payment_methods"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertRemaining P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advert_remaining"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserAdsPaused P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_ads_paused"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserApproval P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_approval"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserBalance P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_balance"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserBlockTradeIneligible P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_block_trade_ineligible"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserDailyLimit P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_daily_limit"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserSchedule P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_schedule"
const P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElemAdvertiserTempBan P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem = "advertiser_temp_ban"

func (*P2PAdvertCreateRespP2PAdvertCreateVisibilityStatusElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertCreateType ¶

type P2PAdvertCreateType string
const P2PAdvertCreateTypeBuy P2PAdvertCreateType = "buy"
const P2PAdvertCreateTypeSell P2PAdvertCreateType = "sell"

func (*P2PAdvertCreateType) UnmarshalJSON ¶

func (j *P2PAdvertCreateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfo ¶

type P2PAdvertInfo struct {
	// [Optional] The unique identifier for this advert. Optional when subscribe is 1.
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PAdvertInfo P2PAdvertInfoP2PAdvertInfo `json:"p2p_advert_info"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertInfoPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates when changes occur. Optional when id
	// is provided.
	Subscribe *P2PAdvertInfoSubscribe `json:"subscribe,omitempty"`

	// [Optional] If set to 1, the maximum order amount will be adjusted to the
	// current balance and turnover limits of the account.
	UseClientLimits P2PAdvertInfoUseClientLimits `json:"use_client_limits,omitempty"`
}

Retrieve information about a P2P advert.

func (*P2PAdvertInfo) UnmarshalJSON ¶

func (j *P2PAdvertInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoP2PAdvertInfo ¶

type P2PAdvertInfoP2PAdvertInfo int

func (*P2PAdvertInfoP2PAdvertInfo) UnmarshalJSON ¶

func (j *P2PAdvertInfoP2PAdvertInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoPassthrough ¶

type P2PAdvertInfoPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertInfoResp ¶

type P2PAdvertInfoResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertInfoRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertInfoRespMsgType `json:"msg_type"`

	// P2P advert information.
	P2PAdvertInfo *P2PAdvertInfoRespP2PAdvertInfo `json:"p2p_advert_info,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2PAdvertInfoRespSubscription `json:"subscription,omitempty"`
}

Returns information about the given advert ID.

func (*P2PAdvertInfoResp) UnmarshalJSON ¶

func (j *P2PAdvertInfoResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespEchoReq ¶

type P2PAdvertInfoRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertInfoRespMsgType ¶

type P2PAdvertInfoRespMsgType string
const P2PAdvertInfoRespMsgTypeP2PAdvertInfo P2PAdvertInfoRespMsgType = "p2p_advert_info"

func (*P2PAdvertInfoRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfo ¶

type P2PAdvertInfoRespP2PAdvertInfo struct {
	// Currency for this advert. This is the system currency to be transferred between
	// advertiser and client.
	AccountCurrency *string `json:"account_currency,omitempty"`

	// The number of active orders against this advert.
	ActiveOrders *int `json:"active_orders,omitempty"`

	// Details of the advertiser for this advert.
	AdvertiserDetails *P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetails `json:"advertiser_details,omitempty"`

	// The total amount specified in advert, in `account_currency`. It is only visible
	// to the advert owner.
	Amount *float64 `json:"amount,omitempty"`

	// The total amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	AmountDisplay *string `json:"amount_display,omitempty"`

	// Indicates if this is block trade advert or not.
	BlockTrade *P2PAdvertInfoRespP2PAdvertInfoBlockTrade `json:"block_trade,omitempty"`

	// Advertiser contact information. Only applicable for 'sell adverts'.
	ContactInfo *string `json:"contact_info,omitempty"`

	// Type of transaction from the opposite party's perspective.
	CounterpartyType *P2PAdvertInfoRespP2PAdvertInfoCounterpartyType `json:"counterparty_type,omitempty"`

	// The target country code of the advert.
	Country *string `json:"country,omitempty"`

	// The advert creation time in epoch.
	CreatedTime *int `json:"created_time,omitempty"`

	// Days until automatic inactivation of this ad, if no activity occurs.
	DaysUntilArchive *int `json:"days_until_archive,omitempty"`

	// Indicates that the advert has been deleted.
	Deleted *P2PAdvertInfoRespP2PAdvertInfoDeleted `json:"deleted,omitempty"`

	// General information about the advert.
	Description *string `json:"description,omitempty"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable.
	EffectiveRate *float64 `json:"effective_rate,omitempty"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable, formatted to appropriate decimal places.
	EffectiveRateDisplay *string `json:"effective_rate_display,omitempty"`

	// Reasons why the counterparty terms do not allow the current user to place
	// orders against this advert. Possible values:
	// - `completion_rate`: current user's 30 day completion rate is less than
	// `min_completion_rate`.
	// - `country`: current user's residence is not in `eligible_countries`.
	// - `join_date`: current user registered on P2P less than `min_join_days` in the
	// past.
	// - `rating`: current user's average review rating is less than `min_rating`.
	EligibilityStatus []P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem `json:"eligibility_status,omitempty"`

	// 2 letter country codes. Counterparties who do not live in these countries are
	// not allowed to place orders against this advert.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id *string `json:"id,omitempty"`

	// The activation status of the advert.
	IsActive *P2PAdvertInfoRespP2PAdvertInfoIsActive `json:"is_active,omitempty"`

	// Inidcates whether the current user's schedule has availability from now until
	// now + order_expiry_period.
	IsClientScheduleAvailable *P2PAdvertInfoRespP2PAdvertInfoIsClientScheduleAvailable `json:"is_client_schedule_available,omitempty"`

	// Indicates that the current user meets the counterparty terms for placing orders
	// against this advert.
	IsEligible P2PAdvertInfoRespP2PAdvertInfoIsEligible `json:"is_eligible,omitempty"`

	// Indicates that this advert will appear on the main advert list.
	IsVisible P2PAdvertInfoRespP2PAdvertInfoIsVisible `json:"is_visible,omitempty"`

	// Local currency for this advert. This is the form of payment to be arranged
	// directly between advertiser and client.
	LocalCurrency *string `json:"local_currency,omitempty"`

	// Maximum order amount specified in advert, in `account_currency`. It is only
	// visible for advertisers.
	MaxOrderAmount *float64 `json:"max_order_amount,omitempty"`

	// Maximum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	MaxOrderAmountDisplay *string `json:"max_order_amount_display,omitempty"`

	// Maximum order amount at this time, in `account_currency`.
	MaxOrderAmountLimit *float64 `json:"max_order_amount_limit,omitempty"`

	// Maximum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountLimitDisplay *string `json:"max_order_amount_limit_display,omitempty"`

	// Counterparties who have a 30 day completion rate less than this value are not
	// allowed to place orders against this advert.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// Counterparties who joined less than this number of days ago are not allowed to
	// place orders against this advert.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`. It is only
	// visible for advertisers.
	MinOrderAmount *float64 `json:"min_order_amount,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	MinOrderAmountDisplay *string `json:"min_order_amount_display,omitempty"`

	// Minimum order amount at this time, in `account_currency`.
	MinOrderAmountLimit *float64 `json:"min_order_amount_limit,omitempty"`

	// Minimum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountLimitDisplay *string `json:"min_order_amount_limit_display,omitempty"`

	// Counterparties who have an average rating less than this value are not allowed
	// to place orders against this advert.
	MinRating *float64 `json:"min_rating,omitempty"`

	// Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod *int `json:"order_expiry_period,omitempty"`

	// Payment instructions. Only applicable for 'sell adverts'.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Details of available payment methods (sell adverts only).
	PaymentMethodDetails P2PAdvertInfoRespP2PAdvertInfoPaymentMethodDetails `json:"payment_method_details,omitempty"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost of the advert in local currency.
	Price *float64 `json:"price,omitempty"`

	// Cost of the advert in local currency, formatted to appropriate decimal places.
	PriceDisplay *string `json:"price_display,omitempty"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate *float64 `json:"rate,omitempty"`

	// Conversion rate formatted to appropriate decimal places.
	RateDisplay *string `json:"rate_display,omitempty"`

	// Type of rate, fixed or floating.
	RateType *P2PAdvertInfoRespP2PAdvertInfoRateType `json:"rate_type,omitempty"`

	// Amount currently available for orders, in `account_currency`. It is only
	// visible for advertisers.
	RemainingAmount *float64 `json:"remaining_amount,omitempty"`

	// Amount currently available for orders, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	RemainingAmountDisplay *string `json:"remaining_amount_display,omitempty"`

	// Whether this is a buy or a sell.
	Type *P2PAdvertInfoRespP2PAdvertInfoType `json:"type,omitempty"`

	// Reasons why an advert is not visible. Possible values:
	// - `advert_fixed_rate_disabled`: fixed rate adverts are no longer available in
	// the advert's country.
	// - `advert_float_rate_disabled`: floating rate adverts are no longer available
	// in the advert's country.
	// - `advert_inactive`: the advert is set inactive.
	// - `advert_max_limit`: the minimum order amount exceeds the system maximum
	// order.
	// - `advert_min_limit`: the maximum order amount is too small to be shown on the
	// advert list.
	// - `advert_remaining`: the remaining amount of the advert is below the minimum
	// order.
	// - `advert_no_payment_methods`: the advert has no valid payment methods.
	// - `advertiser_ads_paused`: the advertiser has paused all adverts.
	// - `advertiser_approval`: the advertiser's proof of identity is not verified.
	// - `advertiser_balance`: the advertiser's P2P balance is less than the minimum
	// order.
	// - `advertiser_schedule`: the advertiser's schedule does not have availability
	// between now and now + order_expiry_period.
	// - `advertiser_block_trade_ineligible`: the advertiser is not currently eligible
	// for block trading.
	// - `advertiser_daily_limit`: the advertiser's remaining daily limit is less than
	// the minimum order.
	// - `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.
	VisibilityStatus []P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem `json:"visibility_status,omitempty"`
}

P2P advert information.

func (*P2PAdvertInfoRespP2PAdvertInfo) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetails ¶

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetails struct {
	// The total number of orders completed in the past 30 days.
	CompletedOrdersCount int `json:"completed_orders_count"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates that the advertiser is blocked by the current user.
	IsBlocked *P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsBlocked `json:"is_blocked,omitempty"`

	// Indicates that the advertiser is a favourite of the current user.
	IsFavourite *P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsFavourite `json:"is_favourite,omitempty"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsOnline `json:"is_online"`

	// Indicates that the advertiser was recommended in the most recent review by the
	// current user.
	IsRecommended *P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsRecommended `json:"is_recommended,omitempty"`

	// Inidcates whether the advertiser's schedule has availability between now and
	// now + order_expiry_period.
	IsScheduleAvailable P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The percentage of successfully completed orders made by or placed against the
	// advertiser within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`
}

Details of the advertiser for this advert.

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsBlocked ¶

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsBlocked int

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsBlocked) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsFavourite ¶

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsFavourite int

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsFavourite) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsOnline ¶

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsOnline int

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsRecommended ¶

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsRecommended struct {
	Value interface{}
}

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsScheduleAvailable int

func (*P2PAdvertInfoRespP2PAdvertInfoAdvertiserDetailsIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoBlockTrade ¶

type P2PAdvertInfoRespP2PAdvertInfoBlockTrade int

func (*P2PAdvertInfoRespP2PAdvertInfoBlockTrade) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoBlockTrade) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoCounterpartyType ¶

type P2PAdvertInfoRespP2PAdvertInfoCounterpartyType string
const P2PAdvertInfoRespP2PAdvertInfoCounterpartyTypeBuy P2PAdvertInfoRespP2PAdvertInfoCounterpartyType = "buy"
const P2PAdvertInfoRespP2PAdvertInfoCounterpartyTypeSell P2PAdvertInfoRespP2PAdvertInfoCounterpartyType = "sell"

func (*P2PAdvertInfoRespP2PAdvertInfoCounterpartyType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoDeleted ¶

type P2PAdvertInfoRespP2PAdvertInfoDeleted int

func (*P2PAdvertInfoRespP2PAdvertInfoDeleted) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoDeleted) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem ¶ added in v0.4.15

type P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem string
const P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElemCompletionRate P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem = "completion_rate"
const P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElemCountry P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem = "country"
const P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElemJoinDate P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem = "join_date"
const P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElemRatingAverage P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem = "rating_average"

func (*P2PAdvertInfoRespP2PAdvertInfoEligibilityStatusElem) UnmarshalJSON ¶ added in v0.4.15

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoIsActive ¶

type P2PAdvertInfoRespP2PAdvertInfoIsActive int

func (*P2PAdvertInfoRespP2PAdvertInfoIsActive) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoIsActive) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoIsClientScheduleAvailable ¶ added in v0.5.0

type P2PAdvertInfoRespP2PAdvertInfoIsClientScheduleAvailable int

func (*P2PAdvertInfoRespP2PAdvertInfoIsClientScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoIsEligible ¶ added in v0.4.15

type P2PAdvertInfoRespP2PAdvertInfoIsEligible int

func (*P2PAdvertInfoRespP2PAdvertInfoIsEligible) UnmarshalJSON ¶ added in v0.4.15

func (j *P2PAdvertInfoRespP2PAdvertInfoIsEligible) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoIsVisible ¶

type P2PAdvertInfoRespP2PAdvertInfoIsVisible int

func (*P2PAdvertInfoRespP2PAdvertInfoIsVisible) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoIsVisible) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoPaymentMethodDetails ¶

type P2PAdvertInfoRespP2PAdvertInfoPaymentMethodDetails map[string]interface{}

Details of available payment methods (sell adverts only).

type P2PAdvertInfoRespP2PAdvertInfoRateType ¶

type P2PAdvertInfoRespP2PAdvertInfoRateType string
const P2PAdvertInfoRespP2PAdvertInfoRateTypeFixed P2PAdvertInfoRespP2PAdvertInfoRateType = "fixed"
const P2PAdvertInfoRespP2PAdvertInfoRateTypeFloat P2PAdvertInfoRespP2PAdvertInfoRateType = "float"

func (*P2PAdvertInfoRespP2PAdvertInfoRateType) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoRateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoType ¶

type P2PAdvertInfoRespP2PAdvertInfoType string
const P2PAdvertInfoRespP2PAdvertInfoTypeBuy P2PAdvertInfoRespP2PAdvertInfoType = "buy"
const P2PAdvertInfoRespP2PAdvertInfoTypeSell P2PAdvertInfoRespP2PAdvertInfoType = "sell"

func (*P2PAdvertInfoRespP2PAdvertInfoType) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespP2PAdvertInfoType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem ¶

type P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem string
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertFixedRateDisabled P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_fixed_rate_disabled"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertFloatRateDisabled P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_float_rate_disabled"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertInactive P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_inactive"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertMaxLimit P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_max_limit"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertMinLimit P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_min_limit"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertNoPaymentMethods P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_no_payment_methods"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertRemaining P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advert_remaining"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserAdsPaused P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_ads_paused"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserApproval P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_approval"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserBalance P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_balance"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserBlockTradeIneligible P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_block_trade_ineligible"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserDailyLimit P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_daily_limit"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserSchedule P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_schedule"
const P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElemAdvertiserTempBan P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem = "advertiser_temp_ban"

func (*P2PAdvertInfoRespP2PAdvertInfoVisibilityStatusElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoRespSubscription ¶

type P2PAdvertInfoRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2PAdvertInfoRespSubscription) UnmarshalJSON ¶

func (j *P2PAdvertInfoRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoSubscribe ¶

type P2PAdvertInfoSubscribe int

func (*P2PAdvertInfoSubscribe) UnmarshalJSON ¶

func (j *P2PAdvertInfoSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertInfoUseClientLimits ¶

type P2PAdvertInfoUseClientLimits int

func (*P2PAdvertInfoUseClientLimits) UnmarshalJSON ¶

func (j *P2PAdvertInfoUseClientLimits) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertList ¶

type P2PAdvertList struct {
	// [Optional] ID of the advertiser to list adverts for.
	AdvertiserId *string `json:"advertiser_id,omitempty"`

	// [Optional] Search for advertiser by name. Partial matches will be returned.
	AdvertiserName *string `json:"advertiser_name,omitempty"`

	// [Optional] How much to buy or sell, used to calculate prices.
	Amount *float64 `json:"amount,omitempty"`

	// [Optional] Return block trade adverts when 1, non-block trade adverts when 0
	// (default).
	BlockTrade P2PAdvertListBlockTrade `json:"block_trade,omitempty"`

	// [Optional] Filter the adverts by `counterparty_type`.
	CounterpartyType *P2PAdvertListCounterpartyType `json:"counterparty_type,omitempty"`

	// [Optional] Only show adverts from favourite advertisers. Default is 0.
	FavouritesOnly *P2PAdvertListFavouritesOnly `json:"favourites_only,omitempty"`

	// [Optional] If set to 1, adverts for which the current user's shcedule does not
	// have availability from now until the full possible order expiry are not
	// returned.
	HideClientScheduleUnavailable P2PAdvertListHideClientScheduleUnavailable `json:"hide_client_schedule_unavailable,omitempty"`

	// [Optional] If set to 1, adverts for which the current user does not meet
	// counteryparty terms are not returned.
	HideIneligible P2PAdvertListHideIneligible `json:"hide_ineligible,omitempty"`

	// [Optional] Used for paging.
	Limit int `json:"limit,omitempty"`

	// [Optional] Currency to conduct payment transaction in. If not provided, only
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used for paging.
	Offset int `json:"offset,omitempty"`

	// Must be 1
	P2PAdvertList P2PAdvertListP2PAdvertList `json:"p2p_advert_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Search by supported payment methods.
	PaymentMethod []string `json:"payment_method,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] How the results are sorted.
	SortBy P2PAdvertListSortBy `json:"sort_by,omitempty"`

	// [Optional] If set to 1, ads that exceed this account's balance or turnover
	// limits will not be shown.
	UseClientLimits P2PAdvertListUseClientLimits `json:"use_client_limits,omitempty"`
}

Returns available adverts for use with `p2p_order_create` .

func (*P2PAdvertList) UnmarshalJSON ¶

func (j *P2PAdvertList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListBlockTrade ¶

type P2PAdvertListBlockTrade int

func (*P2PAdvertListBlockTrade) UnmarshalJSON ¶

func (j *P2PAdvertListBlockTrade) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListCounterpartyType ¶

type P2PAdvertListCounterpartyType string
const P2PAdvertListCounterpartyTypeBuy P2PAdvertListCounterpartyType = "buy"
const P2PAdvertListCounterpartyTypeSell P2PAdvertListCounterpartyType = "sell"

func (*P2PAdvertListCounterpartyType) UnmarshalJSON ¶

func (j *P2PAdvertListCounterpartyType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListFavouritesOnly ¶

type P2PAdvertListFavouritesOnly int

func (*P2PAdvertListFavouritesOnly) UnmarshalJSON ¶

func (j *P2PAdvertListFavouritesOnly) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListHideClientScheduleUnavailable ¶ added in v0.5.0

type P2PAdvertListHideClientScheduleUnavailable int

func (*P2PAdvertListHideClientScheduleUnavailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListHideIneligible ¶ added in v0.4.15

type P2PAdvertListHideIneligible int

func (*P2PAdvertListHideIneligible) UnmarshalJSON ¶ added in v0.4.15

func (j *P2PAdvertListHideIneligible) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListP2PAdvertList ¶

type P2PAdvertListP2PAdvertList int

func (*P2PAdvertListP2PAdvertList) UnmarshalJSON ¶

func (j *P2PAdvertListP2PAdvertList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListPassthrough ¶

type P2PAdvertListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertListResp ¶

type P2PAdvertListResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertListRespMsgType `json:"msg_type"`

	// P2P adverts list.
	P2PAdvertList *P2PAdvertListRespP2PAdvertList `json:"p2p_advert_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Available adverts matching the requested criteria.

func (*P2PAdvertListResp) UnmarshalJSON ¶

func (j *P2PAdvertListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespEchoReq ¶

type P2PAdvertListRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertListRespMsgType ¶

type P2PAdvertListRespMsgType string
const P2PAdvertListRespMsgTypeP2PAdvertList P2PAdvertListRespMsgType = "p2p_advert_list"

func (*P2PAdvertListRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertList ¶

type P2PAdvertListRespP2PAdvertList struct {
	// List of adverts.
	List []P2PAdvertListRespP2PAdvertListListElem `json:"list"`
}

P2P adverts list.

func (*P2PAdvertListRespP2PAdvertList) UnmarshalJSON ¶

func (j *P2PAdvertListRespP2PAdvertList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElem ¶

type P2PAdvertListRespP2PAdvertListListElem struct {
	// Currency for this advert. This is the system currency to be transferred between
	// advertiser and client.
	AccountCurrency string `json:"account_currency"`

	// The number of active orders against this advert.
	ActiveOrders *int `json:"active_orders,omitempty"`

	// Details of the advertiser for this advert.
	AdvertiserDetails P2PAdvertListRespP2PAdvertListListElemAdvertiserDetails `json:"advertiser_details"`

	// The total amount specified in advert, in `account_currency`. It is only visible
	// to the advert owner.
	Amount *float64 `json:"amount,omitempty"`

	// The total amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	AmountDisplay *string `json:"amount_display,omitempty"`

	// Indicates if this is block trade advert or not.
	BlockTrade P2PAdvertListRespP2PAdvertListListElemBlockTrade `json:"block_trade"`

	// Advertiser contact information. Only applicable for 'sell adverts'.
	ContactInfo *string `json:"contact_info,omitempty"`

	// Type of transaction from the opposite party's perspective.
	CounterpartyType P2PAdvertListRespP2PAdvertListListElemCounterpartyType `json:"counterparty_type"`

	// The target country code of the advert.
	Country string `json:"country"`

	// The advert creation time in epoch.
	CreatedTime int `json:"created_time"`

	// Days until automatic inactivation of this ad, if no activity occurs.
	DaysUntilArchive *int `json:"days_until_archive,omitempty"`

	// General information about the advert.
	Description string `json:"description"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable.
	EffectiveRate *float64 `json:"effective_rate"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable, formatted to appropriate decimal places.
	EffectiveRateDisplay *string `json:"effective_rate_display"`

	// Reasons why the counterparty terms do not allow the current user to place
	// orders against this advert. Possible values:
	// - `completion_rate`: current user's 30 day completion rate is less than
	// `min_completion_rate`.
	// - `country`: current user's residence is not in `eligible_countries`.
	// - `join_date`: current user registered on P2P less than `min_join_days` in the
	// past.
	// - `rating`: current user's average review rating is less than `min_rating`.
	EligibilityStatus []P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem `json:"eligibility_status,omitempty"`

	// 2 letter country codes. Counterparties who do not live in these countries are
	// not allowed to place orders against this advert.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id string `json:"id"`

	// The activation status of the advert.
	IsActive P2PAdvertListRespP2PAdvertListListElemIsActive `json:"is_active"`

	// Inidcates whether the current user's schedule has availability between now and
	// now + order_expiry_period.
	IsClientScheduleAvailable *P2PAdvertListRespP2PAdvertListListElemIsClientScheduleAvailable `json:"is_client_schedule_available,omitempty"`

	// Indicates that the current user meets the counterparty terms for placing an
	// order.
	IsEligible P2PAdvertListRespP2PAdvertListListElemIsEligible `json:"is_eligible,omitempty"`

	// Indicates that this advert will appear on the main advert list.
	IsVisible P2PAdvertListRespP2PAdvertListListElemIsVisible `json:"is_visible"`

	// Local currency for this advert. This is the form of payment to be arranged
	// directly between advertiser and client.
	LocalCurrency string `json:"local_currency"`

	// Maximum order amount specified in advert, in `account_currency`. It is only
	// visible for advertisers.
	MaxOrderAmount *float64 `json:"max_order_amount,omitempty"`

	// Maximum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	MaxOrderAmountDisplay *string `json:"max_order_amount_display,omitempty"`

	// Maximum order amount at this time, in `account_currency`.
	MaxOrderAmountLimit float64 `json:"max_order_amount_limit"`

	// Maximum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountLimitDisplay string `json:"max_order_amount_limit_display"`

	// Counterparties who have a 30 day completion rate less than this value are not
	// allowed to place orders against this advert.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// Counterparties who joined less than this number of days ago are not allowed to
	// place orders against this advert.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`. It is only
	// visible for advertisers.
	MinOrderAmount *float64 `json:"min_order_amount,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	MinOrderAmountDisplay *string `json:"min_order_amount_display,omitempty"`

	// Minimum order amount at this time, in `account_currency`.
	MinOrderAmountLimit float64 `json:"min_order_amount_limit"`

	// Minimum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountLimitDisplay string `json:"min_order_amount_limit_display"`

	// Counterparties who have an average rating less than this value are not allowed
	// to place orders against this advert.
	MinRating *float64 `json:"min_rating,omitempty"`

	// Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod int `json:"order_expiry_period"`

	// Payment instructions. Only applicable for 'sell adverts'.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost of the advert in local currency.
	Price *float64 `json:"price"`

	// Cost of the advert in local currency, formatted to appropriate decimal places.
	PriceDisplay *string `json:"price_display"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate float64 `json:"rate"`

	// Conversion rate formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Type of rate, fixed or floating.
	RateType P2PAdvertListRespP2PAdvertListListElemRateType `json:"rate_type"`

	// Amount currently available for orders, in `account_currency`. It is only
	// visible to the advert owner.
	RemainingAmount *float64 `json:"remaining_amount,omitempty"`

	// Amount currently available for orders, in `account_currency`, formatted to
	// appropriate decimal places. It is only visible to the advert owner.
	RemainingAmountDisplay *string `json:"remaining_amount_display,omitempty"`

	// Whether this is a buy or a sell.
	Type P2PAdvertListRespP2PAdvertListListElemType `json:"type"`

	// Reasons why an advert is not visible. Possible values:
	// - `advert_fixed_rate_disabled`: fixed rate adverts are no longer available in
	// the advert's country.
	// - `advert_float_rate_disabled`: floating rate adverts are no longer available
	// in the advert's country.
	// - `advert_inactive`: the advert is set inactive.
	// - `advert_max_limit`: the minimum order amount exceeds the system maximum
	// order.
	// - `advert_min_limit`: the maximum order amount is too small to be shown on the
	// advert list.
	// - `advert_remaining`: the remaining amount of the advert is below the minimum
	// order.
	// - `advert_no_payment_methods`: the advert has no valid payment methods.
	// - `advertiser_ads_paused`: the advertiser has paused all adverts.
	// - `advertiser_approval`: the advertiser's proof of identity is not verified.
	// - `advertiser_balance`: the advertiser's P2P balance is less than the minimum
	// order.
	// - `advertiser_schedule`: the advertiser's schedule does not have availability
	// between now and now + order_expiry_period.
	// - `advertiser_block_trade_ineligible`: the advertiser is not currently eligible
	// for block trading.
	// - `advertiser_daily_limit`: the advertiser's remaining daily limit is less than
	// the minimum order.
	// - `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.
	VisibilityStatus []P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem `json:"visibility_status,omitempty"`
}

func (*P2PAdvertListRespP2PAdvertListListElem) UnmarshalJSON ¶

func (j *P2PAdvertListRespP2PAdvertListListElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetails ¶

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetails struct {
	// The total number of orders completed in the past 30 days.
	CompletedOrdersCount int `json:"completed_orders_count"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates that the advertiser is blocked by the current user.
	IsBlocked *P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsBlocked `json:"is_blocked,omitempty"`

	// Indicates that the advertiser is a favourite.
	IsFavourite *P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsFavourite `json:"is_favourite,omitempty"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsOnline `json:"is_online"`

	// Indicates that the advertiser was recommended in the most recent review by the
	// current user.
	IsRecommended *P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsRecommended `json:"is_recommended,omitempty"`

	// Inidcates whether the advertiser's schedule has availability between now and
	// now + order_expiry_period.
	IsScheduleAvailable P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *float64 `json:"recommended_count"`

	// The percentage of successfully completed orders made by or placed against the
	// advertiser within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`
}

Details of the advertiser for this advert.

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsBlocked ¶

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsBlocked int

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsBlocked) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsFavourite ¶

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsFavourite int

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsFavourite) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsOnline ¶

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsOnline int

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsRecommended ¶

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsRecommended struct {
	Value interface{}
}

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsScheduleAvailable int

func (*P2PAdvertListRespP2PAdvertListListElemAdvertiserDetailsIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemBlockTrade ¶

type P2PAdvertListRespP2PAdvertListListElemBlockTrade int

func (*P2PAdvertListRespP2PAdvertListListElemBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemCounterpartyType ¶

type P2PAdvertListRespP2PAdvertListListElemCounterpartyType string
const P2PAdvertListRespP2PAdvertListListElemCounterpartyTypeBuy P2PAdvertListRespP2PAdvertListListElemCounterpartyType = "buy"
const P2PAdvertListRespP2PAdvertListListElemCounterpartyTypeSell P2PAdvertListRespP2PAdvertListListElemCounterpartyType = "sell"

func (*P2PAdvertListRespP2PAdvertListListElemCounterpartyType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem ¶ added in v0.4.15

type P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem string
const P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElemCompletionRate P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem = "completion_rate"
const P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElemCountry P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem = "country"
const P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElemJoinDate P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem = "join_date"
const P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElemRatingAverage P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem = "rating_average"

func (*P2PAdvertListRespP2PAdvertListListElemEligibilityStatusElem) UnmarshalJSON ¶ added in v0.4.15

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemIsActive ¶

type P2PAdvertListRespP2PAdvertListListElemIsActive int

func (*P2PAdvertListRespP2PAdvertListListElemIsActive) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemIsClientScheduleAvailable ¶ added in v0.5.0

type P2PAdvertListRespP2PAdvertListListElemIsClientScheduleAvailable int

func (*P2PAdvertListRespP2PAdvertListListElemIsClientScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemIsEligible ¶ added in v0.4.15

type P2PAdvertListRespP2PAdvertListListElemIsEligible int

func (*P2PAdvertListRespP2PAdvertListListElemIsEligible) UnmarshalJSON ¶ added in v0.4.15

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemIsVisible ¶

type P2PAdvertListRespP2PAdvertListListElemIsVisible int

func (*P2PAdvertListRespP2PAdvertListListElemIsVisible) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemRateType ¶

type P2PAdvertListRespP2PAdvertListListElemRateType string
const P2PAdvertListRespP2PAdvertListListElemRateTypeFixed P2PAdvertListRespP2PAdvertListListElemRateType = "fixed"
const P2PAdvertListRespP2PAdvertListListElemRateTypeFloat P2PAdvertListRespP2PAdvertListListElemRateType = "float"

func (*P2PAdvertListRespP2PAdvertListListElemRateType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemType ¶

type P2PAdvertListRespP2PAdvertListListElemType string
const P2PAdvertListRespP2PAdvertListListElemTypeBuy P2PAdvertListRespP2PAdvertListListElemType = "buy"
const P2PAdvertListRespP2PAdvertListListElemTypeSell P2PAdvertListRespP2PAdvertListListElemType = "sell"

func (*P2PAdvertListRespP2PAdvertListListElemType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem ¶

type P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem string
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertFixedRateDisabled P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_fixed_rate_disabled"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertFloatRateDisabled P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_float_rate_disabled"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertInactive P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_inactive"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertMaxLimit P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_max_limit"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertMinLimit P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_min_limit"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertNoPaymentMethods P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_no_payment_methods"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertRemaining P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advert_remaining"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserAdsPaused P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_ads_paused"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserApproval P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_approval"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserBalance P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_balance"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserBlockTradeIneligible P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_block_trade_ineligible"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserDailyLimit P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_daily_limit"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserSchedule P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_schedule"
const P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElemAdvertiserTempBan P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem = "advertiser_temp_ban"

func (*P2PAdvertListRespP2PAdvertListListElemVisibilityStatusElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListSortBy ¶

type P2PAdvertListSortBy string
const P2PAdvertListSortByCompletion P2PAdvertListSortBy = "completion"
const P2PAdvertListSortByRate P2PAdvertListSortBy = "rate"
const P2PAdvertListSortByRating P2PAdvertListSortBy = "rating"
const P2PAdvertListSortByRecommended P2PAdvertListSortBy = "recommended"

func (*P2PAdvertListSortBy) UnmarshalJSON ¶

func (j *P2PAdvertListSortBy) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertListUseClientLimits ¶

type P2PAdvertListUseClientLimits int

func (*P2PAdvertListUseClientLimits) UnmarshalJSON ¶

func (j *P2PAdvertListUseClientLimits) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdate ¶

type P2PAdvertUpdate struct {
	// [Optional] Advertiser contact information.
	ContactInfo *string `json:"contact_info,omitempty"`

	// [Optional] If set to 1, permanently deletes the advert.
	Delete *P2PAdvertUpdateDelete `json:"delete,omitempty"`

	// [Optional] General information about the advert.
	Description *string `json:"description,omitempty"`

	// [Optional] 2 letter country codes. Counterparties who do not live in these
	// countries will not be allowed to place orders against this advert. An empty
	// array or null value will clear the condition.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id string `json:"id"`

	// [Optional] Activate or deactivate the advert.
	IsActive *P2PAdvertUpdateIsActive `json:"is_active,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Maximum allowed amount for the orders of this advert, in
	// advertiser's `account_currency`. Should be more than or equal to
	// `min_order_amount`.
	MaxOrderAmount *float64 `json:"max_order_amount,omitempty"`

	// [Optional] Counterparties who have a 30 day completion rate less than this
	// value will not be allowed to place orders against this advert. A an empty array
	// or null value will clear the condition.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// [Optional] Counterparties who joined less than this number of days ago will not
	// be allowed to place orders against this advert. A null value will clear the
	// condition.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// [Optional] Minimum allowed amount for the orders of this advert, in
	// advertiser's `account_currency`. Should be less than or equal to
	// `max_order_amount`.
	MinOrderAmount *float64 `json:"min_order_amount,omitempty"`

	// [Optional] Counterparties who have an average rating less than this value will
	// not be allowed to place orders against this advert. A null value will clear the
	// condition.
	MinRating *float64 `json:"min_rating,omitempty"`

	// [Optional] Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod *int `json:"order_expiry_period,omitempty"`

	// Must be 1
	P2PAdvertUpdate P2PAdvertUpdateP2PAdvertUpdate `json:"p2p_advert_update"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertUpdatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Payment instructions.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// [Optional] IDs of previously saved payment methods as returned from
	// p2p_advertiser_payment_methods, only applicable for sell ads. Exisiting methods
	// will be replaced.
	PaymentMethodIds []int `json:"payment_method_ids,omitempty"`

	// [Optional] Payment method identifiers as returned from p2p_payment_methods,
	// only applicable for buy ads. Exisiting methods will be replaced.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// [Optional] Conversion rate from advertiser's account currency to
	// `local_currency`. An absolute rate value (fixed), or percentage offset from
	// current market rate (floating).
	Rate *float64 `json:"rate,omitempty"`

	// [Optional] Type of rate, fixed or floating.
	RateType *P2PAdvertUpdateRateType `json:"rate_type,omitempty"`

	// [Optional] The total available amount of the advert, in advertiser's account
	// currency.
	RemainingAmount *float64 `json:"remaining_amount,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Updates a P2P advert. Can only be used by the advertiser.

func (*P2PAdvertUpdate) UnmarshalJSON ¶

func (j *P2PAdvertUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateDelete ¶

type P2PAdvertUpdateDelete int

func (*P2PAdvertUpdateDelete) UnmarshalJSON ¶

func (j *P2PAdvertUpdateDelete) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateIsActive ¶

type P2PAdvertUpdateIsActive int

func (*P2PAdvertUpdateIsActive) UnmarshalJSON ¶

func (j *P2PAdvertUpdateIsActive) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateP2PAdvertUpdate ¶

type P2PAdvertUpdateP2PAdvertUpdate int

func (*P2PAdvertUpdateP2PAdvertUpdate) UnmarshalJSON ¶

func (j *P2PAdvertUpdateP2PAdvertUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdatePassthrough ¶

type P2PAdvertUpdatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertUpdateRateType ¶

type P2PAdvertUpdateRateType string
const P2PAdvertUpdateRateTypeFixed P2PAdvertUpdateRateType = "fixed"
const P2PAdvertUpdateRateTypeFloat P2PAdvertUpdateRateType = "float"

func (*P2PAdvertUpdateRateType) UnmarshalJSON ¶

func (j *P2PAdvertUpdateRateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateResp ¶

type P2PAdvertUpdateResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertUpdateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertUpdateRespMsgType `json:"msg_type"`

	// P2P updated advert information.
	P2PAdvertUpdate *P2PAdvertUpdateRespP2PAdvertUpdate `json:"p2p_advert_update,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns information about the updated advert.

func (*P2PAdvertUpdateResp) UnmarshalJSON ¶

func (j *P2PAdvertUpdateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespEchoReq ¶

type P2PAdvertUpdateRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertUpdateRespMsgType ¶

type P2PAdvertUpdateRespMsgType string
const P2PAdvertUpdateRespMsgTypeP2PAdvertUpdate P2PAdvertUpdateRespMsgType = "p2p_advert_update"

func (*P2PAdvertUpdateRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertUpdateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdate ¶

type P2PAdvertUpdateRespP2PAdvertUpdate struct {
	// Currency for this advert. This is the system currency to be transferred between
	// advertiser and client.
	AccountCurrency *string `json:"account_currency,omitempty"`

	// The number of active orders against this advert.
	ActiveOrders *int `json:"active_orders,omitempty"`

	// Details of the advertiser for this advert.
	AdvertiserDetails *P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetails `json:"advertiser_details,omitempty"`

	// The total amount specified in advert, in `account_currency`.
	Amount *float64 `json:"amount,omitempty"`

	// The total amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	AmountDisplay *string `json:"amount_display,omitempty"`

	// Indicates if this is block trade advert or not.
	BlockTrade *P2PAdvertUpdateRespP2PAdvertUpdateBlockTrade `json:"block_trade,omitempty"`

	// Advertiser contact information. Only applicable for 'sell adverts'.
	ContactInfo *string `json:"contact_info,omitempty"`

	// Type of transaction from the opposite party's perspective.
	CounterpartyType *P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType `json:"counterparty_type,omitempty"`

	// The target country code of the advert.
	Country *string `json:"country,omitempty"`

	// The advert creation time in epoch.
	CreatedTime *int `json:"created_time,omitempty"`

	// Days until automatic inactivation of this ad, if no activity occurs.
	DaysUntilArchive *int `json:"days_until_archive,omitempty"`

	// Indicates that the advert has been deleted.
	Deleted *P2PAdvertUpdateRespP2PAdvertUpdateDeleted `json:"deleted,omitempty"`

	// General information about the advert.
	Description *string `json:"description,omitempty"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable.
	EffectiveRate *float64 `json:"effective_rate,omitempty"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable, formatted to appropriate decimal places.
	EffectiveRateDisplay *string `json:"effective_rate_display,omitempty"`

	// 2 letter country codes. Counterparties who do not live in these countries are
	// not allowed to place orders against this advert
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id string `json:"id"`

	// The activation status of the advert.
	IsActive *P2PAdvertUpdateRespP2PAdvertUpdateIsActive `json:"is_active,omitempty"`

	// Indicates that this advert will appear on the main advert list.
	IsVisible P2PAdvertUpdateRespP2PAdvertUpdateIsVisible `json:"is_visible,omitempty"`

	// Local currency for this advert. This is the form of payment to be arranged
	// directly between advertiser and client.
	LocalCurrency *string `json:"local_currency,omitempty"`

	// Maximum order amount specified in advert, in `account_currency`.
	MaxOrderAmount *float64 `json:"max_order_amount,omitempty"`

	// Maximum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountDisplay *string `json:"max_order_amount_display,omitempty"`

	// Maximum order amount at this time, in `account_currency`.
	MaxOrderAmountLimit *float64 `json:"max_order_amount_limit,omitempty"`

	// Maximum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountLimitDisplay *string `json:"max_order_amount_limit_display,omitempty"`

	// Counterparties who have a 30 day completion rate less than this value are not
	// allowed to place orders against this advert.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// Counterparties who joined less than this number of days ago are not allowed to
	// place orders against this advert.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`. It is only
	// visible to the advert owner.
	MinOrderAmount *float64 `json:"min_order_amount,omitempty"`

	// Minimum order amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountDisplay *string `json:"min_order_amount_display,omitempty"`

	// Minimum order amount at this time, in `account_currency`.
	MinOrderAmountLimit *float64 `json:"min_order_amount_limit,omitempty"`

	// Minimum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountLimitDisplay *string `json:"min_order_amount_limit_display,omitempty"`

	// Counterparties who have an average rating less than this value are not allowed
	// to place orders against this advert.
	MinRating *float64 `json:"min_rating,omitempty"`

	// Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod *int `json:"order_expiry_period,omitempty"`

	// Payment instructions. Only applicable for 'sell adverts'.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Details of available payment methods (sell adverts only).
	PaymentMethodDetails P2PAdvertUpdateRespP2PAdvertUpdatePaymentMethodDetails `json:"payment_method_details,omitempty"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost of the advert in local currency.
	Price *float64 `json:"price,omitempty"`

	// Cost of the advert in local currency, formatted to appropriate decimal places.
	PriceDisplay *string `json:"price_display,omitempty"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate *float64 `json:"rate,omitempty"`

	// Conversion rate formatted to appropriate decimal places.
	RateDisplay *string `json:"rate_display,omitempty"`

	// Type of rate, fixed or floating.
	RateType *P2PAdvertUpdateRespP2PAdvertUpdateRateType `json:"rate_type,omitempty"`

	// Amount currently available for orders, in `account_currency`.
	RemainingAmount *float64 `json:"remaining_amount,omitempty"`

	// Amount currently available for orders, in `account_currency`, formatted to
	// appropriate decimal places.
	RemainingAmountDisplay *string `json:"remaining_amount_display,omitempty"`

	// Whether this is a buy or a sell.
	Type *P2PAdvertUpdateRespP2PAdvertUpdateType `json:"type,omitempty"`

	// Reasons why an advert is not visible. Possible values:
	// - `advert_fixed_rate_disabled`: fixed rate adverts are no longer available in
	// the advert's country.
	// - `advert_float_rate_disabled`: floating rate adverts are no longer available
	// in the advert's country.
	// - `advert_inactive`: the advert is set inactive.
	// - `advert_max_limit`: the minimum order amount exceeds the system maximum
	// order.
	// - `advert_min_limit`: the maximum order amount is too small to be shown on the
	// advert list.
	// - `advert_remaining`: the remaining amount of the advert is below the minimum
	// order.
	// - `advert_no_payment_methods`: the advert has no valid payment methods.
	// - `advertiser_ads_paused`: the advertiser has paused all adverts.
	// - `advertiser_approval`: the advertiser's proof of identity is not verified.
	// - `advertiser_balance`: the advertiser's P2P balance is less than the minimum
	// order.
	// - `advertiser_schedule`: the advertiser's schedule does not have availability
	// between now and now + order_expiry_period.
	// - `advertiser_block_trade_ineligible`: the advertiser is not currently eligible
	// for block trading.
	// - `advertiser_daily_limit`: the advertiser's remaining daily limit is less than
	// the minimum order.
	// - `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.
	VisibilityStatus []P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem `json:"visibility_status,omitempty"`
}

P2P updated advert information.

func (*P2PAdvertUpdateRespP2PAdvertUpdate) UnmarshalJSON ¶

func (j *P2PAdvertUpdateRespP2PAdvertUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetails ¶

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetails struct {
	// The total number of orders completed in the past 30 days.
	CompletedOrdersCount int `json:"completed_orders_count"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsOnline `json:"is_online"`

	// Inidcates whether the advertiser's schedule has availability between now and
	// now + order_expiry_period.
	IsScheduleAvailable P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The percentage of successfully completed orders made by or placed against the
	// advertiser within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`
}

Details of the advertiser for this advert.

func (*P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsOnline ¶

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsOnline int

func (*P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsScheduleAvailable int

func (*P2PAdvertUpdateRespP2PAdvertUpdateAdvertiserDetailsIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateBlockTrade ¶

type P2PAdvertUpdateRespP2PAdvertUpdateBlockTrade int

func (*P2PAdvertUpdateRespP2PAdvertUpdateBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType ¶

type P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType string
const P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyTypeBuy P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType = "buy"
const P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyTypeSell P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType = "sell"

func (*P2PAdvertUpdateRespP2PAdvertUpdateCounterpartyType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateDeleted ¶

type P2PAdvertUpdateRespP2PAdvertUpdateDeleted int

func (*P2PAdvertUpdateRespP2PAdvertUpdateDeleted) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateIsActive ¶

type P2PAdvertUpdateRespP2PAdvertUpdateIsActive int

func (*P2PAdvertUpdateRespP2PAdvertUpdateIsActive) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateIsVisible ¶

type P2PAdvertUpdateRespP2PAdvertUpdateIsVisible int

func (*P2PAdvertUpdateRespP2PAdvertUpdateIsVisible) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdatePaymentMethodDetails ¶

type P2PAdvertUpdateRespP2PAdvertUpdatePaymentMethodDetails map[string]interface{}

Details of available payment methods (sell adverts only).

type P2PAdvertUpdateRespP2PAdvertUpdateRateType ¶

type P2PAdvertUpdateRespP2PAdvertUpdateRateType string
const P2PAdvertUpdateRespP2PAdvertUpdateRateTypeFixed P2PAdvertUpdateRespP2PAdvertUpdateRateType = "fixed"
const P2PAdvertUpdateRespP2PAdvertUpdateRateTypeFloat P2PAdvertUpdateRespP2PAdvertUpdateRateType = "float"

func (*P2PAdvertUpdateRespP2PAdvertUpdateRateType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateType ¶

type P2PAdvertUpdateRespP2PAdvertUpdateType string
const P2PAdvertUpdateRespP2PAdvertUpdateTypeBuy P2PAdvertUpdateRespP2PAdvertUpdateType = "buy"
const P2PAdvertUpdateRespP2PAdvertUpdateTypeSell P2PAdvertUpdateRespP2PAdvertUpdateType = "sell"

func (*P2PAdvertUpdateRespP2PAdvertUpdateType) UnmarshalJSON ¶

func (j *P2PAdvertUpdateRespP2PAdvertUpdateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem ¶

type P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem string
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertFixedRateDisabled P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_fixed_rate_disabled"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertFloatRateDisabled P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_float_rate_disabled"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertInactive P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_inactive"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertMaxLimit P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_max_limit"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertMinLimit P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_min_limit"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertNoPaymentMethods P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_no_payment_methods"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertRemaining P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advert_remaining"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserAdsPaused P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_ads_paused"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserApproval P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_approval"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserBalance P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_balance"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserBlockTradeIneligible P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_block_trade_ineligible"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserDailyLimit P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_daily_limit"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserSchedule P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_schedule"
const P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElemAdvertiserTempBan P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem = "advertiser_temp_ban"

func (*P2PAdvertUpdateRespP2PAdvertUpdateVisibilityStatusElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdverts ¶

type P2PAdvertiserAdverts struct {
	// [Optional] Used for paging. This value will also apply to subsription
	// responses.
	Limit int `json:"limit,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used for paging. This value will also apply to subsription
	// responses.
	Offset int `json:"offset,omitempty"`

	// Must be 1
	P2PAdvertiserAdverts P2PAdvertiserAdvertsP2PAdvertiserAdverts `json:"p2p_advertiser_adverts"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserAdvertsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.

func (*P2PAdvertiserAdverts) UnmarshalJSON ¶

func (j *P2PAdvertiserAdverts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsP2PAdvertiserAdverts ¶

type P2PAdvertiserAdvertsP2PAdvertiserAdverts int

func (*P2PAdvertiserAdvertsP2PAdvertiserAdverts) UnmarshalJSON ¶

func (j *P2PAdvertiserAdvertsP2PAdvertiserAdverts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsPassthrough ¶

type P2PAdvertiserAdvertsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserAdvertsResp ¶

type P2PAdvertiserAdvertsResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserAdvertsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserAdvertsRespMsgType `json:"msg_type"`

	// List of the P2P advertiser adverts.
	P2PAdvertiserAdverts *P2PAdvertiserAdvertsRespP2PAdvertiserAdverts `json:"p2p_advertiser_adverts,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

All adverts belonging to the current advertiser.

func (*P2PAdvertiserAdvertsResp) UnmarshalJSON ¶

func (j *P2PAdvertiserAdvertsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespEchoReq ¶

type P2PAdvertiserAdvertsRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserAdvertsRespMsgType ¶

type P2PAdvertiserAdvertsRespMsgType string
const P2PAdvertiserAdvertsRespMsgTypeP2PAdvertiserAdverts P2PAdvertiserAdvertsRespMsgType = "p2p_advertiser_adverts"

func (*P2PAdvertiserAdvertsRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserAdvertsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdverts ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdverts struct {
	// List of advertiser adverts.
	List []P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElem `json:"list"`
}

List of the P2P advertiser adverts.

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdverts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElem ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElem struct {
	// Currency for this advert. This is the system currency to be transferred between
	// advertiser and client.
	AccountCurrency string `json:"account_currency"`

	// The number of active orders against this advert.
	ActiveOrders int `json:"active_orders"`

	// Details of the advertiser for this advert.
	AdvertiserDetails P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetails `json:"advertiser_details"`

	// The total amount specified in advert, in `account_currency`.
	Amount float64 `json:"amount"`

	// The total amount specified in advert, in `account_currency`, formatted to
	// appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// Indicates if this is block trade advert or not.
	BlockTrade P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemBlockTrade `json:"block_trade"`

	// Advertiser contact information. Only applicable for 'sell adverts'.
	ContactInfo string `json:"contact_info"`

	// This is the type of transaction from the counterparty's perspective.
	CounterpartyType P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType `json:"counterparty_type"`

	// The target country code of the advert.
	Country string `json:"country"`

	// The advert creation time in epoch.
	CreatedTime int `json:"created_time"`

	// Days until automatic inactivation of this ad, if no activity occurs.
	DaysUntilArchive *int `json:"days_until_archive,omitempty"`

	// General information about the advert.
	Description string `json:"description"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable.
	EffectiveRate *float64 `json:"effective_rate"`

	// Conversion rate from account currency to local currency, using current market
	// rate if applicable, formatted to appropriate decimal places.
	EffectiveRateDisplay *string `json:"effective_rate_display"`

	// 2 letter country codes. Counterparties who do not live in these countries are
	// not allowed to place orders.
	EligibleCountries []string `json:"eligible_countries,omitempty"`

	// The unique identifier for this advert.
	Id string `json:"id"`

	// The activation status of the advert.
	IsActive P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsActive `json:"is_active"`

	// Indicates that this advert will appear on the main advert list.
	IsVisible P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsVisible `json:"is_visible"`

	// Local currency for this advert. This is the form of payment to be arranged
	// directly between advertiser and client.
	LocalCurrency string `json:"local_currency"`

	// Maximum order amount, in `account_currency`.
	MaxOrderAmount float64 `json:"max_order_amount"`

	// Maximum order amount, in `account_currency`, formatted to appropriate decimal
	// places.
	MaxOrderAmountDisplay string `json:"max_order_amount_display"`

	// Maximum order amount at this time, in `account_currency`.
	MaxOrderAmountLimit float64 `json:"max_order_amount_limit"`

	// Maximum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MaxOrderAmountLimitDisplay string `json:"max_order_amount_limit_display"`

	// Counterparties who have a 30 day completion rate less than this value are not
	// allowed to place orders.
	MinCompletionRate *float64 `json:"min_completion_rate,omitempty"`

	// Counterparties who joined less than this number of days ago are not allowed to
	// place orders.
	MinJoinDays *int `json:"min_join_days,omitempty"`

	// Minimum order amount, in `account_currency`.
	MinOrderAmount float64 `json:"min_order_amount"`

	// Minimum order amount, in `account_currency`, formatted to appropriate decimal
	// places.
	MinOrderAmountDisplay string `json:"min_order_amount_display"`

	// Minimum order amount at this time, in `account_currency`.
	MinOrderAmountLimit float64 `json:"min_order_amount_limit"`

	// Minimum order amount at this time, in `account_currency`, formatted to
	// appropriate decimal places.
	MinOrderAmountLimitDisplay string `json:"min_order_amount_limit_display"`

	// Counterparties who have an average rating less than this value are not allowed
	// to place orders.
	MinRating *float64 `json:"min_rating,omitempty"`

	// Expiry period (seconds) for order created against this ad.
	OrderExpiryPeriod int `json:"order_expiry_period"`

	// Payment instructions. Only applicable for 'sell adverts'.
	PaymentInfo string `json:"payment_info"`

	// Payment method name (deprecated).
	PaymentMethod *string `json:"payment_method"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost of the advert in local currency.
	Price *float64 `json:"price"`

	// Cost of the advert in local currency, formatted to appropriate decimal places.
	PriceDisplay *string `json:"price_display"`

	// Conversion rate from advertiser's account currency to `local_currency`. An
	// absolute rate value (fixed), or percentage offset from current market rate
	// (floating).
	Rate float64 `json:"rate"`

	// Conversion rate formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Type of rate, fixed or floating.
	RateType P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType `json:"rate_type"`

	// Amount currently available for orders, in `account_currency`.
	RemainingAmount float64 `json:"remaining_amount"`

	// Amount currently available for orders, in `account_currency`, formatted to
	// appropriate decimal places.
	RemainingAmountDisplay string `json:"remaining_amount_display"`

	// Whether this is a buy or a sell.
	Type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType `json:"type"`

	// Reasons why an advert is not visible. Possible values:
	// - `advert_fixed_rate_disabled`: fixed rate adverts are no longer available in
	// the advert's country.
	// - `advert_float_rate_disabled`: floating rate adverts are no longer available
	// in the advert's country.
	// - `advert_inactive`: the advert is set inactive.
	// - `advert_max_limit`: the minimum order amount exceeds the system maximum
	// order.
	// - `advert_min_limit`: the maximum order amount is too small to be shown on the
	// advert list.
	// - `advert_remaining`: the remaining amount of the advert is below the minimum
	// order.
	// - `advert_no_payment_methods`: the advert has no valid payment methods.
	// - `advertiser_ads_paused`: the advertiser has paused all adverts.
	// - `advertiser_approval`: the advertiser's proof of identity is not verified.
	// - `advertiser_balance`: the advertiser's P2P balance is less than the minimum
	// order.
	// - `advertiser_schedule`: the advertiser's schedule does not have availability
	// between now and now + order_expiry_period.
	// - `advertiser_block_trade_ineligible`: the advertiser is not currently eligible
	// for block trading.
	// - `advertiser_daily_limit`: the advertiser's remaining daily limit is less than
	// the minimum order.
	// - `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.
	VisibilityStatus []P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem `json:"visibility_status,omitempty"`
}

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetails ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetails struct {
	// The total number of orders completed in the past 30 days.
	CompletedOrdersCount int `json:"completed_orders_count"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsOnline `json:"is_online"`

	// Inidcates whether the advertiser's schedule has availability between now and
	// now + order_expiry_period.
	IsScheduleAvailable P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The percentage of successfully completed orders made by or placed against the
	// advertiser within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`
}

Details of the advertiser for this advert.

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsOnline ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsOnline int

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsScheduleAvailable int

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemAdvertiserDetailsIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemBlockTrade ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemBlockTrade int

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType string
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyTypeBuy P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType = "buy"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyTypeSell P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType = "sell"

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemCounterpartyType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsActive ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsActive int

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsActive) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsVisible ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsVisible int

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemIsVisible) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType string
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateTypeFixed P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType = "fixed"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateTypeFloat P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType = "float"

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemRateType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType string
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemTypeBuy P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType = "buy"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemTypeSell P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType = "sell"

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem ¶

type P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem string
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertFixedRateDisabled P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_fixed_rate_disabled"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertFloatRateDisabled P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_float_rate_disabled"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertInactive P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_inactive"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertMaxLimit P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_max_limit"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertMinLimit P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_min_limit"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertNoPaymentMethods P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_no_payment_methods"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertRemaining P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advert_remaining"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserAdsPaused P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_ads_paused"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserApproval P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_approval"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserBalance P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_balance"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserBlockTradeIneligible P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_block_trade_ineligible"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserDailyLimit P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_daily_limit"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserSchedule P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_schedule"
const P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElemAdvertiserTempBan P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem = "advertiser_temp_ban"

func (*P2PAdvertiserAdvertsRespP2PAdvertiserAdvertsListElemVisibilityStatusElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreate ¶

type P2PAdvertiserCreate struct {
	// [Optional] Advertiser's contact information, to be used as a default for new
	// sell adverts.
	ContactInfo *string `json:"contact_info,omitempty"`

	// [Optional] Default description that can be used every time an advert is
	// created.
	DefaultAdvertDescription *string `json:"default_advert_description,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Must be 1
	P2PAdvertiserCreate P2PAdvertiserCreateP2PAdvertiserCreate `json:"p2p_advertiser_create"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserCreatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Advertiser's payment information, to be used as a default for new
	// sell adverts.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserCreateScheduleElem `json:"schedule,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is an update to
	// advertiser
	Subscribe *P2PAdvertiserCreateSubscribe `json:"subscribe,omitempty"`
}

Registers the client as a P2P advertiser.

func (*P2PAdvertiserCreate) UnmarshalJSON ¶

func (j *P2PAdvertiserCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateP2PAdvertiserCreate ¶

type P2PAdvertiserCreateP2PAdvertiserCreate int

func (*P2PAdvertiserCreateP2PAdvertiserCreate) UnmarshalJSON ¶

func (j *P2PAdvertiserCreateP2PAdvertiserCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreatePassthrough ¶

type P2PAdvertiserCreatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserCreateResp ¶

type P2PAdvertiserCreateResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserCreateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserCreateRespMsgType `json:"msg_type"`

	// P2P advertiser information.
	P2PAdvertiserCreate *P2PAdvertiserCreateRespP2PAdvertiserCreate `json:"p2p_advertiser_create,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2PAdvertiserCreateRespSubscription `json:"subscription,omitempty"`
}

Returns information of the created advertiser.

func (*P2PAdvertiserCreateResp) UnmarshalJSON ¶

func (j *P2PAdvertiserCreateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespEchoReq ¶

type P2PAdvertiserCreateRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserCreateRespMsgType ¶

type P2PAdvertiserCreateRespMsgType string
const P2PAdvertiserCreateRespMsgTypeP2PAdvertiserCreate P2PAdvertiserCreateRespMsgType = "p2p_advertiser_create"

func (*P2PAdvertiserCreateRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserCreateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreate ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreate struct {
	// Average difference of advert rate compared to the market rate over the past 30
	// days.
	AdvertRates *float64 `json:"advert_rates"`

	// Amount of funds available to sell on P2P. May be less than account balance
	// according to deposit methods used.
	BalanceAvailable float64 `json:"balance_available"`

	// Boolean value: 1 or 0, indicating whether the advertiser's identify has been
	// verified.
	BasicVerification P2PAdvertiserCreateRespP2PAdvertiserCreateBasicVerification `json:"basic_verification"`

	// The number of P2P users who have blocked this advertiser.
	BlockedByCount int `json:"blocked_by_count"`

	// The percentage of completed orders out of total orders as a buyer within the
	// past 30 days.
	BuyCompletionRate *float64 `json:"buy_completion_rate"`

	// Buy order volume in the past 30 days.
	BuyOrdersAmount string `json:"buy_orders_amount"`

	// The number of buy order completed within the past 30 days.
	BuyOrdersCount int `json:"buy_orders_count"`

	// The average time in seconds taken to make payment as a buyer within the past 30
	// days.
	BuyTimeAvg *int `json:"buy_time_avg"`

	// The average time in seconds taken to cancel orders as a buyer within the past
	// 30 days.
	CancelTimeAvg *int `json:"cancel_time_avg"`

	// The number of times the user may cancel orders before being temporarily
	// blocked.
	CancelsRemaining int `json:"cancels_remaining"`

	// The token to be used for authenticating the client for chat.
	ChatToken *string `json:"chat_token"`

	// The unique identifier for the chat user.
	ChatUserId *string `json:"chat_user_id"`

	// Advertiser's contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time that the client became an advertiser.
	CreatedTime int `json:"created_time"`

	// Total value of P2P buy transactions in the past 24 hours.
	DailyBuy *string `json:"daily_buy,omitempty"`

	// Maximum allowed value of P2P buy transactions in a 24 hour period.
	DailyBuyLimit *string `json:"daily_buy_limit,omitempty"`

	// Total value of P2P sell transactions in the past 24 hours.
	DailySell *string `json:"daily_sell,omitempty"`

	// Maximum allowed value of P2P sell transactions in a 24 hour period.
	DailySellLimit *string `json:"daily_sell_limit,omitempty"`

	// Default description that can be used every time an advert is created.
	DefaultAdvertDescription string `json:"default_advert_description"`

	// Boolean value: 1 or 0, indicating whether the advertiser's address has been
	// verified.
	FullVerification P2PAdvertiserCreateRespP2PAdvertiserCreateFullVerification `json:"full_verification"`

	// The advertiser's identification number.
	Id string `json:"id"`

	// The approval status of the advertiser.
	IsApproved P2PAdvertiserCreateRespP2PAdvertiserCreateIsApproved `json:"is_approved"`

	// Indicates if the advertiser's active adverts are listed. When `0`, adverts
	// won't be listed regardless if they are active or not.
	IsListed P2PAdvertiserCreateRespP2PAdvertiserCreateIsListed `json:"is_listed"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertiserCreateRespP2PAdvertiserCreateIsOnline `json:"is_online"`

	// Inidcates whether the advertiser's schedule allows P2P transactions at the
	// current time.
	IsScheduleAvailable P2PAdvertiserCreateRespP2PAdvertiserCreateIsScheduleAvailable `json:"is_schedule_available"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// Maximum order amount for adverts.
	MaxOrderAmount *string `json:"max_order_amount,omitempty"`

	// Sell ads will be hidden when your available balance or remaining daily sell
	// limit falls beneath this value.
	MinBalance *string `json:"min_balance,omitempty"`

	// Minimum order amount for adverts.
	MinOrderAmount *string `json:"min_order_amount,omitempty"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Number of different users the advertiser has traded with since registration.
	PartnerCount int `json:"partner_count"`

	// Advertiser's payment information.
	PaymentInfo string `json:"payment_info"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The average time in seconds taken to release funds as a seller within the past
	// 30 days.
	ReleaseTimeAvg *int `json:"release_time_avg"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserCreateRespP2PAdvertiserCreateScheduleElem `json:"schedule,omitempty"`

	// The percentage of completed orders out of total orders as a seller within the
	// past 30 days.
	SellCompletionRate *float64 `json:"sell_completion_rate"`

	// Sell order volume in the past 30 days.
	SellOrdersAmount string `json:"sell_orders_amount"`

	// The number of sell order orders completed within the past 30 days.
	SellOrdersCount int `json:"sell_orders_count"`

	// When `1`, the advertiser's real name will be displayed to other users on
	// adverts and orders.
	ShowName P2PAdvertiserCreateRespP2PAdvertiserCreateShowName `json:"show_name"`

	// The percentage of completed orders out of all orders within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`

	// The total number of orders completed since advertiser registration.
	TotalOrdersCount int `json:"total_orders_count"`

	// Total order volume since advertiser registration.
	TotalTurnover string `json:"total_turnover"`

	// Remaining withdrawal_limit of a non-fully authenticated advertiser.
	WithdrawalLimit *string `json:"withdrawal_limit,omitempty"`
}

P2P advertiser information.

func (*P2PAdvertiserCreateRespP2PAdvertiserCreate) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateBasicVerification ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateBasicVerification int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateBasicVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateFullVerification ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateFullVerification int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateFullVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsApproved ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsApproved int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateIsApproved) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsListed ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsListed int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateIsListed) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsOnline ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsOnline int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertiserCreateRespP2PAdvertiserCreateIsScheduleAvailable int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateScheduleElem ¶ added in v0.5.0

type P2PAdvertiserCreateRespP2PAdvertiserCreateScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily.

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateScheduleElem) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespP2PAdvertiserCreateShowName ¶

type P2PAdvertiserCreateRespP2PAdvertiserCreateShowName int

func (*P2PAdvertiserCreateRespP2PAdvertiserCreateShowName) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateRespSubscription ¶

type P2PAdvertiserCreateRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2PAdvertiserCreateRespSubscription) UnmarshalJSON ¶

func (j *P2PAdvertiserCreateRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateScheduleElem ¶ added in v0.5.0

type P2PAdvertiserCreateScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily. A null value will clear the existing schedule.

func (*P2PAdvertiserCreateScheduleElem) UnmarshalJSON ¶ added in v0.5.0

func (j *P2PAdvertiserCreateScheduleElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserCreateSubscribe ¶

type P2PAdvertiserCreateSubscribe int

func (*P2PAdvertiserCreateSubscribe) UnmarshalJSON ¶

func (j *P2PAdvertiserCreateSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfo ¶

type P2PAdvertiserInfo struct {
	// [Optional] The unique identifier for this advertiser. If not provided, returns
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PAdvertiserInfo P2PAdvertiserInfoP2PAdvertiserInfo `json:"p2p_advertiser_info"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserInfoPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is an update to
	// advertiser
	Subscribe *P2PAdvertiserInfoSubscribe `json:"subscribe,omitempty"`
}

Retrieve information about a P2P advertiser.

func (*P2PAdvertiserInfo) UnmarshalJSON ¶

func (j *P2PAdvertiserInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoP2PAdvertiserInfo ¶

type P2PAdvertiserInfoP2PAdvertiserInfo int

func (*P2PAdvertiserInfoP2PAdvertiserInfo) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoP2PAdvertiserInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoPassthrough ¶

type P2PAdvertiserInfoPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserInfoResp ¶

type P2PAdvertiserInfoResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserInfoRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserInfoRespMsgType `json:"msg_type"`

	// P2P advertiser information.
	P2PAdvertiserInfo *P2PAdvertiserInfoRespP2PAdvertiserInfo `json:"p2p_advertiser_info,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2PAdvertiserInfoRespSubscription `json:"subscription,omitempty"`
}

Returns information about the given advertiser ID.

func (*P2PAdvertiserInfoResp) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespEchoReq ¶

type P2PAdvertiserInfoRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserInfoRespMsgType ¶

type P2PAdvertiserInfoRespMsgType string
const P2PAdvertiserInfoRespMsgTypeP2PAdvertiserInfo P2PAdvertiserInfoRespMsgType = "p2p_advertiser_info"

func (*P2PAdvertiserInfoRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfo ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfo struct {
	// Number of active fixed rate adverts belonging to the advertiser.
	ActiveFixedAds *int `json:"active_fixed_ads,omitempty"`

	// Number of active floating rate adverts belonging to the advertiser.
	ActiveFloatAds *int `json:"active_float_ads,omitempty"`

	// Average difference of advert rate compared to the market rate over the past 30
	// days.
	AdvertRates *float64 `json:"advert_rates"`

	// Amount of funds available to sell on P2P. May be less than account balance
	// according to deposit methods used.
	BalanceAvailable *float64 `json:"balance_available,omitempty"`

	// Boolean value: 1 or 0, indicating whether the advertiser's identify has been
	// verified.
	BasicVerification P2PAdvertiserInfoRespP2PAdvertiserInfoBasicVerification `json:"basic_verification"`

	// Block trading limits, if block trading is allowed.
	BlockTrade *P2PAdvertiserInfoRespP2PAdvertiserInfoBlockTrade `json:"block_trade,omitempty"`

	// The number of P2P users who have blocked this advertiser.
	BlockedByCount *int `json:"blocked_by_count,omitempty"`

	// If a temporary bar was placed, this is the epoch time at which it will end.
	BlockedUntil *int `json:"blocked_until,omitempty"`

	// The percentage of completed orders out of total orders as a buyer within the
	// past 30 days.
	BuyCompletionRate *float64 `json:"buy_completion_rate"`

	// Buy order volume in the past 30 days.
	BuyOrdersAmount string `json:"buy_orders_amount"`

	// The number of buy order completed within the past 30 days.
	BuyOrdersCount int `json:"buy_orders_count"`

	// The average time in seconds taken to make payment as a buyer within the past 30
	// days.
	BuyTimeAvg *int `json:"buy_time_avg"`

	// The average time in seconds taken to cancel orders as a buyer within the past
	// 30 days.
	CancelTimeAvg *int `json:"cancel_time_avg"`

	// The number of times the user may cancel orders before being temporarily
	// blocked.
	CancelsRemaining *int `json:"cancels_remaining,omitempty"`

	// The token to be used for authenticating the client for chat.
	ChatToken *string `json:"chat_token,omitempty"`

	// The unique identifier for the chat user.
	ChatUserId *string `json:"chat_user_id,omitempty"`

	// Advertiser's contact information.
	ContactInfo *string `json:"contact_info,omitempty"`

	// The epoch time that the client became an advertiser.
	CreatedTime int `json:"created_time"`

	// Total value of P2P buy transactions in the past 24 hours.
	DailyBuy *string `json:"daily_buy,omitempty"`

	// Maximum allowed value of P2P buy transactions in a 24 hour period.
	DailyBuyLimit *string `json:"daily_buy_limit,omitempty"`

	// Total value of P2P sell transactions in the past 24 hours.
	DailySell *string `json:"daily_sell,omitempty"`

	// Maximum allowed value of P2P sell transactions in a 24 hour period.
	DailySellLimit *string `json:"daily_sell_limit,omitempty"`

	// Default description that can be used every time an advert is created.
	DefaultAdvertDescription string `json:"default_advert_description"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// Boolean value: 1 or 0, indicating whether the advertiser's address has been
	// verified.
	FullVerification P2PAdvertiserInfoRespP2PAdvertiserInfoFullVerification `json:"full_verification"`

	// The advertiser's identification number.
	Id string `json:"id"`

	// The approval status of the advertiser.
	IsApproved P2PAdvertiserInfoRespP2PAdvertiserInfoIsApproved `json:"is_approved"`

	// Indicates that the advertiser is blocked by the current user.
	IsBlocked *P2PAdvertiserInfoRespP2PAdvertiserInfoIsBlocked `json:"is_blocked,omitempty"`

	// Indicates that the advertiser is a favourite of the current user
	IsFavourite *P2PAdvertiserInfoRespP2PAdvertiserInfoIsFavourite `json:"is_favourite,omitempty"`

	// Indicates if the advertiser's active adverts are listed. When `0`, adverts
	// won't be listed regardless if they are active or not.
	IsListed P2PAdvertiserInfoRespP2PAdvertiserInfoIsListed `json:"is_listed"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertiserInfoRespP2PAdvertiserInfoIsOnline `json:"is_online"`

	// Indicates that the advertiser was recommended in the most recent review by the
	// current user.
	IsRecommended *P2PAdvertiserInfoRespP2PAdvertiserInfoIsRecommended `json:"is_recommended,omitempty"`

	// Inidcates whether the advertiser's schedule allows P2P transactions at the
	// current time.
	IsScheduleAvailable P2PAdvertiserInfoRespP2PAdvertiserInfoIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// Maximum order amount for adverts.
	MaxOrderAmount *string `json:"max_order_amount,omitempty"`

	// Sell ads will be hidden when your available balance or remaining daily sell
	// limit falls beneath this value.
	MinBalance *string `json:"min_balance,omitempty"`

	// Minimum order amount for adverts.
	MinOrderAmount *string `json:"min_order_amount,omitempty"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Number of different users the advertiser has traded with since registration.
	PartnerCount int `json:"partner_count"`

	// Advertiser's payment information.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The average time in seconds taken to release funds as a seller within the past
	// 30 days.
	ReleaseTimeAvg *int `json:"release_time_avg"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserInfoRespP2PAdvertiserInfoScheduleElem `json:"schedule,omitempty"`

	// The percentage of completed orders out of total orders as a seller within the
	// past 30 days.
	SellCompletionRate *float64 `json:"sell_completion_rate"`

	// Sell order volume in the past 30 days.
	SellOrdersAmount string `json:"sell_orders_amount"`

	// The number of sell order orders completed within the past 30 days.
	SellOrdersCount int `json:"sell_orders_count"`

	// When `1`, the advertiser's real name will be displayed on to other users on
	// adverts and orders.
	ShowName *P2PAdvertiserInfoRespP2PAdvertiserInfoShowName `json:"show_name,omitempty"`

	// The percentage of completed orders out of all orders within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`

	// The total number of orders completed since advertiser registration.
	TotalOrdersCount int `json:"total_orders_count"`

	// Total order volume since advertiser registration.
	TotalTurnover string `json:"total_turnover"`

	// New daily limits available.
	UpgradableDailyLimits *P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimits `json:"upgradable_daily_limits,omitempty"`

	// Remaining withdrawal_limit of a non-fully authenticated advertiser.
	WithdrawalLimit *string `json:"withdrawal_limit,omitempty"`
}

P2P advertiser information.

func (*P2PAdvertiserInfoRespP2PAdvertiserInfo) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoRespP2PAdvertiserInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoBasicVerification ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoBasicVerification int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoBasicVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoBlockTrade ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoBlockTrade struct {
	// Maximum order amount for block trade adverts.
	MaxOrderAmount string `json:"max_order_amount"`

	// Minimum order amount for block trade adverts.
	MinOrderAmount string `json:"min_order_amount"`
}

Block trading limits, if block trading is allowed.

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoFullVerification ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoFullVerification int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoFullVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsApproved ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsApproved int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsApproved) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsBlocked ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsBlocked int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsBlocked) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsFavourite ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsFavourite int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsFavourite) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsListed ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsListed int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsListed) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsOnline ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsOnline int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsRecommended ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsRecommended struct {
	Value interface{}
}

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertiserInfoRespP2PAdvertiserInfoIsScheduleAvailable int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoScheduleElem ¶ added in v0.5.0

type P2PAdvertiserInfoRespP2PAdvertiserInfoScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily.

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoScheduleElem) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoShowName ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoShowName int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoShowName) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimits ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimits struct {
	// When `1`, upgrade will provide block trading.
	BlockTrade *P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimitsBlockTrade `json:"block_trade,omitempty"`

	// Upgradable daily buy limit.
	MaxDailyBuy string `json:"max_daily_buy"`

	// Upgradable daily sell limit.
	MaxDailySell string `json:"max_daily_sell"`
}

New daily limits available.

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimits) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimitsBlockTrade ¶

type P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimitsBlockTrade int

func (*P2PAdvertiserInfoRespP2PAdvertiserInfoUpgradableDailyLimitsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoRespSubscription ¶

type P2PAdvertiserInfoRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2PAdvertiserInfoRespSubscription) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserInfoSubscribe ¶

type P2PAdvertiserInfoSubscribe int

func (*P2PAdvertiserInfoSubscribe) UnmarshalJSON ¶

func (j *P2PAdvertiserInfoSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserList ¶

type P2PAdvertiserList struct {
	// [Optional] Search for advertiser by name. Partial matches will be returned.
	AdvertiserName *string `json:"advertiser_name,omitempty"`

	// [Optional] Used to return only blocked or unblocked partners
	IsBlocked *P2PAdvertiserListIsBlocked `json:"is_blocked,omitempty"`

	// [Optional] Used for paging.
	Limit int `json:"limit,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used for paging.
	Offset int `json:"offset,omitempty"`

	// Must be 1
	P2PAdvertiserList P2PAdvertiserListP2PAdvertiserList `json:"p2p_advertiser_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] How the results are sorted.
	SortBy P2PAdvertiserListSortBy `json:"sort_by,omitempty"`

	// [Optional] Get all advertisers has/had trade.
	TradePartners *P2PAdvertiserListTradePartners `json:"trade_partners,omitempty"`
}

Retrieve advertisers has/had trade with the current advertiser.

func (*P2PAdvertiserList) UnmarshalJSON ¶

func (j *P2PAdvertiserList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListIsBlocked ¶

type P2PAdvertiserListIsBlocked int

func (*P2PAdvertiserListIsBlocked) UnmarshalJSON ¶

func (j *P2PAdvertiserListIsBlocked) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListP2PAdvertiserList ¶

type P2PAdvertiserListP2PAdvertiserList int

func (*P2PAdvertiserListP2PAdvertiserList) UnmarshalJSON ¶

func (j *P2PAdvertiserListP2PAdvertiserList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListPassthrough ¶

type P2PAdvertiserListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserListResp ¶

type P2PAdvertiserListResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserListRespMsgType `json:"msg_type"`

	// P2P advertiser list.
	P2PAdvertiserList *P2PAdvertiserListRespP2PAdvertiserList `json:"p2p_advertiser_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve advertisers has/had trade with the current advertiser.

func (*P2PAdvertiserListResp) UnmarshalJSON ¶

func (j *P2PAdvertiserListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespEchoReq ¶

type P2PAdvertiserListRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserListRespMsgType ¶

type P2PAdvertiserListRespMsgType string
const P2PAdvertiserListRespMsgTypeP2PAdvertiserList P2PAdvertiserListRespMsgType = "p2p_advertiser_list"

func (*P2PAdvertiserListRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserList ¶

type P2PAdvertiserListRespP2PAdvertiserList struct {
	// List of advertisers.
	List []P2PAdvertiserListRespP2PAdvertiserListListElem `json:"list"`
}

P2P advertiser list.

func (*P2PAdvertiserListRespP2PAdvertiserList) UnmarshalJSON ¶

func (j *P2PAdvertiserListRespP2PAdvertiserList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElem ¶

type P2PAdvertiserListRespP2PAdvertiserListListElem struct {
	// Average difference of advert rate compared to the market rate over the past 30
	// days.
	AdvertRates *float64 `json:"advert_rates"`

	// Boolean value: 1 or 0, indicating whether the advertiser's identify has been
	// verified.
	BasicVerification P2PAdvertiserListRespP2PAdvertiserListListElemBasicVerification `json:"basic_verification"`

	// The percentage of completed orders out of total orders as a buyer within the
	// past 30 days.
	BuyCompletionRate *float64 `json:"buy_completion_rate"`

	// Buy order volume in the past 30 days.
	BuyOrdersAmount string `json:"buy_orders_amount"`

	// The number of buy order completed within the past 30 days.
	BuyOrdersCount int `json:"buy_orders_count"`

	// The average time in seconds taken to make payment as a buyer within the past 30
	// days.
	BuyTimeAvg *int `json:"buy_time_avg"`

	// The average time in seconds taken to cancel orders as a buyer within the past
	// 30 days.
	CancelTimeAvg *int `json:"cancel_time_avg"`

	// The epoch time that the trade partner became an advertiser.
	CreatedTime int `json:"created_time"`

	// Default description that can be used every time an advert is created.
	DefaultAdvertDescription string `json:"default_advert_description"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// Boolean value: 1 or 0, indicating whether the advertiser's address has been
	// verified.
	FullVerification P2PAdvertiserListRespP2PAdvertiserListListElemFullVerification `json:"full_verification"`

	// The advertiser's identification number.
	Id string `json:"id"`

	// The approval status of the advertiser.
	IsApproved P2PAdvertiserListRespP2PAdvertiserListListElemIsApproved `json:"is_approved"`

	// Indicates that the advertiser is blocked by the current user.
	IsBlocked P2PAdvertiserListRespP2PAdvertiserListListElemIsBlocked `json:"is_blocked"`

	// Indicates if the trade partner is favourited by requester.
	IsFavourite *P2PAdvertiserListRespP2PAdvertiserListListElemIsFavourite `json:"is_favourite,omitempty"`

	// Indicates if the advertiser's active adverts are listed. When `0`, adverts
	// won't be listed regardless if they are active or not.
	IsListed P2PAdvertiserListRespP2PAdvertiserListListElemIsListed `json:"is_listed"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertiserListRespP2PAdvertiserListListElemIsOnline `json:"is_online"`

	// Indicates if the trade partner is recommended by requester.
	IsRecommended *P2PAdvertiserListRespP2PAdvertiserListListElemIsRecommended `json:"is_recommended,omitempty"`

	// Inidcates whether the advertiser's schedule allows P2P transactions at the
	// current time.
	IsScheduleAvailable P2PAdvertiserListRespP2PAdvertiserListListElemIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Number of different users the advertiser has traded with since registration.
	PartnerCount int `json:"partner_count"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The average time in seconds taken to release funds as a seller within the past
	// 30 days.
	ReleaseTimeAvg *int `json:"release_time_avg"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserListRespP2PAdvertiserListListElemScheduleElem `json:"schedule,omitempty"`

	// The percentage of completed orders out of total orders as a seller within the
	// past 30 days.
	SellCompletionRate *float64 `json:"sell_completion_rate"`

	// Sell order volume in the past 30 days.
	SellOrdersAmount string `json:"sell_orders_amount"`

	// The number of sell order orders completed within the past 30 days.
	SellOrdersCount int `json:"sell_orders_count"`

	// The percentage of completed orders out of all orders within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`

	// The total number of orders completed since advertiser registration.
	TotalOrdersCount int `json:"total_orders_count"`

	// Total order volume since advertiser registration.
	TotalTurnover string `json:"total_turnover"`
}

func (*P2PAdvertiserListRespP2PAdvertiserListListElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemBasicVerification ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemBasicVerification int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemBasicVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemFullVerification ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemFullVerification int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemFullVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsApproved ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsApproved int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsApproved) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsBlocked ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsBlocked int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsBlocked) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsFavourite ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsFavourite int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsFavourite) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsListed ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsListed int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsListed) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsOnline ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsOnline int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsRecommended ¶

type P2PAdvertiserListRespP2PAdvertiserListListElemIsRecommended int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertiserListRespP2PAdvertiserListListElemIsScheduleAvailable int

func (*P2PAdvertiserListRespP2PAdvertiserListListElemIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListRespP2PAdvertiserListListElemScheduleElem ¶ added in v0.5.0

type P2PAdvertiserListRespP2PAdvertiserListListElemScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily.

func (*P2PAdvertiserListRespP2PAdvertiserListListElemScheduleElem) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListSortBy ¶

type P2PAdvertiserListSortBy string
const P2PAdvertiserListSortByCreatedTime P2PAdvertiserListSortBy = "created_time"
const P2PAdvertiserListSortByLastInteractionTime P2PAdvertiserListSortBy = "last_interaction_time"
const P2PAdvertiserListSortByName P2PAdvertiserListSortBy = "name"

func (*P2PAdvertiserListSortBy) UnmarshalJSON ¶

func (j *P2PAdvertiserListSortBy) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserListTradePartners ¶

type P2PAdvertiserListTradePartners int

func (*P2PAdvertiserListTradePartners) UnmarshalJSON ¶

func (j *P2PAdvertiserListTradePartners) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethods ¶

type P2PAdvertiserPaymentMethods struct {
	// Contains new payment method entries.
	Create []P2PAdvertiserPaymentMethodsCreateElem `json:"create,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PAdvertiserPaymentMethods P2PAdvertiserPaymentMethodsP2PAdvertiserPaymentMethods `json:"p2p_advertiser_payment_methods"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserPaymentMethodsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Contains payment methods to update.
	Update P2PAdvertiserPaymentMethodsUpdate `json:"update,omitempty"`
}

Manage or list P2P advertiser payment methods.

func (*P2PAdvertiserPaymentMethods) UnmarshalJSON ¶

func (j *P2PAdvertiserPaymentMethods) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethodsCreateElem ¶

type P2PAdvertiserPaymentMethodsCreateElem struct {
	// Payment method identifer.
	Method string `json:"method"`
}

func (*P2PAdvertiserPaymentMethodsCreateElem) UnmarshalJSON ¶

func (j *P2PAdvertiserPaymentMethodsCreateElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethodsP2PAdvertiserPaymentMethods ¶

type P2PAdvertiserPaymentMethodsP2PAdvertiserPaymentMethods int

func (*P2PAdvertiserPaymentMethodsP2PAdvertiserPaymentMethods) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethodsPassthrough ¶

type P2PAdvertiserPaymentMethodsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserPaymentMethodsResp ¶

type P2PAdvertiserPaymentMethodsResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserPaymentMethodsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserPaymentMethodsRespMsgType `json:"msg_type"`

	// List of current methods.
	P2PAdvertiserPaymentMethods P2PAdvertiserPaymentMethodsRespP2PAdvertiserPaymentMethods `json:"p2p_advertiser_payment_methods,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

List P2P advertiser payment methods.

func (*P2PAdvertiserPaymentMethodsResp) UnmarshalJSON ¶

func (j *P2PAdvertiserPaymentMethodsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethodsRespEchoReq ¶

type P2PAdvertiserPaymentMethodsRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserPaymentMethodsRespMsgType ¶

type P2PAdvertiserPaymentMethodsRespMsgType string
const P2PAdvertiserPaymentMethodsRespMsgTypeP2PAdvertiserPaymentMethods P2PAdvertiserPaymentMethodsRespMsgType = "p2p_advertiser_payment_methods"

func (*P2PAdvertiserPaymentMethodsRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserPaymentMethodsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserPaymentMethodsRespP2PAdvertiserPaymentMethods ¶

type P2PAdvertiserPaymentMethodsRespP2PAdvertiserPaymentMethods map[string]interface{}

List of current methods.

type P2PAdvertiserPaymentMethodsUpdate ¶

type P2PAdvertiserPaymentMethodsUpdate map[string]interface{}

Contains payment methods to update.

type P2PAdvertiserRelations ¶

type P2PAdvertiserRelations struct {
	// IDs of advertisers to block.
	AddBlocked []float64 `json:"add_blocked,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PAdvertiserRelations P2PAdvertiserRelationsP2PAdvertiserRelations `json:"p2p_advertiser_relations"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserRelationsPassthrough `json:"passthrough,omitempty"`

	// IDs of advertisers to remove from blocked.
	RemoveBlocked []float64 `json:"remove_blocked,omitempty"`

	// IDs of advertisers to remove from favourites.
	RemoveFavourites []float64 `json:"remove_favourites,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Updates and returns favourite and blocked advertisers of the current user.

func (*P2PAdvertiserRelations) UnmarshalJSON ¶

func (j *P2PAdvertiserRelations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserRelationsP2PAdvertiserRelations ¶

type P2PAdvertiserRelationsP2PAdvertiserRelations int

func (*P2PAdvertiserRelationsP2PAdvertiserRelations) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserRelationsPassthrough ¶

type P2PAdvertiserRelationsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserRelationsResp ¶

type P2PAdvertiserRelationsResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserRelationsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserRelationsRespMsgType `json:"msg_type"`

	// P2P advertiser relations information.
	P2PAdvertiserRelations *P2PAdvertiserRelationsRespP2PAdvertiserRelations `json:"p2p_advertiser_relations,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns information about favourite and blocked advertisers.

func (*P2PAdvertiserRelationsResp) UnmarshalJSON ¶

func (j *P2PAdvertiserRelationsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserRelationsRespEchoReq ¶

type P2PAdvertiserRelationsRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserRelationsRespMsgType ¶

type P2PAdvertiserRelationsRespMsgType string
const P2PAdvertiserRelationsRespMsgTypeP2PAdvertiserRelations P2PAdvertiserRelationsRespMsgType = "p2p_advertiser_relations"

func (*P2PAdvertiserRelationsRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserRelationsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserRelationsRespP2PAdvertiserRelations ¶

type P2PAdvertiserRelationsRespP2PAdvertiserRelations struct {
	// List of advertisers blocked by the current user.
	BlockedAdvertisers []P2PAdvertiserRelationsRespP2PAdvertiserRelationsBlockedAdvertisersElem `json:"blocked_advertisers"`

	// Favourite advertisers of the current user.
	FavouriteAdvertisers []P2PAdvertiserRelationsRespP2PAdvertiserRelationsFavouriteAdvertisersElem `json:"favourite_advertisers"`
}

P2P advertiser relations information.

func (*P2PAdvertiserRelationsRespP2PAdvertiserRelations) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserRelationsRespP2PAdvertiserRelationsBlockedAdvertisersElem ¶

type P2PAdvertiserRelationsRespP2PAdvertiserRelationsBlockedAdvertisersElem struct {
	// The epoch time that the advertiser was blocked.
	CreatedTime *int `json:"created_time,omitempty"`

	// Advertiser unique identifer.
	Id *string `json:"id,omitempty"`

	// Advertiser displayed name.
	Name *string `json:"name,omitempty"`
}

Advertiser details.

type P2PAdvertiserRelationsRespP2PAdvertiserRelationsFavouriteAdvertisersElem ¶

type P2PAdvertiserRelationsRespP2PAdvertiserRelationsFavouriteAdvertisersElem struct {
	// The epoch time that the advertiser was set as favourite.
	CreatedTime *int `json:"created_time,omitempty"`

	// Advertiser unique identifer.
	Id *string `json:"id,omitempty"`

	// Advertiser displayed name.
	Name *string `json:"name,omitempty"`
}

Advertiser details.

type P2PAdvertiserUpdate ¶

type P2PAdvertiserUpdate struct {
	// [Optional] Advertiser's contact information, to be used as a default for new
	// sell adverts.
	ContactInfo *string `json:"contact_info,omitempty"`

	// [Optional] Default description that can be used every time an advert is
	// created.
	DefaultAdvertDescription *string `json:"default_advert_description,omitempty"`

	// [Optional] Used to set if the advertiser's adverts could be listed. When `0`,
	// adverts won't be listed regardless of they are active or not. This doesn't
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PAdvertiserUpdate P2PAdvertiserUpdateP2PAdvertiserUpdate `json:"p2p_advertiser_update"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PAdvertiserUpdatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Advertiser's payment information, to be used as a default for new
	// sell adverts.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserUpdateScheduleElem `json:"schedule,omitempty"`

	// [Optional] When `1`, the advertiser's real name will be displayed on to other
	// users on adverts and orders.
	ShowName *P2PAdvertiserUpdateShowName `json:"show_name,omitempty"`

	// [Optional] Used to upgrade daily limits of eligible advertiser.
	UpgradeLimits *P2PAdvertiserUpdateUpgradeLimits `json:"upgrade_limits,omitempty"`
}

Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.

func (*P2PAdvertiserUpdate) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateIsListed ¶

type P2PAdvertiserUpdateIsListed int

func (*P2PAdvertiserUpdateIsListed) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateIsListed) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateP2PAdvertiserUpdate ¶

type P2PAdvertiserUpdateP2PAdvertiserUpdate int

func (*P2PAdvertiserUpdateP2PAdvertiserUpdate) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateP2PAdvertiserUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdatePassthrough ¶

type P2PAdvertiserUpdatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PAdvertiserUpdateResp ¶

type P2PAdvertiserUpdateResp struct {
	// Echo of the request made.
	EchoReq P2PAdvertiserUpdateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PAdvertiserUpdateRespMsgType `json:"msg_type"`

	// P2P advertiser information.
	P2PAdvertiserUpdate *P2PAdvertiserUpdateRespP2PAdvertiserUpdate `json:"p2p_advertiser_update,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Returns latest information of the advertiser.

func (*P2PAdvertiserUpdateResp) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespEchoReq ¶

type P2PAdvertiserUpdateRespEchoReq map[string]interface{}

Echo of the request made.

type P2PAdvertiserUpdateRespMsgType ¶

type P2PAdvertiserUpdateRespMsgType string
const P2PAdvertiserUpdateRespMsgTypeP2PAdvertiserUpdate P2PAdvertiserUpdateRespMsgType = "p2p_advertiser_update"

func (*P2PAdvertiserUpdateRespMsgType) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdate ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdate struct {
	// Number of active fixed rate adverts belonging to the advertiser.
	ActiveFixedAds *int `json:"active_fixed_ads,omitempty"`

	// Number of active floating rate adverts belonging to the advertiser.
	ActiveFloatAds *int `json:"active_float_ads,omitempty"`

	// Average difference of advert rate compared to the market rate over the past 30
	// days.
	AdvertRates *float64 `json:"advert_rates"`

	// Amount of funds available to sell on P2P. May be less than account balance
	// according to deposit methods used.
	BalanceAvailable float64 `json:"balance_available"`

	// Boolean value: 1 or 0, indicating whether the advertiser's identify has been
	// verified.
	BasicVerification P2PAdvertiserUpdateRespP2PAdvertiserUpdateBasicVerification `json:"basic_verification"`

	// Block trading limits, if block trading is allowed.
	BlockTrade *P2PAdvertiserUpdateRespP2PAdvertiserUpdateBlockTrade `json:"block_trade,omitempty"`

	// The number of P2P users who have blocked this advertiser.
	BlockedByCount int `json:"blocked_by_count"`

	// If a temporary bar was placed, this is the epoch time at which it will end.
	BlockedUntil *int `json:"blocked_until,omitempty"`

	// The percentage of completed orders out of total orders as a buyer within the
	// past 30 days.
	BuyCompletionRate *float64 `json:"buy_completion_rate"`

	// Buy order volume in the past 30 days.
	BuyOrdersAmount string `json:"buy_orders_amount"`

	// The number of buy order completed within the past 30 days.
	BuyOrdersCount int `json:"buy_orders_count"`

	// The average time in seconds taken to make payment as a buyer within the past 30
	// days.
	BuyTimeAvg *int `json:"buy_time_avg"`

	// The average time in seconds taken to cancel orders as a buyer within the past
	// 30 days.
	CancelTimeAvg *int `json:"cancel_time_avg"`

	// The number of times the user may cancel orders before being temporarily
	// blocked.
	CancelsRemaining int `json:"cancels_remaining"`

	// The token to be used for authenticating the client for chat.
	ChatToken *string `json:"chat_token"`

	// The unique identifier for the chat user.
	ChatUserId *string `json:"chat_user_id"`

	// Advertiser's contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time that the client became an advertiser.
	CreatedTime int `json:"created_time"`

	// Total value of P2P buy transactions in the past 24 hours.
	DailyBuy *string `json:"daily_buy,omitempty"`

	// Maximum allowed value of P2P buy transactions in a 24 hour period.
	DailyBuyLimit *string `json:"daily_buy_limit,omitempty"`

	// Total value of P2P sell transactions in the past 24 hours.
	DailySell *string `json:"daily_sell,omitempty"`

	// Maximum allowed value of P2P sell transactions in a 24 hour period.
	DailySellLimit *string `json:"daily_sell_limit,omitempty"`

	// Default description that can be used every time an advert is created.
	DefaultAdvertDescription string `json:"default_advert_description"`

	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// Boolean value: 1 or 0, indicating whether the advertiser's address has been
	// verified.
	FullVerification P2PAdvertiserUpdateRespP2PAdvertiserUpdateFullVerification `json:"full_verification"`

	// The advertiser's identification number.
	Id string `json:"id"`

	// The approval status of the advertiser.
	IsApproved P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsApproved `json:"is_approved"`

	// Indicates if the advertiser's active adverts are listed. When `0`, adverts
	// won't be listed regardless if they are active or not.
	IsListed P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsListed `json:"is_listed"`

	// Indicates if the advertiser is currently online.
	IsOnline P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsOnline `json:"is_online"`

	// Inidcates whether the advertiser's schedule allows P2P transactions at the
	// current time.
	IsScheduleAvailable P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsScheduleAvailable `json:"is_schedule_available"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// Maximum order amount for adverts.
	MaxOrderAmount *string `json:"max_order_amount,omitempty"`

	// Sell ads will be hidden when your available balance or remaining daily sell
	// limit falls beneath this value.
	MinBalance *string `json:"min_balance,omitempty"`

	// Minimum order amount for adverts.
	MinOrderAmount *string `json:"min_order_amount,omitempty"`

	// The advertiser's displayed name.
	Name string `json:"name"`

	// Number of different users the advertiser has traded with since registration.
	PartnerCount int `json:"partner_count"`

	// Advertiser's payment information.
	PaymentInfo string `json:"payment_info"`

	// Average rating of the advertiser, range is 1-5.
	RatingAverage *float64 `json:"rating_average"`

	// Number of ratings given to the advertiser.
	RatingCount int `json:"rating_count"`

	// Percentage of users who have recommended the advertiser.
	RecommendedAverage *float64 `json:"recommended_average"`

	// Number of times the advertiser has been recommended.
	RecommendedCount *int `json:"recommended_count"`

	// The average time in seconds taken to release funds as a seller within the past
	// 30 days.
	ReleaseTimeAvg *int `json:"release_time_avg"`

	// [Optional] Weekly availability schedule. Ads are visible and orders can be
	// created only during available periods.
	Schedule []P2PAdvertiserUpdateRespP2PAdvertiserUpdateScheduleElem `json:"schedule,omitempty"`

	// The percentage of completed orders out of total orders as a seller within the
	// past 30 days.
	SellCompletionRate *float64 `json:"sell_completion_rate"`

	// Sell order volume in the past 30 days.
	SellOrdersAmount string `json:"sell_orders_amount"`

	// The number of sell order orders completed within the past 30 days.
	SellOrdersCount int `json:"sell_orders_count"`

	// When `1`, the advertiser's real name will be displayed on to other users on
	// adverts and orders.
	ShowName P2PAdvertiserUpdateRespP2PAdvertiserUpdateShowName `json:"show_name"`

	// The percentage of completed orders out of all orders within the past 30 days.
	TotalCompletionRate *float64 `json:"total_completion_rate"`

	// The total number of orders completed since advertiser registration.
	TotalOrdersCount int `json:"total_orders_count"`

	// Total order volume since advertiser registration.
	TotalTurnover string `json:"total_turnover"`

	// New daily limits available.
	UpgradableDailyLimits *P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimits `json:"upgradable_daily_limits,omitempty"`

	// Remaining withdrawal_limit of a non-fully authenticated advertiser.
	WithdrawalLimit *string `json:"withdrawal_limit,omitempty"`
}

P2P advertiser information.

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdate) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateBasicVerification ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateBasicVerification int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateBasicVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateBlockTrade ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateBlockTrade struct {
	// Maximum order amount for block trade adverts.
	MaxOrderAmount string `json:"max_order_amount"`

	// Minimum order amount for block trade adverts.
	MinOrderAmount string `json:"min_order_amount"`
}

Block trading limits, if block trading is allowed.

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateFullVerification ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateFullVerification int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateFullVerification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsApproved ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsApproved int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsApproved) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsListed ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsListed int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsListed) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsOnline ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsOnline int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsScheduleAvailable ¶ added in v0.5.0

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsScheduleAvailable int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateIsScheduleAvailable) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateScheduleElem ¶ added in v0.5.0

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily.

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateScheduleElem) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateShowName ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateShowName int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateShowName) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimits ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimits struct {
	// When `1`, upgrade will provide block trading.
	BlockTrade *P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimitsBlockTrade `json:"block_trade,omitempty"`

	// Upgradable daily buy limit.
	MaxDailyBuy string `json:"max_daily_buy"`

	// Upgradable daily sell limit.
	MaxDailySell string `json:"max_daily_sell"`
}

New daily limits available.

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimits) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimitsBlockTrade ¶

type P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimitsBlockTrade int

func (*P2PAdvertiserUpdateRespP2PAdvertiserUpdateUpgradableDailyLimitsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateScheduleElem ¶ added in v0.5.0

type P2PAdvertiserUpdateScheduleElem struct {
	// Minute of week when availablility ends. Zero is Sunday 00:00 UST.
	EndMin *int `json:"end_min"`

	// Minute of week when availablility starts. Zero is Sunday 00:00 UST.
	StartMin *int `json:"start_min"`
}

Periods of availabily. A null value will clear the existing schedule.

func (*P2PAdvertiserUpdateScheduleElem) UnmarshalJSON ¶ added in v0.5.0

func (j *P2PAdvertiserUpdateScheduleElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateShowName ¶

type P2PAdvertiserUpdateShowName int

func (*P2PAdvertiserUpdateShowName) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateShowName) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PAdvertiserUpdateUpgradeLimits ¶

type P2PAdvertiserUpdateUpgradeLimits int

func (*P2PAdvertiserUpdateUpgradeLimits) UnmarshalJSON ¶

func (j *P2PAdvertiserUpdateUpgradeLimits) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PChatCreate ¶

type P2PChatCreate struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// The unique identifier for the order to create the chat for.
	OrderId string `json:"order_id"`

	// Must be 1
	P2PChatCreate P2PChatCreateP2PChatCreate `json:"p2p_chat_create"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PChatCreatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Creates a P2P chat for the specified order.

func (*P2PChatCreate) UnmarshalJSON ¶

func (j *P2PChatCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PChatCreateP2PChatCreate ¶

type P2PChatCreateP2PChatCreate int

func (*P2PChatCreateP2PChatCreate) UnmarshalJSON ¶

func (j *P2PChatCreateP2PChatCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PChatCreatePassthrough ¶

type P2PChatCreatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PChatCreateResp ¶

type P2PChatCreateResp struct {
	// Echo of the request made.
	EchoReq P2PChatCreateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PChatCreateRespMsgType `json:"msg_type"`

	// Information of the P2P chat.
	P2PChatCreate *P2PChatCreateRespP2PChatCreate `json:"p2p_chat_create,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Information of the created P2P chat.

func (*P2PChatCreateResp) UnmarshalJSON ¶

func (j *P2PChatCreateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PChatCreateRespEchoReq ¶

type P2PChatCreateRespEchoReq map[string]interface{}

Echo of the request made.

type P2PChatCreateRespMsgType ¶

type P2PChatCreateRespMsgType string
const P2PChatCreateRespMsgTypeP2PChatCreate P2PChatCreateRespMsgType = "p2p_chat_create"

func (*P2PChatCreateRespMsgType) UnmarshalJSON ¶

func (j *P2PChatCreateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PChatCreateRespP2PChatCreate ¶

type P2PChatCreateRespP2PChatCreate struct {
	// The URL to be used to initialise the chat for the requested order.
	ChannelUrl string `json:"channel_url"`

	// The unique identifier for the order that the chat belongs to.
	OrderId string `json:"order_id"`
}

Information of the P2P chat.

func (*P2PChatCreateRespP2PChatCreate) UnmarshalJSON ¶

func (j *P2PChatCreateRespP2PChatCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PCountryList ¶ added in v0.4.21

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PCountryList P2PCountryListP2PCountryList `json:"p2p_country_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PCountryListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

List all or specific country and its payment methods.

func (*P2PCountryList) UnmarshalJSON ¶ added in v0.4.21

func (j *P2PCountryList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PCountryListP2PCountryList ¶ added in v0.4.21

type P2PCountryListP2PCountryList int

func (*P2PCountryListP2PCountryList) UnmarshalJSON ¶ added in v0.4.21

func (j *P2PCountryListP2PCountryList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PCountryListPassthrough ¶ added in v0.4.21

type P2PCountryListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PCountryListResp ¶ added in v0.4.21

type P2PCountryListResp struct {
	// Echo of the request made.
	EchoReq P2PCountryListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PCountryListRespMsgType `json:"msg_type"`

	// Country identified by country code
	P2PCountryList P2PCountryListRespP2PCountryList `json:"p2p_country_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

List all or specific country and its payment methods.

func (*P2PCountryListResp) UnmarshalJSON ¶ added in v0.4.21

func (j *P2PCountryListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PCountryListRespEchoReq ¶ added in v0.4.21

type P2PCountryListRespEchoReq map[string]interface{}

Echo of the request made.

type P2PCountryListRespMsgType ¶ added in v0.4.21

type P2PCountryListRespMsgType string
const P2PCountryListRespMsgTypeP2PCountryList P2PCountryListRespMsgType = "p2p_country_list"

func (*P2PCountryListRespMsgType) UnmarshalJSON ¶ added in v0.4.21

func (j *P2PCountryListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PCountryListRespP2PCountryList ¶ added in v0.4.21

type P2PCountryListRespP2PCountryList map[string]interface{}

Country identified by country code

type P2POrderCancel ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2POrderCancel P2POrderCancelP2POrderCancel `json:"p2p_order_cancel"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderCancelPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Cancel a P2P order.

func (*P2POrderCancel) UnmarshalJSON ¶

func (j *P2POrderCancel) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCancelP2POrderCancel ¶

type P2POrderCancelP2POrderCancel int

func (*P2POrderCancelP2POrderCancel) UnmarshalJSON ¶

func (j *P2POrderCancelP2POrderCancel) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCancelPassthrough ¶

type P2POrderCancelPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderCancelResp ¶

type P2POrderCancelResp struct {
	// Echo of the request made.
	EchoReq P2POrderCancelRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderCancelRespMsgType `json:"msg_type"`

	// Cancellation details
	P2POrderCancel *P2POrderCancelRespP2POrderCancel `json:"p2p_order_cancel,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Result of the P2P order cancellation.

func (*P2POrderCancelResp) UnmarshalJSON ¶

func (j *P2POrderCancelResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCancelRespEchoReq ¶

type P2POrderCancelRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderCancelRespMsgType ¶

type P2POrderCancelRespMsgType string
const P2POrderCancelRespMsgTypeP2POrderCancel P2POrderCancelRespMsgType = "p2p_order_cancel"

func (*P2POrderCancelRespMsgType) UnmarshalJSON ¶

func (j *P2POrderCancelRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCancelRespP2POrderCancel ¶

type P2POrderCancelRespP2POrderCancel struct {
	// The unique identifier for the order.
	Id string `json:"id"`

	// The new status of the order.
	Status P2POrderCancelRespP2POrderCancelStatus `json:"status"`
}

Cancellation details

func (*P2POrderCancelRespP2POrderCancel) UnmarshalJSON ¶

func (j *P2POrderCancelRespP2POrderCancel) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCancelRespP2POrderCancelStatus ¶

type P2POrderCancelRespP2POrderCancelStatus string
const P2POrderCancelRespP2POrderCancelStatusCancelled P2POrderCancelRespP2POrderCancelStatus = "cancelled"

func (*P2POrderCancelRespP2POrderCancelStatus) UnmarshalJSON ¶

func (j *P2POrderCancelRespP2POrderCancelStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirm ¶

type P2POrderConfirm struct {
	// [Optional] If set to `1`, only validation is performed.
	DryRun P2POrderConfirmDryRun `json:"dry_run,omitempty"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2POrderConfirm P2POrderConfirmP2POrderConfirm `json:"p2p_order_confirm"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderConfirmPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Verification code received from email.
	VerificationCode *string `json:"verification_code,omitempty"`
}

Confirm a P2P order.

func (*P2POrderConfirm) UnmarshalJSON ¶

func (j *P2POrderConfirm) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmDryRun ¶

type P2POrderConfirmDryRun int

func (*P2POrderConfirmDryRun) UnmarshalJSON ¶

func (j *P2POrderConfirmDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmP2POrderConfirm ¶

type P2POrderConfirmP2POrderConfirm int

func (*P2POrderConfirmP2POrderConfirm) UnmarshalJSON ¶

func (j *P2POrderConfirmP2POrderConfirm) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmPassthrough ¶

type P2POrderConfirmPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderConfirmResp ¶

type P2POrderConfirmResp struct {
	// Echo of the request made.
	EchoReq P2POrderConfirmRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderConfirmRespMsgType `json:"msg_type"`

	// Confirmation details
	P2POrderConfirm *P2POrderConfirmRespP2POrderConfirm `json:"p2p_order_confirm,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Result of the P2P order confirmation.

func (*P2POrderConfirmResp) UnmarshalJSON ¶

func (j *P2POrderConfirmResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmRespEchoReq ¶

type P2POrderConfirmRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderConfirmRespMsgType ¶

type P2POrderConfirmRespMsgType string
const P2POrderConfirmRespMsgTypeP2POrderConfirm P2POrderConfirmRespMsgType = "p2p_order_confirm"

func (*P2POrderConfirmRespMsgType) UnmarshalJSON ¶

func (j *P2POrderConfirmRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmRespP2POrderConfirm ¶

type P2POrderConfirmRespP2POrderConfirm struct {
	// The `dry_run` was successful.
	DryRun *P2POrderConfirmRespP2POrderConfirmDryRun `json:"dry_run,omitempty"`

	// The unique identifier for the order.
	Id string `json:"id"`

	// The new status of the order.
	Status *P2POrderConfirmRespP2POrderConfirmStatus `json:"status,omitempty"`
}

Confirmation details

func (*P2POrderConfirmRespP2POrderConfirm) UnmarshalJSON ¶

func (j *P2POrderConfirmRespP2POrderConfirm) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmRespP2POrderConfirmDryRun ¶

type P2POrderConfirmRespP2POrderConfirmDryRun int

func (*P2POrderConfirmRespP2POrderConfirmDryRun) UnmarshalJSON ¶

func (j *P2POrderConfirmRespP2POrderConfirmDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderConfirmRespP2POrderConfirmStatus ¶

type P2POrderConfirmRespP2POrderConfirmStatus string
const P2POrderConfirmRespP2POrderConfirmStatusBuyerConfirmed P2POrderConfirmRespP2POrderConfirmStatus = "buyer-confirmed"
const P2POrderConfirmRespP2POrderConfirmStatusCompleted P2POrderConfirmRespP2POrderConfirmStatus = "completed"

func (*P2POrderConfirmRespP2POrderConfirmStatus) UnmarshalJSON ¶

func (j *P2POrderConfirmRespP2POrderConfirmStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreate ¶

type P2POrderCreate struct {
	// The unique identifier for the advert to create an order against.
	AdvertId string `json:"advert_id"`

	// The amount of currency to be bought or sold.
	Amount float64 `json:"amount"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2POrderCreate P2POrderCreateP2POrderCreate `json:"p2p_order_create"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderCreatePassthrough `json:"passthrough,omitempty"`

	// [Optional] Payment instructions, only applicable for sell orders.
	PaymentInfo *string `json:"payment_info,omitempty"`

	// IDs of payment methods, only applicable for sell orders.
	PaymentMethodIds []int `json:"payment_method_ids,omitempty"`

	// [Optional] Conversion rate from account currency to local currency, only
	// applicable for floating rate adverts.
	Rate *float64 `json:"rate,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is an update to the
	// order.
	Subscribe *P2POrderCreateSubscribe `json:"subscribe,omitempty"`
}

Creates a P2P order for the specified advert.

func (*P2POrderCreate) UnmarshalJSON ¶

func (j *P2POrderCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateP2POrderCreate ¶

type P2POrderCreateP2POrderCreate int

func (*P2POrderCreateP2POrderCreate) UnmarshalJSON ¶

func (j *P2POrderCreateP2POrderCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreatePassthrough ¶

type P2POrderCreatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderCreateResp ¶

type P2POrderCreateResp struct {
	// Echo of the request made.
	EchoReq P2POrderCreateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderCreateRespMsgType `json:"msg_type"`

	// Information of the creates P2P order.
	P2POrderCreate *P2POrderCreateRespP2POrderCreate `json:"p2p_order_create,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2POrderCreateRespSubscription `json:"subscription,omitempty"`
}

The information about the created P2P order.

func (*P2POrderCreateResp) UnmarshalJSON ¶

func (j *P2POrderCreateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespEchoReq ¶

type P2POrderCreateRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderCreateRespMsgType ¶

type P2POrderCreateRespMsgType string
const P2POrderCreateRespMsgTypeP2POrderCreate P2POrderCreateRespMsgType = "p2p_order_create"

func (*P2POrderCreateRespMsgType) UnmarshalJSON ¶

func (j *P2POrderCreateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreate ¶

type P2POrderCreateRespP2POrderCreate struct {
	// The currency of order.
	AccountCurrency string `json:"account_currency"`

	// Details of the advert for this order.
	AdvertDetails P2POrderCreateRespP2POrderCreateAdvertDetails `json:"advert_details"`

	// Details of the advertiser for this order.
	AdvertiserDetails P2POrderCreateRespP2POrderCreateAdvertiserDetails `json:"advertiser_details"`

	// The amount of the order.
	Amount float64 `json:"amount"`

	// The amount of the order, formatted to appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// The URL to be used to initialise the chat for this order.
	ChatChannelUrl string `json:"chat_channel_url"`

	// Details of the client who created the order.
	ClientDetails P2POrderCreateRespP2POrderCreateClientDetails `json:"client_details"`

	// Seller contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time of the order creation.
	CreatedTime int `json:"created_time"`

	// Details of the order dispute.
	DisputeDetails P2POrderCreateRespP2POrderCreateDisputeDetails `json:"dispute_details"`

	// The epoch time in which the order will be expired.
	ExpiryTime int `json:"expiry_time"`

	// The unique identifier for this order.
	Id string `json:"id"`

	// `1` if the order is created for the advert of the current client, otherwise
	// `0`.
	IsIncoming P2POrderCreateRespP2POrderCreateIsIncoming `json:"is_incoming"`

	// `1` if a review can be given, otherwise `0`.
	IsReviewable P2POrderCreateRespP2POrderCreateIsReviewable `json:"is_reviewable"`

	// `1` if the latest order changes have been seen by the current client, otherwise
	// `0`.
	IsSeen P2POrderCreateRespP2POrderCreateIsSeen `json:"is_seen"`

	// Local currency for this order.
	LocalCurrency string `json:"local_currency"`

	// Payment instructions.
	PaymentInfo string `json:"payment_info"`

	// Supported payment methods. Comma separated list.
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Details of available payment methods.
	PaymentMethodDetails P2POrderCreateRespP2POrderCreatePaymentMethodDetails `json:"payment_method_details,omitempty"`

	// Cost in local currency.
	Price float64 `json:"price"`

	// Cost in local currency, formatted to appropriate decimal places.
	PriceDisplay string `json:"price_display"`

	// Conversion rate of the order.
	Rate float64 `json:"rate"`

	// Conversion rate of the order, formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// The status of the created order.
	Status P2POrderCreateRespP2POrderCreateStatus `json:"status"`

	// Type of the order.
	Type P2POrderCreateRespP2POrderCreateType `json:"type"`
}

Information of the creates P2P order.

func (*P2POrderCreateRespP2POrderCreate) UnmarshalJSON ¶

func (j *P2POrderCreateRespP2POrderCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertDetails ¶

type P2POrderCreateRespP2POrderCreateAdvertDetails struct {
	// Indicates if this is block trade advert or not.
	BlockTrade P2POrderCreateRespP2POrderCreateAdvertDetailsBlockTrade `json:"block_trade"`

	// General information about the advert.
	Description string `json:"description"`

	// The unique identifier for the advert.
	Id string `json:"id"`

	// The payment method.
	PaymentMethod *string `json:"payment_method"`

	// Type of the advert.
	Type P2POrderCreateRespP2POrderCreateAdvertDetailsType `json:"type"`
}

Details of the advert for this order.

func (*P2POrderCreateRespP2POrderCreateAdvertDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertDetailsBlockTrade ¶

type P2POrderCreateRespP2POrderCreateAdvertDetailsBlockTrade int

func (*P2POrderCreateRespP2POrderCreateAdvertDetailsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertDetailsType ¶

type P2POrderCreateRespP2POrderCreateAdvertDetailsType string
const P2POrderCreateRespP2POrderCreateAdvertDetailsTypeBuy P2POrderCreateRespP2POrderCreateAdvertDetailsType = "buy"
const P2POrderCreateRespP2POrderCreateAdvertDetailsTypeSell P2POrderCreateRespP2POrderCreateAdvertDetailsType = "sell"

func (*P2POrderCreateRespP2POrderCreateAdvertDetailsType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertiserDetails ¶

type P2POrderCreateRespP2POrderCreateAdvertiserDetails struct {
	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsOnline `json:"is_online"`

	// Optional field, indicates if the advertiser is recommended.
	IsRecommended *P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsRecommended `json:"is_recommended,omitempty"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's account identifier.
	Loginid string `json:"loginid"`

	// The advertiser's displayed name.
	Name string `json:"name"`
}

Details of the advertiser for this order.

func (*P2POrderCreateRespP2POrderCreateAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsOnline ¶

type P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsOnline int

func (*P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsRecommended ¶ added in v0.5.9

type P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsRecommended struct {
	Value interface{}
}

func (*P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsRecommended) MarshalJSON ¶ added in v0.5.9

MarshalJSON implements json.Marshaler.

func (*P2POrderCreateRespP2POrderCreateAdvertiserDetailsIsRecommended) UnmarshalJSON ¶ added in v0.5.9

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateClientDetails ¶

type P2POrderCreateRespP2POrderCreateClientDetails struct {
	// The client's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The client's unique P2P identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderCreateRespP2POrderCreateClientDetailsIsOnline `json:"is_online"`

	// The client's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The client's account identifier.
	Loginid string `json:"loginid"`

	// The client's displayed name.
	Name string `json:"name"`
}

Details of the client who created the order.

func (*P2POrderCreateRespP2POrderCreateClientDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateClientDetailsIsOnline ¶

type P2POrderCreateRespP2POrderCreateClientDetailsIsOnline int

func (*P2POrderCreateRespP2POrderCreateClientDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateDisputeDetails ¶

type P2POrderCreateRespP2POrderCreateDisputeDetails struct {
	// The dispute reason
	DisputeReason *string `json:"dispute_reason"`

	// The loginid of the client who's raising the dispute
	DisputerLoginid *string `json:"disputer_loginid"`
}

Details of the order dispute.

func (*P2POrderCreateRespP2POrderCreateDisputeDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateIsIncoming ¶

type P2POrderCreateRespP2POrderCreateIsIncoming int

func (*P2POrderCreateRespP2POrderCreateIsIncoming) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateIsReviewable ¶

type P2POrderCreateRespP2POrderCreateIsReviewable int

func (*P2POrderCreateRespP2POrderCreateIsReviewable) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateIsSeen ¶

type P2POrderCreateRespP2POrderCreateIsSeen int

func (*P2POrderCreateRespP2POrderCreateIsSeen) UnmarshalJSON ¶

func (j *P2POrderCreateRespP2POrderCreateIsSeen) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreatePaymentMethodDetails ¶

type P2POrderCreateRespP2POrderCreatePaymentMethodDetails map[string]interface{}

Details of available payment methods.

type P2POrderCreateRespP2POrderCreateStatus ¶

type P2POrderCreateRespP2POrderCreateStatus string
const P2POrderCreateRespP2POrderCreateStatusPending P2POrderCreateRespP2POrderCreateStatus = "pending"

func (*P2POrderCreateRespP2POrderCreateStatus) UnmarshalJSON ¶

func (j *P2POrderCreateRespP2POrderCreateStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespP2POrderCreateType ¶

type P2POrderCreateRespP2POrderCreateType string
const P2POrderCreateRespP2POrderCreateTypeBuy P2POrderCreateRespP2POrderCreateType = "buy"
const P2POrderCreateRespP2POrderCreateTypeSell P2POrderCreateRespP2POrderCreateType = "sell"

func (*P2POrderCreateRespP2POrderCreateType) UnmarshalJSON ¶

func (j *P2POrderCreateRespP2POrderCreateType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateRespSubscription ¶

type P2POrderCreateRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2POrderCreateRespSubscription) UnmarshalJSON ¶

func (j *P2POrderCreateRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderCreateSubscribe ¶

type P2POrderCreateSubscribe int

func (*P2POrderCreateSubscribe) UnmarshalJSON ¶

func (j *P2POrderCreateSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDispute ¶

type P2POrderDispute struct {
	// The predefined dispute reason
	DisputeReason P2POrderDisputeDisputeReason `json:"dispute_reason"`

	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2POrderDispute P2POrderDisputeP2POrderDispute `json:"p2p_order_dispute"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderDisputePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Dispute a P2P order.

func (*P2POrderDispute) UnmarshalJSON ¶

func (j *P2POrderDispute) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeDisputeReason ¶

type P2POrderDisputeDisputeReason string
const P2POrderDisputeDisputeReasonBuyerNotPaid P2POrderDisputeDisputeReason = "buyer_not_paid"
const P2POrderDisputeDisputeReasonBuyerOverpaid P2POrderDisputeDisputeReason = "buyer_overpaid"
const P2POrderDisputeDisputeReasonBuyerThirdPartyPaymentMethod P2POrderDisputeDisputeReason = "buyer_third_party_payment_method"
const P2POrderDisputeDisputeReasonBuyerUnderpaid P2POrderDisputeDisputeReason = "buyer_underpaid"
const P2POrderDisputeDisputeReasonSellerNotReleased P2POrderDisputeDisputeReason = "seller_not_released"

func (*P2POrderDisputeDisputeReason) UnmarshalJSON ¶

func (j *P2POrderDisputeDisputeReason) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeP2POrderDispute ¶

type P2POrderDisputeP2POrderDispute int

func (*P2POrderDisputeP2POrderDispute) UnmarshalJSON ¶

func (j *P2POrderDisputeP2POrderDispute) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputePassthrough ¶

type P2POrderDisputePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderDisputeResp ¶

type P2POrderDisputeResp struct {
	// Echo of the request made.
	EchoReq P2POrderDisputeRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderDisputeRespMsgType `json:"msg_type"`

	// Details of the disputed order.
	P2POrderDispute *P2POrderDisputeRespP2POrderDispute `json:"p2p_order_dispute,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Result of the P2P order disputing.

func (*P2POrderDisputeResp) UnmarshalJSON ¶

func (j *P2POrderDisputeResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespEchoReq ¶

type P2POrderDisputeRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderDisputeRespMsgType ¶

type P2POrderDisputeRespMsgType string
const P2POrderDisputeRespMsgTypeP2POrderDispute P2POrderDisputeRespMsgType = "p2p_order_dispute"

func (*P2POrderDisputeRespMsgType) UnmarshalJSON ¶

func (j *P2POrderDisputeRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDispute ¶

type P2POrderDisputeRespP2POrderDispute struct {
	// The currency of order.
	AccountCurrency string `json:"account_currency"`

	// Details of the advert for this order.
	AdvertDetails P2POrderDisputeRespP2POrderDisputeAdvertDetails `json:"advert_details"`

	// Details of the advertiser for this order.
	AdvertiserDetails P2POrderDisputeRespP2POrderDisputeAdvertiserDetails `json:"advertiser_details"`

	// The amount of the order.
	Amount float64 `json:"amount"`

	// The amount of the order, formatted to appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// The URL to be used to initialise the chat for this order.
	ChatChannelUrl string `json:"chat_channel_url"`

	// Details of the client who created the order.
	ClientDetails P2POrderDisputeRespP2POrderDisputeClientDetails `json:"client_details"`

	// Seller contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time of the order creation.
	CreatedTime int `json:"created_time"`

	// Details of the order dispute.
	DisputeDetails P2POrderDisputeRespP2POrderDisputeDisputeDetails `json:"dispute_details"`

	// The epoch time in which the order will be expired.
	ExpiryTime int `json:"expiry_time"`

	// The unique identifier for this order.
	Id string `json:"id"`

	// `1` if the order is created for the advert of the current client, otherwise
	// `0`.
	IsIncoming P2POrderDisputeRespP2POrderDisputeIsIncoming `json:"is_incoming"`

	// `1` if a review can be given, otherwise `0`.
	IsReviewable P2POrderDisputeRespP2POrderDisputeIsReviewable `json:"is_reviewable"`

	// `1` if the latest order changes have been seen by the current client, otherwise
	// `0`.
	IsSeen P2POrderDisputeRespP2POrderDisputeIsSeen `json:"is_seen"`

	// Local currency for this order.
	LocalCurrency string `json:"local_currency"`

	// Payment instructions.
	PaymentInfo string `json:"payment_info"`

	// Cost in local currency.
	Price float64 `json:"price"`

	// Cost in local currency, formatted to appropriate decimal places.
	PriceDisplay string `json:"price_display"`

	// Conversion rate of the order.
	Rate float64 `json:"rate"`

	// Conversion rate of the order, formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Current order status.
	Status P2POrderDisputeRespP2POrderDisputeStatus `json:"status"`

	// Whether this is a buy or a sell.
	Type P2POrderDisputeRespP2POrderDisputeType `json:"type"`

	// If blocked for too many failed verification attempts, the epoch time that the
	// block will end.
	VerificationLockoutUntil *int `json:"verification_lockout_until,omitempty"`

	// If a verification request has already been made, the epoch time that another
	// verification request can be made.
	VerificationNextRequest *int `json:"verification_next_request,omitempty"`

	// Indicates that the seller in the process of confirming the order.
	VerificationPending *P2POrderDisputeRespP2POrderDisputeVerificationPending `json:"verification_pending,omitempty"`

	// Epoch time that the current verification token will expire.
	VerificationTokenExpiry *int `json:"verification_token_expiry,omitempty"`
}

Details of the disputed order.

func (*P2POrderDisputeRespP2POrderDispute) UnmarshalJSON ¶

func (j *P2POrderDisputeRespP2POrderDispute) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeAdvertDetails ¶

type P2POrderDisputeRespP2POrderDisputeAdvertDetails struct {
	// Indicates if this is block trade advert or not.
	BlockTrade P2POrderDisputeRespP2POrderDisputeAdvertDetailsBlockTrade `json:"block_trade"`

	// General information about the advert.
	Description string `json:"description"`

	// The unique identifier for the advert.
	Id string `json:"id"`

	// The payment method.
	PaymentMethod *string `json:"payment_method"`

	// Type of the advert.
	Type P2POrderDisputeRespP2POrderDisputeAdvertDetailsType `json:"type"`
}

Details of the advert for this order.

func (*P2POrderDisputeRespP2POrderDisputeAdvertDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeAdvertDetailsBlockTrade ¶

type P2POrderDisputeRespP2POrderDisputeAdvertDetailsBlockTrade int

func (*P2POrderDisputeRespP2POrderDisputeAdvertDetailsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeAdvertDetailsType ¶

type P2POrderDisputeRespP2POrderDisputeAdvertDetailsType string
const P2POrderDisputeRespP2POrderDisputeAdvertDetailsTypeBuy P2POrderDisputeRespP2POrderDisputeAdvertDetailsType = "buy"
const P2POrderDisputeRespP2POrderDisputeAdvertDetailsTypeSell P2POrderDisputeRespP2POrderDisputeAdvertDetailsType = "sell"

func (*P2POrderDisputeRespP2POrderDisputeAdvertDetailsType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeAdvertiserDetails ¶

type P2POrderDisputeRespP2POrderDisputeAdvertiserDetails struct {
	// The client's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderDisputeRespP2POrderDisputeAdvertiserDetailsIsOnline `json:"is_online"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's account identifier.
	Loginid string `json:"loginid"`

	// The advertiser's displayed name.
	Name string `json:"name"`
}

Details of the advertiser for this order.

func (*P2POrderDisputeRespP2POrderDisputeAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeAdvertiserDetailsIsOnline ¶

type P2POrderDisputeRespP2POrderDisputeAdvertiserDetailsIsOnline int

func (*P2POrderDisputeRespP2POrderDisputeAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeClientDetails ¶

type P2POrderDisputeRespP2POrderDisputeClientDetails struct {
	// The client's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The client's unique P2P identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderDisputeRespP2POrderDisputeClientDetailsIsOnline `json:"is_online"`

	// The client's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The client's account identifier.
	Loginid string `json:"loginid"`

	// The client's displayed name.
	Name string `json:"name"`
}

Details of the client who created the order.

func (*P2POrderDisputeRespP2POrderDisputeClientDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeClientDetailsIsOnline ¶

type P2POrderDisputeRespP2POrderDisputeClientDetailsIsOnline int

func (*P2POrderDisputeRespP2POrderDisputeClientDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeDisputeDetails ¶

type P2POrderDisputeRespP2POrderDisputeDisputeDetails struct {
	// The dispute reason
	DisputeReason string `json:"dispute_reason"`

	// The loginid of the client who's raising the dispute
	DisputerLoginid string `json:"disputer_loginid"`
}

Details of the order dispute.

func (*P2POrderDisputeRespP2POrderDisputeDisputeDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeIsIncoming ¶

type P2POrderDisputeRespP2POrderDisputeIsIncoming int

func (*P2POrderDisputeRespP2POrderDisputeIsIncoming) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeIsReviewable ¶

type P2POrderDisputeRespP2POrderDisputeIsReviewable int

func (*P2POrderDisputeRespP2POrderDisputeIsReviewable) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeIsSeen ¶

type P2POrderDisputeRespP2POrderDisputeIsSeen int

func (*P2POrderDisputeRespP2POrderDisputeIsSeen) UnmarshalJSON ¶

func (j *P2POrderDisputeRespP2POrderDisputeIsSeen) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeStatus ¶

type P2POrderDisputeRespP2POrderDisputeStatus string
const P2POrderDisputeRespP2POrderDisputeStatusBlocked P2POrderDisputeRespP2POrderDisputeStatus = "blocked"
const P2POrderDisputeRespP2POrderDisputeStatusBuyerConfirmed P2POrderDisputeRespP2POrderDisputeStatus = "buyer-confirmed"
const P2POrderDisputeRespP2POrderDisputeStatusCancelled P2POrderDisputeRespP2POrderDisputeStatus = "cancelled"
const P2POrderDisputeRespP2POrderDisputeStatusCompleted P2POrderDisputeRespP2POrderDisputeStatus = "completed"
const P2POrderDisputeRespP2POrderDisputeStatusDisputeCompleted P2POrderDisputeRespP2POrderDisputeStatus = "dispute-completed"
const P2POrderDisputeRespP2POrderDisputeStatusDisputeRefunded P2POrderDisputeRespP2POrderDisputeStatus = "dispute-refunded"
const P2POrderDisputeRespP2POrderDisputeStatusDisputed P2POrderDisputeRespP2POrderDisputeStatus = "disputed"
const P2POrderDisputeRespP2POrderDisputeStatusPending P2POrderDisputeRespP2POrderDisputeStatus = "pending"
const P2POrderDisputeRespP2POrderDisputeStatusRefunded P2POrderDisputeRespP2POrderDisputeStatus = "refunded"
const P2POrderDisputeRespP2POrderDisputeStatusTimedOut P2POrderDisputeRespP2POrderDisputeStatus = "timed-out"

func (*P2POrderDisputeRespP2POrderDisputeStatus) UnmarshalJSON ¶

func (j *P2POrderDisputeRespP2POrderDisputeStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeType ¶

type P2POrderDisputeRespP2POrderDisputeType string
const P2POrderDisputeRespP2POrderDisputeTypeBuy P2POrderDisputeRespP2POrderDisputeType = "buy"
const P2POrderDisputeRespP2POrderDisputeTypeSell P2POrderDisputeRespP2POrderDisputeType = "sell"

func (*P2POrderDisputeRespP2POrderDisputeType) UnmarshalJSON ¶

func (j *P2POrderDisputeRespP2POrderDisputeType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderDisputeRespP2POrderDisputeVerificationPending ¶

type P2POrderDisputeRespP2POrderDisputeVerificationPending int

func (*P2POrderDisputeRespP2POrderDisputeVerificationPending) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfo ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2POrderInfo P2POrderInfoP2POrderInfo `json:"p2p_order_info"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderInfoPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is an update to order
	Subscribe *P2POrderInfoSubscribe `json:"subscribe,omitempty"`
}

Retrieves the information about a P2P order.

func (*P2POrderInfo) UnmarshalJSON ¶

func (j *P2POrderInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoP2POrderInfo ¶

type P2POrderInfoP2POrderInfo int

func (*P2POrderInfoP2POrderInfo) UnmarshalJSON ¶

func (j *P2POrderInfoP2POrderInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoPassthrough ¶

type P2POrderInfoPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderInfoResp ¶

type P2POrderInfoResp struct {
	// Echo of the request made.
	EchoReq P2POrderInfoRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderInfoRespMsgType `json:"msg_type"`

	// The information of P2P order.
	P2POrderInfo *P2POrderInfoRespP2POrderInfo `json:"p2p_order_info,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2POrderInfoRespSubscription `json:"subscription,omitempty"`
}

Information of the P2P order.

func (*P2POrderInfoResp) UnmarshalJSON ¶

func (j *P2POrderInfoResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespEchoReq ¶

type P2POrderInfoRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderInfoRespMsgType ¶

type P2POrderInfoRespMsgType string
const P2POrderInfoRespMsgTypeP2POrderInfo P2POrderInfoRespMsgType = "p2p_order_info"

func (*P2POrderInfoRespMsgType) UnmarshalJSON ¶

func (j *P2POrderInfoRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfo ¶

type P2POrderInfoRespP2POrderInfo struct {
	// The currency of order.
	AccountCurrency string `json:"account_currency"`

	// Details of the advert for this order.
	AdvertDetails P2POrderInfoRespP2POrderInfoAdvertDetails `json:"advert_details"`

	// Details of the advertiser for this order.
	AdvertiserDetails P2POrderInfoRespP2POrderInfoAdvertiserDetails `json:"advertiser_details"`

	// The amount of the order.
	Amount float64 `json:"amount"`

	// The amount of the order, formatted to appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// The URL to be used to initialise the chat for this order.
	ChatChannelUrl string `json:"chat_channel_url"`

	// Details of the client who created the order.
	ClientDetails P2POrderInfoRespP2POrderInfoClientDetails `json:"client_details"`

	// The epoch time of the order completion.
	CompletionTime *int `json:"completion_time,omitempty"`

	// Seller contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time of the order creation.
	CreatedTime int `json:"created_time"`

	// Details of the order dispute.
	DisputeDetails P2POrderInfoRespP2POrderInfoDisputeDetails `json:"dispute_details"`

	// The epoch time in which the order will be expired.
	ExpiryTime int `json:"expiry_time"`

	// The unique identifier for this order.
	Id string `json:"id"`

	// `1` if the order is created for the advert of the current client, otherwise
	// `0`.
	IsIncoming P2POrderInfoRespP2POrderInfoIsIncoming `json:"is_incoming"`

	// `1` if a review can be given, otherwise `0`.
	IsReviewable P2POrderInfoRespP2POrderInfoIsReviewable `json:"is_reviewable"`

	// `1` if the latest order changes have been seen by the current client, otherwise
	// `0`.
	IsSeen *P2POrderInfoRespP2POrderInfoIsSeen `json:"is_seen,omitempty"`

	// Local currency for this order.
	LocalCurrency string `json:"local_currency"`

	// Payment instructions.
	PaymentInfo string `json:"payment_info"`

	// Supported payment methods. Comma separated list.
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Details of available payment methods.
	PaymentMethodDetails P2POrderInfoRespP2POrderInfoPaymentMethodDetails `json:"payment_method_details,omitempty"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost in local currency.
	Price float64 `json:"price"`

	// Cost in local currency, formatted to appropriate decimal places.
	PriceDisplay string `json:"price_display"`

	// Conversion rate of the order.
	Rate float64 `json:"rate"`

	// Conversion rate of the order, formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Details of the review you gave for this order, if any.
	ReviewDetails *P2POrderInfoRespP2POrderInfoReviewDetails `json:"review_details,omitempty"`

	// Current order status.
	Status P2POrderInfoRespP2POrderInfoStatus `json:"status"`

	// Whether this is a buy or a sell.
	Type P2POrderInfoRespP2POrderInfoType `json:"type"`

	// If blocked for too many failed verification attempts, the epoch time that the
	// block will end.
	VerificationLockoutUntil *int `json:"verification_lockout_until,omitempty"`

	// If a verification request has already been made, the epoch time that another
	// verification request can be made.
	VerificationNextRequest *int `json:"verification_next_request,omitempty"`

	// Indicates that the seller in the process of confirming the order.
	VerificationPending *P2POrderInfoRespP2POrderInfoVerificationPending `json:"verification_pending,omitempty"`

	// Epoch time that the current verification token will expire.
	VerificationTokenExpiry *int `json:"verification_token_expiry,omitempty"`
}

The information of P2P order.

func (*P2POrderInfoRespP2POrderInfo) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertDetails ¶

type P2POrderInfoRespP2POrderInfoAdvertDetails struct {
	// Indicates if this is block trade advert or not.
	BlockTrade P2POrderInfoRespP2POrderInfoAdvertDetailsBlockTrade `json:"block_trade"`

	// General information about the advert.
	Description string `json:"description"`

	// The unique identifier for the advert.
	Id string `json:"id"`

	// The payment method.
	PaymentMethod *string `json:"payment_method"`

	// Type of the advert.
	Type P2POrderInfoRespP2POrderInfoAdvertDetailsType `json:"type"`
}

Details of the advert for this order.

func (*P2POrderInfoRespP2POrderInfoAdvertDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertDetailsBlockTrade ¶

type P2POrderInfoRespP2POrderInfoAdvertDetailsBlockTrade int

func (*P2POrderInfoRespP2POrderInfoAdvertDetailsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertDetailsType ¶

type P2POrderInfoRespP2POrderInfoAdvertDetailsType string
const P2POrderInfoRespP2POrderInfoAdvertDetailsTypeBuy P2POrderInfoRespP2POrderInfoAdvertDetailsType = "buy"
const P2POrderInfoRespP2POrderInfoAdvertDetailsTypeSell P2POrderInfoRespP2POrderInfoAdvertDetailsType = "sell"

func (*P2POrderInfoRespP2POrderInfoAdvertDetailsType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertiserDetails ¶

type P2POrderInfoRespP2POrderInfoAdvertiserDetails struct {
	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsOnline `json:"is_online"`

	// Indicates that the advertiser was recommended in the most recent review by the
	// current user.
	IsRecommended *P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsRecommended `json:"is_recommended,omitempty"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's account identifier.
	Loginid string `json:"loginid"`

	// The advertiser's displayed name.
	Name string `json:"name"`
}

Details of the advertiser for this order.

func (*P2POrderInfoRespP2POrderInfoAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsOnline ¶

type P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsOnline int

func (*P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsRecommended ¶

type P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsRecommended struct {
	Value interface{}
}

func (*P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderInfoRespP2POrderInfoAdvertiserDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoClientDetails ¶

type P2POrderInfoRespP2POrderInfoClientDetails struct {
	// The client's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The client's unique P2P identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline *P2POrderInfoRespP2POrderInfoClientDetailsIsOnline `json:"is_online,omitempty"`

	// Indicates that the client was recommended in the most recent review by the
	// current user.
	IsRecommended *P2POrderInfoRespP2POrderInfoClientDetailsIsRecommended `json:"is_recommended,omitempty"`

	// The client's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time,omitempty"`

	// The client's account identifier.
	Loginid string `json:"loginid"`

	// The client's displayed name.
	Name string `json:"name"`
}

Details of the client who created the order.

func (*P2POrderInfoRespP2POrderInfoClientDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoClientDetailsIsOnline ¶

type P2POrderInfoRespP2POrderInfoClientDetailsIsOnline int

func (*P2POrderInfoRespP2POrderInfoClientDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoClientDetailsIsRecommended ¶

type P2POrderInfoRespP2POrderInfoClientDetailsIsRecommended struct {
	Value interface{}
}

func (*P2POrderInfoRespP2POrderInfoClientDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderInfoRespP2POrderInfoClientDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoDisputeDetails ¶

type P2POrderInfoRespP2POrderInfoDisputeDetails struct {
	// The dispute reason
	DisputeReason *string `json:"dispute_reason"`

	// The loginid of the client who's raising the dispute
	DisputerLoginid *string `json:"disputer_loginid"`
}

Details of the order dispute.

func (*P2POrderInfoRespP2POrderInfoDisputeDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoIsIncoming ¶

type P2POrderInfoRespP2POrderInfoIsIncoming int

func (*P2POrderInfoRespP2POrderInfoIsIncoming) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfoIsIncoming) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoIsReviewable ¶

type P2POrderInfoRespP2POrderInfoIsReviewable int

func (*P2POrderInfoRespP2POrderInfoIsReviewable) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfoIsReviewable) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoIsSeen ¶

type P2POrderInfoRespP2POrderInfoIsSeen int

func (*P2POrderInfoRespP2POrderInfoIsSeen) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfoIsSeen) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoPaymentMethodDetails ¶

type P2POrderInfoRespP2POrderInfoPaymentMethodDetails map[string]interface{}

Details of available payment methods.

type P2POrderInfoRespP2POrderInfoReviewDetails ¶

type P2POrderInfoRespP2POrderInfoReviewDetails struct {
	// The epoch time of the review.
	CreatedTime int `json:"created_time"`

	// Rating for the transaction, 1 to 5.
	Rating int `json:"rating"`

	// `1` if the advertiser is recommended, `0` if not recommended.
	Recommended P2POrderInfoRespP2POrderInfoReviewDetailsRecommended `json:"recommended"`
}

Details of the review you gave for this order, if any.

func (*P2POrderInfoRespP2POrderInfoReviewDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoReviewDetailsRecommended ¶

type P2POrderInfoRespP2POrderInfoReviewDetailsRecommended struct {
	Value interface{}
}

func (*P2POrderInfoRespP2POrderInfoReviewDetailsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderInfoRespP2POrderInfoReviewDetailsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoStatus ¶

type P2POrderInfoRespP2POrderInfoStatus string
const P2POrderInfoRespP2POrderInfoStatusBlocked P2POrderInfoRespP2POrderInfoStatus = "blocked"
const P2POrderInfoRespP2POrderInfoStatusBuyerConfirmed P2POrderInfoRespP2POrderInfoStatus = "buyer-confirmed"
const P2POrderInfoRespP2POrderInfoStatusCancelled P2POrderInfoRespP2POrderInfoStatus = "cancelled"
const P2POrderInfoRespP2POrderInfoStatusCompleted P2POrderInfoRespP2POrderInfoStatus = "completed"
const P2POrderInfoRespP2POrderInfoStatusDisputeCompleted P2POrderInfoRespP2POrderInfoStatus = "dispute-completed"
const P2POrderInfoRespP2POrderInfoStatusDisputeRefunded P2POrderInfoRespP2POrderInfoStatus = "dispute-refunded"
const P2POrderInfoRespP2POrderInfoStatusDisputed P2POrderInfoRespP2POrderInfoStatus = "disputed"
const P2POrderInfoRespP2POrderInfoStatusPending P2POrderInfoRespP2POrderInfoStatus = "pending"
const P2POrderInfoRespP2POrderInfoStatusRefunded P2POrderInfoRespP2POrderInfoStatus = "refunded"
const P2POrderInfoRespP2POrderInfoStatusTimedOut P2POrderInfoRespP2POrderInfoStatus = "timed-out"

func (*P2POrderInfoRespP2POrderInfoStatus) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfoStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoType ¶

type P2POrderInfoRespP2POrderInfoType string
const P2POrderInfoRespP2POrderInfoTypeBuy P2POrderInfoRespP2POrderInfoType = "buy"
const P2POrderInfoRespP2POrderInfoTypeSell P2POrderInfoRespP2POrderInfoType = "sell"

func (*P2POrderInfoRespP2POrderInfoType) UnmarshalJSON ¶

func (j *P2POrderInfoRespP2POrderInfoType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespP2POrderInfoVerificationPending ¶

type P2POrderInfoRespP2POrderInfoVerificationPending int

func (*P2POrderInfoRespP2POrderInfoVerificationPending) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoRespSubscription ¶

type P2POrderInfoRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2POrderInfoRespSubscription) UnmarshalJSON ¶

func (j *P2POrderInfoRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderInfoSubscribe ¶

type P2POrderInfoSubscribe int

func (*P2POrderInfoSubscribe) UnmarshalJSON ¶

func (j *P2POrderInfoSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderList ¶

type P2POrderList struct {
	// [Optional] Should be 1 to list active, 0 to list inactive (historical).
	Active *P2POrderListActive `json:"active,omitempty"`

	// [Optional] If present, lists orders applying to a specific advert.
	AdvertId *string `json:"advert_id,omitempty"`

	// [Optional] Filter the orders created after this date(included) format(epoch or
	// YYYY-MM-DD)
	DateFrom *string `json:"date_from,omitempty"`

	// [Optional] Filter the orders created before this date(included) format(epoch or
	// YYYY-MM-DD)
	DateTo *string `json:"date_to,omitempty"`

	// [Optional] Used for paging.
	Limit int `json:"limit,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used for paging.
	Offset int `json:"offset,omitempty"`

	// Must be 1
	P2POrderList P2POrderListP2POrderList `json:"p2p_order_list"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever there is a change to any
	// order belonging to you.
	Subscribe *P2POrderListSubscribe `json:"subscribe,omitempty"`
}

List active orders.

func (*P2POrderList) UnmarshalJSON ¶

func (j *P2POrderList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListActive ¶

type P2POrderListActive float64

func (*P2POrderListActive) UnmarshalJSON ¶

func (j *P2POrderListActive) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListP2POrderList ¶

type P2POrderListP2POrderList int

func (*P2POrderListP2POrderList) UnmarshalJSON ¶

func (j *P2POrderListP2POrderList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListPassthrough ¶

type P2POrderListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderListResp ¶

type P2POrderListResp struct {
	// Echo of the request made.
	EchoReq P2POrderListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderListRespMsgType `json:"msg_type"`

	// List of P2P orders.
	P2POrderList *P2POrderListRespP2POrderList `json:"p2p_order_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2POrderListRespSubscription `json:"subscription,omitempty"`
}

All orders matching the requested criteria.

func (*P2POrderListResp) UnmarshalJSON ¶

func (j *P2POrderListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespEchoReq ¶

type P2POrderListRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderListRespMsgType ¶

type P2POrderListRespMsgType string
const P2POrderListRespMsgTypeP2POrderList P2POrderListRespMsgType = "p2p_order_list"

func (*P2POrderListRespMsgType) UnmarshalJSON ¶

func (j *P2POrderListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderList ¶

type P2POrderListRespP2POrderList struct {
	// List of orders.
	List []P2POrderListRespP2POrderListListElem `json:"list"`
}

List of P2P orders.

func (*P2POrderListRespP2POrderList) UnmarshalJSON ¶

func (j *P2POrderListRespP2POrderList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElem ¶

type P2POrderListRespP2POrderListListElem struct {
	// The currency to be bought or sold.
	AccountCurrency string `json:"account_currency"`

	// Details of the advert for this order.
	AdvertDetails P2POrderListRespP2POrderListListElemAdvertDetails `json:"advert_details"`

	// Details of the advertiser for this order.
	AdvertiserDetails P2POrderListRespP2POrderListListElemAdvertiserDetails `json:"advertiser_details"`

	// The amount of the order.
	Amount float64 `json:"amount"`

	// The amount of the order, formatted to appropriate decimal places.
	AmountDisplay string `json:"amount_display"`

	// The URL to be used to initialise the chat for this order.
	ChatChannelUrl string `json:"chat_channel_url"`

	// Details of the client who created the order.
	ClientDetails *P2POrderListRespP2POrderListListElemClientDetails `json:"client_details,omitempty"`

	// The epoch time of the order completion.
	CompletionTime *int `json:"completion_time,omitempty"`

	// Seller contact information.
	ContactInfo string `json:"contact_info"`

	// The epoch time of the order creation.
	CreatedTime int `json:"created_time"`

	// Details of the order dispute.
	DisputeDetails P2POrderListRespP2POrderListListElemDisputeDetails `json:"dispute_details"`

	// The epoch time in which the order will be expired.
	ExpiryTime int `json:"expiry_time"`

	// The unique identifier for this order.
	Id string `json:"id"`

	// `1` if the order is created for the advert of the current client, otherwise
	// `0`.
	IsIncoming P2POrderListRespP2POrderListListElemIsIncoming `json:"is_incoming"`

	// `1` if a review can be given, otherwise `0`.
	IsReviewable P2POrderListRespP2POrderListListElemIsReviewable `json:"is_reviewable"`

	// `1` if the latest order changes have been seen by the current client, otherwise
	// `0`.
	IsSeen *P2POrderListRespP2POrderListListElemIsSeen `json:"is_seen,omitempty"`

	// Local currency for this order.
	LocalCurrency string `json:"local_currency"`

	// Payment instructions.
	PaymentInfo string `json:"payment_info"`

	// Supported payment methods. Comma separated list of identifiers.
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Names of supported payment methods.
	PaymentMethodNames []string `json:"payment_method_names,omitempty"`

	// Cost in local currency.
	Price float64 `json:"price"`

	// Cost in local currency, formatted to appropriate decimal places.
	PriceDisplay string `json:"price_display"`

	// Conversion rate of the order.
	Rate float64 `json:"rate"`

	// Conversion rate of the order, formatted to appropriate decimal places.
	RateDisplay string `json:"rate_display"`

	// Details of the review you gave for this order, if any.
	ReviewDetails *P2POrderListRespP2POrderListListElemReviewDetails `json:"review_details,omitempty"`

	// Current order status.
	Status P2POrderListRespP2POrderListListElemStatus `json:"status"`

	// Whether this is a buy or a sell.
	Type P2POrderListRespP2POrderListListElemType `json:"type"`

	// If blocked for too many failed verification attempts, the epoch time that the
	// block will end.
	VerificationLockoutUntil *int `json:"verification_lockout_until,omitempty"`

	// If a verification request has already been made, the epoch time that another
	// verification request can be made.
	VerificationNextRequest *int `json:"verification_next_request,omitempty"`

	// Indicates that the seller in the process of confirming the order.
	VerificationPending *P2POrderListRespP2POrderListListElemVerificationPending `json:"verification_pending,omitempty"`

	// Epoch time that the current verification token will expire.
	VerificationTokenExpiry *int `json:"verification_token_expiry,omitempty"`
}

func (*P2POrderListRespP2POrderListListElem) UnmarshalJSON ¶

func (j *P2POrderListRespP2POrderListListElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertDetails ¶

type P2POrderListRespP2POrderListListElemAdvertDetails struct {
	// Indicates if this is block trade advert or not.
	BlockTrade P2POrderListRespP2POrderListListElemAdvertDetailsBlockTrade `json:"block_trade"`

	// General information about the advert.
	Description string `json:"description"`

	// The unique identifier for the advert.
	Id string `json:"id"`

	// The payment method.
	PaymentMethod *string `json:"payment_method"`

	// Type of the advert.
	Type P2POrderListRespP2POrderListListElemAdvertDetailsType `json:"type"`
}

Details of the advert for this order.

func (*P2POrderListRespP2POrderListListElemAdvertDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertDetailsBlockTrade ¶

type P2POrderListRespP2POrderListListElemAdvertDetailsBlockTrade int

func (*P2POrderListRespP2POrderListListElemAdvertDetailsBlockTrade) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertDetailsType ¶

type P2POrderListRespP2POrderListListElemAdvertDetailsType string
const P2POrderListRespP2POrderListListElemAdvertDetailsTypeBuy P2POrderListRespP2POrderListListElemAdvertDetailsType = "buy"
const P2POrderListRespP2POrderListListElemAdvertDetailsTypeSell P2POrderListRespP2POrderListListElemAdvertDetailsType = "sell"

func (*P2POrderListRespP2POrderListListElemAdvertDetailsType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertiserDetails ¶

type P2POrderListRespP2POrderListListElemAdvertiserDetails struct {
	// The advertiser's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The advertiser's unique identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderListRespP2POrderListListElemAdvertiserDetailsIsOnline `json:"is_online"`

	// Indicates that the advertiser was recommended in the most recent review by the
	// current user.
	IsRecommended *P2POrderListRespP2POrderListListElemAdvertiserDetailsIsRecommended `json:"is_recommended,omitempty"`

	// The advertiser's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The advertiser's account identifier.
	Loginid string `json:"loginid"`

	// The advertiser's displayed name.
	Name string `json:"name"`
}

Details of the advertiser for this order.

func (*P2POrderListRespP2POrderListListElemAdvertiserDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertiserDetailsIsOnline ¶

type P2POrderListRespP2POrderListListElemAdvertiserDetailsIsOnline int

func (*P2POrderListRespP2POrderListListElemAdvertiserDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemAdvertiserDetailsIsRecommended ¶

type P2POrderListRespP2POrderListListElemAdvertiserDetailsIsRecommended struct {
	Value interface{}
}

func (*P2POrderListRespP2POrderListListElemAdvertiserDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderListRespP2POrderListListElemAdvertiserDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemClientDetails ¶

type P2POrderListRespP2POrderListListElemClientDetails struct {
	// The client's first name.
	FirstName *string `json:"first_name,omitempty"`

	// The client's unique P2P identifier.
	Id string `json:"id"`

	// Indicates if the advertiser is currently online.
	IsOnline P2POrderListRespP2POrderListListElemClientDetailsIsOnline `json:"is_online"`

	// Indicates that the client was recommended in the most recent review by the
	// current user.
	IsRecommended *P2POrderListRespP2POrderListListElemClientDetailsIsRecommended `json:"is_recommended,omitempty"`

	// The client's last name.
	LastName *string `json:"last_name,omitempty"`

	// Epoch of the latest time the advertiser was online, up to 6 months.
	LastOnlineTime *int `json:"last_online_time"`

	// The client's account identifier.
	Loginid string `json:"loginid"`

	// The client's displayed name.
	Name string `json:"name"`
}

Details of the client who created the order.

func (*P2POrderListRespP2POrderListListElemClientDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemClientDetailsIsOnline ¶

type P2POrderListRespP2POrderListListElemClientDetailsIsOnline int

func (*P2POrderListRespP2POrderListListElemClientDetailsIsOnline) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemClientDetailsIsRecommended ¶

type P2POrderListRespP2POrderListListElemClientDetailsIsRecommended struct {
	Value interface{}
}

func (*P2POrderListRespP2POrderListListElemClientDetailsIsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderListRespP2POrderListListElemClientDetailsIsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemDisputeDetails ¶

type P2POrderListRespP2POrderListListElemDisputeDetails struct {
	// The dispute reason
	DisputeReason *string `json:"dispute_reason"`

	// The loginid of the client who's raising the dispute
	DisputerLoginid *string `json:"disputer_loginid"`
}

Details of the order dispute.

func (*P2POrderListRespP2POrderListListElemDisputeDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemIsIncoming ¶

type P2POrderListRespP2POrderListListElemIsIncoming int

func (*P2POrderListRespP2POrderListListElemIsIncoming) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemIsReviewable ¶

type P2POrderListRespP2POrderListListElemIsReviewable int

func (*P2POrderListRespP2POrderListListElemIsReviewable) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemIsSeen ¶

type P2POrderListRespP2POrderListListElemIsSeen int

func (*P2POrderListRespP2POrderListListElemIsSeen) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemReviewDetails ¶

type P2POrderListRespP2POrderListListElemReviewDetails struct {
	// The epoch time of the review.
	CreatedTime int `json:"created_time"`

	// Rating for the transaction, 1 to 5.
	Rating int `json:"rating"`

	// `1` if the advertiser is recommended, `0` if not recommended.
	Recommended P2POrderListRespP2POrderListListElemReviewDetailsRecommended `json:"recommended"`
}

Details of the review you gave for this order, if any.

func (*P2POrderListRespP2POrderListListElemReviewDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemReviewDetailsRecommended ¶

type P2POrderListRespP2POrderListListElemReviewDetailsRecommended struct {
	Value interface{}
}

func (*P2POrderListRespP2POrderListListElemReviewDetailsRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderListRespP2POrderListListElemReviewDetailsRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemStatus ¶

type P2POrderListRespP2POrderListListElemStatus string
const P2POrderListRespP2POrderListListElemStatusBlocked P2POrderListRespP2POrderListListElemStatus = "blocked"
const P2POrderListRespP2POrderListListElemStatusBuyerConfirmed P2POrderListRespP2POrderListListElemStatus = "buyer-confirmed"
const P2POrderListRespP2POrderListListElemStatusCancelled P2POrderListRespP2POrderListListElemStatus = "cancelled"
const P2POrderListRespP2POrderListListElemStatusCompleted P2POrderListRespP2POrderListListElemStatus = "completed"
const P2POrderListRespP2POrderListListElemStatusDisputeCompleted P2POrderListRespP2POrderListListElemStatus = "dispute-completed"
const P2POrderListRespP2POrderListListElemStatusDisputeRefunded P2POrderListRespP2POrderListListElemStatus = "dispute-refunded"
const P2POrderListRespP2POrderListListElemStatusDisputed P2POrderListRespP2POrderListListElemStatus = "disputed"
const P2POrderListRespP2POrderListListElemStatusPending P2POrderListRespP2POrderListListElemStatus = "pending"
const P2POrderListRespP2POrderListListElemStatusRefunded P2POrderListRespP2POrderListListElemStatus = "refunded"
const P2POrderListRespP2POrderListListElemStatusTimedOut P2POrderListRespP2POrderListListElemStatus = "timed-out"

func (*P2POrderListRespP2POrderListListElemStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemType ¶

type P2POrderListRespP2POrderListListElemType string
const P2POrderListRespP2POrderListListElemTypeBuy P2POrderListRespP2POrderListListElemType = "buy"
const P2POrderListRespP2POrderListListElemTypeSell P2POrderListRespP2POrderListListElemType = "sell"

func (*P2POrderListRespP2POrderListListElemType) UnmarshalJSON ¶

func (j *P2POrderListRespP2POrderListListElemType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespP2POrderListListElemVerificationPending ¶

type P2POrderListRespP2POrderListListElemVerificationPending int

func (*P2POrderListRespP2POrderListListElemVerificationPending) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListRespSubscription ¶

type P2POrderListRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2POrderListRespSubscription) UnmarshalJSON ¶

func (j *P2POrderListRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderListSubscribe ¶

type P2POrderListSubscribe int

func (*P2POrderListSubscribe) UnmarshalJSON ¶

func (j *P2POrderListSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReview ¶

type P2POrderReview struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// The order identification number.
	OrderId string `json:"order_id"`

	// Must be 1
	P2POrderReview P2POrderReviewP2POrderReview `json:"p2p_order_review"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2POrderReviewPassthrough `json:"passthrough,omitempty"`

	// Rating for the transaction, 1 to 5.
	Rating int `json:"rating"`

	// [Optional] `1` if the counterparty is recommendable to others, otherwise `0`.
	Recommended *P2POrderReviewRecommended `json:"recommended,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Creates a review for the specified order.

func (*P2POrderReview) UnmarshalJSON ¶

func (j *P2POrderReview) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewP2POrderReview ¶

type P2POrderReviewP2POrderReview int

func (*P2POrderReviewP2POrderReview) UnmarshalJSON ¶

func (j *P2POrderReviewP2POrderReview) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewPassthrough ¶

type P2POrderReviewPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2POrderReviewRecommended ¶

type P2POrderReviewRecommended struct {
	Value interface{}
}

func (*P2POrderReviewRecommended) MarshalJSON ¶

func (j *P2POrderReviewRecommended) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*P2POrderReviewRecommended) UnmarshalJSON ¶

func (j *P2POrderReviewRecommended) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewResp ¶

type P2POrderReviewResp struct {
	// Echo of the request made.
	EchoReq P2POrderReviewRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2POrderReviewRespMsgType `json:"msg_type"`

	// Details of the created order review.
	P2POrderReview *P2POrderReviewRespP2POrderReview `json:"p2p_order_review,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Response for creating a P2P order review.

func (*P2POrderReviewResp) UnmarshalJSON ¶

func (j *P2POrderReviewResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewRespEchoReq ¶

type P2POrderReviewRespEchoReq map[string]interface{}

Echo of the request made.

type P2POrderReviewRespMsgType ¶

type P2POrderReviewRespMsgType string
const P2POrderReviewRespMsgTypeP2POrderReview P2POrderReviewRespMsgType = "p2p_order_review"

func (*P2POrderReviewRespMsgType) UnmarshalJSON ¶

func (j *P2POrderReviewRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewRespP2POrderReview ¶

type P2POrderReviewRespP2POrderReview struct {
	// The reviewed advertiser's identification number.
	AdvertiserId string `json:"advertiser_id"`

	// The epoch time of the review.
	CreatedTime int `json:"created_time"`

	// The order identification number.
	OrderId string `json:"order_id"`

	// Rating for the transaction, 1 to 5.
	Rating int `json:"rating"`

	// `1` if the advertiser is recommended, `0` if not recommended.
	Recommended P2POrderReviewRespP2POrderReviewRecommended `json:"recommended"`
}

Details of the created order review.

func (*P2POrderReviewRespP2POrderReview) UnmarshalJSON ¶

func (j *P2POrderReviewRespP2POrderReview) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2POrderReviewRespP2POrderReviewRecommended ¶

type P2POrderReviewRespP2POrderReviewRecommended struct {
	Value interface{}
}

func (*P2POrderReviewRespP2POrderReviewRecommended) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*P2POrderReviewRespP2POrderReviewRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type P2PPaymentMethods ¶

type P2PPaymentMethods struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be 1
	P2PPaymentMethods P2PPaymentMethodsP2PPaymentMethods `json:"p2p_payment_methods"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PPaymentMethodsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

List all P2P payment methods.

func (*P2PPaymentMethods) UnmarshalJSON ¶

func (j *P2PPaymentMethods) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPaymentMethodsP2PPaymentMethods ¶

type P2PPaymentMethodsP2PPaymentMethods int

func (*P2PPaymentMethodsP2PPaymentMethods) UnmarshalJSON ¶

func (j *P2PPaymentMethodsP2PPaymentMethods) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPaymentMethodsPassthrough ¶

type P2PPaymentMethodsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PPaymentMethodsResp ¶

type P2PPaymentMethodsResp struct {
	// Echo of the request made.
	EchoReq P2PPaymentMethodsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PPaymentMethodsRespMsgType `json:"msg_type"`

	// Payment methods keyed by identifier.
	P2PPaymentMethods P2PPaymentMethodsRespP2PPaymentMethods `json:"p2p_payment_methods,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

List all P2P payment methods.

func (*P2PPaymentMethodsResp) UnmarshalJSON ¶

func (j *P2PPaymentMethodsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPaymentMethodsRespEchoReq ¶

type P2PPaymentMethodsRespEchoReq map[string]interface{}

Echo of the request made.

type P2PPaymentMethodsRespMsgType ¶

type P2PPaymentMethodsRespMsgType string
const P2PPaymentMethodsRespMsgTypeP2PPaymentMethods P2PPaymentMethodsRespMsgType = "p2p_payment_methods"

func (*P2PPaymentMethodsRespMsgType) UnmarshalJSON ¶

func (j *P2PPaymentMethodsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPaymentMethodsRespP2PPaymentMethods ¶

type P2PPaymentMethodsRespP2PPaymentMethods map[string]interface{}

Payment methods keyed by identifier.

type P2PPing ¶

type P2PPing struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	P2PPing P2PPingP2PPing `json:"p2p_ping"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PPingPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

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.

func (*P2PPing) UnmarshalJSON ¶

func (j *P2PPing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPingP2PPing ¶

type P2PPingP2PPing int

func (*P2PPingP2PPing) UnmarshalJSON ¶

func (j *P2PPingP2PPing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPingPassthrough ¶

type P2PPingPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PPingResp ¶

type P2PPingResp struct {
	// Echo of the request made.
	EchoReq P2PPingRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PPingRespMsgType `json:"msg_type"`

	// Will return 'pong'
	P2PPing *P2PPingRespP2PPing `json:"p2p_ping,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The response of P2P ping request.

func (*P2PPingResp) UnmarshalJSON ¶

func (j *P2PPingResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPingRespEchoReq ¶

type P2PPingRespEchoReq map[string]interface{}

Echo of the request made.

type P2PPingRespMsgType ¶

type P2PPingRespMsgType string
const P2PPingRespMsgTypeP2PPing P2PPingRespMsgType = "p2p_ping"

func (*P2PPingRespMsgType) UnmarshalJSON ¶

func (j *P2PPingRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PPingRespP2PPing ¶

type P2PPingRespP2PPing string
const P2PPingRespP2PPingPong P2PPingRespP2PPing = "pong"

func (*P2PPingRespP2PPing) UnmarshalJSON ¶

func (j *P2PPingRespP2PPing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettings ¶ added in v0.4.3

type P2PSettings struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	P2PSettings P2PSettingsP2PSettings `json:"p2p_settings"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough P2PSettingsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to `1`, will send updates whenever there is an update to P2P
	// settings.
	Subscribe *P2PSettingsSubscribe `json:"subscribe,omitempty"`
}

Request P2P Settings information.

func (*P2PSettings) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsP2PSettings ¶ added in v0.4.3

type P2PSettingsP2PSettings int

func (*P2PSettingsP2PSettings) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsP2PSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsPassthrough ¶ added in v0.4.3

type P2PSettingsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type P2PSettingsResp ¶ added in v0.4.3

type P2PSettingsResp struct {
	// Echo of the request made.
	EchoReq P2PSettingsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType P2PSettingsRespMsgType `json:"msg_type"`

	// Peer-to-peer payment system settings.
	P2PSettings *P2PSettingsRespP2PSettings `json:"p2p_settings,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *P2PSettingsRespSubscription `json:"subscription,omitempty"`
}

Information of the P2P settings.

func (*P2PSettingsResp) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespEchoReq ¶ added in v0.4.3

type P2PSettingsRespEchoReq map[string]interface{}

Echo of the request made.

type P2PSettingsRespMsgType ¶ added in v0.4.3

type P2PSettingsRespMsgType string
const P2PSettingsRespMsgTypeP2PSettings P2PSettingsRespMsgType = "p2p_settings"

func (*P2PSettingsRespMsgType) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettings ¶ added in v0.4.3

type P2PSettingsRespP2PSettings struct {
	// Maximum number of active ads allowed by an advertiser per currency pair and
	// advert type (buy or sell).
	AdvertsActiveLimit int `json:"adverts_active_limit"`

	// Adverts will be deactivated if no activity occurs within this period, in days.
	AdvertsArchivePeriod *int `json:"adverts_archive_period,omitempty"`

	// Block trading settings
	BlockTrade P2PSettingsRespP2PSettingsBlockTrade `json:"block_trade"`

	// Advertiser schedule start and end times must be exact multiples of this value,
	// unless it is zero.
	BusinessHoursMinutesInterval int `json:"business_hours_minutes_interval"`

	// A buyer will be blocked for this duration after exceeding the cancellation
	// limit, in hours.
	CancellationBlockDuration int `json:"cancellation_block_duration"`

	// The period within which to count buyer cancellations, in hours.
	CancellationCountPeriod int `json:"cancellation_count_period"`

	// A buyer may cancel an order within this period without negative consequences,
	// in minutes after order creation.
	CancellationGracePeriod int `json:"cancellation_grace_period"`

	// A buyer will be temporarily barred after marking this number of cancellations
	// within cancellation_period.
	CancellationLimit int `json:"cancellation_limit"`

	// Recommended step values for choosing advert counterparty terms.
	CounterpartyTermSteps *P2PSettingsRespP2PSettingsCounterpartyTermSteps `json:"counterparty_term_steps,omitempty"`

	// When 0, only exchanges in local currency are allowed for P2P advertiser.
	CrossBorderAdsEnabled P2PSettingsRespP2PSettingsCrossBorderAdsEnabled `json:"cross_border_ads_enabled"`

	// When 1, the P2P service is unavailable.
	Disabled P2PSettingsRespP2PSettingsDisabled `json:"disabled"`

	// Indicates the availbility of certain backend features.
	FeatureLevel int `json:"feature_level"`

	// Availability of fixed rate adverts.
	FixedRateAdverts P2PSettingsRespP2PSettingsFixedRateAdverts `json:"fixed_rate_adverts"`

	// Date on which fixed rate adverts will be deactivated.
	FixedRateAdvertsEndDate *string `json:"fixed_rate_adverts_end_date,omitempty"`

	// Availability of floating rate adverts.
	FloatRateAdverts P2PSettingsRespP2PSettingsFloatRateAdverts `json:"float_rate_adverts"`

	// Maximum rate offset for floating rate adverts.
	FloatRateOffsetLimit float64 `json:"float_rate_offset_limit"`

	// Available local currencies for p2p_advert_list request.
	LocalCurrencies []P2PSettingsRespP2PSettingsLocalCurrenciesElem `json:"local_currencies"`

	// Maximum amount of an advert, in USD.
	MaximumAdvertAmount float64 `json:"maximum_advert_amount"`

	// Maximum amount of an order, in USD.
	MaximumOrderAmount float64 `json:"maximum_order_amount"`

	// Maximum number of orders a user may create per day.
	OrderDailyLimit int `json:"order_daily_limit"`

	// List of order expiry values available for adverts, in seconds.
	OrderExpiryOptions []int `json:"order_expiry_options"`

	// Time allowed for order payment, in minutes after order creation.
	OrderPaymentPeriod int `json:"order_payment_period"`

	// Local P2P exchange rate which should be used instead of those obtained from the
	// `exchange_rates` call.
	OverrideExchangeRate *string `json:"override_exchange_rate,omitempty"`

	// Indicates if the payment methods feature is enabled.
	PaymentMethodsEnabled P2PSettingsRespP2PSettingsPaymentMethodsEnabled `json:"payment_methods_enabled"`

	// Indicates if phone number verification is required to become a P2P advertiser.
	PnvRequired P2PSettingsRespP2PSettingsPnvRequired `json:"pnv_required"`

	// Indicates if proof of address is required to become a P2P advertiser.
	PoaRequired P2PSettingsRespP2PSettingsPoaRequired `json:"poa_required"`

	// Time after successful order completion during which reviews can be created, in
	// hours.
	ReviewPeriod float64 `json:"review_period"`

	// List of currencies for which P2P is available
	SupportedCurrencies []string `json:"supported_currencies"`
}

Peer-to-peer payment system settings.

func (*P2PSettingsRespP2PSettings) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsRespP2PSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsBlockTrade ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsBlockTrade struct {
	// When 1, Block trading is unavailable.
	Disabled *P2PSettingsRespP2PSettingsBlockTradeDisabled `json:"disabled,omitempty"`

	// Maximum amount of a block trade advert, in USD.
	MaximumAdvertAmount *float64 `json:"maximum_advert_amount,omitempty"`
}

Block trading settings

type P2PSettingsRespP2PSettingsBlockTradeDisabled ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsBlockTradeDisabled int

func (*P2PSettingsRespP2PSettingsBlockTradeDisabled) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsCounterpartyTermSteps ¶ added in v0.4.15

type P2PSettingsRespP2PSettingsCounterpartyTermSteps struct {
	// Values for minimum 30 day completion rate.
	CompletionRate []float64 `json:"completion_rate"`

	// Values for minimum joined days.
	JoinDays []int `json:"join_days"`

	// Values for minimum average rating.
	Rating []float64 `json:"rating"`
}

Recommended step values for choosing advert counterparty terms.

func (*P2PSettingsRespP2PSettingsCounterpartyTermSteps) UnmarshalJSON ¶ added in v0.4.15

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsCrossBorderAdsEnabled ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsCrossBorderAdsEnabled int

func (*P2PSettingsRespP2PSettingsCrossBorderAdsEnabled) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsDisabled ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsDisabled int

func (*P2PSettingsRespP2PSettingsDisabled) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsRespP2PSettingsDisabled) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsFixedRateAdverts ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsFixedRateAdverts string
const P2PSettingsRespP2PSettingsFixedRateAdvertsDisabled P2PSettingsRespP2PSettingsFixedRateAdverts = "disabled"
const P2PSettingsRespP2PSettingsFixedRateAdvertsEnabled P2PSettingsRespP2PSettingsFixedRateAdverts = "enabled"
const P2PSettingsRespP2PSettingsFixedRateAdvertsListOnly P2PSettingsRespP2PSettingsFixedRateAdverts = "list_only"

func (*P2PSettingsRespP2PSettingsFixedRateAdverts) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsFloatRateAdverts ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsFloatRateAdverts string
const P2PSettingsRespP2PSettingsFloatRateAdvertsDisabled P2PSettingsRespP2PSettingsFloatRateAdverts = "disabled"
const P2PSettingsRespP2PSettingsFloatRateAdvertsEnabled P2PSettingsRespP2PSettingsFloatRateAdverts = "enabled"
const P2PSettingsRespP2PSettingsFloatRateAdvertsListOnly P2PSettingsRespP2PSettingsFloatRateAdverts = "list_only"

func (*P2PSettingsRespP2PSettingsFloatRateAdverts) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsLocalCurrenciesElem ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsLocalCurrenciesElem struct {
	// Local currency name
	DisplayName string `json:"display_name"`

	// Indicates that there are adverts available for this currency.
	HasAdverts P2PSettingsRespP2PSettingsLocalCurrenciesElemHasAdverts `json:"has_adverts"`

	// Indicates that this is local currency for the current country.
	IsDefault *P2PSettingsRespP2PSettingsLocalCurrenciesElemIsDefault `json:"is_default,omitempty"`

	// Indicates that floating rate adverts are available for this currency.
	IsFloatingRateAdSupported *P2PSettingsRespP2PSettingsLocalCurrenciesElemIsFloatingRateAdSupported `json:"is_floating_rate_ad_supported,omitempty"`

	// Local currency symbol
	Symbol string `json:"symbol"`
}

Local currency details.

func (*P2PSettingsRespP2PSettingsLocalCurrenciesElem) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsLocalCurrenciesElemHasAdverts ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsLocalCurrenciesElemHasAdverts int

func (*P2PSettingsRespP2PSettingsLocalCurrenciesElemHasAdverts) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsLocalCurrenciesElemIsDefault ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsLocalCurrenciesElemIsDefault int

func (*P2PSettingsRespP2PSettingsLocalCurrenciesElemIsDefault) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsLocalCurrenciesElemIsFloatingRateAdSupported ¶ added in v0.5.8

type P2PSettingsRespP2PSettingsLocalCurrenciesElemIsFloatingRateAdSupported int

func (*P2PSettingsRespP2PSettingsLocalCurrenciesElemIsFloatingRateAdSupported) UnmarshalJSON ¶ added in v0.5.8

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsPaymentMethodsEnabled ¶ added in v0.4.3

type P2PSettingsRespP2PSettingsPaymentMethodsEnabled int

func (*P2PSettingsRespP2PSettingsPaymentMethodsEnabled) UnmarshalJSON ¶ added in v0.4.3

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsPnvRequired ¶ added in v0.5.8

type P2PSettingsRespP2PSettingsPnvRequired int

func (*P2PSettingsRespP2PSettingsPnvRequired) UnmarshalJSON ¶ added in v0.5.8

func (j *P2PSettingsRespP2PSettingsPnvRequired) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespP2PSettingsPoaRequired ¶ added in v0.5.8

type P2PSettingsRespP2PSettingsPoaRequired int

func (*P2PSettingsRespP2PSettingsPoaRequired) UnmarshalJSON ¶ added in v0.5.8

func (j *P2PSettingsRespP2PSettingsPoaRequired) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsRespSubscription ¶ added in v0.4.3

type P2PSettingsRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*P2PSettingsRespSubscription) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type P2PSettingsSubscribe ¶ added in v0.4.3

type P2PSettingsSubscribe int

func (*P2PSettingsSubscribe) UnmarshalJSON ¶ added in v0.4.3

func (j *P2PSettingsSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreation ¶ added in v0.6.0

type PartnerAccountCreation struct {
	// [Optional] Within 100 characters.
	AddressCity *string `json:"address_city,omitempty"`

	// Within 70 characters, with no leading whitespaces and may contain
	// letters/numbers and/or any of following characters '.,:;()@#/-
	AddressLine1 *string `json:"address_line_1,omitempty"`

	// [Optional] Within 70 characters.
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// [Optional] Within 20 characters and may not contain '+'.
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// [Optional] Possible value receive from `states_list` call.
	AddressState *string `json:"address_state,omitempty"`

	// [Optional] The phone's calling country code. Don't include the `+` sign. Up to
	// 4 digits.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// [Optional] Country of legal citizenship, 2-letter country code.
	Citizen *string `json:"citizen,omitempty"`

	// [Optional] Company name. Only applicable for partners of type company.
	CompanyName *string `json:"company_name,omitempty"`

	// [Optional] Company registration number. Only applicable for partners of type
	// company.
	CompanyRegistrationNo *string `json:"company_registration_no,omitempty"`

	// [Optional] To set currency of the account. List of supported currencies can be
	// acquired with `payout_currencies` call.
	Currency *string `json:"currency,omitempty"`

	// Date of birth format: `yyyy-mm-dd`.
	DateOfBirth *string `json:"date_of_birth,omitempty"`

	// Email address
	Email *string `json:"email,omitempty"`

	// [Optional] Indicates client's self-declaration of FATCA.
	FatcaDeclaration *PartnerAccountCreationFatcaDeclaration `json:"fatca_declaration,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	FirstName *string `json:"first_name,omitempty"`

	// [Optional] If specified, will return only the underlyings for the specified
	// landing company.
	LandingCompanyShort *PartnerAccountCreationLandingCompanyShort `json:"landing_company_short,omitempty"`

	// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or
	// apostrophes.
	LastName *string `json:"last_name,omitempty"`

	// [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
	// (Politically Exposed Person/Relatives and Close Associates).
	NonPepDeclaration *int `json:"non_pep_declaration,omitempty"`

	// Must be `1`
	PartnerAccountCreation PartnerAccountCreationPartnerAccountCreation `json:"partner_account_creation"`

	// Defines whether this partner is an individual or a company. Only applicable for
	// partners
	PartnerType *PartnerAccountCreationPartnerType `json:"partner_type,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PartnerAccountCreationPassthrough `json:"passthrough,omitempty"`

	// [Optional] The phone's national format, don't include the `+` sign nor the
	// calling country code. Up to 15 digits are allowed.
	Phone *string `json:"phone,omitempty"`

	// [Optional] Name  of the provider platform.
	Provider *PartnerAccountCreationProvider `json:"provider,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// 2-letter country code, possible value receive from `residence_list` call.
	Residence *string `json:"residence,omitempty"`

	// Accept any value in enum list.
	Salutation PartnerAccountCreationSalutation `json:"salutation"`

	// The tnc acceptance status of the user.
	TncAcceptance *PartnerAccountCreationTncAcceptance `json:"tnc_acceptance,omitempty"`

	// Partner's Website URI/Promotional Platform
	Website *string `json:"website,omitempty"`
}

This call initiates the state machine for account creation process

func (*PartnerAccountCreation) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationFatcaDeclaration ¶ added in v0.6.0

type PartnerAccountCreationFatcaDeclaration int

func (*PartnerAccountCreationFatcaDeclaration) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationFatcaDeclaration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationLandingCompanyShort ¶ added in v0.6.0

type PartnerAccountCreationLandingCompanyShort string
const PartnerAccountCreationLandingCompanyShortMaltainvest PartnerAccountCreationLandingCompanyShort = "maltainvest"
const PartnerAccountCreationLandingCompanyShortSvg PartnerAccountCreationLandingCompanyShort = "svg"

func (*PartnerAccountCreationLandingCompanyShort) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationPartnerAccountCreation ¶ added in v0.6.0

type PartnerAccountCreationPartnerAccountCreation int

func (*PartnerAccountCreationPartnerAccountCreation) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationPartnerType ¶ added in v0.6.0

type PartnerAccountCreationPartnerType string
const PartnerAccountCreationPartnerTypeCompany PartnerAccountCreationPartnerType = "company"
const PartnerAccountCreationPartnerTypeIndividual PartnerAccountCreationPartnerType = "individual"

func (*PartnerAccountCreationPartnerType) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationPartnerType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationPassthrough ¶ added in v0.6.0

type PartnerAccountCreationPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PartnerAccountCreationProvider ¶ added in v0.6.0

type PartnerAccountCreationProvider string
const PartnerAccountCreationProviderDynamicworks PartnerAccountCreationProvider = "dynamicworks"
const PartnerAccountCreationProviderMyaffiliate PartnerAccountCreationProvider = "myaffiliate"

func (*PartnerAccountCreationProvider) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationProvider) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationResp ¶ added in v0.6.0

type PartnerAccountCreationResp struct {
	// Echo of the request made.
	EchoReq PartnerAccountCreationRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PartnerAccountCreationRespMsgType `json:"msg_type"`

	// New partner account creation details for real partner wallet
	PartnerAccountCreation *PartnerAccountCreationRespPartnerAccountCreation `json:"partner_account_creation,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Create partner accounts - Receive

func (*PartnerAccountCreationResp) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationRespEchoReq ¶ added in v0.6.0

type PartnerAccountCreationRespEchoReq map[string]interface{}

Echo of the request made.

type PartnerAccountCreationRespMsgType ¶ added in v0.6.0

type PartnerAccountCreationRespMsgType string
const PartnerAccountCreationRespMsgTypePartnerAccountCreation PartnerAccountCreationRespMsgType = "partner_account_creation"

func (*PartnerAccountCreationRespMsgType) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationRespPartnerAccountCreation ¶ added in v0.6.0

type PartnerAccountCreationRespPartnerAccountCreation struct {
	// Client ID of new real partner account
	ClientId *string `json:"client_id,omitempty"`

	// Currency of an account
	Currency *string `json:"currency,omitempty"`

	// Currency type against the currency
	CurrencyType *string `json:"currency_type,omitempty"`

	// Landing company full name
	LandingCompany *string `json:"landing_company,omitempty"`

	// Landing company shortcode
	LandingCompanyShortcode *string `json:"landing_company_shortcode,omitempty"`

	// OAuth token for client's login session
	OauthToken *string `json:"oauth_token,omitempty"`
}

New partner account creation details for real partner wallet

type PartnerAccountCreationSalutation ¶ added in v0.6.0

type PartnerAccountCreationSalutation string
const PartnerAccountCreationSalutationMiss PartnerAccountCreationSalutation = "Miss"
const PartnerAccountCreationSalutationMr PartnerAccountCreationSalutation = "Mr"
const PartnerAccountCreationSalutationMrs PartnerAccountCreationSalutation = "Mrs"
const PartnerAccountCreationSalutationMs PartnerAccountCreationSalutation = "Ms"

func (*PartnerAccountCreationSalutation) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationSalutation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatus ¶ added in v0.6.0

type PartnerAccountCreationStatus struct {
	// [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`
	PartnerAccountCreationStatus PartnerAccountCreationStatusPartnerAccountCreationStatus `json:"partner_account_creation_status"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PartnerAccountCreationStatusPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

This call polls the state machine and returns the completion status for each step.

func (*PartnerAccountCreationStatus) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatusPartnerAccountCreationStatus ¶ added in v0.6.0

type PartnerAccountCreationStatusPartnerAccountCreationStatus int

func (*PartnerAccountCreationStatusPartnerAccountCreationStatus) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatusPassthrough ¶ added in v0.6.0

type PartnerAccountCreationStatusPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PartnerAccountCreationStatusResp ¶ added in v0.6.0

type PartnerAccountCreationStatusResp struct {
	// Echo of the request made.
	EchoReq PartnerAccountCreationStatusRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PartnerAccountCreationStatusRespMsgType `json:"msg_type"`

	// Status information for the partner account creation process
	PartnerAccountCreationStatus *PartnerAccountCreationStatusRespPartnerAccountCreationStatus `json:"partner_account_creation_status,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A response message containing the status of partner account creation process

func (*PartnerAccountCreationStatusResp) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationStatusResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatusRespEchoReq ¶ added in v0.6.0

type PartnerAccountCreationStatusRespEchoReq map[string]interface{}

Echo of the request made.

type PartnerAccountCreationStatusRespMsgType ¶ added in v0.6.0

type PartnerAccountCreationStatusRespMsgType string
const PartnerAccountCreationStatusRespMsgTypePartnerAccountCreationStatus PartnerAccountCreationStatusRespMsgType = "partner_account_creation_status"

func (*PartnerAccountCreationStatusRespMsgType) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationStatusRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatusRespPartnerAccountCreationStatus ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatus struct {
	// Status of CFD account creation
	CreateCFDAccount PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccount `json:"create_CFD_account"`

	// Status of EU partner account creation
	CreateEuPartner PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartner `json:"create_eu_partner"`

	// Status of ROW partner account creation
	CreateRowPartner PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartner `json:"create_row_partner"`

	// Status of third party user creation
	CreateThirdPartyProviderUser PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUser `json:"create_third_party_provider_user"`

	// Status of linking EU partner account
	LinkPartnerEu PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEu `json:"link_partner_eu"`

	// Status of linking ROW partner account
	LinkPartnerRow PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRow `json:"link_partner_row"`
}

Status information for the partner account creation process

func (*PartnerAccountCreationStatusRespPartnerAccountCreationStatus) UnmarshalJSON ¶ added in v0.6.0

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccount ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccount struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccountResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of CFD account creation

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccountResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateCFDAccountResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartner ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartner struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartnerResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of EU partner account creation

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartnerResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateEuPartnerResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartner ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartner struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartnerResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of ROW partner account creation

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartnerResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateRowPartnerResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUser ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUser struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUserResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of third party user creation

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUserResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusCreateThirdPartyProviderUserResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEu ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEu struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEuResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of linking EU partner account

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEuResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerEuResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRow ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRow struct {
	// Response data if step completed successfully
	Response PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRowResponse `json:"response,omitempty"`

	// Current status of this step
	Status *string `json:"status,omitempty"`
}

Status of linking ROW partner account

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRowResponse ¶ added in v0.6.0

type PartnerAccountCreationStatusRespPartnerAccountCreationStatusLinkPartnerRowResponse map[string]interface{}

Response data if step completed successfully

type PartnerAccountCreationTncAcceptance ¶ added in v0.6.0

type PartnerAccountCreationTncAcceptance int

func (*PartnerAccountCreationTncAcceptance) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerAccountCreationTncAcceptance) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccounts ¶ added in v0.5.4

type PartnerAccounts struct {
	// [Optional] The login id of the partner account. Mandatory when multiple tokens
	// were provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	PartnerAccounts PartnerAccountsPartnerAccounts `json:"partner_accounts"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PartnerAccountsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get All Partner Accounts (Partner account details like website, provider, company details)

func (*PartnerAccounts) UnmarshalJSON ¶ added in v0.5.4

func (j *PartnerAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsPartnerAccounts ¶ added in v0.5.4

type PartnerAccountsPartnerAccounts int

func (*PartnerAccountsPartnerAccounts) UnmarshalJSON ¶ added in v0.5.4

func (j *PartnerAccountsPartnerAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsPassthrough ¶ added in v0.5.4

type PartnerAccountsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PartnerAccountsResp ¶ added in v0.5.4

type PartnerAccountsResp struct {
	// Echo of the request made.
	EchoReq PartnerAccountsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PartnerAccountsRespMsgType `json:"msg_type"`

	// Partner Accounts against a user
	PartnerAccounts *PartnerAccountsRespPartnerAccounts `json:"partner_accounts,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get All Partner Accounts (Partner account details like website, provider, company details)

func (*PartnerAccountsResp) UnmarshalJSON ¶ added in v0.5.4

func (j *PartnerAccountsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsRespEchoReq ¶ added in v0.5.4

type PartnerAccountsRespEchoReq map[string]interface{}

Echo of the request made.

type PartnerAccountsRespMsgType ¶ added in v0.5.4

type PartnerAccountsRespMsgType string
const PartnerAccountsRespMsgTypePartnerAccounts PartnerAccountsRespMsgType = "partner_accounts"

func (*PartnerAccountsRespMsgType) UnmarshalJSON ¶ added in v0.5.4

func (j *PartnerAccountsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsRespPartnerAccounts ¶ added in v0.5.4

type PartnerAccountsRespPartnerAccounts struct {
	// List of partner_settigns for all accounts associated as partners.
	PartnerSettings []PartnerAccountsRespPartnerAccountsPartnerSettingsElem `json:"partner_settings,omitempty"`

	// Platform URL for Dynamic works dashboard to be redirected from Partners Hub
	// which will be set in BackOffice.
	PlatformUrl PartnerAccountsRespPartnerAccountsPlatformUrl `json:"platform_url,omitempty"`
}

Partner Accounts against a user

type PartnerAccountsRespPartnerAccountsPartnerSettingsElem ¶ added in v0.5.4

type PartnerAccountsRespPartnerAccountsPartnerSettingsElem struct {
	// The user id.
	BinaryUserId *int `json:"binary_user_id,omitempty"`

	// [Optional] Company name. Only applicable for partners of type company.
	CompanyName *string `json:"company_name,omitempty"`

	// [Optional] Company registration number. Only applicable for partners of type
	// company.
	CompanyRegistrationNo *string `json:"company_registration_no,omitempty"`

	// Partner's login ID
	PartnerLoginid *string `json:"partner_loginid,omitempty"`

	// Defines whether this partner is an individual or a company.
	PartnerType *PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType `json:"partner_type,omitempty"`

	// Defines the provider platform.
	Provider *PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider `json:"provider,omitempty"`

	// Partner's Website URI/Promotional Platform
	Website *string `json:"website,omitempty"`
}

type PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType ¶ added in v0.5.4

type PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType string
const PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerTypeCompany PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType = "company"
const PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerTypeIndividual PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType = "individual"

func (*PartnerAccountsRespPartnerAccountsPartnerSettingsElemPartnerType) UnmarshalJSON ¶ added in v0.5.4

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider ¶ added in v0.5.4

type PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider string
const PartnerAccountsRespPartnerAccountsPartnerSettingsElemProviderDynamicworks PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider = "dynamicworks"
const PartnerAccountsRespPartnerAccountsPartnerSettingsElemProviderMyaffiliate PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider = "myaffiliate"

func (*PartnerAccountsRespPartnerAccountsPartnerSettingsElemProvider) UnmarshalJSON ¶ added in v0.5.4

UnmarshalJSON implements json.Unmarshaler.

type PartnerAccountsRespPartnerAccountsPlatformUrl ¶ added in v0.5.7

type PartnerAccountsRespPartnerAccountsPlatformUrl map[string]interface{}

Platform URL for Dynamic works dashboard to be redirected from Partners Hub which will be set in BackOffice.

type PartnerSettings ¶ added in v0.5.3

type PartnerSettings struct {
	// [Optional] The login id of the partner account. Mandatory when multiple tokens
	// were provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	PartnerSettings PartnerSettingsPartnerSettings `json:"partner_settings"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PartnerSettingsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Get Partner Settings (Partner Type, Company Details etc)

func (*PartnerSettings) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsPartnerSettings ¶ added in v0.5.3

type PartnerSettingsPartnerSettings int

func (*PartnerSettingsPartnerSettings) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsPartnerSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsPassthrough ¶ added in v0.5.3

type PartnerSettingsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PartnerSettingsResp ¶ added in v0.5.3

type PartnerSettingsResp struct {
	// Echo of the request made.
	EchoReq PartnerSettingsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PartnerSettingsRespMsgType `json:"msg_type"`

	// Partner-specific information and settings.
	PartnerSettings *PartnerSettingsRespPartnerSettings `json:"partner_settings,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Get Partner Settings (Partner Type, Company Details etc)

func (*PartnerSettingsResp) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsRespEchoReq ¶ added in v0.5.3

type PartnerSettingsRespEchoReq map[string]interface{}

Echo of the request made.

type PartnerSettingsRespMsgType ¶ added in v0.5.3

type PartnerSettingsRespMsgType string
const PartnerSettingsRespMsgTypePartnerSettings PartnerSettingsRespMsgType = "partner_settings"

func (*PartnerSettingsRespMsgType) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsRespPartnerSettings ¶ added in v0.5.3

type PartnerSettingsRespPartnerSettings struct {
	// [Optional] Company name. Only applicable for partners of type company.
	CompanyName *string `json:"company_name,omitempty"`

	// [Optional] Company registration number. Only applicable for partners of type
	// company.
	CompanyRegistrationNumber *string `json:"company_registration_number,omitempty"`

	// Defines whether this partner is an individual or a company.
	PartnerType *PartnerSettingsRespPartnerSettingsPartnerType `json:"partner_type,omitempty"`

	// Platform URL for Dynamic works dashboard to be redirected from Partners Hub
	// which will be set in BackOffice.
	PlatformURL *string `json:"platform_URL,omitempty"`

	// Defines the provider platform.
	Provider *PartnerSettingsRespPartnerSettingsProvider `json:"provider,omitempty"`

	// Partner's Website URI/Promotional Platform
	Website *string `json:"website,omitempty"`
}

Partner-specific information and settings.

type PartnerSettingsRespPartnerSettingsPartnerType ¶ added in v0.5.3

type PartnerSettingsRespPartnerSettingsPartnerType string
const PartnerSettingsRespPartnerSettingsPartnerTypeCompany PartnerSettingsRespPartnerSettingsPartnerType = "company"
const PartnerSettingsRespPartnerSettingsPartnerTypeIndividual PartnerSettingsRespPartnerSettingsPartnerType = "individual"

func (*PartnerSettingsRespPartnerSettingsPartnerType) UnmarshalJSON ¶ added in v0.5.3

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsRespPartnerSettingsProvider ¶ added in v0.5.3

type PartnerSettingsRespPartnerSettingsProvider string
const PartnerSettingsRespPartnerSettingsProviderDynamicworks PartnerSettingsRespPartnerSettingsProvider = "dynamicworks"
const PartnerSettingsRespPartnerSettingsProviderMyaffiliate PartnerSettingsRespPartnerSettingsProvider = "myaffiliate"

func (*PartnerSettingsRespPartnerSettingsProvider) UnmarshalJSON ¶ added in v0.5.3

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdate ¶ added in v0.5.3

type PartnerSettingsUpdate struct {
	// [Optional] Company name. Only applicable for partners of type company.
	CompanyName *string `json:"company_name,omitempty"`

	// [Optional] Company registration number. Only applicable for partners of type
	// company.
	CompanyRegistrationNo *string `json:"company_registration_no,omitempty"`

	// [Optional] The login id of the partner account. Mandatory when multiple tokens
	// were provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Must be `1`
	PartnerSettingsUpdate PartnerSettingsUpdatePartnerSettingsUpdate `json:"partner_settings_update"`

	// Defines whether this partner is an individual or a company.
	PartnerType *PartnerSettingsUpdatePartnerType `json:"partner_type,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PartnerSettingsUpdatePassthrough `json:"passthrough,omitempty"`

	// Name of the provider platform.
	Provider PartnerSettingsUpdateProvider `json:"provider"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Partner's Website URI/Promotional Platform
	Website *string `json:"website,omitempty"`
}

A message with Partner Settings

func (*PartnerSettingsUpdate) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsUpdate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdatePartnerSettingsUpdate ¶ added in v0.5.3

type PartnerSettingsUpdatePartnerSettingsUpdate int

func (*PartnerSettingsUpdatePartnerSettingsUpdate) UnmarshalJSON ¶ added in v0.5.3

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdatePartnerType ¶ added in v0.5.3

type PartnerSettingsUpdatePartnerType string
const PartnerSettingsUpdatePartnerTypeCompany PartnerSettingsUpdatePartnerType = "company"
const PartnerSettingsUpdatePartnerTypeIndividual PartnerSettingsUpdatePartnerType = "individual"

func (*PartnerSettingsUpdatePartnerType) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsUpdatePartnerType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdatePassthrough ¶ added in v0.5.3

type PartnerSettingsUpdatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PartnerSettingsUpdateProvider ¶ added in v0.6.0

type PartnerSettingsUpdateProvider string
const PartnerSettingsUpdateProviderDynamicworks PartnerSettingsUpdateProvider = "dynamicworks"
const PartnerSettingsUpdateProviderMyaffiliate PartnerSettingsUpdateProvider = "myaffiliate"

func (*PartnerSettingsUpdateProvider) UnmarshalJSON ¶ added in v0.6.0

func (j *PartnerSettingsUpdateProvider) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdateResp ¶ added in v0.5.3

type PartnerSettingsUpdateResp struct {
	// Echo of the request made.
	EchoReq PartnerSettingsUpdateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PartnerSettingsUpdateRespMsgType `json:"msg_type"`

	// 1 on success
	PartnerSettingsUpdate *int `json:"partner_settings_update,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with Partner Settings

func (*PartnerSettingsUpdateResp) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsUpdateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PartnerSettingsUpdateRespEchoReq ¶ added in v0.5.3

type PartnerSettingsUpdateRespEchoReq map[string]interface{}

Echo of the request made.

type PartnerSettingsUpdateRespMsgType ¶ added in v0.5.3

type PartnerSettingsUpdateRespMsgType string
const PartnerSettingsUpdateRespMsgTypePartnerSettingsUpdate PartnerSettingsUpdateRespMsgType = "partner_settings_update"

func (*PartnerSettingsUpdateRespMsgType) UnmarshalJSON ¶ added in v0.5.3

func (j *PartnerSettingsUpdateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethods ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentMethodsPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	PaymentMethods PaymentMethodsPaymentMethods `json:"payment_methods"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Will return a list payment methods available for the given country. If the request is authenticated the client's residence country will be used.

func (*PaymentMethods) UnmarshalJSON ¶

func (j *PaymentMethods) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethodsPassthrough ¶

type PaymentMethodsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentMethodsPaymentMethods ¶

type PaymentMethodsPaymentMethods int

func (*PaymentMethodsPaymentMethods) UnmarshalJSON ¶

func (j *PaymentMethodsPaymentMethods) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethodsResp ¶

type PaymentMethodsResp struct {
	// Echo of the request made.
	EchoReq PaymentMethodsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentMethodsRespMsgType `json:"msg_type"`

	// Available payment methods for a given country. Note: if a user is logged in,
	// the residence country will be considered.
	PaymentMethods []PaymentMethodsRespPaymentMethodsElem `json:"payment_methods,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

List of available payment methods for a given country.

func (*PaymentMethodsResp) UnmarshalJSON ¶

func (j *PaymentMethodsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethodsRespEchoReq ¶

type PaymentMethodsRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentMethodsRespMsgType ¶

type PaymentMethodsRespMsgType string
const PaymentMethodsRespMsgTypePaymentMethods PaymentMethodsRespMsgType = "payment_methods"

func (*PaymentMethodsRespMsgType) UnmarshalJSON ¶

func (j *PaymentMethodsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethodsRespPaymentMethodsElem ¶

type PaymentMethodsRespPaymentMethodsElem struct {
	// The min and max values for deposits.
	DepositLimits PaymentMethodsRespPaymentMethodsElemDepositLimits `json:"deposit_limits"`

	// How much time it takes for a deposit to be processed.
	DepositTime string `json:"deposit_time"`

	// Short description explaining the payment method.
	Description string `json:"description"`

	// Common name for the payment method.
	DisplayName string `json:"display_name"`

	// Unique identifier for the payment method.
	Id string `json:"id"`

	// Payment processor for this payment method.
	PaymentProcessor string `json:"payment_processor"`

	// A list of predefined amounts for withdraw or deposit.
	PredefinedAmounts []int `json:"predefined_amounts"`

	// Sign up link for this payment method.
	SignupLink string `json:"signup_link"`

	// Currencies supported for this payment method.
	SupportedCurrencies []string `json:"supported_currencies"`

	// Type of Payment Method.
	Type string `json:"type"`

	// A printable description for type of payment method.
	TypeDisplayName string `json:"type_display_name"`

	// Withdrawal limits per currency.
	WithdrawLimits PaymentMethodsRespPaymentMethodsElemWithdrawLimits `json:"withdraw_limits"`

	// How much time takes a withdrawal to be processed.
	WithdrawalTime string `json:"withdrawal_time"`
}

A payment method suported for the given country

func (*PaymentMethodsRespPaymentMethodsElem) UnmarshalJSON ¶

func (j *PaymentMethodsRespPaymentMethodsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentMethodsRespPaymentMethodsElemDepositLimits ¶

type PaymentMethodsRespPaymentMethodsElemDepositLimits map[string]interface{}

The min and max values for deposits.

type PaymentMethodsRespPaymentMethodsElemWithdrawLimits ¶

type PaymentMethodsRespPaymentMethodsElemWithdrawLimits map[string]interface{}

Withdrawal limits per currency.

type PaymentagentCreate ¶

type PaymentagentCreate struct {
	// [Optional] Client's My Affiliate id, if exists.
	AffiliateId *string `json:"affiliate_id,omitempty"`

	// Indicates client's agreement with the Code of Conduct.
	CodeOfConductApproval PaymentagentCreateCodeOfConductApproval `json:"code_of_conduct_approval"`

	// Commission  (%) the agent wants to take on deposits
	CommissionDeposit float64 `json:"commission_deposit"`

	// Commission  (%) the agent wants to take on withdrawals
	CommissionWithdrawal float64 `json:"commission_withdrawal"`

	// Payment agent's email address.
	Email string `json:"email"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentCreatePassthrough `json:"passthrough,omitempty"`

	// The name with which the payment agent is going to be identified.
	PaymentAgentName string `json:"payment_agent_name"`

	// Must be 1
	PaymentagentCreate PaymentagentCreatePaymentagentCreate `json:"paymentagent_create"`

	// Payment agent's phone number(s) with country code.
	PhoneNumbers []PaymentagentCreatePhoneNumbersElem `json:"phone_numbers,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// A list of supported payment methods.
	SupportedPaymentMethods []PaymentagentCreateSupportedPaymentMethodsElem `json:"supported_payment_methods"`

	// The URL(s) of payment agent's website(s).
	Urls []PaymentagentCreateUrlsElem `json:"urls"`
}

Saves client's payment agent details.

func (*PaymentagentCreate) UnmarshalJSON ¶

func (j *PaymentagentCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreateCodeOfConductApproval ¶

type PaymentagentCreateCodeOfConductApproval int

func (*PaymentagentCreateCodeOfConductApproval) UnmarshalJSON ¶

func (j *PaymentagentCreateCodeOfConductApproval) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreatePassthrough ¶

type PaymentagentCreatePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentCreatePaymentagentCreate ¶

type PaymentagentCreatePaymentagentCreate int

func (*PaymentagentCreatePaymentagentCreate) UnmarshalJSON ¶

func (j *PaymentagentCreatePaymentagentCreate) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreatePhoneNumbersElem ¶

type PaymentagentCreatePhoneNumbersElem struct {
	// A phone number
	PhoneNumber string `json:"phone_number"`
}

func (*PaymentagentCreatePhoneNumbersElem) UnmarshalJSON ¶

func (j *PaymentagentCreatePhoneNumbersElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreateResp ¶

type PaymentagentCreateResp struct {
	// Echo of the request made.
	EchoReq PaymentagentCreateRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentCreateRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Sets client's payment agent details.

func (*PaymentagentCreateResp) UnmarshalJSON ¶

func (j *PaymentagentCreateResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreateRespEchoReq ¶

type PaymentagentCreateRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentCreateRespMsgType ¶

type PaymentagentCreateRespMsgType string
const PaymentagentCreateRespMsgTypePaymentagentCreate PaymentagentCreateRespMsgType = "paymentagent_create"

func (*PaymentagentCreateRespMsgType) UnmarshalJSON ¶

func (j *PaymentagentCreateRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreateSupportedPaymentMethodsElem ¶

type PaymentagentCreateSupportedPaymentMethodsElem struct {
	// A payment method's name
	PaymentMethod string `json:"payment_method"`
}

func (*PaymentagentCreateSupportedPaymentMethodsElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentCreateUrlsElem ¶

type PaymentagentCreateUrlsElem struct {
	// A webpage or website's URL.
	Url string `json:"url"`
}

func (*PaymentagentCreateUrlsElem) UnmarshalJSON ¶

func (j *PaymentagentCreateUrlsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetails ¶

type PaymentagentDetails struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentDetailsPassthrough `json:"passthrough,omitempty"`

	// Must be 1
	PaymentagentDetails PaymentagentDetailsPaymentagentDetails `json:"paymentagent_details"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Gets client's payment agent details.

func (*PaymentagentDetails) UnmarshalJSON ¶

func (j *PaymentagentDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsPassthrough ¶

type PaymentagentDetailsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentDetailsPaymentagentDetails ¶

type PaymentagentDetailsPaymentagentDetails int

func (*PaymentagentDetailsPaymentagentDetails) UnmarshalJSON ¶

func (j *PaymentagentDetailsPaymentagentDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsResp ¶

type PaymentagentDetailsResp struct {
	// Echo of the request made.
	EchoReq PaymentagentDetailsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentDetailsRespMsgType `json:"msg_type"`

	// Used to pass data through the websocket, which may be retrieved via the
	// `echo_req` output field.
	Passthrough PaymentagentDetailsRespPassthrough `json:"passthrough,omitempty"`

	// The payment agent details.
	PaymentagentDetails *PaymentagentDetailsRespPaymentagentDetails `json:"paymentagent_details,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Gets client's payment agent details.

func (*PaymentagentDetailsResp) UnmarshalJSON ¶

func (j *PaymentagentDetailsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespEchoReq ¶

type PaymentagentDetailsRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentDetailsRespMsgType ¶

type PaymentagentDetailsRespMsgType string
const PaymentagentDetailsRespMsgTypePaymentagentDetails PaymentagentDetailsRespMsgType = "paymentagent_details"

func (*PaymentagentDetailsRespMsgType) UnmarshalJSON ¶

func (j *PaymentagentDetailsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespPassthrough ¶

type PaymentagentDetailsRespPassthrough map[string]interface{}

Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentDetailsRespPaymentagentDetails ¶

type PaymentagentDetailsRespPaymentagentDetails struct {
	// Client's My Affiliate id, if exists.
	AffiliateId *string `json:"affiliate_id,omitempty"`

	// If 1, the client may apply using paymentagent_create.
	CanApply PaymentagentDetailsRespPaymentagentDetailsCanApply `json:"can_apply"`

	// Indicates client's agreement with the Code of Conduct document.
	CodeOfConductApproval *PaymentagentDetailsRespPaymentagentDetailsCodeOfConductApproval `json:"code_of_conduct_approval,omitempty"`

	// Commission (%) the agent want to take on deposits
	CommissionDeposit *float64 `json:"commission_deposit,omitempty"`

	// Commission (%) the agent want to take on withdrawals
	CommissionWithdrawal *float64 `json:"commission_withdrawal,omitempty"`

	// Currency supported by the payment agent. It's usually the same as agent's Deriv
	// account currency.
	CurrencyCode *string `json:"currency_code,omitempty"`

	// Contains a list of error codes that would prevent a successful payment agent
	// application.
	EligibiltyValidation []string `json:"eligibilty_validation,omitempty"`

	// Payment agent's email address.
	Email *string `json:"email,omitempty"`

	// Information about payment agent and their proposed service.
	Information *string `json:"information,omitempty"`

	// Maximum amount allowed for withdrawals
	MaxWithdrawal *float64 `json:"max_withdrawal,omitempty"`

	// Minimum amount allowed for withdrawals
	MinWithdrawal *float64 `json:"min_withdrawal,omitempty"`

	// Indicates if the payment agent was recently approved with no transactions yet.
	NewlyAuthorized *PaymentagentDetailsRespPaymentagentDetailsNewlyAuthorized `json:"newly_authorized,omitempty"`

	// The name with which the payment agent is going to be identified.
	PaymentAgentName *string `json:"payment_agent_name,omitempty"`

	// Payment agent's phone number(s) with country code.
	PhoneNumbers []PaymentagentDetailsRespPaymentagentDetailsPhoneNumbersElem `json:"phone_numbers,omitempty"`

	// Indicates the status of the Payment Agent.
	Status interface{} `json:"status,omitempty"`

	// A list of supported payment methods.
	SupportedPaymentMethods []PaymentagentDetailsRespPaymentagentDetailsSupportedPaymentMethodsElem `json:"supported_payment_methods,omitempty"`

	// Client's target country.
	TargetCountry *string `json:"target_country,omitempty"`

	// The URL(s) of payment agent's website(s).
	Urls []PaymentagentDetailsRespPaymentagentDetailsUrlsElem `json:"urls,omitempty"`
}

The payment agent details.

func (*PaymentagentDetailsRespPaymentagentDetails) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespPaymentagentDetailsCanApply ¶

type PaymentagentDetailsRespPaymentagentDetailsCanApply int

func (*PaymentagentDetailsRespPaymentagentDetailsCanApply) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespPaymentagentDetailsCodeOfConductApproval ¶

type PaymentagentDetailsRespPaymentagentDetailsCodeOfConductApproval int

func (*PaymentagentDetailsRespPaymentagentDetailsCodeOfConductApproval) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespPaymentagentDetailsNewlyAuthorized ¶

type PaymentagentDetailsRespPaymentagentDetailsNewlyAuthorized int

func (*PaymentagentDetailsRespPaymentagentDetailsNewlyAuthorized) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentDetailsRespPaymentagentDetailsPhoneNumbersElem ¶

type PaymentagentDetailsRespPaymentagentDetailsPhoneNumbersElem struct {
	// A phone number.
	PhoneNumber *string `json:"phone_number,omitempty"`
}

type PaymentagentDetailsRespPaymentagentDetailsSupportedPaymentMethodsElem ¶

type PaymentagentDetailsRespPaymentagentDetailsSupportedPaymentMethodsElem struct {
	// A payment method's name
	PaymentMethod *string `json:"payment_method,omitempty"`
}

type PaymentagentDetailsRespPaymentagentDetailsUrlsElem ¶

type PaymentagentDetailsRespPaymentagentDetailsUrlsElem struct {
	// A website url.
	Url *string `json:"url,omitempty"`
}

type PaymentagentList ¶

type PaymentagentList struct {
	// [Optional] If specified, only payment agents that supports that currency will
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentListPassthrough `json:"passthrough,omitempty"`

	// Client's 2-letter country code (obtained from `residence_list` call).
	PaymentagentList string `json:"paymentagent_list"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Will return a list of Payment Agents for a given country for a given currency. Payment agents allow users to deposit and withdraw funds using local payment methods that might not be available via the main website's cashier system.

func (*PaymentagentList) UnmarshalJSON ¶

func (j *PaymentagentList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentListPassthrough ¶

type PaymentagentListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentListResp ¶

type PaymentagentListResp struct {
	// Echo of the request made.
	EchoReq PaymentagentListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentListRespMsgType `json:"msg_type"`

	// Payment Agent List
	PaymentagentList *PaymentagentListRespPaymentagentList `json:"paymentagent_list,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A message with Payment Agent List

func (*PaymentagentListResp) UnmarshalJSON ¶

func (j *PaymentagentListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentListRespEchoReq ¶

type PaymentagentListRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentListRespMsgType ¶

type PaymentagentListRespMsgType string
const PaymentagentListRespMsgTypePaymentagentList PaymentagentListRespMsgType = "paymentagent_list"

func (*PaymentagentListRespMsgType) UnmarshalJSON ¶

func (j *PaymentagentListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentListRespPaymentagentList ¶

type PaymentagentListRespPaymentagentList struct {
	// The list of countries in which payment agent is available.
	AvailableCountries [][]*string `json:"available_countries,omitempty"`

	// List of payment agents available in the requested country.
	List []PaymentagentListRespPaymentagentListListElem `json:"list"`
}

Payment Agent List

func (*PaymentagentListRespPaymentagentList) UnmarshalJSON ¶

func (j *PaymentagentListRespPaymentagentList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentListRespPaymentagentListListElem ¶

type PaymentagentListRespPaymentagentListListElem struct {
	// Currencies that are accepted by this payment agent.
	Currencies string `json:"currencies"`

	// Commission amount applied on deposits made through this payment agent.
	DepositCommission string `json:"deposit_commission"`

	// Payment agent's email address.
	Email string `json:"email"`

	// More descriptions about this payment agent.
	FurtherInformation string `json:"further_information"`

	// Maximum withdrawal allowed for transactions through this payment agent.
	MaxWithdrawal *string `json:"max_withdrawal"`

	// Minimum withdrawal allowed for transactions through this payment agent.
	MinWithdrawal *string `json:"min_withdrawal"`

	// Payment agent's name.
	Name string `json:"name"`

	// Payment agent's loginid.
	PaymentagentLoginid string `json:"paymentagent_loginid"`

	// Payment agent's phone number(s) with country code.
	PhoneNumbers []PaymentagentListRespPaymentagentListListElemPhoneNumbersElem `json:"phone_numbers"`

	// A summary about payment agent.
	Summary string `json:"summary"`

	// A list of supported payment methods.
	SupportedPaymentMethods []PaymentagentListRespPaymentagentListListElemSupportedPaymentMethodsElem `json:"supported_payment_methods"`

	// The URL(s) of payment agent's website(s).
	Urls []PaymentagentListRespPaymentagentListListElemUrlsElem `json:"urls"`

	// Commission amount applied on withdrawals made through this payment agent.
	WithdrawalCommission string `json:"withdrawal_commission"`
}

func (*PaymentagentListRespPaymentagentListListElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentListRespPaymentagentListListElemPhoneNumbersElem ¶

type PaymentagentListRespPaymentagentListListElemPhoneNumbersElem struct {
	// A phone number
	PhoneNumber *string `json:"phone_number,omitempty"`
}

type PaymentagentListRespPaymentagentListListElemSupportedPaymentMethodsElem ¶

type PaymentagentListRespPaymentagentListListElemSupportedPaymentMethodsElem struct {
	// A payment method's name
	PaymentMethod *string `json:"payment_method,omitempty"`
}

type PaymentagentListRespPaymentagentListListElemUrlsElem ¶

type PaymentagentListRespPaymentagentListListElemUrlsElem struct {
	// A webpage or website's URL.
	Url *string `json:"url,omitempty"`
}

type PaymentagentTransfer ¶

type PaymentagentTransfer struct {
	// The amount to transfer.
	Amount float64 `json:"amount"`

	// Currency code.
	Currency string `json:"currency"`

	// [Optional] Remarks about the transfer.
	Description *string `json:"description,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentTransferPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	PaymentagentTransfer PaymentagentTransferPaymentagentTransfer `json:"paymentagent_transfer"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// The loginid of the recipient account.
	TransferTo string `json:"transfer_to"`
}

Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.

func (*PaymentagentTransfer) UnmarshalJSON ¶

func (j *PaymentagentTransfer) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentTransferDryRun ¶

type PaymentagentTransferDryRun int

func (*PaymentagentTransferDryRun) UnmarshalJSON ¶

func (j *PaymentagentTransferDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentTransferPassthrough ¶

type PaymentagentTransferPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentTransferPaymentagentTransfer ¶

type PaymentagentTransferPaymentagentTransfer int

func (*PaymentagentTransferPaymentagentTransfer) UnmarshalJSON ¶

func (j *PaymentagentTransferPaymentagentTransfer) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentTransferResp ¶

type PaymentagentTransferResp struct {
	// The `transfer_to` client full name
	ClientToFullName *string `json:"client_to_full_name,omitempty"`

	// The `transfer_to` client loginid
	ClientToLoginid *string `json:"client_to_loginid,omitempty"`

	// Echo of the request made.
	EchoReq PaymentagentTransferRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentTransferRespMsgType `json:"msg_type"`

	// If set to `1`, transfer success. If set to `2`, dry-run success.
	PaymentagentTransfer *PaymentagentTransferRespPaymentagentTransfer `json:"paymentagent_transfer,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Reference ID of transfer performed
	TransactionId *int `json:"transaction_id,omitempty"`
}

The result of transfer request made.

func (*PaymentagentTransferResp) UnmarshalJSON ¶

func (j *PaymentagentTransferResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentTransferRespEchoReq ¶

type PaymentagentTransferRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentTransferRespMsgType ¶

type PaymentagentTransferRespMsgType string
const PaymentagentTransferRespMsgTypePaymentagentTransfer PaymentagentTransferRespMsgType = "paymentagent_transfer"

func (*PaymentagentTransferRespMsgType) UnmarshalJSON ¶

func (j *PaymentagentTransferRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentTransferRespPaymentagentTransfer ¶

type PaymentagentTransferRespPaymentagentTransfer int

func (*PaymentagentTransferRespPaymentagentTransfer) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdraw ¶

type PaymentagentWithdraw struct {
	// The amount to withdraw to the payment agent.
	Amount float64 `json:"amount"`

	// The currency code.
	Currency string `json:"currency"`

	// [Optional] Remarks about the withdraw. Only letters, numbers, space, period,
	// comma, - ' are allowed.
	Description *string `json:"description,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentWithdrawPassthrough `json:"passthrough,omitempty"`

	// The payment agent loginid received from the `paymentagent_list` call.
	PaymentagentLoginid string `json:"paymentagent_loginid"`

	// Must be `1`
	PaymentagentWithdraw PaymentagentWithdrawPaymentagentWithdraw `json:"paymentagent_withdraw"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first)
	VerificationCode string `json:"verification_code"`
}

Initiate a withdrawal to an approved Payment Agent.

func (*PaymentagentWithdraw) UnmarshalJSON ¶

func (j *PaymentagentWithdraw) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawDryRun ¶

type PaymentagentWithdrawDryRun int

func (*PaymentagentWithdrawDryRun) UnmarshalJSON ¶

func (j *PaymentagentWithdrawDryRun) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawJustification ¶

type PaymentagentWithdrawJustification struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// Reasons for needing to withdraw using a Payment Agent.
	Message *string `json:"message,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PaymentagentWithdrawJustificationPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	PaymentagentWithdrawJustification PaymentagentWithdrawJustificationPaymentagentWithdrawJustification `json:"paymentagent_withdraw_justification"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Provide justification to perform withdrawal using a Payment Agent.

func (*PaymentagentWithdrawJustification) UnmarshalJSON ¶

func (j *PaymentagentWithdrawJustification) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawJustificationPassthrough ¶

type PaymentagentWithdrawJustificationPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentWithdrawJustificationPaymentagentWithdrawJustification ¶

type PaymentagentWithdrawJustificationPaymentagentWithdrawJustification int

func (*PaymentagentWithdrawJustificationPaymentagentWithdrawJustification) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawJustificationResp ¶

type PaymentagentWithdrawJustificationResp struct {
	// Echo of the request made.
	EchoReq PaymentagentWithdrawJustificationRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentWithdrawJustificationRespMsgType `json:"msg_type"`

	// 1 on success
	PaymentagentWithdrawJustification *int `json:"paymentagent_withdraw_justification,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of payment agent withdrawal justification request made.

func (*PaymentagentWithdrawJustificationResp) UnmarshalJSON ¶

func (j *PaymentagentWithdrawJustificationResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawJustificationRespEchoReq ¶

type PaymentagentWithdrawJustificationRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentWithdrawJustificationRespMsgType ¶

type PaymentagentWithdrawJustificationRespMsgType string
const PaymentagentWithdrawJustificationRespMsgTypePaymentagentWithdrawJustification PaymentagentWithdrawJustificationRespMsgType = "paymentagent_withdraw_justification"

func (*PaymentagentWithdrawJustificationRespMsgType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawPassthrough ¶

type PaymentagentWithdrawPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PaymentagentWithdrawPaymentagentWithdraw ¶

type PaymentagentWithdrawPaymentagentWithdraw int

func (*PaymentagentWithdrawPaymentagentWithdraw) UnmarshalJSON ¶

func (j *PaymentagentWithdrawPaymentagentWithdraw) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawResp ¶

type PaymentagentWithdrawResp struct {
	// Echo of the request made.
	EchoReq PaymentagentWithdrawRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PaymentagentWithdrawRespMsgType `json:"msg_type"`

	// Payment agent name.
	PaymentagentName *string `json:"paymentagent_name,omitempty"`

	// If set to `1`, withdrawal success. If set to `2`, dry-run success.
	PaymentagentWithdraw *PaymentagentWithdrawRespPaymentagentWithdraw `json:"paymentagent_withdraw,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Reference ID of withdrawal performed.
	TransactionId *int `json:"transaction_id,omitempty"`
}

The result of payment agent withdrawal request made.

func (*PaymentagentWithdrawResp) UnmarshalJSON ¶

func (j *PaymentagentWithdrawResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawRespEchoReq ¶

type PaymentagentWithdrawRespEchoReq map[string]interface{}

Echo of the request made.

type PaymentagentWithdrawRespMsgType ¶

type PaymentagentWithdrawRespMsgType string
const PaymentagentWithdrawRespMsgTypePaymentagentWithdraw PaymentagentWithdrawRespMsgType = "paymentagent_withdraw"

func (*PaymentagentWithdrawRespMsgType) UnmarshalJSON ¶

func (j *PaymentagentWithdrawRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PaymentagentWithdrawRespPaymentagentWithdraw ¶

type PaymentagentWithdrawRespPaymentagentWithdraw int

func (*PaymentagentWithdrawRespPaymentagentWithdraw) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type PayoutCurrencies ¶

type PayoutCurrencies struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PayoutCurrenciesPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	PayoutCurrencies PayoutCurrenciesPayoutCurrencies `json:"payout_currencies"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.

func (*PayoutCurrencies) UnmarshalJSON ¶

func (j *PayoutCurrencies) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PayoutCurrenciesPassthrough ¶

type PayoutCurrenciesPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PayoutCurrenciesPayoutCurrencies ¶

type PayoutCurrenciesPayoutCurrencies int

func (*PayoutCurrenciesPayoutCurrencies) UnmarshalJSON ¶

func (j *PayoutCurrenciesPayoutCurrencies) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PayoutCurrenciesResp ¶

type PayoutCurrenciesResp struct {
	// Echo of the request made.
	EchoReq PayoutCurrenciesRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PayoutCurrenciesRespMsgType `json:"msg_type"`

	// Available payout currencies. Note: if a user is logged in, only the currency
	// available for the account will be returned.
	PayoutCurrencies []string `json:"payout_currencies,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

List of available payout currencies.

func (*PayoutCurrenciesResp) UnmarshalJSON ¶

func (j *PayoutCurrenciesResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PayoutCurrenciesRespEchoReq ¶

type PayoutCurrenciesRespEchoReq map[string]interface{}

Echo of the request made.

type PayoutCurrenciesRespMsgType ¶

type PayoutCurrenciesRespMsgType string
const PayoutCurrenciesRespMsgTypePayoutCurrencies PayoutCurrenciesRespMsgType = "payout_currencies"

func (*PayoutCurrenciesRespMsgType) UnmarshalJSON ¶

func (j *PayoutCurrenciesRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Ping ¶

type Ping struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PingPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	Ping PingPing `json:"ping"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

To send the ping request to the server. Mostly used to test the connection or to keep it alive.

func (*Ping) UnmarshalJSON ¶

func (j *Ping) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PingPassthrough ¶

type PingPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PingPing ¶

type PingPing int

func (*PingPing) UnmarshalJSON ¶

func (j *PingPing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PingResp ¶

type PingResp struct {
	// Echo of the request made.
	EchoReq PingRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PingRespMsgType `json:"msg_type"`

	// Will return 'pong'
	Ping *PingRespPing `json:"ping,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The response of ping request.

func (*PingResp) UnmarshalJSON ¶

func (j *PingResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PingRespEchoReq ¶

type PingRespEchoReq map[string]interface{}

Echo of the request made.

type PingRespMsgType ¶

type PingRespMsgType string
const PingRespMsgTypePing PingRespMsgType = "ping"

func (*PingRespMsgType) UnmarshalJSON ¶

func (j *PingRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PingRespPing ¶

type PingRespPing string
const PingRespPingPong PingRespPing = "pong"

func (*PingRespPing) UnmarshalJSON ¶

func (j *PingRespPing) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Portfolio ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough PortfolioPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	Portfolio PortfolioPortfolio `json:"portfolio"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Receive information about my current portfolio of outstanding options

func (*Portfolio) UnmarshalJSON ¶

func (j *Portfolio) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioContractTypeElem ¶

type PortfolioContractTypeElem string
const PortfolioContractTypeElemACCU PortfolioContractTypeElem = "ACCU"
const PortfolioContractTypeElemASIAND PortfolioContractTypeElem = "ASIAND"
const PortfolioContractTypeElemASIANU PortfolioContractTypeElem = "ASIANU"
const PortfolioContractTypeElemCALL PortfolioContractTypeElem = "CALL"
const PortfolioContractTypeElemCALLE PortfolioContractTypeElem = "CALLE"
const PortfolioContractTypeElemCALLSPREAD PortfolioContractTypeElem = "CALLSPREAD"
const PortfolioContractTypeElemDIGITDIFF PortfolioContractTypeElem = "DIGITDIFF"
const PortfolioContractTypeElemDIGITEVEN PortfolioContractTypeElem = "DIGITEVEN"
const PortfolioContractTypeElemDIGITMATCH PortfolioContractTypeElem = "DIGITMATCH"
const PortfolioContractTypeElemDIGITODD PortfolioContractTypeElem = "DIGITODD"
const PortfolioContractTypeElemDIGITOVER PortfolioContractTypeElem = "DIGITOVER"
const PortfolioContractTypeElemDIGITUNDER PortfolioContractTypeElem = "DIGITUNDER"
const PortfolioContractTypeElemEXPIRYMISS PortfolioContractTypeElem = "EXPIRYMISS"
const PortfolioContractTypeElemEXPIRYMISSE PortfolioContractTypeElem = "EXPIRYMISSE"
const PortfolioContractTypeElemEXPIRYRANGE PortfolioContractTypeElem = "EXPIRYRANGE"
const PortfolioContractTypeElemEXPIRYRANGEE PortfolioContractTypeElem = "EXPIRYRANGEE"
const PortfolioContractTypeElemLBFLOATCALL PortfolioContractTypeElem = "LBFLOATCALL"
const PortfolioContractTypeElemLBFLOATPUT PortfolioContractTypeElem = "LBFLOATPUT"
const PortfolioContractTypeElemLBHIGHLOW PortfolioContractTypeElem = "LBHIGHLOW"
const PortfolioContractTypeElemMULTDOWN PortfolioContractTypeElem = "MULTDOWN"
const PortfolioContractTypeElemMULTUP PortfolioContractTypeElem = "MULTUP"
const PortfolioContractTypeElemNOTOUCH PortfolioContractTypeElem = "NOTOUCH"
const PortfolioContractTypeElemONETOUCH PortfolioContractTypeElem = "ONETOUCH"
const PortfolioContractTypeElemPUT PortfolioContractTypeElem = "PUT"
const PortfolioContractTypeElemPUTE PortfolioContractTypeElem = "PUTE"
const PortfolioContractTypeElemPUTSPREAD PortfolioContractTypeElem = "PUTSPREAD"
const PortfolioContractTypeElemRANGE PortfolioContractTypeElem = "RANGE"
const PortfolioContractTypeElemRESETCALL PortfolioContractTypeElem = "RESETCALL"
const PortfolioContractTypeElemRESETPUT PortfolioContractTypeElem = "RESETPUT"
const PortfolioContractTypeElemRUNHIGH PortfolioContractTypeElem = "RUNHIGH"
const PortfolioContractTypeElemRUNLOW PortfolioContractTypeElem = "RUNLOW"
const PortfolioContractTypeElemTICKHIGH PortfolioContractTypeElem = "TICKHIGH"
const PortfolioContractTypeElemTICKLOW PortfolioContractTypeElem = "TICKLOW"
const PortfolioContractTypeElemTURBOSLONG PortfolioContractTypeElem = "TURBOSLONG"
const PortfolioContractTypeElemTURBOSSHORT PortfolioContractTypeElem = "TURBOSSHORT"
const PortfolioContractTypeElemUPORDOWN PortfolioContractTypeElem = "UPORDOWN"
const PortfolioContractTypeElemVANILLALONGCALL PortfolioContractTypeElem = "VANILLALONGCALL"
const PortfolioContractTypeElemVANILLALONGPUT PortfolioContractTypeElem = "VANILLALONGPUT"

func (*PortfolioContractTypeElem) UnmarshalJSON ¶

func (j *PortfolioContractTypeElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioPassthrough ¶

type PortfolioPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type PortfolioPortfolio ¶

type PortfolioPortfolio int

func (*PortfolioPortfolio) UnmarshalJSON ¶

func (j *PortfolioPortfolio) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioResp ¶

type PortfolioResp struct {
	// Echo of the request made.
	EchoReq PortfolioRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType PortfolioRespMsgType `json:"msg_type"`

	// Current account's open positions.
	Portfolio *PortfolioRespPortfolio `json:"portfolio,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

Receive a list of outstanding options in the user's portfolio

func (*PortfolioResp) UnmarshalJSON ¶

func (j *PortfolioResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioRespEchoReq ¶

type PortfolioRespEchoReq map[string]interface{}

Echo of the request made.

type PortfolioRespMsgType ¶

type PortfolioRespMsgType string
const PortfolioRespMsgTypePortfolio PortfolioRespMsgType = "portfolio"

func (*PortfolioRespMsgType) UnmarshalJSON ¶

func (j *PortfolioRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioRespPortfolio ¶

type PortfolioRespPortfolio struct {
	// List of open positions.
	Contracts []PortfolioRespPortfolioContractsElem `json:"contracts"`
}

Current account's open positions.

func (*PortfolioRespPortfolio) UnmarshalJSON ¶

func (j *PortfolioRespPortfolio) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PortfolioRespPortfolioContractsElem ¶

type PortfolioRespPortfolioContractsElem struct {
	// ID of the application where this contract was purchased.
	AppId *int `json:"app_id,omitempty"`

	// Buy price
	BuyPrice *float64 `json:"buy_price,omitempty"`

	// Internal contract identifier number (to be used in a `proposal_open_contract`
	// API call).
	ContractId *int `json:"contract_id,omitempty"`

	// Contract type
	ContractType *string `json:"contract_type,omitempty"`

	// Contract currency
	Currency *string `json:"currency,omitempty"`

	// Epoch of start date
	DateStart *int `json:"date_start,omitempty"`

	// Epoch of expiry time
	ExpiryTime *int `json:"expiry_time,omitempty"`

	// Contract description
	Longcode *string `json:"longcode,omitempty"`

	// Payout price
	Payout *float64 `json:"payout,omitempty"`

	// Epoch of purchase time
	PurchaseTime *int `json:"purchase_time,omitempty"`

	// Contract short code description
	Shortcode *string `json:"shortcode,omitempty"`

	// Symbol code
	Symbol *string `json:"symbol,omitempty"`

	// It is the transaction ID. Every contract (buy or sell) and every payment has a
	// unique ID.
	TransactionId *int `json:"transaction_id,omitempty"`
}

The details of each open position.

type ProfitTable ¶

type ProfitTable struct {
	// Return only contracts of the specified types
	ContractType []ProfitTableContractTypeElem `json:"contract_type,omitempty"`

	// [Optional] Start date (epoch or YYYY-MM-DD)
	DateFrom *string `json:"date_from,omitempty"`

	// [Optional] End date (epoch or YYYY-MM-DD)
	DateTo *string `json:"date_to,omitempty"`

	// [Optional] If set to 1, will return full contracts description.
	Description *ProfitTableDescription `json:"description,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Number of transactions to skip.
	Offset *int `json:"offset,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ProfitTablePassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	ProfitTable ProfitTableProfitTable `json:"profit_table"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Sort direction.
	Sort ProfitTableSort `json:"sort,omitempty"`
}

Retrieve a summary of account Profit Table, according to given search criteria

func (*ProfitTable) UnmarshalJSON ¶

func (j *ProfitTable) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTableContractTypeElem ¶

type ProfitTableContractTypeElem string
const ProfitTableContractTypeElemACCU ProfitTableContractTypeElem = "ACCU"
const ProfitTableContractTypeElemASIAND ProfitTableContractTypeElem = "ASIAND"
const ProfitTableContractTypeElemASIANU ProfitTableContractTypeElem = "ASIANU"
const ProfitTableContractTypeElemCALL ProfitTableContractTypeElem = "CALL"
const ProfitTableContractTypeElemCALLE ProfitTableContractTypeElem = "CALLE"
const ProfitTableContractTypeElemCALLSPREAD ProfitTableContractTypeElem = "CALLSPREAD"
const ProfitTableContractTypeElemDIGITDIFF ProfitTableContractTypeElem = "DIGITDIFF"
const ProfitTableContractTypeElemDIGITEVEN ProfitTableContractTypeElem = "DIGITEVEN"
const ProfitTableContractTypeElemDIGITMATCH ProfitTableContractTypeElem = "DIGITMATCH"
const ProfitTableContractTypeElemDIGITODD ProfitTableContractTypeElem = "DIGITODD"
const ProfitTableContractTypeElemDIGITOVER ProfitTableContractTypeElem = "DIGITOVER"
const ProfitTableContractTypeElemDIGITUNDER ProfitTableContractTypeElem = "DIGITUNDER"
const ProfitTableContractTypeElemEXPIRYMISS ProfitTableContractTypeElem = "EXPIRYMISS"
const ProfitTableContractTypeElemEXPIRYMISSE ProfitTableContractTypeElem = "EXPIRYMISSE"
const ProfitTableContractTypeElemEXPIRYRANGE ProfitTableContractTypeElem = "EXPIRYRANGE"
const ProfitTableContractTypeElemEXPIRYRANGEE ProfitTableContractTypeElem = "EXPIRYRANGEE"
const ProfitTableContractTypeElemLBFLOATCALL ProfitTableContractTypeElem = "LBFLOATCALL"
const ProfitTableContractTypeElemLBFLOATPUT ProfitTableContractTypeElem = "LBFLOATPUT"
const ProfitTableContractTypeElemLBHIGHLOW ProfitTableContractTypeElem = "LBHIGHLOW"
const ProfitTableContractTypeElemMULTDOWN ProfitTableContractTypeElem = "MULTDOWN"
const ProfitTableContractTypeElemMULTUP ProfitTableContractTypeElem = "MULTUP"
const ProfitTableContractTypeElemNOTOUCH ProfitTableContractTypeElem = "NOTOUCH"
const ProfitTableContractTypeElemONETOUCH ProfitTableContractTypeElem = "ONETOUCH"
const ProfitTableContractTypeElemPUT ProfitTableContractTypeElem = "PUT"
const ProfitTableContractTypeElemPUTE ProfitTableContractTypeElem = "PUTE"
const ProfitTableContractTypeElemPUTSPREAD ProfitTableContractTypeElem = "PUTSPREAD"
const ProfitTableContractTypeElemRANGE ProfitTableContractTypeElem = "RANGE"
const ProfitTableContractTypeElemRESETCALL ProfitTableContractTypeElem = "RESETCALL"
const ProfitTableContractTypeElemRESETPUT ProfitTableContractTypeElem = "RESETPUT"
const ProfitTableContractTypeElemRUNHIGH ProfitTableContractTypeElem = "RUNHIGH"
const ProfitTableContractTypeElemRUNLOW ProfitTableContractTypeElem = "RUNLOW"
const ProfitTableContractTypeElemTICKHIGH ProfitTableContractTypeElem = "TICKHIGH"
const ProfitTableContractTypeElemTICKLOW ProfitTableContractTypeElem = "TICKLOW"
const ProfitTableContractTypeElemTURBOSLONG ProfitTableContractTypeElem = "TURBOSLONG"
const ProfitTableContractTypeElemTURBOSSHORT ProfitTableContractTypeElem = "TURBOSSHORT"
const ProfitTableContractTypeElemUPORDOWN ProfitTableContractTypeElem = "UPORDOWN"
const ProfitTableContractTypeElemVANILLALONGCALL ProfitTableContractTypeElem = "VANILLALONGCALL"
const ProfitTableContractTypeElemVANILLALONGPUT ProfitTableContractTypeElem = "VANILLALONGPUT"

func (*ProfitTableContractTypeElem) UnmarshalJSON ¶

func (j *ProfitTableContractTypeElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTableDescription ¶

type ProfitTableDescription int

func (*ProfitTableDescription) UnmarshalJSON ¶

func (j *ProfitTableDescription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTablePassthrough ¶

type ProfitTablePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ProfitTableProfitTable ¶

type ProfitTableProfitTable int

func (*ProfitTableProfitTable) UnmarshalJSON ¶

func (j *ProfitTableProfitTable) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTableResp ¶

type ProfitTableResp struct {
	// Echo of the request made.
	EchoReq ProfitTableRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ProfitTableRespMsgType `json:"msg_type"`

	// Account Profit Table.
	ProfitTable *ProfitTableRespProfitTable `json:"profit_table,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

A summary of account profit table is received

func (*ProfitTableResp) UnmarshalJSON ¶

func (j *ProfitTableResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTableRespEchoReq ¶

type ProfitTableRespEchoReq map[string]interface{}

Echo of the request made.

type ProfitTableRespMsgType ¶

type ProfitTableRespMsgType string
const ProfitTableRespMsgTypeProfitTable ProfitTableRespMsgType = "profit_table"

func (*ProfitTableRespMsgType) UnmarshalJSON ¶

func (j *ProfitTableRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProfitTableRespProfitTable ¶

type ProfitTableRespProfitTable struct {
	// Number of transactions returned in this call
	Count *float64 `json:"count,omitempty"`

	// Array of returned transactions
	Transactions []ProfitTableRespProfitTableTransactionsElem `json:"transactions,omitempty"`
}

Account Profit Table.

type ProfitTableRespProfitTableTransactionsElem ¶

type ProfitTableRespProfitTableTransactionsElem struct {
	// ID of the application where this contract was purchased.
	AppId *int `json:"app_id,omitempty"`

	// The buy price
	BuyPrice *float64 `json:"buy_price,omitempty"`

	// The unique contract identifier.
	ContractId *int `json:"contract_id,omitempty"`

	// [Optional] The contract type for the transaction if description is set to 1.
	ContractType *string `json:"contract_type,omitempty"`

	// [Optional] Duration set for deal cancellation for Multiplier contracts in
	// synthetic indices if description is set to 1.
	DealCancellationDuration *string `json:"deal_cancellation_duration,omitempty"`

	// [Optional] The duration type of the contract if description is set to 1.
	DurationType *string `json:"duration_type,omitempty"`

	// [Optional] The growth rate for Accumulators contract if description is set to
	// 1.
	GrowthRate *string `json:"growth_rate,omitempty"`

	// [Optional] The description of contract purchased if description is set to 1
	Longcode *string `json:"longcode,omitempty"`

	// [Optional] The multiplier for Multiplier contracts if description is set to 1.
	Multiplier *string `json:"multiplier,omitempty"`

	// Payout price
	Payout *float64 `json:"payout,omitempty"`

	// Epoch purchase time of the transaction
	PurchaseTime *int `json:"purchase_time,omitempty"`

	// The price the contract sold for.
	SellPrice *float64 `json:"sell_price,omitempty"`

	// Epoch sell time of the transaction
	SellTime *int `json:"sell_time,omitempty"`

	// [Optional] Compact description of the contract purchased if description is set
	// to 1
	Shortcode *string `json:"shortcode,omitempty"`

	// The transaction Identifier. Every contract (buy or sell) and every payment has
	// a unique transaction identifier.
	TransactionId *int `json:"transaction_id,omitempty"`

	// [Optional] Symbol code if description is set to 1
	UnderlyingSymbol *string `json:"underlying_symbol,omitempty"`
}

type ProfitTableSort ¶

type ProfitTableSort string
const ProfitTableSortASC ProfitTableSort = "ASC"
const ProfitTableSortDESC ProfitTableSort = "DESC"

func (*ProfitTableSort) UnmarshalJSON ¶

func (j *ProfitTableSort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Proposal ¶

type Proposal struct {
	// [Optional] Proposed contract payout or stake, or multiplier (for lookbacks).
	Amount *float64 `json:"amount,omitempty"`

	// [Optional] Barrier for the contract (or last digit prediction for digit
	// contracts). Contracts less than 24 hours in duration would need a relative
	// barrier (barriers which need +/-), where entry spot would be adjusted
	// accordingly with that amount to define a barrier, except for Synthetic Indices
	// as they support both relative and absolute barriers. Not needed for lookbacks.
	Barrier *string `json:"barrier,omitempty"`

	// [Optional] Low barrier for the contract (for contracts with two barriers).
	// Contracts less than 24 hours in duration would need a relative barrier
	// (barriers which need +/-), where entry spot would be adjusted accordingly with
	// that amount to define a barrier, except for Synthetic Indices as they support
	// both relative and absolute barriers. Not needed for lookbacks.
	Barrier2 *string `json:"barrier2,omitempty"`

	// [Optional] Barrier range for callputspread.
	BarrierRange *ProposalBarrierRange `json:"barrier_range,omitempty"`

	// [Optional] Indicates type of the `amount`.
	Basis *ProposalBasis `json:"basis,omitempty"`

	// Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).
	Cancellation *string `json:"cancellation,omitempty"`

	// The proposed contract type
	ContractType ProposalContractType `json:"contract_type"`

	// This can only be the account-holder's currency (obtained from
	// `payout_currencies` call).
	Currency string `json:"currency"`

	// [Optional] Epoch value of the expiry time of the contract. Either date_expiry
	// or duration is required.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// [Optional] Indicates epoch value of the starting time of the contract. If left
	// empty, the start time of the contract is now.
	DateStart *int `json:"date_start,omitempty"`

	// [Optional] Duration quantity. Either date_expiry or duration is required.
	Duration *int `json:"duration,omitempty"`

	// [Optional] Duration unit - `s`: seconds, `m`: minutes, `h`: hours, `d`: days,
	// `t`: ticks.
	DurationUnit ProposalDurationUnit `json:"duration_unit,omitempty"`

	// [Optional] Growth rate of an accumulator contract.
	GrowthRate *float64 `json:"growth_rate,omitempty"`

	// Add an order to close the contract once the order condition is met (only for
	// `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`,
	// `stop_loss`.
	LimitOrder *ProposalLimitOrder `json:"limit_order,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] The multiplier for non-binary options. E.g. lookbacks.
	Multiplier *float64 `json:"multiplier,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ProposalPassthrough `json:"passthrough,omitempty"`

	// [Optional] Clients can provide payout_per_point directly, and the barrier will
	// be calculated based on this payout_per_point value.
	PayoutPerPoint *float64 `json:"payout_per_point,omitempty"`

	// [Optional] The product type.
	ProductType ProposalProductType `json:"product_type,omitempty"`

	// Must be `1`
	Proposal ProposalProposal `json:"proposal"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] The tick that is predicted to have the highest/lowest value - for
	// `TICKHIGH` and `TICKLOW` contracts.
	SelectedTick *int `json:"selected_tick,omitempty"`

	// [Optional] 1 - to initiate a realtime stream of prices. Note that tick trades
	// (without a user-defined barrier), digit trades and less than 24 hours
	// at-the-money contracts for the following underlying symbols are not streamed:
	// `R_10`, `R_25`, `R_50`, `R_75`, `R_100`, `RDBULL`, `RDBEAR` (this is because
	// their price is constant).
	Subscribe *ProposalSubscribe `json:"subscribe,omitempty"`

	// The short symbol name (obtained from `active_symbols` call).
	Symbol string `json:"symbol"`

	// [Only for Snowball] The trade risk profile for the Snowball contract. Higher
	// risk profile offers higher coupon rate at the expense of higher probability of
	// breaching caution price
	TradeRiskProfile *ProposalTradeRiskProfile `json:"trade_risk_profile,omitempty"`

	// [Optional] Required only for multi-barrier trading. Defines the epoch value of
	// the trading period start time.
	TradingPeriodStart *int `json:"trading_period_start,omitempty"`
}

Gets latest price for a specific contract.

func (*Proposal) UnmarshalJSON ¶

func (j *Proposal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalBarrierRange ¶

type ProposalBarrierRange string
const ProposalBarrierRangeMiddle ProposalBarrierRange = "middle"
const ProposalBarrierRangeTight ProposalBarrierRange = "tight"
const ProposalBarrierRangeWide ProposalBarrierRange = "wide"

func (*ProposalBarrierRange) UnmarshalJSON ¶

func (j *ProposalBarrierRange) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalBasis ¶

type ProposalBasis string
const ProposalBasisPayout ProposalBasis = "payout"
const ProposalBasisStake ProposalBasis = "stake"

func (*ProposalBasis) UnmarshalJSON ¶

func (j *ProposalBasis) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalContractType ¶

type ProposalContractType string
const ProposalContractTypeACCU ProposalContractType = "ACCU"
const ProposalContractTypeASIAND ProposalContractType = "ASIAND"
const ProposalContractTypeASIANU ProposalContractType = "ASIANU"
const ProposalContractTypeCALL ProposalContractType = "CALL"
const ProposalContractTypeCALLE ProposalContractType = "CALLE"
const ProposalContractTypeCALLSPREAD ProposalContractType = "CALLSPREAD"
const ProposalContractTypeDIGITDIFF ProposalContractType = "DIGITDIFF"
const ProposalContractTypeDIGITEVEN ProposalContractType = "DIGITEVEN"
const ProposalContractTypeDIGITMATCH ProposalContractType = "DIGITMATCH"
const ProposalContractTypeDIGITODD ProposalContractType = "DIGITODD"
const ProposalContractTypeDIGITOVER ProposalContractType = "DIGITOVER"
const ProposalContractTypeDIGITUNDER ProposalContractType = "DIGITUNDER"
const ProposalContractTypeEXPIRYMISS ProposalContractType = "EXPIRYMISS"
const ProposalContractTypeEXPIRYMISSE ProposalContractType = "EXPIRYMISSE"
const ProposalContractTypeEXPIRYRANGE ProposalContractType = "EXPIRYRANGE"
const ProposalContractTypeEXPIRYRANGEE ProposalContractType = "EXPIRYRANGEE"
const ProposalContractTypeLBFLOATCALL ProposalContractType = "LBFLOATCALL"
const ProposalContractTypeLBFLOATPUT ProposalContractType = "LBFLOATPUT"
const ProposalContractTypeLBHIGHLOW ProposalContractType = "LBHIGHLOW"
const ProposalContractTypeMULTDOWN ProposalContractType = "MULTDOWN"
const ProposalContractTypeMULTUP ProposalContractType = "MULTUP"
const ProposalContractTypeNOTOUCH ProposalContractType = "NOTOUCH"
const ProposalContractTypeONETOUCH ProposalContractType = "ONETOUCH"
const ProposalContractTypePUT ProposalContractType = "PUT"
const ProposalContractTypePUTE ProposalContractType = "PUTE"
const ProposalContractTypePUTSPREAD ProposalContractType = "PUTSPREAD"
const ProposalContractTypeRANGE ProposalContractType = "RANGE"
const ProposalContractTypeRESETCALL ProposalContractType = "RESETCALL"
const ProposalContractTypeRESETPUT ProposalContractType = "RESETPUT"
const ProposalContractTypeRUNHIGH ProposalContractType = "RUNHIGH"
const ProposalContractTypeRUNLOW ProposalContractType = "RUNLOW"
const ProposalContractTypeSNOWDOWN ProposalContractType = "SNOWDOWN"
const ProposalContractTypeSNOWUP ProposalContractType = "SNOWUP"
const ProposalContractTypeTICKHIGH ProposalContractType = "TICKHIGH"
const ProposalContractTypeTICKLOW ProposalContractType = "TICKLOW"
const ProposalContractTypeTURBOSLONG ProposalContractType = "TURBOSLONG"
const ProposalContractTypeTURBOSSHORT ProposalContractType = "TURBOSSHORT"
const ProposalContractTypeUPORDOWN ProposalContractType = "UPORDOWN"
const ProposalContractTypeVANILLALONGCALL ProposalContractType = "VANILLALONGCALL"
const ProposalContractTypeVANILLALONGPUT ProposalContractType = "VANILLALONGPUT"

func (*ProposalContractType) UnmarshalJSON ¶

func (j *ProposalContractType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalDurationUnit ¶

type ProposalDurationUnit string
const ProposalDurationUnitD ProposalDurationUnit = "d"
const ProposalDurationUnitH ProposalDurationUnit = "h"
const ProposalDurationUnitM ProposalDurationUnit = "m"
const ProposalDurationUnitS ProposalDurationUnit = "s"
const ProposalDurationUnitT ProposalDurationUnit = "t"

func (*ProposalDurationUnit) UnmarshalJSON ¶

func (j *ProposalDurationUnit) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalLimitOrder ¶

type ProposalLimitOrder struct {
	// Contract will be automatically closed when the value of the contract reaches a
	// specific loss.
	StopLoss *float64 `json:"stop_loss,omitempty"`

	// Contract will be automatically closed when the value of the contract reaches a
	// specific profit.
	TakeProfit *float64 `json:"take_profit,omitempty"`
}

Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`, `stop_loss`.

type ProposalOpenContract ¶

type ProposalOpenContract struct {
	// [Optional] Contract ID received from a `portfolio` request. If not set, you
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ProposalOpenContractPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	ProposalOpenContract ProposalOpenContractProposalOpenContract `json:"proposal_open_contract"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] `1` to stream.
	Subscribe *ProposalOpenContractSubscribe `json:"subscribe,omitempty"`
}

Get latest price (and other information) for a contract in the user's portfolio

func (*ProposalOpenContract) UnmarshalJSON ¶

func (j *ProposalOpenContract) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractPassthrough ¶

type ProposalOpenContractPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ProposalOpenContractProposalOpenContract ¶

type ProposalOpenContractProposalOpenContract int

func (*ProposalOpenContractProposalOpenContract) UnmarshalJSON ¶

func (j *ProposalOpenContractProposalOpenContract) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractResp ¶

type ProposalOpenContractResp struct {
	// Echo of the request made.
	EchoReq ProposalOpenContractRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType *ProposalOpenContractRespMsgType `json:"msg_type,omitempty"`

	// Latest price and other details for an open contract
	ProposalOpenContract *ProposalOpenContractRespProposalOpenContract `json:"proposal_open_contract,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *ProposalOpenContractRespSubscription `json:"subscription,omitempty"`
}

Latest price and other details for an open contract in the user's portfolio

func (*ProposalOpenContractResp) UnmarshalJSON ¶

func (j *ProposalOpenContractResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespEchoReq ¶

type ProposalOpenContractRespEchoReq map[string]interface{}

Echo of the request made.

type ProposalOpenContractRespMsgType ¶

type ProposalOpenContractRespMsgType string
const ProposalOpenContractRespMsgTypeProposalOpenContract ProposalOpenContractRespMsgType = "proposal_open_contract"

func (*ProposalOpenContractRespMsgType) UnmarshalJSON ¶

func (j *ProposalOpenContractRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContract ¶

type ProposalOpenContractRespProposalOpenContract struct {
	// Account Id
	AccountId *float64 `json:"account_id,omitempty"`

	// The markup amount charged on a client's stake amount
	AppMarkupAmount *string `json:"app_markup_amount,omitempty"`

	// Tick details around contract start and end time.
	AuditDetails *ProposalOpenContractRespProposalOpenContractAuditDetails `json:"audit_details,omitempty"`

	// Barrier of the contract (if any).
	Barrier *string `json:"barrier,omitempty"`

	// The number of barriers a contract has.
	BarrierCount *float64 `json:"barrier_count,omitempty"`

	// [Only for accumulator] Absolute difference between high/low barrier and spot
	BarrierSpotDistance *string `json:"barrier_spot_distance,omitempty"`

	// Price at which the contract could be sold back to the company.
	BidPrice *float64 `json:"bid_price,omitempty"`

	// Price at which contract was purchased
	BuyPrice *float64 `json:"buy_price,omitempty"`

	// Contains information about contract cancellation option.
	Cancellation *ProposalOpenContractRespProposalOpenContractCancellation `json:"cancellation,omitempty"`

	// The caution price for the Snowball contract. Breaching this price will reset
	// the coupons accrued to 0.
	CautionPrice *string `json:"caution_price,omitempty"`

	// Commission in payout currency amount.
	Commision *float64 `json:"commision,omitempty"`

	// Commission in payout currency amount.
	Commission *float64 `json:"commission,omitempty"`

	// The internal contract identifier
	ContractId *int `json:"contract_id,omitempty"`

	// Contract type.
	ContractType *string `json:"contract_type,omitempty"`

	// The epoch times at which the coupons will be accrued for the Snowball contract.
	CouponCollectionEpochs []int `json:"coupon_collection_epochs,omitempty"`

	// The coupon rate for the Snowball contract at which the stake will grow for each
	// coupon accrued.
	CouponRate *string `json:"coupon_rate,omitempty"`

	// The currency code of the contract.
	Currency *string `json:"currency,omitempty"`

	// Spot value if we have license to stream this symbol.
	CurrentSpot *float64 `json:"current_spot,omitempty"`

	// Spot value with the correct precision if we have license to stream this symbol.
	CurrentSpotDisplayValue *string `json:"current_spot_display_value,omitempty"`

	// [Applicable for accumulator] High barrier based on current spot.
	CurrentSpotHighBarrier *string `json:"current_spot_high_barrier,omitempty"`

	// [Applicable for accumulator] Low barrier based on current spot.
	CurrentSpotLowBarrier *string `json:"current_spot_low_barrier,omitempty"`

	// The corresponding time of the current spot.
	CurrentSpotTime *int `json:"current_spot_time,omitempty"`

	// Expiry date (epoch) of the Contract. Please note that it is not applicable for
	// tick trade contracts.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// Settlement date (epoch) of the contract.
	DateSettlement *int `json:"date_settlement,omitempty"`

	// Start date (epoch) of the contract.
	DateStart *int `json:"date_start,omitempty"`

	// Display name of underlying
	DisplayName *string `json:"display_name,omitempty"`

	// [Only for vanilla or turbos options] The implied number of contracts
	DisplayNumberOfContracts *string `json:"display_number_of_contracts,omitempty"`

	// The `bid_price` with the correct precision
	DisplayValue *string `json:"display_value,omitempty"`

	// Same as `entry_tick`. For backwards compatibility.
	EntrySpot *float64 `json:"entry_spot,omitempty"`

	// Same as `entry_tick_display_value`. For backwards compatibility.
	EntrySpotDisplayValue *string `json:"entry_spot_display_value,omitempty"`

	// This is the entry spot of the contract. For contracts starting immediately it
	// is the next tick after the start time. For forward-starting contracts it is the
	// spot at the start time.
	EntryTick *float64 `json:"entry_tick,omitempty"`

	// This is the entry spot with the correct precision of the contract. For
	// contracts starting immediately it is the next tick after the start time. For
	// forward-starting contracts it is the spot at the start time.
	EntryTickDisplayValue *string `json:"entry_tick_display_value,omitempty"`

	// This is the epoch time of the entry tick.
	EntryTickTime *int `json:"entry_tick_time,omitempty"`

	// Exit tick can refer to the latest tick at the end time, the tick that fulfils
	// the contract's winning or losing condition for path dependent contracts
	// (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the
	// contract is sold before expiry.
	ExitTick *float64 `json:"exit_tick,omitempty"`

	// Exit tick can refer to the latest tick at the end time, the tick that fulfils
	// the contract's winning or losing condition for path dependent contracts
	// (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the
	// contract is sold before expiry.
	ExitTickDisplayValue *string `json:"exit_tick_display_value,omitempty"`

	// This is the epoch time of the exit tick. Note that since certain instruments
	// don't tick every second, the exit tick time may be a few seconds before the end
	// time.
	ExitTickTime *int `json:"exit_tick_time,omitempty"`

	// This is the expiry time.
	ExpiryTime *int `json:"expiry_time,omitempty"`

	// [Only for accumulator] Growth rate of an accumulator contract.
	GrowthRate *float64 `json:"growth_rate,omitempty"`

	// High barrier of the contract (if any).
	HighBarrier *string `json:"high_barrier,omitempty"`

	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id *string `json:"id,omitempty"`

	// Whether the contract is expired or not.
	IsExpired *ProposalOpenContractRespProposalOpenContractIsExpired `json:"is_expired,omitempty"`

	// Whether the contract is forward-starting or not.
	IsForwardStarting *ProposalOpenContractRespProposalOpenContractIsForwardStarting `json:"is_forward_starting,omitempty"`

	// Whether the contract is an intraday contract.
	IsIntraday *ProposalOpenContractRespProposalOpenContractIsIntraday `json:"is_intraday,omitempty"`

	// Whether the contract expiry price will depend on the path of the market (e.g.
	// One Touch contract).
	IsPathDependent *ProposalOpenContractRespProposalOpenContractIsPathDependent `json:"is_path_dependent,omitempty"`

	// Whether the contract is settleable or not.
	IsSettleable *ProposalOpenContractRespProposalOpenContractIsSettleable `json:"is_settleable,omitempty"`

	// Whether the contract is sold or not.
	IsSold *ProposalOpenContractRespProposalOpenContractIsSold `json:"is_sold,omitempty"`

	// Whether the contract can be cancelled.
	IsValidToCancel *ProposalOpenContractRespProposalOpenContractIsValidToCancel `json:"is_valid_to_cancel,omitempty"`

	// Whether the contract can be sold back to the company.
	IsValidToSell *ProposalOpenContractRespProposalOpenContractIsValidToSell `json:"is_valid_to_sell,omitempty"`

	// [Optional] Indicator whether take profit, stop loss, and/or stop out is allowed
	// to be updated.
	IsValidToUpdate *ProposalOpenContractRespProposalOpenContractIsValidToUpdate `json:"is_valid_to_update,omitempty"`

	// Orders are applicable to `MULTUP` and `MULTDOWN` contracts only.
	LimitOrder *ProposalOpenContractRespProposalOpenContractLimitOrder `json:"limit_order,omitempty"`

	// Text description of the contract purchased, Example: Win payout if Volatility
	// 100 Index is strictly higher than entry spot at 10 minutes after contract start
	// time.
	Longcode *string `json:"longcode,omitempty"`

	// Low barrier of the contract (if any).
	LowBarrier *string `json:"low_barrier,omitempty"`

	// [Only for lookback trades] Multiplier applies when calculating the final payoff
	// for each type of lookback. e.g. (Exit spot - Lowest historical price) *
	// multiplier = Payout
	Multiplier *float64 `json:"multiplier,omitempty"`

	// The maximum number of coupons available for the Snowball contract.
	NumOfCoupons *int `json:"num_of_coupons,omitempty"`

	// Payout value of the contract.
	Payout *float64 `json:"payout,omitempty"`

	// The latest bid price minus buy price.
	Profit *float64 `json:"profit,omitempty"`

	// Profit in percentage.
	ProfitPercentage *float64 `json:"profit_percentage,omitempty"`

	// The profit price for the Snowball contract. Breaching this price will close the
	// contract immediately.
	ProfitPrice *string `json:"profit_price,omitempty"`

	// Epoch of purchase time, will be same as `date_start` for all contracts except
	// forward starting contracts.
	PurchaseTime *int `json:"purchase_time,omitempty"`

	// [Only for reset trades i.e. RESETCALL and RESETPUT] Reset barrier of the
	// contract.
	ResetBarrier *string `json:"reset_barrier,omitempty"`

	// [Only for reset trades i.e. RESETCALL and RESETPUT] The epoch time of a barrier
	// reset.
	ResetTime *int `json:"reset_time,omitempty"`

	// Spot value at the selected tick for the contract.
	SelectedSpot *float64 `json:"selected_spot,omitempty"`

	// [Only for highlowticks trades i.e. TICKHIGH and TICKLOW] Selected tick for the
	// contract.
	SelectedTick *int `json:"selected_tick,omitempty"`

	// Price at which contract was sold, only available when contract has been sold.
	SellPrice *float64 `json:"sell_price,omitempty"`

	// Latest spot value at the sell time. (only present for contracts already sold).
	// Will no longer be supported in the next API release.
	SellSpot *float64 `json:"sell_spot,omitempty"`

	// Latest spot value with the correct precision at the sell time. (only present
	// for contracts already sold). Will no longer be supported in the next API
	// release.
	SellSpotDisplayValue *string `json:"sell_spot_display_value,omitempty"`

	// Epoch time of the sell spot. Note that since certain underlyings don't tick
	// every second, the sell spot time may be a few seconds before the sell time.
	// (only present for contracts already sold). Will no longer be supported in the
	// next API release.
	SellSpotTime *int `json:"sell_spot_time,omitempty"`

	// Epoch time of when the contract was sold (only present for contracts already
	// sold)
	SellTime *int `json:"sell_time,omitempty"`

	// Coded description of the contract purchased.
	Shortcode *string `json:"shortcode,omitempty"`

	// Contract status. Will be `sold` if the contract was sold back before expiry,
	// `won` if won and `lost` if lost at expiry. Otherwise will be `open`
	Status *ProposalOpenContractRespProposalOpenContractStatus `json:"status,omitempty"`

	// Only for tick trades, number of ticks
	TickCount *int `json:"tick_count,omitempty"`

	// [Only for accumulator] Number of ticks passed since entry_tick
	TickPassed *int `json:"tick_passed,omitempty"`

	// Tick stream from entry to end time.
	TickStream []ProposalOpenContractRespProposalOpenContractTickStreamElem `json:"tick_stream,omitempty"`

	// The trade risk profile for the Snowball contract.
	TradeRiskProfile *ProposalOpenContractRespProposalOpenContractTradeRiskProfile `json:"trade_risk_profile,omitempty"`

	// Every contract has buy and sell transaction ids, i.e. when you purchase a
	// contract we associate it with buy transaction id, and if contract is already
	// sold we associate that with sell transaction id.
	TransactionIds *ProposalOpenContractRespProposalOpenContractTransactionIds `json:"transaction_ids,omitempty"`

	// The underlying symbol code.
	Underlying *string `json:"underlying,omitempty"`

	// Error message if validation fails
	ValidationError *string `json:"validation_error,omitempty"`

	// Error code if validation fails
	ValidationErrorCode *string `json:"validation_error_code,omitempty"`

	// Contains contract validation information.
	ValidationParams *ProposalOpenContractRespProposalOpenContractValidationParams `json:"validation_params,omitempty"`
}

Latest price and other details for an open contract

type ProposalOpenContractRespProposalOpenContractAuditDetails ¶ added in v0.4.0

type ProposalOpenContractRespProposalOpenContractAuditDetails struct {
	// Ticks for tick expiry contract from start time till expiry.
	AllTicks []ProposalOpenContractRespProposalOpenContractAuditDetailsAllTicksElem `json:"all_ticks,omitempty"`

	// Ticks around contract end time.
	ContractEnd []ProposalOpenContractRespProposalOpenContractAuditDetailsContractEndElem `json:"contract_end,omitempty"`

	// Ticks around contract start time.
	ContractStart []ProposalOpenContractRespProposalOpenContractAuditDetailsContractStartElem `json:"contract_start,omitempty"`
}

Tick details around contract start and end time.

type ProposalOpenContractRespProposalOpenContractAuditDetailsAllTicksElem ¶ added in v0.4.0

type ProposalOpenContractRespProposalOpenContractAuditDetailsAllTicksElem struct {
	// Epoch time of a tick or the contract start or end time.
	Epoch *int `json:"epoch,omitempty"`

	// A flag used to highlight the record in front-end applications.
	Flag *string `json:"flag,omitempty"`

	// A short description of the data. It could be a tick or a time associated with
	// the contract.
	Name *string `json:"name,omitempty"`

	// The spot value at the given epoch.
	Tick *float64 `json:"tick,omitempty"`

	// The spot value with the correct precision at the given epoch.
	TickDisplayValue *string `json:"tick_display_value,omitempty"`
}

type ProposalOpenContractRespProposalOpenContractAuditDetailsContractEndElem ¶ added in v0.4.0

type ProposalOpenContractRespProposalOpenContractAuditDetailsContractEndElem struct {
	// Epoch time of a tick or the contract start or end time.
	Epoch *int `json:"epoch,omitempty"`

	// A flag used to highlight the record in front-end applications.
	Flag *string `json:"flag,omitempty"`

	// A short description of the data. It could be a tick or a time associated with
	// the contract.
	Name *string `json:"name,omitempty"`

	// The spot value at the given epoch.
	Tick *float64 `json:"tick,omitempty"`

	// The spot value with the correct precision at the given epoch.
	TickDisplayValue *string `json:"tick_display_value,omitempty"`
}

type ProposalOpenContractRespProposalOpenContractAuditDetailsContractStartElem ¶ added in v0.4.0

type ProposalOpenContractRespProposalOpenContractAuditDetailsContractStartElem struct {
	// Epoch time of a tick or the contract start or end time.
	Epoch *int `json:"epoch,omitempty"`

	// A flag used to highlight the record in front-end applications.
	Flag *string `json:"flag,omitempty"`

	// A short description of the data. It could be a tick or a time associated with
	// the contract.
	Name *string `json:"name,omitempty"`

	// The spot value at the given epoch.
	Tick *float64 `json:"tick,omitempty"`

	// The spot value with the correct precision at the given epoch.
	TickDisplayValue *string `json:"tick_display_value,omitempty"`
}

type ProposalOpenContractRespProposalOpenContractCancellation ¶

type ProposalOpenContractRespProposalOpenContractCancellation struct {
	// Ask price of contract cancellation option.
	AskPrice *float64 `json:"ask_price,omitempty"`

	// Expiry time in epoch for contract cancellation option.
	DateExpiry *int `json:"date_expiry,omitempty"`
}

Contains information about contract cancellation option.

type ProposalOpenContractRespProposalOpenContractIsExpired ¶

type ProposalOpenContractRespProposalOpenContractIsExpired int

func (*ProposalOpenContractRespProposalOpenContractIsExpired) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsForwardStarting ¶

type ProposalOpenContractRespProposalOpenContractIsForwardStarting int

func (*ProposalOpenContractRespProposalOpenContractIsForwardStarting) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsIntraday ¶

type ProposalOpenContractRespProposalOpenContractIsIntraday int

func (*ProposalOpenContractRespProposalOpenContractIsIntraday) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsPathDependent ¶

type ProposalOpenContractRespProposalOpenContractIsPathDependent int

func (*ProposalOpenContractRespProposalOpenContractIsPathDependent) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsSettleable ¶

type ProposalOpenContractRespProposalOpenContractIsSettleable int

func (*ProposalOpenContractRespProposalOpenContractIsSettleable) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsSold ¶

type ProposalOpenContractRespProposalOpenContractIsSold int

func (*ProposalOpenContractRespProposalOpenContractIsSold) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsValidToCancel ¶

type ProposalOpenContractRespProposalOpenContractIsValidToCancel int

func (*ProposalOpenContractRespProposalOpenContractIsValidToCancel) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsValidToSell ¶

type ProposalOpenContractRespProposalOpenContractIsValidToSell int

func (*ProposalOpenContractRespProposalOpenContractIsValidToSell) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsValidToUpdate ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractIsValidToUpdate struct {
	// [Optional] 1 if stop loss is allowed to be updated and 0 if otherwise. This
	// field is undefined if stop loss functionality is not supported by the contract.
	StopLoss *ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopLoss `json:"stop_loss,omitempty"`

	// [Optional] 1 if stop out is allowed to be updated and 0 if otherwise. This
	// field is undefined if stop out functionality is not supported by the contract.
	StopOut *ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopOut `json:"stop_out,omitempty"`

	// [Optional] 1 if take profit is allowed to be updated and 0 if otherwise. This
	// field is undefined if take profit functionality is not supported by the
	// contract.
	TakeProfit *ProposalOpenContractRespProposalOpenContractIsValidToUpdateTakeProfit `json:"take_profit,omitempty"`
}

[Optional] Indicator whether take profit, stop loss, and/or stop out is allowed to be updated.

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopLoss ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopLoss float64

func (*ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopLoss) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopOut ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopOut float64

func (*ProposalOpenContractRespProposalOpenContractIsValidToUpdateStopOut) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateTakeProfit ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractIsValidToUpdateTakeProfit float64

func (*ProposalOpenContractRespProposalOpenContractIsValidToUpdateTakeProfit) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractLimitOrder ¶

type ProposalOpenContractRespProposalOpenContractLimitOrder struct {
	// Contains information where the contract will be closed automatically at the
	// loss specified by the user.
	StopLoss *ProposalOpenContractRespProposalOpenContractLimitOrderStopLoss `json:"stop_loss,omitempty"`

	// Contains information where the contract will be closed automatically when the
	// value of the contract is close to zero. This is set by the us.
	StopOut *ProposalOpenContractRespProposalOpenContractLimitOrderStopOut `json:"stop_out,omitempty"`

	// Contain information where the contract will be closed automatically at the
	// profit specified by the user.
	TakeProfit *ProposalOpenContractRespProposalOpenContractLimitOrderTakeProfit `json:"take_profit,omitempty"`
}

Orders are applicable to `MULTUP` and `MULTDOWN` contracts only.

type ProposalOpenContractRespProposalOpenContractLimitOrderStopLoss ¶

type ProposalOpenContractRespProposalOpenContractLimitOrderStopLoss struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Stop loss amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Stop loss amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Stop loss order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contains information where the contract will be closed automatically at the loss specified by the user.

type ProposalOpenContractRespProposalOpenContractLimitOrderStopOut ¶

type ProposalOpenContractRespProposalOpenContractLimitOrderStopOut struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Stop out amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Stop out amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Stop out order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contains information where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.

type ProposalOpenContractRespProposalOpenContractLimitOrderTakeProfit ¶

type ProposalOpenContractRespProposalOpenContractLimitOrderTakeProfit struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Take profit amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Take profit amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Take profit order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contain information where the contract will be closed automatically at the profit specified by the user.

type ProposalOpenContractRespProposalOpenContractStatus ¶

type ProposalOpenContractRespProposalOpenContractStatus struct {
	Value interface{}
}

func (*ProposalOpenContractRespProposalOpenContractStatus) MarshalJSON ¶

MarshalJSON implements json.Marshaler.

func (*ProposalOpenContractRespProposalOpenContractStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractTickStreamElem ¶

type ProposalOpenContractRespProposalOpenContractTickStreamElem struct {
	// Epoch time of a tick or the contract start or end time.
	Epoch *int `json:"epoch,omitempty"`

	// The spot value at the given epoch.
	Tick *float64 `json:"tick,omitempty"`

	// The spot value with the correct precision at the given epoch.
	TickDisplayValue *string `json:"tick_display_value,omitempty"`
}

type ProposalOpenContractRespProposalOpenContractTradeRiskProfile ¶ added in v0.5.10

type ProposalOpenContractRespProposalOpenContractTradeRiskProfile string
const ProposalOpenContractRespProposalOpenContractTradeRiskProfileHigh ProposalOpenContractRespProposalOpenContractTradeRiskProfile = "high"
const ProposalOpenContractRespProposalOpenContractTradeRiskProfileLow ProposalOpenContractRespProposalOpenContractTradeRiskProfile = "low"
const ProposalOpenContractRespProposalOpenContractTradeRiskProfileMedium ProposalOpenContractRespProposalOpenContractTradeRiskProfile = "medium"

func (*ProposalOpenContractRespProposalOpenContractTradeRiskProfile) UnmarshalJSON ¶ added in v0.5.10

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractRespProposalOpenContractTransactionIds ¶

type ProposalOpenContractRespProposalOpenContractTransactionIds struct {
	// Buy transaction ID for that contract
	Buy *int `json:"buy,omitempty"`

	// Sell transaction ID for that contract, only present when contract is already
	// sold.
	Sell *int `json:"sell,omitempty"`
}

Every contract has buy and sell transaction ids, i.e. when you purchase a contract we associate it with buy transaction id, and if contract is already sold we associate that with sell transaction id.

type ProposalOpenContractRespProposalOpenContractValidationParams ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractValidationParams struct {
	// [Only for Accumulators] Maximum payout for the contract.
	MaxPayout *string `json:"max_payout,omitempty"`

	// [Only for Accumulators] Maximum ticks for the contract.
	MaxTicks *int `json:"max_ticks,omitempty"`

	// Contains information for minimum and maximum stake amount for the contract.
	Stake *ProposalOpenContractRespProposalOpenContractValidationParamsStake `json:"stake,omitempty"`

	// [Only for Multipliers] Contains information for minimum and maximum stop loss
	// amount for the contract.
	StopLoss *ProposalOpenContractRespProposalOpenContractValidationParamsStopLoss `json:"stop_loss,omitempty"`

	// Contains information for minimum and maximum take profit amount for the
	// contract.
	TakeProfit *ProposalOpenContractRespProposalOpenContractValidationParamsTakeProfit `json:"take_profit,omitempty"`
}

Contains contract validation information.

type ProposalOpenContractRespProposalOpenContractValidationParamsStake ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractValidationParamsStake struct {
	// Maximum stakes allowed
	Max *string `json:"max,omitempty"`

	// Minimum stakes allowed
	Min *string `json:"min,omitempty"`
}

Contains information for minimum and maximum stake amount for the contract.

type ProposalOpenContractRespProposalOpenContractValidationParamsStopLoss ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractValidationParamsStopLoss struct {
	// Maximum stop loss amount
	Max *string `json:"max,omitempty"`

	// Minimum stop loss amount
	Min *string `json:"min,omitempty"`
}

[Only for Multipliers] Contains information for minimum and maximum stop loss amount for the contract.

type ProposalOpenContractRespProposalOpenContractValidationParamsTakeProfit ¶ added in v0.5.0

type ProposalOpenContractRespProposalOpenContractValidationParamsTakeProfit struct {
	// Maximum take profit amount
	Max *string `json:"max,omitempty"`

	// Minimum take profit amount
	Min *string `json:"min,omitempty"`
}

Contains information for minimum and maximum take profit amount for the contract.

type ProposalOpenContractRespSubscription ¶

type ProposalOpenContractRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*ProposalOpenContractRespSubscription) UnmarshalJSON ¶

func (j *ProposalOpenContractRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalOpenContractSubscribe ¶

type ProposalOpenContractSubscribe int

func (*ProposalOpenContractSubscribe) UnmarshalJSON ¶

func (j *ProposalOpenContractSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalPassthrough ¶

type ProposalPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ProposalProductType ¶

type ProposalProductType string
const ProposalProductTypeBasic ProposalProductType = "basic"

func (*ProposalProductType) UnmarshalJSON ¶

func (j *ProposalProductType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalProposal ¶

type ProposalProposal int

func (*ProposalProposal) UnmarshalJSON ¶

func (j *ProposalProposal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalResp ¶

type ProposalResp struct {
	// Echo of the request made.
	EchoReq ProposalRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ProposalRespMsgType `json:"msg_type"`

	// Latest price and other details for a given contract
	Proposal *ProposalRespProposal `json:"proposal,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *ProposalRespSubscription `json:"subscription,omitempty"`
}

Latest price and other details for a given contract

func (*ProposalResp) UnmarshalJSON ¶

func (j *ProposalResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalRespEchoReq ¶

type ProposalRespEchoReq map[string]interface{}

Echo of the request made.

type ProposalRespMsgType ¶

type ProposalRespMsgType string
const ProposalRespMsgTypeProposal ProposalRespMsgType = "proposal"

func (*ProposalRespMsgType) UnmarshalJSON ¶

func (j *ProposalRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalRespProposal ¶

type ProposalRespProposal struct {
	// The ask price.
	AskPrice float64 `json:"ask_price"`

	// [Only for vanilla options] The choices of predefined strike price for client to
	// choose
	BarrierChoices []interface{} `json:"barrier_choices,omitempty"`

	// [Only for Turbos] The relative distance between current spot and the barrier.
	BarrierSpotDistance *string `json:"barrier_spot_distance,omitempty"`

	// Contains information about contract cancellation option.
	Cancellation *ProposalRespProposalCancellation `json:"cancellation,omitempty"`

	// Commission changed in percentage (%).
	Commission *float64 `json:"commission,omitempty"`

	// Contains contract information.
	ContractDetails *ProposalRespProposalContractDetails `json:"contract_details,omitempty"`

	// The end date of the contract.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// The start date of the contract.
	DateStart int `json:"date_start"`

	// [Only for vanilla or turbos options] The implied number of contracts
	DisplayNumberOfContracts *string `json:"display_number_of_contracts,omitempty"`

	// Same as `ask_price`.
	DisplayValue string `json:"display_value"`

	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`

	// Contains limit order information. (Only applicable for contract with limit
	// order).
	LimitOrder *ProposalRespProposalLimitOrder `json:"limit_order,omitempty"`

	// Example: Win payout if Random 100 Index is strictly higher than entry spot at
	// 15 minutes after contract start time.
	Longcode string `json:"longcode"`

	// [Only for vanilla or turbos options] Maximum stakes allowed
	MaxStake *float64 `json:"max_stake,omitempty"`

	// [Only for vanilla or turbos options] Minimum stakes allowed
	MinStake *float64 `json:"min_stake,omitempty"`

	// [Only for lookback trades] Multiplier applies when calculating the final payoff
	// for each type of lookback. e.g. (Exit spot - Lowest historical price) *
	// multiplier = Payout
	Multiplier *float64 `json:"multiplier,omitempty"`

	// The payout amount of the contract.
	Payout float64 `json:"payout"`

	// [Only for Turbos] The choices of predefined payout per point for client to
	// choose
	PayoutChoices []string `json:"payout_choices,omitempty"`

	// Spot value (if there are no Exchange data-feed licensing restrictions for the
	// underlying symbol).
	Spot float64 `json:"spot"`

	// The corresponding time of the spot value.
	SpotTime int `json:"spot_time"`

	// Contains contract validation information.
	ValidationParams *ProposalRespProposalValidationParams `json:"validation_params,omitempty"`
}

Latest price and other details for a given contract

func (*ProposalRespProposal) UnmarshalJSON ¶

func (j *ProposalRespProposal) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalRespProposalCancellation ¶

type ProposalRespProposalCancellation struct {
	// Ask price of contract cancellation option.
	AskPrice *float64 `json:"ask_price,omitempty"`

	// Expiry time in epoch for contract cancellation option.
	DateExpiry *int `json:"date_expiry,omitempty"`
}

Contains information about contract cancellation option.

type ProposalRespProposalContractDetails ¶

type ProposalRespProposalContractDetails struct {
	// The markup amount charged on a client's stake amount
	AppMarkupAmount *string `json:"app_markup_amount,omitempty"`

	// Barrier of the contract.
	Barrier *string `json:"barrier,omitempty"`

	// Absolute difference between high/low barrier and spot
	BarrierSpotDistance *string `json:"barrier_spot_distance,omitempty"`

	// The caution price for the Snowball contract. Breaching this price will reset
	// the coupons accrued to 0.
	CautionPrice *string `json:"caution_price,omitempty"`

	// The coupon rate for the Snowball contract at which the stake will grow for each
	// coupon accrued.
	CouponRate *string `json:"coupon_rate,omitempty"`

	// High barrier calculated based on current spot
	HighBarrier *string `json:"high_barrier,omitempty"`

	// Epoch of last tick considered for stat chart
	LastTickEpoch *int `json:"last_tick_epoch,omitempty"`

	// Low barrier calculated based on current spot
	LowBarrier *string `json:"low_barrier,omitempty"`

	// Maximum payout that user can get out of a contract, contract will close
	// automatically if payout reaches this number
	MaximumPayout *float64 `json:"maximum_payout,omitempty"`

	// Maximum stake that user can set to buy a contract
	MaximumStake *string `json:"maximum_stake,omitempty"`

	// Maximum duration that a contract can last, contract will close automatically
	// after this number of ticks
	MaximumTicks *int `json:"maximum_ticks,omitempty"`

	// Minimum stake that user can set to buy a contract
	MinimumStake *string `json:"minimum_stake,omitempty"`

	// The maximum number of coupons available for the Snowball contract.
	NumOfCoupons *int `json:"num_of_coupons,omitempty"`

	// The profit price for the Snowball contract. Breaching this price will close the
	// contract immediately.
	ProfitPrice *string `json:"profit_price,omitempty"`

	// Tick size barrier for Accumulator contracts
	TickSizeBarrier *float64 `json:"tick_size_barrier,omitempty"`

	// [Accumulator] Tick size barrier in percentage, rounded off to 5 decimal places
	TickSizeBarrierPercentage *string `json:"tick_size_barrier_percentage,omitempty"`

	// An array of numbers  to build a stat chart - each number represents the
	// duration that spot stayed between barries
	TicksStayedIn []int `json:"ticks_stayed_in,omitempty"`

	// The trade risk profile for the Snowball contract.
	TradeRiskProfile *ProposalRespProposalContractDetailsTradeRiskProfile `json:"trade_risk_profile,omitempty"`
}

Contains contract information.

type ProposalRespProposalContractDetailsTradeRiskProfile ¶ added in v0.5.10

type ProposalRespProposalContractDetailsTradeRiskProfile string
const ProposalRespProposalContractDetailsTradeRiskProfileHigh ProposalRespProposalContractDetailsTradeRiskProfile = "high"
const ProposalRespProposalContractDetailsTradeRiskProfileLow ProposalRespProposalContractDetailsTradeRiskProfile = "low"
const ProposalRespProposalContractDetailsTradeRiskProfileMedium ProposalRespProposalContractDetailsTradeRiskProfile = "medium"

func (*ProposalRespProposalContractDetailsTradeRiskProfile) UnmarshalJSON ¶ added in v0.5.10

UnmarshalJSON implements json.Unmarshaler.

type ProposalRespProposalLimitOrder ¶

type ProposalRespProposalLimitOrder struct {
	// Contains information where the contract will be closed automatically at the
	// loss specified by the user.
	StopLoss *ProposalRespProposalLimitOrderStopLoss `json:"stop_loss,omitempty"`

	// Contains information where the contract will be closed automatically when the
	// value of the contract is close to zero. This is set by the us.
	StopOut *ProposalRespProposalLimitOrderStopOut `json:"stop_out,omitempty"`

	// Contains information where the contract will be closed automatically at the
	// profit specified by the user.
	TakeProfit *ProposalRespProposalLimitOrderTakeProfit `json:"take_profit,omitempty"`
}

Contains limit order information. (Only applicable for contract with limit order).

type ProposalRespProposalLimitOrderStopLoss ¶

type ProposalRespProposalLimitOrderStopLoss struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Stop loss amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Stop loss amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Stop loss order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contains information where the contract will be closed automatically at the loss specified by the user.

type ProposalRespProposalLimitOrderStopOut ¶

type ProposalRespProposalLimitOrderStopOut struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Stop out amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Stop out amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Stop out order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contains information where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.

type ProposalRespProposalLimitOrderTakeProfit ¶

type ProposalRespProposalLimitOrderTakeProfit struct {
	// Localized display name
	DisplayName *string `json:"display_name,omitempty"`

	// Take profit amount for display purpose.
	DisplayOrderAmount *string `json:"display_order_amount,omitempty"`

	// Take profit amount. Will be deprecated soon. Please use [display_order_amount].
	OrderAmount *float64 `json:"order_amount,omitempty"`

	// Take profit order epoch
	OrderDate *int `json:"order_date,omitempty"`

	// Pip-sized barrier value
	Value *string `json:"value,omitempty"`
}

Contains information where the contract will be closed automatically at the profit specified by the user.

type ProposalRespProposalValidationParams ¶ added in v0.5.0

type ProposalRespProposalValidationParams struct {
	// [Only for Accumulators] Maximum payout for the contract.
	MaxPayout *string `json:"max_payout,omitempty"`

	// [Only for Accumulators] Maximum ticks for the contract.
	MaxTicks *int `json:"max_ticks,omitempty"`

	// Contains information for minimum and maximum payout amount for the contract.
	Payout *ProposalRespProposalValidationParamsPayout `json:"payout,omitempty"`

	// Contains information for minimum and maximum stake amount for the contract.
	Stake *ProposalRespProposalValidationParamsStake `json:"stake,omitempty"`

	// [Only for Multipliers] Contains information for minimum and maximum stop loss
	// amount for the contract.
	StopLoss *ProposalRespProposalValidationParamsStopLoss `json:"stop_loss,omitempty"`

	// Contains information for minimum and maximum take profit amount for the
	// contract.
	TakeProfit *ProposalRespProposalValidationParamsTakeProfit `json:"take_profit,omitempty"`
}

Contains contract validation information.

type ProposalRespProposalValidationParamsPayout ¶ added in v0.5.3

type ProposalRespProposalValidationParamsPayout struct {
	// Maximum payout allowed
	Max *string `json:"max,omitempty"`
}

Contains information for minimum and maximum payout amount for the contract.

type ProposalRespProposalValidationParamsStake ¶ added in v0.5.0

type ProposalRespProposalValidationParamsStake struct {
	// Maximum stake allowed
	Max *string `json:"max,omitempty"`

	// Minimum stake allowed
	Min *string `json:"min,omitempty"`
}

Contains information for minimum and maximum stake amount for the contract.

type ProposalRespProposalValidationParamsStopLoss ¶ added in v0.5.0

type ProposalRespProposalValidationParamsStopLoss struct {
	// Maximum stop loss amount
	Max *string `json:"max,omitempty"`

	// Minimum stop loss amount
	Min *string `json:"min,omitempty"`
}

[Only for Multipliers] Contains information for minimum and maximum stop loss amount for the contract.

type ProposalRespProposalValidationParamsTakeProfit ¶ added in v0.5.0

type ProposalRespProposalValidationParamsTakeProfit struct {
	// Maximum take profit amount
	Max *string `json:"max,omitempty"`

	// Minimum take profit amount
	Min *string `json:"min,omitempty"`
}

Contains information for minimum and maximum take profit amount for the contract.

type ProposalRespSubscription ¶

type ProposalRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*ProposalRespSubscription) UnmarshalJSON ¶

func (j *ProposalRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalSubscribe ¶

type ProposalSubscribe int

func (*ProposalSubscribe) UnmarshalJSON ¶

func (j *ProposalSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ProposalTradeRiskProfile ¶ added in v0.5.10

type ProposalTradeRiskProfile string
const ProposalTradeRiskProfileHigh ProposalTradeRiskProfile = "high"
const ProposalTradeRiskProfileLow ProposalTradeRiskProfile = "low"
const ProposalTradeRiskProfileMedium ProposalTradeRiskProfile = "medium"

func (*ProposalTradeRiskProfile) UnmarshalJSON ¶ added in v0.5.10

func (j *ProposalTradeRiskProfile) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RealityCheck ¶

type RealityCheck struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough RealityCheckPassthrough `json:"passthrough,omitempty"`

	// Must be `1`
	RealityCheck RealityCheckRealityCheck `json:"reality_check"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`
}

Retrieve summary of client's trades and account for the Reality Check facility. A 'reality check' means a display of time elapsed since the session began, and associated client profit/loss. The Reality Check facility is a regulatory requirement for certain landing companies.

func (*RealityCheck) UnmarshalJSON ¶

func (j *RealityCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RealityCheckPassthrough ¶

type RealityCheckPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type RealityCheckRealityCheck ¶

type RealityCheckRealityCheck int

func (*RealityCheckRealityCheck) UnmarshalJSON ¶

func (j *RealityCheckRealityCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RealityCheckResp ¶

type RealityCheckResp struct {
	// Echo of the request made.
	EchoReq RealityCheckRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType RealityCheckRespMsgType `json:"msg_type"`

	// Reality check summary of trades.
	RealityCheck *RealityCheckRespRealityCheck `json:"reality_check,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

This gives summary of client's trades and account for reality check

func (*RealityCheckResp) UnmarshalJSON ¶

func (j *RealityCheckResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RealityCheckRespEchoReq ¶

type RealityCheckRespEchoReq map[string]interface{}

Echo of the request made.

type RealityCheckRespMsgType ¶

type RealityCheckRespMsgType string
const RealityCheckRespMsgTypeRealityCheck RealityCheckRespMsgType = "reality_check"

func (*RealityCheckRespMsgType) UnmarshalJSON ¶

func (j *RealityCheckRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RealityCheckRespRealityCheck ¶

type RealityCheckRespRealityCheck struct {
	// Total amount of contract purchased.
	BuyAmount *float64 `json:"buy_amount,omitempty"`

	// Total count of contract purchased.
	BuyCount *int `json:"buy_count,omitempty"`

	// Currency of client account i.e currency for trading
	Currency *string `json:"currency,omitempty"`

	// Client loginid.
	Loginid *string `json:"loginid,omitempty"`

	// Total count of contracts that are not yet expired.
	OpenContractCount *int `json:"open_contract_count,omitempty"`

	// Indicative profit of contract as per current market price.
	PotentialProfit *float64 `json:"potential_profit,omitempty"`

	// Total amount of contracts sold.
	SellAmount *float64 `json:"sell_amount,omitempty"`

	// Total count of contract sold.
	SellCount *int `json:"sell_count,omitempty"`

	// Reality check summary start time epoch
	StartTime *int `json:"start_time,omitempty"`
}

Reality check summary of trades.

type ResidenceList ¶

type ResidenceList struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough ResidenceListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Specific keys from the response that you want. If not passed, it
	// will return all the keys.
	Query []ResidenceListQueryElem `json:"query,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	ResidenceList ResidenceListResidenceList `json:"residence_list"`
}

This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.

func (*ResidenceList) UnmarshalJSON ¶

func (j *ResidenceList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListPassthrough ¶

type ResidenceListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type ResidenceListQueryElem ¶ added in v0.5.0

type ResidenceListQueryElem string
const ResidenceListQueryElemAccountOpeningSelfDeclarationRequired ResidenceListQueryElem = "account_opening_self_declaration_required"
const ResidenceListQueryElemCommonReportingStandard ResidenceListQueryElem = "common_reporting_standard"
const ResidenceListQueryElemDisabled ResidenceListQueryElem = "disabled"
const ResidenceListQueryElemIdentity ResidenceListQueryElem = "identity"
const ResidenceListQueryElemJurisdictionRiskAssessment ResidenceListQueryElem = "jurisdiction_risk_assessment"
const ResidenceListQueryElemPhoneIdd ResidenceListQueryElem = "phone_idd"
const ResidenceListQueryElemSelected ResidenceListQueryElem = "selected"
const ResidenceListQueryElemText ResidenceListQueryElem = "text"
const ResidenceListQueryElemTinFormat ResidenceListQueryElem = "tin_format"
const ResidenceListQueryElemValue ResidenceListQueryElem = "value"
const ResidenceListQueryElemWalletSignup ResidenceListQueryElem = "wallet_signup"

func (*ResidenceListQueryElem) UnmarshalJSON ¶ added in v0.5.0

func (j *ResidenceListQueryElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListResidenceList ¶

type ResidenceListResidenceList int

func (*ResidenceListResidenceList) UnmarshalJSON ¶

func (j *ResidenceListResidenceList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListResp ¶

type ResidenceListResp struct {
	// Echo of the request made.
	EchoReq ResidenceListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType ResidenceListRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// List of countries for account opening
	ResidenceList []ResidenceListRespResidenceListElem `json:"residence_list,omitempty"`
}

A message with Residence List

func (*ResidenceListResp) UnmarshalJSON ¶

func (j *ResidenceListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespEchoReq ¶

type ResidenceListRespEchoReq map[string]interface{}

Echo of the request made.

type ResidenceListRespMsgType ¶

type ResidenceListRespMsgType string
const ResidenceListRespMsgTypeResidenceList ResidenceListRespMsgType = "residence_list"

func (*ResidenceListRespMsgType) UnmarshalJSON ¶

func (j *ResidenceListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElem ¶

type ResidenceListRespResidenceListElem struct {
	// Flag which indicates whether self declaration is required for account opening
	AccountOpeningSelfDeclarationRequired *ResidenceListRespResidenceListElemAccountOpeningSelfDeclarationRequired `json:"account_opening_self_declaration_required,omitempty"`

	// Common Reporting Standard
	CommonReportingStandard *ResidenceListRespResidenceListElemCommonReportingStandard `json:"common_reporting_standard,omitempty"`

	// Disabled.
	Disabled *string `json:"disabled,omitempty"`

	// Information about identity options available
	Identity *ResidenceListRespResidenceListElemIdentity `json:"identity,omitempty"`

	// Jurisdiction Risk Assessment
	JurisdictionRiskAssessment *ResidenceListRespResidenceListElemJurisdictionRiskAssessment `json:"jurisdiction_risk_assessment,omitempty"`

	// Flag which indicates whether partner signup is available in this country
	PartnerSignup *ResidenceListRespResidenceListElemPartnerSignup `json:"partner_signup,omitempty"`

	// IDD code of country
	PhoneIdd *string `json:"phone_idd,omitempty"`

	// Selected.
	Selected *string `json:"selected,omitempty"`

	// Country full name
	Text *string `json:"text,omitempty"`

	// Country tax identifier format
	TinFormat []string `json:"tin_format,omitempty"`

	// 2-letter country code
	Value *string `json:"value,omitempty"`

	// Flag which indicates whether wallet signup is available in this country
	WalletSignup *ResidenceListRespResidenceListElemWalletSignup `json:"wallet_signup,omitempty"`
}

type ResidenceListRespResidenceListElemAccountOpeningSelfDeclarationRequired ¶ added in v0.4.21

type ResidenceListRespResidenceListElemAccountOpeningSelfDeclarationRequired int

func (*ResidenceListRespResidenceListElemAccountOpeningSelfDeclarationRequired) UnmarshalJSON ¶ added in v0.4.21

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElemCommonReportingStandard ¶ added in v0.5.0

type ResidenceListRespResidenceListElemCommonReportingStandard struct {
	// NPJ configuration
	NonParticipatingJurisdictions *ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictions `json:"non_participating_jurisdictions,omitempty"`

	// Postcode configuration
	Postcode *ResidenceListRespResidenceListElemCommonReportingStandardPostcode `json:"postcode,omitempty"`

	// Tax configuration
	Tax *ResidenceListRespResidenceListElemCommonReportingStandardTax `json:"tax,omitempty"`
}

Common Reporting Standard

type ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictions ¶ added in v0.5.0

type ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictions struct {
	// Default NPJ flag
	Default *bool `json:"default,omitempty"`

	// Flags for specific landing companies
	LandingCompany ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictionsLandingCompany `json:"landing_company,omitempty"`
}

NPJ configuration

type ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictionsLandingCompany ¶ added in v0.5.0

type ResidenceListRespResidenceListElemCommonReportingStandardNonParticipatingJurisdictionsLandingCompany map[string]interface{}

Flags for specific landing companies

type ResidenceListRespResidenceListElemCommonReportingStandardPostcode ¶ added in v0.5.0

type ResidenceListRespResidenceListElemCommonReportingStandardPostcode struct {
	// Invalid regex patterns for postcode validation
	InvalidPattern *string `json:"invalid_pattern,omitempty"`
}

Postcode configuration

type ResidenceListRespResidenceListElemCommonReportingStandardTax ¶ added in v0.5.0

type ResidenceListRespResidenceListElemCommonReportingStandardTax struct {
	// Mandatory TIN flag
	Mandatory *bool `json:"mandatory,omitempty"`

	// POI equivalent flag
	PoiEquivalent *bool `json:"poi_equivalent,omitempty"`

	// Cleanup regex
	TinCleaner *string `json:"tin_cleaner,omitempty"`

	// Country tax identifier format
	TinFormat []string `json:"tin_format,omitempty"`

	// Description of the TIN format
	TinFormatDescription *string `json:"tin_format_description,omitempty"`
}

Tax configuration

type ResidenceListRespResidenceListElemIdentity ¶

type ResidenceListRespResidenceListElemIdentity struct {
	// Identity services configuration
	Services *ResidenceListRespResidenceListElemIdentityServices `json:"services,omitempty"`
}

Information about identity options available

type ResidenceListRespResidenceListElemIdentityServices ¶

type ResidenceListRespResidenceListElemIdentityServices struct {
	// IDV configuration
	Idv *ResidenceListRespResidenceListElemIdentityServicesIdv `json:"idv,omitempty"`

	// Onfido configuration
	Onfido *ResidenceListRespResidenceListElemIdentityServicesOnfido `json:"onfido,omitempty"`
}

Identity services configuration

type ResidenceListRespResidenceListElemIdentityServicesIdv ¶

type ResidenceListRespResidenceListElemIdentityServicesIdv struct {
	// Documents supported by the IDV service in this country
	DocumentsSupported ResidenceListRespResidenceListElemIdentityServicesIdvDocumentsSupported `json:"documents_supported,omitempty"`

	// Flag which indicates whether this country has IDV visual samples
	HasVisualSample *ResidenceListRespResidenceListElemIdentityServicesIdvHasVisualSample `json:"has_visual_sample,omitempty"`

	// Flag which indicates whether IDV is available in this country
	IsCountrySupported *ResidenceListRespResidenceListElemIdentityServicesIdvIsCountrySupported `json:"is_country_supported,omitempty"`
}

IDV configuration

type ResidenceListRespResidenceListElemIdentityServicesIdvDocumentsSupported ¶

type ResidenceListRespResidenceListElemIdentityServicesIdvDocumentsSupported map[string]interface{}

Documents supported by the IDV service in this country

type ResidenceListRespResidenceListElemIdentityServicesIdvHasVisualSample ¶

type ResidenceListRespResidenceListElemIdentityServicesIdvHasVisualSample int

func (*ResidenceListRespResidenceListElemIdentityServicesIdvHasVisualSample) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElemIdentityServicesIdvIsCountrySupported ¶

type ResidenceListRespResidenceListElemIdentityServicesIdvIsCountrySupported int

func (*ResidenceListRespResidenceListElemIdentityServicesIdvIsCountrySupported) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElemIdentityServicesOnfido ¶

type ResidenceListRespResidenceListElemIdentityServicesOnfido struct {
	// Documents supported by the IDV service in this country
	DocumentsSupported ResidenceListRespResidenceListElemIdentityServicesOnfidoDocumentsSupported `json:"documents_supported,omitempty"`

	// Flag which indicates whether Onfido is available in this country
	IsCountrySupported *ResidenceListRespResidenceListElemIdentityServicesOnfidoIsCountrySupported `json:"is_country_supported,omitempty"`
}

Onfido configuration

type ResidenceListRespResidenceListElemIdentityServicesOnfidoDocumentsSupported ¶

type ResidenceListRespResidenceListElemIdentityServicesOnfidoDocumentsSupported map[string]interface{}

Documents supported by the IDV service in this country

type ResidenceListRespResidenceListElemIdentityServicesOnfidoIsCountrySupported ¶

type ResidenceListRespResidenceListElemIdentityServicesOnfidoIsCountrySupported int

func (*ResidenceListRespResidenceListElemIdentityServicesOnfidoIsCountrySupported) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElemJurisdictionRiskAssessment ¶ added in v0.5.0

type ResidenceListRespResidenceListElemJurisdictionRiskAssessment struct {
	// Disclaimer configuration
	Disclaimer *ResidenceListRespResidenceListElemJurisdictionRiskAssessmentDisclaimer `json:"disclaimer,omitempty"`

	// Risk level configuration
	RiskLevel *ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevel `json:"risk_level,omitempty"`

	// Turnover configuration
	Turnover *ResidenceListRespResidenceListElemJurisdictionRiskAssessmentTurnover `json:"turnover,omitempty"`
}

Jurisdiction Risk Assessment

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentDisclaimer ¶ added in v0.5.0

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentDisclaimer struct {
	// Disclaimer flag
	Accept *bool `json:"accept,omitempty"`

	// Disclaimer message
	Message *string `json:"message,omitempty"`
}

Disclaimer configuration

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevel ¶ added in v0.5.0

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevel struct {
	// Default risk level flag
	Default *string `json:"default,omitempty"`

	// Flags for specific landing companies
	LandingCompany ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevelLandingCompany `json:"landing_company,omitempty"`
}

Risk level configuration

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevelLandingCompany ¶ added in v0.5.0

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentRiskLevelLandingCompany map[string]interface{}

Flags for specific landing companies

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentTurnover ¶ added in v0.5.0

type ResidenceListRespResidenceListElemJurisdictionRiskAssessmentTurnover struct {
	// Max limit
	MaxLimit *bool `json:"max_limit,omitempty"`
}

Turnover configuration

type ResidenceListRespResidenceListElemPartnerSignup ¶ added in v0.5.0

type ResidenceListRespResidenceListElemPartnerSignup int

func (*ResidenceListRespResidenceListElemPartnerSignup) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type ResidenceListRespResidenceListElemWalletSignup ¶ added in v0.5.0

type ResidenceListRespResidenceListElemWalletSignup int

func (*ResidenceListRespResidenceListElemWalletSignup) UnmarshalJSON ¶ added in v0.5.0

UnmarshalJSON implements json.Unmarshaler.

type RevokeOauthApp ¶

type RevokeOauthApp struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough RevokeOauthAppPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// The application ID to revoke.
	RevokeOauthApp int `json:"revoke_oauth_app"`
}

Used for revoking access of particular app.

func (*RevokeOauthApp) UnmarshalJSON ¶

func (j *RevokeOauthApp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RevokeOauthAppPassthrough ¶

type RevokeOauthAppPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type RevokeOauthAppResp ¶

type RevokeOauthAppResp struct {
	// Echo of the request made.
	EchoReq RevokeOauthAppRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType RevokeOauthAppRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// `1` on success
	RevokeOauthApp *int `json:"revoke_oauth_app,omitempty"`
}

A message with revoking a used application

func (*RevokeOauthAppResp) UnmarshalJSON ¶

func (j *RevokeOauthAppResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RevokeOauthAppRespEchoReq ¶

type RevokeOauthAppRespEchoReq map[string]interface{}

Echo of the request made.

type RevokeOauthAppRespMsgType ¶

type RevokeOauthAppRespMsgType string
const RevokeOauthAppRespMsgTypeRevokeOauthApp RevokeOauthAppRespMsgType = "revoke_oauth_app"

func (*RevokeOauthAppRespMsgType) UnmarshalJSON ¶

func (j *RevokeOauthAppRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Sell ¶

type Sell struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SellPassthrough `json:"passthrough,omitempty"`

	// Minimum price at which to sell the contract, or `0` for 'sell at market'.
	Price float64 `json:"price"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Pass contract_id received from the `portfolio` call.
	Sell int `json:"sell"`
}

Sell a Contract as identified from a previous `portfolio` call.

func (*Sell) UnmarshalJSON ¶

func (j *Sell) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellContractForMultipleAccounts ¶

type SellContractForMultipleAccounts struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SellContractForMultipleAccountsPassthrough `json:"passthrough,omitempty"`

	// Minimum price at which to sell the contract, or `0` for 'sell at market'.
	Price float64 `json:"price"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	SellContractForMultipleAccounts SellContractForMultipleAccountsSellContractForMultipleAccounts `json:"sell_contract_for_multiple_accounts"`

	// An internal ID used to identify the contract which was originally bought. This
	// is returned from the `buy` and `buy_contract_for_multiple_accounts` calls.
	Shortcode string `json:"shortcode"`

	// Authorisation tokens which select the accounts to sell use for the affected
	// accounts.
	Tokens []string `json:"tokens"`
}

Sell contracts for multiple accounts simultaneously. Uses the shortcode response from `buy_contract_for_multiple_accounts` to identify the contract, and authorisation tokens to select which accounts to sell those contracts on. Note that only the accounts identified by the tokens will be affected. This will not sell the contract on the currently-authorised account unless you include the token for the current account.

func (*SellContractForMultipleAccounts) UnmarshalJSON ¶

func (j *SellContractForMultipleAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellContractForMultipleAccountsPassthrough ¶

type SellContractForMultipleAccountsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SellContractForMultipleAccountsResp ¶

type SellContractForMultipleAccountsResp struct {
	// Echo of the request made.
	EchoReq SellContractForMultipleAccountsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SellContractForMultipleAccountsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Status information for each affected account.
	SellContractForMultipleAccounts *SellContractForMultipleAccountsRespSellContractForMultipleAccounts `json:"sell_contract_for_multiple_accounts,omitempty"`
}

Confirmation of the sale status for the selected contracts and accounts.

func (*SellContractForMultipleAccountsResp) UnmarshalJSON ¶

func (j *SellContractForMultipleAccountsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellContractForMultipleAccountsRespEchoReq ¶

type SellContractForMultipleAccountsRespEchoReq map[string]interface{}

Echo of the request made.

type SellContractForMultipleAccountsRespMsgType ¶

type SellContractForMultipleAccountsRespMsgType string
const SellContractForMultipleAccountsRespMsgTypeSellContractForMultipleAccounts SellContractForMultipleAccountsRespMsgType = "sell_contract_for_multiple_accounts"

func (*SellContractForMultipleAccountsRespMsgType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type SellContractForMultipleAccountsRespSellContractForMultipleAccounts ¶

type SellContractForMultipleAccountsRespSellContractForMultipleAccounts struct {
	// The result of sell for multiple accounts request.
	Result []interface{} `json:"result,omitempty"`
}

Status information for each affected account.

type SellContractForMultipleAccountsSellContractForMultipleAccounts ¶

type SellContractForMultipleAccountsSellContractForMultipleAccounts int

func (*SellContractForMultipleAccountsSellContractForMultipleAccounts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type SellExpired ¶

type SellExpired struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SellExpiredPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	SellExpired SellExpiredSellExpired `json:"sell_expired"`
}

This call will try to sell any expired contracts and return the number of sold contracts.

func (*SellExpired) UnmarshalJSON ¶

func (j *SellExpired) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellExpiredPassthrough ¶

type SellExpiredPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SellExpiredResp ¶

type SellExpiredResp struct {
	// Echo of the request made.
	EchoReq SellExpiredRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SellExpiredRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Sell expired contract object containing count of contracts sold
	SellExpired *SellExpiredRespSellExpired `json:"sell_expired,omitempty"`
}

The result of sell expired contract

func (*SellExpiredResp) UnmarshalJSON ¶

func (j *SellExpiredResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellExpiredRespEchoReq ¶

type SellExpiredRespEchoReq map[string]interface{}

Echo of the request made.

type SellExpiredRespMsgType ¶

type SellExpiredRespMsgType string
const SellExpiredRespMsgTypeSellExpired SellExpiredRespMsgType = "sell_expired"

func (*SellExpiredRespMsgType) UnmarshalJSON ¶

func (j *SellExpiredRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellExpiredRespSellExpired ¶

type SellExpiredRespSellExpired struct {
	// The number of contracts that has been sold.
	Count *int `json:"count,omitempty"`
}

Sell expired contract object containing count of contracts sold

type SellExpiredSellExpired ¶

type SellExpiredSellExpired int

func (*SellExpiredSellExpired) UnmarshalJSON ¶

func (j *SellExpiredSellExpired) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellPassthrough ¶

type SellPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SellResp ¶

type SellResp struct {
	// Echo of the request made.
	EchoReq SellRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SellRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Receipt for the transaction
	Sell *SellRespSell `json:"sell,omitempty"`
}

A message with transaction results is received

func (*SellResp) UnmarshalJSON ¶

func (j *SellResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellRespEchoReq ¶

type SellRespEchoReq map[string]interface{}

Echo of the request made.

type SellRespMsgType ¶

type SellRespMsgType string
const SellRespMsgTypeSell SellRespMsgType = "sell"

func (*SellRespMsgType) UnmarshalJSON ¶

func (j *SellRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SellRespSell ¶

type SellRespSell struct {
	// New account balance after completion of the sale
	BalanceAfter *float64 `json:"balance_after,omitempty"`

	// Internal contract identifier for the sold contract
	ContractId *int `json:"contract_id,omitempty"`

	// Internal transaction identifier for the corresponding buy transaction
	ReferenceId *int `json:"reference_id,omitempty"`

	// Actual effected sale price
	SoldFor *float64 `json:"sold_for,omitempty"`

	// Internal transaction identifier for the sale transaction
	TransactionId *int `json:"transaction_id,omitempty"`
}

Receipt for the transaction

type SetAccountCurrency ¶

type SetAccountCurrency struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SetAccountCurrencyPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Currency of the account. List of supported currencies can be acquired with
	// `payout_currencies` call.
	SetAccountCurrency string `json:"set_account_currency"`
}

Set account currency, this will be default currency for your account i.e currency for trading, deposit. Please note that account currency can only be set once, and then can never be changed.

func (*SetAccountCurrency) UnmarshalJSON ¶

func (j *SetAccountCurrency) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetAccountCurrencyPassthrough ¶

type SetAccountCurrencyPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SetAccountCurrencyResp ¶

type SetAccountCurrencyResp struct {
	// Echo of the request made.
	EchoReq SetAccountCurrencyRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SetAccountCurrencyRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// `1`: success, `0`: no change
	SetAccountCurrency *SetAccountCurrencyRespSetAccountCurrency `json:"set_account_currency,omitempty"`
}

Status of set account currency call

func (*SetAccountCurrencyResp) UnmarshalJSON ¶

func (j *SetAccountCurrencyResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetAccountCurrencyRespEchoReq ¶

type SetAccountCurrencyRespEchoReq map[string]interface{}

Echo of the request made.

type SetAccountCurrencyRespMsgType ¶

type SetAccountCurrencyRespMsgType string
const SetAccountCurrencyRespMsgTypeSetAccountCurrency SetAccountCurrencyRespMsgType = "set_account_currency"

func (*SetAccountCurrencyRespMsgType) UnmarshalJSON ¶

func (j *SetAccountCurrencyRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetAccountCurrencyRespSetAccountCurrency ¶

type SetAccountCurrencyRespSetAccountCurrency int

func (*SetAccountCurrencyRespSetAccountCurrency) UnmarshalJSON ¶

func (j *SetAccountCurrencyRespSetAccountCurrency) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetFinancialAssessment ¶

type SetFinancialAssessment struct {
	// [Optional] The financial information of a client
	FinancialInformation SetFinancialAssessmentFinancialInformation `json:"financial_information,omitempty"`

	// [Optional] The version of the financial information
	FinancialInformationVersion *string `json:"financial_information_version,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SetFinancialAssessmentPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	SetFinancialAssessment SetFinancialAssessmentSetFinancialAssessment `json:"set_financial_assessment"`

	// [Optional] The trading experience of a client
	TradingExperience SetFinancialAssessmentTradingExperience `json:"trading_experience,omitempty"`

	// [Optional] The trading experience of a `maltainvest` client
	TradingExperienceRegulated SetFinancialAssessmentTradingExperienceRegulated `json:"trading_experience_regulated,omitempty"`
}

This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.

func (*SetFinancialAssessment) UnmarshalJSON ¶

func (j *SetFinancialAssessment) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetFinancialAssessmentFinancialInformation ¶

type SetFinancialAssessmentFinancialInformation map[string]interface{}

[Optional] The financial information of a client

type SetFinancialAssessmentPassthrough ¶

type SetFinancialAssessmentPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SetFinancialAssessmentResp ¶

type SetFinancialAssessmentResp struct {
	// Echo of the request made.
	EchoReq SetFinancialAssessmentRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SetFinancialAssessmentRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// The financial assessment score assigned to the submitted financial assessment
	SetFinancialAssessment *SetFinancialAssessmentRespSetFinancialAssessment `json:"set_financial_assessment,omitempty"`
}

Set Financial Assessment Receive

func (*SetFinancialAssessmentResp) UnmarshalJSON ¶

func (j *SetFinancialAssessmentResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetFinancialAssessmentRespEchoReq ¶

type SetFinancialAssessmentRespEchoReq map[string]interface{}

Echo of the request made.

type SetFinancialAssessmentRespMsgType ¶

type SetFinancialAssessmentRespMsgType string
const SetFinancialAssessmentRespMsgTypeSetFinancialAssessment SetFinancialAssessmentRespMsgType = "set_financial_assessment"

func (*SetFinancialAssessmentRespMsgType) UnmarshalJSON ¶

func (j *SetFinancialAssessmentRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetFinancialAssessmentRespSetFinancialAssessment ¶

type SetFinancialAssessmentRespSetFinancialAssessment struct {
	// CFD score based on answers
	CfdScore *int `json:"cfd_score,omitempty"`

	// Financial information score based on answers
	FinancialInformationScore *int `json:"financial_information_score,omitempty"`

	// Financial Assessment score based on answers
	TotalScore *int `json:"total_score,omitempty"`

	// Trading experience score based on answers
	TradingScore *int `json:"trading_score,omitempty"`
}

The financial assessment score assigned to the submitted financial assessment

type SetFinancialAssessmentSetFinancialAssessment ¶

type SetFinancialAssessmentSetFinancialAssessment int

func (*SetFinancialAssessmentSetFinancialAssessment) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type SetFinancialAssessmentTradingExperience ¶

type SetFinancialAssessmentTradingExperience map[string]interface{}

[Optional] The trading experience of a client

type SetFinancialAssessmentTradingExperienceRegulated ¶

type SetFinancialAssessmentTradingExperienceRegulated map[string]interface{}

[Optional] The trading experience of a `maltainvest` client

type SetSelfExclusion ¶

type SetSelfExclusion struct {
	// [Optional] Exclude me from the website (for a minimum of 6 months, up to a
	// maximum of 5 years). Note: uplifting this self-exclusion may require contacting
	// the company.
	ExcludeUntil *string `json:"exclude_until,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] 7-day limit on deposits.
	Max30DayDeposit *float64 `json:"max_30day_deposit,omitempty"`

	// [Optional] 30-day limit on losses.
	Max30DayLosses *float64 `json:"max_30day_losses,omitempty"`

	// [Optional] 30-day turnover limit.
	Max30DayTurnover *float64 `json:"max_30day_turnover,omitempty"`

	// [Optional] 7-day limit on deposits.
	Max7DayDeposit *float64 `json:"max_7day_deposit,omitempty"`

	// [Optional] 7-day limit on losses.
	Max7DayLosses *float64 `json:"max_7day_losses,omitempty"`

	// [Optional] 7-day turnover limit.
	Max7DayTurnover *float64 `json:"max_7day_turnover,omitempty"`

	// [Optional] Maximum account cash balance.
	MaxBalance *float64 `json:"max_balance,omitempty"`

	// [Optional] Daily deposit limit.
	MaxDeposit *float64 `json:"max_deposit,omitempty"`

	// [Optional] Daily limit on losses.
	MaxLosses *float64 `json:"max_losses,omitempty"`

	// [Optional] Maximum number of open positions.
	MaxOpenBets *int `json:"max_open_bets,omitempty"`

	// [Optional] Daily turnover limit.
	MaxTurnover *float64 `json:"max_turnover,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SetSelfExclusionPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Session duration limit, in minutes.
	SessionDurationLimit *int `json:"session_duration_limit,omitempty"`

	// Must be `1`
	SetSelfExclusion SetSelfExclusionSetSelfExclusion `json:"set_self_exclusion"`

	// [Optional] Exclude me from the website (for up to 6 weeks). Requires time in
	// epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted
	// automatically at the expiry of the timeout period.
	TimeoutUntil *int `json:"timeout_until,omitempty"`
}

Set Self-Exclusion (this call should be used in conjunction with `get_self_exclusion`)

func (*SetSelfExclusion) UnmarshalJSON ¶

func (j *SetSelfExclusion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSelfExclusionPassthrough ¶

type SetSelfExclusionPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SetSelfExclusionResp ¶

type SetSelfExclusionResp struct {
	// Echo of the request made.
	EchoReq SetSelfExclusionRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SetSelfExclusionRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// `1` on success
	SetSelfExclusion *int `json:"set_self_exclusion,omitempty"`
}

A message with User Self-Exclusion

func (*SetSelfExclusionResp) UnmarshalJSON ¶

func (j *SetSelfExclusionResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSelfExclusionRespEchoReq ¶

type SetSelfExclusionRespEchoReq map[string]interface{}

Echo of the request made.

type SetSelfExclusionRespMsgType ¶

type SetSelfExclusionRespMsgType string
const SetSelfExclusionRespMsgTypeSetSelfExclusion SetSelfExclusionRespMsgType = "set_self_exclusion"

func (*SetSelfExclusionRespMsgType) UnmarshalJSON ¶

func (j *SetSelfExclusionRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSelfExclusionSetSelfExclusion ¶

type SetSelfExclusionSetSelfExclusion int

func (*SetSelfExclusionSetSelfExclusion) UnmarshalJSON ¶

func (j *SetSelfExclusionSetSelfExclusion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettings ¶

type SetSettings struct {
	// [Optional] Purpose and reason for requesting the account opening. Only
	// applicable for real money account. Required for clients that have not set it
	// yet. Can only be set once.
	AccountOpeningReason *SetSettingsAccountOpeningReason `json:"account_opening_reason,omitempty"`

	// [Optional] Note: not applicable for virtual account. Required field for real
	// money account.
	AddressCity *string `json:"address_city,omitempty"`

	// [Optional] Note: not applicable for virtual account. Required field for real
	// money account.
	AddressLine1 *string `json:"address_line_1,omitempty"`

	// [Optional] Note: not applicable for virtual account. Optional field for real
	// money account.
	AddressLine2 *string `json:"address_line_2,omitempty"`

	// [Optional] Note: not applicable for virtual account. Optional field for real
	// money account.
	AddressPostcode *string `json:"address_postcode,omitempty"`

	// [Optional] Note: not applicable for virtual account. Optional field for real
	// money account.
	AddressState *string `json:"address_state,omitempty"`

	// [Optional] Boolean value 1 or 0, indicating permission to allow others to
	// follow your trades. Note: not applicable for Virtual account. Only allow for
	// real money account.
	AllowCopiers *SetSettingsAllowCopiers `json:"allow_copiers,omitempty"`

	// [Optional] The phone's calling country code. Don't include the `+` sign. Up to
	// 4 digits.
	CallingCountryCode *string `json:"calling_country_code,omitempty"`

	// [Optional] Country of legal citizenship, 2-letter country code.
	Citizen *string `json:"citizen,omitempty"`

	// [Optional] Date of birth format: yyyy-mm-dd (can only be changed on
	// unauthenticated svg accounts).
	DateOfBirth *string `json:"date_of_birth,omitempty"`

	// Boolean value 1 or 0, indicating if user email belong to dxtrade exception
	// list.
	DxtradeUserException *SetSettingsDxtradeUserException `json:"dxtrade_user_exception,omitempty"`

	// [Optional] Boolean value 1 or 0, indicating permission to use email address for
	// any contact which may include marketing
	EmailConsent *SetSettingsEmailConsent `json:"email_consent,omitempty"`

	// [Optional] Employment Status.
	EmploymentStatus *string `json:"employment_status,omitempty"`

	// [Optional] Enable or disable one or multiple features.
	FeatureFlag *SetSettingsFeatureFlag `json:"feature_flag,omitempty"`

	// [Optional] The version of the financial information
	FinancialInformationVersion *string `json:"financial_information_version,omitempty"`

	// [Optional] Within 1-50 characters, use only letters, spaces, hyphens,
	// full-stops or apostrophes (can only be changed on unauthenticated svg
	// accounts).
	FirstName *string `json:"first_name,omitempty"`

	// [Optional] Within 1-50 characters, use only letters, spaces, hyphens,
	// full-stops or apostrophes (can only be changed on unauthenticated svg
	// accounts).
	LastName *string `json:"last_name,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Indicates client's self-declaration of not being a PEP/RCA
	// (Politically Exposed Person/Relatives and Close Associates). Effective for real
	// accounts only.
	NonPepDeclaration *SetSettingsNonPepDeclaration `json:"non_pep_declaration,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough SetSettingsPassthrough `json:"passthrough,omitempty"`

	// [Optional] The phone's national format, don't include the `+` sign nor the
	// calling country code. Up to 15 digits are allowed.
	Phone *string `json:"phone,omitempty"`

	// [Optional] Place of birth, 2-letter country code.
	PlaceOfBirth *string `json:"place_of_birth,omitempty"`

	// [Optional] User's preferred language, ISO standard language code
	PreferredLanguage *string `json:"preferred_language,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Required when client wants to be treated as professional. Applicable
	// for financial accounts only.
	RequestProfessionalStatus *SetSettingsRequestProfessionalStatus `json:"request_professional_status,omitempty"`

	// [Optional] 2-letter country code. Note: not applicable for real money account.
	// Only allow for Virtual account without residence set.
	Residence *string `json:"residence,omitempty"`

	// [Optional] Accept any value in enum list (can only be changed on
	// unauthenticated svg accounts).
	Salutation *SetSettingsSalutation `json:"salutation,omitempty"`

	// [Optional] Answer to secret question, within 4-50 characters. Required for new
	// account and existing client details will be used if client opens another
	// account.
	SecretAnswer *string `json:"secret_answer,omitempty"`

	// [Optional] Accept any value in enum list. Required for new account and existing
	// client details will be used if client opens another account.
	SecretQuestion *SetSettingsSecretQuestion `json:"secret_question,omitempty"`

	// Must be `1`
	SetSettings SetSettingsSetSettings `json:"set_settings"`

	// [Optional] Tax identification number. Only applicable for real money account.
	// Required for maltainvest landing company.
	TaxIdentificationNumber *string `json:"tax_identification_number,omitempty"`

	// [Optional] Residence for tax purpose. Comma separated iso country code if
	// multiple jurisdictions. Only applicable for real money account. Required for
	// maltainvest landing company.
	TaxResidence *string `json:"tax_residence,omitempty"`

	// [Optional] Whether the client has skipped the TIN form. Only applicable for
	// real money account.
	TinSkipped *SetSettingsTinSkipped `json:"tin_skipped,omitempty"`

	// [Optional] Enable/Disable Trading Hub dashboard
	TradingHub *SetSettingsTradingHub `json:"trading_hub,omitempty"`
}

Set User Settings (this call should be used in conjunction with `get_settings`)

func (*SetSettings) UnmarshalJSON ¶

func (j *SetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsAccountOpeningReason ¶

type SetSettingsAccountOpeningReason string
const SetSettingsAccountOpeningReasonAdditionalRevenue SetSettingsAccountOpeningReason = "Additional revenue"
const SetSettingsAccountOpeningReasonHedging SetSettingsAccountOpeningReason = "Hedging"
const SetSettingsAccountOpeningReasonIncomeEarning SetSettingsAccountOpeningReason = "Income Earning"
const SetSettingsAccountOpeningReasonPeerToPeerExchange SetSettingsAccountOpeningReason = "Peer-to-peer exchange"
const SetSettingsAccountOpeningReasonSavings SetSettingsAccountOpeningReason = "Savings"
const SetSettingsAccountOpeningReasonSpeculative SetSettingsAccountOpeningReason = "Speculative"

func (*SetSettingsAccountOpeningReason) UnmarshalJSON ¶

func (j *SetSettingsAccountOpeningReason) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsAllowCopiers ¶

type SetSettingsAllowCopiers int

func (*SetSettingsAllowCopiers) UnmarshalJSON ¶

func (j *SetSettingsAllowCopiers) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsDxtradeUserException ¶

type SetSettingsDxtradeUserException int

func (*SetSettingsDxtradeUserException) UnmarshalJSON ¶

func (j *SetSettingsDxtradeUserException) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsEmailConsent ¶

type SetSettingsEmailConsent int

func (*SetSettingsEmailConsent) UnmarshalJSON ¶

func (j *SetSettingsEmailConsent) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsFeatureFlag ¶

type SetSettingsFeatureFlag struct {
	// [Optional] Boolean value 1 or 0 indicating whether to enable/disable this
	// feature
	Wallet *SetSettingsFeatureFlagWallet `json:"wallet,omitempty"`
}

[Optional] Enable or disable one or multiple features.

type SetSettingsFeatureFlagWallet ¶

type SetSettingsFeatureFlagWallet int

func (*SetSettingsFeatureFlagWallet) UnmarshalJSON ¶

func (j *SetSettingsFeatureFlagWallet) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsNonPepDeclaration ¶

type SetSettingsNonPepDeclaration int

func (*SetSettingsNonPepDeclaration) UnmarshalJSON ¶

func (j *SetSettingsNonPepDeclaration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsPassthrough ¶

type SetSettingsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type SetSettingsRequestProfessionalStatus ¶

type SetSettingsRequestProfessionalStatus int

func (*SetSettingsRequestProfessionalStatus) UnmarshalJSON ¶

func (j *SetSettingsRequestProfessionalStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsResp ¶

type SetSettingsResp struct {
	// Echo of the request made.
	EchoReq SetSettingsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType SetSettingsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// 1 on success
	SetSettings *int `json:"set_settings,omitempty"`
}

A message with User Settings

func (*SetSettingsResp) UnmarshalJSON ¶

func (j *SetSettingsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsRespEchoReq ¶

type SetSettingsRespEchoReq map[string]interface{}

Echo of the request made.

type SetSettingsRespMsgType ¶

type SetSettingsRespMsgType string
const SetSettingsRespMsgTypeSetSettings SetSettingsRespMsgType = "set_settings"

func (*SetSettingsRespMsgType) UnmarshalJSON ¶

func (j *SetSettingsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsSalutation ¶

type SetSettingsSalutation string
const SetSettingsSalutationMiss SetSettingsSalutation = "Miss"
const SetSettingsSalutationMr SetSettingsSalutation = "Mr"
const SetSettingsSalutationMrs SetSettingsSalutation = "Mrs"
const SetSettingsSalutationMs SetSettingsSalutation = "Ms"

func (*SetSettingsSalutation) UnmarshalJSON ¶

func (j *SetSettingsSalutation) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsSecretQuestion ¶

type SetSettingsSecretQuestion string
const SetSettingsSecretQuestionBrandOfFirstCar SetSettingsSecretQuestion = "Brand of first car"
const SetSettingsSecretQuestionFavouriteArtist SetSettingsSecretQuestion = "Favourite artist"
const SetSettingsSecretQuestionFavouriteDish SetSettingsSecretQuestion = "Favourite dish"
const SetSettingsSecretQuestionMemorableDate SetSettingsSecretQuestion = "Memorable date"
const SetSettingsSecretQuestionMemorableTownCity SetSettingsSecretQuestion = "Memorable town/city"
const SetSettingsSecretQuestionMotherSMaidenName SetSettingsSecretQuestion = "Mother's maiden name"
const SetSettingsSecretQuestionNameOfFirstLove SetSettingsSecretQuestion = "Name of first love"
const SetSettingsSecretQuestionNameOfYourPet SetSettingsSecretQuestion = "Name of your pet"

func (*SetSettingsSecretQuestion) UnmarshalJSON ¶

func (j *SetSettingsSecretQuestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsSetSettings ¶

type SetSettingsSetSettings int

func (*SetSettingsSetSettings) UnmarshalJSON ¶

func (j *SetSettingsSetSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsTinSkipped ¶ added in v0.5.7

type SetSettingsTinSkipped int

func (*SetSettingsTinSkipped) UnmarshalJSON ¶ added in v0.5.7

func (j *SetSettingsTinSkipped) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SetSettingsTradingHub ¶

type SetSettingsTradingHub int

func (*SetSettingsTradingHub) UnmarshalJSON ¶

func (j *SetSettingsTradingHub) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SignUpRequirements ¶ added in v0.4.26

type SignUpRequirements []string

Sign up requirements

type Statement ¶

type Statement struct {
	// [Optional] To filter the statement according to the type of transaction.
	ActionType *StatementActionType `json:"action_type,omitempty"`

	// [Optional] Start date (epoch)
	DateFrom *int `json:"date_from,omitempty"`

	// [Optional] End date (epoch)
	DateTo *int `json:"date_to,omitempty"`

	// [Optional] If set to 1, will return full contracts description.
	Description *StatementDescription `json:"description,omitempty"`

	// [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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Number of transactions to skip.
	Offset *int `json:"offset,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough StatementPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	Statement StatementStatement `json:"statement"`
}

Retrieve a summary of account transactions, according to given search criteria

func (*Statement) UnmarshalJSON ¶

func (j *Statement) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatementActionType ¶

type StatementActionType string
const StatementActionTypeAdjustment StatementActionType = "adjustment"
const StatementActionTypeBuy StatementActionType = "buy"
const StatementActionTypeDeposit StatementActionType = "deposit"
const StatementActionTypeEscrow StatementActionType = "escrow"
const StatementActionTypeSell StatementActionType = "sell"
const StatementActionTypeTransfer StatementActionType = "transfer"
const StatementActionTypeVirtualCredit StatementActionType = "virtual_credit"
const StatementActionTypeWithdrawal StatementActionType = "withdrawal"

func (*StatementActionType) UnmarshalJSON ¶

func (j *StatementActionType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatementDescription ¶

type StatementDescription int

func (*StatementDescription) UnmarshalJSON ¶

func (j *StatementDescription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatementPassthrough ¶

type StatementPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type StatementResp ¶

type StatementResp struct {
	// Echo of the request made.
	EchoReq StatementRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType StatementRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Account statement.
	Statement *StatementRespStatement `json:"statement,omitempty"`
}

A summary of account statement is received

func (*StatementResp) UnmarshalJSON ¶

func (j *StatementResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatementRespEchoReq ¶

type StatementRespEchoReq map[string]interface{}

Echo of the request made.

type StatementRespMsgType ¶

type StatementRespMsgType string
const StatementRespMsgTypeStatement StatementRespMsgType = "statement"

func (*StatementRespMsgType) UnmarshalJSON ¶

func (j *StatementRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatementRespStatement ¶

type StatementRespStatement struct {
	// Number of transactions returned in this call
	Count *float64 `json:"count,omitempty"`

	// Array of returned transactions
	Transactions []StatementRespStatementTransactionsElem `json:"transactions,omitempty"`
}

Account statement.

type StatementRespStatementTransactionsElem ¶

type StatementRespStatementTransactionsElem struct {
	// It is the type of action.
	ActionType *StatementRespStatementTransactionsElemActionType `json:"action_type,omitempty"`

	// It is the amount of transaction.
	Amount *float64 `json:"amount,omitempty"`

	// ID of the application where this contract was purchased.
	AppId *int `json:"app_id,omitempty"`

	// It is the remaining balance.
	BalanceAfter *float64 `json:"balance_after,omitempty"`

	// It is the contract ID.
	ContractId *int `json:"contract_id,omitempty"`

	// Contains details about fees used for transfer. It is present only when action
	// type is transfer.
	Fees *StatementRespStatementTransactionsElemFees `json:"fees,omitempty"`

	// Contains details of account from which amount was transferred. It is present
	// only when action type is transfer.
	From *StatementRespStatementTransactionsElemFrom `json:"from,omitempty"`

	// The description of contract purchased if description is set to `1`.
	Longcode *string `json:"longcode,omitempty"`

	// Payout price
	Payout *float64 `json:"payout,omitempty"`

	// Time at which contract was purchased, present only for sell transaction
	PurchaseTime *int `json:"purchase_time,omitempty"`

	// Internal transaction identifier for the corresponding buy transaction ( set
	// only for contract selling )
	ReferenceId *int `json:"reference_id,omitempty"`

	// Compact description of the contract purchased if description is set to `1`.
	Shortcode *string `json:"shortcode,omitempty"`

	// Contains details of account to which amount was transferred. It is present only
	// when action type is transfer.
	To *StatementRespStatementTransactionsElemTo `json:"to,omitempty"`

	// It is the transaction ID. In statement every contract (buy or sell) and every
	// payment has a unique ID.
	TransactionId *int `json:"transaction_id,omitempty"`

	// It is the time of transaction.
	TransactionTime *int `json:"transaction_time,omitempty"`

	// Additional withdrawal details such as typical processing times, if description
	// is set to `1`.
	WithdrawalDetails *string `json:"withdrawal_details,omitempty"`
}

type StatementRespStatementTransactionsElemActionType ¶

type StatementRespStatementTransactionsElemActionType string
const StatementRespStatementTransactionsElemActionTypeAdjustment StatementRespStatementTransactionsElemActionType = "adjustment"
const StatementRespStatementTransactionsElemActionTypeBuy StatementRespStatementTransactionsElemActionType = "buy"
const StatementRespStatementTransactionsElemActionTypeDeposit StatementRespStatementTransactionsElemActionType = "deposit"
const StatementRespStatementTransactionsElemActionTypeHold StatementRespStatementTransactionsElemActionType = "hold"
const StatementRespStatementTransactionsElemActionTypeRelease StatementRespStatementTransactionsElemActionType = "release"
const StatementRespStatementTransactionsElemActionTypeSell StatementRespStatementTransactionsElemActionType = "sell"
const StatementRespStatementTransactionsElemActionTypeTransfer StatementRespStatementTransactionsElemActionType = "transfer"
const StatementRespStatementTransactionsElemActionTypeVirtualCredit StatementRespStatementTransactionsElemActionType = "virtual_credit"
const StatementRespStatementTransactionsElemActionTypeWithdrawal StatementRespStatementTransactionsElemActionType = "withdrawal"

func (*StatementRespStatementTransactionsElemActionType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type StatementRespStatementTransactionsElemFees ¶

type StatementRespStatementTransactionsElemFees struct {
	// Fees amount
	Amount *float64 `json:"amount,omitempty"`

	// Fees currency
	Currency *string `json:"currency,omitempty"`

	// Minimum amount of fees
	Minimum *float64 `json:"minimum,omitempty"`

	// Fees percentage
	Percentage *float64 `json:"percentage,omitempty"`
}

Contains details about fees used for transfer. It is present only when action type is transfer.

type StatementRespStatementTransactionsElemFrom ¶

type StatementRespStatementTransactionsElemFrom struct {
	// Login id of the account from which money was transferred.
	Loginid *string `json:"loginid,omitempty"`
}

Contains details of account from which amount was transferred. It is present only when action type is transfer.

type StatementRespStatementTransactionsElemTo ¶

type StatementRespStatementTransactionsElemTo struct {
	// Login id of the account to which money was transferred.
	Loginid *string `json:"loginid,omitempty"`
}

Contains details of account to which amount was transferred. It is present only when action type is transfer.

type StatementStatement ¶

type StatementStatement int

func (*StatementStatement) UnmarshalJSON ¶

func (j *StatementStatement) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatesList ¶

type StatesList struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough StatesListPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Client's 2-letter country code (obtained from `residence_list` call)
	StatesList string `json:"states_list"`
}

For a given country, returns a list of States of that country. This is useful to populate the account opening form.

func (*StatesList) UnmarshalJSON ¶

func (j *StatesList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatesListPassthrough ¶

type StatesListPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type StatesListResp ¶

type StatesListResp struct {
	// Echo of the request made.
	EchoReq StatesListRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType StatesListRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// List of states.
	StatesList []StatesListRespStatesListElem `json:"states_list,omitempty"`
}

A message with States List

func (*StatesListResp) UnmarshalJSON ¶

func (j *StatesListResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatesListRespEchoReq ¶

type StatesListRespEchoReq map[string]interface{}

Echo of the request made.

type StatesListRespMsgType ¶

type StatesListRespMsgType string
const StatesListRespMsgTypeStatesList StatesListRespMsgType = "states_list"

func (*StatesListRespMsgType) UnmarshalJSON ¶

func (j *StatesListRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type StatesListRespStatesListElem ¶

type StatesListRespStatesListElem struct {
	// The state name.
	Text *string `json:"text,omitempty"`

	// The state code.
	Value *string `json:"value,omitempty"`
}

type StreamTypes ¶

type StreamTypes string
const StreamTypesBalance StreamTypes = "balance"
const StreamTypesCandles StreamTypes = "candles"
const StreamTypesCashierPayments StreamTypes = "cashier_payments"
const StreamTypesCryptoEstimations StreamTypes = "crypto_estimations"
const StreamTypesP2PAdvert StreamTypes = "p2p_advert"
const StreamTypesP2PAdvertiser StreamTypes = "p2p_advertiser"
const StreamTypesP2POrder StreamTypes = "p2p_order"
const StreamTypesP2PSettings StreamTypes = "p2p_settings"
const StreamTypesProposal StreamTypes = "proposal"
const StreamTypesProposalOpenContract StreamTypes = "proposal_open_contract"
const StreamTypesTicks StreamTypes = "ticks"
const StreamTypesTradingPlatformAssetListing StreamTypes = "trading_platform_asset_listing"
const StreamTypesTransaction StreamTypes = "transaction"
const StreamTypesWebsiteStatus StreamTypes = "website_status"

func (*StreamTypes) UnmarshalJSON ¶

func (j *StreamTypes) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Ticks ¶

type Ticks struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TicksPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates whenever a new tick is received.
	Subscribe *TicksSubscribe `json:"subscribe,omitempty"`

	// The short symbol name or array of symbols (obtained from `active_symbols`
	// call).
	Ticks interface{} `json:"ticks"`
}

Initiate a continuous stream of spot price updates for a given symbol.

func (*Ticks) UnmarshalJSON ¶

func (j *Ticks) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatch ¶ added in v0.5.8

type TicksBatch struct {
	// The short market name.
	Market TicksBatchMarket `json:"market"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TicksBatchPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] If set to 1, will send updates in batches by market.
	Subscribe *TicksBatchSubscribe `json:"subscribe,omitempty"`

	// Must be `1`
	TicksBatch TicksBatchTicksBatch `json:"ticks_batch"`
}

Initiate a continuous stream of spot price updates for a group symbols.

func (*TicksBatch) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatch) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchMarket ¶ added in v0.5.8

type TicksBatchMarket string
const TicksBatchMarketCommodities TicksBatchMarket = "commodities"
const TicksBatchMarketCryptocurrency TicksBatchMarket = "cryptocurrency"
const TicksBatchMarketForex TicksBatchMarket = "forex"
const TicksBatchMarketIndices TicksBatchMarket = "indices"
const TicksBatchMarketStocks TicksBatchMarket = "stocks"
const TicksBatchMarketSyntheticIndex TicksBatchMarket = "synthetic_index"

func (*TicksBatchMarket) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchMarket) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchPassthrough ¶ added in v0.5.8

type TicksBatchPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TicksBatchResp ¶ added in v0.5.8

type TicksBatchResp struct {
	// Echo of the request made.
	EchoReq TicksBatchRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TicksBatchRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *TicksBatchRespSubscription `json:"subscription,omitempty"`

	// Tick by tick list of streamed data for a group of symbols
	TicksBatch []TicksBatchRespTicksBatchElem `json:"ticks_batch,omitempty"`
}

Latest spot price for a group symbols. Continuous responses with a frequency of up to one second.

func (*TicksBatchResp) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchRespEchoReq ¶ added in v0.5.8

type TicksBatchRespEchoReq map[string]interface{}

Echo of the request made.

type TicksBatchRespMsgType ¶ added in v0.5.8

type TicksBatchRespMsgType string
const TicksBatchRespMsgTypeTicksBatch TicksBatchRespMsgType = "ticks_batch"

func (*TicksBatchRespMsgType) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchRespSubscription ¶ added in v0.5.8

type TicksBatchRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*TicksBatchRespSubscription) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchRespTicksBatchElem ¶ added in v0.5.8

type TicksBatchRespTicksBatchElem struct {
	// Market ask at the epoch
	Ask string `json:"ask"`

	// Market bid at the epoch
	Bid string `json:"bid"`

	// Daily percentage change
	Change string `json:"change"`

	// Epoch time of the tick
	Epoch int `json:"epoch"`

	// Market value at the epoch
	Quote string `json:"quote"`

	// Symbol
	Symbol string `json:"symbol"`
}

func (*TicksBatchRespTicksBatchElem) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchRespTicksBatchElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchSubscribe ¶ added in v0.5.8

type TicksBatchSubscribe int

func (*TicksBatchSubscribe) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksBatchTicksBatch ¶ added in v0.5.8

type TicksBatchTicksBatch int

func (*TicksBatchTicksBatch) UnmarshalJSON ¶ added in v0.5.8

func (j *TicksBatchTicksBatch) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistory ¶

type TicksHistory struct {
	// [Optional] 1 - if the market is closed at the end time, or license limit is
	// before end time, adjust interval backwards to compensate.
	AdjustStartTime *TicksHistoryAdjustStartTime `json:"adjust_start_time,omitempty"`

	// [Optional] An upper limit on ticks to receive.
	Count int `json:"count,omitempty"`

	// Epoch value representing the latest boundary of the returned ticks. If `latest`
	// is specified, this will be the latest available timestamp.
	End string `json:"end"`

	// [Optional] Only applicable for style: `candles`. Candle time-dimension width
	// setting. (default: `60`).
	Granularity *TicksHistoryGranularity `json:"granularity,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TicksHistoryPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] Epoch value representing the earliest boundary of the returned
	// ticks.
	// - For `"style": "ticks"`: this will default to 1 day ago.
	// - For `"style": "candles"`: it will default to 1 day ago if count or
	// granularity is undefined.
	Start *int `json:"start,omitempty"`

	// [Optional] The tick-output style.
	Style TicksHistoryStyle `json:"style,omitempty"`

	// [Optional] 1 - to send updates whenever a new tick is received.
	Subscribe *TicksHistorySubscribe `json:"subscribe,omitempty"`

	// Short symbol name (obtained from the `active_symbols` call).
	TicksHistory string `json:"ticks_history"`
}

Get historic tick data for a given symbol.

func (*TicksHistory) UnmarshalJSON ¶

func (j *TicksHistory) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryAdjustStartTime ¶

type TicksHistoryAdjustStartTime int

func (*TicksHistoryAdjustStartTime) UnmarshalJSON ¶

func (j *TicksHistoryAdjustStartTime) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryGranularity ¶

type TicksHistoryGranularity int

func (*TicksHistoryGranularity) UnmarshalJSON ¶

func (j *TicksHistoryGranularity) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryPassthrough ¶

type TicksHistoryPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TicksHistoryResp ¶

type TicksHistoryResp struct {
	// Array of OHLC (open/high/low/close) price values for the given time (only for
	// style=`candles`)
	Candles []TicksHistoryRespCandlesElem `json:"candles,omitempty"`

	// Echo of the request made.
	EchoReq TicksHistoryRespEchoReq `json:"echo_req"`

	// Historic tick data for a given symbol. Note: this will always return the latest
	// possible set of ticks with accordance to the parameters specified.
	History *TicksHistoryRespHistory `json:"history,omitempty"`

	// Type of the response according to the `style` sent in request. Would be
	// `history` or `candles` for the first response, and `tick` or `ohlc` for the
	// rest when subscribed.
	MsgType TicksHistoryRespMsgType `json:"msg_type"`

	// Historic tick data for a given symbol. Note: this will always return the latest
	// possible set of ticks with accordance to the parameters specified.
	Ohlc *TicksHistoryRespOhlc `json:"ohlc,omitempty"`

	// Indicates the number of decimal points that the returned amounts must be
	// displayed with
	PipSize *float64 `json:"pip_size,omitempty"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *TicksHistoryRespSubscription `json:"subscription,omitempty"`
}

Historic tick data for a single symbol

func (*TicksHistoryResp) UnmarshalJSON ¶

func (j *TicksHistoryResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryRespCandlesElem ¶

type TicksHistoryRespCandlesElem struct {
	// It is the close price value for the given time
	Close *float64 `json:"close,omitempty"`

	// It is an epoch value
	Epoch *int `json:"epoch,omitempty"`

	// It is the high price value for the given time
	High *float64 `json:"high,omitempty"`

	// It is the low price value for the given time
	Low *float64 `json:"low,omitempty"`

	// It is the open price value for the given time
	Open *float64 `json:"open,omitempty"`
}

type TicksHistoryRespEchoReq ¶

type TicksHistoryRespEchoReq map[string]interface{}

Echo of the request made.

type TicksHistoryRespHistory ¶

type TicksHistoryRespHistory struct {
	// An array containing list of tick values for the corresponding epoch values in
	// `times` array.
	Prices []float64 `json:"prices,omitempty"`

	// An array containing list of epoch values for the corresponding tick values in
	// `prices` array.
	Times []int `json:"times,omitempty"`
}

Historic tick data for a given symbol. Note: this will always return the latest possible set of ticks with accordance to the parameters specified.

type TicksHistoryRespMsgType ¶

type TicksHistoryRespMsgType string
const TicksHistoryRespMsgTypeCandles TicksHistoryRespMsgType = "candles"
const TicksHistoryRespMsgTypeHistory TicksHistoryRespMsgType = "history"
const TicksHistoryRespMsgTypeOhlc TicksHistoryRespMsgType = "ohlc"
const TicksHistoryRespMsgTypeTick TicksHistoryRespMsgType = "tick"

func (*TicksHistoryRespMsgType) UnmarshalJSON ¶

func (j *TicksHistoryRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryRespOhlc ¶

type TicksHistoryRespOhlc struct {
	// It is the close price value for the given time
	Close *string `json:"close,omitempty"`

	// It is an epoch value
	Epoch *int `json:"epoch,omitempty"`

	// Granularity
	Granularity *int `json:"granularity,omitempty"`

	// It is the high price value for the given time
	High *string `json:"high,omitempty"`

	// Subscription unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id *string `json:"id,omitempty"`

	// It is the low price value for the given time
	Low *string `json:"low,omitempty"`

	// It is the open price value for the given time
	Open *string `json:"open,omitempty"`

	// It is an epoch of open time
	OpenTime *int `json:"open_time,omitempty"`

	// PIP size
	PipSize *int `json:"pip_size,omitempty"`

	// Symbol name
	Symbol *string `json:"symbol,omitempty"`
}

Historic tick data for a given symbol. Note: this will always return the latest possible set of ticks with accordance to the parameters specified.

type TicksHistoryRespSubscription ¶

type TicksHistoryRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*TicksHistoryRespSubscription) UnmarshalJSON ¶

func (j *TicksHistoryRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistoryStyle ¶

type TicksHistoryStyle string
const TicksHistoryStyleCandles TicksHistoryStyle = "candles"
const TicksHistoryStyleTicks TicksHistoryStyle = "ticks"

func (*TicksHistoryStyle) UnmarshalJSON ¶

func (j *TicksHistoryStyle) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksHistorySubscribe ¶

type TicksHistorySubscribe int

func (*TicksHistorySubscribe) UnmarshalJSON ¶

func (j *TicksHistorySubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksPassthrough ¶

type TicksPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TicksResp ¶

type TicksResp struct {
	// Echo of the request made.
	EchoReq TicksRespEchoReq `json:"echo_req"`

	// Type of the response.
	MsgType TicksRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *TicksRespSubscription `json:"subscription,omitempty"`

	// Tick by tick list of streamed data
	Tick *TicksRespTick `json:"tick,omitempty"`
}

Latest spot price for a given symbol. Continuous responses with a frequency of up to one second.

func (*TicksResp) UnmarshalJSON ¶

func (j *TicksResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksRespEchoReq ¶

type TicksRespEchoReq map[string]interface{}

Echo of the request made.

type TicksRespMsgType ¶

type TicksRespMsgType string
const TicksRespMsgTypeTick TicksRespMsgType = "tick"

func (*TicksRespMsgType) UnmarshalJSON ¶

func (j *TicksRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksRespSubscription ¶

type TicksRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*TicksRespSubscription) UnmarshalJSON ¶

func (j *TicksRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksRespTick ¶

type TicksRespTick struct {
	// Market ask at the epoch
	Ask *float64 `json:"ask,omitempty"`

	// Market bid at the epoch
	Bid *float64 `json:"bid,omitempty"`

	// Epoch time of the tick
	Epoch *int `json:"epoch,omitempty"`

	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id *string `json:"id,omitempty"`

	// Indicates the number of decimal points that the returned amounts must be
	// displayed with
	PipSize float64 `json:"pip_size"`

	// Market value at the epoch
	Quote *float64 `json:"quote,omitempty"`

	// Symbol
	Symbol *string `json:"symbol,omitempty"`
}

Tick by tick list of streamed data

func (*TicksRespTick) UnmarshalJSON ¶

func (j *TicksRespTick) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TicksSubscribe ¶

type TicksSubscribe int

func (*TicksSubscribe) UnmarshalJSON ¶

func (j *TicksSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Time ¶

type Time struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TimePassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	Time TimeTime `json:"time"`
}

Request back-end server epoch time.

func (*Time) UnmarshalJSON ¶

func (j *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TimePassthrough ¶

type TimePassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TimeResp ¶

type TimeResp struct {
	// Echo of the request made.
	EchoReq TimeRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TimeRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Epoch of server time.
	Time *int `json:"time,omitempty"`
}

The result of server time request.

func (*TimeResp) UnmarshalJSON ¶

func (j *TimeResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TimeRespEchoReq ¶

type TimeRespEchoReq map[string]interface{}

Echo of the request made.

type TimeRespMsgType ¶

type TimeRespMsgType string
const TimeRespMsgTypeTime TimeRespMsgType = "time"

func (*TimeRespMsgType) UnmarshalJSON ¶

func (j *TimeRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TimeTime ¶

type TimeTime int

func (*TimeTime) UnmarshalJSON ¶

func (j *TimeTime) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TinValidations ¶ added in v0.4.27

type TinValidations struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TinValidationsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// The tax residence selected by the client.
	TaxResidence string `json:"tax_residence"`

	// Must be `1`
	TinValidations TinValidationsTinValidations `json:"tin_validations"`
}

Get the validations for Tax Identification Numbers (TIN)

func (*TinValidations) UnmarshalJSON ¶ added in v0.4.27

func (j *TinValidations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TinValidationsPassthrough ¶ added in v0.4.27

type TinValidationsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TinValidationsResp ¶ added in v0.4.27

type TinValidationsResp struct {
	// Echo of the request made.
	EchoReq TinValidationsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TinValidationsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Validations for Tax Identification Numbers (TIN)
	TinValidations *TinValidationsRespTinValidations `json:"tin_validations,omitempty"`
}

A message with validations for Tax Identification Numbers (TIN)

func (*TinValidationsResp) UnmarshalJSON ¶ added in v0.4.27

func (j *TinValidationsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TinValidationsRespEchoReq ¶ added in v0.4.27

type TinValidationsRespEchoReq map[string]interface{}

Echo of the request made.

type TinValidationsRespMsgType ¶ added in v0.4.27

type TinValidationsRespMsgType string
const TinValidationsRespMsgTypeTinValidations TinValidationsRespMsgType = "tin_validations"

func (*TinValidationsRespMsgType) UnmarshalJSON ¶ added in v0.4.27

func (j *TinValidationsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TinValidationsRespTinValidations ¶ added in v0.4.27

type TinValidationsRespTinValidations struct {
	// Invalid regex patterns for tin validation
	InvalidPatterns []string `json:"invalid_patterns,omitempty"`

	// Whether the TIN is mandatory for the selected country
	IsTinMandatory *TinValidationsRespTinValidationsIsTinMandatory `json:"is_tin_mandatory,omitempty"`

	// List of employment statuses that bypass TIN requirements for the selected
	// country
	TinEmploymentStatusBypass []string `json:"tin_employment_status_bypass,omitempty"`

	// Country tax identifier formats.
	TinFormat []string `json:"tin_format,omitempty"`

	// Human-readable description of the TIN format for the selected country
	TinFormatDescription *string `json:"tin_format_description,omitempty"`
}

Validations for Tax Identification Numbers (TIN)

type TinValidationsRespTinValidationsIsTinMandatory ¶ added in v0.4.27

type TinValidationsRespTinValidationsIsTinMandatory int

func (*TinValidationsRespTinValidationsIsTinMandatory) UnmarshalJSON ¶ added in v0.4.27

UnmarshalJSON implements json.Unmarshaler.

type TinValidationsTinValidations ¶ added in v0.4.27

type TinValidationsTinValidations int

func (*TinValidationsTinValidations) UnmarshalJSON ¶ added in v0.4.27

func (j *TinValidationsTinValidations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TncApproval ¶

type TncApproval struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TncApprovalPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TncApproval TncApprovalTncApproval `json:"tnc_approval"`
}

To approve the latest version of terms and conditions.

func (*TncApproval) UnmarshalJSON ¶

func (j *TncApproval) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TncApprovalPassthrough ¶

type TncApprovalPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TncApprovalResp ¶

type TncApprovalResp struct {
	// Echo of the request made.
	EchoReq TncApprovalRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TncApprovalRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Set terms and conditions 1: success
	TncApproval *TncApprovalRespTncApproval `json:"tnc_approval,omitempty"`
}

The result of T&C approval request.

func (*TncApprovalResp) UnmarshalJSON ¶

func (j *TncApprovalResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TncApprovalRespEchoReq ¶

type TncApprovalRespEchoReq map[string]interface{}

Echo of the request made.

type TncApprovalRespMsgType ¶

type TncApprovalRespMsgType string
const TncApprovalRespMsgTypeTncApproval TncApprovalRespMsgType = "tnc_approval"

func (*TncApprovalRespMsgType) UnmarshalJSON ¶

func (j *TncApprovalRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TncApprovalRespTncApproval ¶

type TncApprovalRespTncApproval int

func (*TncApprovalRespTncApproval) UnmarshalJSON ¶

func (j *TncApprovalRespTncApproval) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TncApprovalTncApproval ¶

type TncApprovalTncApproval float64

func (*TncApprovalTncApproval) UnmarshalJSON ¶

func (j *TncApprovalTncApproval) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TopupVirtual ¶

type TopupVirtual struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TopupVirtualPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TopupVirtual TopupVirtualTopupVirtual `json:"topup_virtual"`
}

When a virtual-money's account balance becomes low, it can be topped up using this call.

func (*TopupVirtual) UnmarshalJSON ¶

func (j *TopupVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TopupVirtualPassthrough ¶

type TopupVirtualPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TopupVirtualResp ¶

type TopupVirtualResp struct {
	// Echo of the request made.
	EchoReq TopupVirtualRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TopupVirtualRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// The information regarding a successful top up for a virtual money account
	TopupVirtual *TopupVirtualRespTopupVirtual `json:"topup_virtual,omitempty"`
}

The result of virtual money top up

func (*TopupVirtualResp) UnmarshalJSON ¶

func (j *TopupVirtualResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TopupVirtualRespEchoReq ¶

type TopupVirtualRespEchoReq map[string]interface{}

Echo of the request made.

type TopupVirtualRespMsgType ¶

type TopupVirtualRespMsgType string
const TopupVirtualRespMsgTypeTopupVirtual TopupVirtualRespMsgType = "topup_virtual"

func (*TopupVirtualRespMsgType) UnmarshalJSON ¶

func (j *TopupVirtualRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TopupVirtualRespTopupVirtual ¶

type TopupVirtualRespTopupVirtual struct {
	// Top up amount
	Amount *float64 `json:"amount,omitempty"`

	// Top up currency string
	Currency *string `json:"currency,omitempty"`
}

The information regarding a successful top up for a virtual money account

type TopupVirtualTopupVirtual ¶

type TopupVirtualTopupVirtual int

func (*TopupVirtualTopupVirtual) UnmarshalJSON ¶

func (j *TopupVirtualTopupVirtual) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurations ¶

type TradingDurations struct {
	// Deprecated - Replaced by landing_company_short.
	LandingCompany *TradingDurationsLandingCompany `json:"landing_company,omitempty"`

	// [Optional] If specified, will return only the underlyings for the specified
	// landing company.
	LandingCompanyShort *TradingDurationsLandingCompanyShort `json:"landing_company_short,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingDurationsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TradingDurations TradingDurationsTradingDurations `json:"trading_durations"`
}

Retrieve a list of all available underlyings and the corresponding contract types and trading duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.

func (*TradingDurations) UnmarshalJSON ¶

func (j *TradingDurations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurationsLandingCompany ¶

type TradingDurationsLandingCompany string
const TradingDurationsLandingCompanyIom TradingDurationsLandingCompany = "iom"
const TradingDurationsLandingCompanyMalta TradingDurationsLandingCompany = "malta"
const TradingDurationsLandingCompanyMaltainvest TradingDurationsLandingCompany = "maltainvest"
const TradingDurationsLandingCompanySvg TradingDurationsLandingCompany = "svg"
const TradingDurationsLandingCompanyVanuatu TradingDurationsLandingCompany = "vanuatu"
const TradingDurationsLandingCompanyVirtual TradingDurationsLandingCompany = "virtual"

func (*TradingDurationsLandingCompany) UnmarshalJSON ¶

func (j *TradingDurationsLandingCompany) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurationsLandingCompanyShort ¶

type TradingDurationsLandingCompanyShort string
const TradingDurationsLandingCompanyShortIom TradingDurationsLandingCompanyShort = "iom"
const TradingDurationsLandingCompanyShortMalta TradingDurationsLandingCompanyShort = "malta"
const TradingDurationsLandingCompanyShortMaltainvest TradingDurationsLandingCompanyShort = "maltainvest"
const TradingDurationsLandingCompanyShortSvg TradingDurationsLandingCompanyShort = "svg"
const TradingDurationsLandingCompanyShortVanuatu TradingDurationsLandingCompanyShort = "vanuatu"
const TradingDurationsLandingCompanyShortVirtual TradingDurationsLandingCompanyShort = "virtual"

func (*TradingDurationsLandingCompanyShort) UnmarshalJSON ¶

func (j *TradingDurationsLandingCompanyShort) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurationsPassthrough ¶

type TradingDurationsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingDurationsResp ¶

type TradingDurationsResp struct {
	// Echo of the request made.
	EchoReq TradingDurationsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingDurationsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// List of underlyings by their display name and symbol followed by their
	// available contract types and trading duration boundaries.
	TradingDurations []TradingDurationsRespTradingDurationsElem `json:"trading_durations,omitempty"`
}

A message with trading duration information for symbol and contract combinations.

func (*TradingDurationsResp) UnmarshalJSON ¶

func (j *TradingDurationsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurationsRespEchoReq ¶

type TradingDurationsRespEchoReq map[string]interface{}

Echo of the request made.

type TradingDurationsRespMsgType ¶

type TradingDurationsRespMsgType string
const TradingDurationsRespMsgTypeTradingDurations TradingDurationsRespMsgType = "trading_durations"

func (*TradingDurationsRespMsgType) UnmarshalJSON ¶

func (j *TradingDurationsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingDurationsRespTradingDurationsElem ¶

type TradingDurationsRespTradingDurationsElem struct {
	// Available contract types and trading duration boundaries
	Data []TradingDurationsRespTradingDurationsElemDataElem `json:"data,omitempty"`

	// The market in which the underlyings listed in `symbol` located.
	Market *TradingDurationsRespTradingDurationsElemMarket `json:"market,omitempty"`

	// The submarket in which the underlyings listed in `symbol` located.
	Submarket *TradingDurationsRespTradingDurationsElemSubmarket `json:"submarket,omitempty"`
}

type TradingDurationsRespTradingDurationsElemDataElem ¶

type TradingDurationsRespTradingDurationsElemDataElem struct {
	// The market in which the underlyings listed in `symbol` located.
	Market *TradingDurationsRespTradingDurationsElemDataElemMarket `json:"market,omitempty"`

	// The submarket in which the underlyings listed in `symbol` located.
	Submarket *TradingDurationsRespTradingDurationsElemDataElemSubmarket `json:"submarket,omitempty"`

	// List of underlying symbols.
	Symbol []TradingDurationsRespTradingDurationsElemDataElemSymbolElem `json:"symbol,omitempty"`

	// List of trade durations available for symbols and contract combinations.
	TradeDurations []TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElem `json:"trade_durations,omitempty"`
}

type TradingDurationsRespTradingDurationsElemDataElemMarket ¶

type TradingDurationsRespTradingDurationsElemDataElemMarket struct {
	// Translated market name.
	DisplayName *string `json:"display_name,omitempty"`

	// Market name.
	Name *string `json:"name,omitempty"`
}

The market in which the underlyings listed in `symbol` located.

type TradingDurationsRespTradingDurationsElemDataElemSubmarket ¶

type TradingDurationsRespTradingDurationsElemDataElemSubmarket struct {
	// Translated submarket name.
	DisplayName *string `json:"display_name,omitempty"`

	// Submarket name.
	Name *string `json:"name,omitempty"`
}

The submarket in which the underlyings listed in `symbol` located.

type TradingDurationsRespTradingDurationsElemDataElemSymbolElem ¶

type TradingDurationsRespTradingDurationsElemDataElemSymbolElem struct {
	// Translated symbol name.
	DisplayName *string `json:"display_name,omitempty"`

	// Symbol name.
	Name *string `json:"name,omitempty"`
}

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElem ¶

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElem struct {
	// List of trade durations available for the symbols.
	Durations []TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemDurationsElem `json:"durations,omitempty"`

	// List of trade types available for the symbols.
	TradeType *TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemTradeType `json:"trade_type,omitempty"`
}

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemDurationsElem ¶

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemDurationsElem struct {
	// Translated duration type name.
	DisplayName *string `json:"display_name,omitempty"`

	// Maximum allowed duration for this type.
	Max *int `json:"max,omitempty"`

	// Minimum allowed duration for this type.
	Min *int `json:"min,omitempty"`

	// Duration type name.
	Name *string `json:"name,omitempty"`
}

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemTradeType ¶

type TradingDurationsRespTradingDurationsElemDataElemTradeDurationsElemTradeType struct {
	// Translated trade type name.
	DisplayName *string `json:"display_name,omitempty"`

	// Trade type name.
	Name *string `json:"name,omitempty"`
}

List of trade types available for the symbols.

type TradingDurationsRespTradingDurationsElemMarket ¶

type TradingDurationsRespTradingDurationsElemMarket struct {
	// Translated market name.
	DisplayName *string `json:"display_name,omitempty"`

	// Market name.
	Name *string `json:"name,omitempty"`
}

The market in which the underlyings listed in `symbol` located.

type TradingDurationsRespTradingDurationsElemSubmarket ¶

type TradingDurationsRespTradingDurationsElemSubmarket struct {
	// Translated submarket name.
	DisplayName *string `json:"display_name,omitempty"`

	// Submarket name.
	Name *string `json:"name,omitempty"`
}

The submarket in which the underlyings listed in `symbol` located.

type TradingDurationsTradingDurations ¶

type TradingDurationsTradingDurations int

func (*TradingDurationsTradingDurations) UnmarshalJSON ¶

func (j *TradingDurationsTradingDurations) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordReset ¶

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.
	Loginid *string `json:"loginid,omitempty"`

	// New password of the account. For validation (Accepts any printable ASCII
	// character. Must be within 8-16 characters, include numbers, lowercase,
	// uppercase letters and special characters. Must not be the same as the user's
	// email address).
	NewPassword string `json:"new_password"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingPlatformInvestorPasswordResetPassthrough `json:"passthrough,omitempty"`

	// Name of trading platform.
	Platform TradingPlatformInvestorPasswordResetPlatform `json:"platform"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TradingPlatformInvestorPasswordReset TradingPlatformInvestorPasswordResetTradingPlatformInvestorPasswordReset `json:"trading_platform_investor_password_reset"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first)
	VerificationCode string `json:"verification_code"`
}

Reset the investor password of a Trading Platform Account

func (*TradingPlatformInvestorPasswordReset) UnmarshalJSON ¶

func (j *TradingPlatformInvestorPasswordReset) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordResetPassthrough ¶

type TradingPlatformInvestorPasswordResetPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingPlatformInvestorPasswordResetPlatform ¶

type TradingPlatformInvestorPasswordResetPlatform string
const TradingPlatformInvestorPasswordResetPlatformMt5 TradingPlatformInvestorPasswordResetPlatform = "mt5"

func (*TradingPlatformInvestorPasswordResetPlatform) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordResetResp ¶

type TradingPlatformInvestorPasswordResetResp struct {
	// Echo of the request made.
	EchoReq TradingPlatformInvestorPasswordResetRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingPlatformInvestorPasswordResetRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// If set to 1, the investor password has been reset.
	TradingPlatformPasswordReset *TradingPlatformInvestorPasswordResetRespTradingPlatformPasswordReset `json:"trading_platform_password_reset,omitempty"`
}

The result of the Trading Platform investor password reset.

func (*TradingPlatformInvestorPasswordResetResp) UnmarshalJSON ¶

func (j *TradingPlatformInvestorPasswordResetResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordResetRespEchoReq ¶

type TradingPlatformInvestorPasswordResetRespEchoReq map[string]interface{}

Echo of the request made.

type TradingPlatformInvestorPasswordResetRespMsgType ¶

type TradingPlatformInvestorPasswordResetRespMsgType string
const TradingPlatformInvestorPasswordResetRespMsgTypeTradingPlatformInvestorPasswordReset TradingPlatformInvestorPasswordResetRespMsgType = "trading_platform_investor_password_reset"

func (*TradingPlatformInvestorPasswordResetRespMsgType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordResetRespTradingPlatformPasswordReset ¶

type TradingPlatformInvestorPasswordResetRespTradingPlatformPasswordReset int

func (*TradingPlatformInvestorPasswordResetRespTradingPlatformPasswordReset) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformInvestorPasswordResetTradingPlatformInvestorPasswordReset ¶

type TradingPlatformInvestorPasswordResetTradingPlatformInvestorPasswordReset int

func (*TradingPlatformInvestorPasswordResetTradingPlatformInvestorPasswordReset) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordReset ¶

type TradingPlatformPasswordReset struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// New password of the account. For validation (Accepts any printable ASCII
	// character. DerivX: Must be within 8-25 characters, include numbers, lowercase,
	// uppercase letters. Must not be the same as the user's email address). Accepts
	// any printable ASCII character. MT5: Must be within 8-16 characters, include
	// numbers, lowercase, uppercase letters and special characters. Must not be the
	// same as the user's email address.
	NewPassword string `json:"new_password"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingPlatformPasswordResetPassthrough `json:"passthrough,omitempty"`

	// Name of trading platform.
	Platform TradingPlatformPasswordResetPlatform `json:"platform"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TradingPlatformPasswordReset TradingPlatformPasswordResetTradingPlatformPasswordReset `json:"trading_platform_password_reset"`

	// Email verification code (received from a `verify_email` call, which must be
	// done first)
	VerificationCode string `json:"verification_code"`
}

Reset the password of a Trading Platform Account

func (*TradingPlatformPasswordReset) UnmarshalJSON ¶

func (j *TradingPlatformPasswordReset) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordResetPassthrough ¶

type TradingPlatformPasswordResetPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingPlatformPasswordResetPlatform ¶

type TradingPlatformPasswordResetPlatform string
const TradingPlatformPasswordResetPlatformDxtrade TradingPlatformPasswordResetPlatform = "dxtrade"
const TradingPlatformPasswordResetPlatformMt5 TradingPlatformPasswordResetPlatform = "mt5"

func (*TradingPlatformPasswordResetPlatform) UnmarshalJSON ¶

func (j *TradingPlatformPasswordResetPlatform) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordResetResp ¶

type TradingPlatformPasswordResetResp struct {
	// Echo of the request made.
	EchoReq TradingPlatformPasswordResetRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingPlatformPasswordResetRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// If set to 1, the password has been reset.
	TradingPlatformPasswordReset *TradingPlatformPasswordResetRespTradingPlatformPasswordReset `json:"trading_platform_password_reset,omitempty"`
}

The result of the Trading Platform password reset.

func (*TradingPlatformPasswordResetResp) UnmarshalJSON ¶

func (j *TradingPlatformPasswordResetResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordResetRespEchoReq ¶

type TradingPlatformPasswordResetRespEchoReq map[string]interface{}

Echo of the request made.

type TradingPlatformPasswordResetRespMsgType ¶

type TradingPlatformPasswordResetRespMsgType string
const TradingPlatformPasswordResetRespMsgTypeTradingPlatformPasswordReset TradingPlatformPasswordResetRespMsgType = "trading_platform_password_reset"

func (*TradingPlatformPasswordResetRespMsgType) UnmarshalJSON ¶

func (j *TradingPlatformPasswordResetRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordResetRespTradingPlatformPasswordReset ¶

type TradingPlatformPasswordResetRespTradingPlatformPasswordReset int

func (*TradingPlatformPasswordResetRespTradingPlatformPasswordReset) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformPasswordResetTradingPlatformPasswordReset ¶

type TradingPlatformPasswordResetTradingPlatformPasswordReset int

func (*TradingPlatformPasswordResetTradingPlatformPasswordReset) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformStatus ¶ added in v0.4.25

type TradingPlatformStatus struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingPlatformStatusPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TradingPlatformStatus TradingPlatformStatusTradingPlatformStatus `json:"trading_platform_status"`
}

Request trading platform status

func (*TradingPlatformStatus) UnmarshalJSON ¶ added in v0.4.25

func (j *TradingPlatformStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformStatusPassthrough ¶ added in v0.4.25

type TradingPlatformStatusPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingPlatformStatusResp ¶ added in v0.4.25

type TradingPlatformStatusResp struct {
	// Echo of the request made.
	EchoReq TradingPlatformStatusRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingPlatformStatusRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Availability status of the trading platforms
	TradingPlatformStatus []interface{} `json:"trading_platform_status"`
}

Provides current suspension status of trading platforms

func (*TradingPlatformStatusResp) UnmarshalJSON ¶ added in v0.4.25

func (j *TradingPlatformStatusResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformStatusRespEchoReq ¶ added in v0.4.25

type TradingPlatformStatusRespEchoReq map[string]interface{}

Echo of the request made.

type TradingPlatformStatusRespMsgType ¶ added in v0.4.25

type TradingPlatformStatusRespMsgType string
const TradingPlatformStatusRespMsgTypeTradingPlatformStatus TradingPlatformStatusRespMsgType = "trading_platform_status"

func (*TradingPlatformStatusRespMsgType) UnmarshalJSON ¶ added in v0.4.25

func (j *TradingPlatformStatusRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingPlatformStatusTradingPlatformStatus ¶ added in v0.4.25

type TradingPlatformStatusTradingPlatformStatus int

func (*TradingPlatformStatusTradingPlatformStatus) UnmarshalJSON ¶ added in v0.4.25

UnmarshalJSON implements json.Unmarshaler.

type TradingServers ¶

type TradingServers struct {
	// [Optional] Trading account type.
	AccountType *TradingServersAccountType `json:"account_type,omitempty"`

	// [Optional] Pass the environment (installation) instance. Currently, there are
	// 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.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Market type.
	MarketType TradingServersMarketType `json:"market_type,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingServersPassthrough `json:"passthrough,omitempty"`

	// [Optional] Pass the trading platform name, default to mt5
	Platform TradingServersPlatform `json:"platform,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	TradingServers TradingServersTradingServers `json:"trading_servers"`
}

Get the list of servers for a trading platform.

func (*TradingServers) UnmarshalJSON ¶

func (j *TradingServers) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersAccountType ¶

type TradingServersAccountType string
const TradingServersAccountTypeDemo TradingServersAccountType = "demo"
const TradingServersAccountTypeReal TradingServersAccountType = "real"

func (*TradingServersAccountType) UnmarshalJSON ¶

func (j *TradingServersAccountType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersEnvironment ¶

type TradingServersEnvironment string
const TradingServersEnvironmentAll TradingServersEnvironment = "all"
const TradingServersEnvironmentDerivDemo TradingServersEnvironment = "Deriv-Demo"
const TradingServersEnvironmentDerivServer TradingServersEnvironment = "Deriv-Server"
const TradingServersEnvironmentDerivServer02 TradingServersEnvironment = "Deriv-Server-02"
const TradingServersEnvironmentDerivServer03 TradingServersEnvironment = "Deriv-Server-03"

func (*TradingServersEnvironment) UnmarshalJSON ¶

func (j *TradingServersEnvironment) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersMarketType ¶

type TradingServersMarketType string
const TradingServersMarketTypeAll TradingServersMarketType = "all"
const TradingServersMarketTypeFinancial TradingServersMarketType = "financial"
const TradingServersMarketTypeSynthetic TradingServersMarketType = "synthetic"

func (*TradingServersMarketType) UnmarshalJSON ¶

func (j *TradingServersMarketType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersPassthrough ¶

type TradingServersPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingServersPlatform ¶

type TradingServersPlatform string
const TradingServersPlatformDxtrade TradingServersPlatform = "dxtrade"
const TradingServersPlatformMt5 TradingServersPlatform = "mt5"

func (*TradingServersPlatform) UnmarshalJSON ¶

func (j *TradingServersPlatform) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersResp ¶

type TradingServersResp struct {
	// Echo of the request made.
	EchoReq TradingServersRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingServersRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Array containing platform server objects.
	TradingServers []TradingServersRespTradingServersElem `json:"trading_servers,omitempty"`
}

Get list of servers for the platform provided.

func (*TradingServersResp) UnmarshalJSON ¶

func (j *TradingServersResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespEchoReq ¶

type TradingServersRespEchoReq map[string]interface{}

Echo of the request made.

type TradingServersRespMsgType ¶

type TradingServersRespMsgType string
const TradingServersRespMsgTypeTradingServers TradingServersRespMsgType = "trading_servers"

func (*TradingServersRespMsgType) UnmarshalJSON ¶

func (j *TradingServersRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespTradingServersElem ¶

type TradingServersRespTradingServersElem struct {
	// Supported trading account type.
	AccountType *TradingServersRespTradingServersElemAccountType `json:"account_type,omitempty"`

	// Flag to represent if this server is currently disabled or not
	Disabled *TradingServersRespTradingServersElemDisabled `json:"disabled,omitempty"`

	// Current environment (installation instance) where servers are deployed.
	// Currently, there are one demo and two real environments.
	Environment *TradingServersRespTradingServersElemEnvironment `json:"environment,omitempty"`

	// Object containing geolocation information of the server.
	Geolocation *TradingServersRespTradingServersElemGeolocation `json:"geolocation,omitempty"`

	// Server unique id.
	Id *TradingServersRespTradingServersElemId `json:"id,omitempty"`

	// Market type
	MarketType *string `json:"market_type,omitempty"`

	// Error message to client when server is disabled
	MessageToClient *string `json:"message_to_client,omitempty"`

	// Flag to represent if this is server is recommended based on client's country of
	// residence.
	Recommended *TradingServersRespTradingServersElemRecommended `json:"recommended,omitempty"`

	// Account type supported by the server.
	SupportedAccounts []string `json:"supported_accounts,omitempty"`
}

type TradingServersRespTradingServersElemAccountType ¶

type TradingServersRespTradingServersElemAccountType string
const TradingServersRespTradingServersElemAccountTypeDemo TradingServersRespTradingServersElemAccountType = "demo"
const TradingServersRespTradingServersElemAccountTypeReal TradingServersRespTradingServersElemAccountType = "real"

func (*TradingServersRespTradingServersElemAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespTradingServersElemDisabled ¶

type TradingServersRespTradingServersElemDisabled int

func (*TradingServersRespTradingServersElemDisabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespTradingServersElemEnvironment ¶

type TradingServersRespTradingServersElemEnvironment string
const TradingServersRespTradingServersElemEnvironmentDerivDemo TradingServersRespTradingServersElemEnvironment = "Deriv-Demo"
const TradingServersRespTradingServersElemEnvironmentDerivServer TradingServersRespTradingServersElemEnvironment = "Deriv-Server"
const TradingServersRespTradingServersElemEnvironmentDerivServer02 TradingServersRespTradingServersElemEnvironment = "Deriv-Server-02"
const TradingServersRespTradingServersElemEnvironmentDerivServer03 TradingServersRespTradingServersElemEnvironment = "Deriv-Server-03"

func (*TradingServersRespTradingServersElemEnvironment) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespTradingServersElemGeolocation ¶

type TradingServersRespTradingServersElemGeolocation struct {
	// Internal server grouping.
	Group *string `json:"group,omitempty"`

	// Geolocation country or place where server is located.
	Location *string `json:"location,omitempty"`

	// Geolocation region where server is located.
	Region *string `json:"region,omitempty"`

	// Sequence number of the server in that region.
	Sequence *int `json:"sequence,omitempty"`
}

Object containing geolocation information of the server.

type TradingServersRespTradingServersElemId ¶

type TradingServersRespTradingServersElemId string
const TradingServersRespTradingServersElemIdP01Ts01 TradingServersRespTradingServersElemId = "p01_ts01"
const TradingServersRespTradingServersElemIdP01Ts02 TradingServersRespTradingServersElemId = "p01_ts02"
const TradingServersRespTradingServersElemIdP01Ts03 TradingServersRespTradingServersElemId = "p01_ts03"
const TradingServersRespTradingServersElemIdP01Ts04 TradingServersRespTradingServersElemId = "p01_ts04"
const TradingServersRespTradingServersElemIdP02Ts02 TradingServersRespTradingServersElemId = "p02_ts02"
const TradingServersRespTradingServersElemIdP03Ts01 TradingServersRespTradingServersElemId = "p03_ts01"
const TradingServersRespTradingServersElemIdP03Ts02 TradingServersRespTradingServersElemId = "p03_ts02"

func (*TradingServersRespTradingServersElemId) UnmarshalJSON ¶

func (j *TradingServersRespTradingServersElemId) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingServersRespTradingServersElemRecommended ¶

type TradingServersRespTradingServersElemRecommended int

func (*TradingServersRespTradingServersElemRecommended) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingServersTradingServers ¶

type TradingServersTradingServers int

func (*TradingServersTradingServers) UnmarshalJSON ¶

func (j *TradingServersTradingServers) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimes ¶

type TradingTimes struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TradingTimesPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Date to receive market opening times for. (`yyyy-mm-dd` format. `today` can
	// also be specified).
	TradingTimes string `json:"trading_times"`
}

Receive a list of market opening times for a given date.

func (*TradingTimes) UnmarshalJSON ¶

func (j *TradingTimes) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesPassthrough ¶

type TradingTimesPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TradingTimesResp ¶

type TradingTimesResp struct {
	// Echo of the request made.
	EchoReq TradingTimesRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TradingTimesRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// The trading times structure is a hierarchy as follows: Market -> SubMarket ->
	// Underlyings
	TradingTimes *TradingTimesRespTradingTimes `json:"trading_times,omitempty"`
}

A message with Trading Times

func (*TradingTimesResp) UnmarshalJSON ¶

func (j *TradingTimesResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespEchoReq ¶

type TradingTimesRespEchoReq map[string]interface{}

Echo of the request made.

type TradingTimesRespMsgType ¶

type TradingTimesRespMsgType string
const TradingTimesRespMsgTypeTradingTimes TradingTimesRespMsgType = "trading_times"

func (*TradingTimesRespMsgType) UnmarshalJSON ¶

func (j *TradingTimesRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespTradingTimes ¶

type TradingTimesRespTradingTimes struct {
	// An array of markets
	Markets []TradingTimesRespTradingTimesMarketsElem `json:"markets"`
}

The trading times structure is a hierarchy as follows: Market -> SubMarket -> Underlyings

func (*TradingTimesRespTradingTimes) UnmarshalJSON ¶

func (j *TradingTimesRespTradingTimes) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespTradingTimesMarketsElem ¶

type TradingTimesRespTradingTimesMarketsElem struct {
	// Market name
	Name string `json:"name"`

	// An array of submarkets
	Submarkets []TradingTimesRespTradingTimesMarketsElemSubmarketsElem `json:"submarkets,omitempty"`
}

func (*TradingTimesRespTradingTimesMarketsElem) UnmarshalJSON ¶

func (j *TradingTimesRespTradingTimesMarketsElem) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespTradingTimesMarketsElemSubmarketsElem ¶

type TradingTimesRespTradingTimesMarketsElemSubmarketsElem struct {
	// Submarket name
	Name string `json:"name"`

	// Symbols array
	Symbols []TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElem `json:"symbols"`
}

func (*TradingTimesRespTradingTimesMarketsElemSubmarketsElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElem ¶

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElem struct {
	// Events
	Events []interface{} `json:"events,omitempty"`

	// Symbol name
	Name string `json:"name"`

	// Symbol shortcode
	Symbol string `json:"symbol"`

	// Open, close and settlement times
	Times TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTimes `json:"times,omitempty"`

	// Trading days
	TradingDays []TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem `json:"trading_days,omitempty"`
}

func (*TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTimes ¶

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTimes map[string]interface{}

Open, close and settlement times

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem ¶

type TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem string
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemFri TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Fri"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemMon TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Mon"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemSat TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Sat"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemSun TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Sun"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemThu TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Thu"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemTue TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Tue"
const TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElemWed TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem = "Wed"

func (*TradingTimesRespTradingTimesMarketsElemSubmarketsElemSymbolsElemTradingDaysElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type Transaction ¶

type Transaction struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TransactionPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// If set to 1, will send updates whenever there is an update to transactions. If
	// not to 1 then it will not return any records.
	Subscribe TransactionSubscribe `json:"subscribe"`

	// Must be `1`
	Transaction TransactionTransaction `json:"transaction"`
}

Subscribe to transaction notifications

func (*Transaction) UnmarshalJSON ¶

func (j *Transaction) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionPassthrough ¶

type TransactionPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TransactionResp ¶

type TransactionResp struct {
	// Echo of the request made.
	EchoReq TransactionRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TransactionRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *TransactionRespSubscription `json:"subscription,omitempty"`

	// Realtime stream of user transaction updates.
	Transaction *TransactionRespTransaction `json:"transaction,omitempty"`
}

Return transaction updates

func (*TransactionResp) UnmarshalJSON ¶

func (j *TransactionResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionRespEchoReq ¶

type TransactionRespEchoReq map[string]interface{}

Echo of the request made.

type TransactionRespMsgType ¶

type TransactionRespMsgType string
const TransactionRespMsgTypeTransaction TransactionRespMsgType = "transaction"

func (*TransactionRespMsgType) UnmarshalJSON ¶

func (j *TransactionRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionRespSubscription ¶

type TransactionRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*TransactionRespSubscription) UnmarshalJSON ¶

func (j *TransactionRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionRespTransaction ¶

type TransactionRespTransaction struct {
	// The transaction type.
	Action *TransactionRespTransactionAction `json:"action,omitempty"`

	// It is the amount of transaction performed.
	Amount *float64 `json:"amount,omitempty"`

	// Balance amount
	Balance *float64 `json:"balance,omitempty"`

	// Barrier of the contract. Only applicable to single barrier contracts. Could be
	// undefined if a contract does not have a barrier.
	Barrier interface{} `json:"barrier,omitempty"`

	// It is the contract ID.
	ContractId *int `json:"contract_id,omitempty"`

	// Transaction currency
	Currency *string `json:"currency,omitempty"`

	// Epoch value of the expiry time of the contract. Please note that in case of buy
	// transaction this is approximate value not exact one.
	DateExpiry *int `json:"date_expiry,omitempty"`

	// Display name of symbol
	DisplayName *string `json:"display_name,omitempty"`

	// The high barrier of a contract. Only applicable to double barrier contracts.
	HighBarrier interface{} `json:"high_barrier,omitempty"`

	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id *string `json:"id,omitempty"`

	// Description of contract purchased
	Longcode *string `json:"longcode,omitempty"`

	// The low barrier of a contract. Only applicable to double barrier contracts.
	LowBarrier *string `json:"low_barrier,omitempty"`

	// Time at which contract was purchased, present only for sell transaction
	PurchaseTime *int `json:"purchase_time,omitempty"`

	// The pip-sized target spot price where the contract will be closed automatically
	// at the loss specified by the user.
	StopLoss *string `json:"stop_loss,omitempty"`

	// The pip-sized target spot price where the contract will be closed automatically
	// when the value of the contract is close to zero. This is set by the us.
	StopOut *string `json:"stop_out,omitempty"`

	// Symbol code
	Symbol *string `json:"symbol,omitempty"`

	// The pip-sized target spot price where the contract will be closed automatically
	// at the profit specified by the user.
	TakeProfit *string `json:"take_profit,omitempty"`

	// It is the transaction ID. Every contract (buy or sell) or payment has a unique
	// ID.
	TransactionId *int `json:"transaction_id,omitempty"`

	// Time at which transaction was performed: for buy it is purchase time, for sell
	// it is sell time.
	TransactionTime *int `json:"transaction_time,omitempty"`
}

Realtime stream of user transaction updates.

type TransactionRespTransactionAction ¶

type TransactionRespTransactionAction string
const TransactionRespTransactionActionAdjustment TransactionRespTransactionAction = "adjustment"
const TransactionRespTransactionActionBuy TransactionRespTransactionAction = "buy"
const TransactionRespTransactionActionDeposit TransactionRespTransactionAction = "deposit"
const TransactionRespTransactionActionEscrow TransactionRespTransactionAction = "escrow"
const TransactionRespTransactionActionSell TransactionRespTransactionAction = "sell"
const TransactionRespTransactionActionTransfer TransactionRespTransactionAction = "transfer"
const TransactionRespTransactionActionVirtualCredit TransactionRespTransactionAction = "virtual_credit"
const TransactionRespTransactionActionWithdrawal TransactionRespTransactionAction = "withdrawal"

func (*TransactionRespTransactionAction) UnmarshalJSON ¶

func (j *TransactionRespTransactionAction) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionSubscribe ¶

type TransactionSubscribe int

func (*TransactionSubscribe) UnmarshalJSON ¶

func (j *TransactionSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransactionTransaction ¶

type TransactionTransaction int

func (*TransactionTransaction) UnmarshalJSON ¶

func (j *TransactionTransaction) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccounts ¶

type TransferBetweenAccounts struct {
	// [Optional] The loginid of the account to transfer funds from.
	AccountFrom *string `json:"account_from,omitempty"`

	// [Optional] The loginid of the account to transfer funds to.
	AccountTo *string `json:"account_to,omitempty"`

	// [Optional] To control the list of accounts returned when `account_from` or
	// `account_to` is not provided. `brief` (default value) means that accounts with
	// `mt5` account_type will be excluded; it will run faster. `all` means that all
	// accounts with any account_type (including `mt5`) will be returned.
	Accounts TransferBetweenAccountsAccounts `json:"accounts,omitempty"`

	// [Optional] The amount to transfer.
	Amount *float64 `json:"amount,omitempty"`

	// [Optional] Currency code.
	Currency *string `json:"currency,omitempty"`

	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough TransferBetweenAccountsPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// If `account_from` or `account_to` is not provided, it just returns the
	// available accounts.
	TransferBetweenAccounts TransferBetweenAccountsTransferBetweenAccounts `json:"transfer_between_accounts"`
}

This call allows transfers between accounts held by a given user. Transfer funds between your fiat and cryptocurrency accounts (for a fee). Please note that account_from should be same as current authorized account.

func (*TransferBetweenAccounts) UnmarshalJSON ¶

func (j *TransferBetweenAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsAccounts ¶

type TransferBetweenAccountsAccounts string
const TransferBetweenAccountsAccountsAll TransferBetweenAccountsAccounts = "all"
const TransferBetweenAccountsAccountsBrief TransferBetweenAccountsAccounts = "brief"

func (*TransferBetweenAccountsAccounts) UnmarshalJSON ¶

func (j *TransferBetweenAccountsAccounts) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsPassthrough ¶

type TransferBetweenAccountsPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type TransferBetweenAccountsResp ¶

type TransferBetweenAccountsResp struct {
	// The available accounts to transfer, or the accounts affected by a successful
	// transfer.
	Accounts []TransferBetweenAccountsRespAccountsElem `json:"accounts,omitempty"`

	// The account to client full name
	ClientToFullName *string `json:"client_to_full_name,omitempty"`

	// The account to client loginid
	ClientToLoginid *string `json:"client_to_loginid,omitempty"`

	// Echo of the request made.
	EchoReq TransferBetweenAccountsRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType TransferBetweenAccountsRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// Reference ID of transfer performed
	TransactionId *int `json:"transaction_id,omitempty"`

	// If set to 1, transfer succeeded.
	TransferBetweenAccounts *TransferBetweenAccountsRespTransferBetweenAccounts `json:"transfer_between_accounts,omitempty"`
}

The result of transfer order.

func (*TransferBetweenAccountsResp) UnmarshalJSON ¶

func (j *TransferBetweenAccountsResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElem ¶

type TransferBetweenAccountsRespAccountsElem struct {
	// Category of the account.
	AccountCategory *TransferBetweenAccountsRespAccountsElemAccountCategory `json:"account_category,omitempty"`

	// Type of the account.
	AccountType *TransferBetweenAccountsRespAccountsElemAccountType `json:"account_type,omitempty"`

	// Account balance.
	Balance *string `json:"balance,omitempty"`

	// Default account currency.
	Currency *string `json:"currency,omitempty"`

	// 0 for real accounts; 1 for virtual/demo accounts.
	DemoAccount *TransferBetweenAccountsRespAccountsElemDemoAccount `json:"demo_account,omitempty"`

	// Landing company shortcode of the Trading account.
	LandingCompanyShort *string `json:"landing_company_short,omitempty"`

	// Account identifier used for system transfers.
	Loginid *string `json:"loginid,omitempty"`

	// Market type of account.
	MarketType *TransferBetweenAccountsRespAccountsElemMarketType `json:"market_type,omitempty"`

	// The group of mt5 account.
	Mt5Group *string `json:"mt5_group,omitempty"`

	// Product name that Deriv offer
	Product *TransferBetweenAccountsRespAccountsElemProduct `json:"product,omitempty"`

	// The status of account.
	Status *string `json:"status,omitempty"`

	// Sub account type
	SubAccountType *TransferBetweenAccountsRespAccountsElemSubAccountType `json:"sub_account_type,omitempty"`

	// Type of transfers allowed between the account and the currently authorized
	// account.
	Transfers *TransferBetweenAccountsRespAccountsElemTransfers `json:"transfers,omitempty"`
}

type TransferBetweenAccountsRespAccountsElemAccountCategory ¶ added in v0.4.6

type TransferBetweenAccountsRespAccountsElemAccountCategory string
const TransferBetweenAccountsRespAccountsElemAccountCategoryTrading TransferBetweenAccountsRespAccountsElemAccountCategory = "trading"
const TransferBetweenAccountsRespAccountsElemAccountCategoryWallet TransferBetweenAccountsRespAccountsElemAccountCategory = "wallet"

func (*TransferBetweenAccountsRespAccountsElemAccountCategory) UnmarshalJSON ¶ added in v0.4.6

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemAccountType ¶

type TransferBetweenAccountsRespAccountsElemAccountType string
const TransferBetweenAccountsRespAccountsElemAccountTypeBinary TransferBetweenAccountsRespAccountsElemAccountType = "binary"
const TransferBetweenAccountsRespAccountsElemAccountTypeCrypto TransferBetweenAccountsRespAccountsElemAccountType = "crypto"
const TransferBetweenAccountsRespAccountsElemAccountTypeCtrader TransferBetweenAccountsRespAccountsElemAccountType = "ctrader"
const TransferBetweenAccountsRespAccountsElemAccountTypeDoughflow TransferBetweenAccountsRespAccountsElemAccountType = "doughflow"
const TransferBetweenAccountsRespAccountsElemAccountTypeDxtrade TransferBetweenAccountsRespAccountsElemAccountType = "dxtrade"
const TransferBetweenAccountsRespAccountsElemAccountTypeMt5 TransferBetweenAccountsRespAccountsElemAccountType = "mt5"
const TransferBetweenAccountsRespAccountsElemAccountTypeP2P TransferBetweenAccountsRespAccountsElemAccountType = "p2p"
const TransferBetweenAccountsRespAccountsElemAccountTypePartner TransferBetweenAccountsRespAccountsElemAccountType = "partner"
const TransferBetweenAccountsRespAccountsElemAccountTypePaymentagent TransferBetweenAccountsRespAccountsElemAccountType = "paymentagent"
const TransferBetweenAccountsRespAccountsElemAccountTypePaymentagentClient TransferBetweenAccountsRespAccountsElemAccountType = "paymentagent_client"
const TransferBetweenAccountsRespAccountsElemAccountTypeStandard TransferBetweenAccountsRespAccountsElemAccountType = "standard"
const TransferBetweenAccountsRespAccountsElemAccountTypeVirtual TransferBetweenAccountsRespAccountsElemAccountType = "virtual"

func (*TransferBetweenAccountsRespAccountsElemAccountType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemDemoAccount ¶

type TransferBetweenAccountsRespAccountsElemDemoAccount int

func (*TransferBetweenAccountsRespAccountsElemDemoAccount) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemMarketType ¶

type TransferBetweenAccountsRespAccountsElemMarketType string
const TransferBetweenAccountsRespAccountsElemMarketTypeAll TransferBetweenAccountsRespAccountsElemMarketType = "all"
const TransferBetweenAccountsRespAccountsElemMarketTypeFinancial TransferBetweenAccountsRespAccountsElemMarketType = "financial"
const TransferBetweenAccountsRespAccountsElemMarketTypeSynthetic TransferBetweenAccountsRespAccountsElemMarketType = "synthetic"

func (*TransferBetweenAccountsRespAccountsElemMarketType) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemProduct ¶ added in v0.4.24

type TransferBetweenAccountsRespAccountsElemProduct string
const TransferBetweenAccountsRespAccountsElemProductBlank TransferBetweenAccountsRespAccountsElemProduct = ""
const TransferBetweenAccountsRespAccountsElemProductFinancial TransferBetweenAccountsRespAccountsElemProduct = "financial"
const TransferBetweenAccountsRespAccountsElemProductGold TransferBetweenAccountsRespAccountsElemProduct = "gold"
const TransferBetweenAccountsRespAccountsElemProductStandard TransferBetweenAccountsRespAccountsElemProduct = "standard"
const TransferBetweenAccountsRespAccountsElemProductStp TransferBetweenAccountsRespAccountsElemProduct = "stp"
const TransferBetweenAccountsRespAccountsElemProductSwapFree TransferBetweenAccountsRespAccountsElemProduct = "swap_free"
const TransferBetweenAccountsRespAccountsElemProductSynthetic TransferBetweenAccountsRespAccountsElemProduct = "synthetic"
const TransferBetweenAccountsRespAccountsElemProductZeroSpread TransferBetweenAccountsRespAccountsElemProduct = "zero_spread"

func (*TransferBetweenAccountsRespAccountsElemProduct) UnmarshalJSON ¶ added in v0.4.24

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemSubAccountType ¶ added in v0.4.23

type TransferBetweenAccountsRespAccountsElemSubAccountType string
const TransferBetweenAccountsRespAccountsElemSubAccountTypeFinancial TransferBetweenAccountsRespAccountsElemSubAccountType = "financial"
const TransferBetweenAccountsRespAccountsElemSubAccountTypeFinancialStp TransferBetweenAccountsRespAccountsElemSubAccountType = "financial_stp"
const TransferBetweenAccountsRespAccountsElemSubAccountTypeGold TransferBetweenAccountsRespAccountsElemSubAccountType = "gold"
const TransferBetweenAccountsRespAccountsElemSubAccountTypeStandard TransferBetweenAccountsRespAccountsElemSubAccountType = "standard"
const TransferBetweenAccountsRespAccountsElemSubAccountTypeSwapFree TransferBetweenAccountsRespAccountsElemSubAccountType = "swap_free"
const TransferBetweenAccountsRespAccountsElemSubAccountTypeZeroSpread TransferBetweenAccountsRespAccountsElemSubAccountType = "zero_spread"

func (*TransferBetweenAccountsRespAccountsElemSubAccountType) UnmarshalJSON ¶ added in v0.4.23

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespAccountsElemTransfers ¶ added in v0.4.6

type TransferBetweenAccountsRespAccountsElemTransfers string
const TransferBetweenAccountsRespAccountsElemTransfersAll TransferBetweenAccountsRespAccountsElemTransfers = "all"
const TransferBetweenAccountsRespAccountsElemTransfersDeposit TransferBetweenAccountsRespAccountsElemTransfers = "deposit"
const TransferBetweenAccountsRespAccountsElemTransfersNone TransferBetweenAccountsRespAccountsElemTransfers = "none"
const TransferBetweenAccountsRespAccountsElemTransfersWithdrawal TransferBetweenAccountsRespAccountsElemTransfers = "withdrawal"

func (*TransferBetweenAccountsRespAccountsElemTransfers) UnmarshalJSON ¶ added in v0.4.6

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespEchoReq ¶

type TransferBetweenAccountsRespEchoReq map[string]interface{}

Echo of the request made.

type TransferBetweenAccountsRespMsgType ¶

type TransferBetweenAccountsRespMsgType string
const TransferBetweenAccountsRespMsgTypeTransferBetweenAccounts TransferBetweenAccountsRespMsgType = "transfer_between_accounts"

func (*TransferBetweenAccountsRespMsgType) UnmarshalJSON ¶

func (j *TransferBetweenAccountsRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsRespTransferBetweenAccounts ¶

type TransferBetweenAccountsRespTransferBetweenAccounts int

func (*TransferBetweenAccountsRespTransferBetweenAccounts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type TransferBetweenAccountsTransferBetweenAccounts ¶

type TransferBetweenAccountsTransferBetweenAccounts int

func (*TransferBetweenAccountsTransferBetweenAccounts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type UnsubscribeEmail ¶

type UnsubscribeEmail struct {
	// Customer User ID.
	BinaryUserId float64 `json:"binary_user_id"`

	// The generated checksum for the customer.
	Checksum string `json:"checksum"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough UnsubscribeEmailPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	UnsubscribeEmail UnsubscribeEmailUnsubscribeEmail `json:"unsubscribe_email"`
}

It unsubscribe user from the email subscription.

func (*UnsubscribeEmail) UnmarshalJSON ¶

func (j *UnsubscribeEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type UnsubscribeEmailPassthrough ¶

type UnsubscribeEmailPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type UnsubscribeEmailResp ¶

type UnsubscribeEmailResp struct {
	// Customer User ID.
	BinaryUserId *float64 `json:"binary_user_id,omitempty"`

	// Echo of the request made.
	EchoReq UnsubscribeEmailRespEchoReq `json:"echo_req"`

	// `1`: email notification unsubscribed sucssesfully, `0`: failed to unsubscribed
	// email notification
	EmailUnsubscribeStatus *UnsubscribeEmailRespEmailUnsubscribeStatus `json:"email_unsubscribe_status,omitempty"`

	// Action name of the request made.
	MsgType UnsubscribeEmailRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`
}

The result of the unsubscribe email request.

func (*UnsubscribeEmailResp) UnmarshalJSON ¶

func (j *UnsubscribeEmailResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type UnsubscribeEmailRespEchoReq ¶

type UnsubscribeEmailRespEchoReq map[string]interface{}

Echo of the request made.

type UnsubscribeEmailRespEmailUnsubscribeStatus ¶

type UnsubscribeEmailRespEmailUnsubscribeStatus int

func (*UnsubscribeEmailRespEmailUnsubscribeStatus) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type UnsubscribeEmailRespMsgType ¶

type UnsubscribeEmailRespMsgType string
const UnsubscribeEmailRespMsgTypeUnsubscribeEmail UnsubscribeEmailRespMsgType = "unsubscribe_email"

func (*UnsubscribeEmailRespMsgType) UnmarshalJSON ¶

func (j *UnsubscribeEmailRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type UnsubscribeEmailUnsubscribeEmail ¶

type UnsubscribeEmailUnsubscribeEmail int

func (*UnsubscribeEmailUnsubscribeEmail) UnmarshalJSON ¶

func (j *UnsubscribeEmailUnsubscribeEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmail ¶

type VerifyEmail struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough VerifyEmailPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Purpose of email verification, request_email and reset_password are the only
	// two types restricted from all unoffical apps
	Type VerifyEmailType `json:"type"`

	// [Optional] Extra parameters that can be attached to the verify email link URL.
	UrlParameters *VerifyEmailUrlParameters `json:"url_parameters,omitempty"`

	// Email address to be verified.
	VerifyEmail string `json:"verify_email"`
}

Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.

func (*VerifyEmail) UnmarshalJSON ¶

func (j *VerifyEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpert ¶

type VerifyEmailCellxpert struct {
	// [Optional] The login id of the user. Mandatory when multiple tokens were
	// provided during authorize.
	Loginid *string `json:"loginid,omitempty"`

	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough VerifyEmailCellxpertPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Purpose of the email verification call.
	Type VerifyEmailCellxpertType `json:"type"`

	// [Optional] Extra parameters that can be attached to the verify email link URL.
	UrlParameters *VerifyEmailCellxpertUrlParameters `json:"url_parameters,omitempty"`

	// Email address to be verified.
	VerifyEmailCellxpert string `json:"verify_email_cellxpert"`
}

Verify an email address for Cellxpert. The system will send an email to the address containing a security code for verification.

func (*VerifyEmailCellxpert) UnmarshalJSON ¶

func (j *VerifyEmailCellxpert) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpertPassthrough ¶

type VerifyEmailCellxpertPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type VerifyEmailCellxpertResp ¶

type VerifyEmailCellxpertResp struct {
	// Echo of the request made.
	EchoReq VerifyEmailCellxpertRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType VerifyEmailCellxpertRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// 1 for success (secure code has been sent to the email address)
	VerifyEmailCellxpert *VerifyEmailCellxpertRespVerifyEmailCellxpert `json:"verify_email_cellxpert,omitempty"`
}

Verify Email Cellxpert Receive

func (*VerifyEmailCellxpertResp) UnmarshalJSON ¶

func (j *VerifyEmailCellxpertResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpertRespEchoReq ¶

type VerifyEmailCellxpertRespEchoReq map[string]interface{}

Echo of the request made.

type VerifyEmailCellxpertRespMsgType ¶

type VerifyEmailCellxpertRespMsgType string
const VerifyEmailCellxpertRespMsgTypeVerifyEmailCellxpert VerifyEmailCellxpertRespMsgType = "verify_email_cellxpert"

func (*VerifyEmailCellxpertRespMsgType) UnmarshalJSON ¶

func (j *VerifyEmailCellxpertRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpertRespVerifyEmailCellxpert ¶

type VerifyEmailCellxpertRespVerifyEmailCellxpert int

func (*VerifyEmailCellxpertRespVerifyEmailCellxpert) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpertType ¶

type VerifyEmailCellxpertType string
const VerifyEmailCellxpertTypePartnerAccountOpening VerifyEmailCellxpertType = "partner_account_opening"

func (*VerifyEmailCellxpertType) UnmarshalJSON ¶

func (j *VerifyEmailCellxpertType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailCellxpertUrlParameters ¶

type VerifyEmailCellxpertUrlParameters struct {
	// [Optional] Affiliate token, within 32 characters.
	AffiliateToken *string `json:"affiliate_token,omitempty"`

	// [Optional] Master affiliate Id.
	Bta *int `json:"bta,omitempty"`

	// [Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.
	DateFirstContact *string `json:"date_first_contact,omitempty"`

	// [Optional] Google Click Identifier to track source.
	GclidUrl *string `json:"gclid_url,omitempty"`

	// [Optional] The amount to withdraw to the payment agent. Only allowed for
	// payment agent withdraw.
	PaAmount *float64 `json:"pa_amount,omitempty"`

	// [Optional] The currency code. Only allowed for payment agent withdraw.
	PaCurrency *string `json:"pa_currency,omitempty"`

	// [Optional] The payment agent loginid received from the `paymentagent_list`
	// call. Only allowed for payment agent withdraw.
	PaLoginid *string `json:"pa_loginid,omitempty"`

	// [Optional] Remarks about the withdraw. Only letters, numbers, space, period,
	// comma, - ' are allowed. Only allowed for payment agent withdraw.
	PaRemarks *string `json:"pa_remarks,omitempty"`

	// [Optional] The page ID to redirect to
	RedirectTo *int `json:"redirect_to,omitempty"`

	// [Optional] Show whether user has used mobile or desktop.
	SignupDevice *VerifyEmailCellxpertUrlParametersSignupDevice `json:"signup_device,omitempty"`

	// [Optional] Identifier of particular ad. Value must match Regex pattern to be
	// recorded
	UtmAdId interface{} `json:"utm_ad_id,omitempty"`

	// [Optional] Identifier of ad group in the campaign. Value must match Regex
	// pattern to be recorded
	UtmAdgroupId interface{} `json:"utm_adgroup_id,omitempty"`

	// [Optional] Unique identifier of click on AdRoll ads platform. Value must match
	// Regex pattern to be recorded
	UtmAdrollclkId interface{} `json:"utm_adrollclk_id,omitempty"`

	// [Optional] Identifies a specific product promotion or strategic campaign such
	// as a spring sale or other promotions. Value must match Regex pattern to be
	// recorded
	UtmCampaign interface{} `json:"utm_campaign,omitempty"`

	// [Optional] Identifier of paid ad campaign. Value must match Regex pattern to be
	// recorded
	UtmCampaignId interface{} `json:"utm_campaign_id,omitempty"`

	// [Optional] Used to differentiate similar content, or links within the same ad.
	// Value must match Regex pattern to be recorded
	UtmContent interface{} `json:"utm_content,omitempty"`

	// [Optional] Unique identifier of click on Facebook ads platform. Value must
	// match Regex pattern to be recorded
	UtmFbclId interface{} `json:"utm_fbcl_id,omitempty"`

	// [Optional] Unique visitor identifier on Google Ads platform. Value must match
	// Regex pattern to be recorded
	UtmGlClientId interface{} `json:"utm_gl_client_id,omitempty"`

	// [Optional] Identifies the medium the link was used upon such as: email, CPC, or
	// other methods of sharing. Value must match Regex pattern to be recorded
	UtmMedium interface{} `json:"utm_medium,omitempty"`

	// [Optional] Unique click identifier on Microsoft Bing ads platform. Value must
	// match Regex pattern to be recorded
	UtmMsclkId interface{} `json:"utm_msclk_id,omitempty"`

	// [Optional] Identifies the source of traffic such as: search engine, newsletter,
	// or other referral. Value must match Regex pattern to be recorded
	UtmSource interface{} `json:"utm_source,omitempty"`

	// [Optional] Used to send information related to the campaign term like paid
	// search keywords. Value must match Regex pattern to be recorded
	UtmTerm interface{} `json:"utm_term,omitempty"`
}

[Optional] Extra parameters that can be attached to the verify email link URL.

type VerifyEmailCellxpertUrlParametersSignupDevice ¶

type VerifyEmailCellxpertUrlParametersSignupDevice string
const VerifyEmailCellxpertUrlParametersSignupDeviceDesktop VerifyEmailCellxpertUrlParametersSignupDevice = "desktop"
const VerifyEmailCellxpertUrlParametersSignupDeviceMobile VerifyEmailCellxpertUrlParametersSignupDevice = "mobile"

func (*VerifyEmailCellxpertUrlParametersSignupDevice) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailPassthrough ¶

type VerifyEmailPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type VerifyEmailResp ¶

type VerifyEmailResp struct {
	// Echo of the request made.
	EchoReq VerifyEmailRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType VerifyEmailRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// 1 for success (secure code has been sent to the email address)
	VerifyEmail *VerifyEmailRespVerifyEmail `json:"verify_email,omitempty"`
}

Verify Email Receive

func (*VerifyEmailResp) UnmarshalJSON ¶

func (j *VerifyEmailResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailRespEchoReq ¶

type VerifyEmailRespEchoReq map[string]interface{}

Echo of the request made.

type VerifyEmailRespMsgType ¶

type VerifyEmailRespMsgType string
const VerifyEmailRespMsgTypeVerifyEmail VerifyEmailRespMsgType = "verify_email"

func (*VerifyEmailRespMsgType) UnmarshalJSON ¶

func (j *VerifyEmailRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailRespVerifyEmail ¶

type VerifyEmailRespVerifyEmail int

func (*VerifyEmailRespVerifyEmail) UnmarshalJSON ¶

func (j *VerifyEmailRespVerifyEmail) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailType ¶

type VerifyEmailType string
const VerifyEmailTypeAccountOpening VerifyEmailType = "account_opening"
const VerifyEmailTypeAccountVerification VerifyEmailType = "account_verification"
const VerifyEmailTypePaymentWithdraw VerifyEmailType = "payment_withdraw"
const VerifyEmailTypePaymentagentWithdraw VerifyEmailType = "paymentagent_withdraw"
const VerifyEmailTypePhoneNumberVerification VerifyEmailType = "phone_number_verification"
const VerifyEmailTypeRequestEmail VerifyEmailType = "request_email"
const VerifyEmailTypeResetPassword VerifyEmailType = "reset_password"
const VerifyEmailTypeTradingPlatformDxtradePasswordReset VerifyEmailType = "trading_platform_dxtrade_password_reset"
const VerifyEmailTypeTradingPlatformInvestorPasswordReset VerifyEmailType = "trading_platform_investor_password_reset"
const VerifyEmailTypeTradingPlatformMt5PasswordReset VerifyEmailType = "trading_platform_mt5_password_reset"

func (*VerifyEmailType) UnmarshalJSON ¶

func (j *VerifyEmailType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VerifyEmailUrlParameters ¶

type VerifyEmailUrlParameters struct {
	// [Optional] Affiliate token, within 32 characters.
	AffiliateToken *string `json:"affiliate_token,omitempty"`

	// [Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.
	DateFirstContact *string `json:"date_first_contact,omitempty"`

	// [Optional] Google Click Identifier to track source.
	GclidUrl *string `json:"gclid_url,omitempty"`

	// [Optional] The amount to withdraw to the payment agent. Only allowed for
	// payment agent withdraw.
	PaAmount *float64 `json:"pa_amount,omitempty"`

	// [Optional] The currency code. Only allowed for payment agent withdraw.
	PaCurrency *string `json:"pa_currency,omitempty"`

	// [Optional] The payment agent loginid received from the `paymentagent_list`
	// call. Only allowed for payment agent withdraw.
	PaLoginid *string `json:"pa_loginid,omitempty"`

	// [Optional] Remarks about the withdraw. Only letters, numbers, space, period,
	// comma, - ' are allowed. Only allowed for payment agent withdraw.
	PaRemarks *string `json:"pa_remarks,omitempty"`

	// [Optional] The page ID to redirect to
	RedirectTo *int `json:"redirect_to,omitempty"`

	// [Optional] Show whether user has used mobile or desktop.
	SignupDevice *VerifyEmailUrlParametersSignupDevice `json:"signup_device,omitempty"`

	// [Optional] Identifier of particular ad. Value must match Regex pattern to be
	// recorded
	UtmAdId interface{} `json:"utm_ad_id,omitempty"`

	// [Optional] Identifier of ad group in the campaign. Value must match Regex
	// pattern to be recorded
	UtmAdgroupId interface{} `json:"utm_adgroup_id,omitempty"`

	// [Optional] Unique identifier of click on AdRoll ads platform. Value must match
	// Regex pattern to be recorded
	UtmAdrollclkId interface{} `json:"utm_adrollclk_id,omitempty"`

	// [Optional] Identifies a specific product promotion or strategic campaign such
	// as a spring sale or other promotions. Value must match Regex pattern to be
	// recorded
	UtmCampaign interface{} `json:"utm_campaign,omitempty"`

	// [Optional] Identifier of paid ad campaign. Value must match Regex pattern to be
	// recorded
	UtmCampaignId interface{} `json:"utm_campaign_id,omitempty"`

	// [Optional] Used to differentiate similar content, or links within the same ad.
	// Value must match Regex pattern to be recorded
	UtmContent interface{} `json:"utm_content,omitempty"`

	// [Optional] Unique identifier of click on Facebook ads platform. Value must
	// match Regex pattern to be recorded
	UtmFbclId interface{} `json:"utm_fbcl_id,omitempty"`

	// [Optional] Unique visitor identifier on Google Ads platform. Value must match
	// Regex pattern to be recorded
	UtmGlClientId interface{} `json:"utm_gl_client_id,omitempty"`

	// [Optional] Identifies the medium the link was used upon such as: email, CPC, or
	// other methods of sharing. Value must match Regex pattern to be recorded
	UtmMedium interface{} `json:"utm_medium,omitempty"`

	// [Optional] Unique click identifier on Microsoft Bing ads platform. Value must
	// match Regex pattern to be recorded
	UtmMsclkId interface{} `json:"utm_msclk_id,omitempty"`

	// [Optional] Identifies the source of traffic such as: search engine, newsletter,
	// or other referral. Value must match Regex pattern to be recorded
	UtmSource interface{} `json:"utm_source,omitempty"`

	// [Optional] Used to send information related to the campaign term like paid
	// search keywords. Value must match Regex pattern to be recorded
	UtmTerm interface{} `json:"utm_term,omitempty"`
}

[Optional] Extra parameters that can be attached to the verify email link URL.

type VerifyEmailUrlParametersSignupDevice ¶

type VerifyEmailUrlParametersSignupDevice string
const VerifyEmailUrlParametersSignupDeviceDesktop VerifyEmailUrlParametersSignupDevice = "desktop"
const VerifyEmailUrlParametersSignupDeviceMobile VerifyEmailUrlParametersSignupDevice = "mobile"

func (*VerifyEmailUrlParametersSignupDevice) UnmarshalJSON ¶

func (j *VerifyEmailUrlParametersSignupDevice) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfig ¶ added in v0.4.13

type WebsiteConfig struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough WebsiteConfigPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// Must be `1`
	WebsiteConfig WebsiteConfigWebsiteConfig `json:"website_config"`
}

Request server config.

func (*WebsiteConfig) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigPassthrough ¶ added in v0.4.13

type WebsiteConfigPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type WebsiteConfigResp ¶ added in v0.4.13

type WebsiteConfigResp struct {
	// Echo of the request made.
	EchoReq WebsiteConfigRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType WebsiteConfigRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *WebsiteConfigRespSubscription `json:"subscription,omitempty"`

	// Server status and other information regarding general settings
	WebsiteConfig *WebsiteConfigRespWebsiteConfig `json:"website_config,omitempty"`
}

All config related settings.

func (*WebsiteConfigResp) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfigResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigRespEchoReq ¶ added in v0.4.13

type WebsiteConfigRespEchoReq map[string]interface{}

Echo of the request made.

type WebsiteConfigRespMsgType ¶ added in v0.4.13

type WebsiteConfigRespMsgType string
const WebsiteConfigRespMsgTypeWebsiteConfig WebsiteConfigRespMsgType = "website_config"

func (*WebsiteConfigRespMsgType) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfigRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigRespSubscription ¶ added in v0.4.13

type WebsiteConfigRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*WebsiteConfigRespSubscription) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfigRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigRespWebsiteConfig ¶ added in v0.4.13

type WebsiteConfigRespWebsiteConfig struct {
	// Available currencies and their information
	CurrenciesConfig WebsiteConfigRespWebsiteConfigCurrenciesConfig `json:"currencies_config"`

	// Feature flags related to the website/server for various features and options:
	//  - 'signup_with_optional_email_verification': Allow signup with optional email
	// verification.
	FeatureFlags []string `json:"feature_flags,omitempty"`

	// Payments Agents system settings.
	PaymentAgents *WebsiteConfigRespWebsiteConfigPaymentAgents `json:"payment_agents,omitempty"`

	// Provides codes for languages supported.
	SupportedLanguages []string `json:"supported_languages,omitempty"`

	// Latest terms and conditions version.
	TermsConditionsVersion *string `json:"terms_conditions_version,omitempty"`
}

Server status and other information regarding general settings

func (*WebsiteConfigRespWebsiteConfig) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfigRespWebsiteConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigRespWebsiteConfigCurrenciesConfig ¶ added in v0.4.13

type WebsiteConfigRespWebsiteConfigCurrenciesConfig map[string]interface{}

Available currencies and their information

type WebsiteConfigRespWebsiteConfigPaymentAgents ¶ added in v0.4.13

type WebsiteConfigRespWebsiteConfigPaymentAgents struct {
	// Initial deposit requirement per country.
	InitialDepositPerCountry WebsiteConfigRespWebsiteConfigPaymentAgentsInitialDepositPerCountry `json:"initial_deposit_per_country"`
}

Payments Agents system settings.

func (*WebsiteConfigRespWebsiteConfigPaymentAgents) UnmarshalJSON ¶ added in v0.4.13

UnmarshalJSON implements json.Unmarshaler.

type WebsiteConfigRespWebsiteConfigPaymentAgentsInitialDepositPerCountry ¶ added in v0.4.13

type WebsiteConfigRespWebsiteConfigPaymentAgentsInitialDepositPerCountry map[string]interface{}

Initial deposit requirement per country.

type WebsiteConfigWebsiteConfig ¶ added in v0.4.13

type WebsiteConfigWebsiteConfig int

func (*WebsiteConfigWebsiteConfig) UnmarshalJSON ¶ added in v0.4.13

func (j *WebsiteConfigWebsiteConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatus ¶

type WebsiteStatus struct {
	// [Optional] Used to pass data through the websocket, which may be retrieved via
	// the `echo_req` output field.
	Passthrough WebsiteStatusPassthrough `json:"passthrough,omitempty"`

	// [Optional] Used to map request to response.
	ReqId *int `json:"req_id,omitempty"`

	// [Optional] `1` to stream the server/website status updates.
	Subscribe *WebsiteStatusSubscribe `json:"subscribe,omitempty"`

	// Must be `1`
	WebsiteStatus WebsiteStatusWebsiteStatus `json:"website_status"`
}

Request server status.

func (*WebsiteStatus) UnmarshalJSON ¶

func (j *WebsiteStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusPassthrough ¶

type WebsiteStatusPassthrough map[string]interface{}

[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.

type WebsiteStatusResp ¶

type WebsiteStatusResp struct {
	// Echo of the request made.
	EchoReq WebsiteStatusRespEchoReq `json:"echo_req"`

	// Action name of the request made.
	MsgType WebsiteStatusRespMsgType `json:"msg_type"`

	// Optional field sent in request to map to response, present only when request
	// contains `req_id`.
	ReqId *int `json:"req_id,omitempty"`

	// For subscription requests only.
	Subscription *WebsiteStatusRespSubscription `json:"subscription,omitempty"`

	// Server status and other information regarding general settings
	WebsiteStatus *WebsiteStatusRespWebsiteStatus `json:"website_status,omitempty"`
}

Server status alongside general settings like call limits, currencies information, supported languages, etc.

func (*WebsiteStatusResp) UnmarshalJSON ¶

func (j *WebsiteStatusResp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespEchoReq ¶

type WebsiteStatusRespEchoReq map[string]interface{}

Echo of the request made.

type WebsiteStatusRespMsgType ¶

type WebsiteStatusRespMsgType string
const WebsiteStatusRespMsgTypeWebsiteStatus WebsiteStatusRespMsgType = "website_status"

func (*WebsiteStatusRespMsgType) UnmarshalJSON ¶

func (j *WebsiteStatusRespMsgType) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespSubscription ¶

type WebsiteStatusRespSubscription struct {
	// A per-connection unique identifier. Can be passed to the `forget` API call to
	// unsubscribe.
	Id string `json:"id"`
}

For subscription requests only.

func (*WebsiteStatusRespSubscription) UnmarshalJSON ¶

func (j *WebsiteStatusRespSubscription) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatus ¶

type WebsiteStatusRespWebsiteStatus struct {
	// Maximum number of API calls during specified period of time.
	ApiCallLimits WebsiteStatusRespWebsiteStatusApiCallLimits `json:"api_call_limits"`

	// List of all available broker codes.
	BrokerCodes []string `json:"broker_codes,omitempty"`

	// Country code of connected IP
	ClientsCountry *string `json:"clients_country,omitempty"`

	// Available currencies and their information
	CurrenciesConfig WebsiteStatusRespWebsiteStatusCurrenciesConfig `json:"currencies_config"`

	// Suspension status of Dxtrade/DerivX API calls
	DxtradeStatus *WebsiteStatusRespWebsiteStatusDxtradeStatus `json:"dxtrade_status,omitempty"`

	// Text for site status banner, contains problem description. shown only if set by
	// the system.
	Message *string `json:"message,omitempty"`

	// Suspension status of MT5 API calls
	Mt5Status *WebsiteStatusRespWebsiteStatusMt5Status `json:"mt5_status,omitempty"`

	// Peer-to-peer payment system settings.
	P2PConfig *WebsiteStatusRespWebsiteStatusP2PConfig `json:"p2p_config,omitempty"`

	// Payments Agents system settings.
	PaymentAgents *WebsiteStatusRespWebsiteStatusPaymentAgents `json:"payment_agents,omitempty"`

	// The current status of the website.
	SiteStatus *WebsiteStatusRespWebsiteStatusSiteStatus `json:"site_status,omitempty"`

	// Provides codes for languages supported.
	SupportedLanguages []string `json:"supported_languages,omitempty"`

	// Latest terms and conditions version.
	TermsConditionsVersion *string `json:"terms_conditions_version,omitempty"`
}

Server status and other information regarding general settings

func (*WebsiteStatusRespWebsiteStatus) UnmarshalJSON ¶

func (j *WebsiteStatusRespWebsiteStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusApiCallLimits ¶

type WebsiteStatusRespWebsiteStatusApiCallLimits struct {
	// Maximum subscription to proposal calls.
	MaxProposalSubscription WebsiteStatusRespWebsiteStatusApiCallLimitsMaxProposalSubscription `json:"max_proposal_subscription"`

	// Maximum number of general requests allowed during specified period of time.
	MaxRequestesGeneral WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestesGeneral `json:"max_requestes_general"`

	// Maximum number of outcome requests allowed during specified period of time.
	MaxRequestsOutcome WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsOutcome `json:"max_requests_outcome"`

	// Maximum number of pricing requests allowed during specified period of time.
	MaxRequestsPricing WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsPricing `json:"max_requests_pricing"`
}

Maximum number of API calls during specified period of time.

func (*WebsiteStatusRespWebsiteStatusApiCallLimits) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxProposalSubscription ¶

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxProposalSubscription struct {
	// Describes which calls this limit applies to.
	AppliesTo string `json:"applies_to"`

	// Maximum number of allowed calls.
	Max float64 `json:"max"`
}

Maximum subscription to proposal calls.

func (*WebsiteStatusRespWebsiteStatusApiCallLimitsMaxProposalSubscription) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestesGeneral ¶

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestesGeneral struct {
	// Describes which calls this limit applies to.
	AppliesTo string `json:"applies_to"`

	// The maximum of allowed calls per hour.
	Hourly float64 `json:"hourly"`

	// The maximum of allowed calls per minute.
	Minutely float64 `json:"minutely"`
}

Maximum number of general requests allowed during specified period of time.

func (*WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestesGeneral) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsOutcome ¶

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsOutcome struct {
	// Describes which calls this limit applies to.
	AppliesTo string `json:"applies_to"`

	// The maximum of allowed calls per hour.
	Hourly float64 `json:"hourly"`

	// The maximum of allowed calls per minute.
	Minutely float64 `json:"minutely"`
}

Maximum number of outcome requests allowed during specified period of time.

func (*WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsOutcome) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsPricing ¶

type WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsPricing struct {
	// Describes which calls this limit applies to.
	AppliesTo string `json:"applies_to"`

	// The maximum of allowed calls per hour.
	Hourly float64 `json:"hourly"`

	// The maximum of allowed calls per minute.
	Minutely float64 `json:"minutely"`
}

Maximum number of pricing requests allowed during specified period of time.

func (*WebsiteStatusRespWebsiteStatusApiCallLimitsMaxRequestsPricing) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusCurrenciesConfig ¶

type WebsiteStatusRespWebsiteStatusCurrenciesConfig map[string]interface{}

Available currencies and their information

type WebsiteStatusRespWebsiteStatusDxtradeStatus ¶

type WebsiteStatusRespWebsiteStatusDxtradeStatus struct {
	// Suspension of Dxtrade/DerivX API calls on all servers.
	All *int `json:"all,omitempty"`

	// Suspension of Dxtrade/DerivX API calls on demo servers.
	Demo *int `json:"demo,omitempty"`

	// Suspension of Dxtrade/DerivX API calls on real trading servers.
	Real *int `json:"real,omitempty"`
}

Suspension status of Dxtrade/DerivX API calls

type WebsiteStatusRespWebsiteStatusMt5Status ¶

type WebsiteStatusRespWebsiteStatusMt5Status struct {
	// Suspension of MT5 API calls on demo servers.
	Demo []interface{} `json:"demo,omitempty"`

	// Suspension of MT5 API calls on real trading servers.
	Real []interface{} `json:"real,omitempty"`
}

Suspension status of MT5 API calls

type WebsiteStatusRespWebsiteStatusP2PConfig ¶

type WebsiteStatusRespWebsiteStatusP2PConfig struct {
	// Maximum number of active ads allowed by an advertiser per currency pair and
	// advert type (buy or sell).
	AdvertsActiveLimit int `json:"adverts_active_limit"`

	// Adverts will be deactivated if no activity occurs within this period, in days.
	AdvertsArchivePeriod *int `json:"adverts_archive_period,omitempty"`

	// Block trading settings
	BlockTrade WebsiteStatusRespWebsiteStatusP2PConfigBlockTrade `json:"block_trade"`

	// A buyer will be blocked for this duration after exceeding the cancellation
	// limit, in hours.
	CancellationBlockDuration int `json:"cancellation_block_duration"`

	// The period within which to count buyer cancellations, in hours.
	CancellationCountPeriod int `json:"cancellation_count_period"`

	// A buyer may cancel an order within this period without negative consequences,
	// in minutes after order creation.
	CancellationGracePeriod int `json:"cancellation_grace_period"`

	// A buyer will be temporarily barred after marking this number of cancellations
	// within cancellation_period.
	CancellationLimit int `json:"cancellation_limit"`

	// When 0, only exchanges in local currency are allowed for P2P advertiser.
	CrossBorderAdsEnabled WebsiteStatusRespWebsiteStatusP2PConfigCrossBorderAdsEnabled `json:"cross_border_ads_enabled"`

	// When 1, the P2P service is unavailable.
	Disabled WebsiteStatusRespWebsiteStatusP2PConfigDisabled `json:"disabled"`

	// Indicates the availbility of certain backend features.
	FeatureLevel int `json:"feature_level"`

	// Availability of fixed rate adverts.
	FixedRateAdverts WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts `json:"fixed_rate_adverts"`

	// Date on which fixed rate adverts will be deactivated.
	FixedRateAdvertsEndDate *string `json:"fixed_rate_adverts_end_date,omitempty"`

	// Availability of floating rate adverts.
	FloatRateAdverts WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts `json:"float_rate_adverts"`

	// Maximum rate offset for floating rate adverts.
	FloatRateOffsetLimit float64 `json:"float_rate_offset_limit"`

	// Available local currencies for p2p_advert_list request.
	LocalCurrencies []WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElem `json:"local_currencies"`

	// Maximum amount of an advert, in USD.
	MaximumAdvertAmount float64 `json:"maximum_advert_amount"`

	// Maximum amount of an order, in USD.
	MaximumOrderAmount float64 `json:"maximum_order_amount"`

	// Maximum number of orders a user may create per day.
	OrderDailyLimit int `json:"order_daily_limit"`

	// Time allowed for order payment, in minutes after order creation.
	OrderPaymentPeriod int `json:"order_payment_period"`

	// Local P2P exchange rate which should be used instead of those obtained from the
	// `exchange_rates` call.
	OverrideExchangeRate *string `json:"override_exchange_rate,omitempty"`

	// Indicates if the payment methods feature is enabled.
	PaymentMethodsEnabled WebsiteStatusRespWebsiteStatusP2PConfigPaymentMethodsEnabled `json:"payment_methods_enabled"`

	// Time after successful order completion during which reviews can be created, in
	// hours.
	ReviewPeriod float64 `json:"review_period"`

	// List of currencies for which P2P is available
	SupportedCurrencies []string `json:"supported_currencies"`
}

Peer-to-peer payment system settings.

func (*WebsiteStatusRespWebsiteStatusP2PConfig) UnmarshalJSON ¶

func (j *WebsiteStatusRespWebsiteStatusP2PConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigBlockTrade ¶

type WebsiteStatusRespWebsiteStatusP2PConfigBlockTrade struct {
	// When 1, Block trading is unavailable.
	Disabled *WebsiteStatusRespWebsiteStatusP2PConfigBlockTradeDisabled `json:"disabled,omitempty"`

	// Maximum amount of a block trade advert, in USD.
	MaximumAdvertAmount *float64 `json:"maximum_advert_amount,omitempty"`
}

Block trading settings

type WebsiteStatusRespWebsiteStatusP2PConfigBlockTradeDisabled ¶

type WebsiteStatusRespWebsiteStatusP2PConfigBlockTradeDisabled int

func (*WebsiteStatusRespWebsiteStatusP2PConfigBlockTradeDisabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigCrossBorderAdsEnabled ¶

type WebsiteStatusRespWebsiteStatusP2PConfigCrossBorderAdsEnabled int

func (*WebsiteStatusRespWebsiteStatusP2PConfigCrossBorderAdsEnabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigDisabled ¶

type WebsiteStatusRespWebsiteStatusP2PConfigDisabled int

func (*WebsiteStatusRespWebsiteStatusP2PConfigDisabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts ¶

type WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts string
const WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdvertsDisabled WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts = "disabled"
const WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdvertsEnabled WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts = "enabled"
const WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdvertsListOnly WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts = "list_only"

func (*WebsiteStatusRespWebsiteStatusP2PConfigFixedRateAdverts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts ¶

type WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts string
const WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdvertsDisabled WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts = "disabled"
const WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdvertsEnabled WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts = "enabled"
const WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdvertsListOnly WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts = "list_only"

func (*WebsiteStatusRespWebsiteStatusP2PConfigFloatRateAdverts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElem ¶

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElem struct {
	// Local currency name
	DisplayName string `json:"display_name"`

	// Indicates that there are adverts available for this currency.
	HasAdverts WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemHasAdverts `json:"has_adverts"`

	// Indicates that this is local currency for the current country.
	IsDefault *WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemIsDefault `json:"is_default,omitempty"`

	// Local currency symbol
	Symbol string `json:"symbol"`
}

Local currency details.

func (*WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElem) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemHasAdverts ¶

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemHasAdverts int

func (*WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemHasAdverts) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemIsDefault ¶

type WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemIsDefault int

func (*WebsiteStatusRespWebsiteStatusP2PConfigLocalCurrenciesElemIsDefault) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusP2PConfigPaymentMethodsEnabled ¶

type WebsiteStatusRespWebsiteStatusP2PConfigPaymentMethodsEnabled int

func (*WebsiteStatusRespWebsiteStatusP2PConfigPaymentMethodsEnabled) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusPaymentAgents ¶

type WebsiteStatusRespWebsiteStatusPaymentAgents struct {
	// Initial deposit requirement per country.
	InitialDepositPerCountry WebsiteStatusRespWebsiteStatusPaymentAgentsInitialDepositPerCountry `json:"initial_deposit_per_country"`
}

Payments Agents system settings.

func (*WebsiteStatusRespWebsiteStatusPaymentAgents) UnmarshalJSON ¶

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusRespWebsiteStatusPaymentAgentsInitialDepositPerCountry ¶

type WebsiteStatusRespWebsiteStatusPaymentAgentsInitialDepositPerCountry map[string]interface{}

Initial deposit requirement per country.

type WebsiteStatusRespWebsiteStatusSiteStatus ¶

type WebsiteStatusRespWebsiteStatusSiteStatus string
const WebsiteStatusRespWebsiteStatusSiteStatusDown WebsiteStatusRespWebsiteStatusSiteStatus = "down"
const WebsiteStatusRespWebsiteStatusSiteStatusUp WebsiteStatusRespWebsiteStatusSiteStatus = "up"
const WebsiteStatusRespWebsiteStatusSiteStatusUpdating WebsiteStatusRespWebsiteStatusSiteStatus = "updating"

func (*WebsiteStatusRespWebsiteStatusSiteStatus) UnmarshalJSON ¶

func (j *WebsiteStatusRespWebsiteStatusSiteStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusSubscribe ¶

type WebsiteStatusSubscribe int

func (*WebsiteStatusSubscribe) UnmarshalJSON ¶

func (j *WebsiteStatusSubscribe) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WebsiteStatusWebsiteStatus ¶

type WebsiteStatusWebsiteStatus int

func (*WebsiteStatusWebsiteStatus) UnmarshalJSON ¶

func (j *WebsiteStatusWebsiteStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type WithdrawalRequirements ¶ added in v0.4.26

type WithdrawalRequirements []string

Withdrawal requirements

Source Files ¶

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL