nobitex / docs-api

Nobitex Cryptocurrency Exchange Market API Documentation
https://apidocs.nobitex.ir
Apache License 2.0
55 stars 30 forks source link

[پیشنهاد]: separate limit order and market order #218

Open mokhabadi opened 5 months ago

mokhabadi commented 5 months ago

نیازمندی

I need to easily place a market order with all of my currency. for example, I have 100 USDT and I want to buy BTC as much as I can. now I must get the order book and my balance and calculate how much I afford to buy (to fill in the "amount" parameter) so 3 API calls for 1 order. The "amount" parameter is hard to calculate and the "price" parameter is redundant. for selling with market price, "amount" is easier to fill. I can get my balance with an API call. but I always like to sell the whole of my balance.

راه‌حل

parameters of limit orders and market orders are different so you can separate market orders from limit orders API calls. a market order doesn't need "price". also, a market buy order needs the amount in source currency like USDT but a market sell order needs the amount to be of destination currency like BTC. In addition, it's nice to have an option to buy or sell all of an available currency or a proportion of it, like what the slider on the website does. so the amount could be in percent. like amount = "50%" or add a proportion parameter like proportion="0.5" without specifying amount.

امکانات مشابه

No response

توضیح تکمیلی

No response