github.com/InjectiveLabs/sdk-go@v1.53.0/exchange/trading_rpc/pb/injective_trading_rpc.proto (about)

     1  // Code generated with goa v3.7.0, DO NOT EDIT.
     2  //
     3  // InjectiveTradingRPC protocol buffer definition
     4  //
     5  // Command:
     6  // $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
     7  
     8  syntax = "proto3";
     9  
    10  package injective_trading_rpc;
    11  
    12  option go_package = "/injective_trading_rpcpb";
    13  
    14  // InjectiveTradingStrategiesRPC defined a gRPC service for Injective Trading
    15  // Strategies.
    16  service InjectiveTradingRPC {
    17  	// Lists all trading strategies
    18  	rpc ListTradingStrategies (ListTradingStrategiesRequest) returns (ListTradingStrategiesResponse);
    19  }
    20  
    21  message ListTradingStrategiesRequest {
    22  	string state = 1;
    23  	// MarketId of the trading strategy
    24  	string market_id = 2;
    25  	// subaccount ID to filter by
    26  	string subaccount_id = 3;
    27  	// Account address
    28  	string account_address = 4;
    29  	// Indicates whether the trading strategy is pending execution
    30  	bool pending_execution = 5;
    31  	// The starting timestamp in UNIX milliseconds for the creation time of the
    32  // trading strategy
    33  	sint64 start_time = 6;
    34  	// The ending timestamp in UNIX milliseconds for the creation time of the
    35  // trading strategy
    36  	sint64 end_time = 7;
    37  	sint32 limit = 8;
    38  	uint64 skip = 9;
    39  	// Filter by strategy type
    40  	repeated string strategy_type = 10;
    41  	// Filter by market type
    42  	string market_type = 11;
    43  }
    44  
    45  message ListTradingStrategiesResponse {
    46  	// The trading strategies
    47  	repeated TradingStrategy strategies = 1;
    48  	Paging paging = 2;
    49  }
    50  
    51  message TradingStrategy {
    52  	string state = 1;
    53  	// MarketId of the trading strategy
    54  	string market_id = 2;
    55  	// subaccount ID of the trading strategy
    56  	string subaccount_id = 3;
    57  	// Account address
    58  	string account_address = 4;
    59  	// Contract address
    60  	string contract_address = 5;
    61  	// Execution price of the trading strategy
    62  	string execution_price = 6;
    63  	// Base quantity of the trading strategy
    64  	string base_quantity = 7;
    65  	// Quote quantity of the trading strategy
    66  	string quote_quantity = 20;
    67  	// Lower bound of the trading strategy
    68  	string lower_bound = 8;
    69  	// Upper bound of the trading strategy
    70  	string upper_bound = 9;
    71  	// Stop loss limit of the trading strategy
    72  	string stop_loss = 10;
    73  	// Take profit limit of the trading strategy
    74  	string take_profit = 11;
    75  	// Swap fee of the trading strategy
    76  	string swap_fee = 12;
    77  	// Base deposit at the time of closing the trading strategy
    78  	string base_deposit = 17;
    79  	// Quote deposit at the time of closing the trading strategy
    80  	string quote_deposit = 18;
    81  	// Market mid price at the time of closing the trading strategy
    82  	string market_mid_price = 19;
    83  	// Subscription quote quantity of the trading strategy
    84  	string subscription_quote_quantity = 21;
    85  	// Subscription base quantity of the trading strategy
    86  	string subscription_base_quantity = 22;
    87  	// Number of grid levels of the trading strategy
    88  	string number_of_grid_levels = 23;
    89  	// Indicates whether the trading strategy should exit with quote only
    90  	bool should_exit_with_quote_only = 24;
    91  	// Indicates the reason for stopping the trading strategy
    92  	string stop_reason = 25;
    93  	// Indicates whether the trading strategy is pending execution
    94  	bool pending_execution = 26;
    95  	// Block height when the strategy was created.
    96  	sint64 created_height = 13;
    97  	// Block height when the strategy was removed.
    98  	sint64 removed_height = 14;
    99  	// UpdatedAt timestamp in UNIX millis.
   100  	sint64 created_at = 15;
   101  	// UpdatedAt timestamp in UNIX millis.
   102  	sint64 updated_at = 16;
   103  	// Indicate how bot will convert funds (into base or quote or keep as is) after
   104  // strategy ended
   105  	string exit_type = 27;
   106  	// Exit config for stop loss
   107  	ExitConfig stop_loss_config = 28;
   108  	// Exit config for take profit
   109  	ExitConfig take_profit_config = 29;
   110  	// Strategy type: arithmetic, geometric...
   111  	string strategy_type = 30;
   112  	// Version of the contract
   113  	string contract_version = 31;
   114  	// Name of the contract
   115  	string contract_name = 32;
   116  	// Type of the market
   117  	string market_type = 33;
   118  }
   119  
   120  message ExitConfig {
   121  	// strategy exit type (stopLoss/takeProfit)
   122  	string exit_type = 1;
   123  	// strategy stopLoss/takeProfit price
   124  	string exit_price = 2;
   125  }
   126  // Paging defines the structure for required params for handling pagination
   127  message Paging {
   128  	// total number of txs saved in database
   129  	sint64 total = 1;
   130  	// can be either block height or index num
   131  	sint32 from = 2;
   132  	// can be either block height or index num
   133  	sint32 to = 3;
   134  	// count entries by subaccount, serving some places on helix
   135  	sint64 count_by_subaccount = 4;
   136  	// array of tokens to navigate to the next pages
   137  	repeated string next = 5;
   138  }