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

[RestExchange] filter symbols depending on exchange type #866

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

techfreaque
Copy link
Contributor

Makes sure a spot exchange will only run on a spot pair and a futures pair only on futures

if octobot_commons.SETTLEMENT_ASSET_SEPARATOR not in symbol}
elif self.exchange_manager.is_future:
return {symbol for symbol in self.connector.symbols
if octobot_commons.SETTLEMENT_ASSET_SEPARATOR in symbol}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea !
I think it would be better to use parse_symbol(symbol).is_future() and parse_symbol(symbol).is_spot()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah looks better, I changed it

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

Successfully merging this pull request may close these issues.

3 participants