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

Not able to open position #51

Open
dangalea opened this issue May 31, 2022 · 2 comments
Open

Not able to open position #51

dangalea opened this issue May 31, 2022 · 2 comments

Comments

@dangalea
Copy link

Hi,

I am new to this piece of software, but I am trying to open a new position on Demo mode. I have followed the tutorial on the README, but I'm getting an error when trying to open any position.

My watchlist is as follows:

[{"id":"28","name":"nsdq100","fullName":"NASDAQ100","buy":null,"sell":null,"marketOpen":null,"askDiscounted":0.0,"bidDiscounted":0.0},{"id":"100000","name":"btc","fullName":"Bitcoin","buy":null,"sell":null,"marketOpen":null,"askDiscounted":0.0,"bidDiscounted":0.0},{"id":"18","name":"gold","fullName":"Gold","buy":null,"sell":null,"marketOpen":null,"askDiscounted":0.0,"bidDiscounted":0.0}]

however, when I try to open a NSDQ100 position via:

curl -X POST \
  http://localhost:8088/etoro-api/positions/open \
  -H 'Content-Type: application/json' \
  -H 'mode: Demo' \
  -d '{
	"name": "nsdq100",
	"type": "BUY",
	"amount": 200,
	"leverage": 20
}'

I get the following error:

{"timestamp":1653989576442,"status":500,"error":"Internal Server Error","message":"None BUY price available for id 28","path":"/etoro-api/positions/open"}

Would anyone know what I am doing wrong? Thanks.

@pedroestima-sgg
Copy link

I don't know what you are doing wrong, but if you add something to your watchlist, does it work? Do you get updates?

@dangalea
Copy link
Author

dangalea commented Jun 2, 2022

As you can see from my post, my watchlist returns null for each item I added. I should note that I did the changes suggested in #50 due to an error during installation.

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

No branches or pull requests

2 participants