ismailfer / dukascopy-api-websocket

Spring Boot Dukascopy API (Rest API and Websockets) for Market Data feed, Historical Data, Account Data feed and Instruments, and can place orders
17 stars 8 forks source link

Place Order at MKT #1

Closed Mortgy closed 2 years ago

Mortgy commented 2 years ago

Thanks for sharing this great project.

By reading the source code, I couldn't find any documentation for placing orders at market are you going to add it?

Thanks in advance :)

ismailfer commented 2 years ago

hi Mortgy; you are right; at the moment I didn't include any example on placing orders.

I will add it soon within couple of days hopefully.

Placing of orders will be included in the class DukasStrategy

Mortgy commented 2 years ago

Thanks a lot 😊 I thought it would be more similar to WebSocket class ? as it could be through sending messages? will it have RESTful api ?

ismailfer commented 2 years ago

Hi Mortgy;

I have just done an example of placing a Market Order and Limit Order; using Rest API

Refer to README for examples.

In the future I will add it to the websocket API.

take are

Ismail

Mortgy commented 2 years ago

Thank you @ismailfer 😊

could you please add close position endpoint as well ?

ismailfer commented 2 years ago

Yep it should be added.

Will add it soon

Mortgy commented 2 years ago

@ismailfer

can you explain how to login using the Live account ? it requires Captcha passcode, I whitelisted my IP but still login failing even after switching endpoint URL to live one, how would it work via API ?

do you have any estimations when closing positions could be added ? 😊

ismailfer commented 2 years ago

hi Mortgy,

I don't have a live JForex account; so to be honest not sure how to test it.

However; I found a resource in Dukascopy site; explaining that you can disable the "Pin verification" for live trading; and that should remove this problem.

Here is the link; and also example for captcha:

https://www.dukascopy.com/wiki/en/development/get-started-api/use-jforex-sdk/live-mode https://www.dukascopy.com/wiki/en/forex-cfds/jforex/practices#suppress-pin-code-verification-for-live-accounts

Regarding closing of positions; somethimes this week.

Mortgy commented 2 years ago

@ismailfer thank you for your response I already whitelisted my IP but I wasn't able to get my live account connected

besides, I did the close position endpoint, I could send you a PR if you're open for contribution :)

ismailfer commented 2 years ago

hi Muhammed; thanks; absolutely I welcome your contribution.

Will be nice to help complete this project.

by the way; in the link I sent you above; there is an example code how to do the Pin dialog; you can add it to the DukasStrategy onStart() function.

ismailfer commented 2 years ago

hi Muhammad,

I have reviewed the code; and added few stuff:

Suggested work to be done next (if you can help that will be great)

best

Ismail.

Mortgy commented 2 years ago

Thanks İsmail for the updates

i'll try to work on the pending TODO's and get them ready 😊

I know my level in Java isn't very good, so please review my PR's well not to spoil anything from my side 😅