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

Open
opened 2021-06-11 00:15:22 -07:00 by dazito · 1 comment
dazito commented 2021-06-11 00:15:22 -07:00 (Migrated from github.com)

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)

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 commented 2021-06-24 13:35:59 -07:00 (Migrated from github.com)

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.

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.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
scion/arbitrader#424
No description provided.