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

Filter out currency pairs without a matching pair on a margin exchange #424

Open
dazito opened this issue Jun 11, 2021 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@dazito
Copy link
Member

dazito commented Jun 11, 2021

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)

@dazito
Copy link
Member Author

dazito commented Jun 24, 2021

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:

  • BTC/USD
  • ETH/USD
  • DOT/USD

Exchange B has the following configured currency pairs:

  • BTC/USD
  • ETH/USD
  • SOL/USD

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.

@scionaltera scionaltera added the enhancement New feature or request label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants