Filter out currency pairs without a matching pair on a margin exchange #424
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader#424
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I suspect if we add a currency to an "long" exchange that does not exist on a margin exchange we will still subscribe to ticker updates for this pair. Is this true?
If so I think we can optimize it and do not subscribe to tickers that we are not able to trade on, Something like switching line 160 with line 163 here: https://github.com/agonyforge/arbitrader/blob/master/src/main/java/com/agonyforge/arbitrader/service/TradingScheduler.java#L160
On line 163 we know which pair combinations we can trade on
I will comeback to this issue to describe it better (this is just a copy paste of my message on discord)
For example, lets take two exchanges A and B where we can do margin trading only on exchange B.
Exchange A has the following configured currency pairs:
Exchange B has the following configured currency pairs:
In these two configurations, each exchange has one trading pair missing it's corresponding part on the other exchange. This means that exchange A has currency pair DOT/USD which is not set on exchange B. On the other hand exchange B has currency pair SOL/USD which is not set on exchange A.
Now I suspect we are subscribing for ticker events for DOT/USD on exchange A and SOL/USD on exchange B. If this is true, we can optimize it and do not subscribe to ticker events on pair DOT/USD from exchange A and on pair SOL/USD on exchange B because we will never be able to trade on these two pairs.