Documentation ¶
Index ¶
- Constants
- type DerivativeMarket
- func (derivativeMarket DerivativeMarket) CalculateMarginInChainFormat(humanReadableQuantity decimal.Decimal, humanReadablePrice decimal.Decimal, ...) cosmtypes.Dec
- func (derivativeMarket DerivativeMarket) MarginFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
- func (derivativeMarket DerivativeMarket) MarginToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
- func (derivativeMarket DerivativeMarket) PriceFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
- func (derivativeMarket DerivativeMarket) PriceToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
- func (derivativeMarket DerivativeMarket) QuantityFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
- func (derivativeMarket DerivativeMarket) QuantityToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
- type MarketsAssistant
- type MockExchangeClient
- func (e *MockExchangeClient) Close()
- func (e *MockExchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error)
- func (e *MockExchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error)
- func (e *MockExchangeClient) GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error)
- func (e *MockExchangeClient) GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error)
- func (e *MockExchangeClient) GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error)
- func (e *MockExchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req derivativeExchangePB.LiquidablePositionsRequest) (derivativeExchangePB.LiquidablePositionsResponse, error)
- func (e *MockExchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error)
- func (e *MockExchangeClient) GetDerivativeMarkets(ctx context.Context, req derivativeExchangePB.MarketsRequest) (derivativeExchangePB.MarketsResponse, error)
- func (e *MockExchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error)
- func (e *MockExchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error)
- func (e *MockExchangeClient) GetDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersRequest) (derivativeExchangePB.OrdersResponse, error)
- func (e *MockExchangeClient) GetDerivativePositions(ctx context.Context, req derivativeExchangePB.PositionsRequest) (derivativeExchangePB.PositionsResponse, error)
- func (e *MockExchangeClient) GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error)
- func (e *MockExchangeClient) GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error)
- func (e *MockExchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error)
- func (e *MockExchangeClient) GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error)
- func (e *MockExchangeClient) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error)
- func (e *MockExchangeClient) GetInsuranceFunds(ctx context.Context, req insurancePB.FundsRequest) (insurancePB.FundsResponse, error)
- func (e *MockExchangeClient) GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, error)
- func (e *MockExchangeClient) GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error)
- func (e *MockExchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error)
- func (e *MockExchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, ...) (oraclePB.PriceResponse, error)
- func (e *MockExchangeClient) GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error)
- func (e *MockExchangeClient) GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error)
- func (e *MockExchangeClient) GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error)
- func (e *MockExchangeClient) GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error)
- func (e *MockExchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error)
- func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error)
- func (e *MockExchangeClient) GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error)
- func (e *MockExchangeClient) GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error)
- func (e *MockExchangeClient) GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error)
- func (e *MockExchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error)
- func (e *MockExchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error)
- func (e *MockExchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error)
- func (e *MockExchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error)
- func (e *MockExchangeClient) GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error)
- func (e *MockExchangeClient) GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error)
- func (e *MockExchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error)
- func (e *MockExchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error)
- func (e *MockExchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error)
- func (e *MockExchangeClient) GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error)
- func (e *MockExchangeClient) Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error)
- func (e *MockExchangeClient) QueryClient() *grpc.ClientConn
- func (e *MockExchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error)
- func (e *MockExchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error)
- func (e *MockExchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamMarketClient, error)
- func (e *MockExchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (...)
- func (e *MockExchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, ...)
- func (e *MockExchangeClient) StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error)
- func (e *MockExchangeClient) StreamDerivativePositions(ctx context.Context, req derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, ...)
- func (e *MockExchangeClient) StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error)
- func (e *MockExchangeClient) StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, ...)
- func (e *MockExchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, ...)
- func (e *MockExchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error)
- func (e *MockExchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error)
- func (e *MockExchangeClient) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error)
- func (e *MockExchangeClient) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error)
- func (e *MockExchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error)
- func (e *MockExchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error)
- func (e *MockExchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error)
- func (e *MockExchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error)
- func (e *MockExchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error)
- func (e *MockExchangeClient) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error)
- type SpotMarket
- func (spotMarket SpotMarket) PriceFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
- func (spotMarket SpotMarket) PriceToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
- func (spotMarket SpotMarket) QuantityFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
- func (spotMarket SpotMarket) QuantityToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
- type Token
Constants ¶
View Source
const AdditionalChainFormatDecimals = 18
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DerivativeMarket ¶
type DerivativeMarket struct { Id string Status string Ticker string OracleBase string OracleQuote string OracleType string OracleScaleFactor uint32 InitialMarginRatio decimal.Decimal MaintenanceMarginRatio decimal.Decimal QuoteToken Token MakerFeeRate decimal.Decimal TakerFeeRate decimal.Decimal ServiceProviderFee decimal.Decimal MinPriceTickSize decimal.Decimal MinQuantityTickSize decimal.Decimal }
func (DerivativeMarket) CalculateMarginInChainFormat ¶
func (DerivativeMarket) MarginFromChainFormat ¶
func (derivativeMarket DerivativeMarket) MarginFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
func (DerivativeMarket) MarginToChainFormat ¶
func (derivativeMarket DerivativeMarket) MarginToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
func (DerivativeMarket) PriceFromChainFormat ¶
func (derivativeMarket DerivativeMarket) PriceFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
func (DerivativeMarket) PriceToChainFormat ¶
func (derivativeMarket DerivativeMarket) PriceToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
func (DerivativeMarket) QuantityFromChainFormat ¶
func (derivativeMarket DerivativeMarket) QuantityFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
func (DerivativeMarket) QuantityToChainFormat ¶
func (derivativeMarket DerivativeMarket) QuantityToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
type MarketsAssistant ¶
type MarketsAssistant struct {
// contains filtered or unexported fields
}
func NewMarketsAssistant
deprecated
func NewMarketsAssistant(networkName string) (MarketsAssistant, error)
Deprecated: use NewMarketsAssistantUsingExchangeClient instead
func NewMarketsAssistantUsingExchangeClient ¶
func NewMarketsAssistantUsingExchangeClient(ctx context.Context, exchangeClient exchange.ExchangeClient) (MarketsAssistant, error)
func (MarketsAssistant) AllDerivativeMarkets ¶
func (assistant MarketsAssistant) AllDerivativeMarkets() map[string]DerivativeMarket
func (MarketsAssistant) AllSpotMarkets ¶
func (assistant MarketsAssistant) AllSpotMarkets() map[string]SpotMarket
func (MarketsAssistant) AllTokens ¶
func (assistant MarketsAssistant) AllTokens() map[string]Token
type MockExchangeClient ¶
type MockExchangeClient struct { SpotMarketsResponses []spotExchangePB.MarketsResponse DerivativeMarketsResponses []derivativeExchangePB.MarketsResponse }
func (*MockExchangeClient) Close ¶
func (e *MockExchangeClient) Close()
func (*MockExchangeClient) GetAccountPortfolio ¶
func (e *MockExchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error)
func (*MockExchangeClient) GetAuction ¶
func (e *MockExchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error)
func (*MockExchangeClient) GetAuctions ¶
func (e *MockExchangeClient) GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error)
func (*MockExchangeClient) GetDerivativeFundingPayments ¶
func (e *MockExchangeClient) GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error)
func (*MockExchangeClient) GetDerivativeFundingRates ¶
func (e *MockExchangeClient) GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error)
func (*MockExchangeClient) GetDerivativeLiquidablePositions ¶
func (e *MockExchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req derivativeExchangePB.LiquidablePositionsRequest) (derivativeExchangePB.LiquidablePositionsResponse, error)
func (*MockExchangeClient) GetDerivativeMarket ¶
func (e *MockExchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error)
func (*MockExchangeClient) GetDerivativeMarkets ¶
func (e *MockExchangeClient) GetDerivativeMarkets(ctx context.Context, req derivativeExchangePB.MarketsRequest) (derivativeExchangePB.MarketsResponse, error)
func (*MockExchangeClient) GetDerivativeOrderbookV2 ¶
func (e *MockExchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error)
func (*MockExchangeClient) GetDerivativeOrderbooksV2 ¶
func (e *MockExchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error)
func (*MockExchangeClient) GetDerivativeOrders ¶
func (e *MockExchangeClient) GetDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersRequest) (derivativeExchangePB.OrdersResponse, error)
func (*MockExchangeClient) GetDerivativePositions ¶
func (e *MockExchangeClient) GetDerivativePositions(ctx context.Context, req derivativeExchangePB.PositionsRequest) (derivativeExchangePB.PositionsResponse, error)
func (*MockExchangeClient) GetDerivativeTrades ¶
func (e *MockExchangeClient) GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error)
func (*MockExchangeClient) GetDerivativeTradesV2 ¶
func (e *MockExchangeClient) GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error)
func (*MockExchangeClient) GetHistoricalDerivativeOrders ¶
func (e *MockExchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error)
func (*MockExchangeClient) GetHistoricalSpotOrders ¶
func (e *MockExchangeClient) GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error)
func (*MockExchangeClient) GetInfo ¶
func (e *MockExchangeClient) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error)
func (*MockExchangeClient) GetInsuranceFunds ¶
func (e *MockExchangeClient) GetInsuranceFunds(ctx context.Context, req insurancePB.FundsRequest) (insurancePB.FundsResponse, error)
func (*MockExchangeClient) GetOracleList ¶
func (e *MockExchangeClient) GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, error)
func (*MockExchangeClient) GetOrderStates ¶
func (e *MockExchangeClient) GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error)
func (*MockExchangeClient) GetPortfolio ¶
func (e *MockExchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error)
func (*MockExchangeClient) GetPrice ¶
func (e *MockExchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error)
func (*MockExchangeClient) GetRedemptions ¶
func (e *MockExchangeClient) GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error)
func (*MockExchangeClient) GetRewards ¶
func (e *MockExchangeClient) GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error)
func (*MockExchangeClient) GetSpotMarket ¶
func (e *MockExchangeClient) GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error)
func (*MockExchangeClient) GetSpotMarkets ¶
func (e *MockExchangeClient) GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error)
func (*MockExchangeClient) GetSpotOrderbookV2 ¶
func (e *MockExchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error)
func (*MockExchangeClient) GetSpotOrderbooksV2 ¶
func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error)
func (*MockExchangeClient) GetSpotOrders ¶
func (e *MockExchangeClient) GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error)
func (*MockExchangeClient) GetSpotTrades ¶
func (e *MockExchangeClient) GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error)
func (*MockExchangeClient) GetSpotTradesV2 ¶
func (e *MockExchangeClient) GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error)
func (*MockExchangeClient) GetSubaccountBalance ¶
func (e *MockExchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error)
func (*MockExchangeClient) GetSubaccountBalancesList ¶
func (e *MockExchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error)
func (*MockExchangeClient) GetSubaccountDerivativeOrdersList ¶
func (e *MockExchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error)
func (*MockExchangeClient) GetSubaccountDerivativeTradesList ¶
func (e *MockExchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error)
func (*MockExchangeClient) GetSubaccountHistory ¶
func (e *MockExchangeClient) GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error)
func (*MockExchangeClient) GetSubaccountOrderSummary ¶
func (e *MockExchangeClient) GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error)
func (*MockExchangeClient) GetSubaccountSpotOrdersList ¶
func (e *MockExchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error)
func (*MockExchangeClient) GetSubaccountSpotTradesList ¶
func (e *MockExchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error)
func (*MockExchangeClient) GetSubaccountsList ¶
func (e *MockExchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error)
func (*MockExchangeClient) GetVersion ¶
func (e *MockExchangeClient) GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error)
func (*MockExchangeClient) Ping ¶
func (e *MockExchangeClient) Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error)
func (*MockExchangeClient) QueryClient ¶
func (e *MockExchangeClient) QueryClient() *grpc.ClientConn
func (*MockExchangeClient) StreamAccountPortfolio ¶
func (e *MockExchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error)
func (*MockExchangeClient) StreamBids ¶
func (e *MockExchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error)
func (*MockExchangeClient) StreamDerivativeMarket ¶
func (e *MockExchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamMarketClient, error)
func (*MockExchangeClient) StreamDerivativeOrderbookUpdate ¶
func (e *MockExchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error)
func (*MockExchangeClient) StreamDerivativeOrderbookV2 ¶
func (e *MockExchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error)
func (*MockExchangeClient) StreamDerivativeOrders ¶
func (e *MockExchangeClient) StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error)
func (*MockExchangeClient) StreamDerivativePositions ¶
func (e *MockExchangeClient) StreamDerivativePositions(ctx context.Context, req derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error)
func (*MockExchangeClient) StreamDerivativeTrades ¶
func (e *MockExchangeClient) StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error)
func (*MockExchangeClient) StreamDerivativeV2Trades ¶
func (e *MockExchangeClient) StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error)
func (*MockExchangeClient) StreamHistoricalDerivativeOrders ¶
func (e *MockExchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error)
func (*MockExchangeClient) StreamHistoricalSpotOrders ¶
func (e *MockExchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error)
func (*MockExchangeClient) StreamKeepalive ¶
func (e *MockExchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error)
func (*MockExchangeClient) StreamPrices ¶
func (e *MockExchangeClient) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error)
func (*MockExchangeClient) StreamSpotMarket ¶
func (e *MockExchangeClient) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error)
func (*MockExchangeClient) StreamSpotOrderbookUpdate ¶
func (e *MockExchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error)
func (*MockExchangeClient) StreamSpotOrderbookV2 ¶
func (e *MockExchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error)
func (*MockExchangeClient) StreamSpotOrders ¶
func (e *MockExchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error)
func (*MockExchangeClient) StreamSpotTrades ¶
func (e *MockExchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error)
func (*MockExchangeClient) StreamSpotTradesV2 ¶
func (e *MockExchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error)
func (*MockExchangeClient) StreamSubaccountBalance ¶
func (e *MockExchangeClient) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error)
type SpotMarket ¶
type SpotMarket struct { Id string Status string Ticker string BaseToken Token QuoteToken Token MakerFeeRate decimal.Decimal TakerFeeRate decimal.Decimal ServiceProviderFee decimal.Decimal MinPriceTickSize decimal.Decimal MinQuantityTickSize decimal.Decimal }
func (SpotMarket) PriceFromChainFormat ¶
func (spotMarket SpotMarket) PriceFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
func (SpotMarket) PriceToChainFormat ¶
func (spotMarket SpotMarket) PriceToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
func (SpotMarket) QuantityFromChainFormat ¶
func (spotMarket SpotMarket) QuantityFromChainFormat(chainValue cosmtypes.Dec) decimal.Decimal
func (SpotMarket) QuantityToChainFormat ¶
func (spotMarket SpotMarket) QuantityToChainFormat(humanReadableValue decimal.Decimal) cosmtypes.Dec
Click to show internal directories.
Click to hide internal directories.