Documentation ¶
Overview ¶
Package injective_portfolio_rpcpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterInjectivePortfolioRPCHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInjectivePortfolioRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InjectivePortfolioRPCClient) error
- func RegisterInjectivePortfolioRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInjectivePortfolioRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InjectivePortfolioRPCServer) error
- func RegisterInjectivePortfolioRPCServer(s grpc.ServiceRegistrar, srv InjectivePortfolioRPCServer)
- type AccountPortfolioBalancesRequest
- func (*AccountPortfolioBalancesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccountPortfolioBalancesRequest) GetAccountAddress() string
- func (*AccountPortfolioBalancesRequest) ProtoMessage()
- func (x *AccountPortfolioBalancesRequest) ProtoReflect() protoreflect.Message
- func (x *AccountPortfolioBalancesRequest) Reset()
- func (x *AccountPortfolioBalancesRequest) String() string
- type AccountPortfolioBalancesResponse
- func (*AccountPortfolioBalancesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AccountPortfolioBalancesResponse) GetPortfolio() *PortfolioBalances
- func (*AccountPortfolioBalancesResponse) ProtoMessage()
- func (x *AccountPortfolioBalancesResponse) ProtoReflect() protoreflect.Message
- func (x *AccountPortfolioBalancesResponse) Reset()
- func (x *AccountPortfolioBalancesResponse) String() string
- type AccountPortfolioRequest
- func (*AccountPortfolioRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccountPortfolioRequest) GetAccountAddress() string
- func (*AccountPortfolioRequest) ProtoMessage()
- func (x *AccountPortfolioRequest) ProtoReflect() protoreflect.Message
- func (x *AccountPortfolioRequest) Reset()
- func (x *AccountPortfolioRequest) String() string
- type AccountPortfolioResponse
- func (*AccountPortfolioResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AccountPortfolioResponse) GetPortfolio() *Portfolio
- func (*AccountPortfolioResponse) ProtoMessage()
- func (x *AccountPortfolioResponse) ProtoReflect() protoreflect.Message
- func (x *AccountPortfolioResponse) Reset()
- func (x *AccountPortfolioResponse) String() string
- type Coin
- type DerivativePosition
- func (*DerivativePosition) Descriptor() ([]byte, []int)deprecated
- func (x *DerivativePosition) GetAggregateReduceOnlyQuantity() string
- func (x *DerivativePosition) GetCreatedAt() int64
- func (x *DerivativePosition) GetDirection() string
- func (x *DerivativePosition) GetEntryPrice() string
- func (x *DerivativePosition) GetLiquidationPrice() string
- func (x *DerivativePosition) GetMargin() string
- func (x *DerivativePosition) GetMarkPrice() string
- func (x *DerivativePosition) GetMarketId() string
- func (x *DerivativePosition) GetQuantity() string
- func (x *DerivativePosition) GetSubaccountId() string
- func (x *DerivativePosition) GetTicker() string
- func (x *DerivativePosition) GetUpdatedAt() int64
- func (*DerivativePosition) ProtoMessage()
- func (x *DerivativePosition) ProtoReflect() protoreflect.Message
- func (x *DerivativePosition) Reset()
- func (x *DerivativePosition) String() string
- type Holder
- type InjectivePortfolioRPCClient
- type InjectivePortfolioRPCServer
- type InjectivePortfolioRPC_StreamAccountPortfolioClient
- type InjectivePortfolioRPC_StreamAccountPortfolioServer
- type Portfolio
- func (*Portfolio) Descriptor() ([]byte, []int)deprecated
- func (x *Portfolio) GetAccountAddress() string
- func (x *Portfolio) GetBankBalances() []*Coin
- func (x *Portfolio) GetPositionsWithUpnl() []*PositionsWithUPNL
- func (x *Portfolio) GetSubaccounts() []*SubaccountBalanceV2
- func (*Portfolio) ProtoMessage()
- func (x *Portfolio) ProtoReflect() protoreflect.Message
- func (x *Portfolio) Reset()
- func (x *Portfolio) String() string
- type PortfolioBalances
- func (*PortfolioBalances) Descriptor() ([]byte, []int)deprecated
- func (x *PortfolioBalances) GetAccountAddress() string
- func (x *PortfolioBalances) GetBankBalances() []*Coin
- func (x *PortfolioBalances) GetSubaccounts() []*SubaccountBalanceV2
- func (*PortfolioBalances) ProtoMessage()
- func (x *PortfolioBalances) ProtoReflect() protoreflect.Message
- func (x *PortfolioBalances) Reset()
- func (x *PortfolioBalances) String() string
- type PositionsWithUPNL
- func (*PositionsWithUPNL) Descriptor() ([]byte, []int)deprecated
- func (x *PositionsWithUPNL) GetPosition() *DerivativePosition
- func (x *PositionsWithUPNL) GetUnrealizedPnl() string
- func (*PositionsWithUPNL) ProtoMessage()
- func (x *PositionsWithUPNL) ProtoReflect() protoreflect.Message
- func (x *PositionsWithUPNL) Reset()
- func (x *PositionsWithUPNL) String() string
- type StreamAccountPortfolioRequest
- func (*StreamAccountPortfolioRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamAccountPortfolioRequest) GetAccountAddress() string
- func (x *StreamAccountPortfolioRequest) GetSubaccountId() string
- func (x *StreamAccountPortfolioRequest) GetType() string
- func (*StreamAccountPortfolioRequest) ProtoMessage()
- func (x *StreamAccountPortfolioRequest) ProtoReflect() protoreflect.Message
- func (x *StreamAccountPortfolioRequest) Reset()
- func (x *StreamAccountPortfolioRequest) String() string
- type StreamAccountPortfolioResponse
- func (*StreamAccountPortfolioResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamAccountPortfolioResponse) GetAmount() string
- func (x *StreamAccountPortfolioResponse) GetDenom() string
- func (x *StreamAccountPortfolioResponse) GetSubaccountId() string
- func (x *StreamAccountPortfolioResponse) GetTimestamp() int64
- func (x *StreamAccountPortfolioResponse) GetType() string
- func (*StreamAccountPortfolioResponse) ProtoMessage()
- func (x *StreamAccountPortfolioResponse) ProtoReflect() protoreflect.Message
- func (x *StreamAccountPortfolioResponse) Reset()
- func (x *StreamAccountPortfolioResponse) String() string
- type SubaccountBalanceV2
- func (*SubaccountBalanceV2) Descriptor() ([]byte, []int)deprecated
- func (x *SubaccountBalanceV2) GetDenom() string
- func (x *SubaccountBalanceV2) GetDeposit() *SubaccountDeposit
- func (x *SubaccountBalanceV2) GetSubaccountId() string
- func (*SubaccountBalanceV2) ProtoMessage()
- func (x *SubaccountBalanceV2) ProtoReflect() protoreflect.Message
- func (x *SubaccountBalanceV2) Reset()
- func (x *SubaccountBalanceV2) String() string
- type SubaccountDeposit
- func (*SubaccountDeposit) Descriptor() ([]byte, []int)deprecated
- func (x *SubaccountDeposit) GetAvailableBalance() string
- func (x *SubaccountDeposit) GetTotalBalance() string
- func (*SubaccountDeposit) ProtoMessage()
- func (x *SubaccountDeposit) ProtoReflect() protoreflect.Message
- func (x *SubaccountDeposit) Reset()
- func (x *SubaccountDeposit) String() string
- type TokenHoldersRequest
- func (*TokenHoldersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenHoldersRequest) GetCursor() string
- func (x *TokenHoldersRequest) GetDenom() string
- func (x *TokenHoldersRequest) GetLimit() int32
- func (*TokenHoldersRequest) ProtoMessage()
- func (x *TokenHoldersRequest) ProtoReflect() protoreflect.Message
- func (x *TokenHoldersRequest) Reset()
- func (x *TokenHoldersRequest) String() string
- type TokenHoldersResponse
- func (*TokenHoldersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenHoldersResponse) GetHolders() []*Holder
- func (x *TokenHoldersResponse) GetNextCursors() []string
- func (*TokenHoldersResponse) ProtoMessage()
- func (x *TokenHoldersResponse) ProtoReflect() protoreflect.Message
- func (x *TokenHoldersResponse) Reset()
- func (x *TokenHoldersResponse) String() string
- type UnimplementedInjectivePortfolioRPCServer
- func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolio(context.Context, *AccountPortfolioRequest) (*AccountPortfolioResponse, error)
- func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolioBalances(context.Context, *AccountPortfolioBalancesRequest) (*AccountPortfolioBalancesResponse, error)
- func (UnimplementedInjectivePortfolioRPCServer) StreamAccountPortfolio(*StreamAccountPortfolioRequest, ...) error
- func (UnimplementedInjectivePortfolioRPCServer) TokenHolders(context.Context, *TokenHoldersRequest) (*TokenHoldersResponse, error)
- type UnsafeInjectivePortfolioRPCServer
Constants ¶
This section is empty.
Variables ¶
var File_goadesign_goagen_injective_portfolio_rpc_proto protoreflect.FileDescriptor
var InjectivePortfolioRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "injective_portfolio_rpc.InjectivePortfolioRPC", HandlerType: (*InjectivePortfolioRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TokenHolders", Handler: _InjectivePortfolioRPC_TokenHolders_Handler, }, { MethodName: "AccountPortfolio", Handler: _InjectivePortfolioRPC_AccountPortfolio_Handler, }, { MethodName: "AccountPortfolioBalances", Handler: _InjectivePortfolioRPC_AccountPortfolioBalances_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamAccountPortfolio", Handler: _InjectivePortfolioRPC_StreamAccountPortfolio_Handler, ServerStreams: true, }, }, Metadata: "goadesign_goagen_injective_portfolio_rpc.proto", }
InjectivePortfolioRPC_ServiceDesc is the grpc.ServiceDesc for InjectivePortfolioRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInjectivePortfolioRPCHandler ¶
func RegisterInjectivePortfolioRPCHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInjectivePortfolioRPCHandler registers the http handlers for service InjectivePortfolioRPC to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInjectivePortfolioRPCHandlerClient ¶
func RegisterInjectivePortfolioRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InjectivePortfolioRPCClient) error
RegisterInjectivePortfolioRPCHandlerClient registers the http handlers for service InjectivePortfolioRPC to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InjectivePortfolioRPCClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InjectivePortfolioRPCClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InjectivePortfolioRPCClient" to call the correct interceptors.
func RegisterInjectivePortfolioRPCHandlerFromEndpoint ¶
func RegisterInjectivePortfolioRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInjectivePortfolioRPCHandlerFromEndpoint is same as RegisterInjectivePortfolioRPCHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInjectivePortfolioRPCHandlerServer ¶
func RegisterInjectivePortfolioRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InjectivePortfolioRPCServer) error
RegisterInjectivePortfolioRPCHandlerServer registers the http handlers for service InjectivePortfolioRPC to "mux". UnaryRPC :call InjectivePortfolioRPCServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInjectivePortfolioRPCHandlerFromEndpoint instead.
func RegisterInjectivePortfolioRPCServer ¶
func RegisterInjectivePortfolioRPCServer(s grpc.ServiceRegistrar, srv InjectivePortfolioRPCServer)
Types ¶
type AccountPortfolioBalancesRequest ¶ added in v1.49.0
type AccountPortfolioBalancesRequest struct { // Account address AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // contains filtered or unexported fields }
func (*AccountPortfolioBalancesRequest) Descriptor
deprecated
added in
v1.49.0
func (*AccountPortfolioBalancesRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccountPortfolioBalancesRequest.ProtoReflect.Descriptor instead.
func (*AccountPortfolioBalancesRequest) GetAccountAddress ¶ added in v1.49.0
func (x *AccountPortfolioBalancesRequest) GetAccountAddress() string
func (*AccountPortfolioBalancesRequest) ProtoMessage ¶ added in v1.49.0
func (*AccountPortfolioBalancesRequest) ProtoMessage()
func (*AccountPortfolioBalancesRequest) ProtoReflect ¶ added in v1.49.0
func (x *AccountPortfolioBalancesRequest) ProtoReflect() protoreflect.Message
func (*AccountPortfolioBalancesRequest) Reset ¶ added in v1.49.0
func (x *AccountPortfolioBalancesRequest) Reset()
func (*AccountPortfolioBalancesRequest) String ¶ added in v1.49.0
func (x *AccountPortfolioBalancesRequest) String() string
type AccountPortfolioBalancesResponse ¶ added in v1.49.0
type AccountPortfolioBalancesResponse struct { // The portfolio balances of this account Portfolio *PortfolioBalances `protobuf:"bytes,1,opt,name=portfolio,proto3" json:"portfolio,omitempty"` // contains filtered or unexported fields }
func (*AccountPortfolioBalancesResponse) Descriptor
deprecated
added in
v1.49.0
func (*AccountPortfolioBalancesResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountPortfolioBalancesResponse.ProtoReflect.Descriptor instead.
func (*AccountPortfolioBalancesResponse) GetPortfolio ¶ added in v1.49.0
func (x *AccountPortfolioBalancesResponse) GetPortfolio() *PortfolioBalances
func (*AccountPortfolioBalancesResponse) ProtoMessage ¶ added in v1.49.0
func (*AccountPortfolioBalancesResponse) ProtoMessage()
func (*AccountPortfolioBalancesResponse) ProtoReflect ¶ added in v1.49.0
func (x *AccountPortfolioBalancesResponse) ProtoReflect() protoreflect.Message
func (*AccountPortfolioBalancesResponse) Reset ¶ added in v1.49.0
func (x *AccountPortfolioBalancesResponse) Reset()
func (*AccountPortfolioBalancesResponse) String ¶ added in v1.49.0
func (x *AccountPortfolioBalancesResponse) String() string
type AccountPortfolioRequest ¶
type AccountPortfolioRequest struct { // Account address AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // contains filtered or unexported fields }
func (*AccountPortfolioRequest) Descriptor
deprecated
func (*AccountPortfolioRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccountPortfolioRequest.ProtoReflect.Descriptor instead.
func (*AccountPortfolioRequest) GetAccountAddress ¶
func (x *AccountPortfolioRequest) GetAccountAddress() string
func (*AccountPortfolioRequest) ProtoMessage ¶
func (*AccountPortfolioRequest) ProtoMessage()
func (*AccountPortfolioRequest) ProtoReflect ¶
func (x *AccountPortfolioRequest) ProtoReflect() protoreflect.Message
func (*AccountPortfolioRequest) Reset ¶
func (x *AccountPortfolioRequest) Reset()
func (*AccountPortfolioRequest) String ¶
func (x *AccountPortfolioRequest) String() string
type AccountPortfolioResponse ¶
type AccountPortfolioResponse struct { // The portfolio of this account Portfolio *Portfolio `protobuf:"bytes,1,opt,name=portfolio,proto3" json:"portfolio,omitempty"` // contains filtered or unexported fields }
func (*AccountPortfolioResponse) Descriptor
deprecated
func (*AccountPortfolioResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountPortfolioResponse.ProtoReflect.Descriptor instead.
func (*AccountPortfolioResponse) GetPortfolio ¶
func (x *AccountPortfolioResponse) GetPortfolio() *Portfolio
func (*AccountPortfolioResponse) ProtoMessage ¶
func (*AccountPortfolioResponse) ProtoMessage()
func (*AccountPortfolioResponse) ProtoReflect ¶
func (x *AccountPortfolioResponse) ProtoReflect() protoreflect.Message
func (*AccountPortfolioResponse) Reset ¶
func (x *AccountPortfolioResponse) Reset()
func (*AccountPortfolioResponse) String ¶
func (x *AccountPortfolioResponse) String() string
type Coin ¶
type Coin struct { // Denom of the coin Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*Coin) Descriptor
deprecated
func (*Coin) ProtoMessage ¶
func (*Coin) ProtoMessage()
func (*Coin) ProtoReflect ¶
func (x *Coin) ProtoReflect() protoreflect.Message
type DerivativePosition ¶
type DerivativePosition struct { // Ticker of the derivative market Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"` // Derivative Market ID MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // The subaccountId that the position belongs to SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // Direction of the position Direction string `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` // Quantity of the position Quantity string `protobuf:"bytes,5,opt,name=quantity,proto3" json:"quantity,omitempty"` // Price of the position EntryPrice string `protobuf:"bytes,6,opt,name=entry_price,json=entryPrice,proto3" json:"entry_price,omitempty"` // Margin of the position Margin string `protobuf:"bytes,7,opt,name=margin,proto3" json:"margin,omitempty"` // LiquidationPrice of the position LiquidationPrice string `protobuf:"bytes,8,opt,name=liquidation_price,json=liquidationPrice,proto3" json:"liquidation_price,omitempty"` // MarkPrice of the position MarkPrice string `protobuf:"bytes,9,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` // Aggregate Quantity of the Reduce Only orders associated with the position AggregateReduceOnlyQuantity string `` /* 147-byte string literal not displayed */ // Position updated timestamp in UNIX millis. UpdatedAt int64 `protobuf:"zigzag64,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Position created timestamp in UNIX millis. CreatedAt int64 `protobuf:"zigzag64,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*DerivativePosition) Descriptor
deprecated
func (*DerivativePosition) Descriptor() ([]byte, []int)
Deprecated: Use DerivativePosition.ProtoReflect.Descriptor instead.
func (*DerivativePosition) GetAggregateReduceOnlyQuantity ¶
func (x *DerivativePosition) GetAggregateReduceOnlyQuantity() string
func (*DerivativePosition) GetCreatedAt ¶
func (x *DerivativePosition) GetCreatedAt() int64
func (*DerivativePosition) GetDirection ¶
func (x *DerivativePosition) GetDirection() string
func (*DerivativePosition) GetEntryPrice ¶
func (x *DerivativePosition) GetEntryPrice() string
func (*DerivativePosition) GetLiquidationPrice ¶
func (x *DerivativePosition) GetLiquidationPrice() string
func (*DerivativePosition) GetMargin ¶
func (x *DerivativePosition) GetMargin() string
func (*DerivativePosition) GetMarkPrice ¶
func (x *DerivativePosition) GetMarkPrice() string
func (*DerivativePosition) GetMarketId ¶
func (x *DerivativePosition) GetMarketId() string
func (*DerivativePosition) GetQuantity ¶
func (x *DerivativePosition) GetQuantity() string
func (*DerivativePosition) GetSubaccountId ¶
func (x *DerivativePosition) GetSubaccountId() string
func (*DerivativePosition) GetTicker ¶
func (x *DerivativePosition) GetTicker() string
func (*DerivativePosition) GetUpdatedAt ¶
func (x *DerivativePosition) GetUpdatedAt() int64
func (*DerivativePosition) ProtoMessage ¶
func (*DerivativePosition) ProtoMessage()
func (*DerivativePosition) ProtoReflect ¶
func (x *DerivativePosition) ProtoReflect() protoreflect.Message
func (*DerivativePosition) Reset ¶
func (x *DerivativePosition) Reset()
func (*DerivativePosition) String ¶
func (x *DerivativePosition) String() string
type Holder ¶ added in v1.51.0
type Holder struct { // Account address for the holder AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // The balance of the holder Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*Holder) Descriptor
deprecated
added in
v1.51.0
func (*Holder) GetAccountAddress ¶ added in v1.51.0
func (*Holder) GetBalance ¶ added in v1.51.0
func (*Holder) ProtoMessage ¶ added in v1.51.0
func (*Holder) ProtoMessage()
func (*Holder) ProtoReflect ¶ added in v1.51.0
func (x *Holder) ProtoReflect() protoreflect.Message
type InjectivePortfolioRPCClient ¶
type InjectivePortfolioRPCClient interface { // Provide a list of addresses holding a specific token TokenHolders(ctx context.Context, in *TokenHoldersRequest, opts ...grpc.CallOption) (*TokenHoldersResponse, error) // Provide the account's portfolio AccountPortfolio(ctx context.Context, in *AccountPortfolioRequest, opts ...grpc.CallOption) (*AccountPortfolioResponse, error) // Provide the account's portfolio balances AccountPortfolioBalances(ctx context.Context, in *AccountPortfolioBalancesRequest, opts ...grpc.CallOption) (*AccountPortfolioBalancesResponse, error) // Stream the account's portfolio StreamAccountPortfolio(ctx context.Context, in *StreamAccountPortfolioRequest, opts ...grpc.CallOption) (InjectivePortfolioRPC_StreamAccountPortfolioClient, error) }
InjectivePortfolioRPCClient is the client API for InjectivePortfolioRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewInjectivePortfolioRPCClient ¶
func NewInjectivePortfolioRPCClient(cc grpc.ClientConnInterface) InjectivePortfolioRPCClient
type InjectivePortfolioRPCServer ¶
type InjectivePortfolioRPCServer interface { // Provide a list of addresses holding a specific token TokenHolders(context.Context, *TokenHoldersRequest) (*TokenHoldersResponse, error) // Provide the account's portfolio AccountPortfolio(context.Context, *AccountPortfolioRequest) (*AccountPortfolioResponse, error) // Provide the account's portfolio balances AccountPortfolioBalances(context.Context, *AccountPortfolioBalancesRequest) (*AccountPortfolioBalancesResponse, error) // Stream the account's portfolio StreamAccountPortfolio(*StreamAccountPortfolioRequest, InjectivePortfolioRPC_StreamAccountPortfolioServer) error // contains filtered or unexported methods }
InjectivePortfolioRPCServer is the server API for InjectivePortfolioRPC service. All implementations must embed UnimplementedInjectivePortfolioRPCServer for forward compatibility
type InjectivePortfolioRPC_StreamAccountPortfolioClient ¶
type InjectivePortfolioRPC_StreamAccountPortfolioClient interface { Recv() (*StreamAccountPortfolioResponse, error) grpc.ClientStream }
type InjectivePortfolioRPC_StreamAccountPortfolioServer ¶
type InjectivePortfolioRPC_StreamAccountPortfolioServer interface { Send(*StreamAccountPortfolioResponse) error grpc.ServerStream }
type Portfolio ¶
type Portfolio struct { // The account's portfolio address AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // Account available bank balances BankBalances []*Coin `protobuf:"bytes,2,rep,name=bank_balances,json=bankBalances,proto3" json:"bank_balances,omitempty"` // Subaccounts list Subaccounts []*SubaccountBalanceV2 `protobuf:"bytes,3,rep,name=subaccounts,proto3" json:"subaccounts,omitempty"` // All positions for all subaccounts, with unrealized PNL PositionsWithUpnl []*PositionsWithUPNL `protobuf:"bytes,4,rep,name=positions_with_upnl,json=positionsWithUpnl,proto3" json:"positions_with_upnl,omitempty"` // contains filtered or unexported fields }
func (*Portfolio) Descriptor
deprecated
func (*Portfolio) GetAccountAddress ¶
func (*Portfolio) GetBankBalances ¶
func (*Portfolio) GetPositionsWithUpnl ¶
func (x *Portfolio) GetPositionsWithUpnl() []*PositionsWithUPNL
func (*Portfolio) GetSubaccounts ¶
func (x *Portfolio) GetSubaccounts() []*SubaccountBalanceV2
func (*Portfolio) ProtoMessage ¶
func (*Portfolio) ProtoMessage()
func (*Portfolio) ProtoReflect ¶
func (x *Portfolio) ProtoReflect() protoreflect.Message
type PortfolioBalances ¶ added in v1.49.0
type PortfolioBalances struct { // The account's portfolio address AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // Account available bank balances BankBalances []*Coin `protobuf:"bytes,2,rep,name=bank_balances,json=bankBalances,proto3" json:"bank_balances,omitempty"` // Subaccounts list Subaccounts []*SubaccountBalanceV2 `protobuf:"bytes,3,rep,name=subaccounts,proto3" json:"subaccounts,omitempty"` // contains filtered or unexported fields }
func (*PortfolioBalances) Descriptor
deprecated
added in
v1.49.0
func (*PortfolioBalances) Descriptor() ([]byte, []int)
Deprecated: Use PortfolioBalances.ProtoReflect.Descriptor instead.
func (*PortfolioBalances) GetAccountAddress ¶ added in v1.49.0
func (x *PortfolioBalances) GetAccountAddress() string
func (*PortfolioBalances) GetBankBalances ¶ added in v1.49.0
func (x *PortfolioBalances) GetBankBalances() []*Coin
func (*PortfolioBalances) GetSubaccounts ¶ added in v1.49.0
func (x *PortfolioBalances) GetSubaccounts() []*SubaccountBalanceV2
func (*PortfolioBalances) ProtoMessage ¶ added in v1.49.0
func (*PortfolioBalances) ProtoMessage()
func (*PortfolioBalances) ProtoReflect ¶ added in v1.49.0
func (x *PortfolioBalances) ProtoReflect() protoreflect.Message
func (*PortfolioBalances) Reset ¶ added in v1.49.0
func (x *PortfolioBalances) Reset()
func (*PortfolioBalances) String ¶ added in v1.49.0
func (x *PortfolioBalances) String() string
type PositionsWithUPNL ¶
type PositionsWithUPNL struct { Position *DerivativePosition `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // Unrealized PNL UnrealizedPnl string `protobuf:"bytes,2,opt,name=unrealized_pnl,json=unrealizedPnl,proto3" json:"unrealized_pnl,omitempty"` // contains filtered or unexported fields }
func (*PositionsWithUPNL) Descriptor
deprecated
func (*PositionsWithUPNL) Descriptor() ([]byte, []int)
Deprecated: Use PositionsWithUPNL.ProtoReflect.Descriptor instead.
func (*PositionsWithUPNL) GetPosition ¶
func (x *PositionsWithUPNL) GetPosition() *DerivativePosition
func (*PositionsWithUPNL) GetUnrealizedPnl ¶
func (x *PositionsWithUPNL) GetUnrealizedPnl() string
func (*PositionsWithUPNL) ProtoMessage ¶
func (*PositionsWithUPNL) ProtoMessage()
func (*PositionsWithUPNL) ProtoReflect ¶
func (x *PositionsWithUPNL) ProtoReflect() protoreflect.Message
func (*PositionsWithUPNL) Reset ¶
func (x *PositionsWithUPNL) Reset()
func (*PositionsWithUPNL) String ¶
func (x *PositionsWithUPNL) String() string
type StreamAccountPortfolioRequest ¶
type StreamAccountPortfolioRequest struct { // The account's portfolio address AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // Related subaccount ID SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*StreamAccountPortfolioRequest) Descriptor
deprecated
func (*StreamAccountPortfolioRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamAccountPortfolioRequest.ProtoReflect.Descriptor instead.
func (*StreamAccountPortfolioRequest) GetAccountAddress ¶
func (x *StreamAccountPortfolioRequest) GetAccountAddress() string
func (*StreamAccountPortfolioRequest) GetSubaccountId ¶
func (x *StreamAccountPortfolioRequest) GetSubaccountId() string
func (*StreamAccountPortfolioRequest) GetType ¶
func (x *StreamAccountPortfolioRequest) GetType() string
func (*StreamAccountPortfolioRequest) ProtoMessage ¶
func (*StreamAccountPortfolioRequest) ProtoMessage()
func (*StreamAccountPortfolioRequest) ProtoReflect ¶
func (x *StreamAccountPortfolioRequest) ProtoReflect() protoreflect.Message
func (*StreamAccountPortfolioRequest) Reset ¶
func (x *StreamAccountPortfolioRequest) Reset()
func (*StreamAccountPortfolioRequest) String ¶
func (x *StreamAccountPortfolioRequest) String() string
type StreamAccountPortfolioResponse ¶
type StreamAccountPortfolioResponse struct { // type of portfolio entry Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // denom of portfolio entry Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` // amount of portfolio entry Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // subaccount id of portfolio entry SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // Operation timestamp in UNIX millis. Timestamp int64 `protobuf:"zigzag64,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*StreamAccountPortfolioResponse) Descriptor
deprecated
func (*StreamAccountPortfolioResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamAccountPortfolioResponse.ProtoReflect.Descriptor instead.
func (*StreamAccountPortfolioResponse) GetAmount ¶
func (x *StreamAccountPortfolioResponse) GetAmount() string
func (*StreamAccountPortfolioResponse) GetDenom ¶
func (x *StreamAccountPortfolioResponse) GetDenom() string
func (*StreamAccountPortfolioResponse) GetSubaccountId ¶
func (x *StreamAccountPortfolioResponse) GetSubaccountId() string
func (*StreamAccountPortfolioResponse) GetTimestamp ¶ added in v1.46.4
func (x *StreamAccountPortfolioResponse) GetTimestamp() int64
func (*StreamAccountPortfolioResponse) GetType ¶
func (x *StreamAccountPortfolioResponse) GetType() string
func (*StreamAccountPortfolioResponse) ProtoMessage ¶
func (*StreamAccountPortfolioResponse) ProtoMessage()
func (*StreamAccountPortfolioResponse) ProtoReflect ¶
func (x *StreamAccountPortfolioResponse) ProtoReflect() protoreflect.Message
func (*StreamAccountPortfolioResponse) Reset ¶
func (x *StreamAccountPortfolioResponse) Reset()
func (*StreamAccountPortfolioResponse) String ¶
func (x *StreamAccountPortfolioResponse) String() string
type SubaccountBalanceV2 ¶
type SubaccountBalanceV2 struct { // Related subaccount ID SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // Coin denom on the chain. Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` Deposit *SubaccountDeposit `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit,omitempty"` // contains filtered or unexported fields }
func (*SubaccountBalanceV2) Descriptor
deprecated
func (*SubaccountBalanceV2) Descriptor() ([]byte, []int)
Deprecated: Use SubaccountBalanceV2.ProtoReflect.Descriptor instead.
func (*SubaccountBalanceV2) GetDenom ¶
func (x *SubaccountBalanceV2) GetDenom() string
func (*SubaccountBalanceV2) GetDeposit ¶
func (x *SubaccountBalanceV2) GetDeposit() *SubaccountDeposit
func (*SubaccountBalanceV2) GetSubaccountId ¶
func (x *SubaccountBalanceV2) GetSubaccountId() string
func (*SubaccountBalanceV2) ProtoMessage ¶
func (*SubaccountBalanceV2) ProtoMessage()
func (*SubaccountBalanceV2) ProtoReflect ¶
func (x *SubaccountBalanceV2) ProtoReflect() protoreflect.Message
func (*SubaccountBalanceV2) Reset ¶
func (x *SubaccountBalanceV2) Reset()
func (*SubaccountBalanceV2) String ¶
func (x *SubaccountBalanceV2) String() string
type SubaccountDeposit ¶
type SubaccountDeposit struct { TotalBalance string `protobuf:"bytes,1,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"` AvailableBalance string `protobuf:"bytes,2,opt,name=available_balance,json=availableBalance,proto3" json:"available_balance,omitempty"` // contains filtered or unexported fields }
func (*SubaccountDeposit) Descriptor
deprecated
func (*SubaccountDeposit) Descriptor() ([]byte, []int)
Deprecated: Use SubaccountDeposit.ProtoReflect.Descriptor instead.
func (*SubaccountDeposit) GetAvailableBalance ¶
func (x *SubaccountDeposit) GetAvailableBalance() string
func (*SubaccountDeposit) GetTotalBalance ¶
func (x *SubaccountDeposit) GetTotalBalance() string
func (*SubaccountDeposit) ProtoMessage ¶
func (*SubaccountDeposit) ProtoMessage()
func (*SubaccountDeposit) ProtoReflect ¶
func (x *SubaccountDeposit) ProtoReflect() protoreflect.Message
func (*SubaccountDeposit) Reset ¶
func (x *SubaccountDeposit) Reset()
func (*SubaccountDeposit) String ¶
func (x *SubaccountDeposit) String() string
type TokenHoldersRequest ¶ added in v1.51.0
type TokenHoldersRequest struct { // Denom of the token Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` // Cursor for pagination Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` Limit int32 `protobuf:"zigzag32,3,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*TokenHoldersRequest) Descriptor
deprecated
added in
v1.51.0
func (*TokenHoldersRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenHoldersRequest.ProtoReflect.Descriptor instead.
func (*TokenHoldersRequest) GetCursor ¶ added in v1.51.0
func (x *TokenHoldersRequest) GetCursor() string
func (*TokenHoldersRequest) GetDenom ¶ added in v1.51.0
func (x *TokenHoldersRequest) GetDenom() string
func (*TokenHoldersRequest) GetLimit ¶ added in v1.51.0
func (x *TokenHoldersRequest) GetLimit() int32
func (*TokenHoldersRequest) ProtoMessage ¶ added in v1.51.0
func (*TokenHoldersRequest) ProtoMessage()
func (*TokenHoldersRequest) ProtoReflect ¶ added in v1.51.0
func (x *TokenHoldersRequest) ProtoReflect() protoreflect.Message
func (*TokenHoldersRequest) Reset ¶ added in v1.51.0
func (x *TokenHoldersRequest) Reset()
func (*TokenHoldersRequest) String ¶ added in v1.51.0
func (x *TokenHoldersRequest) String() string
type TokenHoldersResponse ¶ added in v1.51.0
type TokenHoldersResponse struct { Holders []*Holder `protobuf:"bytes,1,rep,name=holders,proto3" json:"holders,omitempty"` // Next cursors for pagination NextCursors []string `protobuf:"bytes,2,rep,name=next_cursors,json=nextCursors,proto3" json:"next_cursors,omitempty"` // contains filtered or unexported fields }
func (*TokenHoldersResponse) Descriptor
deprecated
added in
v1.51.0
func (*TokenHoldersResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenHoldersResponse.ProtoReflect.Descriptor instead.
func (*TokenHoldersResponse) GetHolders ¶ added in v1.51.0
func (x *TokenHoldersResponse) GetHolders() []*Holder
func (*TokenHoldersResponse) GetNextCursors ¶ added in v1.51.0
func (x *TokenHoldersResponse) GetNextCursors() []string
func (*TokenHoldersResponse) ProtoMessage ¶ added in v1.51.0
func (*TokenHoldersResponse) ProtoMessage()
func (*TokenHoldersResponse) ProtoReflect ¶ added in v1.51.0
func (x *TokenHoldersResponse) ProtoReflect() protoreflect.Message
func (*TokenHoldersResponse) Reset ¶ added in v1.51.0
func (x *TokenHoldersResponse) Reset()
func (*TokenHoldersResponse) String ¶ added in v1.51.0
func (x *TokenHoldersResponse) String() string
type UnimplementedInjectivePortfolioRPCServer ¶
type UnimplementedInjectivePortfolioRPCServer struct { }
UnimplementedInjectivePortfolioRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolio ¶
func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolio(context.Context, *AccountPortfolioRequest) (*AccountPortfolioResponse, error)
func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolioBalances ¶ added in v1.49.0
func (UnimplementedInjectivePortfolioRPCServer) AccountPortfolioBalances(context.Context, *AccountPortfolioBalancesRequest) (*AccountPortfolioBalancesResponse, error)
func (UnimplementedInjectivePortfolioRPCServer) StreamAccountPortfolio ¶
func (UnimplementedInjectivePortfolioRPCServer) StreamAccountPortfolio(*StreamAccountPortfolioRequest, InjectivePortfolioRPC_StreamAccountPortfolioServer) error
func (UnimplementedInjectivePortfolioRPCServer) TokenHolders ¶ added in v1.51.0
func (UnimplementedInjectivePortfolioRPCServer) TokenHolders(context.Context, *TokenHoldersRequest) (*TokenHoldersResponse, error)
type UnsafeInjectivePortfolioRPCServer ¶
type UnsafeInjectivePortfolioRPCServer interface {
// contains filtered or unexported methods
}
UnsafeInjectivePortfolioRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InjectivePortfolioRPCServer will result in compilation errors.