Clueless-Community / fintech-api

An API that helps you to deal with your financial calculations
MIT License
91 stars 106 forks source link

[Feature] Limit order function #333

Open Abhinavcode13 opened 1 year ago

Abhinavcode13 commented 1 year ago

Are you adding a new feature?

Are you enhancing the old feature?

Describe your feature/enhancement.

Can you add the feature by yourself?

Additional Information

Limit Orders: Functions for placing limit orders to buy or sell securities at a specified price or better.

placeLimitOrder(): Places a limit order to buy or sell securities at a specified price or better.

The placeLimitOrder function takes parameters such as symbol (the trading symbol of the security), quantity (the quantity of securities to be bought or sold), limit_price (the specified price at which the order should be executed), and order_type (specifying whether it is a 'buy' or 'sell' order). The function connects to the API or trading platform using the connect_to_api function (which needs to be implemented based on the specific API documentation). It constructs the limit order request using the provided parameters. The api.place_order method is called to place the order, passing the order request as a parameter. The response is checked to determine if the order was successfully placed. If successful, it retrieves the order ID and prints a success message. Otherwise, it prints an error message. Finally, the function disconnects from the API or trading platform using the disconnect_from_api function (which needs to be implemented based on the specific API documentation).

Abhinavcode13 commented 1 year ago

Please assign me this issue under gssoc 23 @ighoshsubho thanks

ighoshsubho commented 1 year ago

Sure go ahead @Abhinavcode13 ;)

ighoshsubho commented 1 year ago

Hello @Abhinavcode13, this is Version 2 of Fintech API repository, there had been few major updates, please go through the CONTRIBUTING.md to make further contributions. Thanks.

bhavya1857 commented 1 year ago

@ighoshsubho so can i still contribute for this issue

bhavya1857 commented 1 year ago

why isn't this issue closed

ighoshsubho commented 1 year ago

why isn't this issue closed

Can you work on it @bhavya1857?

bhavya1857 commented 1 year ago

yes, but why isn't this issue closed? And what do you mean by version 2

ighoshsubho commented 1 year ago

It was raised by @Abhinavcode13, and it was not done as expected. I kept it open so that he or any other contributor if comes can work on making this feature.

Version 2 is for adding more features to this API repo. Now the entire repo is:

  1. Modular
  2. Has request validation
  3. Auth for certain routes
  4. API docs

These were not there in prev version.

Any more clarification @bhavya1857?

bhavya1857 commented 1 year ago

Oh ok, I can do this

ighoshsubho commented 1 year ago

Sure thing!

github-actions[bot] commented 1 year ago

Hello @Abhinavcode13, thank you for raising an issue. 🙌 I have assigned the issue to you. You can now start working on it. If you encounter any problems, please feel free to connect with us. 👍

bhavya1857 commented 1 year ago

is this the updated version ![Uploading github1.png…]() ?

ighoshsubho commented 1 year ago

The pic has not loaded and its pointing to this page URL.

Anyways the repo itself is updated. Fork the repo and then clone it locally. Else sync the previous changes. and your cloned repo will get upgraded to v2.

Then work on this feature locally.

bhavya1857 commented 1 year ago

i'm sorry i couldn't figure this out, please assign it to someone else