Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Req & Res & backend methods to return open orders / positions only considering ctidTraderAccountId and SymbolID #28

Open
raul-gherman opened this issue Jan 1, 2025 · 0 comments

Comments

@raul-gherman
Copy link

raul-gherman commented Jan 1, 2025

currently, ProtoOAReconcileRes returns all open orders and open positions for ctidTraderAccountId

implementing i.e. GetOpenOrdersBySymbolIdReq --> GetOpenOrdersBySymbolIdRes could prove very useful for traders sporting many open orders / positions spanning across multiple symbols

potential .proto definitions:

// Request for getting Trader current open positions filtered by SymbolID.
message ProtoOAGetOpenPositionsBySymbolIdReq
{
    optional ProtoOAPayloadType payloadType            = 1  [default = PROTO_OA_GET_OPEN_POSITIONS_BY_SIMBOLD_ID_REQ];
    required int64              ctidTraderAccountId    = 2; // Unique identifier of the trading account. Used to match responses to trading accounts.
    repeated int64              symbolId               = 3; // Unique identifier of the Symbol in cTrader platform.
}

// Response for ProtoOAGetOpenPositionsBySymbolIdReq request.
message ProtoOAGetOpenPositionsBySymbolIdRes
{
    optional ProtoOAPayloadType payloadType         = 1  [default = PROTO_OA_GET_OPEN_POSITIONS_BY_SIMBOLD_ID_RES];
    required int64              ctidTraderAccountId = 2; // Unique identifier of the trading account. Used to match responses to trading accounts.
    repeated ProtoOAPosition    position            = 3; // The list of trading account open positions.
}

// Request for getting Trader current open pending orders filtered by SymbolID.
message ProtoOAGetOpenOrdersBySymbolIdReq
{
    optional ProtoOAPayloadType payloadType            = 1  [default = PROTO_OA_GET_OPEN_ORDERS_BY_SIMBOLD_ID_REQ];
    required int64              ctidTraderAccountId    = 2; // Unique identifier of the trading account. Used to match responses to trading accounts.
    repeated int64              symbolId               = 3; // Unique identifier of the Symbol in cTrader platform.
}

// Response for ProtoOAGetOpenOrdersBySymbolIdReq request.
message ProtoOAGetOpenOrdersBySymbolIdRes
{
    optional ProtoOAPayloadType payloadType         = 1  [default = PROTO_OA_GET_OPEN_ORDERS_BY_SIMBOLD_ID_RES];
    required int64              ctidTraderAccountId = 2; // Unique identifier of the trading account. Used to match responses to trading accounts.
    repeated ProtoOAOrder       order               = 3; // The list of trading account pending orders.
}

@raul-gherman raul-gherman changed the title Implement Req & Res & backend methods to return open orders only considering ctidTraderAccountId and SymbolID Implement Req & Res & backend methods to return open orders or positions only considering ctidTraderAccountId and SymbolID Jan 1, 2025
@raul-gherman raul-gherman changed the title Implement Req & Res & backend methods to return open orders or positions only considering ctidTraderAccountId and SymbolID Implement Req & Res & backend methods to return open orders / positions only considering ctidTraderAccountId and SymbolID Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant