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

Get the opening price of a position #14

Closed
jpdom opened this issue Nov 13, 2020 · 5 comments
Closed

Get the opening price of a position #14

jpdom opened this issue Nov 13, 2020 · 5 comments

Comments

@jpdom
Copy link

jpdom commented Nov 13, 2020

Hi ! First of all congratulations, this is a fine piece of work!
I was wondering if when we open a position we can get the price at which it was opened in the response object. This is very useful because you almost never can open a position at the price you were "watching" it when you made the decision to buy.

Thanks in advance!

@ok24601
Copy link
Owner

ok24601 commented Nov 14, 2020

Hi, thanks for your feedback.
you are right, the price which you are using in open position request can be diffrent from the it'll be opened by etoro because price can be changed while request is being sended. I just added "openRate" property to the EtoroPosition, check out latest master and try it out.

@jpdom
Copy link
Author

jpdom commented Nov 16, 2020

Hi @oleh2208 ! Thanks for the quick solution! Could you please update the docker image so I can pull it ? For some reason I cannot build one myself :/

@jpdom
Copy link
Author

jpdom commented Nov 16, 2020

Just FYI this is the error I get trying to build the image:
C:\Users\joaop\Documents\MTB\etoro-api>docker build -t etoro-api . Sending build context to Docker daemon 224.8MB Step 1/8 : FROM openjdk:11-jdk-slim AS builder ---> 8206ad34e1d2 Step 2/8 : RUN apt update && apt-get install libfontconfig -y ---> Using cache ---> 48d22a901e55 Step 3/8 : WORKDIR /artifact/app ---> Using cache ---> 08a51d24fb48 Step 4/8 : COPY . . ---> Using cache ---> d9217009c066 Step 5/8 : RUN ./gradlew build ---> Running in 7a0a7ea7e341 /usr/bin/env: ‘sh\r’: No such file or directory The command '/bin/sh -c ./gradlew build' returned a non-zero code: 127

@jpdom
Copy link
Author

jpdom commented Nov 16, 2020

Actually I see that you build push action failed, opened and issue for that :) #15

@jpdom
Copy link
Author

jpdom commented Nov 16, 2020

Fixed the error while building, the issue was that because i'm using windows I had to set :
git config --global core.autocrlf false

Because of the different line endings in windows and linux.

I've tested the new property returned in "OpenPosition" and it works perfectly, closing this issue 👍

@jpdom jpdom closed this as completed Nov 16, 2020
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