mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 23:16:54 +00:00
engine/exchanges: Add GetCurrencyTradeURL wrapper func/gRPC endpoint (#1521)
* beginning the concept * expands testing and implementations * test standardisation, expansion * more * finish remainder, add rpc func * lint * grammar? I barely know her! * wow i forgot something wow wow wow wow * rm SendPayload * enFixio! * improve binance long-dated support * update test design, update wrapper funcs * adds kraken futures, adds bybit support * fixes SIMPLE bugs * s is for sucks * fixed option url x2 * fixed silly test
This commit is contained in:
@@ -133,6 +133,7 @@ const (
|
||||
GoCryptoTraderService_SetLeverage_FullMethodName = "/gctrpc.GoCryptoTraderService/SetLeverage"
|
||||
GoCryptoTraderService_ChangePositionMargin_FullMethodName = "/gctrpc.GoCryptoTraderService/ChangePositionMargin"
|
||||
GoCryptoTraderService_GetOpenInterest_FullMethodName = "/gctrpc.GoCryptoTraderService/GetOpenInterest"
|
||||
GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName = "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL"
|
||||
)
|
||||
|
||||
// GoCryptoTraderServiceClient is the client API for GoCryptoTraderService service.
|
||||
@@ -253,6 +254,7 @@ type GoCryptoTraderServiceClient interface {
|
||||
SetLeverage(ctx context.Context, in *SetLeverageRequest, opts ...grpc.CallOption) (*SetLeverageResponse, error)
|
||||
ChangePositionMargin(ctx context.Context, in *ChangePositionMarginRequest, opts ...grpc.CallOption) (*ChangePositionMarginResponse, error)
|
||||
GetOpenInterest(ctx context.Context, in *GetOpenInterestRequest, opts ...grpc.CallOption) (*GetOpenInterestResponse, error)
|
||||
GetCurrencyTradeURL(ctx context.Context, in *GetCurrencyTradeURLRequest, opts ...grpc.CallOption) (*GetCurrencyTradeURLResponse, error)
|
||||
}
|
||||
|
||||
type goCryptoTraderServiceClient struct {
|
||||
@@ -1427,6 +1429,15 @@ func (c *goCryptoTraderServiceClient) GetOpenInterest(ctx context.Context, in *G
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *goCryptoTraderServiceClient) GetCurrencyTradeURL(ctx context.Context, in *GetCurrencyTradeURLRequest, opts ...grpc.CallOption) (*GetCurrencyTradeURLResponse, error) {
|
||||
out := new(GetCurrencyTradeURLResponse)
|
||||
err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// GoCryptoTraderServiceServer is the server API for GoCryptoTraderService service.
|
||||
// All implementations must embed UnimplementedGoCryptoTraderServiceServer
|
||||
// for forward compatibility
|
||||
@@ -1545,6 +1556,7 @@ type GoCryptoTraderServiceServer interface {
|
||||
SetLeverage(context.Context, *SetLeverageRequest) (*SetLeverageResponse, error)
|
||||
ChangePositionMargin(context.Context, *ChangePositionMarginRequest) (*ChangePositionMarginResponse, error)
|
||||
GetOpenInterest(context.Context, *GetOpenInterestRequest) (*GetOpenInterestResponse, error)
|
||||
GetCurrencyTradeURL(context.Context, *GetCurrencyTradeURLRequest) (*GetCurrencyTradeURLResponse, error)
|
||||
mustEmbedUnimplementedGoCryptoTraderServiceServer()
|
||||
}
|
||||
|
||||
@@ -1894,6 +1906,9 @@ func (UnimplementedGoCryptoTraderServiceServer) ChangePositionMargin(context.Con
|
||||
func (UnimplementedGoCryptoTraderServiceServer) GetOpenInterest(context.Context, *GetOpenInterestRequest) (*GetOpenInterestResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetOpenInterest not implemented")
|
||||
}
|
||||
func (UnimplementedGoCryptoTraderServiceServer) GetCurrencyTradeURL(context.Context, *GetCurrencyTradeURLRequest) (*GetCurrencyTradeURLResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyTradeURL not implemented")
|
||||
}
|
||||
func (UnimplementedGoCryptoTraderServiceServer) mustEmbedUnimplementedGoCryptoTraderServiceServer() {}
|
||||
|
||||
// UnsafeGoCryptoTraderServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -3977,6 +3992,24 @@ func _GoCryptoTraderService_GetOpenInterest_Handler(srv interface{}, ctx context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GoCryptoTraderService_GetCurrencyTradeURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetCurrencyTradeURLRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GoCryptoTraderServiceServer).GetCurrencyTradeURL(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GoCryptoTraderServiceServer).GetCurrencyTradeURL(ctx, req.(*GetCurrencyTradeURLRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// GoCryptoTraderService_ServiceDesc is the grpc.ServiceDesc for GoCryptoTraderService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -4416,6 +4449,10 @@ var GoCryptoTraderService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetOpenInterest",
|
||||
Handler: _GoCryptoTraderService_GetOpenInterest_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCurrencyTradeURL",
|
||||
Handler: _GoCryptoTraderService_GetCurrencyTradeURL_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user