api

package
v0.0.0-...-2c50256 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type BrokerAccountType

type BrokerAccountType string

Ref: #/components/schemas/BrokerAccountType

const (
	BrokerAccountTypeTinkoff    BrokerAccountType = "Tinkoff"
	BrokerAccountTypeTinkoffIis BrokerAccountType = "TinkoffIis"
)

func (BrokerAccountType) AllValues

func (BrokerAccountType) AllValues() []BrokerAccountType

AllValues returns all BrokerAccountType values.

func (*BrokerAccountType) Decode

func (s *BrokerAccountType) Decode(d *jx.Decoder) error

Decode decodes BrokerAccountType from json.

func (BrokerAccountType) Encode

func (s BrokerAccountType) Encode(e *jx.Encoder)

Encode encodes BrokerAccountType as json.

func (BrokerAccountType) MarshalJSON

func (s BrokerAccountType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (BrokerAccountType) MarshalText

func (s BrokerAccountType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*BrokerAccountType) SetFake

func (s *BrokerAccountType) SetFake()

SetFake set fake values.

func (*BrokerAccountType) UnmarshalJSON

func (s *BrokerAccountType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*BrokerAccountType) UnmarshalText

func (s *BrokerAccountType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (BrokerAccountType) Validate

func (s BrokerAccountType) Validate() error

type Candle

type Candle struct {
	Figi     string           `json:"figi"`
	Interval CandleResolution `json:"interval"`
	O        float64          `json:"o"`
	C        float64          `json:"c"`
	H        float64          `json:"h"`
	L        float64          `json:"l"`
	V        int32            `json:"v"`
	// ISO8601.
	Time time.Time `json:"time"`
}

Ref: #/components/schemas/Candle

func (*Candle) Decode

func (s *Candle) Decode(d *jx.Decoder) error

Decode decodes Candle from json.

func (*Candle) Encode

func (s *Candle) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Candle) GetC

func (s *Candle) GetC() float64

GetC returns the value of C.

func (*Candle) GetFigi

func (s *Candle) GetFigi() string

GetFigi returns the value of Figi.

func (*Candle) GetH

func (s *Candle) GetH() float64

GetH returns the value of H.

func (*Candle) GetInterval

func (s *Candle) GetInterval() CandleResolution

GetInterval returns the value of Interval.

func (*Candle) GetL

func (s *Candle) GetL() float64

GetL returns the value of L.

func (*Candle) GetO

func (s *Candle) GetO() float64

GetO returns the value of O.

func (*Candle) GetTime

func (s *Candle) GetTime() time.Time

GetTime returns the value of Time.

func (*Candle) GetV

func (s *Candle) GetV() int32

GetV returns the value of V.

func (*Candle) MarshalJSON

func (s *Candle) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Candle) SetC

func (s *Candle) SetC(val float64)

SetC sets the value of C.

func (*Candle) SetFake

func (s *Candle) SetFake()

SetFake set fake values.

func (*Candle) SetFigi

func (s *Candle) SetFigi(val string)

SetFigi sets the value of Figi.

func (*Candle) SetH

func (s *Candle) SetH(val float64)

SetH sets the value of H.

func (*Candle) SetInterval

func (s *Candle) SetInterval(val CandleResolution)

SetInterval sets the value of Interval.

func (*Candle) SetL

func (s *Candle) SetL(val float64)

SetL sets the value of L.

func (*Candle) SetO

func (s *Candle) SetO(val float64)

SetO sets the value of O.

func (*Candle) SetTime

func (s *Candle) SetTime(val time.Time)

SetTime sets the value of Time.

func (*Candle) SetV

func (s *Candle) SetV(val int32)

SetV sets the value of V.

func (*Candle) UnmarshalJSON

func (s *Candle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Candle) Validate

func (s *Candle) Validate() error

type CandleResolution

type CandleResolution string

Интервал свечи и допустимый промежуток запроса: - 1min [1 minute, 1 day] - 2min [2 minutes, 1 day] - 3min [3 minutes, 1 day] - 5min [5 minutes, 1 day] - 10min [10 minutes, 1 day] - 15min [15 minutes, 1 day] - 30min [30 minutes, 1 day] - hour [1 hour, 7 days] - day [1 day, 1 year] - week [7 days, 2 years] - month [1 month, 10 years]. Ref: #/components/schemas/CandleResolution

const (
	CandleResolution1min  CandleResolution = "1min"
	CandleResolution2min  CandleResolution = "2min"
	CandleResolution3min  CandleResolution = "3min"
	CandleResolution5min  CandleResolution = "5min"
	CandleResolution10min CandleResolution = "10min"
	CandleResolution15min CandleResolution = "15min"
	CandleResolution30min CandleResolution = "30min"
	CandleResolutionHour  CandleResolution = "hour"
	CandleResolutionDay   CandleResolution = "day"
	CandleResolutionWeek  CandleResolution = "week"
	CandleResolutionMonth CandleResolution = "month"
)

func (CandleResolution) AllValues

func (CandleResolution) AllValues() []CandleResolution

AllValues returns all CandleResolution values.

func (*CandleResolution) Decode

func (s *CandleResolution) Decode(d *jx.Decoder) error

Decode decodes CandleResolution from json.

func (CandleResolution) Encode

func (s CandleResolution) Encode(e *jx.Encoder)

Encode encodes CandleResolution as json.

func (CandleResolution) MarshalJSON

func (s CandleResolution) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (CandleResolution) MarshalText

func (s CandleResolution) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*CandleResolution) SetFake

func (s *CandleResolution) SetFake()

SetFake set fake values.

func (*CandleResolution) UnmarshalJSON

func (s *CandleResolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CandleResolution) UnmarshalText

func (s *CandleResolution) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (CandleResolution) Validate

func (s CandleResolution) Validate() error

type Candles

type Candles struct {
	Figi     string           `json:"figi"`
	Interval CandleResolution `json:"interval"`
	Candles  []Candle         `json:"candles"`
}

Ref: #/components/schemas/Candles

func (*Candles) Decode

func (s *Candles) Decode(d *jx.Decoder) error

Decode decodes Candles from json.

func (*Candles) Encode

func (s *Candles) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Candles) GetCandles

func (s *Candles) GetCandles() []Candle

GetCandles returns the value of Candles.

func (*Candles) GetFigi

func (s *Candles) GetFigi() string

GetFigi returns the value of Figi.

func (*Candles) GetInterval

func (s *Candles) GetInterval() CandleResolution

GetInterval returns the value of Interval.

func (*Candles) MarshalJSON

func (s *Candles) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Candles) SetCandles

func (s *Candles) SetCandles(val []Candle)

SetCandles sets the value of Candles.

func (*Candles) SetFake

func (s *Candles) SetFake()

SetFake set fake values.

func (*Candles) SetFigi

func (s *Candles) SetFigi(val string)

SetFigi sets the value of Figi.

func (*Candles) SetInterval

func (s *Candles) SetInterval(val CandleResolution)

SetInterval sets the value of Interval.

func (*Candles) UnmarshalJSON

func (s *Candles) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Candles) Validate

func (s *Candles) Validate() error

type CandlesResponse

type CandlesResponse struct {
	TrackingId string  `json:"trackingId"`
	Status     string  `json:"status"`
	Payload    Candles `json:"payload"`
}

Ref: #/components/schemas/CandlesResponse

func (*CandlesResponse) Decode

func (s *CandlesResponse) Decode(d *jx.Decoder) error

Decode decodes CandlesResponse from json.

func (*CandlesResponse) Encode

func (s *CandlesResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CandlesResponse) GetPayload

func (s *CandlesResponse) GetPayload() Candles

GetPayload returns the value of Payload.

func (*CandlesResponse) GetStatus

func (s *CandlesResponse) GetStatus() string

GetStatus returns the value of Status.

func (*CandlesResponse) GetTrackingId

func (s *CandlesResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*CandlesResponse) MarshalJSON

func (s *CandlesResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CandlesResponse) SetFake

func (s *CandlesResponse) SetFake()

SetFake set fake values.

func (*CandlesResponse) SetPayload

func (s *CandlesResponse) SetPayload(val Candles)

SetPayload sets the value of Payload.

func (*CandlesResponse) SetStatus

func (s *CandlesResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*CandlesResponse) SetTrackingId

func (s *CandlesResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*CandlesResponse) UnmarshalJSON

func (s *CandlesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CandlesResponse) Validate

func (s *CandlesResponse) Validate() error

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) MarketBondsGet

func (c *Client) MarketBondsGet(ctx context.Context) (MarketBondsGetRes, error)

MarketBondsGet invokes GET /market/bonds operation.

Получение списка облигаций.

GET /market/bonds

func (*Client) MarketCandlesGet

func (c *Client) MarketCandlesGet(ctx context.Context, params MarketCandlesGetParams) (MarketCandlesGetRes, error)

MarketCandlesGet invokes GET /market/candles operation.

Получение исторических свечей по FIGI.

GET /market/candles

func (*Client) MarketCurrenciesGet

func (c *Client) MarketCurrenciesGet(ctx context.Context) (MarketCurrenciesGetRes, error)

MarketCurrenciesGet invokes GET /market/currencies operation.

Получение списка валютных пар.

GET /market/currencies

func (*Client) MarketEtfsGet

func (c *Client) MarketEtfsGet(ctx context.Context) (MarketEtfsGetRes, error)

MarketEtfsGet invokes GET /market/etfs operation.

Получение списка ETF.

GET /market/etfs

func (*Client) MarketOrderbookGet

func (c *Client) MarketOrderbookGet(ctx context.Context, params MarketOrderbookGetParams) (MarketOrderbookGetRes, error)

MarketOrderbookGet invokes GET /market/orderbook operation.

Получение стакана по FIGI.

GET /market/orderbook

func (*Client) MarketSearchByFigiGet

func (c *Client) MarketSearchByFigiGet(ctx context.Context, params MarketSearchByFigiGetParams) (MarketSearchByFigiGetRes, error)

MarketSearchByFigiGet invokes GET /market/search/by-figi operation.

Получение инструмента по FIGI.

GET /market/search/by-figi

func (*Client) MarketSearchByTickerGet

func (c *Client) MarketSearchByTickerGet(ctx context.Context, params MarketSearchByTickerGetParams) (MarketSearchByTickerGetRes, error)

MarketSearchByTickerGet invokes GET /market/search/by-ticker operation.

Получение инструмента по тикеру.

GET /market/search/by-ticker

func (*Client) MarketStocksGet

func (c *Client) MarketStocksGet(ctx context.Context) (MarketStocksGetRes, error)

MarketStocksGet invokes GET /market/stocks operation.

Получение списка акций.

GET /market/stocks

func (*Client) OperationsGet

func (c *Client) OperationsGet(ctx context.Context, params OperationsGetParams) (OperationsGetRes, error)

OperationsGet invokes GET /operations operation.

Получение списка операций.

GET /operations

func (*Client) OrdersCancelPost

func (c *Client) OrdersCancelPost(ctx context.Context, params OrdersCancelPostParams) (OrdersCancelPostRes, error)

OrdersCancelPost invokes POST /orders/cancel operation.

Отмена заявки.

POST /orders/cancel

func (*Client) OrdersGet

func (c *Client) OrdersGet(ctx context.Context, params OrdersGetParams) (OrdersGetRes, error)

OrdersGet invokes GET /orders operation.

Получение списка активных заявок.

GET /orders

func (*Client) OrdersLimitOrderPost

func (c *Client) OrdersLimitOrderPost(ctx context.Context, request *LimitOrderRequest, params OrdersLimitOrderPostParams) (OrdersLimitOrderPostRes, error)

OrdersLimitOrderPost invokes POST /orders/limit-order operation.

Создание лимитной заявки.

POST /orders/limit-order

func (*Client) OrdersMarketOrderPost

func (c *Client) OrdersMarketOrderPost(ctx context.Context, request *MarketOrderRequest, params OrdersMarketOrderPostParams) (OrdersMarketOrderPostRes, error)

OrdersMarketOrderPost invokes POST /orders/market-order operation.

Создание рыночной заявки.

POST /orders/market-order

func (*Client) PortfolioCurrenciesGet

func (c *Client) PortfolioCurrenciesGet(ctx context.Context, params PortfolioCurrenciesGetParams) (PortfolioCurrenciesGetRes, error)

PortfolioCurrenciesGet invokes GET /portfolio/currencies operation.

Получение валютных активов клиента.

GET /portfolio/currencies

func (*Client) PortfolioGet

func (c *Client) PortfolioGet(ctx context.Context, params PortfolioGetParams) (PortfolioGetRes, error)

PortfolioGet invokes GET /portfolio operation.

Получение портфеля клиента.

GET /portfolio

func (*Client) SandboxClearPost

func (c *Client) SandboxClearPost(ctx context.Context, params SandboxClearPostParams) (SandboxClearPostRes, error)

SandboxClearPost invokes POST /sandbox/clear operation.

Удаление всех позиций клиента.

POST /sandbox/clear

func (*Client) SandboxCurrenciesBalancePost

SandboxCurrenciesBalancePost invokes POST /sandbox/currencies/balance operation.

Выставление баланса по валютным позициям.

POST /sandbox/currencies/balance

func (*Client) SandboxPositionsBalancePost

SandboxPositionsBalancePost invokes POST /sandbox/positions/balance operation.

Выставление баланса по инструментным позициям.

POST /sandbox/positions/balance

func (*Client) SandboxRegisterPost

func (c *Client) SandboxRegisterPost(ctx context.Context, request OptSandboxRegisterRequest) (SandboxRegisterPostRes, error)

SandboxRegisterPost invokes POST /sandbox/register operation.

Создание счета и валютных позиций для клиента.

POST /sandbox/register

func (*Client) SandboxRemovePost

func (c *Client) SandboxRemovePost(ctx context.Context, params SandboxRemovePostParams) (SandboxRemovePostRes, error)

SandboxRemovePost invokes POST /sandbox/remove operation.

Удаление счета клиента.

POST /sandbox/remove

func (*Client) UserAccountsGet

func (c *Client) UserAccountsGet(ctx context.Context) (UserAccountsGetRes, error)

UserAccountsGet invokes GET /user/accounts operation.

Получение брокерских счетов клиента.

GET /user/accounts

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type Currencies

type Currencies struct {
	Currencies []CurrencyPosition `json:"currencies"`
}

Ref: #/components/schemas/Currencies

func (*Currencies) Decode

func (s *Currencies) Decode(d *jx.Decoder) error

Decode decodes Currencies from json.

func (*Currencies) Encode

func (s *Currencies) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Currencies) GetCurrencies

func (s *Currencies) GetCurrencies() []CurrencyPosition

GetCurrencies returns the value of Currencies.

func (*Currencies) MarshalJSON

func (s *Currencies) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Currencies) SetCurrencies

func (s *Currencies) SetCurrencies(val []CurrencyPosition)

SetCurrencies sets the value of Currencies.

func (*Currencies) SetFake

func (s *Currencies) SetFake()

SetFake set fake values.

func (*Currencies) UnmarshalJSON

func (s *Currencies) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Currencies) Validate

func (s *Currencies) Validate() error

type Currency

type Currency string

Ref: #/components/schemas/Currency

const (
	CurrencyRUB Currency = "RUB"
	CurrencyUSD Currency = "USD"
	CurrencyEUR Currency = "EUR"
	CurrencyGBP Currency = "GBP"
	CurrencyHKD Currency = "HKD"
	CurrencyCHF Currency = "CHF"
	CurrencyJPY Currency = "JPY"
	CurrencyCNY Currency = "CNY"
	CurrencyTRY Currency = "TRY"
)

func (Currency) AllValues

func (Currency) AllValues() []Currency

AllValues returns all Currency values.

func (*Currency) Decode

func (s *Currency) Decode(d *jx.Decoder) error

Decode decodes Currency from json.

func (Currency) Encode

func (s Currency) Encode(e *jx.Encoder)

Encode encodes Currency as json.

func (Currency) MarshalJSON

func (s Currency) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (Currency) MarshalText

func (s Currency) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*Currency) SetFake

func (s *Currency) SetFake()

SetFake set fake values.

func (*Currency) UnmarshalJSON

func (s *Currency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Currency) UnmarshalText

func (s *Currency) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (Currency) Validate

func (s Currency) Validate() error

type CurrencyPosition

type CurrencyPosition struct {
	Currency Currency   `json:"currency"`
	Balance  float64    `json:"balance"`
	Blocked  OptFloat64 `json:"blocked"`
}

Ref: #/components/schemas/CurrencyPosition

func (*CurrencyPosition) Decode

func (s *CurrencyPosition) Decode(d *jx.Decoder) error

Decode decodes CurrencyPosition from json.

func (*CurrencyPosition) Encode

func (s *CurrencyPosition) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CurrencyPosition) GetBalance

func (s *CurrencyPosition) GetBalance() float64

GetBalance returns the value of Balance.

func (*CurrencyPosition) GetBlocked

func (s *CurrencyPosition) GetBlocked() OptFloat64

GetBlocked returns the value of Blocked.

func (*CurrencyPosition) GetCurrency

func (s *CurrencyPosition) GetCurrency() Currency

GetCurrency returns the value of Currency.

func (*CurrencyPosition) MarshalJSON

func (s *CurrencyPosition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CurrencyPosition) SetBalance

func (s *CurrencyPosition) SetBalance(val float64)

SetBalance sets the value of Balance.

func (*CurrencyPosition) SetBlocked

func (s *CurrencyPosition) SetBlocked(val OptFloat64)

SetBlocked sets the value of Blocked.

func (*CurrencyPosition) SetCurrency

func (s *CurrencyPosition) SetCurrency(val Currency)

SetCurrency sets the value of Currency.

func (*CurrencyPosition) SetFake

func (s *CurrencyPosition) SetFake()

SetFake set fake values.

func (*CurrencyPosition) UnmarshalJSON

func (s *CurrencyPosition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CurrencyPosition) Validate

func (s *CurrencyPosition) Validate() error

type Empty

type Empty struct {
	TrackingId string       `json:"trackingId"`
	Payload    EmptyPayload `json:"payload"`
	Status     string       `json:"status"`
}

Ref: #/components/schemas/Empty

func (*Empty) Decode

func (s *Empty) Decode(d *jx.Decoder) error

Decode decodes Empty from json.

func (*Empty) Encode

func (s *Empty) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Empty) GetPayload

func (s *Empty) GetPayload() EmptyPayload

GetPayload returns the value of Payload.

func (*Empty) GetStatus

func (s *Empty) GetStatus() string

GetStatus returns the value of Status.

func (*Empty) GetTrackingId

func (s *Empty) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*Empty) MarshalJSON

func (s *Empty) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Empty) SetFake

func (s *Empty) SetFake()

SetFake set fake values.

func (*Empty) SetPayload

func (s *Empty) SetPayload(val EmptyPayload)

SetPayload sets the value of Payload.

func (*Empty) SetStatus

func (s *Empty) SetStatus(val string)

SetStatus sets the value of Status.

func (*Empty) SetTrackingId

func (s *Empty) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*Empty) UnmarshalJSON

func (s *Empty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EmptyPayload

type EmptyPayload struct{}

func (*EmptyPayload) Decode

func (s *EmptyPayload) Decode(d *jx.Decoder) error

Decode decodes EmptyPayload from json.

func (*EmptyPayload) Encode

func (s *EmptyPayload) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EmptyPayload) MarshalJSON

func (s *EmptyPayload) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EmptyPayload) SetFake

func (s *EmptyPayload) SetFake()

SetFake set fake values.

func (*EmptyPayload) UnmarshalJSON

func (s *EmptyPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Error

type Error struct {
	TrackingId string       `json:"trackingId"`
	Status     string       `json:"status"`
	Payload    ErrorPayload `json:"payload"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetPayload

func (s *Error) GetPayload() ErrorPayload

GetPayload returns the value of Payload.

func (*Error) GetStatus

func (s *Error) GetStatus() string

GetStatus returns the value of Status.

func (*Error) GetTrackingId

func (s *Error) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetFake

func (s *Error) SetFake()

SetFake set fake values.

func (*Error) SetPayload

func (s *Error) SetPayload(val ErrorPayload)

SetPayload sets the value of Payload.

func (*Error) SetStatus

func (s *Error) SetStatus(val string)

SetStatus sets the value of Status.

func (*Error) SetTrackingId

func (s *Error) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorPayload

type ErrorPayload struct {
	Message OptString `json:"message"`
	Code    OptString `json:"code"`
}

func (*ErrorPayload) Decode

func (s *ErrorPayload) Decode(d *jx.Decoder) error

Decode decodes ErrorPayload from json.

func (*ErrorPayload) Encode

func (s *ErrorPayload) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ErrorPayload) GetCode

func (s *ErrorPayload) GetCode() OptString

GetCode returns the value of Code.

func (*ErrorPayload) GetMessage

func (s *ErrorPayload) GetMessage() OptString

GetMessage returns the value of Message.

func (*ErrorPayload) MarshalJSON

func (s *ErrorPayload) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ErrorPayload) SetCode

func (s *ErrorPayload) SetCode(val OptString)

SetCode sets the value of Code.

func (*ErrorPayload) SetFake

func (s *ErrorPayload) SetFake()

SetFake set fake values.

func (*ErrorPayload) SetMessage

func (s *ErrorPayload) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*ErrorPayload) UnmarshalJSON

func (s *ErrorPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Handler

type Handler interface {
	// MarketBondsGet implements GET /market/bonds operation.
	//
	// Получение списка облигаций.
	//
	// GET /market/bonds
	MarketBondsGet(ctx context.Context) (MarketBondsGetRes, error)
	// MarketCandlesGet implements GET /market/candles operation.
	//
	// Получение исторических свечей по FIGI.
	//
	// GET /market/candles
	MarketCandlesGet(ctx context.Context, params MarketCandlesGetParams) (MarketCandlesGetRes, error)
	// MarketCurrenciesGet implements GET /market/currencies operation.
	//
	// Получение списка валютных пар.
	//
	// GET /market/currencies
	MarketCurrenciesGet(ctx context.Context) (MarketCurrenciesGetRes, error)
	// MarketEtfsGet implements GET /market/etfs operation.
	//
	// Получение списка ETF.
	//
	// GET /market/etfs
	MarketEtfsGet(ctx context.Context) (MarketEtfsGetRes, error)
	// MarketOrderbookGet implements GET /market/orderbook operation.
	//
	// Получение стакана по FIGI.
	//
	// GET /market/orderbook
	MarketOrderbookGet(ctx context.Context, params MarketOrderbookGetParams) (MarketOrderbookGetRes, error)
	// MarketSearchByFigiGet implements GET /market/search/by-figi operation.
	//
	// Получение инструмента по FIGI.
	//
	// GET /market/search/by-figi
	MarketSearchByFigiGet(ctx context.Context, params MarketSearchByFigiGetParams) (MarketSearchByFigiGetRes, error)
	// MarketSearchByTickerGet implements GET /market/search/by-ticker operation.
	//
	// Получение инструмента по тикеру.
	//
	// GET /market/search/by-ticker
	MarketSearchByTickerGet(ctx context.Context, params MarketSearchByTickerGetParams) (MarketSearchByTickerGetRes, error)
	// MarketStocksGet implements GET /market/stocks operation.
	//
	// Получение списка акций.
	//
	// GET /market/stocks
	MarketStocksGet(ctx context.Context) (MarketStocksGetRes, error)
	// OperationsGet implements GET /operations operation.
	//
	// Получение списка операций.
	//
	// GET /operations
	OperationsGet(ctx context.Context, params OperationsGetParams) (OperationsGetRes, error)
	// OrdersCancelPost implements POST /orders/cancel operation.
	//
	// Отмена заявки.
	//
	// POST /orders/cancel
	OrdersCancelPost(ctx context.Context, params OrdersCancelPostParams) (OrdersCancelPostRes, error)
	// OrdersGet implements GET /orders operation.
	//
	// Получение списка активных заявок.
	//
	// GET /orders
	OrdersGet(ctx context.Context, params OrdersGetParams) (OrdersGetRes, error)
	// OrdersLimitOrderPost implements POST /orders/limit-order operation.
	//
	// Создание лимитной заявки.
	//
	// POST /orders/limit-order
	OrdersLimitOrderPost(ctx context.Context, req *LimitOrderRequest, params OrdersLimitOrderPostParams) (OrdersLimitOrderPostRes, error)
	// OrdersMarketOrderPost implements POST /orders/market-order operation.
	//
	// Создание рыночной заявки.
	//
	// POST /orders/market-order
	OrdersMarketOrderPost(ctx context.Context, req *MarketOrderRequest, params OrdersMarketOrderPostParams) (OrdersMarketOrderPostRes, error)
	// PortfolioCurrenciesGet implements GET /portfolio/currencies operation.
	//
	// Получение валютных активов клиента.
	//
	// GET /portfolio/currencies
	PortfolioCurrenciesGet(ctx context.Context, params PortfolioCurrenciesGetParams) (PortfolioCurrenciesGetRes, error)
	// PortfolioGet implements GET /portfolio operation.
	//
	// Получение портфеля клиента.
	//
	// GET /portfolio
	PortfolioGet(ctx context.Context, params PortfolioGetParams) (PortfolioGetRes, error)
	// SandboxClearPost implements POST /sandbox/clear operation.
	//
	// Удаление всех позиций клиента.
	//
	// POST /sandbox/clear
	SandboxClearPost(ctx context.Context, params SandboxClearPostParams) (SandboxClearPostRes, error)
	// SandboxCurrenciesBalancePost implements POST /sandbox/currencies/balance operation.
	//
	// Выставление баланса по валютным позициям.
	//
	// POST /sandbox/currencies/balance
	SandboxCurrenciesBalancePost(ctx context.Context, req *SandboxSetCurrencyBalanceRequest, params SandboxCurrenciesBalancePostParams) (SandboxCurrenciesBalancePostRes, error)
	// SandboxPositionsBalancePost implements POST /sandbox/positions/balance operation.
	//
	// Выставление баланса по инструментным позициям.
	//
	// POST /sandbox/positions/balance
	SandboxPositionsBalancePost(ctx context.Context, req *SandboxSetPositionBalanceRequest, params SandboxPositionsBalancePostParams) (SandboxPositionsBalancePostRes, error)
	// SandboxRegisterPost implements POST /sandbox/register operation.
	//
	// Создание счета и валютных позиций для клиента.
	//
	// POST /sandbox/register
	SandboxRegisterPost(ctx context.Context, req OptSandboxRegisterRequest) (SandboxRegisterPostRes, error)
	// SandboxRemovePost implements POST /sandbox/remove operation.
	//
	// Удаление счета клиента.
	//
	// POST /sandbox/remove
	SandboxRemovePost(ctx context.Context, params SandboxRemovePostParams) (SandboxRemovePostRes, error)
	// UserAccountsGet implements GET /user/accounts operation.
	//
	// Получение брокерских счетов клиента.
	//
	// GET /user/accounts
	UserAccountsGet(ctx context.Context) (UserAccountsGetRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type InstrumentType

type InstrumentType string

Ref: #/components/schemas/InstrumentType

const (
	InstrumentTypeStock    InstrumentType = "Stock"
	InstrumentTypeCurrency InstrumentType = "Currency"
	InstrumentTypeBond     InstrumentType = "Bond"
	InstrumentTypeEtf      InstrumentType = "Etf"
)

func (InstrumentType) AllValues

func (InstrumentType) AllValues() []InstrumentType

AllValues returns all InstrumentType values.

func (*InstrumentType) Decode

func (s *InstrumentType) Decode(d *jx.Decoder) error

Decode decodes InstrumentType from json.

func (InstrumentType) Encode

func (s InstrumentType) Encode(e *jx.Encoder)

Encode encodes InstrumentType as json.

func (InstrumentType) MarshalJSON

func (s InstrumentType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (InstrumentType) MarshalText

func (s InstrumentType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*InstrumentType) SetFake

func (s *InstrumentType) SetFake()

SetFake set fake values.

func (*InstrumentType) UnmarshalJSON

func (s *InstrumentType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InstrumentType) UnmarshalText

func (s *InstrumentType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (InstrumentType) Validate

func (s InstrumentType) Validate() error

type Invoker

type Invoker interface {
	// MarketBondsGet invokes GET /market/bonds operation.
	//
	// Получение списка облигаций.
	//
	// GET /market/bonds
	MarketBondsGet(ctx context.Context) (MarketBondsGetRes, error)
	// MarketCandlesGet invokes GET /market/candles operation.
	//
	// Получение исторических свечей по FIGI.
	//
	// GET /market/candles
	MarketCandlesGet(ctx context.Context, params MarketCandlesGetParams) (MarketCandlesGetRes, error)
	// MarketCurrenciesGet invokes GET /market/currencies operation.
	//
	// Получение списка валютных пар.
	//
	// GET /market/currencies
	MarketCurrenciesGet(ctx context.Context) (MarketCurrenciesGetRes, error)
	// MarketEtfsGet invokes GET /market/etfs operation.
	//
	// Получение списка ETF.
	//
	// GET /market/etfs
	MarketEtfsGet(ctx context.Context) (MarketEtfsGetRes, error)
	// MarketOrderbookGet invokes GET /market/orderbook operation.
	//
	// Получение стакана по FIGI.
	//
	// GET /market/orderbook
	MarketOrderbookGet(ctx context.Context, params MarketOrderbookGetParams) (MarketOrderbookGetRes, error)
	// MarketSearchByFigiGet invokes GET /market/search/by-figi operation.
	//
	// Получение инструмента по FIGI.
	//
	// GET /market/search/by-figi
	MarketSearchByFigiGet(ctx context.Context, params MarketSearchByFigiGetParams) (MarketSearchByFigiGetRes, error)
	// MarketSearchByTickerGet invokes GET /market/search/by-ticker operation.
	//
	// Получение инструмента по тикеру.
	//
	// GET /market/search/by-ticker
	MarketSearchByTickerGet(ctx context.Context, params MarketSearchByTickerGetParams) (MarketSearchByTickerGetRes, error)
	// MarketStocksGet invokes GET /market/stocks operation.
	//
	// Получение списка акций.
	//
	// GET /market/stocks
	MarketStocksGet(ctx context.Context) (MarketStocksGetRes, error)
	// OperationsGet invokes GET /operations operation.
	//
	// Получение списка операций.
	//
	// GET /operations
	OperationsGet(ctx context.Context, params OperationsGetParams) (OperationsGetRes, error)
	// OrdersCancelPost invokes POST /orders/cancel operation.
	//
	// Отмена заявки.
	//
	// POST /orders/cancel
	OrdersCancelPost(ctx context.Context, params OrdersCancelPostParams) (OrdersCancelPostRes, error)
	// OrdersGet invokes GET /orders operation.
	//
	// Получение списка активных заявок.
	//
	// GET /orders
	OrdersGet(ctx context.Context, params OrdersGetParams) (OrdersGetRes, error)
	// OrdersLimitOrderPost invokes POST /orders/limit-order operation.
	//
	// Создание лимитной заявки.
	//
	// POST /orders/limit-order
	OrdersLimitOrderPost(ctx context.Context, request *LimitOrderRequest, params OrdersLimitOrderPostParams) (OrdersLimitOrderPostRes, error)
	// OrdersMarketOrderPost invokes POST /orders/market-order operation.
	//
	// Создание рыночной заявки.
	//
	// POST /orders/market-order
	OrdersMarketOrderPost(ctx context.Context, request *MarketOrderRequest, params OrdersMarketOrderPostParams) (OrdersMarketOrderPostRes, error)
	// PortfolioCurrenciesGet invokes GET /portfolio/currencies operation.
	//
	// Получение валютных активов клиента.
	//
	// GET /portfolio/currencies
	PortfolioCurrenciesGet(ctx context.Context, params PortfolioCurrenciesGetParams) (PortfolioCurrenciesGetRes, error)
	// PortfolioGet invokes GET /portfolio operation.
	//
	// Получение портфеля клиента.
	//
	// GET /portfolio
	PortfolioGet(ctx context.Context, params PortfolioGetParams) (PortfolioGetRes, error)
	// SandboxClearPost invokes POST /sandbox/clear operation.
	//
	// Удаление всех позиций клиента.
	//
	// POST /sandbox/clear
	SandboxClearPost(ctx context.Context, params SandboxClearPostParams) (SandboxClearPostRes, error)
	// SandboxCurrenciesBalancePost invokes POST /sandbox/currencies/balance operation.
	//
	// Выставление баланса по валютным позициям.
	//
	// POST /sandbox/currencies/balance
	SandboxCurrenciesBalancePost(ctx context.Context, request *SandboxSetCurrencyBalanceRequest, params SandboxCurrenciesBalancePostParams) (SandboxCurrenciesBalancePostRes, error)
	// SandboxPositionsBalancePost invokes POST /sandbox/positions/balance operation.
	//
	// Выставление баланса по инструментным позициям.
	//
	// POST /sandbox/positions/balance
	SandboxPositionsBalancePost(ctx context.Context, request *SandboxSetPositionBalanceRequest, params SandboxPositionsBalancePostParams) (SandboxPositionsBalancePostRes, error)
	// SandboxRegisterPost invokes POST /sandbox/register operation.
	//
	// Создание счета и валютных позиций для клиента.
	//
	// POST /sandbox/register
	SandboxRegisterPost(ctx context.Context, request OptSandboxRegisterRequest) (SandboxRegisterPostRes, error)
	// SandboxRemovePost invokes POST /sandbox/remove operation.
	//
	// Удаление счета клиента.
	//
	// POST /sandbox/remove
	SandboxRemovePost(ctx context.Context, params SandboxRemovePostParams) (SandboxRemovePostRes, error)
	// UserAccountsGet invokes GET /user/accounts operation.
	//
	// Получение брокерских счетов клиента.
	//
	// GET /user/accounts
	UserAccountsGet(ctx context.Context) (UserAccountsGetRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type LimitOrderRequest

type LimitOrderRequest struct {
	Lots      int32         `json:"lots"`
	Operation OperationType `json:"operation"`
	Price     float64       `json:"price"`
}

Ref: #/components/schemas/LimitOrderRequest

func (*LimitOrderRequest) Decode

func (s *LimitOrderRequest) Decode(d *jx.Decoder) error

Decode decodes LimitOrderRequest from json.

func (*LimitOrderRequest) Encode

func (s *LimitOrderRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LimitOrderRequest) GetLots

func (s *LimitOrderRequest) GetLots() int32

GetLots returns the value of Lots.

func (*LimitOrderRequest) GetOperation

func (s *LimitOrderRequest) GetOperation() OperationType

GetOperation returns the value of Operation.

func (*LimitOrderRequest) GetPrice

func (s *LimitOrderRequest) GetPrice() float64

GetPrice returns the value of Price.

func (*LimitOrderRequest) MarshalJSON

func (s *LimitOrderRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LimitOrderRequest) SetFake

func (s *LimitOrderRequest) SetFake()

SetFake set fake values.

func (*LimitOrderRequest) SetLots

func (s *LimitOrderRequest) SetLots(val int32)

SetLots sets the value of Lots.

func (*LimitOrderRequest) SetOperation

func (s *LimitOrderRequest) SetOperation(val OperationType)

SetOperation sets the value of Operation.

func (*LimitOrderRequest) SetPrice

func (s *LimitOrderRequest) SetPrice(val float64)

SetPrice sets the value of Price.

func (*LimitOrderRequest) UnmarshalJSON

func (s *LimitOrderRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*LimitOrderRequest) Validate

func (s *LimitOrderRequest) Validate() error

type LimitOrderResponse

type LimitOrderResponse struct {
	TrackingId string           `json:"trackingId"`
	Status     string           `json:"status"`
	Payload    PlacedLimitOrder `json:"payload"`
}

Ref: #/components/schemas/LimitOrderResponse

func (*LimitOrderResponse) Decode

func (s *LimitOrderResponse) Decode(d *jx.Decoder) error

Decode decodes LimitOrderResponse from json.

func (*LimitOrderResponse) Encode

func (s *LimitOrderResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LimitOrderResponse) GetPayload

func (s *LimitOrderResponse) GetPayload() PlacedLimitOrder

GetPayload returns the value of Payload.

func (*LimitOrderResponse) GetStatus

func (s *LimitOrderResponse) GetStatus() string

GetStatus returns the value of Status.

func (*LimitOrderResponse) GetTrackingId

func (s *LimitOrderResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*LimitOrderResponse) MarshalJSON

func (s *LimitOrderResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LimitOrderResponse) SetFake

func (s *LimitOrderResponse) SetFake()

SetFake set fake values.

func (*LimitOrderResponse) SetPayload

func (s *LimitOrderResponse) SetPayload(val PlacedLimitOrder)

SetPayload sets the value of Payload.

func (*LimitOrderResponse) SetStatus

func (s *LimitOrderResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*LimitOrderResponse) SetTrackingId

func (s *LimitOrderResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*LimitOrderResponse) UnmarshalJSON

func (s *LimitOrderResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*LimitOrderResponse) Validate

func (s *LimitOrderResponse) Validate() error

type MarketBondsGetRes

type MarketBondsGetRes interface {
	// contains filtered or unexported methods
}

type MarketCandlesGetParams

type MarketCandlesGetParams struct {
	// FIGI.
	Figi string
	// Начало временного промежутка.
	From time.Time
	// Конец временного промежутка.
	To time.Time
	// Интервал свечи.
	Interval CandleResolution
}

MarketCandlesGetParams is parameters of GET /market/candles operation.

type MarketCandlesGetRes

type MarketCandlesGetRes interface {
	// contains filtered or unexported methods
}

type MarketCurrenciesGetRes

type MarketCurrenciesGetRes interface {
	// contains filtered or unexported methods
}

type MarketEtfsGetRes

type MarketEtfsGetRes interface {
	// contains filtered or unexported methods
}

type MarketInstrument

type MarketInstrument struct {
	Figi   string    `json:"figi"`
	Ticker string    `json:"ticker"`
	Isin   OptString `json:"isin"`
	// Шаг цены.
	MinPriceIncrement OptFloat64 `json:"minPriceIncrement"`
	Lot               int32      `json:"lot"`
	// Минимальное число инструментов для покупки должно
	// быть не меньше, чем размер лота х количество лотов.
	MinQuantity OptInt32       `json:"minQuantity"`
	Currency    OptCurrency    `json:"currency"`
	Name        string         `json:"name"`
	Type        InstrumentType `json:"type"`
}

Ref: #/components/schemas/MarketInstrument

func (*MarketInstrument) Decode

func (s *MarketInstrument) Decode(d *jx.Decoder) error

Decode decodes MarketInstrument from json.

func (*MarketInstrument) Encode

func (s *MarketInstrument) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MarketInstrument) GetCurrency

func (s *MarketInstrument) GetCurrency() OptCurrency

GetCurrency returns the value of Currency.

func (*MarketInstrument) GetFigi

func (s *MarketInstrument) GetFigi() string

GetFigi returns the value of Figi.

func (*MarketInstrument) GetIsin

func (s *MarketInstrument) GetIsin() OptString

GetIsin returns the value of Isin.

func (*MarketInstrument) GetLot

func (s *MarketInstrument) GetLot() int32

GetLot returns the value of Lot.

func (*MarketInstrument) GetMinPriceIncrement

func (s *MarketInstrument) GetMinPriceIncrement() OptFloat64

GetMinPriceIncrement returns the value of MinPriceIncrement.

func (*MarketInstrument) GetMinQuantity

func (s *MarketInstrument) GetMinQuantity() OptInt32

GetMinQuantity returns the value of MinQuantity.

func (*MarketInstrument) GetName

func (s *MarketInstrument) GetName() string

GetName returns the value of Name.

func (*MarketInstrument) GetTicker

func (s *MarketInstrument) GetTicker() string

GetTicker returns the value of Ticker.

func (*MarketInstrument) GetType

func (s *MarketInstrument) GetType() InstrumentType

GetType returns the value of Type.

func (*MarketInstrument) MarshalJSON

func (s *MarketInstrument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MarketInstrument) SetCurrency

func (s *MarketInstrument) SetCurrency(val OptCurrency)

SetCurrency sets the value of Currency.

func (*MarketInstrument) SetFake

func (s *MarketInstrument) SetFake()

SetFake set fake values.

func (*MarketInstrument) SetFigi

func (s *MarketInstrument) SetFigi(val string)

SetFigi sets the value of Figi.

func (*MarketInstrument) SetIsin

func (s *MarketInstrument) SetIsin(val OptString)

SetIsin sets the value of Isin.

func (*MarketInstrument) SetLot

func (s *MarketInstrument) SetLot(val int32)

SetLot sets the value of Lot.

func (*MarketInstrument) SetMinPriceIncrement

func (s *MarketInstrument) SetMinPriceIncrement(val OptFloat64)

SetMinPriceIncrement sets the value of MinPriceIncrement.

func (*MarketInstrument) SetMinQuantity

func (s *MarketInstrument) SetMinQuantity(val OptInt32)

SetMinQuantity sets the value of MinQuantity.

func (*MarketInstrument) SetName

func (s *MarketInstrument) SetName(val string)

SetName sets the value of Name.

func (*MarketInstrument) SetTicker

func (s *MarketInstrument) SetTicker(val string)

SetTicker sets the value of Ticker.

func (*MarketInstrument) SetType

func (s *MarketInstrument) SetType(val InstrumentType)

SetType sets the value of Type.

func (*MarketInstrument) UnmarshalJSON

func (s *MarketInstrument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MarketInstrument) Validate

func (s *MarketInstrument) Validate() error

type MarketInstrumentList

type MarketInstrumentList struct {
	Total       int32              `json:"total"`
	Instruments []MarketInstrument `json:"instruments"`
}

Ref: #/components/schemas/MarketInstrumentList

func (*MarketInstrumentList) Decode

func (s *MarketInstrumentList) Decode(d *jx.Decoder) error

Decode decodes MarketInstrumentList from json.

func (*MarketInstrumentList) Encode

func (s *MarketInstrumentList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MarketInstrumentList) GetInstruments

func (s *MarketInstrumentList) GetInstruments() []MarketInstrument

GetInstruments returns the value of Instruments.

func (*MarketInstrumentList) GetTotal

func (s *MarketInstrumentList) GetTotal() int32

GetTotal returns the value of Total.

func (*MarketInstrumentList) MarshalJSON

func (s *MarketInstrumentList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MarketInstrumentList) SetFake

func (s *MarketInstrumentList) SetFake()

SetFake set fake values.

func (*MarketInstrumentList) SetInstruments

func (s *MarketInstrumentList) SetInstruments(val []MarketInstrument)

SetInstruments sets the value of Instruments.

func (*MarketInstrumentList) SetTotal

func (s *MarketInstrumentList) SetTotal(val int32)

SetTotal sets the value of Total.

func (*MarketInstrumentList) UnmarshalJSON

func (s *MarketInstrumentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MarketInstrumentList) Validate

func (s *MarketInstrumentList) Validate() error

type MarketInstrumentListResponse

type MarketInstrumentListResponse struct {
	TrackingId string               `json:"trackingId"`
	Status     string               `json:"status"`
	Payload    MarketInstrumentList `json:"payload"`
}

Ref: #/components/schemas/MarketInstrumentListResponse

func (*MarketInstrumentListResponse) Decode

Decode decodes MarketInstrumentListResponse from json.

func (*MarketInstrumentListResponse) Encode

func (s *MarketInstrumentListResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MarketInstrumentListResponse) GetPayload

GetPayload returns the value of Payload.

func (*MarketInstrumentListResponse) GetStatus

func (s *MarketInstrumentListResponse) GetStatus() string

GetStatus returns the value of Status.

func (*MarketInstrumentListResponse) GetTrackingId

func (s *MarketInstrumentListResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*MarketInstrumentListResponse) MarshalJSON

func (s *MarketInstrumentListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MarketInstrumentListResponse) SetFake

func (s *MarketInstrumentListResponse) SetFake()

SetFake set fake values.

func (*MarketInstrumentListResponse) SetPayload

SetPayload sets the value of Payload.

func (*MarketInstrumentListResponse) SetStatus

func (s *MarketInstrumentListResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*MarketInstrumentListResponse) SetTrackingId

func (s *MarketInstrumentListResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*MarketInstrumentListResponse) UnmarshalJSON

func (s *MarketInstrumentListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MarketInstrumentListResponse) Validate

func (s *MarketInstrumentListResponse) Validate() error

type MarketOrderRequest

type MarketOrderRequest struct {
	Lots      int32         `json:"lots"`
	Operation OperationType `json:"operation"`
}

Ref: #/components/schemas/MarketOrderRequest

func (*MarketOrderRequest) Decode

func (s *MarketOrderRequest) Decode(d *jx.Decoder) error

Decode decodes MarketOrderRequest from json.

func (*MarketOrderRequest) Encode

func (s *MarketOrderRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MarketOrderRequest) GetLots

func (s *MarketOrderRequest) GetLots() int32

GetLots returns the value of Lots.

func (*MarketOrderRequest) GetOperation

func (s *MarketOrderRequest) GetOperation() OperationType

GetOperation returns the value of Operation.

func (*MarketOrderRequest) MarshalJSON

func (s *MarketOrderRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MarketOrderRequest) SetFake

func (s *MarketOrderRequest) SetFake()

SetFake set fake values.

func (*MarketOrderRequest) SetLots

func (s *MarketOrderRequest) SetLots(val int32)

SetLots sets the value of Lots.

func (*MarketOrderRequest) SetOperation

func (s *MarketOrderRequest) SetOperation(val OperationType)

SetOperation sets the value of Operation.

func (*MarketOrderRequest) UnmarshalJSON

func (s *MarketOrderRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MarketOrderRequest) Validate

func (s *MarketOrderRequest) Validate() error

type MarketOrderResponse

type MarketOrderResponse struct {
	TrackingId string            `json:"trackingId"`
	Status     string            `json:"status"`
	Payload    PlacedMarketOrder `json:"payload"`
}

Ref: #/components/schemas/MarketOrderResponse

func (*MarketOrderResponse) Decode

func (s *MarketOrderResponse) Decode(d *jx.Decoder) error

Decode decodes MarketOrderResponse from json.

func (*MarketOrderResponse) Encode

func (s *MarketOrderResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MarketOrderResponse) GetPayload

func (s *MarketOrderResponse) GetPayload() PlacedMarketOrder

GetPayload returns the value of Payload.

func (*MarketOrderResponse) GetStatus

func (s *MarketOrderResponse) GetStatus() string

GetStatus returns the value of Status.

func (*MarketOrderResponse) GetTrackingId

func (s *MarketOrderResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*MarketOrderResponse) MarshalJSON

func (s *MarketOrderResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MarketOrderResponse) SetFake

func (s *MarketOrderResponse) SetFake()

SetFake set fake values.

func (*MarketOrderResponse) SetPayload

func (s *MarketOrderResponse) SetPayload(val PlacedMarketOrder)

SetPayload sets the value of Payload.

func (*MarketOrderResponse) SetStatus

func (s *MarketOrderResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*MarketOrderResponse) SetTrackingId

func (s *MarketOrderResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*MarketOrderResponse) UnmarshalJSON

func (s *MarketOrderResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MarketOrderResponse) Validate

func (s *MarketOrderResponse) Validate() error

type MarketOrderbookGetParams

type MarketOrderbookGetParams struct {
	// FIGI.
	Figi string
	// Глубина стакана [1..20].
	Depth int32
}

MarketOrderbookGetParams is parameters of GET /market/orderbook operation.

type MarketOrderbookGetRes

type MarketOrderbookGetRes interface {
	// contains filtered or unexported methods
}

type MarketSearchByFigiGetParams

type MarketSearchByFigiGetParams struct {
	// FIGI.
	Figi string
}

MarketSearchByFigiGetParams is parameters of GET /market/search/by-figi operation.

type MarketSearchByFigiGetRes

type MarketSearchByFigiGetRes interface {
	// contains filtered or unexported methods
}

type MarketSearchByTickerGetParams

type MarketSearchByTickerGetParams struct {
	// Тикер инструмента.
	Ticker string
}

MarketSearchByTickerGetParams is parameters of GET /market/search/by-ticker operation.

type MarketSearchByTickerGetRes

type MarketSearchByTickerGetRes interface {
	// contains filtered or unexported methods
}

type MarketStocksGetRes

type MarketStocksGetRes interface {
	// contains filtered or unexported methods
}

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type MoneyAmount

type MoneyAmount struct {
	Currency Currency `json:"currency"`
	Value    float64  `json:"value"`
}

Ref: #/components/schemas/MoneyAmount

func (*MoneyAmount) Decode

func (s *MoneyAmount) Decode(d *jx.Decoder) error

Decode decodes MoneyAmount from json.

func (*MoneyAmount) Encode

func (s *MoneyAmount) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MoneyAmount) GetCurrency

func (s *MoneyAmount) GetCurrency() Currency

GetCurrency returns the value of Currency.

func (*MoneyAmount) GetValue

func (s *MoneyAmount) GetValue() float64

GetValue returns the value of Value.

func (*MoneyAmount) MarshalJSON

func (s *MoneyAmount) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MoneyAmount) SetCurrency

func (s *MoneyAmount) SetCurrency(val Currency)

SetCurrency sets the value of Currency.

func (*MoneyAmount) SetFake

func (s *MoneyAmount) SetFake()

SetFake set fake values.

func (*MoneyAmount) SetValue

func (s *MoneyAmount) SetValue(val float64)

SetValue sets the value of Value.

func (*MoneyAmount) UnmarshalJSON

func (s *MoneyAmount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MoneyAmount) Validate

func (s *MoneyAmount) Validate() error

type Operation

type Operation struct {
	ID         string           `json:"id"`
	Status     OperationStatus  `json:"status"`
	Trades     []OperationTrade `json:"trades"`
	Commission OptMoneyAmount   `json:"commission"`
	Currency   Currency         `json:"currency"`
	Payment    float64          `json:"payment"`
	Price      OptFloat64       `json:"price"`
	// Число инструментов в выставленной заявке.
	Quantity OptInt32 `json:"quantity"`
	// Число инструментов, исполненных в заявке.
	QuantityExecuted OptInt32          `json:"quantityExecuted"`
	Figi             OptString         `json:"figi"`
	InstrumentType   OptInstrumentType `json:"instrumentType"`
	IsMarginCall     bool              `json:"isMarginCall"`
	// ISO8601.
	Date          time.Time                      `json:"date"`
	OperationType OptOperationTypeWithCommission `json:"operationType"`
}

Ref: #/components/schemas/Operation

func (*Operation) Decode

func (s *Operation) Decode(d *jx.Decoder) error

Decode decodes Operation from json.

func (*Operation) Encode

func (s *Operation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Operation) GetCommission

func (s *Operation) GetCommission() OptMoneyAmount

GetCommission returns the value of Commission.

func (*Operation) GetCurrency

func (s *Operation) GetCurrency() Currency

GetCurrency returns the value of Currency.

func (*Operation) GetDate

func (s *Operation) GetDate() time.Time

GetDate returns the value of Date.

func (*Operation) GetFigi

func (s *Operation) GetFigi() OptString

GetFigi returns the value of Figi.

func (*Operation) GetID

func (s *Operation) GetID() string

GetID returns the value of ID.

func (*Operation) GetInstrumentType

func (s *Operation) GetInstrumentType() OptInstrumentType

GetInstrumentType returns the value of InstrumentType.

func (*Operation) GetIsMarginCall

func (s *Operation) GetIsMarginCall() bool

GetIsMarginCall returns the value of IsMarginCall.

func (*Operation) GetOperationType

func (s *Operation) GetOperationType() OptOperationTypeWithCommission

GetOperationType returns the value of OperationType.

func (*Operation) GetPayment

func (s *Operation) GetPayment() float64

GetPayment returns the value of Payment.

func (*Operation) GetPrice

func (s *Operation) GetPrice() OptFloat64

GetPrice returns the value of Price.

func (*Operation) GetQuantity

func (s *Operation) GetQuantity() OptInt32

GetQuantity returns the value of Quantity.

func (*Operation) GetQuantityExecuted

func (s *Operation) GetQuantityExecuted() OptInt32

GetQuantityExecuted returns the value of QuantityExecuted.

func (*Operation) GetStatus

func (s *Operation) GetStatus() OperationStatus

GetStatus returns the value of Status.

func (*Operation) GetTrades

func (s *Operation) GetTrades() []OperationTrade

GetTrades returns the value of Trades.

func (*Operation) MarshalJSON

func (s *Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Operation) SetCommission

func (s *Operation) SetCommission(val OptMoneyAmount)

SetCommission sets the value of Commission.

func (*Operation) SetCurrency

func (s *Operation) SetCurrency(val Currency)

SetCurrency sets the value of Currency.

func (*Operation) SetDate

func (s *Operation) SetDate(val time.Time)

SetDate sets the value of Date.

func (*Operation) SetFake

func (s *Operation) SetFake()

SetFake set fake values.

func (*Operation) SetFigi

func (s *Operation) SetFigi(val OptString)

SetFigi sets the value of Figi.

func (*Operation) SetID

func (s *Operation) SetID(val string)

SetID sets the value of ID.

func (*Operation) SetInstrumentType

func (s *Operation) SetInstrumentType(val OptInstrumentType)

SetInstrumentType sets the value of InstrumentType.

func (*Operation) SetIsMarginCall

func (s *Operation) SetIsMarginCall(val bool)

SetIsMarginCall sets the value of IsMarginCall.

func (*Operation) SetOperationType

func (s *Operation) SetOperationType(val OptOperationTypeWithCommission)

SetOperationType sets the value of OperationType.

func (*Operation) SetPayment

func (s *Operation) SetPayment(val float64)

SetPayment sets the value of Payment.

func (*Operation) SetPrice

func (s *Operation) SetPrice(val OptFloat64)

SetPrice sets the value of Price.

func (*Operation) SetQuantity

func (s *Operation) SetQuantity(val OptInt32)

SetQuantity sets the value of Quantity.

func (*Operation) SetQuantityExecuted

func (s *Operation) SetQuantityExecuted(val OptInt32)

SetQuantityExecuted sets the value of QuantityExecuted.

func (*Operation) SetStatus

func (s *Operation) SetStatus(val OperationStatus)

SetStatus sets the value of Status.

func (*Operation) SetTrades

func (s *Operation) SetTrades(val []OperationTrade)

SetTrades sets the value of Trades.

func (*Operation) UnmarshalJSON

func (s *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Operation) Validate

func (s *Operation) Validate() error

type OperationStatus

type OperationStatus string

Статус заявки. Ref: #/components/schemas/OperationStatus

const (
	OperationStatusDone     OperationStatus = "Done"
	OperationStatusDecline  OperationStatus = "Decline"
	OperationStatusProgress OperationStatus = "Progress"
)

func (OperationStatus) AllValues

func (OperationStatus) AllValues() []OperationStatus

AllValues returns all OperationStatus values.

func (*OperationStatus) Decode

func (s *OperationStatus) Decode(d *jx.Decoder) error

Decode decodes OperationStatus from json.

func (OperationStatus) Encode

func (s OperationStatus) Encode(e *jx.Encoder)

Encode encodes OperationStatus as json.

func (OperationStatus) MarshalJSON

func (s OperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OperationStatus) MarshalText

func (s OperationStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*OperationStatus) SetFake

func (s *OperationStatus) SetFake()

SetFake set fake values.

func (*OperationStatus) UnmarshalJSON

func (s *OperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OperationStatus) UnmarshalText

func (s *OperationStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (OperationStatus) Validate

func (s OperationStatus) Validate() error

type OperationTrade

type OperationTrade struct {
	TradeId string `json:"tradeId"`
	// ISO8601.
	Date     time.Time `json:"date"`
	Price    float64   `json:"price"`
	Quantity int32     `json:"quantity"`
}

Ref: #/components/schemas/OperationTrade

func (*OperationTrade) Decode

func (s *OperationTrade) Decode(d *jx.Decoder) error

Decode decodes OperationTrade from json.

func (*OperationTrade) Encode

func (s *OperationTrade) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OperationTrade) GetDate

func (s *OperationTrade) GetDate() time.Time

GetDate returns the value of Date.

func (*OperationTrade) GetPrice

func (s *OperationTrade) GetPrice() float64

GetPrice returns the value of Price.

func (*OperationTrade) GetQuantity

func (s *OperationTrade) GetQuantity() int32

GetQuantity returns the value of Quantity.

func (*OperationTrade) GetTradeId

func (s *OperationTrade) GetTradeId() string

GetTradeId returns the value of TradeId.

func (*OperationTrade) MarshalJSON

func (s *OperationTrade) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OperationTrade) SetDate

func (s *OperationTrade) SetDate(val time.Time)

SetDate sets the value of Date.

func (*OperationTrade) SetFake

func (s *OperationTrade) SetFake()

SetFake set fake values.

func (*OperationTrade) SetPrice

func (s *OperationTrade) SetPrice(val float64)

SetPrice sets the value of Price.

func (*OperationTrade) SetQuantity

func (s *OperationTrade) SetQuantity(val int32)

SetQuantity sets the value of Quantity.

func (*OperationTrade) SetTradeId

func (s *OperationTrade) SetTradeId(val string)

SetTradeId sets the value of TradeId.

func (*OperationTrade) UnmarshalJSON

func (s *OperationTrade) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OperationTrade) Validate

func (s *OperationTrade) Validate() error

type OperationType

type OperationType string

Ref: #/components/schemas/OperationType

const (
	OperationTypeBuy  OperationType = "Buy"
	OperationTypeSell OperationType = "Sell"
)

func (OperationType) AllValues

func (OperationType) AllValues() []OperationType

AllValues returns all OperationType values.

func (*OperationType) Decode

func (s *OperationType) Decode(d *jx.Decoder) error

Decode decodes OperationType from json.

func (OperationType) Encode

func (s OperationType) Encode(e *jx.Encoder)

Encode encodes OperationType as json.

func (OperationType) MarshalJSON

func (s OperationType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OperationType) MarshalText

func (s OperationType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*OperationType) SetFake

func (s *OperationType) SetFake()

SetFake set fake values.

func (*OperationType) UnmarshalJSON

func (s *OperationType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OperationType) UnmarshalText

func (s *OperationType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (OperationType) Validate

func (s OperationType) Validate() error

type OperationTypeWithCommission

type OperationTypeWithCommission string

Ref: #/components/schemas/OperationTypeWithCommission

const (
	OperationTypeWithCommissionBuy                OperationTypeWithCommission = "Buy"
	OperationTypeWithCommissionBuyCard            OperationTypeWithCommission = "BuyCard"
	OperationTypeWithCommissionSell               OperationTypeWithCommission = "Sell"
	OperationTypeWithCommissionBrokerCommission   OperationTypeWithCommission = "BrokerCommission"
	OperationTypeWithCommissionExchangeCommission OperationTypeWithCommission = "ExchangeCommission"
	OperationTypeWithCommissionServiceCommission  OperationTypeWithCommission = "ServiceCommission"
	OperationTypeWithCommissionMarginCommission   OperationTypeWithCommission = "MarginCommission"
	OperationTypeWithCommissionOtherCommission    OperationTypeWithCommission = "OtherCommission"
	OperationTypeWithCommissionPayIn              OperationTypeWithCommission = "PayIn"
	OperationTypeWithCommissionPayOut             OperationTypeWithCommission = "PayOut"
	OperationTypeWithCommissionTax                OperationTypeWithCommission = "Tax"
	OperationTypeWithCommissionTaxLucre           OperationTypeWithCommission = "TaxLucre"
	OperationTypeWithCommissionTaxDividend        OperationTypeWithCommission = "TaxDividend"
	OperationTypeWithCommissionTaxCoupon          OperationTypeWithCommission = "TaxCoupon"
	OperationTypeWithCommissionTaxBack            OperationTypeWithCommission = "TaxBack"
	OperationTypeWithCommissionRepayment          OperationTypeWithCommission = "Repayment"
	OperationTypeWithCommissionPartRepayment      OperationTypeWithCommission = "PartRepayment"
	OperationTypeWithCommissionCoupon             OperationTypeWithCommission = "Coupon"
	OperationTypeWithCommissionDividend           OperationTypeWithCommission = "Dividend"
	OperationTypeWithCommissionSecurityIn         OperationTypeWithCommission = "SecurityIn"
	OperationTypeWithCommissionSecurityOut        OperationTypeWithCommission = "SecurityOut"
)

func (OperationTypeWithCommission) AllValues

AllValues returns all OperationTypeWithCommission values.

func (*OperationTypeWithCommission) Decode

Decode decodes OperationTypeWithCommission from json.

func (OperationTypeWithCommission) Encode

func (s OperationTypeWithCommission) Encode(e *jx.Encoder)

Encode encodes OperationTypeWithCommission as json.

func (OperationTypeWithCommission) MarshalJSON

func (s OperationTypeWithCommission) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OperationTypeWithCommission) MarshalText

func (s OperationTypeWithCommission) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*OperationTypeWithCommission) SetFake

func (s *OperationTypeWithCommission) SetFake()

SetFake set fake values.

func (*OperationTypeWithCommission) UnmarshalJSON

func (s *OperationTypeWithCommission) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OperationTypeWithCommission) UnmarshalText

func (s *OperationTypeWithCommission) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (OperationTypeWithCommission) Validate

func (s OperationTypeWithCommission) Validate() error

type Operations

type Operations struct {
	Operations []Operation `json:"operations"`
}

Ref: #/components/schemas/Operations

func (*Operations) Decode

func (s *Operations) Decode(d *jx.Decoder) error

Decode decodes Operations from json.

func (*Operations) Encode

func (s *Operations) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Operations) GetOperations

func (s *Operations) GetOperations() []Operation

GetOperations returns the value of Operations.

func (*Operations) MarshalJSON

func (s *Operations) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Operations) SetFake

func (s *Operations) SetFake()

SetFake set fake values.

func (*Operations) SetOperations

func (s *Operations) SetOperations(val []Operation)

SetOperations sets the value of Operations.

func (*Operations) UnmarshalJSON

func (s *Operations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Operations) Validate

func (s *Operations) Validate() error

type OperationsGetParams

type OperationsGetParams struct {
	// Начало временного промежутка.
	From time.Time
	// Конец временного промежутка.
	To time.Time
	// Figi инструмента для фильтрации.
	Figi OptString
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

OperationsGetParams is parameters of GET /operations operation.

type OperationsGetRes

type OperationsGetRes interface {
	// contains filtered or unexported methods
}

type OperationsResponse

type OperationsResponse struct {
	TrackingId string     `json:"trackingId"`
	Status     string     `json:"status"`
	Payload    Operations `json:"payload"`
}

Ref: #/components/schemas/OperationsResponse

func (*OperationsResponse) Decode

func (s *OperationsResponse) Decode(d *jx.Decoder) error

Decode decodes OperationsResponse from json.

func (*OperationsResponse) Encode

func (s *OperationsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OperationsResponse) GetPayload

func (s *OperationsResponse) GetPayload() Operations

GetPayload returns the value of Payload.

func (*OperationsResponse) GetStatus

func (s *OperationsResponse) GetStatus() string

GetStatus returns the value of Status.

func (*OperationsResponse) GetTrackingId

func (s *OperationsResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*OperationsResponse) MarshalJSON

func (s *OperationsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OperationsResponse) SetFake

func (s *OperationsResponse) SetFake()

SetFake set fake values.

func (*OperationsResponse) SetPayload

func (s *OperationsResponse) SetPayload(val Operations)

SetPayload sets the value of Payload.

func (*OperationsResponse) SetStatus

func (s *OperationsResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*OperationsResponse) SetTrackingId

func (s *OperationsResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*OperationsResponse) UnmarshalJSON

func (s *OperationsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OperationsResponse) Validate

func (s *OperationsResponse) Validate() error

type OptBrokerAccountType

type OptBrokerAccountType struct {
	Value BrokerAccountType
	Set   bool
}

OptBrokerAccountType is optional BrokerAccountType.

func NewOptBrokerAccountType

func NewOptBrokerAccountType(v BrokerAccountType) OptBrokerAccountType

NewOptBrokerAccountType returns new OptBrokerAccountType with value set to v.

func (*OptBrokerAccountType) Decode

func (o *OptBrokerAccountType) Decode(d *jx.Decoder) error

Decode decodes BrokerAccountType from json.

func (OptBrokerAccountType) Encode

func (o OptBrokerAccountType) Encode(e *jx.Encoder)

Encode encodes BrokerAccountType as json.

func (OptBrokerAccountType) Get

Get returns value and boolean that denotes whether value was set.

func (OptBrokerAccountType) IsSet

func (o OptBrokerAccountType) IsSet() bool

IsSet returns true if OptBrokerAccountType was set.

func (OptBrokerAccountType) MarshalJSON

func (s OptBrokerAccountType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBrokerAccountType) Or

Or returns value if set, or given parameter if does not.

func (*OptBrokerAccountType) Reset

func (o *OptBrokerAccountType) Reset()

Reset unsets value.

func (*OptBrokerAccountType) SetFake

func (s *OptBrokerAccountType) SetFake()

SetFake set fake values.

func (*OptBrokerAccountType) SetTo

SetTo sets value to v.

func (*OptBrokerAccountType) UnmarshalJSON

func (s *OptBrokerAccountType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCurrency

type OptCurrency struct {
	Value Currency
	Set   bool
}

OptCurrency is optional Currency.

func NewOptCurrency

func NewOptCurrency(v Currency) OptCurrency

NewOptCurrency returns new OptCurrency with value set to v.

func (*OptCurrency) Decode

func (o *OptCurrency) Decode(d *jx.Decoder) error

Decode decodes Currency from json.

func (OptCurrency) Encode

func (o OptCurrency) Encode(e *jx.Encoder)

Encode encodes Currency as json.

func (OptCurrency) Get

func (o OptCurrency) Get() (v Currency, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCurrency) IsSet

func (o OptCurrency) IsSet() bool

IsSet returns true if OptCurrency was set.

func (OptCurrency) MarshalJSON

func (s OptCurrency) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCurrency) Or

func (o OptCurrency) Or(d Currency) Currency

Or returns value if set, or given parameter if does not.

func (*OptCurrency) Reset

func (o *OptCurrency) Reset()

Reset unsets value.

func (*OptCurrency) SetFake

func (s *OptCurrency) SetFake()

SetFake set fake values.

func (*OptCurrency) SetTo

func (o *OptCurrency) SetTo(v Currency)

SetTo sets value to v.

func (*OptCurrency) UnmarshalJSON

func (s *OptCurrency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

OptFloat64 is optional float64.

func NewOptFloat64

func NewOptFloat64(v float64) OptFloat64

NewOptFloat64 returns new OptFloat64 with value set to v.

func (*OptFloat64) Decode

func (o *OptFloat64) Decode(d *jx.Decoder) error

Decode decodes float64 from json.

func (OptFloat64) Encode

func (o OptFloat64) Encode(e *jx.Encoder)

Encode encodes float64 as json.

func (OptFloat64) Get

func (o OptFloat64) Get() (v float64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFloat64) IsSet

func (o OptFloat64) IsSet() bool

IsSet returns true if OptFloat64 was set.

func (OptFloat64) MarshalJSON

func (s OptFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFloat64) Or

func (o OptFloat64) Or(d float64) float64

Or returns value if set, or given parameter if does not.

func (*OptFloat64) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetFake

func (s *OptFloat64) SetFake()

SetFake set fake values.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInstrumentType

type OptInstrumentType struct {
	Value InstrumentType
	Set   bool
}

OptInstrumentType is optional InstrumentType.

func NewOptInstrumentType

func NewOptInstrumentType(v InstrumentType) OptInstrumentType

NewOptInstrumentType returns new OptInstrumentType with value set to v.

func (*OptInstrumentType) Decode

func (o *OptInstrumentType) Decode(d *jx.Decoder) error

Decode decodes InstrumentType from json.

func (OptInstrumentType) Encode

func (o OptInstrumentType) Encode(e *jx.Encoder)

Encode encodes InstrumentType as json.

func (OptInstrumentType) Get

func (o OptInstrumentType) Get() (v InstrumentType, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInstrumentType) IsSet

func (o OptInstrumentType) IsSet() bool

IsSet returns true if OptInstrumentType was set.

func (OptInstrumentType) MarshalJSON

func (s OptInstrumentType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInstrumentType) Or

Or returns value if set, or given parameter if does not.

func (*OptInstrumentType) Reset

func (o *OptInstrumentType) Reset()

Reset unsets value.

func (*OptInstrumentType) SetFake

func (s *OptInstrumentType) SetFake()

SetFake set fake values.

func (*OptInstrumentType) SetTo

func (o *OptInstrumentType) SetTo(v InstrumentType)

SetTo sets value to v.

func (*OptInstrumentType) UnmarshalJSON

func (s *OptInstrumentType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt32

type OptInt32 struct {
	Value int32
	Set   bool
}

OptInt32 is optional int32.

func NewOptInt32

func NewOptInt32(v int32) OptInt32

NewOptInt32 returns new OptInt32 with value set to v.

func (*OptInt32) Decode

func (o *OptInt32) Decode(d *jx.Decoder) error

Decode decodes int32 from json.

func (OptInt32) Encode

func (o OptInt32) Encode(e *jx.Encoder)

Encode encodes int32 as json.

func (OptInt32) Get

func (o OptInt32) Get() (v int32, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt32) IsSet

func (o OptInt32) IsSet() bool

IsSet returns true if OptInt32 was set.

func (OptInt32) MarshalJSON

func (s OptInt32) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt32) Or

func (o OptInt32) Or(d int32) int32

Or returns value if set, or given parameter if does not.

func (*OptInt32) Reset

func (o *OptInt32) Reset()

Reset unsets value.

func (*OptInt32) SetFake

func (s *OptInt32) SetFake()

SetFake set fake values.

func (*OptInt32) SetTo

func (o *OptInt32) SetTo(v int32)

SetTo sets value to v.

func (*OptInt32) UnmarshalJSON

func (s *OptInt32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMoneyAmount

type OptMoneyAmount struct {
	Value MoneyAmount
	Set   bool
}

OptMoneyAmount is optional MoneyAmount.

func NewOptMoneyAmount

func NewOptMoneyAmount(v MoneyAmount) OptMoneyAmount

NewOptMoneyAmount returns new OptMoneyAmount with value set to v.

func (*OptMoneyAmount) Decode

func (o *OptMoneyAmount) Decode(d *jx.Decoder) error

Decode decodes MoneyAmount from json.

func (OptMoneyAmount) Encode

func (o OptMoneyAmount) Encode(e *jx.Encoder)

Encode encodes MoneyAmount as json.

func (OptMoneyAmount) Get

func (o OptMoneyAmount) Get() (v MoneyAmount, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMoneyAmount) IsSet

func (o OptMoneyAmount) IsSet() bool

IsSet returns true if OptMoneyAmount was set.

func (OptMoneyAmount) MarshalJSON

func (s OptMoneyAmount) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMoneyAmount) Or

Or returns value if set, or given parameter if does not.

func (*OptMoneyAmount) Reset

func (o *OptMoneyAmount) Reset()

Reset unsets value.

func (*OptMoneyAmount) SetFake

func (s *OptMoneyAmount) SetFake()

SetFake set fake values.

func (*OptMoneyAmount) SetTo

func (o *OptMoneyAmount) SetTo(v MoneyAmount)

SetTo sets value to v.

func (*OptMoneyAmount) UnmarshalJSON

func (s *OptMoneyAmount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptOperationTypeWithCommission

type OptOperationTypeWithCommission struct {
	Value OperationTypeWithCommission
	Set   bool
}

OptOperationTypeWithCommission is optional OperationTypeWithCommission.

func NewOptOperationTypeWithCommission

func NewOptOperationTypeWithCommission(v OperationTypeWithCommission) OptOperationTypeWithCommission

NewOptOperationTypeWithCommission returns new OptOperationTypeWithCommission with value set to v.

func (*OptOperationTypeWithCommission) Decode

Decode decodes OperationTypeWithCommission from json.

func (OptOperationTypeWithCommission) Encode

Encode encodes OperationTypeWithCommission as json.

func (OptOperationTypeWithCommission) Get

Get returns value and boolean that denotes whether value was set.

func (OptOperationTypeWithCommission) IsSet

IsSet returns true if OptOperationTypeWithCommission was set.

func (OptOperationTypeWithCommission) MarshalJSON

func (s OptOperationTypeWithCommission) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptOperationTypeWithCommission) Or

Or returns value if set, or given parameter if does not.

func (*OptOperationTypeWithCommission) Reset

func (o *OptOperationTypeWithCommission) Reset()

Reset unsets value.

func (*OptOperationTypeWithCommission) SetFake

func (s *OptOperationTypeWithCommission) SetFake()

SetFake set fake values.

func (*OptOperationTypeWithCommission) SetTo

SetTo sets value to v.

func (*OptOperationTypeWithCommission) UnmarshalJSON

func (s *OptOperationTypeWithCommission) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSandboxRegisterRequest

type OptSandboxRegisterRequest struct {
	Value SandboxRegisterRequest
	Set   bool
}

OptSandboxRegisterRequest is optional SandboxRegisterRequest.

func NewOptSandboxRegisterRequest

func NewOptSandboxRegisterRequest(v SandboxRegisterRequest) OptSandboxRegisterRequest

NewOptSandboxRegisterRequest returns new OptSandboxRegisterRequest with value set to v.

func (*OptSandboxRegisterRequest) Decode

func (o *OptSandboxRegisterRequest) Decode(d *jx.Decoder) error

Decode decodes SandboxRegisterRequest from json.

func (OptSandboxRegisterRequest) Encode

func (o OptSandboxRegisterRequest) Encode(e *jx.Encoder)

Encode encodes SandboxRegisterRequest as json.

func (OptSandboxRegisterRequest) Get

Get returns value and boolean that denotes whether value was set.

func (OptSandboxRegisterRequest) IsSet

func (o OptSandboxRegisterRequest) IsSet() bool

IsSet returns true if OptSandboxRegisterRequest was set.

func (OptSandboxRegisterRequest) MarshalJSON

func (s OptSandboxRegisterRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSandboxRegisterRequest) Or

Or returns value if set, or given parameter if does not.

func (*OptSandboxRegisterRequest) Reset

func (o *OptSandboxRegisterRequest) Reset()

Reset unsets value.

func (*OptSandboxRegisterRequest) SetFake

func (s *OptSandboxRegisterRequest) SetFake()

SetFake set fake values.

func (*OptSandboxRegisterRequest) SetTo

SetTo sets value to v.

func (*OptSandboxRegisterRequest) UnmarshalJSON

func (s *OptSandboxRegisterRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetFake

func (s *OptString) SetFake()

SetFake set fake values.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Order

type Order struct {
	OrderId       string        `json:"orderId"`
	Figi          string        `json:"figi"`
	Operation     OperationType `json:"operation"`
	Status        OrderStatus   `json:"status"`
	RequestedLots int32         `json:"requestedLots"`
	ExecutedLots  int32         `json:"executedLots"`
	Type          OrderType     `json:"type"`
	Price         float64       `json:"price"`
}

Ref: #/components/schemas/Order

func (*Order) Decode

func (s *Order) Decode(d *jx.Decoder) error

Decode decodes Order from json.

func (*Order) Encode

func (s *Order) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Order) GetExecutedLots

func (s *Order) GetExecutedLots() int32

GetExecutedLots returns the value of ExecutedLots.

func (*Order) GetFigi

func (s *Order) GetFigi() string

GetFigi returns the value of Figi.

func (*Order) GetOperation

func (s *Order) GetOperation() OperationType

GetOperation returns the value of Operation.

func (*Order) GetOrderId

func (s *Order) GetOrderId() string

GetOrderId returns the value of OrderId.

func (*Order) GetPrice

func (s *Order) GetPrice() float64

GetPrice returns the value of Price.

func (*Order) GetRequestedLots

func (s *Order) GetRequestedLots() int32

GetRequestedLots returns the value of RequestedLots.

func (*Order) GetStatus

func (s *Order) GetStatus() OrderStatus

GetStatus returns the value of Status.

func (*Order) GetType

func (s *Order) GetType() OrderType

GetType returns the value of Type.

func (*Order) MarshalJSON

func (s *Order) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Order) SetExecutedLots

func (s *Order) SetExecutedLots(val int32)

SetExecutedLots sets the value of ExecutedLots.

func (*Order) SetFake

func (s *Order) SetFake()

SetFake set fake values.

func (*Order) SetFigi

func (s *Order) SetFigi(val string)

SetFigi sets the value of Figi.

func (*Order) SetOperation

func (s *Order) SetOperation(val OperationType)

SetOperation sets the value of Operation.

func (*Order) SetOrderId

func (s *Order) SetOrderId(val string)

SetOrderId sets the value of OrderId.

func (*Order) SetPrice

func (s *Order) SetPrice(val float64)

SetPrice sets the value of Price.

func (*Order) SetRequestedLots

func (s *Order) SetRequestedLots(val int32)

SetRequestedLots sets the value of RequestedLots.

func (*Order) SetStatus

func (s *Order) SetStatus(val OrderStatus)

SetStatus sets the value of Status.

func (*Order) SetType

func (s *Order) SetType(val OrderType)

SetType sets the value of Type.

func (*Order) UnmarshalJSON

func (s *Order) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Order) Validate

func (s *Order) Validate() error

type OrderResponse

type OrderResponse struct {
	Price    float64 `json:"price"`
	Quantity int32   `json:"quantity"`
}

Ref: #/components/schemas/OrderResponse

func (*OrderResponse) Decode

func (s *OrderResponse) Decode(d *jx.Decoder) error

Decode decodes OrderResponse from json.

func (*OrderResponse) Encode

func (s *OrderResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OrderResponse) GetPrice

func (s *OrderResponse) GetPrice() float64

GetPrice returns the value of Price.

func (*OrderResponse) GetQuantity

func (s *OrderResponse) GetQuantity() int32

GetQuantity returns the value of Quantity.

func (*OrderResponse) MarshalJSON

func (s *OrderResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OrderResponse) SetFake

func (s *OrderResponse) SetFake()

SetFake set fake values.

func (*OrderResponse) SetPrice

func (s *OrderResponse) SetPrice(val float64)

SetPrice sets the value of Price.

func (*OrderResponse) SetQuantity

func (s *OrderResponse) SetQuantity(val int32)

SetQuantity sets the value of Quantity.

func (*OrderResponse) UnmarshalJSON

func (s *OrderResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OrderResponse) Validate

func (s *OrderResponse) Validate() error

type OrderStatus

type OrderStatus string

Статус заявки. Ref: #/components/schemas/OrderStatus

const (
	OrderStatusNew            OrderStatus = "New"
	OrderStatusPartiallyFill  OrderStatus = "PartiallyFill"
	OrderStatusFill           OrderStatus = "Fill"
	OrderStatusCancelled      OrderStatus = "Cancelled"
	OrderStatusReplaced       OrderStatus = "Replaced"
	OrderStatusPendingCancel  OrderStatus = "PendingCancel"
	OrderStatusRejected       OrderStatus = "Rejected"
	OrderStatusPendingReplace OrderStatus = "PendingReplace"
	OrderStatusPendingNew     OrderStatus = "PendingNew"
)

func (OrderStatus) AllValues

func (OrderStatus) AllValues() []OrderStatus

AllValues returns all OrderStatus values.

func (*OrderStatus) Decode

func (s *OrderStatus) Decode(d *jx.Decoder) error

Decode decodes OrderStatus from json.

func (OrderStatus) Encode

func (s OrderStatus) Encode(e *jx.Encoder)

Encode encodes OrderStatus as json.

func (OrderStatus) MarshalJSON

func (s OrderStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OrderStatus) MarshalText

func (s OrderStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*OrderStatus) SetFake

func (s *OrderStatus) SetFake()

SetFake set fake values.

func (*OrderStatus) UnmarshalJSON

func (s *OrderStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OrderStatus) UnmarshalText

func (s *OrderStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (OrderStatus) Validate

func (s OrderStatus) Validate() error

type OrderType

type OrderType string

Тип заявки. Ref: #/components/schemas/OrderType

const (
	OrderTypeLimit  OrderType = "Limit"
	OrderTypeMarket OrderType = "Market"
)

func (OrderType) AllValues

func (OrderType) AllValues() []OrderType

AllValues returns all OrderType values.

func (*OrderType) Decode

func (s *OrderType) Decode(d *jx.Decoder) error

Decode decodes OrderType from json.

func (OrderType) Encode

func (s OrderType) Encode(e *jx.Encoder)

Encode encodes OrderType as json.

func (OrderType) MarshalJSON

func (s OrderType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OrderType) MarshalText

func (s OrderType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*OrderType) SetFake

func (s *OrderType) SetFake()

SetFake set fake values.

func (*OrderType) UnmarshalJSON

func (s *OrderType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OrderType) UnmarshalText

func (s *OrderType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (OrderType) Validate

func (s OrderType) Validate() error

type Orderbook

type Orderbook struct {
	Figi        string          `json:"figi"`
	Depth       int32           `json:"depth"`
	Bids        []OrderResponse `json:"bids"`
	Asks        []OrderResponse `json:"asks"`
	TradeStatus TradeStatus     `json:"tradeStatus"`
	// Шаг цены.
	MinPriceIncrement float64 `json:"minPriceIncrement"`
	// Номинал для облигаций.
	FaceValue  OptFloat64 `json:"faceValue"`
	LastPrice  OptFloat64 `json:"lastPrice"`
	ClosePrice OptFloat64 `json:"closePrice"`
	// Верхняя граница цены.
	LimitUp OptFloat64 `json:"limitUp"`
	// Нижняя граница цены.
	LimitDown OptFloat64 `json:"limitDown"`
}

Ref: #/components/schemas/Orderbook

func (*Orderbook) Decode

func (s *Orderbook) Decode(d *jx.Decoder) error

Decode decodes Orderbook from json.

func (*Orderbook) Encode

func (s *Orderbook) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Orderbook) GetAsks

func (s *Orderbook) GetAsks() []OrderResponse

GetAsks returns the value of Asks.

func (*Orderbook) GetBids

func (s *Orderbook) GetBids() []OrderResponse

GetBids returns the value of Bids.

func (*Orderbook) GetClosePrice

func (s *Orderbook) GetClosePrice() OptFloat64

GetClosePrice returns the value of ClosePrice.

func (*Orderbook) GetDepth

func (s *Orderbook) GetDepth() int32

GetDepth returns the value of Depth.

func (*Orderbook) GetFaceValue

func (s *Orderbook) GetFaceValue() OptFloat64

GetFaceValue returns the value of FaceValue.

func (*Orderbook) GetFigi

func (s *Orderbook) GetFigi() string

GetFigi returns the value of Figi.

func (*Orderbook) GetLastPrice

func (s *Orderbook) GetLastPrice() OptFloat64

GetLastPrice returns the value of LastPrice.

func (*Orderbook) GetLimitDown

func (s *Orderbook) GetLimitDown() OptFloat64

GetLimitDown returns the value of LimitDown.

func (*Orderbook) GetLimitUp

func (s *Orderbook) GetLimitUp() OptFloat64

GetLimitUp returns the value of LimitUp.

func (*Orderbook) GetMinPriceIncrement

func (s *Orderbook) GetMinPriceIncrement() float64

GetMinPriceIncrement returns the value of MinPriceIncrement.

func (*Orderbook) GetTradeStatus

func (s *Orderbook) GetTradeStatus() TradeStatus

GetTradeStatus returns the value of TradeStatus.

func (*Orderbook) MarshalJSON

func (s *Orderbook) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Orderbook) SetAsks

func (s *Orderbook) SetAsks(val []OrderResponse)

SetAsks sets the value of Asks.

func (*Orderbook) SetBids

func (s *Orderbook) SetBids(val []OrderResponse)

SetBids sets the value of Bids.

func (*Orderbook) SetClosePrice

func (s *Orderbook) SetClosePrice(val OptFloat64)

SetClosePrice sets the value of ClosePrice.

func (*Orderbook) SetDepth

func (s *Orderbook) SetDepth(val int32)

SetDepth sets the value of Depth.

func (*Orderbook) SetFaceValue

func (s *Orderbook) SetFaceValue(val OptFloat64)

SetFaceValue sets the value of FaceValue.

func (*Orderbook) SetFake

func (s *Orderbook) SetFake()

SetFake set fake values.

func (*Orderbook) SetFigi

func (s *Orderbook) SetFigi(val string)

SetFigi sets the value of Figi.

func (*Orderbook) SetLastPrice

func (s *Orderbook) SetLastPrice(val OptFloat64)

SetLastPrice sets the value of LastPrice.

func (*Orderbook) SetLimitDown

func (s *Orderbook) SetLimitDown(val OptFloat64)

SetLimitDown sets the value of LimitDown.

func (*Orderbook) SetLimitUp

func (s *Orderbook) SetLimitUp(val OptFloat64)

SetLimitUp sets the value of LimitUp.

func (*Orderbook) SetMinPriceIncrement

func (s *Orderbook) SetMinPriceIncrement(val float64)

SetMinPriceIncrement sets the value of MinPriceIncrement.

func (*Orderbook) SetTradeStatus

func (s *Orderbook) SetTradeStatus(val TradeStatus)

SetTradeStatus sets the value of TradeStatus.

func (*Orderbook) UnmarshalJSON

func (s *Orderbook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Orderbook) Validate

func (s *Orderbook) Validate() error

type OrderbookResponse

type OrderbookResponse struct {
	TrackingId string    `json:"trackingId"`
	Status     string    `json:"status"`
	Payload    Orderbook `json:"payload"`
}

Ref: #/components/schemas/OrderbookResponse

func (*OrderbookResponse) Decode

func (s *OrderbookResponse) Decode(d *jx.Decoder) error

Decode decodes OrderbookResponse from json.

func (*OrderbookResponse) Encode

func (s *OrderbookResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OrderbookResponse) GetPayload

func (s *OrderbookResponse) GetPayload() Orderbook

GetPayload returns the value of Payload.

func (*OrderbookResponse) GetStatus

func (s *OrderbookResponse) GetStatus() string

GetStatus returns the value of Status.

func (*OrderbookResponse) GetTrackingId

func (s *OrderbookResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*OrderbookResponse) MarshalJSON

func (s *OrderbookResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OrderbookResponse) SetFake

func (s *OrderbookResponse) SetFake()

SetFake set fake values.

func (*OrderbookResponse) SetPayload

func (s *OrderbookResponse) SetPayload(val Orderbook)

SetPayload sets the value of Payload.

func (*OrderbookResponse) SetStatus

func (s *OrderbookResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*OrderbookResponse) SetTrackingId

func (s *OrderbookResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*OrderbookResponse) UnmarshalJSON

func (s *OrderbookResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OrderbookResponse) Validate

func (s *OrderbookResponse) Validate() error

type OrdersCancelPostParams

type OrdersCancelPostParams struct {
	// ID заявки.
	OrderId string
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

OrdersCancelPostParams is parameters of POST /orders/cancel operation.

type OrdersCancelPostRes

type OrdersCancelPostRes interface {
	// contains filtered or unexported methods
}

type OrdersGetParams

type OrdersGetParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

OrdersGetParams is parameters of GET /orders operation.

type OrdersGetRes

type OrdersGetRes interface {
	// contains filtered or unexported methods
}

type OrdersLimitOrderPostParams

type OrdersLimitOrderPostParams struct {
	// FIGI инструмента.
	Figi string
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

OrdersLimitOrderPostParams is parameters of POST /orders/limit-order operation.

type OrdersLimitOrderPostRes

type OrdersLimitOrderPostRes interface {
	// contains filtered or unexported methods
}

type OrdersMarketOrderPostParams

type OrdersMarketOrderPostParams struct {
	// FIGI инструмента.
	Figi string
	// Уникальный идентификатор счета (по умолчанию -
	// Тинькофф).
	BrokerAccountId OptString
}

OrdersMarketOrderPostParams is parameters of POST /orders/market-order operation.

type OrdersMarketOrderPostRes

type OrdersMarketOrderPostRes interface {
	// contains filtered or unexported methods
}

type OrdersResponse

type OrdersResponse struct {
	TrackingId string  `json:"trackingId"`
	Status     string  `json:"status"`
	Payload    []Order `json:"payload"`
}

Ref: #/components/schemas/OrdersResponse

func (*OrdersResponse) Decode

func (s *OrdersResponse) Decode(d *jx.Decoder) error

Decode decodes OrdersResponse from json.

func (*OrdersResponse) Encode

func (s *OrdersResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OrdersResponse) GetPayload

func (s *OrdersResponse) GetPayload() []Order

GetPayload returns the value of Payload.

func (*OrdersResponse) GetStatus

func (s *OrdersResponse) GetStatus() string

GetStatus returns the value of Status.

func (*OrdersResponse) GetTrackingId

func (s *OrdersResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*OrdersResponse) MarshalJSON

func (s *OrdersResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OrdersResponse) SetFake

func (s *OrdersResponse) SetFake()

SetFake set fake values.

func (*OrdersResponse) SetPayload

func (s *OrdersResponse) SetPayload(val []Order)

SetPayload sets the value of Payload.

func (*OrdersResponse) SetStatus

func (s *OrdersResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*OrdersResponse) SetTrackingId

func (s *OrdersResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*OrdersResponse) UnmarshalJSON

func (s *OrdersResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*OrdersResponse) Validate

func (s *OrdersResponse) Validate() error

type PlacedLimitOrder

type PlacedLimitOrder struct {
	OrderId      string        `json:"orderId"`
	Operation    OperationType `json:"operation"`
	Status       OrderStatus   `json:"status"`
	RejectReason OptString     `json:"rejectReason"`
	// Сообщение об ошибке.
	Message       OptString      `json:"message"`
	RequestedLots int            `json:"requestedLots"`
	ExecutedLots  int            `json:"executedLots"`
	Commission    OptMoneyAmount `json:"commission"`
}

Ref: #/components/schemas/PlacedLimitOrder

func (*PlacedLimitOrder) Decode

func (s *PlacedLimitOrder) Decode(d *jx.Decoder) error

Decode decodes PlacedLimitOrder from json.

func (*PlacedLimitOrder) Encode

func (s *PlacedLimitOrder) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PlacedLimitOrder) GetCommission

func (s *PlacedLimitOrder) GetCommission() OptMoneyAmount

GetCommission returns the value of Commission.

func (*PlacedLimitOrder) GetExecutedLots

func (s *PlacedLimitOrder) GetExecutedLots() int

GetExecutedLots returns the value of ExecutedLots.

func (*PlacedLimitOrder) GetMessage

func (s *PlacedLimitOrder) GetMessage() OptString

GetMessage returns the value of Message.

func (*PlacedLimitOrder) GetOperation

func (s *PlacedLimitOrder) GetOperation() OperationType

GetOperation returns the value of Operation.

func (*PlacedLimitOrder) GetOrderId

func (s *PlacedLimitOrder) GetOrderId() string

GetOrderId returns the value of OrderId.

func (*PlacedLimitOrder) GetRejectReason

func (s *PlacedLimitOrder) GetRejectReason() OptString

GetRejectReason returns the value of RejectReason.

func (*PlacedLimitOrder) GetRequestedLots

func (s *PlacedLimitOrder) GetRequestedLots() int

GetRequestedLots returns the value of RequestedLots.

func (*PlacedLimitOrder) GetStatus

func (s *PlacedLimitOrder) GetStatus() OrderStatus

GetStatus returns the value of Status.

func (*PlacedLimitOrder) MarshalJSON

func (s *PlacedLimitOrder) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PlacedLimitOrder) SetCommission

func (s *PlacedLimitOrder) SetCommission(val OptMoneyAmount)

SetCommission sets the value of Commission.

func (*PlacedLimitOrder) SetExecutedLots

func (s *PlacedLimitOrder) SetExecutedLots(val int)

SetExecutedLots sets the value of ExecutedLots.

func (*PlacedLimitOrder) SetFake

func (s *PlacedLimitOrder) SetFake()

SetFake set fake values.

func (*PlacedLimitOrder) SetMessage

func (s *PlacedLimitOrder) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*PlacedLimitOrder) SetOperation

func (s *PlacedLimitOrder) SetOperation(val OperationType)

SetOperation sets the value of Operation.

func (*PlacedLimitOrder) SetOrderId

func (s *PlacedLimitOrder) SetOrderId(val string)

SetOrderId sets the value of OrderId.

func (*PlacedLimitOrder) SetRejectReason

func (s *PlacedLimitOrder) SetRejectReason(val OptString)

SetRejectReason sets the value of RejectReason.

func (*PlacedLimitOrder) SetRequestedLots

func (s *PlacedLimitOrder) SetRequestedLots(val int)

SetRequestedLots sets the value of RequestedLots.

func (*PlacedLimitOrder) SetStatus

func (s *PlacedLimitOrder) SetStatus(val OrderStatus)

SetStatus sets the value of Status.

func (*PlacedLimitOrder) UnmarshalJSON

func (s *PlacedLimitOrder) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PlacedLimitOrder) Validate

func (s *PlacedLimitOrder) Validate() error

type PlacedMarketOrder

type PlacedMarketOrder struct {
	OrderId      string        `json:"orderId"`
	Operation    OperationType `json:"operation"`
	Status       OrderStatus   `json:"status"`
	RejectReason OptString     `json:"rejectReason"`
	// Сообщение об ошибке.
	Message       OptString      `json:"message"`
	RequestedLots int            `json:"requestedLots"`
	ExecutedLots  int            `json:"executedLots"`
	Commission    OptMoneyAmount `json:"commission"`
}

Ref: #/components/schemas/PlacedMarketOrder

func (*PlacedMarketOrder) Decode

func (s *PlacedMarketOrder) Decode(d *jx.Decoder) error

Decode decodes PlacedMarketOrder from json.

func (*PlacedMarketOrder) Encode

func (s *PlacedMarketOrder) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PlacedMarketOrder) GetCommission

func (s *PlacedMarketOrder) GetCommission() OptMoneyAmount

GetCommission returns the value of Commission.

func (*PlacedMarketOrder) GetExecutedLots

func (s *PlacedMarketOrder) GetExecutedLots() int

GetExecutedLots returns the value of ExecutedLots.

func (*PlacedMarketOrder) GetMessage

func (s *PlacedMarketOrder) GetMessage() OptString

GetMessage returns the value of Message.

func (*PlacedMarketOrder) GetOperation

func (s *PlacedMarketOrder) GetOperation() OperationType

GetOperation returns the value of Operation.

func (*PlacedMarketOrder) GetOrderId

func (s *PlacedMarketOrder) GetOrderId() string

GetOrderId returns the value of OrderId.

func (*PlacedMarketOrder) GetRejectReason

func (s *PlacedMarketOrder) GetRejectReason() OptString

GetRejectReason returns the value of RejectReason.

func (*PlacedMarketOrder) GetRequestedLots

func (s *PlacedMarketOrder) GetRequestedLots() int

GetRequestedLots returns the value of RequestedLots.

func (*PlacedMarketOrder) GetStatus

func (s *PlacedMarketOrder) GetStatus() OrderStatus

GetStatus returns the value of Status.

func (*PlacedMarketOrder) MarshalJSON

func (s *PlacedMarketOrder) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PlacedMarketOrder) SetCommission

func (s *PlacedMarketOrder) SetCommission(val OptMoneyAmount)

SetCommission sets the value of Commission.

func (*PlacedMarketOrder) SetExecutedLots

func (s *PlacedMarketOrder) SetExecutedLots(val int)

SetExecutedLots sets the value of ExecutedLots.

func (*PlacedMarketOrder) SetFake

func (s *PlacedMarketOrder) SetFake()

SetFake set fake values.

func (*PlacedMarketOrder) SetMessage

func (s *PlacedMarketOrder) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*PlacedMarketOrder) SetOperation

func (s *PlacedMarketOrder) SetOperation(val OperationType)

SetOperation sets the value of Operation.

func (*PlacedMarketOrder) SetOrderId

func (s *PlacedMarketOrder) SetOrderId(val string)

SetOrderId sets the value of OrderId.

func (*PlacedMarketOrder) SetRejectReason

func (s *PlacedMarketOrder) SetRejectReason(val OptString)

SetRejectReason sets the value of RejectReason.

func (*PlacedMarketOrder) SetRequestedLots

func (s *PlacedMarketOrder) SetRequestedLots(val int)

SetRequestedLots sets the value of RequestedLots.

func (*PlacedMarketOrder) SetStatus

func (s *PlacedMarketOrder) SetStatus(val OrderStatus)

SetStatus sets the value of Status.

func (*PlacedMarketOrder) UnmarshalJSON

func (s *PlacedMarketOrder) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PlacedMarketOrder) Validate

func (s *PlacedMarketOrder) Validate() error

type Portfolio

type Portfolio struct {
	Positions []PortfolioPosition `json:"positions"`
}

Ref: #/components/schemas/Portfolio

func (*Portfolio) Decode

func (s *Portfolio) Decode(d *jx.Decoder) error

Decode decodes Portfolio from json.

func (*Portfolio) Encode

func (s *Portfolio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Portfolio) GetPositions

func (s *Portfolio) GetPositions() []PortfolioPosition

GetPositions returns the value of Positions.

func (*Portfolio) MarshalJSON

func (s *Portfolio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Portfolio) SetFake

func (s *Portfolio) SetFake()

SetFake set fake values.

func (*Portfolio) SetPositions

func (s *Portfolio) SetPositions(val []PortfolioPosition)

SetPositions sets the value of Positions.

func (*Portfolio) UnmarshalJSON

func (s *Portfolio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Portfolio) Validate

func (s *Portfolio) Validate() error

type PortfolioCurrenciesGetParams

type PortfolioCurrenciesGetParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

PortfolioCurrenciesGetParams is parameters of GET /portfolio/currencies operation.

type PortfolioCurrenciesGetRes

type PortfolioCurrenciesGetRes interface {
	// contains filtered or unexported methods
}

type PortfolioCurrenciesResponse

type PortfolioCurrenciesResponse struct {
	TrackingId string     `json:"trackingId"`
	Status     string     `json:"status"`
	Payload    Currencies `json:"payload"`
}

Ref: #/components/schemas/PortfolioCurrenciesResponse

func (*PortfolioCurrenciesResponse) Decode

Decode decodes PortfolioCurrenciesResponse from json.

func (*PortfolioCurrenciesResponse) Encode

func (s *PortfolioCurrenciesResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PortfolioCurrenciesResponse) GetPayload

func (s *PortfolioCurrenciesResponse) GetPayload() Currencies

GetPayload returns the value of Payload.

func (*PortfolioCurrenciesResponse) GetStatus

func (s *PortfolioCurrenciesResponse) GetStatus() string

GetStatus returns the value of Status.

func (*PortfolioCurrenciesResponse) GetTrackingId

func (s *PortfolioCurrenciesResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*PortfolioCurrenciesResponse) MarshalJSON

func (s *PortfolioCurrenciesResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PortfolioCurrenciesResponse) SetFake

func (s *PortfolioCurrenciesResponse) SetFake()

SetFake set fake values.

func (*PortfolioCurrenciesResponse) SetPayload

func (s *PortfolioCurrenciesResponse) SetPayload(val Currencies)

SetPayload sets the value of Payload.

func (*PortfolioCurrenciesResponse) SetStatus

func (s *PortfolioCurrenciesResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*PortfolioCurrenciesResponse) SetTrackingId

func (s *PortfolioCurrenciesResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*PortfolioCurrenciesResponse) UnmarshalJSON

func (s *PortfolioCurrenciesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PortfolioCurrenciesResponse) Validate

func (s *PortfolioCurrenciesResponse) Validate() error

type PortfolioGetParams

type PortfolioGetParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

PortfolioGetParams is parameters of GET /portfolio operation.

type PortfolioGetRes

type PortfolioGetRes interface {
	// contains filtered or unexported methods
}

type PortfolioPosition

type PortfolioPosition struct {
	Figi                      string         `json:"figi"`
	Ticker                    OptString      `json:"ticker"`
	Isin                      OptString      `json:"isin"`
	InstrumentType            InstrumentType `json:"instrumentType"`
	Balance                   float64        `json:"balance"`
	Blocked                   OptFloat64     `json:"blocked"`
	ExpectedYield             OptMoneyAmount `json:"expectedYield"`
	Lots                      int32          `json:"lots"`
	AveragePositionPrice      OptMoneyAmount `json:"averagePositionPrice"`
	AveragePositionPriceNoNkd OptMoneyAmount `json:"averagePositionPriceNoNkd"`
	Name                      string         `json:"name"`
}

Ref: #/components/schemas/PortfolioPosition

func (*PortfolioPosition) Decode

func (s *PortfolioPosition) Decode(d *jx.Decoder) error

Decode decodes PortfolioPosition from json.

func (*PortfolioPosition) Encode

func (s *PortfolioPosition) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PortfolioPosition) GetAveragePositionPrice

func (s *PortfolioPosition) GetAveragePositionPrice() OptMoneyAmount

GetAveragePositionPrice returns the value of AveragePositionPrice.

func (*PortfolioPosition) GetAveragePositionPriceNoNkd

func (s *PortfolioPosition) GetAveragePositionPriceNoNkd() OptMoneyAmount

GetAveragePositionPriceNoNkd returns the value of AveragePositionPriceNoNkd.

func (*PortfolioPosition) GetBalance

func (s *PortfolioPosition) GetBalance() float64

GetBalance returns the value of Balance.

func (*PortfolioPosition) GetBlocked

func (s *PortfolioPosition) GetBlocked() OptFloat64

GetBlocked returns the value of Blocked.

func (*PortfolioPosition) GetExpectedYield

func (s *PortfolioPosition) GetExpectedYield() OptMoneyAmount

GetExpectedYield returns the value of ExpectedYield.

func (*PortfolioPosition) GetFigi

func (s *PortfolioPosition) GetFigi() string

GetFigi returns the value of Figi.

func (*PortfolioPosition) GetInstrumentType

func (s *PortfolioPosition) GetInstrumentType() InstrumentType

GetInstrumentType returns the value of InstrumentType.

func (*PortfolioPosition) GetIsin

func (s *PortfolioPosition) GetIsin() OptString

GetIsin returns the value of Isin.

func (*PortfolioPosition) GetLots

func (s *PortfolioPosition) GetLots() int32

GetLots returns the value of Lots.

func (*PortfolioPosition) GetName

func (s *PortfolioPosition) GetName() string

GetName returns the value of Name.

func (*PortfolioPosition) GetTicker

func (s *PortfolioPosition) GetTicker() OptString

GetTicker returns the value of Ticker.

func (*PortfolioPosition) MarshalJSON

func (s *PortfolioPosition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PortfolioPosition) SetAveragePositionPrice

func (s *PortfolioPosition) SetAveragePositionPrice(val OptMoneyAmount)

SetAveragePositionPrice sets the value of AveragePositionPrice.

func (*PortfolioPosition) SetAveragePositionPriceNoNkd

func (s *PortfolioPosition) SetAveragePositionPriceNoNkd(val OptMoneyAmount)

SetAveragePositionPriceNoNkd sets the value of AveragePositionPriceNoNkd.

func (*PortfolioPosition) SetBalance

func (s *PortfolioPosition) SetBalance(val float64)

SetBalance sets the value of Balance.

func (*PortfolioPosition) SetBlocked

func (s *PortfolioPosition) SetBlocked(val OptFloat64)

SetBlocked sets the value of Blocked.

func (*PortfolioPosition) SetExpectedYield

func (s *PortfolioPosition) SetExpectedYield(val OptMoneyAmount)

SetExpectedYield sets the value of ExpectedYield.

func (*PortfolioPosition) SetFake

func (s *PortfolioPosition) SetFake()

SetFake set fake values.

func (*PortfolioPosition) SetFigi

func (s *PortfolioPosition) SetFigi(val string)

SetFigi sets the value of Figi.

func (*PortfolioPosition) SetInstrumentType

func (s *PortfolioPosition) SetInstrumentType(val InstrumentType)

SetInstrumentType sets the value of InstrumentType.

func (*PortfolioPosition) SetIsin

func (s *PortfolioPosition) SetIsin(val OptString)

SetIsin sets the value of Isin.

func (*PortfolioPosition) SetLots

func (s *PortfolioPosition) SetLots(val int32)

SetLots sets the value of Lots.

func (*PortfolioPosition) SetName

func (s *PortfolioPosition) SetName(val string)

SetName sets the value of Name.

func (*PortfolioPosition) SetTicker

func (s *PortfolioPosition) SetTicker(val OptString)

SetTicker sets the value of Ticker.

func (*PortfolioPosition) UnmarshalJSON

func (s *PortfolioPosition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PortfolioPosition) Validate

func (s *PortfolioPosition) Validate() error

type PortfolioResponse

type PortfolioResponse struct {
	TrackingId string    `json:"trackingId"`
	Status     string    `json:"status"`
	Payload    Portfolio `json:"payload"`
}

Ref: #/components/schemas/PortfolioResponse

func (*PortfolioResponse) Decode

func (s *PortfolioResponse) Decode(d *jx.Decoder) error

Decode decodes PortfolioResponse from json.

func (*PortfolioResponse) Encode

func (s *PortfolioResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PortfolioResponse) GetPayload

func (s *PortfolioResponse) GetPayload() Portfolio

GetPayload returns the value of Payload.

func (*PortfolioResponse) GetStatus

func (s *PortfolioResponse) GetStatus() string

GetStatus returns the value of Status.

func (*PortfolioResponse) GetTrackingId

func (s *PortfolioResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*PortfolioResponse) MarshalJSON

func (s *PortfolioResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PortfolioResponse) SetFake

func (s *PortfolioResponse) SetFake()

SetFake set fake values.

func (*PortfolioResponse) SetPayload

func (s *PortfolioResponse) SetPayload(val Portfolio)

SetPayload sets the value of Payload.

func (*PortfolioResponse) SetStatus

func (s *PortfolioResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*PortfolioResponse) SetTrackingId

func (s *PortfolioResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*PortfolioResponse) UnmarshalJSON

func (s *PortfolioResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PortfolioResponse) Validate

func (s *PortfolioResponse) Validate() error

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SSOAuth

type SSOAuth struct {
	Token string
}

func (*SSOAuth) GetToken

func (s *SSOAuth) GetToken() string

GetToken returns the value of Token.

func (*SSOAuth) SetToken

func (s *SSOAuth) SetToken(val string)

SetToken sets the value of Token.

type SandboxAccount

type SandboxAccount struct {
	BrokerAccountType BrokerAccountType `json:"brokerAccountType"`
	BrokerAccountId   string            `json:"brokerAccountId"`
}

Ref: #/components/schemas/SandboxAccount

func (*SandboxAccount) Decode

func (s *SandboxAccount) Decode(d *jx.Decoder) error

Decode decodes SandboxAccount from json.

func (*SandboxAccount) Encode

func (s *SandboxAccount) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SandboxAccount) GetBrokerAccountId

func (s *SandboxAccount) GetBrokerAccountId() string

GetBrokerAccountId returns the value of BrokerAccountId.

func (*SandboxAccount) GetBrokerAccountType

func (s *SandboxAccount) GetBrokerAccountType() BrokerAccountType

GetBrokerAccountType returns the value of BrokerAccountType.

func (*SandboxAccount) MarshalJSON

func (s *SandboxAccount) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SandboxAccount) SetBrokerAccountId

func (s *SandboxAccount) SetBrokerAccountId(val string)

SetBrokerAccountId sets the value of BrokerAccountId.

func (*SandboxAccount) SetBrokerAccountType

func (s *SandboxAccount) SetBrokerAccountType(val BrokerAccountType)

SetBrokerAccountType sets the value of BrokerAccountType.

func (*SandboxAccount) SetFake

func (s *SandboxAccount) SetFake()

SetFake set fake values.

func (*SandboxAccount) UnmarshalJSON

func (s *SandboxAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxAccount) Validate

func (s *SandboxAccount) Validate() error

type SandboxClearPostParams

type SandboxClearPostParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

SandboxClearPostParams is parameters of POST /sandbox/clear operation.

type SandboxClearPostRes

type SandboxClearPostRes interface {
	// contains filtered or unexported methods
}

type SandboxCurrenciesBalancePostParams

type SandboxCurrenciesBalancePostParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

SandboxCurrenciesBalancePostParams is parameters of POST /sandbox/currencies/balance operation.

type SandboxCurrenciesBalancePostRes

type SandboxCurrenciesBalancePostRes interface {
	// contains filtered or unexported methods
}

type SandboxCurrency

type SandboxCurrency string

Ref: #/components/schemas/SandboxCurrency

const (
	SandboxCurrencyRUB SandboxCurrency = "RUB"
	SandboxCurrencyUSD SandboxCurrency = "USD"
	SandboxCurrencyEUR SandboxCurrency = "EUR"
	SandboxCurrencyGBP SandboxCurrency = "GBP"
	SandboxCurrencyHKD SandboxCurrency = "HKD"
	SandboxCurrencyCHF SandboxCurrency = "CHF"
	SandboxCurrencyJPY SandboxCurrency = "JPY"
	SandboxCurrencyCNY SandboxCurrency = "CNY"
	SandboxCurrencyTRY SandboxCurrency = "TRY"
)

func (SandboxCurrency) AllValues

func (SandboxCurrency) AllValues() []SandboxCurrency

AllValues returns all SandboxCurrency values.

func (*SandboxCurrency) Decode

func (s *SandboxCurrency) Decode(d *jx.Decoder) error

Decode decodes SandboxCurrency from json.

func (SandboxCurrency) Encode

func (s SandboxCurrency) Encode(e *jx.Encoder)

Encode encodes SandboxCurrency as json.

func (SandboxCurrency) MarshalJSON

func (s SandboxCurrency) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (SandboxCurrency) MarshalText

func (s SandboxCurrency) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*SandboxCurrency) SetFake

func (s *SandboxCurrency) SetFake()

SetFake set fake values.

func (*SandboxCurrency) UnmarshalJSON

func (s *SandboxCurrency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxCurrency) UnmarshalText

func (s *SandboxCurrency) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (SandboxCurrency) Validate

func (s SandboxCurrency) Validate() error

type SandboxPositionsBalancePostParams

type SandboxPositionsBalancePostParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

SandboxPositionsBalancePostParams is parameters of POST /sandbox/positions/balance operation.

type SandboxPositionsBalancePostRes

type SandboxPositionsBalancePostRes interface {
	// contains filtered or unexported methods
}

type SandboxRegisterPostRes

type SandboxRegisterPostRes interface {
	// contains filtered or unexported methods
}

type SandboxRegisterRequest

type SandboxRegisterRequest struct {
	BrokerAccountType OptBrokerAccountType `json:"brokerAccountType"`
}

Ref: #/components/schemas/SandboxRegisterRequest

func (*SandboxRegisterRequest) Decode

func (s *SandboxRegisterRequest) Decode(d *jx.Decoder) error

Decode decodes SandboxRegisterRequest from json.

func (*SandboxRegisterRequest) Encode

func (s *SandboxRegisterRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SandboxRegisterRequest) GetBrokerAccountType

func (s *SandboxRegisterRequest) GetBrokerAccountType() OptBrokerAccountType

GetBrokerAccountType returns the value of BrokerAccountType.

func (*SandboxRegisterRequest) MarshalJSON

func (s *SandboxRegisterRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SandboxRegisterRequest) SetBrokerAccountType

func (s *SandboxRegisterRequest) SetBrokerAccountType(val OptBrokerAccountType)

SetBrokerAccountType sets the value of BrokerAccountType.

func (*SandboxRegisterRequest) SetFake

func (s *SandboxRegisterRequest) SetFake()

SetFake set fake values.

func (*SandboxRegisterRequest) UnmarshalJSON

func (s *SandboxRegisterRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxRegisterRequest) Validate

func (s *SandboxRegisterRequest) Validate() error

type SandboxRegisterResponse

type SandboxRegisterResponse struct {
	TrackingId string         `json:"trackingId"`
	Status     string         `json:"status"`
	Payload    SandboxAccount `json:"payload"`
}

Ref: #/components/schemas/SandboxRegisterResponse

func (*SandboxRegisterResponse) Decode

func (s *SandboxRegisterResponse) Decode(d *jx.Decoder) error

Decode decodes SandboxRegisterResponse from json.

func (*SandboxRegisterResponse) Encode

func (s *SandboxRegisterResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SandboxRegisterResponse) GetPayload

func (s *SandboxRegisterResponse) GetPayload() SandboxAccount

GetPayload returns the value of Payload.

func (*SandboxRegisterResponse) GetStatus

func (s *SandboxRegisterResponse) GetStatus() string

GetStatus returns the value of Status.

func (*SandboxRegisterResponse) GetTrackingId

func (s *SandboxRegisterResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*SandboxRegisterResponse) MarshalJSON

func (s *SandboxRegisterResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SandboxRegisterResponse) SetFake

func (s *SandboxRegisterResponse) SetFake()

SetFake set fake values.

func (*SandboxRegisterResponse) SetPayload

func (s *SandboxRegisterResponse) SetPayload(val SandboxAccount)

SetPayload sets the value of Payload.

func (*SandboxRegisterResponse) SetStatus

func (s *SandboxRegisterResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*SandboxRegisterResponse) SetTrackingId

func (s *SandboxRegisterResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*SandboxRegisterResponse) UnmarshalJSON

func (s *SandboxRegisterResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxRegisterResponse) Validate

func (s *SandboxRegisterResponse) Validate() error

type SandboxRemovePostParams

type SandboxRemovePostParams struct {
	// Номер счета (по умолчанию - Тинькофф).
	BrokerAccountId OptString
}

SandboxRemovePostParams is parameters of POST /sandbox/remove operation.

type SandboxRemovePostRes

type SandboxRemovePostRes interface {
	// contains filtered or unexported methods
}

type SandboxSetCurrencyBalanceRequest

type SandboxSetCurrencyBalanceRequest struct {
	Currency SandboxCurrency `json:"currency"`
	Balance  float64         `json:"balance"`
}

Ref: #/components/schemas/SandboxSetCurrencyBalanceRequest

func (*SandboxSetCurrencyBalanceRequest) Decode

Decode decodes SandboxSetCurrencyBalanceRequest from json.

func (*SandboxSetCurrencyBalanceRequest) Encode

Encode implements json.Marshaler.

func (*SandboxSetCurrencyBalanceRequest) GetBalance

func (s *SandboxSetCurrencyBalanceRequest) GetBalance() float64

GetBalance returns the value of Balance.

func (*SandboxSetCurrencyBalanceRequest) GetCurrency

GetCurrency returns the value of Currency.

func (*SandboxSetCurrencyBalanceRequest) MarshalJSON

func (s *SandboxSetCurrencyBalanceRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SandboxSetCurrencyBalanceRequest) SetBalance

func (s *SandboxSetCurrencyBalanceRequest) SetBalance(val float64)

SetBalance sets the value of Balance.

func (*SandboxSetCurrencyBalanceRequest) SetCurrency

SetCurrency sets the value of Currency.

func (*SandboxSetCurrencyBalanceRequest) SetFake

func (s *SandboxSetCurrencyBalanceRequest) SetFake()

SetFake set fake values.

func (*SandboxSetCurrencyBalanceRequest) UnmarshalJSON

func (s *SandboxSetCurrencyBalanceRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxSetCurrencyBalanceRequest) Validate

type SandboxSetPositionBalanceRequest

type SandboxSetPositionBalanceRequest struct {
	Figi    OptString `json:"figi"`
	Balance float64   `json:"balance"`
}

Ref: #/components/schemas/SandboxSetPositionBalanceRequest

func (*SandboxSetPositionBalanceRequest) Decode

Decode decodes SandboxSetPositionBalanceRequest from json.

func (*SandboxSetPositionBalanceRequest) Encode

Encode implements json.Marshaler.

func (*SandboxSetPositionBalanceRequest) GetBalance

func (s *SandboxSetPositionBalanceRequest) GetBalance() float64

GetBalance returns the value of Balance.

func (*SandboxSetPositionBalanceRequest) GetFigi

GetFigi returns the value of Figi.

func (*SandboxSetPositionBalanceRequest) MarshalJSON

func (s *SandboxSetPositionBalanceRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SandboxSetPositionBalanceRequest) SetBalance

func (s *SandboxSetPositionBalanceRequest) SetBalance(val float64)

SetBalance sets the value of Balance.

func (*SandboxSetPositionBalanceRequest) SetFake

func (s *SandboxSetPositionBalanceRequest) SetFake()

SetFake set fake values.

func (*SandboxSetPositionBalanceRequest) SetFigi

SetFigi sets the value of Figi.

func (*SandboxSetPositionBalanceRequest) UnmarshalJSON

func (s *SandboxSetPositionBalanceRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SandboxSetPositionBalanceRequest) Validate

type SearchMarketInstrument

type SearchMarketInstrument struct {
	Figi   string    `json:"figi"`
	Ticker string    `json:"ticker"`
	Isin   OptString `json:"isin"`
	// Шаг цены.
	MinPriceIncrement OptFloat64     `json:"minPriceIncrement"`
	Lot               int32          `json:"lot"`
	Currency          OptCurrency    `json:"currency"`
	Name              string         `json:"name"`
	Type              InstrumentType `json:"type"`
}

Ref: #/components/schemas/SearchMarketInstrument

func (*SearchMarketInstrument) Decode

func (s *SearchMarketInstrument) Decode(d *jx.Decoder) error

Decode decodes SearchMarketInstrument from json.

func (*SearchMarketInstrument) Encode

func (s *SearchMarketInstrument) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SearchMarketInstrument) GetCurrency

func (s *SearchMarketInstrument) GetCurrency() OptCurrency

GetCurrency returns the value of Currency.

func (*SearchMarketInstrument) GetFigi

func (s *SearchMarketInstrument) GetFigi() string

GetFigi returns the value of Figi.

func (*SearchMarketInstrument) GetIsin

func (s *SearchMarketInstrument) GetIsin() OptString

GetIsin returns the value of Isin.

func (*SearchMarketInstrument) GetLot

func (s *SearchMarketInstrument) GetLot() int32

GetLot returns the value of Lot.

func (*SearchMarketInstrument) GetMinPriceIncrement

func (s *SearchMarketInstrument) GetMinPriceIncrement() OptFloat64

GetMinPriceIncrement returns the value of MinPriceIncrement.

func (*SearchMarketInstrument) GetName

func (s *SearchMarketInstrument) GetName() string

GetName returns the value of Name.

func (*SearchMarketInstrument) GetTicker

func (s *SearchMarketInstrument) GetTicker() string

GetTicker returns the value of Ticker.

func (*SearchMarketInstrument) GetType

GetType returns the value of Type.

func (*SearchMarketInstrument) MarshalJSON

func (s *SearchMarketInstrument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SearchMarketInstrument) SetCurrency

func (s *SearchMarketInstrument) SetCurrency(val OptCurrency)

SetCurrency sets the value of Currency.

func (*SearchMarketInstrument) SetFake

func (s *SearchMarketInstrument) SetFake()

SetFake set fake values.

func (*SearchMarketInstrument) SetFigi

func (s *SearchMarketInstrument) SetFigi(val string)

SetFigi sets the value of Figi.

func (*SearchMarketInstrument) SetIsin

func (s *SearchMarketInstrument) SetIsin(val OptString)

SetIsin sets the value of Isin.

func (*SearchMarketInstrument) SetLot

func (s *SearchMarketInstrument) SetLot(val int32)

SetLot sets the value of Lot.

func (*SearchMarketInstrument) SetMinPriceIncrement

func (s *SearchMarketInstrument) SetMinPriceIncrement(val OptFloat64)

SetMinPriceIncrement sets the value of MinPriceIncrement.

func (*SearchMarketInstrument) SetName

func (s *SearchMarketInstrument) SetName(val string)

SetName sets the value of Name.

func (*SearchMarketInstrument) SetTicker

func (s *SearchMarketInstrument) SetTicker(val string)

SetTicker sets the value of Ticker.

func (*SearchMarketInstrument) SetType

func (s *SearchMarketInstrument) SetType(val InstrumentType)

SetType sets the value of Type.

func (*SearchMarketInstrument) UnmarshalJSON

func (s *SearchMarketInstrument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchMarketInstrument) Validate

func (s *SearchMarketInstrument) Validate() error

type SearchMarketInstrumentResponse

type SearchMarketInstrumentResponse struct {
	TrackingId string                 `json:"trackingId"`
	Status     string                 `json:"status"`
	Payload    SearchMarketInstrument `json:"payload"`
}

Ref: #/components/schemas/SearchMarketInstrumentResponse

func (*SearchMarketInstrumentResponse) Decode

Decode decodes SearchMarketInstrumentResponse from json.

func (*SearchMarketInstrumentResponse) Encode

Encode implements json.Marshaler.

func (*SearchMarketInstrumentResponse) GetPayload

GetPayload returns the value of Payload.

func (*SearchMarketInstrumentResponse) GetStatus

func (s *SearchMarketInstrumentResponse) GetStatus() string

GetStatus returns the value of Status.

func (*SearchMarketInstrumentResponse) GetTrackingId

func (s *SearchMarketInstrumentResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*SearchMarketInstrumentResponse) MarshalJSON

func (s *SearchMarketInstrumentResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SearchMarketInstrumentResponse) SetFake

func (s *SearchMarketInstrumentResponse) SetFake()

SetFake set fake values.

func (*SearchMarketInstrumentResponse) SetPayload

SetPayload sets the value of Payload.

func (*SearchMarketInstrumentResponse) SetStatus

func (s *SearchMarketInstrumentResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*SearchMarketInstrumentResponse) SetTrackingId

func (s *SearchMarketInstrumentResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*SearchMarketInstrumentResponse) UnmarshalJSON

func (s *SearchMarketInstrumentResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchMarketInstrumentResponse) Validate

func (s *SearchMarketInstrumentResponse) Validate() error

type SecurityHandler

type SecurityHandler interface {
	// HandleSSOAuth handles sso_auth security.
	HandleSSOAuth(ctx context.Context, operationName string, t SSOAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// SSOAuth provides sso_auth security value.
	SSOAuth(ctx context.Context, operationName string) (SSOAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type TradeStatus

type TradeStatus string

Ref: #/components/schemas/TradeStatus

const (
	TradeStatusNormalTrading          TradeStatus = "NormalTrading"
	TradeStatusNotAvailableForTrading TradeStatus = "NotAvailableForTrading"
)

func (TradeStatus) AllValues

func (TradeStatus) AllValues() []TradeStatus

AllValues returns all TradeStatus values.

func (*TradeStatus) Decode

func (s *TradeStatus) Decode(d *jx.Decoder) error

Decode decodes TradeStatus from json.

func (TradeStatus) Encode

func (s TradeStatus) Encode(e *jx.Encoder)

Encode encodes TradeStatus as json.

func (TradeStatus) MarshalJSON

func (s TradeStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (TradeStatus) MarshalText

func (s TradeStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*TradeStatus) SetFake

func (s *TradeStatus) SetFake()

SetFake set fake values.

func (*TradeStatus) UnmarshalJSON

func (s *TradeStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TradeStatus) UnmarshalText

func (s *TradeStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (TradeStatus) Validate

func (s TradeStatus) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) MarketBondsGet

func (UnimplementedHandler) MarketBondsGet(ctx context.Context) (r MarketBondsGetRes, _ error)

MarketBondsGet implements GET /market/bonds operation.

Получение списка облигаций.

GET /market/bonds

func (UnimplementedHandler) MarketCandlesGet

MarketCandlesGet implements GET /market/candles operation.

Получение исторических свечей по FIGI.

GET /market/candles

func (UnimplementedHandler) MarketCurrenciesGet

func (UnimplementedHandler) MarketCurrenciesGet(ctx context.Context) (r MarketCurrenciesGetRes, _ error)

MarketCurrenciesGet implements GET /market/currencies operation.

Получение списка валютных пар.

GET /market/currencies

func (UnimplementedHandler) MarketEtfsGet

func (UnimplementedHandler) MarketEtfsGet(ctx context.Context) (r MarketEtfsGetRes, _ error)

MarketEtfsGet implements GET /market/etfs operation.

Получение списка ETF.

GET /market/etfs

func (UnimplementedHandler) MarketOrderbookGet

MarketOrderbookGet implements GET /market/orderbook operation.

Получение стакана по FIGI.

GET /market/orderbook

func (UnimplementedHandler) MarketSearchByFigiGet

MarketSearchByFigiGet implements GET /market/search/by-figi operation.

Получение инструмента по FIGI.

GET /market/search/by-figi

func (UnimplementedHandler) MarketSearchByTickerGet

MarketSearchByTickerGet implements GET /market/search/by-ticker operation.

Получение инструмента по тикеру.

GET /market/search/by-ticker

func (UnimplementedHandler) MarketStocksGet

func (UnimplementedHandler) MarketStocksGet(ctx context.Context) (r MarketStocksGetRes, _ error)

MarketStocksGet implements GET /market/stocks operation.

Получение списка акций.

GET /market/stocks

func (UnimplementedHandler) OperationsGet

OperationsGet implements GET /operations operation.

Получение списка операций.

GET /operations

func (UnimplementedHandler) OrdersCancelPost

OrdersCancelPost implements POST /orders/cancel operation.

Отмена заявки.

POST /orders/cancel

func (UnimplementedHandler) OrdersGet

func (UnimplementedHandler) OrdersGet(ctx context.Context, params OrdersGetParams) (r OrdersGetRes, _ error)

OrdersGet implements GET /orders operation.

Получение списка активных заявок.

GET /orders

func (UnimplementedHandler) OrdersLimitOrderPost

OrdersLimitOrderPost implements POST /orders/limit-order operation.

Создание лимитной заявки.

POST /orders/limit-order

func (UnimplementedHandler) OrdersMarketOrderPost

OrdersMarketOrderPost implements POST /orders/market-order operation.

Создание рыночной заявки.

POST /orders/market-order

func (UnimplementedHandler) PortfolioCurrenciesGet

PortfolioCurrenciesGet implements GET /portfolio/currencies operation.

Получение валютных активов клиента.

GET /portfolio/currencies

func (UnimplementedHandler) PortfolioGet

PortfolioGet implements GET /portfolio operation.

Получение портфеля клиента.

GET /portfolio

func (UnimplementedHandler) SandboxClearPost

SandboxClearPost implements POST /sandbox/clear operation.

Удаление всех позиций клиента.

POST /sandbox/clear

func (UnimplementedHandler) SandboxCurrenciesBalancePost

SandboxCurrenciesBalancePost implements POST /sandbox/currencies/balance operation.

Выставление баланса по валютным позициям.

POST /sandbox/currencies/balance

func (UnimplementedHandler) SandboxPositionsBalancePost

SandboxPositionsBalancePost implements POST /sandbox/positions/balance operation.

Выставление баланса по инструментным позициям.

POST /sandbox/positions/balance

func (UnimplementedHandler) SandboxRegisterPost

SandboxRegisterPost implements POST /sandbox/register operation.

Создание счета и валютных позиций для клиента.

POST /sandbox/register

func (UnimplementedHandler) SandboxRemovePost

SandboxRemovePost implements POST /sandbox/remove operation.

Удаление счета клиента.

POST /sandbox/remove

func (UnimplementedHandler) UserAccountsGet

func (UnimplementedHandler) UserAccountsGet(ctx context.Context) (r UserAccountsGetRes, _ error)

UserAccountsGet implements GET /user/accounts operation.

Получение брокерских счетов клиента.

GET /user/accounts

type UserAccount

type UserAccount struct {
	BrokerAccountType BrokerAccountType `json:"brokerAccountType"`
	BrokerAccountId   string            `json:"brokerAccountId"`
}

Ref: #/components/schemas/UserAccount

func (*UserAccount) Decode

func (s *UserAccount) Decode(d *jx.Decoder) error

Decode decodes UserAccount from json.

func (*UserAccount) Encode

func (s *UserAccount) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UserAccount) GetBrokerAccountId

func (s *UserAccount) GetBrokerAccountId() string

GetBrokerAccountId returns the value of BrokerAccountId.

func (*UserAccount) GetBrokerAccountType

func (s *UserAccount) GetBrokerAccountType() BrokerAccountType

GetBrokerAccountType returns the value of BrokerAccountType.

func (*UserAccount) MarshalJSON

func (s *UserAccount) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserAccount) SetBrokerAccountId

func (s *UserAccount) SetBrokerAccountId(val string)

SetBrokerAccountId sets the value of BrokerAccountId.

func (*UserAccount) SetBrokerAccountType

func (s *UserAccount) SetBrokerAccountType(val BrokerAccountType)

SetBrokerAccountType sets the value of BrokerAccountType.

func (*UserAccount) SetFake

func (s *UserAccount) SetFake()

SetFake set fake values.

func (*UserAccount) UnmarshalJSON

func (s *UserAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserAccount) Validate

func (s *UserAccount) Validate() error

type UserAccounts

type UserAccounts struct {
	Accounts []UserAccount `json:"accounts"`
}

Ref: #/components/schemas/UserAccounts

func (*UserAccounts) Decode

func (s *UserAccounts) Decode(d *jx.Decoder) error

Decode decodes UserAccounts from json.

func (*UserAccounts) Encode

func (s *UserAccounts) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UserAccounts) GetAccounts

func (s *UserAccounts) GetAccounts() []UserAccount

GetAccounts returns the value of Accounts.

func (*UserAccounts) MarshalJSON

func (s *UserAccounts) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserAccounts) SetAccounts

func (s *UserAccounts) SetAccounts(val []UserAccount)

SetAccounts sets the value of Accounts.

func (*UserAccounts) SetFake

func (s *UserAccounts) SetFake()

SetFake set fake values.

func (*UserAccounts) UnmarshalJSON

func (s *UserAccounts) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserAccounts) Validate

func (s *UserAccounts) Validate() error

type UserAccountsGetRes

type UserAccountsGetRes interface {
	// contains filtered or unexported methods
}

type UserAccountsResponse

type UserAccountsResponse struct {
	TrackingId string       `json:"trackingId"`
	Status     string       `json:"status"`
	Payload    UserAccounts `json:"payload"`
}

Ref: #/components/schemas/UserAccountsResponse

func (*UserAccountsResponse) Decode

func (s *UserAccountsResponse) Decode(d *jx.Decoder) error

Decode decodes UserAccountsResponse from json.

func (*UserAccountsResponse) Encode

func (s *UserAccountsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UserAccountsResponse) GetPayload

func (s *UserAccountsResponse) GetPayload() UserAccounts

GetPayload returns the value of Payload.

func (*UserAccountsResponse) GetStatus

func (s *UserAccountsResponse) GetStatus() string

GetStatus returns the value of Status.

func (*UserAccountsResponse) GetTrackingId

func (s *UserAccountsResponse) GetTrackingId() string

GetTrackingId returns the value of TrackingId.

func (*UserAccountsResponse) MarshalJSON

func (s *UserAccountsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserAccountsResponse) SetFake

func (s *UserAccountsResponse) SetFake()

SetFake set fake values.

func (*UserAccountsResponse) SetPayload

func (s *UserAccountsResponse) SetPayload(val UserAccounts)

SetPayload sets the value of Payload.

func (*UserAccountsResponse) SetStatus

func (s *UserAccountsResponse) SetStatus(val string)

SetStatus sets the value of Status.

func (*UserAccountsResponse) SetTrackingId

func (s *UserAccountsResponse) SetTrackingId(val string)

SetTrackingId sets the value of TrackingId.

func (*UserAccountsResponse) UnmarshalJSON

func (s *UserAccountsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserAccountsResponse) Validate

func (s *UserAccountsResponse) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL