Documentation
¶
Index ¶
- Constants
- func BusinessRuleViolation(oe *OrderError) bool
- func GetBusinessViolations() []string
- func GetPriceTick(price float64, elements []Elements) float64
- func GetStringError(err error) string
- type Accounts
- type ActiveOrder
- type AssetType
- type Balance
- type BuySell
- type Duration
- type DurationType
- type Elements
- type ErrorInfo
- type Exchange
- type ExchangeOrder
- type ExchangeSessions
- type Format
- type InfoPrice
- type Instrument
- type InstrumentDetails
- type InstrumentPrice
- type ListExchanges
- type ModeledAPI
- func (ma *ModeledAPI) CreatePriceStream(i Instrument) (chan *QuoteStream, *websocket.Conn, error)
- func (ma *ModeledAPI) GetAccounts() (*Accounts, error)
- func (ma *ModeledAPI) GetBalanceMe() (*Balance, error)
- func (ma *ModeledAPI) GetExchange(id string) (*Exchange, error)
- func (ma *ModeledAPI) GetInfoPrice(i Instrument) (*InfoPrice, error)
- func (ma *ModeledAPI) GetInstrument(symbol string) (Instrument, error)
- func (ma *ModeledAPI) GetInstrumentDetails(i Instrument) (InstrumentDetails, error)
- func (ma *ModeledAPI) GetInstrumentPrice(i Instrument) (float64, error)
- func (ma *ModeledAPI) GetOrdersMe() (*OrderList, error)
- func (ma *ModeledAPI) GetPositionsMe() (*PositionList, error)
- func (ma *ModeledAPI) Order(o *Order) (*OrderResponse, error)
- func (ma *ModeledAPI) PreOrder(o *Order) (*PreOrderResponse, error)
- func (ma *ModeledAPI) Throttle()
- func (ma *ModeledAPI) UpdateLastCall()
- type Order
- func (o *Order) WithAmount(amount int) *Order
- func (o *Order) WithBuySell(buySell BuySell) *Order
- func (o *Order) WithDuration(duration DurationType) *Order
- func (o *Order) WithPrice(price float64) *Order
- func (o *Order) WithStopLimitPrice(stopLimitPrice float64) *Order
- func (o *Order) WithStopLoss(sellingPrice float64) *Order
- func (o *Order) WithStopLossStopLimit(sellingPrice, stopLimitPrice float64) *Order
- func (o *Order) WithStopLossTrailingStop(sellingPrice, distanceToMarket, step float64) *Order
- func (o *Order) WithTakeProfit(sellingPrice float64) *Order
- func (o *Order) WithType(orderType OrderType) *Order
- type OrderDistances
- type OrderError
- type OrderList
- type OrderResponse
- type OrderType
- type PositionBase
- type PositionData
- type PositionList
- type PositionView
- type PreOrderResponse
- type PriceRequestArguments
- type PriceSnapshot
- type PriceStreamRequest
- type PriceStreamResponse
- type Quote
- type QuoteStream
- type RelatedInstruments
- type RelatedOpenOrders
- type SaxoInstrument
- type SaxoInstrumentDetails
- func (id *SaxoInstrumentDetails) CalculatePriceWithThickSize(price float64, percentage float64) float64
- func (i *SaxoInstrumentDetails) GetAssetType() AssetType
- func (id *SaxoInstrumentDetails) GetDecimals() int
- func (i *SaxoInstrumentDetails) GetExchangeID() string
- func (i *SaxoInstrumentDetails) GetID() int32
- func (id *SaxoInstrumentDetails) GetMinimumOrderValue() int
- func (id *SaxoInstrumentDetails) GetMinimumTradeSize() int
- func (i *SaxoInstrumentDetails) GetOrder() *Order
- func (i *SaxoInstrumentDetails) GetSymbol() string
- func (i *SaxoInstrumentDetails) GetSymbolSimple() string
- type SaxoInstruments
- type TickSizeScheme
- type WSMessage
Constants ¶
View Source
const ( AtTheClose DurationType = "AtTheClose" AtTheOpening = "AtTheOpening" DayOrder = "DayOrder" FillOrKill = "FillOrKill" GoodForPeriod = "GoodForPeriod" GoodTillCancel = "GoodTillCancel" GoodTillDate = "GoodTillDate" ImmediateOrCancel = "ImmediateOrCancel" Unknown = "Unknown" )
View Source
const ( Algorithmic OrderType = "Algorithmic" GuaranteedStop = "GuaranteedStop" Limit = "Limit" Market = "Market" Stop = "Stop" StopIfBid = "StopIfBid" StopIfOffered = "StopIfOffered" StopIfTraded = "StopIfTraded" StopLimit = "StopLimit" Switch = "Switch" TrailingStop = "TrailingStop" TrailingStopIfBid = "TrailingStopIfBid" TrailingStopIfOffered = "TrailingStopIfOffered" TrailingStopIfTraded = "TrailingStopIfTraded" Traspaso = "Traspaso" TraspasoIn = "TraspasoIn" )
View Source
const ( Bond AssetType = "Bond" Cash = "Cash" CfdIndexOption = "CfdIndexOption" CfdOnFutures = "CfdOnFutures" CfdOnIndex = "CfdOnIndex" CfdOnStock = "CfdOnStock" ContractFutures = "ContractFutures" FuturesOption = "FuturesOption" FuturesStrategy = "FuturesStrategy" FxBinaryOption = "FxBinaryOption" FxForwards = "FxForwards" FxKnockInOption = "FxKnockInOption" FxKnockOutOption = "FxKnockOutOption" FxNoTouchOption = "FxNoTouchOption" FxOneTouchOption = "FxOneTouchOption" FxSpot = "FxSpot" FxVanillaOption = "FxVanillaOption" IpoOnStock = "IpoOnStock" ManagedFund = "ManagedFund" MutualFund = "MutualFund" Stock = "Stock" StockIndex = "StockIndex" StockIndexOption = "StockIndexOption" StockOption = "StockOption" )
Variables ¶
This section is empty.
Functions ¶
func BusinessRuleViolation ¶
func BusinessRuleViolation(oe *OrderError) bool
func GetBusinessViolations ¶
func GetBusinessViolations() []string
func GetPriceTick ¶
func GetStringError ¶
Types ¶
type Accounts ¶
type Accounts struct { Data []struct { AccountGroupKey string `json:"AccountGroupKey"` AccountID string `json:"AccountId"` AccountKey string `json:"AccountKey"` AccountSubType string `json:"AccountSubType"` AccountType string `json:"AccountType"` Active bool `json:"Active"` CanUseCashPositionsAsMarginCollateral bool `json:"CanUseCashPositionsAsMarginCollateral"` CfdBorrowingCostsActive bool `json:"CfdBorrowingCostsActive"` ClientID string `json:"ClientId"` ClientKey string `json:"ClientKey"` CreationDate string `json:"CreationDate"` Currency string `json:"Currency"` CurrencyDecimals int `json:"CurrencyDecimals"` DirectMarketAccess bool `json:"DirectMarketAccess"` IndividualMargining bool `json:"IndividualMargining"` IsCurrencyConversionAtSettlementTime bool `json:"IsCurrencyConversionAtSettlementTime"` IsMarginTradingAllowed bool `json:"IsMarginTradingAllowed"` IsShareable bool `json:"IsShareable"` IsTrialAccount bool `json:"IsTrialAccount"` LegalAssetTypes []string `json:"LegalAssetTypes"` MarginCalculationMethod string `json:"MarginCalculationMethod"` Sharing []string `json:"Sharing"` SupportsAccountValueProtectionLimit bool `json:"SupportsAccountValueProtectionLimit"` UseCashPositionsAsMarginCollateral bool `json:"UseCashPositionsAsMarginCollateral"` } `json:"Data"` }
func (*Accounts) GetAccountKey ¶
func (*Accounts) GetAccountKeyMe ¶
func (*Accounts) GetClientKey ¶
func (*Accounts) GetClientKeyMe ¶
type ActiveOrder ¶
type ActiveOrder struct { Amount int `json:"Amount"` BuySell BuySell `json:"BuySell"` OrderType OrderType `json:"OrderType"` AccountID string `json:"AccountId,omitempty"` CalculationReliability string `json:"CalculationReliability,omitempty"` ClientID string `json:"ClientId,omitempty"` ClientKey string `json:"ClientKey,omitempty"` ClientName string `json:"ClientName,omitempty"` CorrelationKey string `json:"CorrelationKey,omitempty"` CurrentPrice float64 `json:"CurrentPrice,omitempty"` CurrentPriceDelayMinutes float64 `json:"CurrentPriceDelayMinutes,omitempty"` CurrentPriceType string `json:"CurrentPriceType,omitempty"` DistanceToMarket float64 `json:"DistanceToMarket,omitempty"` Duration *Duration `json:"Duration,omitempty"` Exchange *ExchangeOrder `json:"Exchange,omitempty"` IsForceOpen bool `json:"IsForceOpen,omitempty"` Isin string `json:"Isin,omitempty"` IsMarketOpen bool `json:"IsMarketOpen,omitempty"` MarketPrice float64 `json:"MarketPrice,omitempty"` MarketValue float64 `json:"MarketValue,omitempty"` NonTradableReason string `json:"NonTradableReason,omitempty"` OpenOrderType string `json:"OpenOrderType,omitempty"` OrderAmountType string `json:"OrderAmountType,omitempty"` OrderID string `json:"OrderId,omitempty"` OrderRelation string `json:"OrderRelation,omitempty"` OrderTime string `json:"OrderTime,omitempty"` Price float64 `json:"Price,omitempty"` RelatedOpenOrders []RelatedOpenOrders `json:"RelatedOpenOrders,omitempty"` RelatedPositionID string `json:"RelatedPositionId,omitempty"` Status string `json:"Status,omitempty"` TradingStatus string `json:"TradingStatus,omitempty"` Uic int32 `json:"Uic"` }
ActiveOrder Is used on the GET Orders Endpoints (EX. List/Getting an Order)
type Balance ¶
type Balance struct { CalculationReliability string `json:"CalculationReliability"` CashBalance float64 `json:"CashBalance"` ChangesScheduled bool `json:"ChangesScheduled"` ClosedPositionsCount float64 `json:"ClosedPositionsCount"` CollateralAvailable float64 `json:"CollateralAvailable"` CollateralCreditValue struct { Line float64 `json:"Line"` UtilizationPct float64 `json:"UtilizationPct"` } `json:"CollateralCreditValue"` CostToClosePositions float64 `json:"CostToClosePositions"` Currency string `json:"Currency"` CurrencyDecimals float64 `json:"CurrencyDecimals"` InitialMargin struct { CollateralAvailable float64 `json:"CollateralAvailable"` CollateralCreditValue struct { Line float64 `json:"Line"` UtilizationPct float64 `json:"UtilizationPct"` } `json:"CollateralCreditValue"` MarginAvailable float64 `json:"MarginAvailable"` MarginCollateralNotAvailable float64 `json:"MarginCollateralNotAvailable"` MarginUsedByCurrentPositions float64 `json:"MarginUsedByCurrentPositions"` MarginUtilizationPct float64 `json:"MarginUtilizationPct"` NetEquityForMargin float64 `json:"NetEquityForMargin"` } `json:"InitialMargin"` IsPortfolioMarginModelSimple bool `json:"IsPortfolioMarginModelSimple"` MarginAvailableForTrading float64 `json:"MarginAvailableForTrading"` MarginCollateralNotAvailable float64 `json:"MarginCollateralNotAvailable"` MarginExposureCoveragePct float64 `json:"MarginExposureCoveragePct"` MarginNetExposure float64 `json:"MarginNetExposure"` MarginUsedByCurrentPositions float64 `json:"MarginUsedByCurrentPositions"` MarginUtilizationPct float64 `json:"MarginUtilizationPct"` NetEquityForMargin float64 `json:"NetEquityForMargin"` NetPositionsCount float64 `json:"NetPositionsCount"` NonMarginPositionsValue float64 `json:"NonMarginPositionsValue"` OpenPositionsCount float64 `json:"OpenPositionsCount"` OptionPremiumsMarketValue float64 `json:"OptionPremiumsMarketValue"` OrdersCount float64 `json:"OrdersCount"` OtherCollateral float64 `json:"OtherCollateral"` SettlementValue float64 `json:"SettlementValue"` TotalValue float64 `json:"TotalValue"` TransactionsNotBooked float64 `json:"TransactionsNotBooked"` UnrealizedMarginClosedProfitLoss float64 `json:"UnrealizedMarginClosedProfitLoss"` UnrealizedMarginOpenProfitLoss float64 `json:"UnrealizedMarginOpenProfitLoss"` UnrealizedMarginProfitLoss float64 `json:"UnrealizedMarginProfitLoss"` UnrealizedPositionsValue float64 `json:"UnrealizedPositionsValue"` }
type Duration ¶
type Duration struct {
DurationType DurationType `json:"DurationType"`
}
type DurationType ¶
type DurationType string
type Exchange ¶
type Exchange struct { AllDay bool `json:"AllDay"` CountryCode string `json:"CountryCode"` Currency string `json:"Currency"` ExchangeID string `json:"ExchangeId"` ExchangeSessions []ExchangeSessions `json:"ExchangeSessions"` Mic string `json:"Mic"` Name string `json:"Name"` PriceSourceName string `json:"PriceSourceName,omitempty"` TimeZoneID string `json:"TimeZoneId"` TimeZone int `json:"TimeZone"` TimeZoneAbbreviation string `json:"TimeZoneAbbreviation"` TimeZoneOffset string `json:"TimeZoneOffset"` // Internal use IsOpen bool `json:",omitempty"` }
type ExchangeOrder ¶
type ExchangeSessions ¶
type Instrument ¶
type InstrumentDetails ¶
type InstrumentPrice ¶
type ListExchanges ¶
type ModeledAPI ¶
type ModeledAPI struct { Ctx context.Context Client *saxo_openapi.APIClient // contains filtered or unexported fields }
func NewModeledAPI ¶
func NewModeledAPI(ctx context.Context, client *saxo_openapi.APIClient) *ModeledAPI
func (*ModeledAPI) CreatePriceStream ¶
func (ma *ModeledAPI) CreatePriceStream(i Instrument) (chan *QuoteStream, *websocket.Conn, error)
func (*ModeledAPI) GetAccounts ¶
func (ma *ModeledAPI) GetAccounts() (*Accounts, error)
func (*ModeledAPI) GetBalanceMe ¶
func (ma *ModeledAPI) GetBalanceMe() (*Balance, error)
func (*ModeledAPI) GetExchange ¶
func (ma *ModeledAPI) GetExchange(id string) (*Exchange, error)
func (*ModeledAPI) GetInfoPrice ¶
func (ma *ModeledAPI) GetInfoPrice(i Instrument) (*InfoPrice, error)
func (*ModeledAPI) GetInstrument ¶
func (ma *ModeledAPI) GetInstrument(symbol string) (Instrument, error)
func (*ModeledAPI) GetInstrumentDetails ¶
func (ma *ModeledAPI) GetInstrumentDetails(i Instrument) (InstrumentDetails, error)
func (*ModeledAPI) GetInstrumentPrice ¶
func (ma *ModeledAPI) GetInstrumentPrice(i Instrument) (float64, error)
func (*ModeledAPI) GetOrdersMe ¶
func (ma *ModeledAPI) GetOrdersMe() (*OrderList, error)
func (*ModeledAPI) GetPositionsMe ¶
func (ma *ModeledAPI) GetPositionsMe() (*PositionList, error)
func (*ModeledAPI) Order ¶
func (ma *ModeledAPI) Order(o *Order) (*OrderResponse, error)
func (*ModeledAPI) PreOrder ¶
func (ma *ModeledAPI) PreOrder(o *Order) (*PreOrderResponse, error)
func (*ModeledAPI) Throttle ¶
func (ma *ModeledAPI) Throttle()
func (*ModeledAPI) UpdateLastCall ¶
func (ma *ModeledAPI) UpdateLastCall()
type Order ¶
type Order struct { AccountKey string `json:"AccountKey"` Amount int `json:"Amount"` BuySell BuySell `json:"BuySell"` OrderType OrderType `json:"OrderType"` ManualOrder bool `json:"ManualOrder"` Uic int32 `json:"Uic"` AssetType AssetType `json:"AssetType"` OrderDuration Duration `json:"OrderDuration"` Orders []Order `json:"Orders"` OrderPrice float64 `json:"OrderPrice,omitempty"` StopLimitPrice float64 `json:"StopLimitPrice,omitempty"` TrailingStopDistanceToMarket float64 `json:"TrailingStopDistanceToMarket,omitempty"` TrailingStopStep float64 `json:"TrailingStopStep,omitempty"` // Internal fields GoodToGo bool `json:"-"` EstimatedPrice float64 `json:"-"` }
Order is used on POST Orders Endpoints (EX. Placing an Order)
func (*Order) WithAmount ¶
func (*Order) WithBuySell ¶
func (*Order) WithDuration ¶
func (o *Order) WithDuration(duration DurationType) *Order
func (*Order) WithStopLimitPrice ¶
func (*Order) WithStopLoss ¶
func (*Order) WithStopLossStopLimit ¶
func (*Order) WithStopLossTrailingStop ¶
func (*Order) WithTakeProfit ¶
type OrderDistances ¶
type OrderDistances struct { EntryDefaultDistance float64 `json:"EntryDefaultDistance"` EntryDefaultDistanceType string `json:"EntryDefaultDistanceType"` StopLimitDefaultDistance int `json:"StopLimitDefaultDistance"` StopLimitDefaultDistanceType string `json:"StopLimitDefaultDistanceType"` StopLossDefaultDistance float64 `json:"StopLossDefaultDistance"` StopLossDefaultDistanceType string `json:"StopLossDefaultDistanceType"` StopLossDefaultEnabled bool `json:"StopLossDefaultEnabled"` StopLossDefaultOrderType string `json:"StopLossDefaultOrderType"` TakeProfitDefaultDistance float64 `json:"TakeProfitDefaultDistance"` TakeProfitDefaultDistanceType string `json:"TakeProfitDefaultDistanceType"` TakeProfitDefaultEnabled bool `json:"TakeProfitDefaultEnabled"` }
type OrderError ¶
type OrderError struct { ErrorCode string `json:"ErrorCode"` Message string `json:"Message"` ModelState map[string]string `json:"ModelState"` ErrorInfo ErrorInfo `json:"ErrorInfo"` Orders []struct { ErrorInfo ErrorInfo `json:"ErrorInfo"` } `json:"Orders"` }
func GetOrderError ¶
func GetOrderError(err error) *OrderError
type OrderList ¶
type OrderList struct { Count int `json:"__count"` Data []ActiveOrder `json:"Data"` }
type OrderResponse ¶
type OrderResponse struct { OrderID string `json:"OrderId"` TotalPrice float64 `json:"-"` Orders []*OrderResponse `json:"Orders"` ErrorInfo *struct { ErrorCode string `json:"ErrorCode,omitempty"` Message string `json:"Message,omitempty"` } `json:"ErrorInfo,omitempty"` }
type PositionBase ¶
type PositionBase struct { AccountID string `json:"AccountId"` AccountKey string `json:"AccountKey"` Amount int `json:"Amount"` AssetType string `json:"AssetType"` CanBeClosed bool `json:"CanBeClosed"` ClientID string `json:"ClientId"` CloseConversionRateSettled bool `json:"CloseConversionRateSettled"` CorrelationKey string `json:"CorrelationKey"` ExecutionTimeOpen string `json:"ExecutionTimeOpen"` IsForceOpen bool `json:"IsForceOpen"` IsMarketOpen bool `json:"IsMarketOpen"` OpenPrice float64 `json:"OpenPrice"` RelatedOpenOrders []RelatedOpenOrders `json:"RelatedOpenOrders"` SourceOrderID string `json:"SourceOrderId"` Status string `json:"Status"` Uic int `json:"Uic"` ValueDate string `json:"ValueDate"` }
type PositionData ¶
type PositionData struct { NetPositionID string `json:"NetPositionId"` PositionBase PositionBase `json:"PositionBase"` PositionID string `json:"PositionId"` PositionView PositionView `json:"PositionView"` }
type PositionList ¶
type PositionList struct { Count int `json:"__count"` Data []PositionData `json:"Data"` }
type PositionView ¶
type PositionView struct { CalculationReliability string `json:"CalculationReliability"` CurrentPrice int `json:"CurrentPrice"` CurrentPriceDelayMinutes int `json:"CurrentPriceDelayMinutes"` CurrentPriceType string `json:"CurrentPriceType"` Exposure int `json:"Exposure"` ExposureCurrency string `json:"ExposureCurrency"` ExposureInBaseCurrency int `json:"ExposureInBaseCurrency"` InstrumentPriceDayPercentChange int `json:"InstrumentPriceDayPercentChange"` MarketValue int `json:"MarketValue"` ProfitLossOnTrade float64 `json:"ProfitLossOnTrade"` ProfitLossOnTradeInBaseCurrency float64 `json:"ProfitLossOnTradeInBaseCurrency"` TradeCostsTotal int `json:"TradeCostsTotal"` TradeCostsTotalInBaseCurrency int `json:"TradeCostsTotalInBaseCurrency"` }
type PreOrderResponse ¶
type PreOrderResponse struct { EstimatedCashRequired float64 `json:"EstimatedCashRequired"` EstimatedCashRequiredCurrency string `json:"EstimatedCashRequiredCurrency"` InstrumentToAccountConversionRate float64 `json:"InstrumentToAccountConversionRate"` PreCheckResult string `json:"PreCheckResult"` ErrorInfo ErrorInfo `json:"ErrorInfo"` }
type PriceRequestArguments ¶
type PriceSnapshot ¶
type PriceStreamRequest ¶
type PriceStreamRequest struct { Arguments PriceRequestArguments `json:"Arguments"` ContextID string `json:"ContextId"` ReferenceID string `json:"ReferenceId"` }
type PriceStreamResponse ¶
type Quote ¶
type Quote struct { Amount int `json:"Amount"` Ask float64 `json:"Ask"` Bid float64 `json:"Bid"` DelayedByMinutes int `json:"DelayedByMinutes"` ErrorCode string `json:"ErrorCode"` MarketState string `json:"MarketState,omitempty"` Mid float64 `json:"Mid"` PriceSource string `json:"PriceSource"` PriceSourceType string `json:"PriceSourceType"` PriceTypeAsk string `json:"PriceTypeAsk"` PriceTypeBid string `json:"PriceTypeBid"` RFQState string `json:"RFQState,omitempty"` }
type QuoteStream ¶
type RelatedInstruments ¶
type RelatedOpenOrders ¶
type RelatedOpenOrders struct { Amount int `json:"Amount"` Duration Duration `json:"Duration"` OpenOrderType string `json:"OpenOrderType"` OrderID string `json:"OrderId"` OrderPrice float64 `json:"OrderPrice"` Status string `json:"Status"` TrailingStopDistanceToMarket float64 `json:"TrailingStopDistanceToMarket"` TrailingStopStep float64 `json:"TrailingStopStep"` }
type SaxoInstrument ¶
type SaxoInstrument struct { AssetType AssetType `json:"AssetType"` CurrencyCode string `json:"CurrencyCode"` Description string `json:"Description"` ExchangeID string `json:"ExchangeId"` GroupID int `json:"GroupId"` Identifier int32 `json:"Identifier"` IssuerCountry string `json:"IssuerCountry"` PrimaryListing int `json:"PrimaryListing"` SummaryType string `json:"SummaryType"` Symbol string `json:"Symbol"` TradableAs []string `json:"TradableAs"` }
func (*SaxoInstrument) GetAssetType ¶
func (i *SaxoInstrument) GetAssetType() AssetType
func (*SaxoInstrument) GetExchangeID ¶
func (i *SaxoInstrument) GetExchangeID() string
func (*SaxoInstrument) GetID ¶
func (i *SaxoInstrument) GetID() int32
func (*SaxoInstrument) GetOrder ¶
func (i *SaxoInstrument) GetOrder() *Order
func (*SaxoInstrument) GetSymbol ¶
func (i *SaxoInstrument) GetSymbol() string
func (*SaxoInstrument) GetSymbolSimple ¶
func (i *SaxoInstrument) GetSymbolSimple() string
type SaxoInstrumentDetails ¶
type SaxoInstrumentDetails struct { AmountDecimals int `json:"AmountDecimals"` AssetType AssetType `json:"AssetType"` CurrencyCode string `json:"CurrencyCode"` DefaultAmount int `json:"DefaultAmount"` DefaultSlippage int `json:"DefaultSlippage"` DefaultSlippageType string `json:"DefaultSlippageType"` Description string `json:"Description"` Exchange Exchange `json:"Exchange"` Format Format `json:"Format"` GroupID int `json:"GroupId"` IncrementSize int `json:"IncrementSize"` IsBarrierEqualsStrike bool `json:"IsBarrierEqualsStrike"` IsComplex bool `json:"IsComplex"` IsTradable bool `json:"IsTradable"` LotSizeType string `json:"LotSizeType"` MinimumOrderValue int `json:"MinimumOrderValue"` MinimumTradeSize int `json:"MinimumTradeSize"` OrderDistances OrderDistances `json:"OrderDistances"` PriceCurrency string `json:"PriceCurrency"` PriceToContractFactor int `json:"PriceToContractFactor"` PrimaryListing int `json:"PrimaryListing"` RelatedInstruments []RelatedInstruments `json:"RelatedInstruments"` StandardAmounts []int `json:"StandardAmounts"` SupportedOrderTypes []string `json:"SupportedOrderTypes"` Symbol string `json:"Symbol"` TickSizeScheme TickSizeScheme `json:"TickSizeScheme"` TradableAs []string `json:"TradableAs"` TradableOn []string `json:"TradableOn"` TradingSignals string `json:"TradingSignals"` TurboDirection string `json:"TurboDirection"` Uic int32 `json:"Uic"` }
func (*SaxoInstrumentDetails) CalculatePriceWithThickSize ¶
func (id *SaxoInstrumentDetails) CalculatePriceWithThickSize(price float64, percentage float64) float64
func (*SaxoInstrumentDetails) GetAssetType ¶
func (i *SaxoInstrumentDetails) GetAssetType() AssetType
func (*SaxoInstrumentDetails) GetDecimals ¶
func (id *SaxoInstrumentDetails) GetDecimals() int
func (*SaxoInstrumentDetails) GetExchangeID ¶
func (i *SaxoInstrumentDetails) GetExchangeID() string
func (*SaxoInstrumentDetails) GetID ¶
func (i *SaxoInstrumentDetails) GetID() int32
func (*SaxoInstrumentDetails) GetMinimumOrderValue ¶
func (id *SaxoInstrumentDetails) GetMinimumOrderValue() int
func (*SaxoInstrumentDetails) GetMinimumTradeSize ¶
func (id *SaxoInstrumentDetails) GetMinimumTradeSize() int
func (*SaxoInstrumentDetails) GetOrder ¶
func (i *SaxoInstrumentDetails) GetOrder() *Order
func (*SaxoInstrumentDetails) GetSymbol ¶
func (i *SaxoInstrumentDetails) GetSymbol() string
func (*SaxoInstrumentDetails) GetSymbolSimple ¶
func (i *SaxoInstrumentDetails) GetSymbolSimple() string
type SaxoInstruments ¶
type SaxoInstruments struct {
Data []Instrument `json:"Data"`
}
type TickSizeScheme ¶
Click to show internal directories.
Click to hide internal directories.