Documentation
¶
Index ¶
- Variables
- func RegisterInjectiveTradingRPCServer(s grpc.ServiceRegistrar, srv InjectiveTradingRPCServer)
- type ExitConfig
- type GetTradingStatsRequest
- type GetTradingStatsResponse
- func (*GetTradingStatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTradingStatsResponse) GetActiveTradingStrategies() uint64
- func (x *GetTradingStatsResponse) GetMarkets() []*Market
- func (x *GetTradingStatsResponse) GetTotalTradingStrategiesCreated() uint64
- func (x *GetTradingStatsResponse) GetTotalTvl() string
- func (*GetTradingStatsResponse) ProtoMessage()
- func (x *GetTradingStatsResponse) ProtoReflect() protoreflect.Message
- func (x *GetTradingStatsResponse) Reset()
- func (x *GetTradingStatsResponse) String() string
- type InjectiveTradingRPCClient
- type InjectiveTradingRPCServer
- type ListTradingStrategiesRequest
- func (*ListTradingStrategiesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTradingStrategiesRequest) GetAccountAddress() string
- func (x *ListTradingStrategiesRequest) GetEndTime() int64
- func (x *ListTradingStrategiesRequest) GetIsTrailingStrategy() bool
- func (x *ListTradingStrategiesRequest) GetLastExecutedTime() int64
- func (x *ListTradingStrategiesRequest) GetLimit() int32
- func (x *ListTradingStrategiesRequest) GetMarketId() string
- func (x *ListTradingStrategiesRequest) GetMarketType() string
- func (x *ListTradingStrategiesRequest) GetPendingExecution() bool
- func (x *ListTradingStrategiesRequest) GetSkip() uint64
- func (x *ListTradingStrategiesRequest) GetStartTime() int64
- func (x *ListTradingStrategiesRequest) GetState() string
- func (x *ListTradingStrategiesRequest) GetStrategyType() []string
- func (x *ListTradingStrategiesRequest) GetSubaccountId() string
- func (x *ListTradingStrategiesRequest) GetWithPerformance() bool
- func (x *ListTradingStrategiesRequest) GetWithTvl() bool
- func (*ListTradingStrategiesRequest) ProtoMessage()
- func (x *ListTradingStrategiesRequest) ProtoReflect() protoreflect.Message
- func (x *ListTradingStrategiesRequest) Reset()
- func (x *ListTradingStrategiesRequest) String() string
- type ListTradingStrategiesResponse
- func (*ListTradingStrategiesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListTradingStrategiesResponse) GetPaging() *Paging
- func (x *ListTradingStrategiesResponse) GetStrategies() []*TradingStrategy
- func (*ListTradingStrategiesResponse) ProtoMessage()
- func (x *ListTradingStrategiesResponse) ProtoReflect() protoreflect.Message
- func (x *ListTradingStrategiesResponse) Reset()
- func (x *ListTradingStrategiesResponse) String() string
- type Market
- type Paging
- func (*Paging) Descriptor() ([]byte, []int)deprecated
- func (x *Paging) GetCountBySubaccount() int64
- func (x *Paging) GetFrom() int32
- func (x *Paging) GetNext() []string
- func (x *Paging) GetTo() int32
- func (x *Paging) GetTotal() int64
- func (*Paging) ProtoMessage()
- func (x *Paging) ProtoReflect() protoreflect.Message
- func (x *Paging) Reset()
- func (x *Paging) String() string
- type TradingStrategy
- func (*TradingStrategy) Descriptor() ([]byte, []int)deprecated
- func (x *TradingStrategy) GetAccountAddress() string
- func (x *TradingStrategy) GetBaseDeposit() string
- func (x *TradingStrategy) GetBaseQuantity() string
- func (x *TradingStrategy) GetContractAddress() string
- func (x *TradingStrategy) GetContractName() string
- func (x *TradingStrategy) GetContractVersion() string
- func (x *TradingStrategy) GetCreatedAt() int64
- func (x *TradingStrategy) GetCreatedHeight() int64
- func (x *TradingStrategy) GetCurrentBasePrice() string
- func (x *TradingStrategy) GetCurrentQuotePrice() string
- func (x *TradingStrategy) GetExecutionPrice() string
- func (x *TradingStrategy) GetExitType() string
- func (x *TradingStrategy) GetFinalBasePrice() string
- func (x *TradingStrategy) GetFinalQuotePrice() string
- func (x *TradingStrategy) GetInitialBasePrice() string
- func (x *TradingStrategy) GetInitialQuotePrice() string
- func (x *TradingStrategy) GetLastExecutedAt() int64
- func (x *TradingStrategy) GetLowerBound() string
- func (x *TradingStrategy) GetMarketId() string
- func (x *TradingStrategy) GetMarketMidPrice() string
- func (x *TradingStrategy) GetMarketType() string
- func (x *TradingStrategy) GetNumberOfGridLevels() string
- func (x *TradingStrategy) GetPendingExecution() bool
- func (x *TradingStrategy) GetPerformance() string
- func (x *TradingStrategy) GetPnl() string
- func (x *TradingStrategy) GetPnlPerc() string
- func (x *TradingStrategy) GetPnlUpdatedAt() int64
- func (x *TradingStrategy) GetQuoteDeposit() string
- func (x *TradingStrategy) GetQuoteQuantity() string
- func (x *TradingStrategy) GetRemovedHeight() int64
- func (x *TradingStrategy) GetRoi() string
- func (x *TradingStrategy) GetShouldExitWithQuoteOnly() bool
- func (x *TradingStrategy) GetState() string
- func (x *TradingStrategy) GetStopLoss() string
- func (x *TradingStrategy) GetStopLossConfig() *ExitConfig
- func (x *TradingStrategy) GetStopReason() string
- func (x *TradingStrategy) GetStrategyType() string
- func (x *TradingStrategy) GetSubaccountId() string
- func (x *TradingStrategy) GetSubscriptionBaseQuantity() string
- func (x *TradingStrategy) GetSubscriptionQuoteQuantity() string
- func (x *TradingStrategy) GetSwapFee() string
- func (x *TradingStrategy) GetTakeProfit() string
- func (x *TradingStrategy) GetTakeProfitConfig() *ExitConfig
- func (x *TradingStrategy) GetTrailDownCounter() int64
- func (x *TradingStrategy) GetTrailDownPrice() string
- func (x *TradingStrategy) GetTrailUpCounter() int64
- func (x *TradingStrategy) GetTrailUpPrice() string
- func (x *TradingStrategy) GetTvl() string
- func (x *TradingStrategy) GetUpdatedAt() int64
- func (x *TradingStrategy) GetUpperBound() string
- func (*TradingStrategy) ProtoMessage()
- func (x *TradingStrategy) ProtoReflect() protoreflect.Message
- func (x *TradingStrategy) Reset()
- func (x *TradingStrategy) String() string
- type UnimplementedInjectiveTradingRPCServer
- type UnsafeInjectiveTradingRPCServer
Constants ¶
This section is empty.
Variables ¶
var File_goadesign_goagen_injective_trading_rpc_proto protoreflect.FileDescriptor
var InjectiveTradingRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "injective_trading_rpc.InjectiveTradingRPC", HandlerType: (*InjectiveTradingRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListTradingStrategies", Handler: _InjectiveTradingRPC_ListTradingStrategies_Handler, }, { MethodName: "GetTradingStats", Handler: _InjectiveTradingRPC_GetTradingStats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "goadesign_goagen_injective_trading_rpc.proto", }
InjectiveTradingRPC_ServiceDesc is the grpc.ServiceDesc for InjectiveTradingRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInjectiveTradingRPCServer ¶
func RegisterInjectiveTradingRPCServer(s grpc.ServiceRegistrar, srv InjectiveTradingRPCServer)
Types ¶
type ExitConfig ¶ added in v1.51.0
type ExitConfig struct { // strategy exit type (stopLoss/takeProfit) ExitType string `protobuf:"bytes,1,opt,name=exit_type,json=exitType,proto3" json:"exit_type,omitempty"` // strategy stopLoss/takeProfit price ExitPrice string `protobuf:"bytes,2,opt,name=exit_price,json=exitPrice,proto3" json:"exit_price,omitempty"` // contains filtered or unexported fields }
func (*ExitConfig) Descriptor
deprecated
added in
v1.51.0
func (*ExitConfig) Descriptor() ([]byte, []int)
Deprecated: Use ExitConfig.ProtoReflect.Descriptor instead.
func (*ExitConfig) GetExitPrice ¶ added in v1.51.0
func (x *ExitConfig) GetExitPrice() string
func (*ExitConfig) GetExitType ¶ added in v1.51.0
func (x *ExitConfig) GetExitType() string
func (*ExitConfig) ProtoMessage ¶ added in v1.51.0
func (*ExitConfig) ProtoMessage()
func (*ExitConfig) ProtoReflect ¶ added in v1.51.0
func (x *ExitConfig) ProtoReflect() protoreflect.Message
func (*ExitConfig) Reset ¶ added in v1.51.0
func (x *ExitConfig) Reset()
func (*ExitConfig) String ¶ added in v1.51.0
func (x *ExitConfig) String() string
type GetTradingStatsRequest ¶ added in v1.56.0
type GetTradingStatsRequest struct {
// contains filtered or unexported fields
}
func (*GetTradingStatsRequest) Descriptor
deprecated
added in
v1.56.0
func (*GetTradingStatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTradingStatsRequest.ProtoReflect.Descriptor instead.
func (*GetTradingStatsRequest) ProtoMessage ¶ added in v1.56.0
func (*GetTradingStatsRequest) ProtoMessage()
func (*GetTradingStatsRequest) ProtoReflect ¶ added in v1.56.0
func (x *GetTradingStatsRequest) ProtoReflect() protoreflect.Message
func (*GetTradingStatsRequest) Reset ¶ added in v1.56.0
func (x *GetTradingStatsRequest) Reset()
func (*GetTradingStatsRequest) String ¶ added in v1.56.0
func (x *GetTradingStatsRequest) String() string
type GetTradingStatsResponse ¶ added in v1.56.0
type GetTradingStatsResponse struct { // Total of unique active trading strategies ActiveTradingStrategies uint64 `` /* 133-byte string literal not displayed */ // Total number of created trading strategies TotalTradingStrategiesCreated uint64 `` /* 153-byte string literal not displayed */ // Total TVL of all active trading strategies TotalTvl string `protobuf:"bytes,3,opt,name=total_tvl,json=totalTvl,proto3" json:"total_tvl,omitempty"` // Market stats Markets []*Market `protobuf:"bytes,4,rep,name=markets,proto3" json:"markets,omitempty"` // contains filtered or unexported fields }
func (*GetTradingStatsResponse) Descriptor
deprecated
added in
v1.56.0
func (*GetTradingStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTradingStatsResponse.ProtoReflect.Descriptor instead.
func (*GetTradingStatsResponse) GetActiveTradingStrategies ¶ added in v1.56.0
func (x *GetTradingStatsResponse) GetActiveTradingStrategies() uint64
func (*GetTradingStatsResponse) GetMarkets ¶ added in v1.56.0
func (x *GetTradingStatsResponse) GetMarkets() []*Market
func (*GetTradingStatsResponse) GetTotalTradingStrategiesCreated ¶ added in v1.56.0
func (x *GetTradingStatsResponse) GetTotalTradingStrategiesCreated() uint64
func (*GetTradingStatsResponse) GetTotalTvl ¶ added in v1.56.0
func (x *GetTradingStatsResponse) GetTotalTvl() string
func (*GetTradingStatsResponse) ProtoMessage ¶ added in v1.56.0
func (*GetTradingStatsResponse) ProtoMessage()
func (*GetTradingStatsResponse) ProtoReflect ¶ added in v1.56.0
func (x *GetTradingStatsResponse) ProtoReflect() protoreflect.Message
func (*GetTradingStatsResponse) Reset ¶ added in v1.56.0
func (x *GetTradingStatsResponse) Reset()
func (*GetTradingStatsResponse) String ¶ added in v1.56.0
func (x *GetTradingStatsResponse) String() string
type InjectiveTradingRPCClient ¶
type InjectiveTradingRPCClient interface { // Lists all trading strategies ListTradingStrategies(ctx context.Context, in *ListTradingStrategiesRequest, opts ...grpc.CallOption) (*ListTradingStrategiesResponse, error) // GetStats returns global statistics in the last 24hs GetTradingStats(ctx context.Context, in *GetTradingStatsRequest, opts ...grpc.CallOption) (*GetTradingStatsResponse, error) }
InjectiveTradingRPCClient is the client API for InjectiveTradingRPC 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 NewInjectiveTradingRPCClient ¶
func NewInjectiveTradingRPCClient(cc grpc.ClientConnInterface) InjectiveTradingRPCClient
type InjectiveTradingRPCServer ¶
type InjectiveTradingRPCServer interface { // Lists all trading strategies ListTradingStrategies(context.Context, *ListTradingStrategiesRequest) (*ListTradingStrategiesResponse, error) // GetStats returns global statistics in the last 24hs GetTradingStats(context.Context, *GetTradingStatsRequest) (*GetTradingStatsResponse, error) // contains filtered or unexported methods }
InjectiveTradingRPCServer is the server API for InjectiveTradingRPC service. All implementations must embed UnimplementedInjectiveTradingRPCServer for forward compatibility
type ListTradingStrategiesRequest ¶
type ListTradingStrategiesRequest struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` // MarketId of the trading strategy MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // subaccount ID to filter by SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // Account address AccountAddress string `protobuf:"bytes,4,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // Indicates whether the trading strategy is pending execution PendingExecution bool `protobuf:"varint,5,opt,name=pending_execution,json=pendingExecution,proto3" json:"pending_execution,omitempty"` // The starting timestamp in UNIX milliseconds for the creation time of the // trading strategy StartTime int64 `protobuf:"zigzag64,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The ending timestamp in UNIX milliseconds for the creation time of the // trading strategy EndTime int64 `protobuf:"zigzag64,7,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Limit int32 `protobuf:"zigzag32,8,opt,name=limit,proto3" json:"limit,omitempty"` Skip uint64 `protobuf:"varint,9,opt,name=skip,proto3" json:"skip,omitempty"` // Filter by strategy type StrategyType []string `protobuf:"bytes,10,rep,name=strategy_type,json=strategyType,proto3" json:"strategy_type,omitempty"` // Filter by market type MarketType string `protobuf:"bytes,11,opt,name=market_type,json=marketType,proto3" json:"market_type,omitempty"` // The last executed timestamp in UNIX milliseconds for the last executed time // of the trading strategy LastExecutedTime int64 `protobuf:"zigzag64,12,opt,name=last_executed_time,json=lastExecutedTime,proto3" json:"last_executed_time,omitempty"` // Include TVL in the response WithTvl bool `protobuf:"varint,13,opt,name=with_tvl,json=withTvl,proto3" json:"with_tvl,omitempty"` // Indicates whether the trading strategy is a trailing strategy IsTrailingStrategy bool `protobuf:"varint,14,opt,name=is_trailing_strategy,json=isTrailingStrategy,proto3" json:"is_trailing_strategy,omitempty"` // Indicates whether the trading strategy performance should be included in the // response WithPerformance bool `protobuf:"varint,15,opt,name=with_performance,json=withPerformance,proto3" json:"with_performance,omitempty"` // contains filtered or unexported fields }
func (*ListTradingStrategiesRequest) Descriptor
deprecated
func (*ListTradingStrategiesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTradingStrategiesRequest.ProtoReflect.Descriptor instead.
func (*ListTradingStrategiesRequest) GetAccountAddress ¶
func (x *ListTradingStrategiesRequest) GetAccountAddress() string
func (*ListTradingStrategiesRequest) GetEndTime ¶
func (x *ListTradingStrategiesRequest) GetEndTime() int64
func (*ListTradingStrategiesRequest) GetIsTrailingStrategy ¶ added in v1.56.0
func (x *ListTradingStrategiesRequest) GetIsTrailingStrategy() bool
func (*ListTradingStrategiesRequest) GetLastExecutedTime ¶ added in v1.56.0
func (x *ListTradingStrategiesRequest) GetLastExecutedTime() int64
func (*ListTradingStrategiesRequest) GetLimit ¶
func (x *ListTradingStrategiesRequest) GetLimit() int32
func (*ListTradingStrategiesRequest) GetMarketId ¶
func (x *ListTradingStrategiesRequest) GetMarketId() string
func (*ListTradingStrategiesRequest) GetMarketType ¶ added in v1.51.0
func (x *ListTradingStrategiesRequest) GetMarketType() string
func (*ListTradingStrategiesRequest) GetPendingExecution ¶
func (x *ListTradingStrategiesRequest) GetPendingExecution() bool
func (*ListTradingStrategiesRequest) GetSkip ¶
func (x *ListTradingStrategiesRequest) GetSkip() uint64
func (*ListTradingStrategiesRequest) GetStartTime ¶
func (x *ListTradingStrategiesRequest) GetStartTime() int64
func (*ListTradingStrategiesRequest) GetState ¶
func (x *ListTradingStrategiesRequest) GetState() string
func (*ListTradingStrategiesRequest) GetStrategyType ¶ added in v1.51.0
func (x *ListTradingStrategiesRequest) GetStrategyType() []string
func (*ListTradingStrategiesRequest) GetSubaccountId ¶
func (x *ListTradingStrategiesRequest) GetSubaccountId() string
func (*ListTradingStrategiesRequest) GetWithPerformance ¶ added in v1.56.0
func (x *ListTradingStrategiesRequest) GetWithPerformance() bool
func (*ListTradingStrategiesRequest) GetWithTvl ¶ added in v1.56.0
func (x *ListTradingStrategiesRequest) GetWithTvl() bool
func (*ListTradingStrategiesRequest) ProtoMessage ¶
func (*ListTradingStrategiesRequest) ProtoMessage()
func (*ListTradingStrategiesRequest) ProtoReflect ¶
func (x *ListTradingStrategiesRequest) ProtoReflect() protoreflect.Message
func (*ListTradingStrategiesRequest) Reset ¶
func (x *ListTradingStrategiesRequest) Reset()
func (*ListTradingStrategiesRequest) String ¶
func (x *ListTradingStrategiesRequest) String() string
type ListTradingStrategiesResponse ¶
type ListTradingStrategiesResponse struct { // The trading strategies Strategies []*TradingStrategy `protobuf:"bytes,1,rep,name=strategies,proto3" json:"strategies,omitempty"` Paging *Paging `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"` // contains filtered or unexported fields }
func (*ListTradingStrategiesResponse) Descriptor
deprecated
func (*ListTradingStrategiesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTradingStrategiesResponse.ProtoReflect.Descriptor instead.
func (*ListTradingStrategiesResponse) GetPaging ¶
func (x *ListTradingStrategiesResponse) GetPaging() *Paging
func (*ListTradingStrategiesResponse) GetStrategies ¶
func (x *ListTradingStrategiesResponse) GetStrategies() []*TradingStrategy
func (*ListTradingStrategiesResponse) ProtoMessage ¶
func (*ListTradingStrategiesResponse) ProtoMessage()
func (*ListTradingStrategiesResponse) ProtoReflect ¶
func (x *ListTradingStrategiesResponse) ProtoReflect() protoreflect.Message
func (*ListTradingStrategiesResponse) Reset ¶
func (x *ListTradingStrategiesResponse) Reset()
func (*ListTradingStrategiesResponse) String ¶
func (x *ListTradingStrategiesResponse) String() string
type Market ¶ added in v1.56.0
type Market struct { // MarketId of the trading strategy MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // Total of unique active trading strategies ActiveTradingStrategies uint64 `` /* 133-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Market) Descriptor
deprecated
added in
v1.56.0
func (*Market) GetActiveTradingStrategies ¶ added in v1.56.0
func (*Market) GetMarketId ¶ added in v1.56.0
func (*Market) ProtoMessage ¶ added in v1.56.0
func (*Market) ProtoMessage()
func (*Market) ProtoReflect ¶ added in v1.56.0
func (x *Market) ProtoReflect() protoreflect.Message
type Paging ¶
type Paging struct { // total number of txs saved in database Total int64 `protobuf:"zigzag64,1,opt,name=total,proto3" json:"total,omitempty"` // can be either block height or index num From int32 `protobuf:"zigzag32,2,opt,name=from,proto3" json:"from,omitempty"` // can be either block height or index num To int32 `protobuf:"zigzag32,3,opt,name=to,proto3" json:"to,omitempty"` // count entries by subaccount, serving some places on helix CountBySubaccount int64 `protobuf:"zigzag64,4,opt,name=count_by_subaccount,json=countBySubaccount,proto3" json:"count_by_subaccount,omitempty"` // array of tokens to navigate to the next pages Next []string `protobuf:"bytes,5,rep,name=next,proto3" json:"next,omitempty"` // contains filtered or unexported fields }
Paging defines the structure for required params for handling pagination
func (*Paging) Descriptor
deprecated
func (*Paging) GetCountBySubaccount ¶
func (*Paging) ProtoMessage ¶
func (*Paging) ProtoMessage()
func (*Paging) ProtoReflect ¶
func (x *Paging) ProtoReflect() protoreflect.Message
type TradingStrategy ¶
type TradingStrategy struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` // MarketId of the trading strategy MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // subaccount ID of the trading strategy SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` // Account address AccountAddress string `protobuf:"bytes,4,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // Contract address ContractAddress string `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // Execution price of the trading strategy ExecutionPrice string `protobuf:"bytes,6,opt,name=execution_price,json=executionPrice,proto3" json:"execution_price,omitempty"` // Base quantity of the trading strategy BaseQuantity string `protobuf:"bytes,7,opt,name=base_quantity,json=baseQuantity,proto3" json:"base_quantity,omitempty"` // Quote quantity of the trading strategy QuoteQuantity string `protobuf:"bytes,20,opt,name=quote_quantity,json=quoteQuantity,proto3" json:"quote_quantity,omitempty"` // Lower bound of the trading strategy LowerBound string `protobuf:"bytes,8,opt,name=lower_bound,json=lowerBound,proto3" json:"lower_bound,omitempty"` // Upper bound of the trading strategy UpperBound string `protobuf:"bytes,9,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"` // Stop loss limit of the trading strategy StopLoss string `protobuf:"bytes,10,opt,name=stop_loss,json=stopLoss,proto3" json:"stop_loss,omitempty"` // Take profit limit of the trading strategy TakeProfit string `protobuf:"bytes,11,opt,name=take_profit,json=takeProfit,proto3" json:"take_profit,omitempty"` // Swap fee of the trading strategy SwapFee string `protobuf:"bytes,12,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"` // Base deposit at the time of closing the trading strategy BaseDeposit string `protobuf:"bytes,17,opt,name=base_deposit,json=baseDeposit,proto3" json:"base_deposit,omitempty"` // Quote deposit at the time of closing the trading strategy QuoteDeposit string `protobuf:"bytes,18,opt,name=quote_deposit,json=quoteDeposit,proto3" json:"quote_deposit,omitempty"` // Market mid price at the time of closing the trading strategy MarketMidPrice string `protobuf:"bytes,19,opt,name=market_mid_price,json=marketMidPrice,proto3" json:"market_mid_price,omitempty"` // Subscription quote quantity of the trading strategy SubscriptionQuoteQuantity string `` /* 139-byte string literal not displayed */ // Subscription base quantity of the trading strategy SubscriptionBaseQuantity string `` /* 136-byte string literal not displayed */ // Number of grid levels of the trading strategy NumberOfGridLevels string `protobuf:"bytes,23,opt,name=number_of_grid_levels,json=numberOfGridLevels,proto3" json:"number_of_grid_levels,omitempty"` // Indicates whether the trading strategy should exit with quote only ShouldExitWithQuoteOnly bool `` /* 138-byte string literal not displayed */ // Indicates the reason for stopping the trading strategy StopReason string `protobuf:"bytes,25,opt,name=stop_reason,json=stopReason,proto3" json:"stop_reason,omitempty"` // Indicates whether the trading strategy is pending execution PendingExecution bool `protobuf:"varint,26,opt,name=pending_execution,json=pendingExecution,proto3" json:"pending_execution,omitempty"` // Block height when the strategy was created. CreatedHeight int64 `protobuf:"zigzag64,13,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` // Block height when the strategy was removed. RemovedHeight int64 `protobuf:"zigzag64,14,opt,name=removed_height,json=removedHeight,proto3" json:"removed_height,omitempty"` // UpdatedAt timestamp in UNIX millis. CreatedAt int64 `protobuf:"zigzag64,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // UpdatedAt timestamp in UNIX millis. UpdatedAt int64 `protobuf:"zigzag64,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Indicate how bot will convert funds (into base or quote or keep as is) after // strategy ended ExitType string `protobuf:"bytes,27,opt,name=exit_type,json=exitType,proto3" json:"exit_type,omitempty"` // Exit config for stop loss StopLossConfig *ExitConfig `protobuf:"bytes,28,opt,name=stop_loss_config,json=stopLossConfig,proto3" json:"stop_loss_config,omitempty"` // Exit config for take profit TakeProfitConfig *ExitConfig `protobuf:"bytes,29,opt,name=take_profit_config,json=takeProfitConfig,proto3" json:"take_profit_config,omitempty"` // Strategy type: arithmetic, geometric... StrategyType string `protobuf:"bytes,30,opt,name=strategy_type,json=strategyType,proto3" json:"strategy_type,omitempty"` // Version of the contract ContractVersion string `protobuf:"bytes,31,opt,name=contract_version,json=contractVersion,proto3" json:"contract_version,omitempty"` // Name of the contract ContractName string `protobuf:"bytes,32,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"` // Type of the market MarketType string `protobuf:"bytes,33,opt,name=market_type,json=marketType,proto3" json:"market_type,omitempty"` // lastExecutedAt timestamp in UNIX millis. LastExecutedAt int64 `protobuf:"zigzag64,34,opt,name=last_executed_at,json=lastExecutedAt,proto3" json:"last_executed_at,omitempty"` // trailing up price TrailUpPrice string `protobuf:"bytes,35,opt,name=trail_up_price,json=trailUpPrice,proto3" json:"trail_up_price,omitempty"` // trailing down price TrailDownPrice string `protobuf:"bytes,36,opt,name=trail_down_price,json=trailDownPrice,proto3" json:"trail_down_price,omitempty"` // trailing up counter TrailUpCounter int64 `protobuf:"zigzag64,37,opt,name=trail_up_counter,json=trailUpCounter,proto3" json:"trail_up_counter,omitempty"` // trailing down counter TrailDownCounter int64 `protobuf:"zigzag64,38,opt,name=trail_down_counter,json=trailDownCounter,proto3" json:"trail_down_counter,omitempty"` // TVL of the trading strategy Tvl string `protobuf:"bytes,39,opt,name=tvl,proto3" json:"tvl,omitempty"` // PnL of the trading strategy Pnl string `protobuf:"bytes,40,opt,name=pnl,proto3" json:"pnl,omitempty"` // PnL percentage of the trading strategy PnlPerc string `protobuf:"bytes,41,opt,name=pnl_perc,json=pnlPerc,proto3" json:"pnl_perc,omitempty"` // pnlUpdatedAt timestamp in UNIX millis. PnlUpdatedAt int64 `protobuf:"zigzag64,42,opt,name=pnl_updated_at,json=pnlUpdatedAt,proto3" json:"pnl_updated_at,omitempty"` // Indicates the performance of the trading strategy Performance string `protobuf:"bytes,43,opt,name=performance,proto3" json:"performance,omitempty"` // Return on investment of the trading strategy Roi string `protobuf:"bytes,44,opt,name=roi,proto3" json:"roi,omitempty"` // Initial base price of the trading strategy InitialBasePrice string `protobuf:"bytes,45,opt,name=initial_base_price,json=initialBasePrice,proto3" json:"initial_base_price,omitempty"` // Initial quote price of the trading strategy InitialQuotePrice string `protobuf:"bytes,46,opt,name=initial_quote_price,json=initialQuotePrice,proto3" json:"initial_quote_price,omitempty"` // Current base price of the trading strategy CurrentBasePrice string `protobuf:"bytes,47,opt,name=current_base_price,json=currentBasePrice,proto3" json:"current_base_price,omitempty"` // Current quote price of the trading strategy CurrentQuotePrice string `protobuf:"bytes,48,opt,name=current_quote_price,json=currentQuotePrice,proto3" json:"current_quote_price,omitempty"` // Final base price of the trading strategy FinalBasePrice string `protobuf:"bytes,49,opt,name=final_base_price,json=finalBasePrice,proto3" json:"final_base_price,omitempty"` // Final quote price of the trading strategy FinalQuotePrice string `protobuf:"bytes,50,opt,name=final_quote_price,json=finalQuotePrice,proto3" json:"final_quote_price,omitempty"` // contains filtered or unexported fields }
func (*TradingStrategy) Descriptor
deprecated
func (*TradingStrategy) Descriptor() ([]byte, []int)
Deprecated: Use TradingStrategy.ProtoReflect.Descriptor instead.
func (*TradingStrategy) GetAccountAddress ¶
func (x *TradingStrategy) GetAccountAddress() string
func (*TradingStrategy) GetBaseDeposit ¶
func (x *TradingStrategy) GetBaseDeposit() string
func (*TradingStrategy) GetBaseQuantity ¶
func (x *TradingStrategy) GetBaseQuantity() string
func (*TradingStrategy) GetContractAddress ¶
func (x *TradingStrategy) GetContractAddress() string
func (*TradingStrategy) GetContractName ¶ added in v1.51.0
func (x *TradingStrategy) GetContractName() string
func (*TradingStrategy) GetContractVersion ¶ added in v1.51.0
func (x *TradingStrategy) GetContractVersion() string
func (*TradingStrategy) GetCreatedAt ¶
func (x *TradingStrategy) GetCreatedAt() int64
func (*TradingStrategy) GetCreatedHeight ¶
func (x *TradingStrategy) GetCreatedHeight() int64
func (*TradingStrategy) GetCurrentBasePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetCurrentBasePrice() string
func (*TradingStrategy) GetCurrentQuotePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetCurrentQuotePrice() string
func (*TradingStrategy) GetExecutionPrice ¶
func (x *TradingStrategy) GetExecutionPrice() string
func (*TradingStrategy) GetExitType ¶ added in v1.51.0
func (x *TradingStrategy) GetExitType() string
func (*TradingStrategy) GetFinalBasePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetFinalBasePrice() string
func (*TradingStrategy) GetFinalQuotePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetFinalQuotePrice() string
func (*TradingStrategy) GetInitialBasePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetInitialBasePrice() string
func (*TradingStrategy) GetInitialQuotePrice ¶ added in v1.56.0
func (x *TradingStrategy) GetInitialQuotePrice() string
func (*TradingStrategy) GetLastExecutedAt ¶ added in v1.56.0
func (x *TradingStrategy) GetLastExecutedAt() int64
func (*TradingStrategy) GetLowerBound ¶
func (x *TradingStrategy) GetLowerBound() string
func (*TradingStrategy) GetMarketId ¶
func (x *TradingStrategy) GetMarketId() string
func (*TradingStrategy) GetMarketMidPrice ¶
func (x *TradingStrategy) GetMarketMidPrice() string
func (*TradingStrategy) GetMarketType ¶ added in v1.51.0
func (x *TradingStrategy) GetMarketType() string
func (*TradingStrategy) GetNumberOfGridLevels ¶
func (x *TradingStrategy) GetNumberOfGridLevels() string
func (*TradingStrategy) GetPendingExecution ¶
func (x *TradingStrategy) GetPendingExecution() bool
func (*TradingStrategy) GetPerformance ¶ added in v1.56.0
func (x *TradingStrategy) GetPerformance() string
func (*TradingStrategy) GetPnl ¶ added in v1.56.0
func (x *TradingStrategy) GetPnl() string
func (*TradingStrategy) GetPnlPerc ¶ added in v1.56.0
func (x *TradingStrategy) GetPnlPerc() string
func (*TradingStrategy) GetPnlUpdatedAt ¶ added in v1.56.0
func (x *TradingStrategy) GetPnlUpdatedAt() int64
func (*TradingStrategy) GetQuoteDeposit ¶
func (x *TradingStrategy) GetQuoteDeposit() string
func (*TradingStrategy) GetQuoteQuantity ¶
func (x *TradingStrategy) GetQuoteQuantity() string
func (*TradingStrategy) GetRemovedHeight ¶
func (x *TradingStrategy) GetRemovedHeight() int64
func (*TradingStrategy) GetRoi ¶ added in v1.56.0
func (x *TradingStrategy) GetRoi() string
func (*TradingStrategy) GetShouldExitWithQuoteOnly ¶
func (x *TradingStrategy) GetShouldExitWithQuoteOnly() bool
func (*TradingStrategy) GetState ¶
func (x *TradingStrategy) GetState() string
func (*TradingStrategy) GetStopLoss ¶
func (x *TradingStrategy) GetStopLoss() string
func (*TradingStrategy) GetStopLossConfig ¶ added in v1.51.0
func (x *TradingStrategy) GetStopLossConfig() *ExitConfig
func (*TradingStrategy) GetStopReason ¶
func (x *TradingStrategy) GetStopReason() string
func (*TradingStrategy) GetStrategyType ¶ added in v1.51.0
func (x *TradingStrategy) GetStrategyType() string
func (*TradingStrategy) GetSubaccountId ¶
func (x *TradingStrategy) GetSubaccountId() string
func (*TradingStrategy) GetSubscriptionBaseQuantity ¶
func (x *TradingStrategy) GetSubscriptionBaseQuantity() string
func (*TradingStrategy) GetSubscriptionQuoteQuantity ¶
func (x *TradingStrategy) GetSubscriptionQuoteQuantity() string
func (*TradingStrategy) GetSwapFee ¶
func (x *TradingStrategy) GetSwapFee() string
func (*TradingStrategy) GetTakeProfit ¶
func (x *TradingStrategy) GetTakeProfit() string
func (*TradingStrategy) GetTakeProfitConfig ¶ added in v1.51.0
func (x *TradingStrategy) GetTakeProfitConfig() *ExitConfig
func (*TradingStrategy) GetTrailDownCounter ¶ added in v1.56.0
func (x *TradingStrategy) GetTrailDownCounter() int64
func (*TradingStrategy) GetTrailDownPrice ¶ added in v1.56.0
func (x *TradingStrategy) GetTrailDownPrice() string
func (*TradingStrategy) GetTrailUpCounter ¶ added in v1.56.0
func (x *TradingStrategy) GetTrailUpCounter() int64
func (*TradingStrategy) GetTrailUpPrice ¶ added in v1.56.0
func (x *TradingStrategy) GetTrailUpPrice() string
func (*TradingStrategy) GetTvl ¶ added in v1.56.0
func (x *TradingStrategy) GetTvl() string
func (*TradingStrategy) GetUpdatedAt ¶
func (x *TradingStrategy) GetUpdatedAt() int64
func (*TradingStrategy) GetUpperBound ¶
func (x *TradingStrategy) GetUpperBound() string
func (*TradingStrategy) ProtoMessage ¶
func (*TradingStrategy) ProtoMessage()
func (*TradingStrategy) ProtoReflect ¶
func (x *TradingStrategy) ProtoReflect() protoreflect.Message
func (*TradingStrategy) Reset ¶
func (x *TradingStrategy) Reset()
func (*TradingStrategy) String ¶
func (x *TradingStrategy) String() string
type UnimplementedInjectiveTradingRPCServer ¶
type UnimplementedInjectiveTradingRPCServer struct { }
UnimplementedInjectiveTradingRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedInjectiveTradingRPCServer) GetTradingStats ¶ added in v1.56.0
func (UnimplementedInjectiveTradingRPCServer) GetTradingStats(context.Context, *GetTradingStatsRequest) (*GetTradingStatsResponse, error)
func (UnimplementedInjectiveTradingRPCServer) ListTradingStrategies ¶
func (UnimplementedInjectiveTradingRPCServer) ListTradingStrategies(context.Context, *ListTradingStrategiesRequest) (*ListTradingStrategiesResponse, error)
type UnsafeInjectiveTradingRPCServer ¶
type UnsafeInjectiveTradingRPCServer interface {
// contains filtered or unexported methods
}
UnsafeInjectiveTradingRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InjectiveTradingRPCServer will result in compilation errors.