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

how to get Symbol name in strategy file? #8131

Closed
sionex-code opened this issue Feb 7, 2023 · 2 comments
Closed

how to get Symbol name in strategy file? #8131

sionex-code opened this issue Feb 7, 2023 · 2 comments
Labels
Question Questions - will be closed after some period of inactivity.

Comments

@sionex-code
Copy link

sionex-code commented Feb 7, 2023

Describe your environment

  • Operating system: Win 11
  • Python Version: 3.9
  • CCXT version: 2.0.71
  • Freqtrade Version: freqtrade 2022.12

Your question

last6rows = dataframe['enter_long'].iloc[-6:]
last6rows = last6rows[::-1]
requests.get('https://xxxxx.site/data/entry.php?q='+str(last6rows.to_json()))

So this is my code. I am trying to ping this URL upon an entry signal. I am attempting to send a signal to this URL if the last 6 rows contain "enter_long = 1", but I am unsure of how to obtain the current symbol name. I tried to export the dataframe to a CSV, but I was unable to find the symbol name.

i am sorry for making this stupid useless question,

@sionex-code sionex-code added the Question Questions - will be closed after some period of inactivity. label Feb 7, 2023
@sionex-code
Copy link
Author

i found the solution:

print(self.dp.ticker(metadata['pair'])['symbol'])

@xmatthias
Copy link
Member

xmatthias commented Feb 7, 2023

Depending on which method you're using this - it's either metadata (all populate_*_trend methods) - or pair / trade.pair for callbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Questions - will be closed after some period of inactivity.
Projects
None yet
Development

No branches or pull requests

2 participants