Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Return concrete structs instead of json::Value #25

Open
joeirimpan opened this issue Sep 28, 2020 · 5 comments
Open

Return concrete structs instead of json::Value #25

joeirimpan opened this issue Sep 28, 2020 · 5 comments

Comments

@joeirimpan
Copy link
Member

No description provided.

@suyashb95
Copy link
Contributor

@joeirimpan I'd like to work on this

@joeirimpan
Copy link
Member Author

@suyash458 Its yours then :)

@suyashb95
Copy link
Contributor

@joeirimpan what are your thoughts on having the Order modification/cancellation APIs as methods on the structs themselves instead of the KiteConnect client?

@joeirimpan
Copy link
Member Author

I had similar thoughts. Instead of client.place_order, we could write something like client.order.place? But this will make it inconsistent with other libs that we have in place.

@suyashb95
Copy link
Contributor

@joeirimpan I was thinking the APIs to fetch/place orders could be offered by the client but, the APIs to modify/cancel the orders themselves could be methods on the Order struct. So we could write something like below

let order = client.place_order();
order.cancel();

Although, as you said this doesn't make much sense if it's inconsistent with the other libraries

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants